:root {
  --cream: #ece7dd;
  --cream-soft: #f4f1ea;
  --cream-card: #f7f5ef;
  --ink: #16181d;
  --ink-soft: #43464d;
  --ink-muted: #8a8a82;
  --gold: #c0973f;
  --gold-soft: #d8b96a;
  --teal: #7c9a8e;
  --line: rgba(22, 24, 29, 0.1);
  --white: #ffffff;
  --radius: 22px;
  --radius-lg: 30px;
  --maxw: 1120px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--cream);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
  overflow-x: hidden;
}

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

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

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 22px;
}
.eyebrow-light { color: var(--gold); }

.section-title {
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.025em;
}
.section-title.center { text-align: center; }

.section-sub {
  font-size: clamp(1.02rem, 1.6vw, 1.22rem);
  color: var(--ink-soft);
  max-width: 560px;
  margin-top: 20px;
  line-height: 1.55;
}
.section-sub.center { margin-left: auto; margin-right: auto; text-align: center; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.98rem;
  cursor: pointer;
  border: none;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.arrow { font-size: 0.9em; transition: transform 0.2s ease; }
.btn:hover .arrow { transform: translate(2px, -2px); }

.btn-solid {
  background: var(--ink);
  color: #fff;
  padding: 15px 26px;
  border-radius: 100px;
}
.btn-solid:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(22,24,29,0.25); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  padding: 15px 22px;
  border-radius: 100px;
  border: 1px solid var(--line);
}
.btn-ghost:hover { background: rgba(22,24,29,0.05); }

.btn-pill {
  border: 1px solid var(--line);
  padding: 11px 20px;
  border-radius: 100px;
  font-size: 0.9rem;
  background: rgba(255,255,255,0.5);
  backdrop-filter: blur(8px);
}
.btn-pill:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-pill.on-image {
  border-color: rgba(255,255,255,0.6);
  color: #fff;
  background: rgba(255,255,255,0.12);
}
.btn-pill.on-image:hover { background: #fff; color: var(--ink); }

/* NAV */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}
.nav.scrolled {
  background: rgba(236,231,221,0.8);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line);
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 18px 28px;
  display: flex; align-items: center; justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.3rem; letter-spacing: -0.02em; }
.brand-mark {
  width: 18px; height: 18px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--gold-soft), var(--gold) 70%);
  box-shadow: 0 0 0 4px rgba(192,151,63,0.18);
}
.nav-links { display: flex; gap: 30px; }
.nav-links a { font-size: 0.94rem; font-weight: 500; color: var(--ink-soft); transition: color 0.2s ease; }
.nav-links a:hover { color: var(--ink); }
.nav-cta { }

/* HERO */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: radial-gradient(120% 90% at 70% 0%, #f5f2ec 0%, #ece7dd 52%, #e5dfd3 100%);
  color: var(--ink);
  overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; opacity: 1; }
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(60% 60% at 28% 82%, rgba(124,154,142,0.14), transparent 60%),
              radial-gradient(52% 52% at 86% 22%, rgba(192,151,63,0.14), transparent 60%);
}
.wave { position: absolute; bottom: 12%; left: 0; width: 100%; height: 42%; overflow: hidden; }
/* Continuously scrolling EEG traces, like a live patient monitor. Two identical
   copies (the second offset by one viewBox width) make the loop seamless. */
.wave-scroll { will-change: transform; }
.wave-main {
  fill: none; stroke: var(--gold); stroke-width: 2; opacity: 0.85;
  filter: drop-shadow(0 0 5px rgba(192, 151, 63, 0.3));
  animation: eeg-scroll 17s linear infinite, eeg-pulse 2.4s ease-in-out infinite;
}
.wave-soft {
  fill: none; stroke: var(--teal); stroke-width: 1.5; opacity: 0.32;
  animation: eeg-scroll 27s linear infinite;
}
.wave-soft-pos { transform: translateY(34px) scaleY(0.6); }
@keyframes eeg-scroll { to { transform: translateX(-1440px); } }
@keyframes eeg-pulse {
  0%, 100% { filter: drop-shadow(0 0 4px rgba(192, 151, 63, 0.25)); }
  50% { filter: drop-shadow(0 0 11px rgba(192, 151, 63, 0.6)); }
}
@media (prefers-reduced-motion: reduce) {
  .wave-main, .wave-soft { animation: none; }
}

