/* ============================================================
   Medulla — Health Intelligence, Simplified
   Palette: Deep Blue #1E3A5F · Teal #14B8A6 · White · Soft Gray
   ============================================================ */

:root {
  --blue: #1E3A5F;
  --blue-700: #16293f;
  --teal: #14B8A6;
  --teal-600: #0f9a8b;
  --white: #ffffff;
  --gray-50: #f7f9fb;
  --gray-100: #eef2f6;
  --gray-200: #e2e8f0;
  --gray-400: #94a3b8;
  --gray-600: #5b6b7d;
  --ink: #1f2937;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(30, 58, 95, 0.06), 0 4px 12px rgba(30, 58, 95, 0.05);
  --shadow-md: 0 10px 30px rgba(30, 58, 95, 0.10);
  --shadow-lg: 0 24px 60px rgba(30, 58, 95, 0.16);
  --maxw: 1140px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { color: var(--blue); line-height: 1.12; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.grad {
  background: linear-gradient(100deg, var(--teal), #2dd4bf);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 600; font-size: 0.95rem; border: none; cursor: pointer;
  padding: 12px 22px; border-radius: 999px;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s, color .2s;
  white-space: nowrap;
}
.btn--lg { padding: 15px 30px; font-size: 1rem; }
.btn--block { width: 100%; }
.btn--primary { background: var(--teal); color: #042f2a; box-shadow: 0 8px 20px rgba(20, 184, 166, 0.32); }
.btn--primary:hover { background: var(--teal-600); transform: translateY(-2px); box-shadow: 0 12px 26px rgba(20, 184, 166, 0.4); }
.btn--ghost { background: transparent; color: var(--blue); border: 1.5px solid var(--gray-200); }
.btn--ghost:hover { border-color: var(--teal); color: var(--teal-600); }
.btn--text { background: transparent; color: var(--blue); padding-left: 6px; padding-right: 6px; }
.btn--text:hover { color: var(--teal-600); }
.btn--text span { transition: transform .2s var(--ease); }
.btn--text:hover span { transform: translateX(4px); }

/* ---------- Eyebrow ---------- */
.eyebrow {
  display: inline-block; font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--gray-400);
  margin-bottom: 18px;
}
.eyebrow--teal { color: var(--teal-600); }
.eyebrow--light { color: rgba(255,255,255,0.7); }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.8); backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent; transition: border-color .3s, box-shadow .3s;
}
.nav.is-scrolled { border-color: var(--gray-100); box-shadow: var(--shadow-sm); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 70px; }

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.25rem; color: var(--blue); letter-spacing: -0.02em; }
.brand__mark { color: var(--blue); display: inline-flex; }
.brand--light, .brand--light .brand__name { color: var(--white); }
.brand--light .brand__mark { color: var(--white); }

.nav__links { display: flex; align-items: center; gap: 28px; }
.nav__links a { font-weight: 500; color: var(--gray-600); font-size: 0.95rem; transition: color .2s; }
.nav__links a:hover { color: var(--blue); }
.nav__links .btn--ghost { color: var(--blue); }

.nav__toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.nav__toggle span { width: 24px; height: 2px; background: var(--blue); border-radius: 2px; transition: .3s; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 80px 0 100px; }
.hero__bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(20,184,166,0.12), transparent 60%),
    radial-gradient(700px 500px at 0% 110%, rgba(30,58,95,0.07), transparent 55%),
    linear-gradient(180deg, #fbfdfe, #ffffff);
}
.hero__inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.hero__title { font-size: clamp(2.6rem, 6vw, 4.1rem); font-weight: 800; margin-bottom: 22px; }
.hero__sub { font-size: 1.18rem; color: var(--gray-600); max-width: 520px; margin-bottom: 34px; }
.hero__cta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 30px; }
.hero__trust { display: inline-flex; align-items: center; gap: 10px; font-size: 0.9rem; color: var(--gray-600); font-weight: 500; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gray-400); display: inline-block; }
.dot--live { background: var(--teal); box-shadow: 0 0 0 0 rgba(20,184,166,0.5); animation: pulse 2.2s infinite; }
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(20,184,166,0.45)} 70%{box-shadow:0 0 0 8px rgba(20,184,166,0)} 100%{box-shadow:0 0 0 0 rgba(20,184,166,0)} }

