/* ─────────────────────────────────────────────────────────────────────────
   Spotty — page layer.

   Everything here is built on the Nocturne tokens in nocturne.css. Colours,
   fonts, radii and shadows come from var(--…); nothing is hard-coded that a
   token already carries.

   Accent: the site ships with Nocturne's own blurple. To repaint it in the
   app's brand violet, uncomment the block below — every accent surface,
   ramp-independent, follows it.

   :root { --color-accent: #7C3AED; }
   ───────────────────────────────────────────────────────────────────────── */

html { scroll-behavior: smooth; }
body { background: var(--color-bg); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* — icons ————————————————————————————————————————————————————————————————
   Phosphor icons, inlined as an SVG sprite (see tools/build-icons.py). Size
   them with font-size, exactly as the icon font they replace was sized. */
.sprite { display: none; }
.ico {
  width: 1em; height: 1em; flex: none;
  fill: currentColor; vertical-align: -0.135em;
}

/* — shell ———————————————————————————————————————————————————————————————— */
.wrap { max-width: 1140px; margin: 0 auto; width: 100%; }
.sec { scroll-margin-top: 72px; }

.navwrap {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--color-bg) 78%, transparent);
  border-bottom: 1px solid var(--color-divider);
}
.navbar {
  display: flex; align-items: center; justify-content: center;
  padding: 16px 40px;
}

.mark {
  display: inline-flex; align-items: center; gap: 11px;
  font-family: var(--font-heading); font-weight: 600; font-size: 19px;
  letter-spacing: -0.01em;
  text-decoration: none; color: var(--color-text);
}
.mark .med {
  width: 34px; height: 34px; border-radius: 11px;
  display: grid; place-items: center;
  background: linear-gradient(150deg, var(--color-accent), var(--color-accent-700));
  color: #fff; font-size: 19px;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--color-accent) 40%, transparent);
}

/* — type ————————————————————————————————————————————————————————————————— */
.kick {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-heading); font-weight: 600; font-size: 11px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 18px;
}
.kick::before {
  content: ""; width: 26px; height: 2px;
  background: var(--color-accent); border-radius: 2px;
}
.lead {
  color: color-mix(in srgb, var(--color-text) 66%, transparent);
  font-size: 17px; line-height: 1.65; max-width: 48ch;
}
.lead-wide { max-width: 60ch; }

.h-hero {
  font-size: clamp(36px, 5.2vw, 56px); line-height: 1.04;
  letter-spacing: -0.02em; margin: 0 0 22px;
}
.h-sec {
  font-size: clamp(28px, 3.6vw, 40px);
  letter-spacing: -0.02em; margin: 0 0 16px;
}
.h-sec-lg {
  font-size: clamp(30px, 4vw, 46px);
  letter-spacing: -0.02em; margin: 0 0 18px;
}

/* — sections ————————————————————————————————————————————————————————————— */
.sec-hero {
  min-height: 100svh; display: flex; align-items: center;
  padding: 64px 40px;
}
.sec-split {
  min-height: 100svh; display: flex; align-items: center;
  padding: 96px 40px;
}
.sec-block { padding: 96px 40px; }
.sec-band {
  background: linear-gradient(140deg, var(--color-section), var(--color-section-glow));
  padding: 72px 40px;
}
.alt { background: var(--color-surface); }

.frow { display: flex; gap: 72px; align-items: center; flex-wrap: wrap; }
.frow-center { justify-content: center; }
.fcol { flex: 1 1 380px; min-width: 290px; }
.fcol-wide { flex: 1 1 400px; }
.pcol { flex: 1 1 300px; display: flex; justify-content: center; }

/* — phone mock ——————————————————————————————————————————————————————————— */
.phone {
  position: relative;
  width: 288px; padding: 11px; border-radius: 44px;
  background: linear-gradient(155deg, #262838, #0b0c12);
  box-shadow: var(--shadow-lg), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}
.phone::after {
  content: ""; position: absolute; top: 22px; left: 50%;
  transform: translateX(-50%);
  width: 82px; height: 6px; border-radius: 6px;
  background: rgba(0, 0, 0, 0.55); z-index: 2;
}
.screen {
  border-radius: 34px; overflow: hidden; background: #000; display: block;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}
/* height:auto is load-bearing — the <img> carries width/height attributes so the
   layout is settled before the file loads, and without it the attribute height
   wins over the aspect ratio and the screenshot renders stretched. */
.screen img { width: 100%; height: auto; display: block; }
.glow {
  position: absolute; inset: -8% -6%; border-radius: 50%;
  filter: blur(70px); opacity: 0.5; z-index: -1;
  background: radial-gradient(closest-side, var(--color-accent), transparent 70%);
  pointer-events: none;
}

/* — benefit list ————————————————————————————————————————————————————————— */
.blist {
  list-style: none; padding: 0; margin: 26px 0 0;
  display: flex; flex-direction: column; gap: 14px;
}
.blist li {
  display: flex; align-items: flex-start; gap: 12px;
  font-size: 15px;
  color: color-mix(in srgb, var(--color-text) 82%, transparent);
}
.blist .ico { color: var(--color-accent); font-size: 18px; margin-top: 1px; }

/* — rows of small stuff —————————————————————————————————————————————————— */
.tagrow { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 26px; }
.tagrow .ico { margin-right: 6px; font-size: 12px; }
.metarow {
  display: flex; gap: 26px; margin-top: 38px; flex-wrap: wrap;
  color: color-mix(in srgb, var(--color-text) 55%, transparent);
  font-size: 13px;
}
.metarow span { display: flex; align-items: center; gap: 7px; }
.ctarow { display: flex; gap: 12px; margin-top: 34px; flex-wrap: wrap; }
.ctarow .btn { padding: 12px 22px; font-size: 15px; }

/* — stat band ———————————————————————————————————————————————————————————— */
.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 40px;
}
.stat-n {
  font-size: 44px; font-family: var(--font-heading); font-weight: 600;
  line-height: 1;
}
.stat-l {
  margin-top: 10px; font-size: 14px;
  color: color-mix(in srgb, var(--color-text) 72%, transparent);
}

/* — feature grid ————————————————————————————————————————————————————————— */
.grid-cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px; margin-top: 44px;
}
.grid-cards .ico { color: var(--color-accent); font-size: 26px; }

