/* CKS v3 — black void, one cobalt action, saffron sparks, and the loom behind it all. */
:root {
  --void: #000;
  --bone: #fff;
  --ash: #9a9a9a;
  --mist: #bdbdbd;
  --saffron: #f2a93b;
  --coral: #ef5b3f;
  --teal: #139e8a;
  --cobalt: #2f5bea;
  --cobalt-hi: #4f7bff;
  --font: "Inter Tight", "Inter Tight Fallback", Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --max: 1280px;
  --gutter: clamp(16px, 4vw, 48px);
  --radius: 24px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --fg-rgb: 255, 255, 255;
  --bg-rgb: 0, 0, 0;
  --soft: #e2e2e2;
  --code-s: #7fd6c7;
  color-scheme: dark;
}
/* Light: CKS paper and night. Saffron darkens so small labels keep their contrast on paper. */
:root[data-theme="light"] {
  --void: #f7f5f0;
  --bone: #0b1b2b;
  --ash: #5f6a75;
  --mist: #3b4856;
  --saffron: #9a5b00;
  --cobalt-hi: #2449c8;
  --fg-rgb: 11, 27, 43;
  --bg-rgb: 247, 245, 240;
  --soft: #1f2e3d;
  --code-s: #0b7a6b;
  color-scheme: light;
}
html { transition: background-color .4s var(--ease); }
body { transition: background-color .4s var(--ease), color .4s var(--ease); }

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--void); -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }
body {
  margin: 0;
  background: var(--void);
  color: var(--bone);
  font: 200 18px/1.5 var(--font);
  font-feature-settings: "ss01" on;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
img, svg { display: block; }
:focus-visible { outline: 2px solid var(--saffron); outline-offset: 4px; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 16px; top: -60px; z-index: 50; background: var(--bone); color: var(--void); padding: 10px 16px; border-radius: 24px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 16px; }

canvas.loom { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; display: block; }
.site { position: relative; z-index: 1; }

/* ---------- type ---------- */
.eyebrow {
  margin: 0 0 24px;
  font-size: 14px; font-weight: 600; line-height: 1.2;
  letter-spacing: .025em; text-transform: uppercase;
  color: var(--saffron);
}
.display, .h2, .h3, .h4 { font-weight: 400; margin: 0; color: var(--bone); text-wrap: balance; }
.display { font-size: clamp(46px, min(7.2vw, 10.5vh), 104px); line-height: .98; letter-spacing: -.04em; }
.h2 { font-size: clamp(40px, 5.4vw, 78px); line-height: 1; letter-spacing: -.04em; }
.h3 { font-size: clamp(30px, 3.2vw, 42px); line-height: 1.1; letter-spacing: -.04em; }
.h4 { font-size: clamp(22px, 2vw, 27px); line-height: 1.15; letter-spacing: -.02em; }
.lede { margin: 30px 0 0; max-width: 520px; font-size: 18px; font-weight: 200; line-height: 1.5; color: var(--bone); }
.lede + .lede { margin-top: 18px; }
.muted { color: var(--mist); }
.ash { color: var(--ash); }
.spark { color: var(--saffron); }
.caption { font-size: 12px; line-height: 1.5; color: var(--ash); font-weight: 400; }
.label { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ash); }
strong { font-weight: 400; }