/* Hero visual: dashboard mockup */
.hero__visual { position: relative; display: flex; justify-content: center; }
.dash {
  width: 100%; max-width: 440px; background: var(--white);
  border: 1px solid var(--gray-100); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); overflow: hidden;
  transform: perspective(1400px) rotateY(-6deg) rotateX(2deg);
  transition: transform .5s var(--ease);
}
.dash:hover { transform: perspective(1400px) rotateY(0) rotateX(0); }
.dash__top { display: flex; align-items: center; gap: 12px; padding: 14px 18px; background: var(--gray-50); border-bottom: 1px solid var(--gray-100); }
.dash__dotrow { display: inline-flex; gap: 6px; }
.dash__dotrow i { width: 10px; height: 10px; border-radius: 50%; background: var(--gray-200); }
.dash__dotrow i:first-child { background: #f6a09a; }
.dash__dotrow i:nth-child(2) { background: #f6d68a; }
.dash__dotrow i:nth-child(3) { background: #9fe0b8; }
.dash__title { font-size: 0.85rem; font-weight: 600; color: var(--gray-600); }
.dash__body { padding: 20px; }
.dash__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 18px; }
.dash__card { background: var(--gray-50); border: 1px solid var(--gray-100); border-radius: var(--radius-sm); padding: 14px; }
.dash__label { display: block; font-size: 0.72rem; color: var(--gray-400); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.dash__val { display: block; font-size: 1.7rem; font-weight: 800; color: var(--blue); margin: 4px 0 10px; }
.dash__val small { font-size: 1rem; color: var(--gray-400); }
.bar { height: 6px; background: var(--gray-200); border-radius: 999px; overflow: hidden; }
.bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--teal), #2dd4bf); border-radius: 999px; }
.dash__chart { background: var(--gray-50); border: 1px solid var(--gray-100); border-radius: var(--radius-sm); padding: 12px; height: 120px; }
.dash__chart svg { width: 100%; height: 100%; }

.neural { position: absolute; right: -18px; bottom: -26px; opacity: 0.9; animation: float 6s ease-in-out infinite; }
@keyframes float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-12px)} }

/* ---------- Strip ---------- */
.strip { background: var(--blue); color: rgba(255,255,255,0.85); }
.strip__inner { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px 48px; padding: 22px 24px; font-weight: 600; font-size: 0.92rem; letter-spacing: 0.02em; }
.strip__inner span { opacity: 0.85; }

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section--alt { background: var(--gray-50); }
.section__head { max-width: 680px; margin: 0 auto 56px; text-align: center; }
.section__title { font-size: clamp(1.9rem, 4vw, 2.6rem); font-weight: 800; margin-bottom: 18px; }
.section__lead { font-size: 1.1rem; color: var(--gray-600); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.prose p { color: var(--gray-600); font-size: 1.1rem; margin-bottom: 16px; }
.prose p:last-child { margin-bottom: 0; }

/* ---------- Pillars ---------- */
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.pillar {
  background: var(--white); border: 1px solid var(--gray-100); border-radius: var(--radius);
  padding: 28px 22px; box-shadow: var(--shadow-sm); transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.pillar:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.pillar__icon { font-size: 1.8rem; display: block; margin-bottom: 14px; }
.pillar h3 { font-size: 1.1rem; margin-bottom: 8px; }
.pillar p { color: var(--gray-600); font-size: 0.95rem; }

/* ---------- Features ---------- */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.feature {
  position: relative; background: var(--white); border: 1px solid var(--gray-100);
  border-radius: var(--radius); padding: 30px 24px; box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s;
}
.feature:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: rgba(20,184,166,0.4); }
.feature__icon {
  width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(145deg, rgba(20,184,166,0.14), rgba(30,58,95,0.08)); color: var(--teal-600); margin-bottom: 18px;
}
.feature h3 { font-size: 1.12rem; margin-bottom: 10px; }
.feature p { color: var(--gray-600); font-size: 0.96rem; }
.feature__tag {
  display: inline-block; margin-top: 16px; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--teal-600); background: rgba(20,184,166,0.1);
  padding: 4px 10px; border-radius: 999px;
}

