/* ==========================================================
   Oscilwave — Landing Page Stylesheet
   CSS3 Pure | Mobile-First | CSS Custom Properties
   ========================================================== */

/* --------------------------------------------------------
   0. CUSTOM PROPERTIES (Design Tokens)
   -------------------------------------------------------- */
:root {
  /* Brand Colors */
  --color-primary:       #233A54;
  --color-secondary:     #61829D;
  --color-bg-secondary:  #E2E8F0;
  --color-bg-base:       #F8FAFC;
  --color-white:         #FFFFFF;

  /* Derived Colors */
  --color-primary-light: #2e4d6e;
  --color-secondary-hover: #4f7189;
  --color-text-muted:    #64748B;
  --color-border:        #CBD5E1;

  /* Typography */
  --font-family:         'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-size-base:      1rem;        /* 16px */
  --font-size-sm:        0.875rem;    /* 14px */
  --font-size-xs:        0.75rem;     /* 12px */
  --font-size-lg:        1.125rem;    /* 18px */
  --font-size-xl:        1.25rem;     /* 20px */
  --font-size-2xl:       1.5rem;      /* 24px */
  --font-size-3xl:       2rem;        /* 32px */
  --font-size-4xl:       2.5rem;      /* 40px */
  --font-size-5xl:       3.25rem;     /* 52px */

  --font-weight-regular: 400;
  --font-weight-medium:  500;
  --font-weight-semi:    600;
  --font-weight-bold:    700;

  --line-height-tight:   1.2;
  --line-height-normal:  1.6;
  --line-height-relaxed: 1.75;

  --letter-spacing-tight: -0.02em;
  --letter-spacing-wide:  0.05em;

  /* Spacing */
  --space-xs:   0.25rem;
  --space-sm:   0.5rem;
  --space-md:   1rem;
  --space-lg:   1.5rem;
  --space-xl:   2rem;
  --space-2xl:  3rem;
  --space-3xl:  4rem;
  --space-4xl:  6rem;

  /* Layout */
  --container-max:    1200px;
  --container-pad:    1.25rem;
  --header-height:    4.5rem;
  --border-radius:    0.5rem;
  --border-radius-lg: 0.75rem;

  /* Transitions */
  --transition-fast:   150ms ease;
  --transition-base:   250ms ease;
  --transition-smooth: 400ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}


/* --------------------------------------------------------
   1. RESET & BASE
   -------------------------------------------------------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 100%;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-normal);
  color: var(--color-primary);
  background-color: var(--color-bg-base);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Focus visible for keyboard accessibility */
:focus-visible {
  outline: 2px solid var(--color-secondary);
  outline-offset: 3px;
  border-radius: 2px;
}


/* --------------------------------------------------------
   2. UTILITY — Container
   -------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}


/* --------------------------------------------------------
   3. HEADER
   -------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background-color: rgba(248, 250, 252, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-bg-secondary);
  transition: box-shadow var(--transition-base);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.header__logo-link {
  display: inline-flex;
  align-items: center;
  transition: opacity var(--transition-fast);
}

.header__logo-link:hover {
  opacity: 0.8;
}

.header__logo {
  width: auto;
  height: 44px;
  object-fit: contain;
}

.header__nav {
  display: flex;
  align-items: center;
}

.nav__cta-link {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semi);
  color: var(--color-secondary);
  letter-spacing: var(--letter-spacing-wide);
  text-transform: uppercase;
  padding: var(--space-sm) var(--space-md);
  border: 1.5px solid var(--color-secondary);
  border-radius: var(--border-radius);
  transition:
    color var(--transition-fast),
    background-color var(--transition-fast),
    border-color var(--transition-fast);
}

.nav__cta-link:hover,
.nav__cta-link:focus-visible {
  color: var(--color-white);
  background-color: var(--color-secondary);
  border-color: var(--color-secondary);
}


/* --------------------------------------------------------
   4. HERO SECTION
   -------------------------------------------------------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  min-height: calc(100vh - var(--header-height));
  overflow: hidden;
  padding-block: var(--space-3xl);
}

/* ---- Decorative Background: Dot Grid ---- */
.hero__bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, var(--color-bg-secondary) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.5;
  pointer-events: none;
}

/* ---- Decorative Background: Radial Glow ---- */
.hero__bg-glow {
  position: absolute;
  top: -20%;
  right: -10%;
  width: 60%;
  height: 80%;
  background: radial-gradient(
    ellipse at center,
    rgba(97, 130, 157, 0.10) 0%,
    transparent 70%
  );
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
  align-items: center;
}

/* ---- Content Block ---- */
.hero__content {
  max-width: 640px;
}