/* ---------- actions ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  height: 45px; padding: 0 20px;
  border: 0; border-radius: var(--radius);
  background: var(--cobalt); color: #fff;
  font: 600 14px/1 var(--font); letter-spacing: .025em; text-transform: uppercase;
  text-decoration: none; cursor: pointer;
  transition: background-color .25s var(--ease), transform .25s var(--ease);
}
.btn:hover { background: #4f7bff; }
:root[data-theme="light"] .btn:hover { background: #2449c8; }
.btn:active { transform: translateY(1px); }
.btn svg, .ghost svg { width: 14px; height: 14px; flex: none; }
.ghost {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 0; background: none; border: 0; cursor: pointer;
  color: var(--bone); font: 600 14px/1 var(--font); letter-spacing: .025em; text-transform: uppercase;
  text-decoration: underline; text-decoration-color: rgba(var(--fg-rgb),.3); text-underline-offset: 6px;
  transition: text-decoration-color .25s, color .25s;
}
.ghost:hover { text-decoration-color: var(--saffron); }
.ghost--ash { color: var(--ash); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; margin-top: 42px; }
.inline { color: var(--saffron); text-decoration: underline; text-decoration-color: rgba(242,169,59,.4); text-underline-offset: 4px; }
.inline:hover { text-decoration-color: var(--saffron); }

/* ---------- nav ---------- */
.nav { position: fixed; inset: 0 0 auto; z-index: 30; }
.nav::before {
  content: ""; position: absolute; inset: 0 0 -36px; z-index: -1; pointer-events: none;
  background: linear-gradient(var(--void) 45%, rgba(var(--bg-rgb),0));
}
.nav__in { max-width: var(--max); margin: 0 auto; padding: 20px var(--gutter); display: flex; align-items: center; gap: 36px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--bone); }
.brand svg { width: 28px; height: 28px; }
.brand__word { font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.brand__desc { font-size: 12px; font-weight: 400; color: var(--ash); letter-spacing: .02em; }
.nav__links { display: flex; gap: 30px; margin-left: auto; }
.nav__links a {
  font-size: 14px; font-weight: 600; letter-spacing: .025em; text-transform: uppercase;
  color: var(--ash); text-decoration: none; transition: color .2s;
}
.nav__links a:hover, .nav__links a[aria-current="page"] { color: var(--bone); }
.nav__menu { display: none; margin-left: auto; background: none; border: 0; color: var(--bone); padding: 10px 0; font: 600 14px/1 var(--font); letter-spacing: .025em; text-transform: uppercase; cursor: pointer; }
.sheet {
  position: fixed; inset: 0; z-index: 40; background: var(--void);
  display: flex; flex-direction: column; padding: 20px var(--gutter) 40px;
  opacity: 0; visibility: hidden; transition: opacity .3s var(--ease), visibility 0s .3s;
}
.sheet.is-open { opacity: 1; visibility: visible; transition: opacity .3s var(--ease); }
.sheet__top { display: flex; align-items: center; justify-content: space-between; }
.sheet__links { display: flex; flex-direction: column; gap: 6px; margin: auto 0; }
.sheet__links a { font-size: clamp(40px, 12vw, 64px); line-height: 1.05; letter-spacing: -.04em; font-weight: 400; text-decoration: none; }
.sheet__links a[aria-current="page"] { color: var(--saffron); }

/* ---------- rail: one dot per scene ---------- */
.rail { position: fixed; right: 22px; top: 50%; transform: translateY(-50%); z-index: 20; display: flex; flex-direction: column; gap: 12px; }
.rail a { position: relative; display: block; width: 8px; height: 8px; border-radius: 50%; background: rgba(var(--fg-rgb),.22); transition: background-color .3s, transform .3s var(--ease); }
.rail a[aria-current="true"] { background: var(--cobalt-hi); transform: scale(1.3); }
.rail a span {
  position: absolute; right: 20px; top: 50%; transform: translateY(-50%);
  white-space: nowrap; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--mist); opacity: 0; pointer-events: none; transition: opacity .2s;
}
.rail a:hover span, .rail a:focus-visible span { opacity: 1; }

/* ---------- scenes ---------- */
.scene { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding: 140px 0 120px; }
.scene--tall { min-height: 130vh; }
.scene--auto { min-height: 0; }
.scene__slot { display: none; }
.grid { max-width: var(--max); width: 100%; margin: 0 auto; padding: 0 var(--gutter); display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; }
.scene__text { grid-column: 1 / span 6; }
.scene--flip .scene__text { grid-column: 7 / span 6; }
.scene--wide .scene__text { grid-column: 1 / -1; }
.scene--center .scene__text { grid-column: 2 / span 10; text-align: center; }
.scene--center .lede { margin-left: auto; margin-right: auto; }
.scene--center .actions { justify-content: center; }

