/* =========================================================
   We Safe Sleep — "Night Glass" design system
   ========================================================= */
:root {
  --bg: #050b14;
  --bg-2: #08121f;
  --navy: #0f3a5f;
  --navy-2: #12304d;
  --mint: #96d6cf;
  --mint-2: #5fc2b6;
  --violet: #7d7cf0;
  --ink: #eaf3f5;
  --muted: rgba(234, 243, 245, .62);
  --faint: rgba(234, 243, 245, .38);
  --hair: rgba(255, 255, 255, .08);
  --hair-2: rgba(255, 255, 255, .14);
  --glass: rgba(255, 255, 255, .035);

  --f-sans: "Plus Jakarta Sans", system-ui, sans-serif;
  --f-serif: "Instrument Serif", Georgia, serif;
  --f-mono: "JetBrains Mono", ui-monospace, monospace;

  --ease: cubic-bezier(.32, .72, 0, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --r-xl: 2.25rem;
  --r-lg: 2rem;
  --pad: clamp(1rem, 4vw, 3rem);
  --sec: clamp(6rem, 14vw, 11rem);

  --z-nav: 40;
  --z-menu: 39;
  --z-grain: 60;
  --z-loader: 70;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
em { font-family: var(--f-serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; }
::selection { background: var(--mint); color: var(--bg); }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; border-radius: 8px; }

.container { width: min(1280px, 100%); margin-inline: auto; padding-inline: var(--pad); }
.section { position: relative; padding-block: var(--sec); }

/* Grain overlay */
.grain {
  position: fixed; inset: 0; z-index: var(--z-grain); pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: var(--z-loader);
  display: grid; place-items: center; background: var(--bg);
}
html:not(.js) .loader { display: none; }
.loader__inner { display: grid; justify-items: center; gap: 1.25rem; }
.loader__logo { width: 64px; height: 74px; filter: drop-shadow(0 0 30px rgba(150, 214, 207, .35)); animation: breathe 2.4s var(--ease) infinite; }
.loader__text { font-family: var(--f-serif); font-style: italic; font-size: 1.6rem; color: var(--muted); }
.loader__dots i { font-style: normal; animation: blink 1.2s infinite; }
.loader__dots i:nth-child(2) { animation-delay: .2s; }
.loader__dots i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 100% { opacity: .15 } 50% { opacity: 1 } }
@keyframes breathe { 0%, 100% { transform: scale(1) } 50% { transform: scale(1.07) } }

/* ---------- Eyebrow / chips ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .4rem .9rem; border-radius: 999px;
  background: var(--glass); box-shadow: inset 0 0 0 1px var(--hair);
  font-size: .68rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--mint);
}
.eyebrow__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 12px var(--mint); }
.chip {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .35rem .75rem; border-radius: 999px; font-size: .72rem; font-weight: 500; white-space: nowrap;
}
.chip--mint { background: rgba(150, 214, 207, .12); color: var(--mint); box-shadow: inset 0 0 0 1px rgba(150, 214, 207, .25); }
.chip--glass { background: rgba(5, 11, 20, .55); color: var(--ink); box-shadow: inset 0 0 0 1px var(--hair-2); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.live { display: inline-flex; align-items: center; gap: .45rem; font-family: var(--f-mono); font-size: .65rem; text-transform: uppercase; letter-spacing: .14em; color: var(--mint); }
.live span { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); position: relative; }
.live span::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid var(--mint); animation: ping 1.8s var(--ease-out) infinite; }
@keyframes ping { 0% { transform: scale(.5); opacity: 1 } 100% { transform: scale(2); opacity: 0 } }

/* ---------- Typography ---------- */
.h2 {
  margin: 1.4rem 0 0; font-size: clamp(2.4rem, 6vw, 5rem); line-height: 1; font-weight: 600; letter-spacing: -.045em;
}
.h2 em { color: var(--mint); font-size: 1.08em; }
.h2--xl { font-size: clamp(2.6rem, 6.4vw, 5.6rem); }
.section__head { margin-bottom: clamp(3rem, 7vw, 6rem); }
.section__head--split { display: grid; grid-template-columns: 1.3fr 1fr; gap: 3rem; align-items: end; }
.section__lead { margin: 0; color: var(--muted); font-size: clamp(1rem, 1.3vw, 1.15rem); max-width: 34rem; }

/* ---------- Buttons (button-in-button) ---------- */
.btn {
  --btn-bg: rgba(255, 255, 255, .06);
  position: relative; display: inline-flex; align-items: center; gap: 1rem;
  padding: .45rem .45rem .45rem 1.5rem; border-radius: 999px;
  background: var(--btn-bg); box-shadow: inset 0 0 0 1px var(--hair-2);
  font-weight: 600; font-size: .95rem; letter-spacing: -.01em;
  transition: transform .6s var(--ease), background .6s var(--ease), box-shadow .6s var(--ease);
}
.btn:hover { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); }
.btn:active { transform: scale(.97); }
.btn__icon {
  display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%;
  background: rgba(255, 255, 255, .1); font-size: 1.05rem;
  transition: transform .6s var(--ease), background .6s var(--ease);
}
.btn:hover .btn__icon { transform: translate(3px, -2px) scale(1.06); }
.btn--mint { --btn-bg: var(--mint); color: #062027; box-shadow: 0 10px 40px -10px rgba(150, 214, 207, .55), inset 0 1px 0 rgba(255, 255, 255, .5); }
.btn--mint:hover { --btn-bg: #aee3dc; box-shadow: 0 16px 50px -10px rgba(150, 214, 207, .7), inset 0 1px 0 rgba(255, 255, 255, .6); }
.btn--mint .btn__icon { background: rgba(6, 32, 39, .12); }
.btn--ghost { backdrop-filter: none; }
.btn--sm { padding: .3rem .3rem .3rem 1.1rem; font-size: .85rem; gap: .7rem; }
.btn--sm .btn__icon { width: 2rem; height: 2rem; font-size: .9rem; }
.btn--block { width: 100%; justify-content: space-between; padding-block: .5rem; }

/* ---------- Double-bezel ---------- */
.bezel {
  --r: var(--r-lg);
  padding: .4rem; border-radius: var(--r);
  background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .015));
  box-shadow: inset 0 0 0 1px var(--hair), 0 40px 80px -40px rgba(0, 0, 0, .6);
}
.bezel--xl { --r: var(--r-xl); padding: .5rem; }
.bezel__core {
  position: relative; height: 100%; overflow: hidden;
  border-radius: calc(var(--r) - .4rem);
  background: linear-gradient(180deg, #0b1828 0%, #08121f 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), inset 0 0 0 1px rgba(255, 255, 255, .03);
}
.bezel--xl > .bezel__core { border-radius: calc(var(--r) - .5rem); }

/* ---------- Nav (floating island) ---------- */
.nav {
  position: fixed; top: 1.25rem; left: 0; right: 0; z-index: var(--z-nav);
  display: flex; justify-content: center; padding-inline: 1rem; pointer-events: none;
  transition: transform .8s var(--ease);
}
.nav.is-hidden { transform: translateY(-140%); }
.nav__pill {
  pointer-events: auto; display: flex; align-items: center; gap: 1.5rem;
  padding: .4rem .4rem .4rem 1rem; border-radius: 999px;
  background: rgba(8, 18, 31, .55); box-shadow: inset 0 0 0 1px var(--hair-2), 0 20px 50px -20px rgba(0, 0, 0, .6);
  backdrop-filter: blur(22px) saturate(160%); -webkit-backdrop-filter: blur(22px) saturate(160%);
}
.nav__brand { display: inline-flex; align-items: center; gap: .6rem; }
.nav__mark { width: 26px; height: 30px; }
.nav__word { font-weight: 700; font-size: .95rem; letter-spacing: -.02em; white-space: nowrap; }
.nav__word b { color: var(--mint); font-weight: 700; }
.nav__links { display: flex; gap: .25rem; }
.nav__links a {
  position: relative; padding: .5rem .9rem; border-radius: 999px; font-size: .86rem; color: var(--muted);
  transition: color .5s var(--ease), background .5s var(--ease);
}
.nav__links a:hover, .nav__links a.is-active { color: var(--ink); background: rgba(255, 255, 255, .06); }

.burger { display: none; position: relative; width: 2.6rem; height: 2.6rem; border-radius: 50%; background: rgba(255, 255, 255, .08); }
.burger span {
  position: absolute; left: 50%; top: 50%; width: 16px; height: 1.5px; background: var(--ink); border-radius: 2px;
  transition: transform .7s var(--ease);
}
.burger span:first-child { transform: translate(-50%, -4px); }
.burger span:last-child { transform: translate(-50%, 4px); }
.menu-open .burger span:first-child { transform: translate(-50%, 0) rotate(45deg); }
.menu-open .burger span:last-child { transform: translate(-50%, 0) rotate(-45deg); }

.menu {
  position: fixed; inset: 0; z-index: var(--z-menu);
  display: flex; flex-direction: column; justify-content: center; padding: 6rem 1.5rem 2rem;
  background: rgba(5, 11, 20, .82); backdrop-filter: blur(40px); -webkit-backdrop-filter: blur(40px);
  opacity: 0; visibility: hidden; transition: opacity .7s var(--ease), visibility 0s linear .7s;
}
.menu-open .menu { opacity: 1; visibility: visible; transition: opacity .7s var(--ease); }
.menu__links { display: grid; gap: .3rem; }
.menu__links a { display: block; overflow: hidden; font-size: clamp(2rem, 9vw, 3rem); font-weight: 600; letter-spacing: -.04em; line-height: 1.15; }
.menu__links a span { display: inline-block; transform: translateY(110%); transition: transform .9s var(--ease); }
.menu-open .menu__links a span { transform: translateY(0); }
.menu-open .menu__links a:nth-child(1) span { transition-delay: .08s }
.menu-open .menu__links a:nth-child(2) span { transition-delay: .13s }
.menu-open .menu__links a:nth-child(3) span { transition-delay: .18s }
.menu-open .menu__links a:nth-child(4) span { transition-delay: .23s }
.menu-open .menu__links a:nth-child(5) span { transition-delay: .28s }
.menu-open .menu__links a:nth-child(6) span { transition-delay: .33s }
.menu__foot { margin-top: 3rem; color: var(--faint); font-family: var(--f-mono); font-size: .8rem; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100dvh; overflow: hidden;
  display: flex; align-items: center; padding-block: 8rem 10rem;
  background: radial-gradient(120% 80% at 70% 0%, #0d2440 0%, var(--bg) 60%);
}
.hero__stars { position: absolute; inset: 0; width: 100%; height: 100%; }
.orb { position: absolute; border-radius: 50%; pointer-events: none; filter: blur(80px); opacity: .55; }
.orb--mint { width: 42vw; height: 42vw; right: -8vw; top: 6vh; background: radial-gradient(circle, rgba(150, 214, 207, .45), transparent 65%); animation: drift 16s var(--ease) infinite alternate; }
.orb--navy { width: 55vw; height: 55vw; left: -20vw; bottom: -25vw; background: radial-gradient(circle, rgba(15, 58, 95, .9), transparent 65%); }
.orb--violet { width: 30vw; height: 30vw; left: 30vw; top: -12vw; background: radial-gradient(circle, rgba(125, 124, 240, .25), transparent 65%); animation: drift 20s var(--ease) infinite alternate-reverse; }
@keyframes drift { to { transform: translate3d(-4vw, 3vw, 0) scale(1.1); } }

.hero__grid { position: relative; z-index: 2; display: grid; grid-template-columns: 1.15fr 1fr; gap: 3rem; align-items: center; }
.hero__title {
  margin: 1.8rem 0 1.6rem; font-size: clamp(3.2rem, 8.6vw, 8.2rem); line-height: .92; font-weight: 700; letter-spacing: -.055em;
}
.hero__title .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero__title .line > span { display: inline-block; }
.hero__title em { color: var(--mint); font-size: 1.1em; padding-right: .04em; text-shadow: 0 0 60px rgba(150, 214, 207, .35); }
.hero__lead { max-width: 30rem; color: var(--muted); font-size: clamp(1.02rem, 1.4vw, 1.2rem); margin: 0 0 2.4rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .8rem; }

.hero__visual { position: relative; aspect-ratio: 1 / 1.02; }
.moon { position: absolute; inset: 12%; display: grid; place-items: center; }
.moon__core {
  width: 46%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #e9fbf8 0%, #96d6cf 45%, #2a7d84 100%);
  box-shadow: 0 0 80px 10px rgba(150, 214, 207, .35), inset -18px -18px 40px rgba(15, 58, 95, .65);
  animation: breathe 6s var(--ease) infinite;
}
.moon__ring { position: absolute; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(150, 214, 207, .16); animation: ringPulse 6s var(--ease) infinite; }
.moon__ring--1 { inset: 18%; }
.moon__ring--2 { inset: 6%; animation-delay: .5s; box-shadow: inset 0 0 0 1px rgba(150, 214, 207, .1); }
.moon__ring--3 { inset: -6%; animation-delay: 1s; box-shadow: inset 0 0 0 1px rgba(150, 214, 207, .06); border: 1px dashed rgba(150, 214, 207, .1); }
@keyframes ringPulse { 0%, 100% { transform: scale(1) } 50% { transform: scale(1.04) } }

.vital { position: absolute; --r: 1.5rem; padding: .3rem; width: min(260px, 60%); }
.vital .bezel__core { padding: 1rem 1.1rem; border-radius: calc(var(--r) - .3rem); background: linear-gradient(180deg, rgba(14, 30, 50, .92), rgba(8, 18, 31, .92)); }
.vital--ecg { top: 2%; left: -4%; }
.vital--breath { top: 12%; right: -2%; width: min(190px, 46%); }
.vital--posture { bottom: 14%; left: -6%; width: min(290px, 66%); }
.vital--phase { bottom: 0; right: 0; width: min(210px, 50%); }
.vital__head { display: flex; justify-content: space-between; align-items: center; }
.vital__label { display: inline-flex; align-items: center; gap: .4rem; font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); font-weight: 600; }
.vital__label i { font-size: 1rem; color: var(--mint); }
.vital__value { display: flex; align-items: baseline; gap: .3rem; margin-top: .3rem; }
.vital__value b { font-family: var(--f-mono); font-size: 2rem; font-weight: 500; letter-spacing: -.04em; }
.vital__value small { color: var(--faint); font-size: .75rem; }
.vital__row { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-top: .5rem; flex-wrap: wrap; }
.vital__row strong { font-size: 1.05rem; font-weight: 600; }
.vital__phase { display: block; margin-top: .5rem; font-size: .9rem; font-weight: 600; }
.ecg { width: 100%; height: 44px; margin-top: .2rem; overflow: visible; }
.ecg__line { fill: none; stroke: var(--mint); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 520; stroke-dashoffset: 520; animation: ecg 2.6s linear infinite; filter: drop-shadow(0 0 6px rgba(150, 214, 207, .7)); }
@keyframes ecg { to { stroke-dashoffset: -520; } }
.breath { display: flex; align-items: center; gap: .9rem; margin-top: .4rem; }
.breath__circle { width: 34px; height: 34px; border-radius: 50%; background: radial-gradient(circle, rgba(150, 214, 207, .6), rgba(150, 214, 207, .05)); box-shadow: 0 0 0 1px rgba(150, 214, 207, .3); animation: inhale 4.3s cubic-bezier(.45, 0, .55, 1) infinite; }
@keyframes inhale { 0%, 100% { transform: scale(.65) } 45% { transform: scale(1.1) } }
.hypno { display: flex; align-items: flex-end; gap: 4px; height: 38px; margin-top: .6rem; }
.hypno span { flex: 1; height: calc(var(--h) * 100%); border-radius: 3px; background: linear-gradient(180deg, var(--mint), rgba(125, 124, 240, .6)); transform-origin: bottom; animation: bar 3s var(--ease) infinite alternate; }
.hypno span:nth-child(odd) { animation-delay: -1.2s; }
@keyframes bar { from { transform: scaleY(.55) } to { transform: scaleY(1) } }

.hero__waves { position: absolute; left: 0; right: 0; bottom: 0; height: 200px; pointer-events: none; z-index: 1; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent); mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent); }
.hero__waves svg { position: absolute; bottom: 0; left: 0; width: 200%; height: 100%; animation: waveX 18s linear infinite; }
.hero__waves svg:nth-child(2) { animation-duration: 26s; opacity: .55; }
.hero__waves svg:nth-child(3) { animation-duration: 34s; animation-direction: reverse; opacity: .3; }
.hero__waves path { fill: none; stroke: var(--mint); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
@keyframes waveX { to { transform: translate3d(-50%, 0, 0); } }

.scroll-cue { position: absolute; z-index: 3; left: 50%; bottom: 2rem; transform: translateX(-50%); display: grid; justify-items: center; gap: .6rem; font-family: var(--f-mono); font-size: .62rem; letter-spacing: .25em; text-transform: uppercase; color: var(--faint); }
.scroll-cue__track { width: 1px; height: 46px; background: var(--hair-2); overflow: hidden; position: relative; }
.scroll-cue__track span { position: absolute; inset: 0; background: var(--mint); animation: cue 2.2s var(--ease) infinite; }
@keyframes cue { 0% { transform: translateY(-100%) } 100% { transform: translateY(100%) } }

/* ---------- Marquee ---------- */
.marquee { position: relative; overflow: hidden; padding-block: 1.6rem; border-block: 1px solid var(--hair); background: var(--bg-2); }
.marquee__track { display: flex; align-items: center; gap: 2.4rem; width: max-content; animation: marquee 40s linear infinite; }
.marquee__track span { font-size: clamp(1.4rem, 3vw, 2.4rem); font-weight: 600; letter-spacing: -.03em; white-space: nowrap; color: rgba(234, 243, 245, .85); }
.marquee__track em { color: var(--mint); }
.marquee__track i { color: var(--mint); font-size: 1.4rem; }
@keyframes marquee { to { transform: translate3d(-50%, 0, 0); } }

/* ---------- Come funziona ---------- */
.statement {
  margin: 0 0 clamp(5rem, 10vw, 9rem); max-width: 62rem;
  font-size: clamp(1.5rem, 3.3vw, 2.9rem); line-height: 1.22; font-weight: 500; letter-spacing: -.03em;
}
.statement .w { opacity: .14; transition: opacity .3s; }
html:not(.js) .statement .w { opacity: 1; }

.how__split { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.how__sticky { position: sticky; top: 7rem; }
.how__media { aspect-ratio: 4 / 4.2; }
.how__media img { width: 100%; height: 100%; object-fit: cover; object-position: 45% center; transform: scale(1.05); }
.how__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5, 11, 20, 0) 50%, rgba(5, 11, 20, .75) 100%); pointer-events: none; }
.scan { position: absolute; left: 0; right: 0; height: 30%; top: -30%; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(150, 214, 207, .22) 85%, rgba(150, 214, 207, .7) 100%);
  animation: scan 4.5s var(--ease) infinite; mix-blend-mode: screen; }