.hero__overline {
  display: inline-block;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semi);
  letter-spacing: var(--letter-spacing-wide);
  text-transform: uppercase;
  color: var(--color-secondary);
  margin-bottom: var(--space-lg);
  padding: var(--space-xs) var(--space-md);
  background-color: rgba(97, 130, 157, 0.08);
  border-radius: 100px;
  border: 1px solid rgba(97, 130, 157, 0.15);

  /* Fade-in animation */
  animation: fadeInUp 0.6s var(--transition-smooth) both;
  animation-delay: 0.1s;
}

.hero__heading {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-spacing-tight);
  color: var(--color-primary);
  margin-bottom: var(--space-lg);

  animation: fadeInUp 0.6s var(--transition-smooth) both;
  animation-delay: 0.25s;
}

.hero__heading-accent {
  color: var(--color-secondary);
}

.hero__description {
  font-size: var(--font-size-base);
  line-height: var(--line-height-relaxed);
  color: var(--color-text-muted);
  margin-bottom: var(--space-xl);
  max-width: 540px;

  animation: fadeInUp 0.6s var(--transition-smooth) both;
  animation-delay: 0.4s;
}

.hero__actions {
  animation: fadeInUp 0.6s var(--transition-smooth) both;
  animation-delay: 0.55s;
}

/* ---- Visual (SVG illustration) ---- */
.hero__visual {
  display: none; /* Hidden on mobile, shown on desktop */
  justify-content: center;
  align-items: center;
}

.hero__wave-svg {
  width: 100%;
  max-width: 400px;
  height: auto;
  animation: fadeIn 1s var(--transition-smooth) 0.5s both;
}

/* SVG wave animation */
.hero__wave-path--1 {
  stroke-dasharray: 800;
  stroke-dashoffset: 800;
  animation: drawWave 2s ease-in-out 0.7s forwards;
}

.hero__wave-path--2 {
  stroke-dasharray: 800;
  stroke-dashoffset: 800;
  animation: drawWave 2s ease-in-out 1.0s forwards;
}

.hero__wave-path--3 {
  stroke-dasharray: 800;
  stroke-dashoffset: 800;
  animation: drawWave 2s ease-in-out 1.3s forwards;
}

/* Node pulse animation */
.hero__node {
  animation: pulse 3s ease-in-out infinite;
}

.hero__node--1 { animation-delay: 0s; }
.hero__node--2 { animation-delay: 1s; }
.hero__node--3 { animation-delay: 2s; }


/* --------------------------------------------------------
   5. BUTTON COMPONENT
   -------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-family);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semi);
  letter-spacing: var(--letter-spacing-wide);
  text-transform: uppercase;
  padding: 0.875rem 2rem;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-base),
    background-color var(--transition-fast);
}

.btn--primary {
  color: var(--color-white);
  background-color: var(--color-primary);
  box-shadow: 0 1px 3px rgba(35, 58, 84, 0.12),
              0 4px 12px rgba(35, 58, 84, 0.08);
}

.btn--primary:hover {
  background-color: var(--color-primary-light);
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(35, 58, 84, 0.18),
              0 8px 24px rgba(35, 58, 84, 0.12);
}

.btn--primary:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(35, 58, 84, 0.12);
}

.btn__arrow {
  display: inline-block;
  transition: transform var(--transition-fast);
}

.btn:hover .btn__arrow {
  transform: translateX(4px);
}


/* --------------------------------------------------------
   6. FOOTER
   -------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--color-bg-secondary);
  padding-block: var(--space-xl);
  margin-top: auto;
}

.footer__inner {
  display: flex;
  justify-content: center;
  align-items: center;
}

.footer__copy {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  letter-spacing: 0.02em;
}


/* --------------------------------------------------------
   7. KEYFRAME ANIMATIONS
   -------------------------------------------------------- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes drawWave {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 0.4;
    r: 4;
  }
  50% {
    opacity: 1;
    r: 6;
  }
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}


/* --------------------------------------------------------
   8. MEDIA QUERIES — Progressive Enhancement
   -------------------------------------------------------- */

/* ---- Tablet (≥ 640px) ---- */
@media (min-width: 40em) {
  :root {
    --container-pad: 2rem;
  }

  .header__logo {
    height: 48px;
  }

  .hero__heading {
    font-size: var(--font-size-4xl);
  }

  .hero__description {
    font-size: var(--font-size-lg);
  }
}

/* ---- Desktop (≥ 1024px) ---- */
@media (min-width: 64em) {
  :root {
    --container-pad: 2.5rem;
  }

  .header__logo {
    height: 52px;
  }

  .hero__inner {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4xl);
  }

  .hero__heading {
    font-size: var(--font-size-5xl);
  }

  .hero__description {
    font-size: var(--font-size-xl);
  }

  .hero__visual {
    display: flex;
  }
}

/* ---- Large Desktop (≥ 1280px) ---- */
@media (min-width: 80em) {
  :root {
    --container-pad: 3rem;
  }

  .hero__content {
    max-width: 720px;
  }
}