/* ---------- reveals ---------- */
.js .rv { opacity: 0; transform: translateY(26px); transition: opacity 1s var(--ease), transform 1s var(--ease); transition-delay: var(--d, 0ms); }
.js .is-in .rv, .js .rv.is-in { opacity: 1; transform: none; }
.split .w { display: inline-block; overflow: hidden; vertical-align: top; padding: 0 .1em .1em; margin: 0 -.1em -.1em; }
.js .split .w > span { display: inline-block; transform: translateY(108%); transition: transform 1.1s var(--ease); transition-delay: calc(var(--i) * 42ms + var(--d, 0ms)); }
.js .is-in .split .w > span { transform: none; }

/* ---------- content patterns ---------- */
.steps { list-style: none; margin: 48px 0 0; padding: 0; display: grid; gap: 30px; counter-reset: s; }
.steps li { display: grid; grid-template-columns: 56px 1fr; column-gap: 18px; counter-increment: s; }
.steps li::before { content: counter(s, decimal-leading-zero); font-size: 14px; font-weight: 600; letter-spacing: .025em; color: var(--saffron); padding-top: 8px; }
.steps h3 { grid-column: 2; }
.steps p { grid-column: 2; margin: 8px 0 0; color: var(--mist); max-width: 460px; }

.terms { margin: 48px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 36px; }
.terms div { margin: 0; }
.terms dt { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ash); }
.terms dt span { display: block; margin-top: 4px; letter-spacing: 0; text-transform: none; font-weight: 200; font-size: 14px; color: var(--ash); }
.terms dd { margin: 10px 0 0; font-size: 22px; line-height: 1.3; font-weight: 400; letter-spacing: -.01em; }

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; margin-top: 60px; }
.stat b { display: block; font-weight: 400; font-size: clamp(44px, 5vw, 78px); line-height: 1; letter-spacing: -.04em; }
.stat span { display: block; margin-top: 12px; font-size: 15px; color: var(--mist); max-width: 240px; }

.quote { margin: 0; font-size: clamp(22px, 2vw, 27px); line-height: 1.35; font-weight: 200; letter-spacing: -.01em; }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px; margin-top: 48px; }
.pair .quote--generic { color: var(--ash); }
.pair .label { display: block; margin-bottom: 14px; }

.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 14px; line-height: 1.7; font-weight: 400; color: var(--mist); white-space: pre; overflow-x: auto; margin: 36px 0 0; }
.mono .k { color: var(--saffron); }
.mono .s { color: var(--code-s); }

.maps { list-style: none; margin: 36px 0 0; padding: 0; display: grid; gap: 14px; }
.maps li { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; font-size: 18px; }
.maps li b { font-weight: 400; }
.maps li i { font-style: normal; color: var(--saffron); }

.platforms { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 36px; }
.tag {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 16px;
  border-radius: 9999px; background: rgba(var(--fg-rgb),.07); color: var(--bone);
  font: 400 15px/1 var(--font); border: 0;
}
button.tag { cursor: pointer; transition: background-color .2s, color .2s; }
button.tag[aria-pressed="true"] { background: var(--bone); color: var(--void); }
button.tag:hover { background: rgba(var(--fg-rgb),.14); }
button.tag[aria-pressed="true"]:hover { background: rgba(var(--fg-rgb),.85); }
.tag i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; font-style: normal; }

/* publish demo — an entry on the void */
.entry { margin-top: 48px; }
.entry__meta { display: flex; gap: 14px; align-items: center; }
.entry__title { margin: 14px 0 0; font-size: clamp(28px, 3vw, 42px); line-height: 1.1; letter-spacing: -.04em; font-weight: 400; }
.entry__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.entry__go { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 30px; }
.entry__status { font-size: 15px; color: var(--mist); min-height: 1.5em; }
.entry__status b { color: var(--saffron); font-weight: 400; }

