/* ═══════════════════════════════════════════════════════════
   MODERA — moderahealth.ai
   Marketing website styles
═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Instrument+Serif:ital@0;1&display=swap');

/* ─── Tokens ─── */
:root {
  /* Brand */
  --brand-900: #05231D;
  --brand-800: #0A3D33;
  --brand-700: #0F5545;
  --brand-600: #106B57;
  --brand-500: #1A8571;
  --brand-400: #35A88F;
  --brand-300: #6DC7B4;
  --brand-200: #B3E3D8;
  --brand-100: #DDF1EB;
  --brand-050: #EEF7F4;
  --emerald:   #00C48C;
  --emerald-glow: #00E5A1;

  /* Ink */
  --ink-900: #0E1512;
  --ink-800: #1B2320;
  --ink-700: #2E3835;
  --ink-600: #4A544F;
  --ink-500: #6A736E;
  --ink-400: #94998F;
  --ink-300: #BCC1B7;
  --ink-200: #DDDFD5;
  --ink-100: #EBEDE3;
  --ink-050: #F5F4EE;

  /* Surface */
  --surface:        #FCFBF7;
  --surface-raised: #FFFFFF;
  --divider:        #E8E5DA;
  --border:         #DDDACC;

  /* Type */
  --f-sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --f-serif: 'Instrument Serif', 'Cambria', Georgia, serif;

  /* Effects */
  --shadow-sm: 0 1px 3px rgba(11,25,20,0.06), 0 1px 2px rgba(11,25,20,0.04);
  --shadow-md: 0 4px 14px rgba(11,25,20,0.08), 0 1px 3px rgba(11,25,20,0.04);
  --shadow-lg: 0 12px 40px rgba(11,25,20,0.12), 0 4px 12px rgba(11,25,20,0.06);
  --shadow-xl: 0 40px 80px rgba(11,25,20,0.18), 0 12px 32px rgba(11,25,20,0.10);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--f-sans);
  color: var(--ink-900);
  background: var(--surface-raised);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
  font-feature-settings: 'cv11';
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
em {
  font-family: var(--f-serif);
  font-style: italic;
  color: var(--brand-600);
  font-weight: 400;
}

/* ─── Container ─── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}
.container-narrow {
  max-width: 720px;
}

/* ─── Nav ─── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid rgba(232, 229, 218, 0.6);
  z-index: 100;
  transition: box-shadow 0.2s;
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 32px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-900);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.01em;
}
.brand-mark {
  width: 30px;
  height: 30px;
  background: var(--brand-600);
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.02em;
}
.brand-word { }
.nav-links {
  display: flex;
  gap: 28px;
  margin-left: auto;
  align-items: center;
}
.nav-links a {
  position: relative;
  font-size: 14px;
  color: var(--ink-600);
  font-weight: 500;
  transition: color 0.15s;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 1.5px;
  background: var(--brand-600);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.25s cubic-bezier(.22,.68,.32,1);
}
.nav-links a:hover { color: var(--brand-600); }
.nav-links a:hover::after,
.nav-links a.active::after { transform: scaleX(1); }
.nav-links a.active { color: var(--brand-600); font-weight: 600; }
.nav-cta {
  padding: 9px 18px;
  background: var(--ink-900);
  color: white !important;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  transition: background 0.15s, transform 0.15s;
}
.nav-cta:hover { background: var(--brand-700); }

/* ─── Common section styling ─── */
.section {
  padding: 120px 0;
  position: relative;
  overflow: hidden;
}
.section-white { background: var(--surface-raised); }
.section-tint  { background: var(--brand-050); border-top: 1px solid var(--brand-100); border-bottom: 1px solid var(--brand-100); }
.section-dark  { background: var(--brand-900); color: white; }

.eyebrow {
  font-size: 12px;
  font-weight: 600;
  color: var(--brand-600);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.eyebrow-emerald { color: var(--emerald); }

.section-title {
  font-family: var(--f-serif);
  font-weight: 400;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink-900);
  margin-bottom: 24px;
  max-width: 900px;
}
.section-title-dark { color: white; }
.section-title em { color: var(--brand-600); }
.section-title-dark em { color: var(--emerald); }

.section-sub {
  font-size: 20px;
  color: var(--ink-600);
  line-height: 1.5;
  max-width: 640px;
  margin-bottom: 48px;
}

.section-bottom {
  font-family: var(--f-serif);
  font-size: 24px;
  color: var(--ink-700);
  text-align: center;
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--divider);
}
.section-bottom em { color: var(--brand-600); }
.section-bottom-dark {
  color: rgba(255, 255, 255, 0.85);
  border-top-color: rgba(255, 255, 255, 0.12);
}
.section-bottom-dark em { color: var(--emerald); }

