/* SpiEx v5 base for the five landing options: type, colour, browser surfaces and the parts every option shares
   (nav, buttons, form, pricing, questions, footer). Each option styles its own page on top. */
@font-face { font-family: 'Syne'; src: url('fonts/Syne-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('fonts/inter-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('fonts/inter-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('fonts/inter-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-display: swap; }

:root {
  --ink: #050605;
  --surface: #10130d;
  --surface-2: #171c13;
  --line: #2c3125;
  --line-bright: #3f4735;
  --paper: #f5f6f0;
  --lime: #d6ff63;
  --muted: #a8b29b;
  --olive: #506a0a;
  --on-lime: #11140f;
  --alert: #ff7b6b;

  --display: 'Syne', 'Inter', system-ui, sans-serif;
  --sans: 'Inter', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --gutter: 56px;
  --max: 1328px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  /* surface roles, dark by default */
  --bg: var(--ink);
  --bg-raised: var(--surface);
  --bg-sunk: #0a0c08;
  --fg: var(--paper);
  --fg-soft: var(--muted);
  --rule: var(--line);
  --rule-strong: var(--line-bright);
  --accent: var(--lime);
  --accent-ink: var(--on-lime);
  --link: var(--lime);
  --focus: var(--lime);
  color-scheme: dark;
}
:root[data-tone='light'] {
  --bg: var(--paper);
  --bg-raised: #ffffff;
  --bg-sunk: #e9ebe2;
  --fg: #11140f;
  --fg-soft: #4d5444;
  --rule: #d5d9cb;
  --rule-strong: #b7bdab;
  --link: var(--olive);
  --focus: var(--olive);
  color-scheme: light;
}
@media (max-width: 1180px) { :root { --gutter: 32px; } }
@media (max-width: 820px) { :root { --gutter: 20px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 17px/1.55 var(--sans);
  caret-color: var(--accent);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, video, canvas, svg { display: block; max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; margin: 0; text-wrap: balance; letter-spacing: -0.02em; }
p { margin: 0; text-wrap: pretty; }
::selection { background: var(--lime); color: var(--on-lime); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
html { scrollbar-width: thin; scrollbar-color: var(--rule-strong) var(--bg); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--rule-strong); border-radius: 10px; border: 2px solid var(--bg); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--lime); color: var(--on-lime); padding: 10px 16px; border-radius: 999px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }
.wrap { width: min(100% - var(--gutter) * 2, var(--max)); margin-inline: auto; }
.num { font-variant-numeric: tabular-nums; }
.ico { width: 20px; height: 20px; flex: none; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: 15px; letter-spacing: 0.005em; text-decoration: none; white-space: nowrap;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease), transform 0.2s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-lime { background: var(--lime); color: var(--on-lime); }
.btn-lime:hover { background: #e3ff8f; }
.btn-ghost { border-color: var(--rule-strong); color: var(--fg); background: transparent; }
.btn-ghost:hover { border-color: var(--fg-soft); }
.btn-ink { background: var(--on-lime); color: var(--paper); }
.btn-ink:hover { background: #2a3122; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }

/* chips: product kinds */
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; list-style: none; }
.chip {
  min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--rule-strong);
  background: transparent; font-weight: 500; font-size: 14px; color: var(--fg-soft);
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.chip:hover { color: var(--fg); border-color: var(--fg-soft); }
.chip[aria-pressed='true'] { background: var(--fg); color: var(--bg); border-color: var(--fg); }

/* nav */
.nav { position: absolute; inset: 0 0 auto; z-index: 20; }
.nav-in { display: flex; align-items: center; gap: 32px; height: 80px; }
.logo { display: block; width: 132px; flex: none; }
.logo img { width: 100%; height: auto; }
.nav-links { display: flex; gap: 28px; margin: 0 0 0 auto; padding: 0; list-style: none; font-size: 15px; font-weight: 500; }
.nav-links a { text-decoration: none; color: var(--fg-soft); transition: color 0.2s; }
.nav-links a:hover { color: var(--fg); }
.nav .btn { min-height: 42px; padding: 0 18px; }
.menu-btn { display: none; margin-left: auto; width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--rule-strong); background: transparent; align-items: center; justify-content: center; }
@media (max-width: 820px) {
  .nav-in { height: 68px; gap: 12px; }
  .logo { width: 112px; }
  .menu-btn { display: inline-flex; }
  .nav .btn-cta { display: none; }
  .nav-links {
    position: absolute; top: 68px; left: var(--gutter); right: var(--gutter); flex-direction: column; gap: 0;
    background: var(--bg-raised); border: 1px solid var(--rule); border-radius: 18px; padding: 8px;
    opacity: 0; visibility: hidden; translate: 0 -8px; transition: opacity 0.2s, translate 0.25s var(--ease), visibility 0.2s;
    box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.45);
  }
  .nav-links a { display: block; padding: 14px 14px; color: var(--fg); font-size: 17px; }
  .nav.open .nav-links { opacity: 1; visibility: visible; translate: 0 0; }
}

/* join form */
.join { display: grid; gap: 10px; }
.join-row { display: flex; gap: 8px; }
.field {
  flex: 1; min-width: 0; min-height: 52px; padding: 0 20px; border-radius: 999px;
  border: 1px solid var(--rule-strong); background: var(--bg-sunk); color: var(--fg); font-size: 16px;
  transition: border-color 0.2s;
}
.field::placeholder { color: var(--fg-soft); opacity: 1; }
.field:hover { border-color: var(--fg-soft); }
.field:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-color: transparent; }
.field[aria-invalid='true'] { border-color: var(--alert); }
.join .btn { min-height: 52px; }
.join-msg { min-height: 1.4em; font-size: 14px; color: var(--fg-soft); }
.join-msg.err { color: var(--alert); }
:root[data-tone='light'] .join-msg.err { color: #b3261e; }
.join-msg.ok { color: var(--fg); }
@media (max-width: 480px) { .join-row { flex-direction: column; } .join .btn { width: 100%; } }

/* pricing */
.billing { display: inline-flex; padding: 4px; border-radius: 999px; border: 1px solid var(--rule); background: var(--bg-sunk); }
.billing button { min-height: 40px; padding: 0 16px; border-radius: 999px; border: 0; background: transparent; color: var(--fg-soft); font-weight: 500; font-size: 14px; }
.billing button[aria-pressed='true'] { background: var(--fg); color: var(--bg); }
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--rule); }
.plan { padding: 32px 28px 36px; display: flex; flex-direction: column; gap: 18px; border-right: 1px solid var(--rule); }
.plan:last-child { border-right: 0; }
.plan h3 { font-size: 26px; }
.plan .for { color: var(--fg-soft); font-size: 15px; }
.price { display: flex; align-items: baseline; gap: 8px; }
.price b { font-family: var(--display); font-size: 48px; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.price span { color: var(--fg-soft); font-size: 15px; }
.plan ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: 15px; }
.plan li { display: flex; gap: 10px; align-items: flex-start; }
.plan li svg { width: 18px; height: 18px; margin-top: 3px; color: var(--accent); flex: none; }
:root[data-tone='light'] .plan li svg { color: var(--olive); }
.plan .btn { margin-top: auto; align-self: flex-start; }
.plan.featured { background: var(--bg-raised); }
.plan.featured .btn { background: var(--lime); color: var(--on-lime); border-color: transparent; }
.plan-note { color: var(--fg-soft); font-size: 14px; }
[data-period='yearly'] .m, [data-period='monthly'] .y { display: none; }
@media (max-width: 960px) {
  .plans { grid-template-columns: 1fr; }
  .plan { border-right: 0; border-bottom: 1px solid var(--rule); padding: 28px 4px; }
}

