:root {
  --black: #F7F8F6;
  --ink: #FFFFFF;
  --graphite: #E7EBE8;
  --line: rgba(13,18,16,.1);
  --line-strong: rgba(13,18,16,.22);
  --gray: #646B67;
  --gray-light: #39413D;
  --white: #0D1210;
  --paper: #0D1210;
  --green-900: #1F5945;
  --green-600: #30885E;
  --green-400: #2F7F57;
  --green-lit: #2A9D5E;
  --green-lit-hi: #86F0AE;
  --green-lit-lo: #1F7A49;
  --ease-out: cubic-bezier(.16,1,.3,1);
  --ease-io: cubic-bezier(.65,0,.35,1);
  --pad: 32px;
  --cut: 36px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--black);
  color: var(--gray-light);
  font-family: "Geist", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 90;
  opacity: .03;
  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='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img { display: block; max-width: 100%; }
/* amorphous cooling backdrop (js/bgfx.js) */
.bgfx { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; opacity: 0; transition: opacity 2.4s var(--ease-out); }
.bgfx.ready { opacity: .07; }
/* static vapor layers: faded at the edges so they read as atmosphere, never as a picture */
.vapor { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
/* light page: the dark vapor stills are inverted (black -> white, vapor -> soft gray) and multiplied in, very faint */
.vapor i { position: absolute; inset: -4%; background: center / cover no-repeat; opacity: calc(var(--o, .3) * .22); filter: invert(1) hue-rotate(180deg); mix-blend-mode: multiply;
  -webkit-mask: radial-gradient(ellipse 70% 80% at var(--at, 70% 50%), #000 20%, transparent 75%); mask: radial-gradient(ellipse 70% 80% at var(--at, 70% 50%), #000 20%, transparent 75%);
  animation: vaporDrift 38s var(--ease-io) infinite alternate; }
@keyframes vaporDrift { to { transform: translate3d(-2%, -3%, 0) scale(1.06); } }
@media (prefers-reduced-motion: reduce) { .vapor i { animation: none; } }
a { color: inherit; text-decoration: none; }
.mono { font-family: "Geist Mono", ui-monospace, monospace; font-variant-numeric: tabular-nums; }
.wrap { max-width: 1440px; margin: 0 auto; padding-left: max(var(--pad), env(safe-area-inset-left, 0px)); padding-right: max(var(--pad), env(safe-area-inset-right, 0px)); }

/* ---------- loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center; align-content: center; gap: 28px;
  background: var(--black);
  transition: opacity .7s var(--ease-out), visibility .7s;
  animation: loaderOut .6s ease 2.2s forwards;
}
@keyframes loaderOut { to { opacity: 0; visibility: hidden; } }
.loader img { width: 56px; opacity: 0; transform: translateY(8px); animation: leafIn .9s var(--ease-out) .1s forwards; }
.loader-bar { width: 120px; height: 1px; background: var(--line); overflow: hidden; }
.loader-bar i { display: block; height: 100%; width: 0; background: var(--green-400); animation: bar 1s var(--ease-io) forwards; }
.loader.done { opacity: 0; visibility: hidden; }
@keyframes leafIn { to { opacity: 1; transform: none; } }
@keyframes bar { to { width: 100%; } }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  height: calc(76px + env(safe-area-inset-top, 0px));
  display: flex; align-items: center; gap: 28px;
  padding-top: env(safe-area-inset-top, 0px);
  padding-left: max(var(--pad), env(safe-area-inset-left, 0px));
  padding-right: max(var(--pad), env(safe-area-inset-right, 0px));
  border-bottom: 1px solid transparent;
  transition: background .4s var(--ease-io), border-color .4s var(--ease-io);
}
.nav.solid { background: rgba(255,255,255,.95); backdrop-filter: blur(12px); border-color: var(--line); }
.nav-logo img { height: 22px; width: auto; }
.nav-links { display: flex; gap: 32px; margin-left: auto; font-size: 15px; }
.nav-links a { color: var(--gray-light); transition: color .2s; }
.nav-links a:hover { color: var(--white); }
.nav-menu { display: none; background: none; border: 1px solid var(--line-strong); color: var(--white); font: 500 14px "Geist", system-ui, sans-serif; padding: 9px 16px; border-radius: 8px; }

/* ---------- buttons ---------- */
/* Solid, flat, confident. Label rolls on hover, arrow chip swaps, one soft light pass. No glow at rest. */
.btn {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; gap: 14px;
  height: 52px; padding: 0 24px;
  border-radius: 8px;
  font-size: 15px; font-weight: 500; letter-spacing: -.01em; line-height: 1;
  white-space: nowrap; cursor: pointer;
  transition: background-color .35s var(--ease-out), border-color .35s var(--ease-out), box-shadow .45s var(--ease-out), transform .35s var(--ease-out), color .3s;
}
.btn:has(.chip-ic) { padding-right: 8px; }
.btn > * { position: relative; z-index: 2; }
.btn svg { width: 18px; height: 18px; fill: currentColor; }
.roll { display: inline-grid; overflow: hidden; height: 1.25em; line-height: 1.25em; }
.roll > span { grid-area: 1 / 1; transition: transform .55s var(--ease-out); }
.roll-b { transform: translateY(110%); }
.btn:hover .roll-a, .btn:focus-visible .roll-a { transform: translateY(-110%); }
.btn:hover .roll-b, .btn:focus-visible .roll-b { transform: none; }
.chip-ic { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 6px; overflow: hidden; transition: background-color .35s var(--ease-out); }
.chip-ic svg { grid-area: 1 / 1; transition: transform .55s var(--ease-out); }
.chip-ic svg + svg { transform: translateX(-160%); }
.btn:hover .chip-ic svg:first-child, .btn:focus-visible .chip-ic svg:first-child { transform: translateX(160%); }
.btn:hover .chip-ic svg + svg, .btn:focus-visible .chip-ic svg + svg { transform: none; }
/* one soft pass of light across the face */
.btn::after {
  content: ""; position: absolute; inset: 0 auto 0 -50%; width: 40%; z-index: 1; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.3) 50%, transparent);
  transform: skewX(-20deg); opacity: 0;
}
.btn:hover::after { animation: sweep .9s var(--ease-out); }
@keyframes sweep { from { opacity: 1; transform: skewX(-20deg) translateX(0); } to { opacity: 1; transform: skewX(-20deg) translateX(420%); } }