.hero-content { position: relative; z-index: 2; }
.hero-title {
  font-size: clamp(2.6rem, 7vw, 5.4rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin-bottom: 26px;
}
.hero-sub {
  font-size: clamp(1.1rem, 1.9vw, 1.42rem);
  color: var(--ink-soft);
  max-width: 620px;
  line-height: 1.5;
  margin-bottom: 38px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* PROBLEM — immersive bedside scene */
.problem { padding: 0; background: var(--cream); }
.problem-scene {
  position: relative;
  width: 100%;
  background-image: url("assets/bedside.png");
  background-size: cover;
  background-position: 22% 26%;
  background-repeat: no-repeat;
  display: flex;
  align-items: stretch;
}
/* Feathered scrims: blend section edges into the page and lift text off the scene
   without a hard-edged box. */
.problem-scrim {
  position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background:
    /* very light blend at the far-left edge only, so the real wall shows
       under the headline (the text sits directly on the wall) */
    linear-gradient(100deg,
      rgba(236, 231, 221, 0.55) 0%,
      rgba(236, 231, 221, 0.28) 18%,
      rgba(236, 231, 221, 0) 40%),
    /* top edge melts into the previous section */
    linear-gradient(to bottom, var(--cream) 0%, rgba(236,231,221,0) 16%),
    /* bottom edge melts into the next section and grounds the cards */
    linear-gradient(to top, var(--cream) 0%, rgba(236,231,221,0.55) 14%, rgba(236,231,221,0) 34%);
}
.problem-content {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; justify-content: space-between;
  min-height: clamp(800px, 62vw, 980px);
  padding-top: 104px; padding-bottom: 72px;
}

.problem-top { max-width: 560px; }
.stat-headline { display: flex; flex-direction: column; gap: 6px; }
/* Headline painted onto the wall: multiply blend lets the letters darken the
   wall beneath them and pick up its soft shading, like vinyl/painted lettering. */
.stat-headline { mix-blend-mode: multiply; }
.stat-num {
  font-size: clamp(2.4rem, 6.4vw, 4.7rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 0.94;
  color: #46413a;
  text-shadow: 0 1px 1px rgba(70, 65, 58, 0.12);
}
.stat-label {
  font-size: clamp(1.05rem, 2vw, 1.45rem);
  font-weight: 600;
  color: #5a544b;
  max-width: 460px;
}
.problem-lead {
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  font-weight: 500;
  line-height: 1.4;
  max-width: 500px;
  letter-spacing: -0.01em;
  margin-top: 26px;
  color: var(--ink);
  text-shadow: 0 1px 16px rgba(236, 231, 221, 0.9);
}
.problem-lead em { font-style: italic; color: var(--gold); }

.problem-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 40px; }
/* Frosted-glass widgets: they refract the scene behind them so they sit *in* the
   room rather than on top of it. */
.pcard {
  position: relative;
  background: linear-gradient(140deg, rgba(248, 246, 240, 0.62), rgba(244, 241, 234, 0.42));
  -webkit-backdrop-filter: blur(16px) saturate(1.25);
  backdrop-filter: blur(16px) saturate(1.25);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 16px;
  padding: 13px 20px;
  box-shadow: 0 14px 34px rgba(22, 24, 29, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.65);
}
/* Pop-in on scroll (re-triggers each time the cards enter the viewport) */
.problem-cards .pcard {
  transition: opacity 0.55s ease, transform 0.6s cubic-bezier(0.18, 0.7, 0.2, 1.1),
    box-shadow 0.3s ease;
}
.problem-cards .pcard:nth-child(2) { transition-delay: 0.09s; }
.problem-cards .pcard:nth-child(3) { transition-delay: 0.18s; }
.pcard.pop-hidden {
  opacity: 0;
  transform: translateY(40px) scale(0.94);
  transition-delay: 0s;
}
.pcard-num {
  font-size: 1.3rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 4px; color: var(--gold);
  text-shadow: 0 1px 10px rgba(255, 255, 255, 0.5);
}
.pcard p { color: var(--ink); font-size: 0.86rem; line-height: 1.34; }
.pcard-dark {
  background: linear-gradient(140deg, rgba(20, 23, 28, 0.66), rgba(20, 23, 28, 0.5));
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.pcard-dark .pcard-num { color: var(--gold-soft); text-shadow: none; }
.pcard-dark p { color: rgba(255,255,255,0.88); }
.pcard-dark strong { color: #fff; }

/* SOLUTION */
.solution { padding: 120px 0; background: var(--cream-soft); }
.solution-head { max-width: 720px; margin-bottom: 60px; }
.feature-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.feature {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.feature:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(22,24,29,0.08); }
.feature-icon {
  width: 52px; height: 52px; border-radius: 14px;
  background: var(--cream-soft);
  display: flex; align-items: center; justify-content: center;
  color: var(--gold); margin-bottom: 24px;
}
.feature-icon svg { width: 28px; height: 28px; }
.feature h3 { font-size: 1.4rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 10px; }
.feature p { color: var(--ink-soft); font-size: 1.02rem; line-height: 1.55; }

/* SCIENCE */
.science { padding: 120px 0; background: var(--cream); }
.science-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 70px; align-items: start; }
.science-intro { position: sticky; top: 120px; }
.timeline { list-style: none; position: relative; padding-left: 34px; }
.timeline::before {
  content: ""; position: absolute; left: 9px; top: 8px; bottom: 8px; width: 2px;
  background: linear-gradient(var(--gold-soft), var(--line));
}
.tl-item { position: relative; margin-bottom: 26px; }
.tl-dot {
  position: absolute; left: -34px; top: 4px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 0 5px var(--cream), 0 0 0 6px var(--line);
}
.tl-step { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-muted); }
.tl-card {
  margin-top: 10px;
  background: var(--cream-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 28px;
}
.tl-card h3 { font-size: 1.45rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 8px; }
.tl-card p { color: var(--ink-soft); line-height: 1.55; }

/* DEVICE */
.device { padding: 60px 0 120px; background: var(--cream); }
.device-card {
  display: grid; grid-template-columns: 1.1fr 0.9fr;
  background: #d9d6cd;
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 460px;
}
.device-visual {
  position: relative;
  background: radial-gradient(110% 110% at 30% 20%, #2a3036 0%, #161a1e 70%);
  display: flex; align-items: center; justify-content: center;
  color: var(--gold-soft);
}
.device-ring {
  width: 230px; height: 230px; border-radius: 50%;
  border: 2px solid rgba(216,185,106,0.5);
  box-shadow: inset 0 0 60px rgba(216,185,106,0.2), 0 0 60px rgba(124,154,142,0.18);
  position: relative;
  animation: pulse 4s ease-in-out infinite;
}
.device-ring::before {
  content: ""; position: absolute; inset: 26px; border-radius: 50%;
  border: 1px dashed rgba(255,255,255,0.18);
}
@keyframes pulse { 0%,100% { transform: scale(1); opacity: 0.9; } 50% { transform: scale(1.04); opacity: 1; } }
.device-glow {
  position: absolute; width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(124,154,142,0.3), transparent 65%);
  filter: blur(20px);
}
.device-wave { position: absolute; width: 70%; height: 90px; opacity: 0.85; }
.device-wave path { stroke-dasharray: 1000; stroke-dashoffset: 1000; animation: draw 3s linear infinite; }
.device-tag {
  position: absolute; bottom: 22px; left: 0; right: 0; text-align: center;
  font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(255,255,255,0.6);
}
.device-copy { background: var(--cream-card); padding: 56px 48px; display: flex; flex-direction: column; justify-content: center; }
.device-copy h2 { font-size: clamp(2rem, 4vw, 2.9rem); font-weight: 800; letter-spacing: -0.03em; margin-bottom: 18px; }
.device-lead { font-size: 1.15rem; line-height: 1.5; margin-bottom: 16px; }
.device-fine { color: var(--ink-muted); font-size: 1rem; }

/* PIONEERS */
.pioneers { padding: 120px 0; background: var(--cream-soft); }
.pioneer-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 56px; }
.pioneer {
  position: relative; min-height: 460px; border-radius: var(--radius-lg); overflow: hidden;
  display: flex; align-items: flex-end; padding: 38px;
  transition: transform 0.3s ease;
}
.pioneer:hover { transform: translateY(-4px); }
.pioneer-a { background: linear-gradient(155deg, #8aa79b 0%, #5e7b78 40%, #7a5a63 100%); }
.pioneer-b { background: linear-gradient(155deg, #6f8a93 0%, #4a5f6b 45%, #8a4f5e 100%); }
.pioneer-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(0,0,0,0.4)); }
.pioneer-text { position: relative; z-index: 2; color: #fff; }
.pioneer-text h3 { font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 700; line-height: 1.08; letter-spacing: -0.02em; margin-bottom: 22px; }

/* CTA */
.cta { padding: 130px 0; background: radial-gradient(120% 100% at 50% 0%, #20262b, #0f1316); color: #fff; }
.cta-inner { text-align: center; display: flex; flex-direction: column; align-items: center; }
.cta-title { font-size: clamp(2.4rem, 6vw, 4.6rem); font-weight: 800; line-height: 1.02; letter-spacing: -0.035em; }
.cta-sub { color: rgba(255,255,255,0.75); font-size: 1.2rem; margin: 22px 0 38px; max-width: 520px; }
.cta-form { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; width: 100%; max-width: 540px; }
.cta-form input {
  flex: 1; min-width: 240px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff; padding: 15px 20px; border-radius: 100px; font-size: 1rem; font-family: var(--font);
}
.cta-form input::placeholder { color: rgba(255,255,255,0.5); }
.cta-form input:focus { outline: none; border-color: var(--gold-soft); background: rgba(255,255,255,0.12); }
.cta-form .btn-solid { background: #fff; color: var(--ink); }
.cta-fine { color: rgba(255,255,255,0.45); font-size: 0.82rem; margin-top: 22px; }

/* FOOTER */
.footer { background: var(--cream); padding: 80px 0 36px; border-top: 1px solid var(--line); }
.footer-inner { display: grid; grid-template-columns: 1.2fr 2fr; gap: 40px; }
.footer-brand { display: flex; flex-direction: column; gap: 8px; }
.footer-brand .brand-name { font-size: 1.5rem; font-weight: 800; }
.footer-brand .brand-mark { width: 22px; height: 22px; }
.footer-brand p { color: var(--ink-soft); font-size: 0.96rem; margin-top: 4px; }
.footer-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.footer-cols h4 { font-size: 0.82rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 16px; }
.footer-cols a { display: block; color: var(--ink-soft); font-size: 0.96rem; margin-bottom: 10px; transition: color 0.2s; }
.footer-cols a:hover { color: var(--ink); }
.footer-bottom {
  display: flex; justify-content: space-between; margin-top: 56px; padding-top: 24px;
  border-top: 1px solid var(--line); color: var(--ink-muted); font-size: 0.86rem;
}

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* Responsive */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .problem-cards { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .science-grid { grid-template-columns: 1fr; gap: 40px; }
  .science-intro { position: static; }
  .device-card { grid-template-columns: 1fr; }
  .device-visual { min-height: 340px; }
  .pioneer-cards { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .container { padding: 0 20px; }
  .problem, .solution, .science, .pioneers { padding: 80px 0; }
  .feature { padding: 30px 26px; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
}