/* questions */
.faq { border-top: 1px solid var(--rule); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 22px 0; font-weight: 600; font-size: 18px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { width: 20px; height: 20px; flex: none; transition: rotate 0.3s var(--ease); color: var(--fg-soft); }
.faq details[open] summary svg { rotate: 45deg; }
.faq details p { padding: 0 0 24px; max-width: 64ch; color: var(--fg-soft); }

/* code */
.code {
  margin: 0; padding: 22px 24px; overflow: auto; border-radius: 16px; background: #0b0d09; border: 1px solid var(--line);
  color: #d9dfcf; font: 400 13px/1.7 var(--mono); tab-size: 2;
}
.code .k { color: var(--lime); }
.code .s { color: #c9d7a8; }
.code .c { color: #7d8772; }
.code .pass { color: var(--lime); }

/* demo clip */
.clip { position: relative; overflow: hidden; background: #0b0d09; }
.clip video, .clip img { width: 100%; height: 100%; object-fit: cover; }
.clip .play {
  position: absolute; right: 12px; bottom: 12px; width: 40px; height: 40px; border-radius: 999px; border: 0;
  display: grid; place-items: center; background: rgba(5, 6, 5, 0.72); color: var(--paper);
}
.clip .play svg { width: 18px; height: 18px; }

/* footer */
.foot { border-top: 1px solid var(--rule); padding: 40px 0 56px; color: var(--fg-soft); font-size: 14px; }
.foot-in { display: flex; justify-content: space-between; gap: 24px; align-items: center; flex-wrap: wrap; }
.foot .logo { width: 104px; }

/* the hand-turn hint */
.hint { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--fg-soft); transition: opacity 0.4s var(--ease); }
.hint svg { width: 16px; height: 16px; }
.hint.gone { opacity: 0; }
.turn-zone { cursor: grab; touch-action: pan-y; }
.turn-zone.is-turning { cursor: grabbing; }
