/* ============================================================
   MITO — clinical-precision instrument aesthetic
   Bioluminescent teal on near-black, frosted glass, apothecary serif
   ============================================================ */

:root {
  --bg:        #05100E;
  --bg-2:      #081A17;
  --panel:     rgba(18, 42, 38, 0.42);
  --panel-2:   rgba(12, 30, 27, 0.66);
  --ink:       #E9F4F0;
  --muted:     #8AA9A2;
  --faint:     #567069;
  --teal:      #45E6C1;
  --teal-2:    #1FBE9C;
  --teal-deep: #0E7C66;
  --amber:     #F3C87E;
  --mint:      #9CF0D6;
  --line:      rgba(114, 214, 190, 0.14);
  --line-2:    rgba(114, 214, 190, 0.28);
  --shadow:    0 30px 80px -30px rgba(0,0,0,.8);
  --r:         18px;
  --serif:  "Fraunces", Georgia, serif;
  --sans:   "Hanken Grotesk", system-ui, sans-serif;
  --mono:   "IBM Plex Mono", ui-monospace, monospace;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---- Atmosphere: mesh glow + grain ---- */
.atmos {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(60% 45% at 78% 8%, rgba(31,190,156,.20), transparent 60%),
    radial-gradient(50% 40% at 8% 30%, rgba(14,124,102,.16), transparent 65%),
    radial-gradient(70% 60% at 50% 120%, rgba(69,230,193,.10), transparent 60%),
    linear-gradient(180deg, var(--bg), var(--bg-2) 60%, var(--bg));
}
.grain {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---- Type ---- */
h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -.01em; line-height: 1.04; }
h1 em, h2 em { font-style: italic; color: var(--teal); }
a { color: inherit; text-decoration: none; }
.hl { color: var(--teal); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--sans); font-weight: 600; font-size: .95rem;
  padding: .8rem 1.3rem; border-radius: 999px; cursor: pointer;
  border: 1px solid transparent; transition: .25s ease; white-space: nowrap;
}
.btn svg { flex: none; }
.btn-solid {
  background: linear-gradient(180deg, var(--teal), var(--teal-2));
  color: #04120E; box-shadow: 0 10px 30px -10px rgba(69,230,193,.5);
}
.btn-solid:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -12px rgba(69,230,193,.65); }
.btn-line { border-color: var(--line-2); color: var(--ink); background: rgba(255,255,255,.02); }
.btn-line:hover { border-color: var(--teal); color: var(--teal); }
.btn-ghost { border-color: var(--line-2); color: var(--ink); }
.btn-ghost:hover { background: var(--teal); color: #04120E; border-color: var(--teal); }
.btn-lg { padding: 1rem 1.7rem; font-size: 1.05rem; }

/* ---- Nav ---- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 1rem clamp(1.1rem, 4vw, 3rem);
  backdrop-filter: blur(18px) saturate(140%);
  background: linear-gradient(180deg, rgba(5,16,14,.85), rgba(5,16,14,.45));
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: .6rem; font-family: var(--mono); font-weight: 600; letter-spacing: .28em; font-size: .95rem; }
.brand-word { padding-left: .05em; }
.brand-mark {
  width: 20px; height: 20px; border-radius: 6px;
  background: radial-gradient(circle at 30% 25%, var(--mint), var(--teal) 45%, var(--teal-deep));
  box-shadow: 0 0 18px rgba(69,230,193,.6), inset 0 0 6px rgba(255,255,255,.4);
  position: relative;
}
.brand-mark::after { content:""; position:absolute; inset: 5px; border-radius: 3px; border: 1.5px solid rgba(4,18,14,.6); }
.nav-links { display: flex; gap: 1.9rem; font-size: .93rem; color: var(--muted); }
.nav-links a { position: relative; transition: color .2s; }
.nav-links a:hover { color: var(--ink); }
.nav-links a::after { content:""; position:absolute; left:0; bottom:-6px; width:0; height:1px; background: var(--teal); transition: width .25s; }
.nav-links a:hover::after { width: 100%; }
.nav-toggle { display: none; background: none; border: 0; flex-direction: column; gap: 5px; cursor: pointer; padding: 6px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--ink); transition: .25s; border-radius: 2px; }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

.mobile-menu {
  position: sticky; top: 62px; z-index: 40; display: flex; flex-direction: column; gap: .3rem;
  padding: 1rem clamp(1.1rem, 4vw, 3rem) 1.4rem;
  background: rgba(5,16,14,.96); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.mobile-menu[hidden] { display: none; }
.mobile-menu a { padding: .7rem 0; color: var(--muted); border-bottom: 1px solid var(--line); }
.mobile-menu a:last-child { border: 0; margin-top: .6rem; justify-content: center; color: #04120E; }

/* ---- Hero ---- */
.hero {
  display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: clamp(2rem, 5vw, 5rem);
  max-width: 1240px; margin: 0 auto; padding: clamp(3rem, 7vw, 6rem) clamp(1.1rem, 4vw, 3rem) clamp(2rem,5vw,4rem);
}
.eyebrow {
  display: inline-block; font-family: var(--mono); font-size: .78rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--teal); padding: .35rem .8rem; border: 1px solid var(--line-2); border-radius: 999px; margin-bottom: 1.6rem;
}
.hero h1 { font-size: clamp(2.9rem, 7vw, 5.2rem); font-weight: 300; }
.lede { margin: 1.5rem 0 2rem; font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--muted); max-width: 34ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; }
.trust { margin-top: 1.7rem; font-family: var(--mono); font-size: .82rem; color: var(--faint); display: flex; align-items: center; gap: .5rem; }
.trust .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 10px var(--teal); animation: pulse 2.4s infinite; }
@keyframes pulse { 0%,100%{opacity:1;} 50%{opacity:.35;} }