@keyframes scan { 0% { transform: translateY(0) } 100% { transform: translateY(440%) } }
.hud { position: absolute; z-index: 2; left: 1.2rem; right: 1.2rem; bottom: 1.2rem; display: grid; gap: .7rem; }
.hud__step { font-family: var(--f-mono); font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); }
.hud__bar { height: 2px; background: rgba(255, 255, 255, .15); border-radius: 2px; overflow: hidden; }
.hud__bar span { display: block; height: 100%; background: var(--mint); transform-origin: left; transform: scaleX(.33); transition: transform 1s var(--ease); }
.hud-tag {
  position: absolute; z-index: 2; left: var(--x); top: var(--y); transform: translate(-50%, -50%) scale(.8);
  display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .7rem; border-radius: 999px;
  background: rgba(5, 11, 20, .72); box-shadow: inset 0 0 0 1px rgba(150, 214, 207, .35);
  font-size: .72rem; font-weight: 600; color: var(--mint); opacity: 0;
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.hud-tag.is-on { opacity: 1; transform: translate(-50%, -50%) scale(1); }

.steps { list-style: none; margin: 0; padding: 0; }
.step {
  position: relative; min-height: 62vh; padding: 2rem 0 2rem 2.4rem;
  display: flex; flex-direction: column; justify-content: center;
  border-left: 1px solid var(--hair); opacity: .32; transition: opacity .8s var(--ease);
}
.step::before { content: ""; position: absolute; left: -1px; top: 50%; width: 1px; height: 0; background: var(--mint); box-shadow: 0 0 12px var(--mint); transition: height .9s var(--ease), top .9s var(--ease); }
.step.is-active { opacity: 1; }
.step.is-active::before { height: 40%; top: 30%; }
.step__num { font-family: var(--f-mono); font-size: .8rem; color: var(--mint); letter-spacing: .15em; }
.step__icon { display: grid; place-items: center; width: 3.4rem; height: 3.4rem; margin: 1.2rem 0; border-radius: 1rem; background: rgba(150, 214, 207, .08); box-shadow: inset 0 0 0 1px rgba(150, 214, 207, .2); font-size: 1.6rem; color: var(--mint); }
.step__title { margin: 0 0 .8rem; font-size: clamp(2.4rem, 5vw, 4rem); font-weight: 600; letter-spacing: -.05em; line-height: 1; }
.step__text { margin: 0; color: var(--muted); font-size: 1.08rem; max-width: 28rem; }

/* ---------- Demo ---------- */
.demo { background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 50%, var(--bg) 100%); }
.demo__core { display: grid; grid-template-columns: 1fr 320px; }
.demo__canvas-wrap { padding: clamp(1rem, 2.4vw, 2rem); border-right: 1px solid var(--hair); }
.demo__toolbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.4rem; flex-wrap: wrap; }
.seg { position: relative; display: inline-flex; padding: .3rem; border-radius: 999px; background: rgba(255, 255, 255, .04); box-shadow: inset 0 0 0 1px var(--hair); }
.seg__btn { position: relative; z-index: 1; padding: .55rem 1.1rem; border-radius: 999px; font-size: .85rem; font-weight: 600; color: var(--muted); transition: color .5s var(--ease); }
.seg__btn.is-active { color: #062027; }
.seg__pill { position: absolute; z-index: 0; top: .3rem; bottom: .3rem; left: 0; border-radius: 999px; background: var(--mint); box-shadow: 0 6px 20px -6px rgba(150, 214, 207, .6); transition: transform .7s var(--ease), width .7s var(--ease); }
.demo__canvas { display: block; width: 100%; aspect-ratio: 2.3 / 1; border-radius: 1.2rem; background: radial-gradient(120% 120% at 50% 0%, #0d2036, #060e19); box-shadow: inset 0 0 0 1px var(--hair); cursor: crosshair; touch-action: pan-y; }
.demo__legend { display: grid; grid-template-columns: 1fr 1.2fr 1fr 1.2fr 2fr; margin-top: .9rem; font-family: var(--f-mono); font-size: .65rem; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.demo__legend span { border-left: 1px solid var(--hair); padding-left: .5rem; }
.demo__panel { padding: clamp(1.2rem, 2.4vw, 2rem); display: flex; flex-direction: column; gap: 1.8rem; }
.demo__readouts { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.readout { padding: .9rem 1rem; border-radius: 1rem; background: rgba(255, 255, 255, .03); box-shadow: inset 0 0 0 1px var(--hair); }
.readout > span { display: block; font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); font-weight: 600; }
.readout b { font-family: var(--f-mono); font-size: 1.7rem; font-weight: 500; }
.readout small { font-size: .7rem; color: var(--faint); margin-left: .2rem; }
.zones { display: grid; gap: .85rem; }
.zones__title { margin: 0 0 .2rem; display: flex; gap: .5rem; align-items: center; font-size: .78rem; font-weight: 600; color: var(--muted); }
.zones__title i { color: var(--mint); font-size: 1rem; }
.zone { display: grid; grid-template-columns: 70px 1fr 42px; align-items: center; gap: .8rem; font-size: .8rem; color: var(--muted); }
.zone em { font-family: var(--f-mono); font-style: normal; font-size: .75rem; text-align: right; color: var(--ink); }
.zone__bar { height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.zone__bar span { display: block; height: 100%; width: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--navy), var(--mint)); transform-origin: left; transform: scaleX(.5); transition: transform .9s var(--ease); }
.demo__note { margin: auto 0 0; display: flex; gap: .4rem; align-items: center; font-size: .72rem; color: var(--faint); }

/* ---------- Bento ---------- */
.bento { display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-rows: minmax(280px, auto); gap: 1.1rem; }
.bento__item { --r: var(--r-lg); }
.bento__item--ai { grid-column: span 7; grid-row: span 2; }
.bento__item--sensors { grid-column: span 5; }
.bento__item--app { grid-column: span 5; }
.bento__item--img { grid-column: span 5; margin: 0; }
.bento__item--home { grid-column: span 7; }
.bento .bezel__core { padding: clamp(1.4rem, 2.6vw, 2.2rem); display: flex; flex-direction: column; justify-content: space-between; gap: 1.5rem; }
.spot::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .6s var(--ease);
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(150, 214, 207, .1), transparent 60%);
}
.spot:hover::before { opacity: 1; }
.card__top { display: flex; justify-content: space-between; align-items: center; }
.card__icon { display: inline-grid; place-items: center; width: 3rem; height: 3rem; border-radius: .9rem; background: rgba(150, 214, 207, .08); box-shadow: inset 0 0 0 1px rgba(150, 214, 207, .2); font-size: 1.4rem; color: var(--mint); }
.card__idx { font-family: var(--f-mono); font-size: .75rem; color: var(--faint); letter-spacing: .15em; }
.card__body h3 { margin: 0 0 .6rem; font-size: clamp(1.4rem, 2.2vw, 2rem); line-height: 1.08; font-weight: 600; letter-spacing: -.035em; }
.card__body h3 em { color: var(--mint); }
.card__body p { margin: 0; color: var(--muted); max-width: 30rem; }
.bento__item--ai .card__body h3 { font-size: clamp(1.8rem, 3.4vw, 3rem); }

.neural { width: 100%; flex: 1; min-height: 200px; }
.neural .edge { stroke: rgba(150, 214, 207, .14); stroke-width: 1; }
.neural .pulse { stroke: var(--mint); stroke-width: 1.6; stroke-linecap: round; fill: none; filter: drop-shadow(0 0 4px var(--mint)); }
.neural .node { fill: #0b1828; stroke: rgba(150, 214, 207, .55); stroke-width: 1.2; }
.neural .node.hot { fill: var(--mint); }

.signals { display: grid; gap: .9rem; }
.signal { display: grid; grid-template-columns: 64px 1fr; align-items: center; gap: .8rem; font-family: var(--f-mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.signal svg { width: 100%; height: 30px; overflow: visible; }
.signal path { fill: none; stroke: var(--mint); stroke-width: 1.6; stroke-dasharray: 6 0; vector-effect: non-scaling-stroke; stroke-dasharray: 340; stroke-dashoffset: 340; animation: draw 3.5s var(--ease) infinite; }
.signal:nth-child(2) path { animation-delay: .4s; stroke: #b6c7ff; }
.signal:nth-child(3) path { animation-delay: .8s; }
@keyframes draw { 0% { stroke-dashoffset: 340 } 60%, 100% { stroke-dashoffset: 0 } }

.app { display: grid; grid-template-columns: 130px 1fr; gap: 1.6rem; align-items: center; height: 100%; }
.app .card__body { display: grid; gap: .3rem; }
.app .card__icon { margin-bottom: .6rem; }
.phone { position: relative; aspect-ratio: 9 / 18; border-radius: 1.6rem; padding: 1.4rem .7rem .8rem; background: linear-gradient(180deg, #0e2034, #08121f); box-shadow: inset 0 0 0 1px var(--hair-2), 0 30px 60px -20px rgba(0, 0, 0, .7); display: grid; justify-items: center; align-content: start; gap: .4rem; transform: rotate(-6deg); transition: transform .9s var(--ease); }
.bento__item--app:hover .phone { transform: rotate(0deg) translateY(-6px); }
.phone__notch { position: absolute; top: .45rem; width: 34%; height: .35rem; border-radius: 1rem; background: rgba(255, 255, 255, .1); }
.phone__label { font-size: .55rem; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.ring { width: 78%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 9; }
.ring__bg { stroke: rgba(255, 255, 255, .07); }
.ring__fg { stroke: var(--mint); stroke-linecap: round; stroke-dasharray: 314; stroke-dashoffset: 314; transition: stroke-dashoffset 2s var(--ease-out); }
.phone__score { position: absolute; top: 34%; font-family: var(--f-mono); font-size: 1.3rem; font-weight: 500; }
.phone__bars { display: flex; gap: 3px; align-items: flex-end; height: 34px; width: 100%; margin-top: .4rem; }
.phone__bars span { flex: 1; height: calc(var(--h) * 100%); border-radius: 2px; background: linear-gradient(180deg, var(--mint), var(--navy)); }

.img-core { padding: 0 !important; min-height: 280px; }
.img-core img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease); }
.bento__item--img:hover img { transform: scale(1.05); }
.img-core figcaption { position: absolute; left: 1rem; bottom: 1rem; }

.home { flex-direction: row !important; align-items: center; }
.home .card__body { display: grid; gap: .3rem; flex: 1; }
.home .card__icon { margin-bottom: .6rem; }
.home .card__idx { display: none; }
.orbit { position: relative; flex: 0 0 auto; width: 240px; aspect-ratio: 1; }
.orbit__center { position: absolute; inset: 37%; display: grid; place-items: center; border-radius: 50%; background: rgba(150, 214, 207, .08); box-shadow: 0 0 40px rgba(150, 214, 207, .25), inset 0 0 0 1px rgba(150, 214, 207, .25); }
.orbit__center svg { width: 55%; height: 55%; }
.orbit__ring { position: absolute; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--hair-2); animation: spin 30s linear infinite; }
.orbit__ring--1 { inset: 18%; }
.orbit__ring--2 { inset: 0; animation-duration: 45s; animation-direction: reverse; }
.orbit__ring span { position: absolute; left: 50%; top: 50%; width: 2.3rem; height: 2.3rem; margin: -1.15rem; display: grid; place-items: center; border-radius: 50%; background: #0b1828; box-shadow: inset 0 0 0 1px rgba(150, 214, 207, .3); color: var(--mint); font-size: 1rem;
  transform: rotate(var(--a)) translateX(var(--rad)) rotate(calc(-1 * var(--a))); }
.orbit__ring--1 span { --rad: 79px; }
.orbit__ring--2 span { --rad: 120px; }
.orbit__ring span i { animation: spin 30s linear infinite reverse; }
.orbit__ring--2 span i { animation-duration: 45s; animation-direction: normal; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Ambiti (horizontal) ---------- */
.scope { padding-bottom: 0; }
.scope__pin { min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; padding-block: 2rem 4rem; }
.scope__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; margin-bottom: 3.5rem; }
.scope__progress { width: 200px; height: 2px; border-radius: 2px; background: var(--hair-2); overflow: hidden; flex: 0 0 auto; }
.scope__progress span { display: block; height: 100%; background: var(--mint); transform-origin: left; transform: scaleX(0); }
.scope__viewport { overflow: hidden; }
.scope__track { display: flex; gap: 1.2rem; padding-inline: max(var(--pad), calc((100vw - 1280px) / 2 + var(--pad))); width: max-content; will-change: transform; }
.scope-card {
  position: relative; flex: 0 0 auto; width: clamp(300px, 30vw, 420px); aspect-ratio: 3 / 4; margin: 0;
  display: flex; flex-direction: column; justify-content: space-between; padding: 2rem; border-radius: var(--r-xl); overflow: hidden;
  background: linear-gradient(160deg, #0d1d30, #07111d); box-shadow: inset 0 0 0 1px var(--hair), inset 0 1px 0 rgba(255, 255, 255, .08);
  transition: transform .9s var(--ease);
}
.scope-card:hover { transform: translateY(-8px); }
.scope-card__glow { position: absolute; width: 140%; aspect-ratio: 1; right: -60%; top: -50%; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--c1) 70%, transparent), transparent 60%); opacity: .55; transition: transform 1.2s var(--ease), opacity 1s var(--ease); pointer-events: none; }
.scope-card:hover .scope-card__glow { transform: translate(-12%, 10%) scale(1.15); opacity: .85; }
.scope-card__top { position: relative; display: flex; justify-content: space-between; align-items: flex-start; }
.scope-card__top span { font-family: var(--f-mono); font-size: .8rem; color: var(--faint); letter-spacing: .15em; }
.scope-card__top i { font-size: 4.5rem; color: var(--c2); filter: drop-shadow(0 0 24px color-mix(in srgb, var(--c2) 60%, transparent)); }
.scope-card__body { position: relative; }
.scope-card h3 { margin: 0 0 .7rem; font-size: clamp(1.6rem, 2.4vw, 2.2rem); font-weight: 600; letter-spacing: -.04em; line-height: 1.05; }
.scope-card p { margin: 0 0 1.4rem; color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; margin: 0; padding: 0; }
.tags li { padding: .3rem .7rem; border-radius: 999px; font-size: .72rem; background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px var(--hair-2); color: var(--muted); }
.scope-card--img { width: clamp(340px, 46vw, 640px); aspect-ratio: auto; padding: 0; }
.scope-card--img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scope-card--img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(5, 11, 20, .9)); }
.scope-card--img figcaption { position: absolute; z-index: 1; left: 2rem; bottom: 1.8rem; right: 2rem; font-size: clamp(1.6rem, 2.6vw, 2.4rem); font-weight: 600; letter-spacing: -.04em; line-height: 1.05; }
.scope-card--img em { color: var(--mint); }

/* ---------- Contact ---------- */
.contact { overflow: hidden; }
.orb--contact { width: 50vw; height: 50vw; left: -15vw; top: 10%; right: auto; opacity: .35; }
.contact__grid { position: relative; display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(2.5rem, 6vw, 6rem); align-items: center; }
.contact__copy .section__lead { margin: 1.8rem 0 2.2rem; }
.contact__mail { display: inline-flex; align-items: center; gap: .7rem; font-size: clamp(1rem, 1.8vw, 1.35rem); font-weight: 600; border-bottom: 1px solid rgba(150, 214, 207, .4); padding-bottom: .3rem; transition: color .5s var(--ease), border-color .5s var(--ease); }
.contact__mail i { color: var(--mint); font-size: 1.4em; }
.contact__mail:hover { color: var(--mint); border-color: var(--mint); }
.mailer { padding: clamp(1.4rem, 3vw, 2.4rem); display: grid; gap: 1.4rem; }
.mailer::before { content: ""; position: absolute; width: 70%; aspect-ratio: 1; right: -30%; top: -40%; border-radius: 50%; background: radial-gradient(circle, rgba(150, 214, 207, .16), transparent 65%); pointer-events: none; animation: drift 14s ease-in-out infinite alternate; }
.mailer__head { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.mailer__step { font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.topics { position: relative; display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; }
.topic {
  position: relative; display: flex; align-items: center; gap: .75rem; padding: .9rem 1rem; border-radius: 1.1rem; text-align: left;
  background: rgba(255, 255, 255, .03); box-shadow: inset 0 0 0 1px var(--hair);
  font-size: .92rem; font-weight: 500; color: var(--muted);
  transition: background .6s var(--ease), box-shadow .6s var(--ease), color .6s var(--ease), transform .6s var(--ease);
}
.topic i { display: grid; place-items: center; flex: none; width: 2.3rem; height: 2.3rem; border-radius: .8rem; font-size: 1.2rem; background: rgba(255, 255, 255, .05); transition: background .6s var(--ease), color .6s var(--ease), transform .6s var(--ease); }
.topic:hover { color: var(--ink); background: rgba(255, 255, 255, .05); transform: translateY(-2px); }
.topic:hover i { transform: rotate(-8deg) scale(1.08); }
.topic.is-active { color: var(--mint); background: rgba(150, 214, 207, .1); box-shadow: inset 0 0 0 1px rgba(150, 214, 207, .5), 0 12px 30px -16px rgba(150, 214, 207, .5); }
.topic.is-active i { background: var(--mint); color: #062027; }
.envelope {
  position: relative; padding: 1.1rem 1.2rem; border-radius: 1.1rem;
  background: rgba(5, 11, 20, .55); box-shadow: inset 0 0 0 1px var(--hair);
  font-family: var(--f-mono); font-size: .78rem;
}
.envelope__row { display: grid; grid-template-columns: 4.6rem 1fr; gap: .6rem; padding-bottom: .55rem; margin-bottom: .55rem; border-bottom: 1px dashed var(--hair-2); }
.envelope__row span { color: var(--faint); text-transform: uppercase; letter-spacing: .12em; font-size: .64rem; padding-top: .1rem; }
.envelope__row b { font-weight: 500; color: var(--ink); overflow-wrap: anywhere; }
.is-swap .envelope__row b[data-mail-subject] { animation: swapIn .7s var(--ease-out); }
@keyframes swapIn { from { opacity: 0; transform: translateY(6px); filter: blur(4px); } }
.envelope__body { margin: .2rem 0 0; min-height: 4.2em; color: var(--muted); line-height: 1.65; font-family: var(--f-sans); font-size: .9rem; }
.caret { display: inline-block; width: 2px; height: 1em; margin-left: 2px; vertical-align: -.15em; background: var(--mint); animation: blink 1s steps(1) infinite; }
.mailer__actions { display: flex; gap: .6rem; }
.mailer__send { flex: 1; }
.mailer__send .btn__icon i { transition: transform .8s var(--ease); }
.is-sent .mailer__send .btn__icon i { animation: fly 1.2s var(--ease) forwards; }
@keyframes fly { 40% { transform: translate(28px, -28px) rotate(12deg); opacity: 0; } 41% { transform: translate(-20px, 20px); opacity: 0; } 100% { transform: none; opacity: 1; } }
.mailer__copy {
  display: inline-flex; align-items: center; gap: .45rem; padding: 0 1.1rem; border-radius: 999px;
  background: rgba(255, 255, 255, .04); box-shadow: inset 0 0 0 1px var(--hair-2);
  font-size: .85rem; font-weight: 600; color: var(--muted);
  transition: color .5s var(--ease), box-shadow .5s var(--ease), background .5s var(--ease);
}
.mailer__copy i { font-size: 1.1rem; }
.mailer__copy:hover { color: var(--ink); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); }
.mailer__copy.is-done { color: var(--mint); background: rgba(150, 214, 207, .1); box-shadow: inset 0 0 0 1px rgba(150, 214, 207, .5); }

/* ---------- Footer ---------- */
.footer { position: relative; padding: 5rem 0 2rem; border-top: 1px solid var(--hair); overflow: hidden; }
.footer__top { display: flex; justify-content: space-between; align-items: center; gap: 2rem; flex-wrap: wrap; }
.footer__nav { display: flex; flex-wrap: wrap; gap: .4rem 1.6rem; }
.footer__nav a { color: var(--muted); font-size: .9rem; transition: color .5s var(--ease); }
.footer__nav a:hover { color: var(--mint); }
.footer__giant {
  margin: 3rem 0 1.5rem; font-size: clamp(2.6rem, 11.4vw, 10.8rem); line-height: .85; font-weight: 800; letter-spacing: -.06em; white-space: nowrap; text-align: center;
  background: linear-gradient(180deg, rgba(150, 214, 207, .3), rgba(150, 214, 207, 0) 85%); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.footer__bottom { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .8rem; color: var(--faint); }
.footer__bottom a { color: var(--muted); border-bottom: 1px solid var(--hair-2); }
.footer__bottom a:hover { color: var(--mint); }

/* ---------- Reveal defaults (JS sets these) ---------- */
html.js [data-reveal], html.js [data-hero-fade] { opacity: 0; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1100px) {
  .nav__links { display: none; }
  .burger { display: block; }
  .nav__pill { width: calc(100vw - 2rem); max-width: 560px; justify-content: space-between; gap: .6rem; }
  .nav__cta { margin-left: auto; }
  .demo__core { grid-template-columns: 1fr; }
  .demo__canvas-wrap { border-right: 0; border-bottom: 1px solid var(--hair); }
  .bento__item--ai { grid-column: span 12; grid-row: span 1; }
  .bento__item--sensors, .bento__item--app { grid-column: span 6; }
  .bento__item--img { grid-column: span 12; min-height: 360px; }
  .bento__item--home { grid-column: span 12; }
}

@media (max-width: 860px) {
  .hero { padding-block: 7rem 9rem; }
  .hero__grid, .how__split, .contact__grid, .section__head--split { grid-template-columns: 1fr; }
  .section__head--split { gap: 1.5rem; }
  .hero__visual { max-width: 460px; width: 100%; margin-inline: auto; }
  .how__sticky { position: sticky; top: 5.5rem; z-index: 2; }
  .how__media { aspect-ratio: 16 / 10; }
  .step { min-height: 46vh; }
  .bento { grid-template-columns: 1fr; gap: 1rem; }
  .bento__item--ai, .bento__item--sensors, .bento__item--app, .bento__item--img, .bento__item--home { grid-column: span 1; grid-row: auto; }
  .home { flex-direction: column !important; align-items: stretch; }
  .orbit { margin-inline: auto; width: 220px; }
  .orbit__ring--1 span { --rad: 72px; }
  .orbit__ring--2 span { --rad: 110px; }
  /* Ambiti: vertical stack */
  .scope__pin { min-height: 0; padding-block: 0; }
  .scope__head { flex-direction: column; align-items: flex-start; margin-bottom: 2.5rem; }
  .scope__progress { display: none; }
  .scope__viewport { overflow: visible; }
  .scope__track { flex-direction: column; width: 100%; padding-inline: var(--pad); transform: none !important; }
  .scope-card, .scope-card--img { width: 100%; aspect-ratio: auto; min-height: 340px; }
  .scope-card--img { min-height: 260px; }
  .scope { padding-bottom: var(--sec); }
}

@media (max-width: 560px) {
  .nav { top: .75rem; }
  .topics { grid-template-columns: 1fr; }
  .mailer__copy span { display: none; }
  .nav__cta span:first-child { display: none; }
  .nav__cta { padding: .3rem; }
  .vital { width: 62%; }
  .vital--breath { width: 46%; }
  .vital--posture { width: 74%; left: -2%; }
  .vital--ecg { left: -2%; }
  .vital .bezel__core { padding: .75rem .85rem; }
  .vital__value b { font-size: 1.5rem; }
  .vital__row .chip { display: none; }
  .hero__actions .btn { width: 100%; justify-content: space-between; }
  .how__sticky { position: relative; top: 0; }
  .step { min-height: 0; padding-block: 2.4rem; }
  .app { grid-template-columns: 100px 1fr; gap: 1.1rem; }
  .demo__legend { font-size: .55rem; letter-spacing: .05em; }
  .demo__canvas { aspect-ratio: 1.6 / 1; }
  .zone { grid-template-columns: 62px 1fr 40px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .ecg__line { stroke-dashoffset: 0; }
  .signal path { stroke-dashoffset: 0; }
}