/* — footer ——————————————————————————————————————————————————————————————— */
.foot { border-top: 1px solid var(--color-divider); padding: 44px 40px; }
.foot .wrap {
  display: flex; gap: 24px; flex-wrap: wrap;
  align-items: center; justify-content: space-between;
}
.foot-note {
  color: color-mix(in srgb, var(--color-text) 52%, transparent);
  font-size: 13px;
}
.foot-links { display: flex; gap: 22px; flex-wrap: wrap; }
.foot-links a {
  color: color-mix(in srgb, var(--color-text) 80%, transparent);
  text-decoration: none; font-size: 13px;
  display: inline-flex; align-items: center; gap: 7px;
}
.foot-links a .ico { color: var(--color-accent); }
.foot-links a:hover { color: var(--color-accent); }
.foot-links a[aria-current="page"] { color: var(--color-accent); }

/* — document pages ——————————————————————————————————————————————————————— */
.doc { max-width: 760px; margin: 0 auto; padding: 64px 40px 88px; }
.doc-back {
  display: inline-flex; align-items: center; gap: 6px;
  color: color-mix(in srgb, var(--color-text) 60%, transparent);
  text-decoration: none; font-size: 13px; margin-bottom: 26px;
}
.doc-back:hover { color: var(--color-accent); }
.doc h1 {
  font-size: clamp(32px, 5vw, 44px); letter-spacing: -0.02em; margin: 0 0 10px;
}
.doc-date {
  color: color-mix(in srgb, var(--color-text) 55%, transparent);
  font-size: 13px; margin: 0;
}

.note {
  display: flex; gap: 12px; align-items: flex-start;
  margin: 26px 0 8px; padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--color-accent-900); border: 1px solid var(--color-accent-800);
  font-size: 13px; line-height: 1.55;
  color: color-mix(in srgb, var(--color-text) 82%, transparent);
}
.note .ico { color: var(--color-accent); font-size: 18px; margin-top: 1px; }
.note p { margin: 0 0 8px; }
.note p:last-child { margin: 0; }

/* Contents — the documents run to 40+ sections, so they open with an index. */
.toc { margin: 34px 0 8px; }
.toc h2 {
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: color-mix(in srgb, var(--color-text) 55%, transparent);
  margin: 0 0 14px;
}
.toc ol {
  list-style: none; margin: 0; padding: 0;
  columns: 2; column-gap: 32px;
}
.toc li { break-inside: avoid; margin-bottom: 7px; }
.toc a {
  display: flex; gap: 8px; font-size: 13.5px; line-height: 1.45;
  color: color-mix(in srgb, var(--color-text) 72%, transparent);
  text-decoration: none;
}
.toc a:hover { color: var(--color-accent); }
.toc a span {
  color: var(--color-accent); font-variant-numeric: tabular-nums; flex: none;
}
@media (max-width: 640px) { .toc ol { columns: 1; } }

.clause { padding: 28px 0; border-bottom: 1px solid var(--color-divider); scroll-margin-top: 80px; }
.clause:last-child { border-bottom: 0; }
.clause h2 {
  display: flex; gap: 12px; align-items: baseline;
  font-size: 20px; letter-spacing: -0.01em; margin: 0 0 10px;
  font-weight: var(--font-heading-weight);
}
.clause h2 span { color: var(--color-accent); font-variant-numeric: tabular-nums; }
.clause p,
.clause ol,
.clause ul {
  color: color-mix(in srgb, var(--color-text) 74%, transparent);
  font-size: 15px; line-height: 1.7;
}
.clause p { margin: 0 0 10px; }
.clause ol, .clause ul { margin: 6px 0 0; padding-left: 22px; }
.clause li { margin-bottom: 6px; }
.clause li > ol, .clause li > ul { margin: 6px 0 10px; }
.clause ol { list-style: decimal; }
.clause ol ol { list-style: lower-alpha; }
.clause .after { margin: 6px 0 0; }
.clause a { color: var(--color-accent-300); }

/* — small screens ———————————————————————————————————————————————————————— */
@media (max-width: 720px) {
  .frow { gap: 44px; }
  .sec-hero, .sec-split, .sec-block { padding-left: 24px; padding-right: 24px; }
  .sec-band, .foot, .navbar { padding-left: 24px; padding-right: 24px; }
  .doc { padding: 44px 24px 72px; }
}