/* ---- Hero phone mockup ---- */
.hero-stage { position: relative; display: grid; place-items: center; min-height: 480px; }
.phone {
  position: relative; z-index: 2; width: min(340px, 82%);
  border-radius: 34px; padding: 14px;
  background: linear-gradient(160deg, rgba(120,220,200,.14), rgba(10,26,23,.5));
  border: 1px solid var(--line-2); box-shadow: var(--shadow);
  animation: float 7s ease-in-out infinite;
}
@keyframes float { 0%,100%{ transform: translateY(0) rotate(-1.2deg);} 50%{ transform: translateY(-14px) rotate(-1.2deg);} }
.phone-glass {
  background: var(--panel-2); backdrop-filter: blur(20px); border-radius: 24px; padding: 1.2rem;
  border: 1px solid var(--line);
}
.stack-head { display: flex; align-items: center; gap: .9rem; margin-bottom: 1rem; }
.ring { position: relative; width: 54px; height: 54px; display: grid; place-items: center; }
.ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 5; }
.ring .ring-bg { stroke: rgba(255,255,255,.08); }
.ring .ring-fg { stroke: url(#g); stroke: var(--teal); stroke-linecap: round; stroke-dasharray: 188; stroke-dashoffset: 75; filter: drop-shadow(0 0 4px var(--teal)); }
.ring span { font-family: var(--mono); font-size: .72rem; color: var(--teal); font-weight: 600; }
.stack-title { font-family: var(--serif); font-size: 1.15rem; }
.stack-sub { font-size: .78rem; color: var(--muted); }
.stack-list { list-style: none; display: flex; flex-direction: column; gap: .5rem; }
.stack-list li {
  display: flex; align-items: center; gap: .7rem; padding: .6rem .7rem; border-radius: 12px;
  background: rgba(255,255,255,.03); border: 1px solid var(--line);
}
.stack-list li.done { opacity: .62; }
.stack-list b { font-size: .9rem; font-weight: 600; }
.stack-list small { display: block; font-family: var(--mono); font-size: .68rem; color: var(--muted); }
.stack-list li > div { flex: 1; }
.pill { width: 9px; height: 26px; border-radius: 6px; background: var(--teal-2); flex: none; }
.pill.amber { background: var(--amber); }
.pill.mint { background: var(--mint); }
.check { color: var(--teal); font-weight: 700; }
.take { font-family: var(--sans); font-size: .72rem; font-weight: 700; color: #04120E; background: var(--teal); padding: .28rem .6rem; border-radius: 999px; }
.phone-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 1rem; font-family: var(--mono); font-size: .68rem; color: var(--faint); }
.ghost-chip { color: var(--teal); border: 1px solid var(--line-2); padding: .2rem .5rem; border-radius: 999px; }
.orb { position: absolute; border-radius: 50%; filter: blur(50px); z-index: 1; }
.orb-1 { width: 220px; height: 220px; background: rgba(69,230,193,.28); top: 4%; right: 2%; }
.orb-2 { width: 260px; height: 260px; background: rgba(14,124,102,.35); bottom: 0; left: 4%; }

/* ---- Marquee ---- */
.marquee { border-block: 1px solid var(--line); overflow: hidden; padding: .9rem 0; background: rgba(8,26,23,.4); }
.marquee-track { display: flex; gap: 1.4rem; width: max-content; animation: slide 42s linear infinite; font-family: var(--mono); text-transform: uppercase; letter-spacing: .12em; font-size: .82rem; color: var(--muted); }
.marquee-track i { color: var(--teal); font-style: normal; }
.marquee-track span { transition: color .2s; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes slide { to { transform: translateX(-50%); } }

/* ---- Sections ---- */
.section { max-width: 1180px; margin: 0 auto; padding: clamp(4rem, 9vw, 7rem) clamp(1.1rem, 4vw, 3rem); }
.section-head { max-width: 60ch; margin-bottom: clamp(2.4rem, 5vw, 3.6rem); }
.kicker { font-family: var(--mono); font-size: .78rem; letter-spacing: .18em; text-transform: uppercase; color: var(--teal); }
.section-head h2 { font-size: clamp(2rem, 4.5vw, 3.1rem); margin: .8rem 0 .9rem; font-weight: 300; }
.section-head p { color: var(--muted); font-size: 1.08rem; }

/* ---- Feature grid ---- */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.card {
  padding: 1.7rem; border-radius: var(--r); background: var(--panel);
  border: 1px solid var(--line); backdrop-filter: blur(14px);
  transition: .3s ease; position: relative; overflow: hidden;
}
.card::before {
  content:""; position: absolute; inset: 0; border-radius: var(--r);
  background: radial-gradient(120% 80% at 0% 0%, rgba(69,230,193,.1), transparent 55%);
  opacity: 0; transition: opacity .3s;
}
.card:hover { transform: translateY(-5px); border-color: var(--line-2); }
.card:hover::before { opacity: 1; }
.card-ico { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 12px; background: rgba(69,230,193,.1); border: 1px solid var(--line-2); color: var(--teal); font-size: 1.4rem; margin-bottom: 1.1rem; }
.card h3 { font-size: 1.3rem; margin-bottom: .5rem; }
.card p { color: var(--muted); font-size: .96rem; }

/* ---- Calculator ---- */
.calc-section { max-width: 1100px; }
.calc {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 1.4rem;
  background: var(--panel); border: 1px solid var(--line-2); border-radius: 24px;
  padding: clamp(1.4rem, 3vw, 2.4rem); backdrop-filter: blur(16px); box-shadow: var(--shadow);
}
.calc-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-content: start; }
.field { display: flex; flex-direction: column; gap: .4rem; font-size: .85rem; color: var(--muted); }
.field:first-child { grid-column: 1 / -1; }
.field span small { color: var(--faint); font-family: var(--mono); font-size: .72rem; }
.field input, .field select {
  font-family: var(--mono); font-size: 1.1rem; color: var(--ink);
  background: rgba(4,16,13,.6); border: 1px solid var(--line-2); border-radius: 12px;
  padding: .75rem .9rem; transition: .2s; width: 100%;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(69,230,193,.15); }
.field select { cursor: pointer; }
.calc-out { display: flex; flex-direction: column; gap: .8rem; background: rgba(4,16,13,.5); border: 1px solid var(--line); border-radius: 16px; padding: 1.3rem; }
.readout { display: grid; grid-template-columns: 1fr auto auto; align-items: baseline; gap: .5rem; padding-bottom: .8rem; border-bottom: 1px solid var(--line); }
.readout:nth-child(3) { border-bottom: 0; }
.ro-label { font-size: .82rem; color: var(--muted); }
.ro-val { font-family: var(--mono); font-size: 1.75rem; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.ro-unit { font-family: var(--mono); font-size: .78rem; color: var(--faint); }
.readout.accent .ro-val { color: var(--teal); text-shadow: 0 0 22px rgba(69,230,193,.4); }
.calc-note { font-family: var(--mono); font-size: .82rem; min-height: 1.2rem; }
.calc-note.warn { color: var(--amber); }
.calc-note.ok { color: var(--teal); }
.calc-disclaim { text-align: center; color: var(--faint); font-size: .86rem; max-width: 60ch; margin: 1.4rem auto 0; }
.calc-disclaim b { color: var(--muted); }

/* ---- Privacy ---- */
.privacy { max-width: 1180px; }
.privacy-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.6rem, 4vw, 3.4rem); align-items: center; }
.privacy-copy h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); margin: .8rem 0 1.1rem; font-weight: 300; }
.privacy-copy > p { color: var(--muted); }
.ticks { list-style: none; margin-top: 1.5rem; display: flex; flex-direction: column; gap: .8rem; }
.ticks li { position: relative; padding-left: 1.9rem; color: var(--ink); font-size: .98rem; }
.ticks li::before { content:"✓"; position: absolute; left: 0; top: 0; color: var(--teal); font-weight: 700; width: 22px; height: 22px; display: grid; place-items: center; border: 1px solid var(--line-2); border-radius: 6px; font-size: .8rem; }
.privacy-panel { background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); }
.term { display: flex; align-items: center; gap: .5rem; padding: .8rem 1rem; border-bottom: 1px solid var(--line); background: rgba(4,16,13,.5); }
.term-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--faint); }
.term-dot.amber { background: var(--amber); }
.term-dot.mint { background: var(--mint); }
.term em { font-family: var(--mono); font-style: normal; font-size: .78rem; color: var(--muted); margin-left: .5rem; }
.term-body { font-family: var(--mono); font-size: .82rem; line-height: 1.9; padding: 1.2rem 1.3rem; color: var(--ink); overflow-x: auto; }
.c-mut { color: var(--faint); }
.c-teal { color: var(--teal); }
.c-amber { color: var(--amber); }