.btn-primary { background: var(--green-lit-lo); color: #FFFFFF; font-weight: 600; box-shadow: inset 0 1px 0 rgba(255,255,255,.22); }
.btn-primary .chip-ic { background: rgba(255,255,255,.14); color: #FFFFFF; }
.btn-primary:hover, .btn-primary:focus-visible { background: #1F5945; transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 0 0 5px rgba(48,136,94,.16), 0 16px 30px -14px rgba(13,18,16,.22); }
.btn-primary:active { transform: translateY(0); background: var(--green-lit-lo); }
.btn-ghost { color: var(--white); background: rgba(13,18,16,.04); border: 1px solid rgba(13,18,16,.2); backdrop-filter: blur(10px); }
.btn-ghost .chip-ic { background: rgba(13,18,16,.08); }
.btn-ghost::after { background: linear-gradient(100deg, transparent, rgba(13,18,16,.12) 50%, transparent); }
.btn-ghost:hover, .btn-ghost:focus-visible { border-color: rgba(13,18,16,.55); background: rgba(13,18,16,.09); }
@media (prefers-reduced-motion: reduce) {
  .roll > span, .chip-ic svg { transition: none; }
  .btn:hover::after { animation: none; }
}
.btn-sm { height: 40px; padding: 0 16px; font-size: 14px; border-radius: 7px; }
.btn:focus-visible, .nav-links a:focus-visible, .nav-logo:focus-visible { outline: 2px solid var(--green-400); outline-offset: 3px; }

/* ---------- hero ---------- */
.hero { padding-top: 76px; min-height: 100svh; display: flex; flex-direction: column; }
.hero-top {
  width: 100%;
  display: grid; grid-template-columns: 1.45fr 1fr; gap: 48px; align-items: end;
  padding-top: clamp(28px, 5vh, 72px); padding-bottom: clamp(24px, 3.5vh, 40px);
}
/* section label: plain sentence case in logo green, a short rule before it (no mono caps) */
.eyebrow, .eyebrow.mono { display: flex; align-items: center; gap: 12px; margin: 0 0 22px; font-family: "Geist", system-ui, sans-serif; font-size: 15px; font-weight: 500; letter-spacing: -.005em; text-transform: none; color: var(--green-400); }
.eyebrow::before { content: ""; width: 22px; height: 1px; background: currentColor; flex: none; }
h1 {
  margin: 0;
  font-size: clamp(48px, 5.7vw, 96px);
  font-weight: 600; letter-spacing: -.035em; line-height: .98;
  color: var(--white);
}
h1 .h-g { color: var(--gray); }
h1 span { display: inline-block; }
.lead { margin: 0 0 28px; font-size: clamp(17px, 1.35vw, 20px); line-height: 1.5; color: var(--gray-light); max-width: 34ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }

/* benefits: three glass cards riding over the bottom of the 3D */
.benefits { position: relative; z-index: 5; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: -168px 24px 0; padding: 0; list-style: none; }
.bnf {
  position: relative; display: grid; gap: 6px; align-content: start;
  padding: 22px 24px 24px; border-radius: 14px;
  background: rgba(255,255,255,.86); border: 1px solid rgba(13,18,16,.1);
  backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2);
  transition: transform .5s var(--ease-out), border-color .4s, background-color .4s;
}
.bnf:hover { transform: translateY(-4px); border-color: rgba(48,136,94,.55); background: rgba(255,255,255,.95); }
.bnf b { font-size: clamp(40px, 3.6vw, 60px); font-weight: 600; letter-spacing: -.045em; line-height: 1; color: var(--white); font-variant-numeric: tabular-nums; }
.bnf:first-child b { color: var(--green-lit); }
.bnf span { font-size: 17px; font-weight: 500; color: var(--white); line-height: 1.25; }
.bnf p { margin: 10px 0 0; padding-top: 14px; border-top: 1px solid rgba(13,18,16,.08); font-size: 14px; line-height: 1.5; color: var(--gray-light); }
.bnf-ic { position: absolute; top: 22px; right: 22px; width: 22px; height: 22px; color: var(--green-400); }

/* reveal */
.rv { opacity: 0; transform: translateY(16px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); }
.rv.in { opacity: 1; transform: none; }

/* ---------- stage / 3D frame (plain rounded window, no cut corners) ---------- */
.stage { flex: 1; display: flex; flex-direction: column; width: 100%; padding: 0 calc(var(--pad) - 8px) 24px; max-width: 1520px; margin: 0 auto; }
.frame {
  position: relative;
  flex: 1;
  min-height: 460px;
  max-height: 860px;
  display: flex;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
}
.frame-inner { position: relative; flex: 1; min-width: 0; background: var(--black); overflow: hidden; border-radius: inherit; }
#plant { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.frame-meta { position: absolute; top: 18px; left: 20px; z-index: 3; display: flex; align-items: center; gap: 10px; padding: 7px 14px 7px 12px; border-radius: 999px; background: rgba(255,255,255,.88); border: 1px solid var(--line); backdrop-filter: blur(8px); font-size: 13px; color: var(--gray-light); }
.st-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gray); transition: background .6s; }
.frame-meta b { font-weight: 500; color: var(--gray-light); transition: color .6s; }
.frame-meta:has(b.on) .st-dot { background: var(--green-lit); }
.frame-meta b.on { color: var(--white); }
.legend { display: flex; gap: 14px; margin-left: 8px; padding-left: 14px; border-left: 1px solid var(--line); color: var(--gray); }
.legend span { display: flex; align-items: center; gap: 7px; }
.sw { width: 14px; height: 2px; display: inline-block; }
.sw-gray { background: var(--gray); }
.sw-green { background: var(--green-400); }
.sample { position: absolute; right: 20px; top: 24px; margin: 0; font-size: 12px; color: rgba(13,18,16,.32); z-index: 3; }

