:root {
  --ink: #102b26;
  --mint: #45d7aa;
  --soft: #c9f8e9;
  --bg: #f4f7f5;
  --card: #ffffff;
  --text: #17302b;
  --muted: #566b66;
  --line: #dce5e1;
  --danger: #b3261e;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
a { color: var(--ink); }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
header.top { background: var(--ink); }
header.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; padding-bottom: 14px; flex-wrap: wrap; }
.brand { color: #fff; font-weight: 800; font-size: 20px; text-decoration: none; letter-spacing: 0.2px; }
.brand span { color: var(--mint); }
nav a { color: var(--soft); text-decoration: none; margin-left: 18px; font-weight: 600; font-size: 15px; }
nav a:first-child { margin-left: 0; }
nav a:hover { color: #fff; }
.hero { background: var(--ink); color: #fff; padding: 56px 0 64px; }
.hero h1 { font-size: clamp(30px, 5.2vw, 50px); line-height: 1.12; margin: 0 0 16px; max-width: 18ch; }
.hero p { color: var(--soft); font-size: 19px; max-width: 56ch; margin: 0 0 26px; }
.btn { display: inline-block; background: var(--mint); color: var(--ink); font-weight: 800; text-decoration: none; padding: 14px 22px; border-radius: 12px; border: 0; font-size: 17px; cursor: pointer; }
.btn.ghost { background: transparent; color: #fff; border: 2px solid rgba(255, 255, 255, 0.35); margin-left: 10px; }
.btn.dark { background: var(--ink); color: #fff; }
section { padding: 52px 0; }
h2 { font-size: clamp(24px, 3.4vw, 32px); line-height: 1.2; margin: 0 0 10px; color: var(--ink); }
h3 { font-size: 19px; margin: 0 0 6px; color: var(--ink); }
.lead { color: var(--muted); max-width: 62ch; margin: 0 0 28px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 22px; }
.card p { margin: 0; color: var(--muted); }
.step { display: flex; gap: 14px; align-items: flex-start; }
.num { flex: 0 0 38px; height: 38px; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.band { background: var(--soft); }
.safety li { margin-bottom: 8px; }
.plans { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); align-items: start; }
.plan { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 24px; }
.plan.featured { border: 2px solid var(--mint); }
.price { font-size: 40px; font-weight: 800; color: var(--ink); line-height: 1; margin: 10px 0 2px; }
.price small { font-size: 16px; font-weight: 600; color: var(--muted); }
.sub { color: var(--muted); font-size: 15px; margin: 0 0 16px; min-height: 24px; }
.plan ul { list-style: none; padding: 0; margin: 0 0 20px; }
.plan li { padding: 7px 0 7px 26px; border-top: 1px solid var(--line); position: relative; font-size: 16px; }
.plan li::before { content: ""; position: absolute; left: 4px; top: 15px; width: 10px; height: 10px; border-radius: 50%; background: var(--mint); }
.plan li.no { color: var(--muted); }
.plan li.no::before { background: var(--line); }
.note { font-size: 15px; color: var(--muted); }
.doc { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 28px; max-width: 800px; }
.doc h2 { font-size: 22px; margin-top: 30px; }
.doc h2:first-of-type { margin-top: 8px; }
form { display: grid; gap: 14px; max-width: 560px; }
label { font-weight: 700; font-size: 15px; display: grid; gap: 6px; }
input, textarea, select { font: inherit; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--text); width: 100%; }
textarea { min-height: 130px; resize: vertical; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.msg { padding: 12px 14px; border-radius: 12px; font-weight: 600; display: none; }
.msg.ok { background: var(--soft); color: var(--ink); display: block; }
.msg.err { background: #fbe9e7; color: var(--danger); display: block; }
footer { background: var(--ink); color: var(--soft); padding: 28px 0; font-size: 15px; }
footer .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
footer a { color: var(--soft); margin-right: 16px; }
@media (max-width: 520px) {
  .btn.ghost { margin: 10px 0 0; }
  nav a { margin-left: 12px; font-size: 14px; }
}

/* ---- 3D story on the home page -------------------------------------------- */
.story { position: relative; background: var(--ink); color: #fff; }
.story canvas { position: sticky; top: 0; width: 100%; height: 100vh; height: 100svh; display: block; }
.caps { position: relative; margin-top: -100vh; margin-top: -100svh; pointer-events: none; }
.cap { min-height: 100vh; min-height: 100svh; display: flex; align-items: center; }
.capbox { max-width: 470px; pointer-events: auto; opacity: 0; transform: translateY(36px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1); }
.cap.in .capbox { opacity: 1; transform: none; }
.cap:nth-child(4) .capbox { margin-left: auto; }
.capbox h1 { font-size: clamp(32px, 5vw, 54px); line-height: 1.08; margin: 0 0 16px; }
.capbox h2 { color: #fff; font-size: clamp(28px, 4vw, 42px); }
.capbox p { color: var(--soft); font-size: 19px; margin: 0 0 24px; }
.kicker { color: var(--mint); font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; font-size: 14px; margin-bottom: 8px; }
.scrollhint { margin-top: 30px; color: var(--soft); font-size: 14px; font-weight: 600; opacity: 0.8; animation: bob 2s ease-in-out infinite; }
.scrollhint::before { content: "↓  "; }
@keyframes bob { 50% { transform: translateY(6px); } }
/* Without WebGL the story is a plain stack of panels. */
.no-gl .story canvas { display: none; }
.no-gl .caps { margin-top: 0; }
.no-gl .cap { min-height: 0; padding: 44px 0; }
.no-gl .capbox, .no-gl .cap:nth-child(4) .capbox { opacity: 1; transform: none; margin-left: 0; max-width: 62ch; }
.no-gl .scrollhint { display: none; }
@media (max-width: 760px), (max-aspect-ratio: 5/4) {
  .cap { align-items: flex-end; padding-bottom: 7vh; }
  .capbox, .cap:nth-child(4) .capbox { max-width: none; margin: 0; background: linear-gradient(180deg, rgba(16, 43, 38, 0) 0, rgba(16, 43, 38, 0.92) 26%); padding: 60px 4px 4px; }
  .capbox p { font-size: 17px; }
}
/* ---- scroll reveals and tilt ------------------------------------------------ */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.25s ease; }
.reveal.in { opacity: 1; transform: none; }
.grid .reveal:nth-child(2) { transition-delay: 0.08s; }
.grid .reveal:nth-child(3) { transition-delay: 0.16s; }
.grid .reveal:nth-child(4) { transition-delay: 0.08s; }
.grid .reveal:nth-child(5) { transition-delay: 0.16s; }
.grid .reveal:nth-child(6) { transition-delay: 0.24s; }
.tilt { will-change: transform; }
.tilt:hover { box-shadow: 0 18px 40px rgba(16, 43, 38, 0.16); }
header.top { position: sticky; top: 0; z-index: 20; }
body { animation: pagein 0.5s ease both; }
@keyframes pagein { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .reveal, .capbox { opacity: 1; transform: none; transition: none; }
  body, .scrollhint { animation: none; }
}

.story .wrap { max-width: 1320px; padding: 0 28px; }
@media (max-width: 760px) { .story .wrap { padding: 0 16px; } }
.cap > .wrap { width: 100%; }

/* ---- instruction viewer (/i/<token>) -------------------------------------- */
.vhead { background: var(--ink); color: #fff; padding: 22px 0 20px; }
.vcompany { color: var(--mint); font-weight: 800; font-size: 14px; letter-spacing: 0.6px; text-transform: uppercase; }
.vhead h1 { margin: 4px 0 10px; font-size: clamp(24px, 5vw, 36px); line-height: 1.15; }
.vmeta { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--soft); font-size: 15px; }
.vlang { margin-top: 16px; display: inline-flex; background: rgba(255, 255, 255, 0.12); border-radius: 12px; padding: 4px; }
.vlang button { font: inherit; font-weight: 700; color: #fff; background: transparent; border: 0; padding: 10px 18px; border-radius: 9px; cursor: pointer; min-height: 44px; }
.vlang button.on { background: var(--mint); color: var(--ink); }
.vbody { padding-top: 18px; padding-bottom: 40px; max-width: 820px; }
.vcurrent { font-size: 14px; color: var(--muted); margin: 0 0 14px; }
.vcard { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 20px; margin-bottom: 14px; }
.vcard h2, .vwarn h2 { font-size: 13px; letter-spacing: 0.7px; text-transform: uppercase; color: var(--muted); margin: 16px 0 4px; }
.vcard h2:first-child, .vwarn h2:first-child { margin-top: 0; }
.vcard p { margin: 0 0 6px; }
.vcard ul, .vwarn ul { margin: 0; padding-left: 20px; }
.vwarn { background: #fbe9e7; border-radius: 16px; padding: 18px 20px; margin-bottom: 14px; }
.vwarn h2 { color: var(--danger); }
.vsteps { font-size: 22px; margin: 22px 0 12px; }
.vstephead { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.vstephead h3 { font-size: 20px; line-height: 1.25; margin: 0; }
.vstep img { width: 100%; border-radius: 12px; margin: 4px 0 12px; display: block; background: #e7ecea; }
.vstep p { font-size: 18px; }
.vtags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.vtag { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.4px; padding: 4px 10px; border-radius: 999px; }
.vtag.danger { background: #fbe9e7; color: var(--danger); }
.vtag.ok { background: var(--soft); color: var(--ink); }
.vkey { background: #f1fcf8; border-radius: 12px; padding: 12px 14px; margin: 10px 0; }
.vkey b { font-size: 13px; letter-spacing: 0.6px; text-transform: uppercase; color: var(--muted); }
.vtip { background: #fdf3dc; border-radius: 12px; padding: 12px 14px; }
.muted { color: var(--muted); }
.vfoot { font-size: 14px; margin-top: 20px; }
.vmark { text-align: center; margin-top: 18px; }
.vmark a { display: inline-block; background: var(--soft); color: var(--ink); font-weight: 800; text-decoration: none; padding: 10px 18px; border-radius: 10px; }
@media print { header.top, footer, .vlang, .vcurrent { display: none; } .vhead { background: #fff; color: #000; } .vmeta { color: #333; } }
/* The viewer is for people doing the job: no marketing navigation. */
body:has(#viewer) header.top nav { display: none; }