/* ---- Library ---- */
.lib { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem; }
.lib-item {
  padding: 1.1rem 1.2rem; border-radius: 14px; background: var(--panel);
  border: 1px solid var(--line); transition: .25s; backdrop-filter: blur(10px);
}
.lib-item:hover { border-color: var(--teal); transform: translateY(-3px); background: rgba(69,230,193,.06); }
.lib-item b { display: block; font-size: 1.02rem; margin-bottom: .2rem; }
.lib-item span { font-family: var(--mono); font-size: .74rem; color: var(--muted); }
.lib-item.custom { border-style: dashed; border-color: var(--line-2); }
.lib-item.custom b { color: var(--teal); }

/* ---- CTA ---- */
.cta { padding: clamp(4rem, 9vw, 7rem) clamp(1.1rem, 4vw, 3rem); }
.cta-inner {
  max-width: 900px; margin: 0 auto; text-align: center; padding: clamp(2.6rem, 6vw, 4.5rem) 2rem;
  border-radius: 28px; position: relative; overflow: hidden;
  background: linear-gradient(160deg, rgba(31,190,156,.16), rgba(8,26,23,.7));
  border: 1px solid var(--line-2); box-shadow: var(--shadow);
}
.cta-inner::after {
  content:""; position: absolute; width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(69,230,193,.32), transparent 60%);
  top: -180px; left: 50%; transform: translateX(-50%); filter: blur(40px);
}
.cta-inner > * { position: relative; }
.cta-inner h2 { font-size: clamp(1.9rem, 4.5vw, 3.1rem); font-weight: 300; }
.cta-inner p { color: var(--muted); margin: 1rem 0 2rem; font-family: var(--mono); font-size: .9rem; }
.cta-fine { display: block; margin-top: 1.2rem; font-family: var(--mono); font-size: .78rem; color: var(--faint); }