/* ---------- Waitlist ---------- */
.waitlist { padding: 90px 0; }
.waitlist__card {
  background: linear-gradient(135deg, var(--blue), var(--blue-700));
  border-radius: 28px; padding: 56px; color: var(--white);
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center;
  box-shadow: var(--shadow-lg); position: relative; overflow: hidden;
}
.waitlist__card::after {
  content: ""; position: absolute; right: -80px; top: -80px; width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(20,184,166,0.35), transparent 70%); border-radius: 50%;
}
.waitlist__copy { position: relative; z-index: 1; }
.waitlist__title { color: var(--white); font-size: clamp(1.6rem, 3vw, 2.1rem); margin-bottom: 14px; }
.waitlist__copy p { color: rgba(255,255,255,0.78); font-size: 1.05rem; }
.waitlist__form { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 0.82rem; font-weight: 600; color: rgba(255,255,255,0.8); }
.field input {
  padding: 14px 16px; border-radius: 12px; border: 1.5px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.08); color: var(--white); font-size: 1rem; font-family: inherit;
  transition: border-color .2s, background .2s;
}
.field input::placeholder { color: rgba(255,255,255,0.45); }
.field input:focus { outline: none; border-color: var(--teal); background: rgba(255,255,255,0.14); }
.field input.is-invalid { border-color: #f6a09a; }
.waitlist__note { font-size: 0.92rem; font-weight: 600; min-height: 4px; margin: 0; }
.waitlist__note.is-success { color: #7ef0dc; }
.waitlist__note.is-error { color: #ffc4bd; }
.waitlist__fine { font-size: 0.78rem; color: rgba(255,255,255,0.55); margin: 0; }
/* honeypot — visually & functionally hidden, kept in DOM for bots */
.hp-field { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }

/* ---------- Footer ---------- */
.footer { background: var(--blue-700); color: rgba(255,255,255,0.7); padding: 64px 0 32px; }
.footer__inner { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.footer__tag { margin: 14px 0 10px; color: rgba(255,255,255,0.6); }
.footer__email { color: var(--teal); font-weight: 600; }
.footer__email:hover { text-decoration: underline; }
.footer__links { display: flex; gap: 28px; align-items: flex-start; }
.footer__links a { color: rgba(255,255,255,0.7); font-weight: 500; transition: color .2s; }
.footer__links a:hover { color: var(--white); }
.footer__legal { padding-top: 28px; display: flex; flex-direction: column; gap: 12px; }
.disclaimer { font-size: 0.82rem; color: rgba(255,255,255,0.5); max-width: 720px; }
.footer__partner { font-size: 0.85rem; color: rgba(255,255,255,0.6); }
.footer__partner a { color: var(--teal); }
.footer__partner a:hover { text-decoration: underline; }
.footer__copy { font-size: 0.8rem; color: rgba(255,255,255,0.4); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Legal pages ---------- */
.legal { padding: 60px 0 90px; }
.legal h1 { font-size: 2.2rem; margin-bottom: 8px; }
.legal__updated { color: var(--gray-400); font-size: 0.9rem; margin-bottom: 36px; }
.legal h2 { font-size: 1.25rem; margin: 34px 0 12px; }
.legal p, .legal li { color: var(--gray-600); font-size: 1rem; margin-bottom: 12px; }
.legal ul { padding-left: 20px; }
.legal__back { display: inline-block; margin-bottom: 24px; color: var(--teal-600); font-weight: 600; }

/* ---------- Responsive ---------- */
@media (max-width: 940px) {
  .hero__inner { grid-template-columns: 1fr; gap: 48px; }
  .hero__visual { order: -1; }
  .grid-2 { grid-template-columns: 1fr; gap: 24px; }
  .pillars, .features { grid-template-columns: repeat(2, 1fr); }
  .waitlist__card { grid-template-columns: 1fr; padding: 40px 28px; }
}
@media (max-width: 720px) {
  .nav__links { display: none; position: absolute; top: 70px; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--white); border-bottom: 1px solid var(--gray-100); box-shadow: var(--shadow-md); padding: 8px 0; }
  .nav__links.is-open { display: flex; }
  .nav__links a { padding: 14px 24px; width: 100%; }
  .nav__links .btn--ghost { margin: 8px 24px; width: calc(100% - 48px); }
  .nav__toggle { display: flex; }
  .nav__toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav__toggle.is-open span:nth-child(2) { opacity: 0; }
  .nav__toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .section { padding: 64px 0; }
  .hero { padding: 48px 0 64px; }
}
@media (max-width: 520px) {
  .pillars, .features { grid-template-columns: 1fr; }
  .strip__inner { gap: 12px 28px; font-size: 0.82rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