/* packages */
.pkgs { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px; margin-top: 72px; }
.pkg h3 { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.pkg .badge { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--saffron); }
.pkg__price { margin: 18px 0 0; font-size: clamp(40px, 4vw, 56px); line-height: 1; letter-spacing: -.04em; font-weight: 400; }
.pkg__price small { font-size: 15px; letter-spacing: 0; color: var(--ash); font-weight: 200; margin-left: 6px; }
.pkg__time { margin: 10px 0 0; font-size: 15px; color: var(--mist); }
.pkg__for { margin: 20px 0 0; color: var(--mist); min-height: 3em; }
.pkg ul { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 10px; }
.pkg li { display: grid; grid-template-columns: 18px 1fr; gap: 8px; font-size: 16px; }
.pkg li::before { content: ""; width: 10px; height: 2px; margin-top: 11px; background: var(--saffron); border-radius: 2px; }
.pkg .ghost { margin-top: 24px; }

/* calculator */
.calc { margin-top: 42px; display: grid; gap: 24px; max-width: 520px; }
.calc__group { display: grid; gap: 18px; }
.range { display: grid; gap: 8px; }
.range__top { display: flex; justify-content: space-between; gap: 16px; font-size: 16px; }
.range__top output { font-weight: 400; color: var(--saffron); white-space: nowrap; }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 24px; background: transparent; margin: 0; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 2px; background: linear-gradient(90deg, var(--cobalt-hi) var(--p, 50%), rgba(var(--fg-rgb),.18) var(--p, 50%)); border-radius: 2px; }
input[type="range"]::-moz-range-track { height: 2px; background: rgba(var(--fg-rgb),.18); border-radius: 2px; }
input[type="range"]::-moz-range-progress { height: 2px; background: var(--cobalt-hi); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -8px; border-radius: 50%; background: var(--bone); border: 0; }
input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--bone); border: 0; }
.result { margin-top: 12px; }
.result b { display: block; font-weight: 400; font-size: clamp(56px, 7vw, 104px); line-height: .95; letter-spacing: -.04em; color: var(--saffron); }
.result p { margin: 12px 0 0; color: var(--mist); font-size: 15px; max-width: 460px; }
.result .math { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; color: var(--ash); margin-top: 12px; }

/* faq */
.faq { grid-column: 1 / span 8; margin-top: 48px; }
.faq details { padding: 22px 0; }
.faq summary { list-style: none; cursor: pointer; display: flex; gap: 24px; justify-content: space-between; align-items: baseline; font-size: clamp(22px, 2vw, 27px); line-height: 1.25; letter-spacing: -.02em; font-weight: 400; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 200; color: var(--saffron); font-size: 30px; line-height: 1; transition: transform .3s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 14px 0 0; color: var(--mist); max-width: 640px; }

/* form */
.form { display: grid; gap: 18px; margin-top: 42px; max-width: 560px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: grid; gap: 8px; }
.field label { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ash); }
.field label small { text-transform: none; letter-spacing: 0; font-weight: 200; }
.input { width: 100%; min-height: 48px; padding: 12px 16px; border: 0; border-radius: 14px; background: rgba(var(--fg-rgb),.07); color: var(--bone); font: 200 17px/1.4 var(--font); }
.input:focus { outline: 2px solid var(--cobalt-hi); outline-offset: 0; }
textarea.input { resize: vertical; min-height: 110px; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ash) 50%), linear-gradient(135deg, var(--ash) 50%, transparent 50%); background-position: calc(100% - 22px) 21px, calc(100% - 16px) 21px; background-size: 6px 6px; background-repeat: no-repeat; }
select.input option { background: var(--void); color: var(--bone); }
.form__note { font-size: 14px; color: var(--ash); }
.form__done { font-size: 18px; color: var(--saffron); }