/* ---- Footer ---- */
.footer { border-top: 1px solid var(--line); padding: clamp(2.5rem, 5vw, 4rem) clamp(1.1rem, 4vw, 3rem); max-width: 1180px; margin: 0 auto; }
.foot-top { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 1.8rem; }
.foot-links { display: flex; gap: 1.6rem; font-size: .9rem; color: var(--muted); }
.foot-links a:hover { color: var(--teal); }
.foot-disclaim { color: var(--faint); font-size: .82rem; max-width: 80ch; line-height: 1.7; padding-bottom: 1.8rem; border-bottom: 1px solid var(--line); }
.foot-bottom { display: flex; justify-content: space-between; padding-top: 1.4rem; font-family: var(--mono); font-size: .78rem; color: var(--faint); }

/* ---- Reveal animation ---- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: flex; }
  .hero { grid-template-columns: 1fr; text-align: center; }
  .hero .lede { margin-inline: auto; }
  .hero-actions, .trust { justify-content: center; }
  .hero-stage { min-height: 420px; margin-top: 1rem; }
  .grid { grid-template-columns: 1fr 1fr; }
  .calc { grid-template-columns: 1fr; }
  .privacy-grid { grid-template-columns: 1fr; }
  .lib { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr; }
  .calc-inputs { grid-template-columns: 1fr; }
  .field:first-child { grid-column: auto; }
  .hero h1 { font-size: clamp(2.6rem, 12vw, 3.4rem); }
  .foot-bottom { flex-direction: column; gap: .5rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
