/* ============================================
   DESIGN SYSTEM — Newborn Screening Storytelling
   ============================================ */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Montserrat:wght@400;600;700;800;900&display=swap');

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Colors */
  --bg-primary: #0a0e27;
  --bg-secondary: #0f1535;
  --bg-card: rgba(255, 255, 255, 0.05);
  --bg-card-hover: rgba(255, 255, 255, 0.1);
  --accent-teal: #4ecdc4;
  --accent-pink: #ff6b9d;
  --accent-purple: #a855f7;
  --accent-gold: #f5c542;
  --text-primary: #ffffff;
  --text-secondary: #b8c5d6;
  --text-muted: #6b7a90;
  --glass-bg: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.12);

  /* Typography */
  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Spacing */
  --section-padding: 80px 40px;

  /* Transitions */
  --transition-smooth: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
  overflow-y: scroll;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-teal) var(--bg-primary);
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
}

/* Custom scrollbar for WebKit */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--accent-teal);
  border-radius: 3px;
}

/* ---------- Scroll Progress Bar ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-teal), var(--accent-pink), var(--accent-purple));
  z-index: 1000;
  width: 0%;
  transition: width 0.15s ease-out;
}

/* ---------- Side Navigation Dots ---------- */
.side-nav {
  position: fixed;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.side-nav__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition-smooth);
  position: relative;
}

.side-nav__dot:hover {
  background: rgba(255, 255, 255, 0.5);
  transform: scale(1.3);
}

.side-nav__dot.active {
  background: var(--accent-teal);
  border-color: var(--accent-teal);
  box-shadow: 0 0 12px rgba(78, 205, 196, 0.5);
  transform: scale(1.3);
}

.side-nav__dot::after {
  content: attr(data-label);
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  font-size: 0.75rem;
  font-family: var(--font-body);
  color: var(--text-secondary);
  background: var(--bg-secondary);
  padding: 4px 10px;
  border-radius: 6px;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-smooth);
}

.side-nav__dot:hover::after {
  opacity: 1;
}

/* ---------- Section Base ---------- */
.section {
  min-height: 100vh;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: var(--section-padding);
  position: relative;
  overflow: hidden;
}

.section__content {
  max-width: 1100px;
  width: 100%;
  position: relative;
  z-index: 2;
}

/* ---------- Animated elements ---------- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.reveal-left {
  opacity: 0;
  transform: translateX(-60px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(60px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-scale.visible {
  opacity: 1;
  transform: scale(1);
}

/* Staggered delays */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }
.delay-6 { transition-delay: 0.6s; }

/* ============================================
   SECTION 1 — HERO
   ============================================ */
.hero {
  background: linear-gradient(170deg, #0a0e27 0%, #111640 50%, #0d1130 100%);
  text-align: center;
  position: relative;
}

.hero__bg-image {
  position: absolute;
  inset: 0;
  background: url('assets/hero-bg.png') center center / cover no-repeat;
  opacity: 0.3;
  z-index: 0;
}

/* Decorative pulsing circles */
.hero__pulse-circle {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(78, 205, 196, 0.2);
  animation: pulse-ring 4s ease-out infinite;
}

.hero__pulse-circle--1 {
  width: 300px;
  height: 300px;
  top: 15%;
  left: 10%;
  animation-delay: 0s;
}

.hero__pulse-circle--2 {
  width: 200px;
  height: 200px;
  bottom: 20%;
  right: 15%;
  animation-delay: 1.3s;
  border-color: rgba(255, 107, 157, 0.15);
}

.hero__pulse-circle--3 {
  width: 150px;
  height: 150px;
  top: 40%;
  right: 25%;
  animation-delay: 2.6s;
  border-color: rgba(168, 85, 247, 0.15);
}

@keyframes pulse-ring {
  0% {
    transform: scale(0.8);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.3;
  }
  100% {
    transform: scale(0.8);
    opacity: 0.8;
  }
}

.hero__icon {
  font-size: 4rem;
  margin-bottom: 24px;
  display: inline-block;
  animation: float 3s ease-in-out infinite;
  filter: drop-shadow(0 0 20px rgba(255, 107, 157, 0.4));
}

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

.hero__title {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-teal) 50%, var(--accent-pink) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero__subtitle {
  font-size: clamp(1rem, 2vw, 1.35rem);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 40px;
  font-weight: 300;
  letter-spacing: 0.02em;
}

.hero__scroll-indicator {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  animation: bounce-down 2s ease-in-out infinite;
  cursor: pointer;
}

.hero__scroll-indicator svg {
  width: 24px;
  height: 24px;
  stroke: var(--accent-teal);
}

@keyframes bounce-down {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(10px); }
  60% { transform: translateY(5px); }
}