/* ---------- HUD tags ---------- */
.hud { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.tag { position: absolute; left: 0; top: 0; will-change: transform; opacity: 0; transition: opacity .8s var(--ease-out); }
.tag.show { opacity: 1; }
.tag .pin { position: absolute; left: -3px; top: -3px; width: 6px; height: 6px; border: 1px solid var(--gray-light); background: var(--black); transition: border-color .6s, background .6s; }
.tag .leader { position: absolute; left: 0; bottom: 3px; width: 1px; height: var(--lh, 46px); background: linear-gradient(to top, rgba(13,18,16,.35), rgba(13,18,16,.1)); }
.tag .box {
  position: absolute; left: -1px; bottom: calc(var(--lh, 46px) + 3px);
  padding: 8px 12px 9px; min-width: 150px; border-radius: 8px;
  border: 1px solid var(--line-strong); border-left: 2px solid var(--gray);
  background: rgba(255,255,255,.9); backdrop-filter: blur(6px);
  font-family: "Geist Mono", monospace; font-variant-numeric: tabular-nums;
  transition: border-color .6s;
}
.tag .k { display: block; font-family: "Geist", system-ui, sans-serif; font-size: 12px; color: var(--gray-light); white-space: nowrap; }
.tag .v { display: flex; align-items: baseline; gap: 8px; margin-top: 3px; font-size: 17px; color: var(--gray-light); white-space: nowrap; transition: color .6s; }
.tag .d { font-size: 11px; color: var(--gray); transition: color .6s; }
.tag.ok .pin { border-color: var(--green-400); background: var(--green-400); }
.tag.ok .box { border-left-color: var(--green-400); }
.tag.ok .v { color: var(--white); }
.tag.ok .d { color: var(--green-400); }

.next { min-height: 60vh; display: grid; place-items: center; border-top: 1px solid var(--line); color: var(--gray); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .benefits { margin-inline: 12px; gap: 12px; }
  .bnf { padding: 18px 18px 20px; }
  .bnf p { font-size: 13px; }
}
@media (max-width: 960px) {
  :root { --pad: 20px; }
  .nav-links, .nav-cta { display: none; }
  .nav { justify-content: space-between; }
  .nav-menu { display: block; margin-left: auto; }
  .hero-top { grid-template-columns: 1fr; gap: 24px; padding-top: 36px; }
  .lead { max-width: none; }
  .hero-cta .btn { flex: 1 1 auto; justify-content: center; }
  .hero { min-height: 0; }
  .frame { flex: none; height: 58svh; min-height: 380px; border-radius: 14px; }
  .benefits { grid-template-columns: 1fr; margin: 12px 0 0; }
  .bnf { grid-template-columns: auto 1fr; column-gap: 14px; align-items: baseline; }
  .bnf b { font-size: 40px; }
  .bnf p { grid-column: 1 / -1; }
  .legend, .sample { display: none; }
  .tag .box { min-width: 0; }
}
@media (max-width: 480px) {
  .nav { height: calc(64px + env(safe-area-inset-top, 0px)); }
  .hero { padding-top: 64px; }
  .nav-logo img { height: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; transform: none; transition: none; }
  .loader { display: none; }
}
/* vapor inside the 3D frame follows the plant state: gray while wasting, green once EYWA runs it */
.frame-inner .vapor i { filter: invert(1) hue-rotate(180deg) grayscale(1); transition: filter 2.5s var(--ease-io); }
.frame-inner:has(.frame-meta b.on) .vapor i { filter: invert(1) hue-rotate(180deg); }
.phead .vapor i { opacity: calc(var(--o, .3) * .68); }

/* ---------- light version: page photo + soft box separation ---------- */
/* one photo per page, fixed behind everything, very faint, dissolving into the white from left and bottom */
.page-bg { position: fixed; inset: 0; z-index: -2; pointer-events: none; overflow: hidden; }
.page-bg i { position: absolute; inset: 0 0 0 28%; background: center / cover no-repeat; opacity: 0; filter: saturate(.8);
  -webkit-mask: linear-gradient(90deg, transparent, #000 45%), linear-gradient(0deg, transparent, #000 50%); -webkit-mask-composite: source-in;
  mask: linear-gradient(90deg, transparent, #000 45%), linear-gradient(0deg, transparent, #000 50%); mask-composite: intersect;
  animation: pageBgIn 2.4s var(--ease-out) .4s forwards; }
@keyframes pageBgIn { to { opacity: .085; } }
@media (max-width: 960px) { .page-bg i { inset: 0; } }
@media (prefers-reduced-motion: reduce) { .page-bg i { animation: none; opacity: .085; } }

:root { --shadow-soft: 0 34px 80px -34px rgba(13,18,16,.16), 0 10px 28px -16px rgba(13,18,16,.07); }
.bnf, .frame, .panel, .insight, .table-scroll, .ind, .calc-out, .dash, .form-wrap, .film-box,
.node, .level, .person, .tblock, .lock { box-shadow: var(--shadow-soft); }
.tag .box, .frame-meta, .film-chip { box-shadow: 0 12px 30px -14px rgba(13,18,16,.18); }
/* story panels float over the 3D model: deeper, wider shadow so they separate from the machines */
.chapter .panel { box-shadow: 0 60px 120px -40px rgba(13,18,16,.30), 0 20px 48px -20px rgba(13,18,16,.14), 0 2px 6px rgba(13,18,16,.04); }
.ind { transition: transform .6s var(--ease-out), border-color .4s, background-color .4s, box-shadow .5s var(--ease-out); }
.ind:hover, .bnf:hover { box-shadow: 0 44px 90px -36px rgba(13,18,16,.22), 0 12px 30px -16px rgba(13,18,16,.08); }