/* ─── Hero ─── */
.hero {
  padding: 180px 0 120px;
  position: relative;
  background: linear-gradient(180deg, var(--brand-900) 0%, #061F1A 100%);
  color: white;
  overflow: hidden;
}
.hero-glow {
  position: absolute;
  right: -200px;
  bottom: -300px;
  width: 720px;
  height: 720px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 196, 140, 0.3), transparent 60%);
  z-index: 0;
  pointer-events: none;
  animation: glowDrift 11s ease-in-out infinite;
}
.hero .container { position: relative; z-index: 1; }
.hero-inner { max-width: 880px; }
.hero-title {
  font-family: var(--f-serif);
  font-weight: 400;
  font-size: clamp(46px, 7vw, 84px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: white;
  margin: 20px 0 28px;
}
.hero-title em { color: var(--emerald); }
.hero-sub {
  font-size: clamp(17px, 2vw, 21px);
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.5;
  max-width: 620px;
  margin-bottom: 40px;
}
.hero-ctas {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.005em;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
  text-decoration: none;
}
.btn:active { transform: scale(0.96); }
.btn-primary {
  background: white;
  color: var(--brand-900);
}
.btn-primary:hover { background: var(--brand-050); transform: translateY(-1px); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.14); }

/* ─── Feature grid (what we handle) ─── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 48px;
}
.feature-card {
  padding: 32px 30px;
  background: white;
  border: 1px solid var(--brand-100);
  border-radius: 20px;
  transition: transform 0.25s cubic-bezier(.22,.68,.32,1), box-shadow 0.25s, border-color 0.25s;
}
.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand-300);
}
.feature-head {
  font-family: var(--f-serif);
  font-size: 27px;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ink-900);
  margin-bottom: 14px;
}
.feature-body {
  font-size: 15px;
  color: var(--ink-600);
  line-height: 1.6;
}

/* ─── Stat grid (problem + built) ─── */
.stat-grid {
  display: grid;
  gap: 20px;
  margin-top: 48px;
}
.stat-grid-4 { grid-template-columns: repeat(4, 1fr); }
.stat-grid-3 { grid-template-columns: repeat(3, 1fr); }
.stat-card {
  padding: 32px 24px;
  background: var(--brand-050);
  border: 1px solid var(--brand-100);
  border-radius: 20px;
  text-align: center;
  transition: transform 0.25s cubic-bezier(.22,.68,.32,1), box-shadow 0.25s, border-color 0.25s;
}
.stat-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand-300);
}
.stat-card-tint {
  background: white;
  border-color: var(--brand-200);
}
.stat-big {
  font-family: var(--f-serif);
  font-size: 62px;
  font-weight: 400;
  line-height: 1;
  color: var(--brand-800);
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}
.stat-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-900);
  margin-bottom: 8px;
  line-height: 1.35;
}
.stat-src {
  font-size: 12px;
  color: var(--ink-500);
  font-style: italic;
  line-height: 1.4;
}

/* ─── Dark section subtitle ─── */
.section-sub-dark { color: rgba(255, 255, 255, 0.72); }

/* ─── Product showcase ─── */
.product-showcase {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  margin-top: 48px;
}
.product-screen figure {
  margin: 0;
}
.product-screen {
  text-align: center;
  perspective: 900px;
}
.product-screen img {
  width: 100%;
  border-radius: 32px;
  box-shadow: var(--shadow-lg);
  transition: transform 0.35s cubic-bezier(.22,.68,.32,1), box-shadow 0.35s;
  transform: translateY(var(--lift, 0px)) rotateX(var(--ry, 0deg)) rotateY(var(--rx, 0deg));
  transform-style: preserve-3d;
}
.product-screen:hover img {
  --lift: -6px;
  box-shadow: var(--shadow-xl);
}
.product-screen figcaption {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.product-screen figcaption strong {
  font-size: 15px;
  color: var(--ink-900);
  font-weight: 600;
}
.product-screen figcaption span {
  font-size: 13px;
  color: var(--ink-500);
  font-style: italic;
}

/* ─── Why now grid ─── */
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}
.why-card {
  padding: 32px 28px;
  background: white;
  border: 1px solid var(--divider);
  border-radius: 20px;
  position: relative;
  transition: transform 0.25s cubic-bezier(.22,.68,.32,1), box-shadow 0.25s, border-color 0.25s;
}
.why-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand-300);
}
.why-num {
  width: 44px;
  height: 44px;
  background: var(--brand-600);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 20px;
}
.why-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--brand-600);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.why-head {
  font-family: var(--f-serif);
  font-size: 26px;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ink-900);
  margin-bottom: 16px;
}
.why-body {
  font-size: 15px;
  color: var(--ink-600);
  line-height: 1.55;
}

