/* =========================================================
   FROSYX — "polar night" landing
   Dark arctic sky + live aurora (WebGL, js/aurora.js) behind a normal, easy-to-read page.
   Without WebGL the page still works on the CSS gradient.
   ========================================================= */
:root {
  --bg: #060C1D;
  --bg2: #0B1733;
  --ink: #F2F7FF;
  --txt: #C3D0E6;
  --muted: #8B9BB8;
  --line: rgba(170, 205, 255, .14);
  --ice: #3D9BFF;
  --ice-hi: #8FD3FF;
  --aur: #4FF0C0;
  --vio: #9B87FF;
  --bad: #FF6B7D;
  --good: #3FE0A6;
  --glass: rgba(16, 32, 66, .55);
  --glass-hi: rgba(28, 52, 100, .62);
  --r: 26px;
  --display: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; overflow-x: clip; }
body {
  min-height: 100vh;
  background: var(--bg) radial-gradient(1200px 700px at 70% -10%, #17306A 0%, transparent 60%), linear-gradient(180deg, #071029 0%, #060C1D 60%, #050914 100%);
  color: var(--txt);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
code { font-family: var(--mono); font-size: .92em; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--ice-hi); outline-offset: 3px; border-radius: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 100; background: var(--ice); color: #fff; padding: 8px 14px; border-radius: 999px; }
.skip:focus { top: 12px; }

#sky { position: fixed; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; pointer-events: none; }
/* soft darkening behind text so copy stays readable over the 3D scene */
.veil { position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, rgba(6, 12, 29, .78) 0%, rgba(6, 12, 29, .35) 46%, rgba(6, 12, 29, 0) 70%); }
main, .foot, .nav, .menu { position: relative; z-index: 2; }

.wrap { width: min(1180px, 100% - 40px); margin: 0 auto; }

/* ---------- type ---------- */
h1, h2, h3 { font-family: var(--display); color: var(--ink); margin: 0; letter-spacing: -.02em; }
h1 { font-size: clamp(46px, 7.4vw, 96px); line-height: .98; font-weight: 800; }
h2 { font-size: clamp(32px, 4.6vw, 58px); line-height: 1.04; font-weight: 800; }
h3 { font-size: 21px; line-height: 1.2; font-weight: 700; }
.grad { background: linear-gradient(92deg, var(--ice-hi) 0%, var(--aur) 55%, var(--vio) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: clamp(17px, 1.5vw, 20px); color: var(--txt); max-width: 34em; }
.lead b { color: var(--ink); }
.muted { color: var(--muted); }
.muted b { color: var(--ink); }
.eyebrow { margin: 0 0 14px; font: 600 13px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--aur); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 0 20px; border-radius: 999px; border: 1px solid transparent; font-weight: 600; font-size: 15px; cursor: pointer; white-space: nowrap; transition: transform .2s, box-shadow .2s, background .2s; }
.btn svg { width: 16px; height: 16px; }
.btn--primary { background: linear-gradient(180deg, #5AAEFF 0%, #2F86F6 100%); color: #fff; box-shadow: 0 10px 30px rgba(61, 155, 255, .35), inset 0 1px 0 rgba(255, 255, 255, .35); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(61, 155, 255, .5), inset 0 1px 0 rgba(255, 255, 255, .35); }
.btn--ghost { background: rgba(255, 255, 255, .06); border-color: var(--line); color: var(--ink); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.btn--ghost:hover { background: rgba(255, 255, 255, .12); }
.btn--lg { min-height: 56px; padding: 0 28px; font-size: 16px; }
.btn--sm { min-height: 40px; padding: 0 16px; font-size: 14px; }
.icon-btn { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255, 255, 255, .06); color: var(--ink); cursor: pointer; transition: background .2s; }
.icon-btn:hover { background: rgba(255, 255, 255, .14); }
.icon-btn--lg { width: 56px; height: 56px; }

/* ---------- nav ---------- */
.nav { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px max(20px, calc((100% - 1180px) / 2)); transition: background .3s, border-color .3s; border-bottom: 1px solid transparent; }
.nav.is-solid { background: rgba(6, 12, 29, .72); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom-color: var(--line); }
.logo { display: inline-flex; align-items: center; gap: 10px; font: 800 22px/1 var(--display); color: var(--ink); letter-spacing: .02em; }
.logo svg { width: 34px; height: 34px; filter: drop-shadow(0 6px 16px rgba(61, 155, 255, .45)); }
.logo--sm { font-size: 17px; }
.logo--sm svg { width: 24px; height: 24px; }
.nav__links { display: flex; gap: 4px; padding: 5px; border-radius: 999px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); }
.nav__links a { padding: 8px 14px; border-radius: 999px; font-size: 14px; color: var(--txt); transition: background .2s, color .2s; }
.nav__links a:hover, .nav__links a.on { background: rgba(255, 255, 255, .1); color: var(--ink); }
.nav__right { display: flex; align-items: center; gap: 10px; }
.burger { display: none; }
.menu { position: fixed; top: 74px; right: 16px; left: 16px; z-index: 30; display: grid; gap: 4px; padding: 12px; border-radius: 22px; background: rgba(10, 22, 48, .96); border: 1px solid var(--line); box-shadow: 0 30px 60px rgba(0, 0, 0, .5); }
.menu a { padding: 13px 14px; border-radius: 14px; color: var(--ink); font-weight: 500; }
.menu a:hover { background: rgba(255, 255, 255, .06); }
.menu .btn { margin-top: 6px; }

/* ---------- hero ---------- */
.hero { min-height: calc(100vh - 72px); min-height: calc(100svh - 72px); display: flex; flex-direction: column; justify-content: center; padding: 30px 0 40px; }
.hero__grid { position: relative; }
.hero__copy { max-width: 600px; }
.pill { display: inline-flex; align-items: center; gap: 9px; margin: 0 0 22px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, .05); font-size: 14px; color: var(--ink); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 4px rgba(63, 224, 166, .18); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(63, 224, 166, 0); } }
.hero h1 { margin-bottom: 22px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 30px 0 24px; align-items: center; }
.ca { display: inline-flex; align-items: center; gap: 12px; max-width: 100%; padding: 8px 8px 8px 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--glass); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.ca__k { font: 600 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.ca code { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ca.is-soon code { color: var(--ice-hi); }
.ca__copy { border: 0; border-radius: 10px; padding: 7px 12px; background: rgba(255, 255, 255, .1); cursor: pointer; font-size: 13px; font-weight: 600; }
.ca__copy.is-done { background: var(--good); color: #032; }
.drag-hint { position: absolute; right: 9%; top: -6px; margin: 0; font: 500 12px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.drag-hint span { color: var(--ice-hi); font-size: 15px; margin-right: 4px; }
.facts { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; padding: 0; margin-top: 56px; }
.facts li { padding: 18px 20px; border-radius: 20px; border: 1px solid var(--line); background: var(--glass); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); display: flex; gap: 12px; align-items: baseline; }
.facts b { font: 800 30px/1 var(--display); color: var(--ink); }
.facts span { font-size: 14px; color: var(--txt); }

/* ---------- sections ---------- */
.sec { padding: clamp(80px, 12vw, 140px) 0; }
.analogy h2 { max-width: 15em; }
.vs { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 44px 0 30px; }
.vs__card { padding: 30px; border-radius: var(--r); border: 1px solid var(--line); background: var(--glass); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.vs__card h3 { font-size: 28px; margin: 16px 0 14px; }
.vs__card ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.vs__card li { position: relative; padding-left: 30px; }
.vs__card li::before { position: absolute; left: 0; top: 1px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font: 700 12px/1 var(--sans); }
.vs__card--bad li::before { content: "✕"; background: rgba(255, 107, 125, .16); color: var(--bad); }
.vs__card--good { border-color: rgba(63, 224, 166, .35); background: linear-gradient(160deg, rgba(20, 70, 80, .55), rgba(16, 32, 66, .55)); }
.vs__card--good li::before { content: "✓"; background: rgba(63, 224, 166, .18); color: var(--good); }
.tag { display: inline-block; padding: 6px 11px; border-radius: 999px; font: 600 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; background: rgba(255, 255, 255, .08); color: var(--muted); }
.tag--bad { background: rgba(255, 107, 125, .14); color: var(--bad); }
.tag--good { background: rgba(63, 224, 166, .15); color: var(--good); }
.analogy__line { font-size: 19px; max-width: 36em; }
.analogy__line b { color: var(--ink); }

/* ---------- how (pinned) ---------- */
.how { height: 380vh; position: relative; }
.how__sticky { position: sticky; top: 0; height: 100vh; height: 100svh; display: flex; align-items: center; overflow: hidden; }
.how__copy { max-width: 470px; }
.how h2 { margin-bottom: 30px; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.steps li { display: flex; gap: 16px; align-items: flex-start; padding: 16px 18px; border-radius: 20px; border: 1px solid transparent; opacity: .45; transition: opacity .35s, background .35s, border-color .35s, transform .35s; }
.steps li.on { opacity: 1; background: var(--glass-hi); border-color: rgba(143, 211, 255, .3); transform: translateX(6px); }
.steps li.done { opacity: .8; }
.steps__n { flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font: 800 18px/1 var(--display); color: var(--ink); background: rgba(255, 255, 255, .08); transition: background .35s; }
.steps li.on .steps__n { background: linear-gradient(180deg, #5AAEFF, #2F86F6); }
.steps li.done .steps__n { background: rgba(63, 224, 166, .25); color: var(--good); }
.steps h3 { font-size: 20px; margin-bottom: 4px; }
.steps p { margin: 0; font-size: 15px; }
.steps code { color: var(--ice-hi); }
.how__bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 255, 255, .06); }
.how__bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--ice), var(--aur)); }

/* ---------- try (demo) ---------- */
.try__grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 50px; align-items: center; }
.try h2 { margin-bottom: 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.chip { border: 1px solid var(--line); background: rgba(255, 255, 255, .05); padding: 9px 13px; border-radius: 12px; font: 500 13px/1 var(--mono); color: var(--ink); cursor: pointer; transition: background .2s, border-color .2s; }
.chip:hover { background: rgba(255, 255, 255, .12); border-color: rgba(143, 211, 255, .4); }
.demo { border-radius: var(--r); border: 1px solid rgba(143, 211, 255, .22); background: rgba(7, 14, 32, .82); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: 0 40px 80px rgba(0, 0, 0, .45); overflow: hidden; }
.demo__top { display: flex; align-items: center; gap: 7px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.demo__top i { width: 11px; height: 11px; border-radius: 50%; background: rgba(255, 255, 255, .14); }
.demo__top span { margin-left: 8px; font: 500 12px/1 var(--mono); color: var(--muted); }
.demo__form { display: flex; align-items: center; gap: 10px; margin: 18px; padding: 6px 6px 6px 16px; border-radius: 16px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); }
.demo__prompt { color: var(--aur); font: 600 18px/1 var(--mono); }
.demo__form input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink); font: 500 15px/1 var(--mono); padding: 10px 0; outline: none; }
.checks { list-style: none; margin: 0 18px; padding: 0; display: grid; gap: 8px; }
.checks li { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-radius: 14px; background: rgba(255, 255, 255, .03); font-weight: 600; color: var(--muted); transition: background .3s, color .3s; }
.checks em { margin-left: auto; font: 400 13px/1.3 var(--mono); font-style: normal; text-align: right; color: var(--muted); }
.ck { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .2); display: grid; place-items: center; font-size: 12px; }
.checks li.run { color: var(--ink); background: rgba(61, 155, 255, .1); }
.checks li.run .ck { border-color: var(--ice); border-top-color: transparent; animation: spin .7s linear infinite; }
.checks li.ok { color: var(--ink); }
.checks li.ok .ck { border-color: var(--good); background: var(--good); }
.checks li.ok .ck::after { content: "✓"; color: #032; font-weight: 800; }
.checks li.ok em { color: var(--good); }
.checks li.fail { color: var(--ink); background: rgba(255, 107, 125, .1); }
.checks li.fail .ck { border-color: var(--bad); background: var(--bad); }
.checks li.fail .ck::after { content: "✕"; color: #300; font-weight: 800; }
.checks li.fail em { color: var(--bad); }
.checks li.skip { opacity: .35; }
@keyframes spin { to { transform: rotate(360deg); } }
.verdict { margin: 16px 18px 18px; padding: 16px 18px; border-radius: 16px; background: rgba(255, 255, 255, .04); font-size: 15px; }
.verdict b { color: var(--ink); }
.verdict.is-ok { background: rgba(63, 224, 166, .12); color: #CFFBEA; }
.verdict.is-fail { background: rgba(255, 107, 125, .12); color: #FFD9DE; }

/* ---------- safety ---------- */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 44px 0 26px; }
.tile { padding: 26px; border-radius: var(--r); border: 1px solid var(--line); background: var(--glass); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); transition: transform .3s, border-color .3s; }
.tile:hover { transform: translateY(-6px); border-color: rgba(143, 211, 255, .35); }
.tile__i { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: linear-gradient(160deg, rgba(61, 155, 255, .35), rgba(79, 240, 192, .2)); margin-bottom: 18px; }
.tile__i svg { width: 26px; height: 26px; fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tile h3 { margin-bottom: 8px; }
.tile p { margin: 0; font-size: 15px; }
.link { color: var(--ice-hi); font-weight: 600; }
.link:hover { text-decoration: underline; }

/* ---------- roadmap ---------- */
.road { list-style: none; padding: 0; margin: 44px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: r; }
.road li { position: relative; padding: 26px 22px 24px; border-radius: var(--r); border: 1px dashed rgba(170, 205, 255, .22); background: rgba(10, 20, 44, .45); }
.road li.is-live { border-style: solid; border-color: rgba(63, 224, 166, .4); background: linear-gradient(160deg, rgba(20, 70, 80, .5), rgba(16, 32, 66, .5)); }
.road h3 { margin: 14px 0 8px; }
.road p { margin: 0; font-size: 15px; }

/* ---------- faq ---------- */
.faq__wrap { display: grid; grid-template-columns: .7fr 1.3fr; gap: 40px; }
.qa { display: grid; gap: 10px; }
.qa details { border-radius: 20px; border: 1px solid var(--line); background: var(--glass); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.qa summary { cursor: pointer; list-style: none; padding: 20px 56px 20px 22px; font: 700 18px/1.35 var(--display); color: var(--ink); position: relative; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: "+"; position: absolute; right: 22px; top: 50%; transform: translateY(-50%); font: 400 26px/1 var(--sans); color: var(--ice-hi); transition: transform .25s; }
.qa details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.qa p { margin: 0; padding: 0 22px 20px; }

/* ---------- end ---------- */
.end__box { text-align: center; display: flex; flex-direction: column; align-items: center; padding: 70px 24px; border-radius: 36px; border: 1px solid rgba(143, 211, 255, .2); background: radial-gradient(600px 300px at 50% 0%, rgba(61, 155, 255, .22), transparent 70%), rgba(8, 16, 38, .6); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.end__box .lead { margin: 18px auto 0; }
.end__box .hero__cta { justify-content: center; }

.foot { padding: 30px 0 40px; border-top: 1px solid var(--line); }
.foot__row { display: flex; gap: 24px; align-items: center; justify-content: space-between; }
.foot p { margin: 0; font-size: 13px; color: var(--muted); max-width: 640px; text-align: right; }

/* reveal on scroll (landing.js adds .in) */
.js .rv { opacity: 0; transform: translateY(26px); transition: opacity .8s ease, transform .8s ease; }
.js .rv.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 1020px) {
  .tiles, .road { grid-template-columns: 1fr 1fr; }
  .try__grid, .faq__wrap { grid-template-columns: 1fr; gap: 30px; }
}
@media (max-width: 860px) {
  .nav__links { display: none; }
  .burger { display: inline-grid; }
  .veil { background: linear-gradient(180deg, rgba(6, 12, 29, 0) 0%, rgba(6, 12, 29, .55) 30%, rgba(6, 12, 29, .82) 60%); }
  .hero { justify-content: flex-end; padding-top: 34vh; padding-top: 34svh; }
  .drag-hint { top: -30vh; top: -30svh; bottom: auto; right: 50%; transform: translateX(50%); white-space: nowrap; }
  .facts { grid-template-columns: 1fr; margin-top: 36px; }
  .vs { grid-template-columns: 1fr; }
  .how__sticky { align-items: flex-end; padding-bottom: 28px; }
  .how h2 { margin-bottom: 16px; font-size: 30px; }
  .steps li { padding: 10px 12px; }
  .steps li:not(.on) p { display: none; }
  .steps li.on { transform: none; }
  .foot__row { flex-direction: column; align-items: flex-start; }
  .foot p { text-align: left; }
}
@media (max-width: 560px) {
  .wrap { width: calc(100% - 32px); }
  .nav { padding: 12px 16px; }
  .nav__right .btn--sm { display: none; }
  .tiles, .road { grid-template-columns: 1fr; }
  .hero__cta .btn--lg { flex: 1 1 auto; }
  .ca__k { display: none; }
  .ca code { white-space: normal; overflow-wrap: anywhere; font-size: 12.5px; line-height: 1.45; }
  .vs__card, .tile { padding: 22px; }
  .checks em { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .rv { opacity: 1; transform: none; transition: none; }
}
