/* Awasero - Venture Software House
   Design System: Refined Minimalism
   Brand Color: #00040C (brand dark)
   Typography: Instrument Serif (display) + Inter (body) + JetBrains Mono (mono)
*/

/* =========================================
   CSS Variables
   ========================================= */
:root {
  --color-brand-dark: #00040C;
  --color-accent: #ffffff;
  --color-accent-dim: rgba(255, 255, 255, 0.8);
  --color-accent-muted: rgba(255, 255, 255, 0.5);
  --color-bg-primary: #00040C;
  --color-bg-secondary: rgba(255, 255, 255, 0.02);
  --color-bg-tertiary: rgba(255, 255, 255, 0.01);
  --color-bg-card: rgba(255, 255, 255, 0.02);
  --color-text-primary: #ffffff;
  --color-text-secondary: rgba(255, 255, 255, 0.5);
  --color-text-muted: rgba(255, 255, 255, 0.3);
  --color-border: rgba(255, 255, 255, 0.06);
  --color-border-hover: rgba(255, 255, 255, 0.2);

  --font-display: 'Instrument Serif', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --transition-fast: 150ms ease;
  --transition-normal: 200ms ease;
  --transition-slow: 300ms ease;
}

/* =========================================
   Base Styles
   ========================================= */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-bg-primary);
  color: var(--color-text-primary);
  line-height: 1.6;
}

/* =========================================
   Typography
   ========================================= */
.font-display {
  font-family: var(--font-display);
}

.font-body {
  font-family: var(--font-body);
}

.font-mono {
  font-family: var(--font-mono);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

em, i {
  font-style: italic;
}

/* =========================================
   Selection
   ========================================= */
::selection {
  background-color: var(--color-accent);
  color: var(--color-bg-primary);
}

::-moz-selection {
  background-color: var(--color-accent);
  color: var(--color-bg-primary);
}

/* =========================================
   Custom Scrollbar
   ========================================= */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg-primary);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) var(--color-bg-primary);
}

/* =========================================
   Noise Texture Overlay
   ========================================= */
.noise-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 100;
  opacity: 0.02;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* =========================================
   Canvas Background
   ========================================= */
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.4;
}

/* =========================================
   Animations
   ========================================= */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.98);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0) translateX(-50%);
  }
  50% {
    transform: translateY(-8px) translateX(-50%);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.animate-fade-in {
  animation: fadeIn 0.6s ease-out forwards;
}

.animate-fade-in-delay-1 {
  opacity: 0;
  animation: fadeIn 0.6s ease-out 0.1s forwards;
}

.animate-fade-in-delay-2 {
  opacity: 0;
  animation: fadeIn 0.6s ease-out 0.2s forwards;
}

.animate-fade-in-delay-3 {
  opacity: 0;
  animation: fadeIn 0.6s ease-out 0.3s forwards;
}

.animate-fade-in-delay-4 {
  opacity: 0;
  animation: fadeIn 0.6s ease-out 0.4s forwards;
}

.animate-fade-in-delay-5 {
  opacity: 0;
  animation: fadeIn 0.6s ease-out 0.5s forwards;
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

/* =========================================
   Focus States
   ========================================= */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* =========================================
   Navigation
   ========================================= */
#main-nav.scrolled {
  background-color: rgba(0, 4, 12, 0.98);
}

.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--color-accent);
  transition: width var(--transition-normal);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* =========================================
   Mobile Menu
   ========================================= */
#mobile-menu {
  transition: transform var(--transition-slow) cubic-bezier(0.4, 0, 0.2, 1);
}

#mobile-menu.open {
  transform: translateX(0);
}

.mobile-nav-link {
  position: relative;
  overflow: hidden;
}

.mobile-nav-link::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background-color: var(--color-accent);
  transform: translateX(-50%);
  transition: width var(--transition-normal);
}

.mobile-nav-link:hover::before {
  width: 100%;
}

/* =========================================
   Form Elements
   ========================================= */
input[type="email"],
input[type="text"],
textarea {
  background-color: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  color: var(--color-text-primary);
  transition: border-color var(--transition-normal);
}

input[type="email"]:focus,
input[type="text"]:focus,
textarea:focus {
  border-color: var(--color-border-hover);
  outline: none;
}

input[type="email"]::placeholder,
input[type="text"]::placeholder,
textarea::placeholder {
  color: var(--color-text-muted);
}

/* =========================================
   FAQ Accordion
   ========================================= */
details summary {
  list-style: none;
}

details summary::-webkit-details-marker {
  display: none;
}

details[open] summary + div {
  animation: fadeIn 0.2s ease-out;
}

/* =========================================
   Counter Animation
   ========================================= */
[data-count] {
  font-variant-numeric: tabular-nums;
}

/* =========================================
   Intersection Observer Animations
   ========================================= */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================
   Responsive Adjustments
   ========================================= */
@media (max-width: 768px) {
  h1 {
    font-size: 2.25rem !important;
  }

  h2 {
    font-size: 1.875rem !important;
  }

  .section-padding {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }
}

/* =========================================
   Reduced Motion
   ========================================= */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .animate-float {
    animation: none;
  }
}

/* =========================================
   Print Styles
   ========================================= */
@media print {
  .noise-overlay,
  #bg-canvas,
  nav,
  #mobile-menu {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  a {
    text-decoration: underline;
  }
}

/* =========================================
   High Contrast Mode
   ========================================= */
@media (prefers-contrast: high) {
  :root {
    --color-accent: #ffffff;
    --color-border: rgba(255, 255, 255, 0.3);
  }

  .noise-overlay {
    display: none;
  }
}

/* =========================================
   Dark Mode (already dark)
   ========================================= */
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
  }
}