/* ============================================
   SECTION 2 — WHAT IS SCREENING
   ============================================ */
.what-is {
  background: linear-gradient(180deg, #0d1130 0%, #0f1535 50%, #111a40 100%);
}

.what-is__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.what-is__image-wrapper {
  position: relative;
}

.what-is__image {
  width: 100%;
  max-width: 420px;
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  border: 1px solid var(--glass-border);
}

.what-is__image-glow {
  position: absolute;
  inset: -20px;
  background: radial-gradient(circle, rgba(78, 205, 196, 0.15), transparent 70%);
  z-index: -1;
  border-radius: 50%;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-teal);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 16px;
}

.section-label__line {
  width: 30px;
  height: 2px;
  background: var(--accent-teal);
  border-radius: 1px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
}

.section-text {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.8;
}

.highlight-box {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, rgba(78, 205, 196, 0.1), rgba(168, 85, 247, 0.1));
  border: 1px solid rgba(78, 205, 196, 0.2);
  border-radius: 12px;
  padding: 16px 24px;
  margin-top: 12px;
}

.highlight-box__number {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--accent-teal);
}

.highlight-box__text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.highlight-box__text strong {
  color: var(--text-primary);
}

/* ============================================
   SECTION 3 — HOW IT WORKS (Timeline)
   ============================================ */
.how-it-works {
  background: linear-gradient(180deg, #111a40 0%, #0a0e27 100%);
}

.timeline {
  position: relative;
  padding-left: 60px;
  margin-top: 50px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--accent-teal), var(--accent-pink), var(--accent-purple));
  border-radius: 1px;
}

.timeline__step {
  position: relative;
  margin-bottom: 40px;
}

.timeline__step:last-child {
  margin-bottom: 0;
}

.timeline__dot {
  position: absolute;
  left: -52px;
  top: 18px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 3px solid var(--accent-teal);
  z-index: 2;
  transition: var(--transition-smooth);
}

.timeline__step:nth-child(2) .timeline__dot { border-color: #5bc9c0; }
.timeline__step:nth-child(3) .timeline__dot { border-color: #9d6bdd; }
.timeline__step:nth-child(4) .timeline__dot { border-color: #d96aac; }
.timeline__step:nth-child(5) .timeline__dot { border-color: var(--accent-pink); }

.timeline__step.visible .timeline__dot {
  background: var(--accent-teal);
  box-shadow: 0 0 16px rgba(78, 205, 196, 0.5);
}

.timeline__card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 28px 32px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: var(--transition-smooth);
}

.timeline__card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(78, 205, 196, 0.3);
  transform: translateX(8px);
}

.timeline__step-number {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-teal);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 6px;
}

.timeline__step-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.timeline__step-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ============================================
   SECTION 4 — DISEASES GRID
   ============================================ */
.diseases {
  background: linear-gradient(180deg, #0a0e27 0%, #0f1535 50%, #0d1130 100%);
}

.diseases__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
}

.disease-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 32px 28px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: var(--transition-smooth);
  text-align: center;
  cursor: default;
}

.disease-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-teal);
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(78, 205, 196, 0.1);
}

.disease-card__icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
  display: block;
}

.disease-card__title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.disease-card__desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.diseases__more {
  text-align: center;
  margin-top: 36px;
  font-size: 1.1rem;
  color: var(--text-muted);
}

.diseases__more span {
  color: var(--accent-teal);
  font-weight: 600;
}

/* ============================================
   SECTION 5 — STATISTICS (Counters)
   ============================================ */
.statistics {
  background: linear-gradient(135deg, #0d1130, #15134a, #0d1130);
  position: relative;
}

.statistics::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(78, 205, 196, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(255, 107, 157, 0.08) 0%, transparent 50%);
}

.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  margin-top: 50px;
}

.stat-card {
  text-align: center;
  padding: 40px 20px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: var(--transition-smooth);
}