/* ─── Partnership section ─── */
.section-dark-glow {
  position: absolute;
  top: -300px;
  left: -300px;
  width: 720px;
  height: 720px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 196, 140, 0.15), transparent 65%);
  pointer-events: none;
}
.coverage-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
  position: relative;
  z-index: 1;
}
.coverage-card {
  padding: 32px 28px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 20px;
  transition: transform 0.25s cubic-bezier(.22,.68,.32,1), box-shadow 0.25s, border-color 0.25s, background 0.25s;
}
.coverage-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  border-color: rgba(0, 196, 140, 0.35);
  background: rgba(255, 255, 255, 0.06);
}
.coverage-num {
  font-family: var(--f-serif);
  font-size: 54px;
  font-weight: 400;
  line-height: 1;
  color: var(--emerald);
  letter-spacing: -0.03em;
  margin-bottom: 14px;
}
.coverage-label {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.coverage-detail {
  color: rgba(255, 255, 255, 0.82);
  font-size: 15px;
  line-height: 1.6;
}

/* ─── Contact ─── */
.contact-card {
  margin-top: 8px;
  padding: 44px 32px;
  background: var(--brand-050);
  border: 1px solid var(--brand-100);
  border-radius: 20px;
  text-align: center;
}
.contact-email {
  display: inline-block;
  padding: 15px 32px;
  background: var(--ink-900);
  color: white !important;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.005em;
  transition: background 0.15s, transform 0.15s;
}
.contact-email:hover { background: var(--brand-700); transform: translateY(-1px); }
.contact-email:active { transform: scale(0.96); }
.contact-note {
  margin-top: 20px;
  font-size: 14px;
  color: var(--ink-500);
  line-height: 1.6;
}

/* ─── Footer ─── */
.footer {
  background: var(--ink-900);
  color: rgba(255, 255, 255, 0.55);
  padding: 64px 0 40px;
}
.footer-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 48px;
  align-items: center;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: white;
  font-weight: 600;
  font-size: 17px;
}
.footer-text {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.6;
}
.footer-links {
  display: flex;
  gap: 20px;
}
.footer-links a {
  color: rgba(255, 255, 255, 0.75);
  font-size: 14px;
  font-weight: 500;
}
.footer-links a:hover { color: var(--emerald); }
.footer-bottom {
  padding-top: 32px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.35);
  text-align: center;
}

/* ─── Responsive ─── */
@media (max-width: 1024px) {
  .stat-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .stat-grid-3 { grid-template-columns: 1fr; }
  .product-showcase { grid-template-columns: repeat(2, 1fr); gap: 32px 24px; }
  .why-grid { grid-template-columns: 1fr; }
  .coverage-grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .section { padding: 72px 0; }
  .hero { padding: 130px 0 80px; }
  .container { padding: 0 20px; }
  .nav-inner { padding: 12px 20px; gap: 12px; }
  .nav-links { display: none; }
  .stat-grid-4 { grid-template-columns: 1fr; }
  .product-showcase { grid-template-columns: 1fr; }
  .contact-card { padding: 32px 22px; }
  .footer-inner { grid-template-columns: 1fr; text-align: center; gap: 24px; }
  .footer-links { justify-content: center; }
  .footer-brand { justify-content: center; }
  .stat-big { font-size: 52px; }
  .coverage-num { font-size: 46px; }
  .btn { padding: 13px 22px; font-size: 14px; }
}

/* ─── Scroll progress bar ─── */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--brand-600), var(--emerald));
  z-index: 200;
  pointer-events: none;
}

/* ─── Hero entrance animation ─── */
@keyframes heroRise {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero .eyebrow,
.hero-title,
.hero-sub,
.hero-ctas {
  animation: heroRise 0.8s cubic-bezier(.22,.68,.32,1) both;
}
.hero .eyebrow { animation-delay: 0.05s; }
.hero-title    { animation-delay: 0.16s; }
.hero-sub      { animation-delay: 0.32s; }
.hero-ctas     { animation-delay: 0.46s; }

/* ─── Ambient glow drift (dark sections) ─── */
@keyframes glowDrift {
  0%, 100% { transform: scale(1) translate(0, 0); opacity: 1; }
  50%      { transform: scale(1.08) translate(-12px, 10px); opacity: 0.85; }
}
.section-dark-glow {
  animation: glowDrift 12s ease-in-out infinite;
}

/* ─── Scroll reveal system ───
   .reveal        → single element fades + rises into place once, on first entering viewport
   .reveal-group  → direct children stagger in with a slight delay per child (card grids) */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(.22,.68,.32,1), transform 0.7s cubic-bezier(.22,.68,.32,1);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-group > * {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s cubic-bezier(.22,.68,.32,1), transform 0.6s cubic-bezier(.22,.68,.32,1);
}
.reveal-group.is-visible > * {
  opacity: 1;
  transform: translateY(0);
}
.reveal-group > *:nth-child(2) { transition-delay: 90ms; }
.reveal-group > *:nth-child(3) { transition-delay: 180ms; }
.reveal-group > *:nth-child(4) { transition-delay: 270ms; }
.reveal-group > *:nth-child(5) { transition-delay: 360ms; }
.reveal-group > *:nth-child(6) { transition-delay: 450ms; }

/* ─── Reduced motion ─── */
@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal-group > *,
  .hero .eyebrow,
  .hero-title,
  .hero-sub,
  .hero-ctas,
  .hero-glow,
  .section-dark-glow {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .product-screen img { transition: none !important; }
}