/* ---------- footer ---------- */
.foot { position: relative; z-index: 1; padding: 96px 0 48px; background: linear-gradient(rgba(var(--bg-rgb),0), var(--void) 96px); font-weight: 400; }
.foot__grid { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 36px; }
.foot p { margin: 18px 0 0; font-size: 16px; line-height: 1.55; color: var(--soft); max-width: 380px; }
.foot nav { display: grid; gap: 10px; align-content: start; }
.foot nav a { text-decoration: none; font-size: 16px; color: var(--soft); padding: 2px 0; }
.foot nav a:hover { color: var(--bone); }
.foot__h { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--saffron); margin: 0 0 6px; }
.foot__base { max-width: var(--max); margin: 60px auto 0; padding: 0 var(--gutter); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--mist); }

/* ---------- small screens ---------- */
@media (max-width: 1100px) {
  .nav__links { gap: 22px; }
  .brand__desc { display: none; }
}
@media (max-width: 859px) {
  .nav__links, .nav .btn { display: none; }
  .nav__menu { display: inline-flex; }
  .rail { display: none; }
}
/* B136: the stacked phone layout is for portrait phones; a phone on its side gets the side-by-side layout */
@media (max-width: 859px) and (orientation: portrait), (max-width: 599px) {
  body { font-size: 17px; }
  .scene, .scene--tall { display: block; min-height: 0; padding: 0 0 72px; }
  .scene__slot { display: block; height: 70vh; height: 70svh; }
  .scene--hero .scene__slot { height: 58svh; }
  .scene--bg .scene__slot { height: 18vh; }
  .scene__text, .scene--flip .scene__text, .scene--center .scene__text { grid-column: 1 / -1; }
  .scene__text { position: relative; padding-top: 36px; }
  .scene__text::before { content: ""; position: absolute; inset: 0 calc(var(--gutter) * -1) -72px; z-index: -1; background: linear-gradient(rgba(var(--bg-rgb),0), rgba(var(--bg-rgb),.5) 60px, rgba(var(--bg-rgb),.86) 120px); }
  .scene--bg .scene__text::before { background: rgba(var(--bg-rgb),.55); }
  .terms, .pair, .stats, .pkgs, .form__row { grid-template-columns: 1fr; }
  .faq { grid-column: 1 / -1; }
  .foot__grid { grid-template-columns: 1fr 1fr; }
  .foot__grid > :first-child { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  .js .rv, .js .split .w > span { transition: none; transform: none; opacity: 1; }
  html { scroll-behavior: auto; }
}

/* ---------- theme toggle ---------- */
.theme { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(var(--fg-rgb),.07); color: var(--bone); cursor: pointer; transition: background-color .2s; flex: none; }
.theme:hover { background: rgba(var(--fg-rgb),.14); }
.theme svg { width: 18px; height: 18px; }
.theme .i-sun { display: none; }
:root[data-theme="light"] .theme .i-sun { display: block; }
:root[data-theme="light"] .theme .i-moon { display: none; }
.nav__end { display: flex; align-items: center; gap: 14px; }
@media (max-width: 859px) { .nav__end .btn { display: none; } .nav__end { margin-left: auto; } .nav__menu { margin-left: 0; } }

/* ---------- page transitions: content lifts away while the loom closes ---------- */
.site, .nav { transition: opacity .5s var(--ease), transform .6s var(--ease); }
.is-entering .site { opacity: 0; transform: translateY(18px); }
.is-entering .nav { opacity: 0; }
.is-leaving .site { opacity: 0; transform: translateY(-22px); transition-duration: .42s, .5s; }
.is-leaving .nav, .is-leaving .rail { opacity: 0; transition: opacity .35s var(--ease); }
@media (prefers-reduced-motion: reduce) {
  .site, .nav { transition: none; }
  .is-entering .site, .is-leaving .site { transform: none; }
}