.stat-card:hover {
  transform: translateY(-4px);
  border-color: rgba(78, 205, 196, 0.3);
}

.stat-card__icon {
  font-size: 2.2rem;
  margin-bottom: 16px;
}

.stat-card__number {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent-teal), var(--accent-pink));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
  margin-bottom: 8px;
}

.stat-card__label {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* ============================================
   SECTION 6 — RESULTS (Split Layout)
   ============================================ */
.results {
  background: linear-gradient(180deg, #0d1130 0%, #0a0e27 100%);
}

.results__split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 40px;
}

.result-card {
  background: var(--glass-bg);
  border-radius: 24px;
  padding: 40px 36px;
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: var(--transition-smooth);
}

.result-card:hover {
  transform: translateY(-4px);
}

.result-card--positive {
  border-color: rgba(78, 205, 196, 0.2);
}

.result-card--positive:hover {
  border-color: rgba(78, 205, 196, 0.4);
  box-shadow: 0 10px 40px rgba(78, 205, 196, 0.08);
}

.result-card--negative {
  border-color: rgba(255, 107, 157, 0.2);
}

.result-card--negative:hover {
  border-color: rgba(255, 107, 157, 0.4);
  box-shadow: 0 10px 40px rgba(255, 107, 157, 0.08);
}

.result-card__icon {
  font-size: 3rem;
  margin-bottom: 20px;
  display: block;
}

.result-card__title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.result-card__text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.results__note {
  margin-top: 36px;
  text-align: center;
  padding: 20px 32px;
  background: rgba(245, 197, 66, 0.08);
  border: 1px solid rgba(245, 197, 66, 0.2);
  border-radius: 14px;
  color: var(--accent-gold);
  font-size: 0.95rem;
  line-height: 1.6;
}

.results__note-icon {
  margin-right: 8px;
}

/* ============================================
   SECTION 7 — CTA / FOOTER
   ============================================ */
.cta {
  background: linear-gradient(180deg, #0a0e27 0%, #0d1130 30%, #111a40 100%);
  text-align: center;
}

.cta__title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--accent-teal), var(--accent-pink));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.cta__text {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 40px;
  line-height: 1.8;
}

.cta__links {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.cta__link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  border-radius: 50px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: var(--transition-smooth);
}

.cta__link--primary {
  background: linear-gradient(135deg, var(--accent-teal), #3db8b0);
  color: var(--bg-primary);
}

.cta__link--primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(78, 205, 196, 0.35);
}

.cta__link--secondary {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.cta__link--secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-pink);
  transform: translateY(-3px);
}

.cta__footer {
  margin-top: 80px;
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ============================================
   FLOATING PARTICLES (decorative)
   ============================================ */
.particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(78, 205, 196, 0.3);
  animation: drift linear infinite;
}

@keyframes drift {
  0% {
    transform: translateY(100vh) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-10vh) rotate(720deg);
    opacity: 0;
  }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1024px) {
  .stats__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .diseases__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  html {
    scroll-snap-type: y proximity;
  }

  .section {
    padding: 60px 24px;
  }

  .side-nav {
    right: 12px;
    gap: 12px;
  }

  .side-nav__dot {
    width: 8px;
    height: 8px;
  }

  .side-nav__dot::after {
    display: none;
  }

  .what-is__grid {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .what-is__image-wrapper {
    order: -1;
  }

  .what-is__image {
    max-width: 300px;
    margin: 0 auto;
  }

  .timeline {
    padding-left: 44px;
  }

  .timeline::before {
    left: 12px;
  }

  .timeline__dot {
    left: -44px;
    width: 20px;
    height: 20px;
  }

  .timeline__card {
    padding: 20px 22px;
  }

  .diseases__grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .stats__grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .stat-card {
    padding: 28px 16px;
  }

  .results__split {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .result-card {
    padding: 28px 24px;
  }

  .hero__pulse-circle--1,
  .hero__pulse-circle--3 {
    display: none;
  }

  .cta__links {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 480px) {
  .section {
    padding: 40px 16px;
  }

  .stats__grid {
    grid-template-columns: 1fr;
  }

  .highlight-box {
    flex-direction: column;
    text-align: center;
  }

  .hero__icon {
    font-size: 3rem;
  }
}
