/* Snapwright site: editorial layout from the 2026-10 design handoff. */
:root {
  --paper: #f4f1ea;
  --paper-2: #fbfaf6;
  --sand: #e7e2d6;
  --rule: #cfc9bb;
  --ink: #17160f;
  --ink-2: #3b3932;
  --muted: #5d5a52;
  --blue: #2f6fd6;
  --blue-2: #4a8fe6;
  --blue-3: #7cb0f0;
  --red: #d93a3f;
  --on-accent: #ffffff;
  --header-bg: rgba(244, 241, 234, .92);
  --night-bg: #17160f;
  --night-head: #f4f1ea;
  --night-text: #cdc8bb;
  --night-muted: #a9a497;
  --night-rule: #3a3830;
  --pre-bg: #0f0e0a;
  --pre-fg: #e8e4d8;
  --pre-dim: #7d786b;
  --dock-bg: rgba(24, 24, 29, .94);
  --dock-line: rgba(255, 255, 255, .12);
  --dock-fg: #ffffff;
  --dock-fg3: #8b8b94;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --gutter: clamp(20px, 4vw, 48px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  transition: background .25s, color .25s;
  color: var(--ink);
  font: 17px/1.55 "Schibsted Grotesk", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--blue); }
::selection { background: var(--blue); color: var(--on-accent); }
figure { margin: 0; }
[hidden] { display: none !important; }
kbd {
  display: inline-block;
  font: 500 13px/1 var(--mono);
  padding: 5px 7px 4px;
  min-width: 24px;
  text-align: center;
  border: 1px solid var(--ink);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--paper-2);
  color: var(--ink);
  transition: background .15s, color .15s, border-color .15s;
}
.armed kbd { background: var(--blue); color: var(--on-accent); border-color: var(--blue); }

.wrap { max-width: 1320px; margin: 0 auto; padding: 0 var(--gutter); }
.mono { font-family: var(--mono); }
.label { font: 500 12px/1.4 var(--mono); letter-spacing: 0.04em; text-transform: uppercase; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--ink);
}
.site-header .wrap { height: 60px; display: flex; align-items: center; gap: 32px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; letter-spacing: -0.02em; }
.brand img { width: 26px; height: 26px; }
.site-header nav {
  display: flex; gap: 0 26px; flex-wrap: wrap; height: 24px; overflow: hidden;
  flex: 1 1 0; min-width: 0; font-size: 15px; line-height: 24px; font-weight: 500;
}
.header-end { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.gh { font: 500 13px/1 var(--mono); letter-spacing: 0.02em; white-space: nowrap; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px;
  background: var(--ink); color: var(--paper); border-radius: 999px; font-size: 14px; font-weight: 600;
  white-space: nowrap;
}
.pill:hover { background: var(--blue); color: var(--on-accent); }
.pill span { font: 400 12px var(--mono); opacity: .75; }

/* Hero */
.strap {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 18px 0;
  border-bottom: 1px solid var(--rule); font: 500 12px/1.4 var(--mono); letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--muted);
}
.strap .dot { display: flex; align-items: center; gap: 8px; }
.strap .dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--red); }

h1 {
  margin: clamp(40px, 7vw, 96px) 0 0; font-weight: 800; font-size: clamp(52px, 10.2vw, 156px);
  line-height: 0.92; letter-spacing: -0.055em; text-wrap: balance;
}
.sel-word {
  position: relative; display: inline-block; padding: 0 0.06em; margin: 0 0.02em;
  outline: 2px solid var(--blue); outline-offset: -2px; color: var(--blue);
}
.sel-word i {
  position: absolute; width: 9px; height: 9px; background: var(--paper); border: 2px solid var(--blue);
}
.sel-word i:nth-child(1) { left: -5px; top: -5px; }
.sel-word i:nth-child(2) { right: -5px; top: -5px; }
.sel-word i:nth-child(3) { left: -5px; bottom: -5px; }
.sel-word i:nth-child(4) { right: -5px; bottom: -5px; }
.sel-word b {
  position: absolute; left: -2px; bottom: 100%; margin-bottom: 10px; padding: 4px 8px;
  background: var(--blue); color: var(--on-accent); font: 500 clamp(11px, 1vw, 14px)/1 var(--mono);
  letter-spacing: 0; white-space: nowrap;
}

.lede-row {
  display: flex; flex-wrap: wrap; gap: 32px 64px; align-items: flex-end; justify-content: space-between;
  margin: clamp(32px, 4vw, 56px) 0 clamp(40px, 5vw, 64px);
}
.lede {
  flex: 1 1 420px; max-width: 620px; margin: 0; font-size: clamp(19px, 1.6vw, 23px);
  line-height: 1.45; color: var(--ink-2); text-wrap: pretty;
}
.cta { flex: 0 1 auto; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.big-btn {
  display: inline-flex; align-items: center; gap: 14px; padding: 18px 26px; background: var(--ink);
  color: var(--paper); border-radius: 999px; font-size: 18px; font-weight: 700; letter-spacing: -0.01em;
}
.big-btn:hover { background: var(--blue); color: var(--on-accent); }
.big-btn span { font-size: 20px; }
/* One-line Linux installer with a copy button. */
.install-cmd {
  display: flex; align-items: center; gap: 10px; max-width: 100%; min-width: 0;
  padding: 8px 8px 8px 16px; border: 1px solid var(--ink); border-radius: 10px; background: var(--paper-2);
}
.install-cmd code {
  flex: 1 1 auto; min-width: 0; overflow-x: auto; white-space: nowrap;
  font: 400 13px/1.6 var(--mono); color: var(--ink);
}
.install-cmd button {
  flex: none; font: 500 12px/1 var(--mono); padding: 8px 12px; border-radius: 6px; cursor: pointer;
  border: 1px solid var(--ink); background: var(--ink); color: var(--paper);
}
.install-cmd button:hover { background: var(--blue); border-color: var(--blue); color: var(--on-accent); }
.cta .install-cmd { width: min(560px, calc(100vw - 2 * var(--gutter))); }
.download .install-cmd { border-color: var(--night-rule); background: var(--pre-bg); }
.download .install-cmd code { color: var(--pre-fg); }
.download .install-cmd button { background: var(--night-head); color: var(--night-bg); border-color: var(--night-head); }
.download .install-cmd button:hover { background: var(--blue-2); border-color: var(--blue-2); color: var(--on-accent); }
.platform .install-cmd { grid-column: 1 / -1; }
.cta-sub { font: 400 12.5px/1.4 var(--mono); color: var(--muted); }
.cta-sub a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }

/* Demo */
.demo-head {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 12px 0; border-top: 1px solid var(--ink);
}
.demo-head .hint {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; text-transform: none;
  letter-spacing: 0; color: var(--ink-2);
}
.stage {
  position: relative; overflow: hidden; border: 1px solid var(--ink); background: #fff;
  cursor: crosshair; user-select: none; -webkit-user-select: none; touch-action: none;
}
.stage > img { width: 100%; pointer-events: none; }
.stage .dim { position: absolute; inset: 0; background: rgba(10, 10, 14, .42); pointer-events: none; }
.stage .sel {
  position: absolute; outline: 1.5px solid var(--blue-2); box-shadow: 0 0 0 9999px rgba(10, 10, 14, .42);
  pointer-events: none;
}
.stage .sel span {
  position: absolute; left: -1px; top: -25px; padding: 3px 7px; background: var(--ink); color: var(--paper);
  font: 500 12px/1.3 var(--mono); white-space: nowrap;
}
.stage .sel.low span { top: 4px; }
.stage .ch-h, .stage .ch-v { position: absolute; background: rgba(255, 255, 255, .75); pointer-events: none; }
.stage .ch-h { left: 0; right: 0; height: 1px; }
.stage .ch-v { top: 0; bottom: 0; width: 1px; }
.stage .coord {
  position: absolute; margin: 10px 0 0 10px; padding: 2px 6px; background: rgba(23, 22, 15, .85);
  color: #fff; font: 400 11px/1.3 var(--mono); white-space: nowrap; pointer-events: none;
}
.stage .flash {
  position: absolute; inset: 0; background: #fff; pointer-events: none; opacity: 0;
  transition: opacity .45s ease-out;
}
.stage .flash.on { opacity: .9; transition: none; }
.preview {
  position: absolute; right: clamp(10px, 2vw, 20px); bottom: clamp(10px, 2vw, 20px);
  width: clamp(170px, 22%, 260px); padding: 8px; background: var(--ink); border-radius: 10px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .35); pointer-events: none; opacity: 0; transform: translateY(24px);
  transition: opacity .3s, transform .45s cubic-bezier(.2, .9, .3, 1.2);
}
.preview.on { opacity: 1; transform: translateY(0); }
.preview .well {
  height: clamp(70px, 8vw, 110px); background: #2b2a24; border-radius: 5px; display: flex;
  align-items: center; justify-content: center; overflow: hidden;
}
.preview .foot {
  display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 2px 0;
  color: var(--paper); font: 400 11.5px/1.3 var(--mono);
}
.preview .foot span:last-child { padding: 2px 6px; border: 1px solid var(--muted); border-radius: 4px; }
.crop { height: 100%; max-width: 100%; background-repeat: no-repeat; }

.demo-lib {
  display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; padding: 16px 0;
  border-bottom: 1px solid var(--ink);
}
.demo-lib .label { flex: 0 0 200px; line-height: 1.5; }
.demo-lib .label span { color: var(--muted); text-transform: none; letter-spacing: 0; }
.shots { flex: 1 1 400px; display: flex; gap: 12px; flex-wrap: wrap; min-height: 84px; align-items: flex-start; }
.shots .empty { font: 400 13px/84px var(--mono); color: var(--muted); }
.shot { width: 132px; display: flex; flex-direction: column; gap: 6px; }
.shot .thumb {
  height: 72px; background: var(--sand); border: 1px solid var(--rule); display: flex;
  align-items: center; justify-content: center; overflow: hidden;
}
.shot span { font: 400 11px/1.3 var(--mono); color: var(--ink-2); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin: 0 0 clamp(80px, 10vw, 140px); }
.stats > div { padding: 28px 24px 28px 0; border-bottom: 1px solid var(--rule); }
.stats strong { display: block; font-weight: 800; font-size: clamp(40px, 4.4vw, 64px); line-height: 1; letter-spacing: -0.045em; }
.stats span { display: block; margin-top: 10px; font: 400 13px/1.45 var(--mono); color: var(--muted); max-width: 220px; }

/* Chapters */
.section-head {
  display: flex; flex-wrap: wrap; gap: 24px 64px; align-items: flex-end; justify-content: space-between;
  padding-bottom: 28px; border-bottom: 1px solid var(--ink);
}
h2 { margin: 0; font-weight: 800; letter-spacing: -0.05em; text-wrap: balance; }
.section-head h2 { font-size: clamp(40px, 6vw, 88px); line-height: 0.95; max-width: 900px; }
.section-head p { margin: 0; max-width: 360px; color: var(--ink-2); text-wrap: pretty; }

.chapter {
  display: flex; flex-wrap: wrap; gap: 40px clamp(40px, 5vw, 80px); padding: clamp(48px, 6vw, 88px) 0;
  border-bottom: 1px solid var(--rule); scroll-margin-top: 60px;
}
.chapter .text { flex: 1 1 340px; max-width: 460px; display: flex; flex-direction: column; }
.num { font: 500 13px/1 var(--mono); color: var(--blue); letter-spacing: 0.04em; }
h3 { margin: 18px 0 16px; font-weight: 800; font-size: clamp(34px, 3.6vw, 52px); line-height: 1; letter-spacing: -0.045em; }
.chapter p { margin: 0 0 28px; color: var(--ink-2); font-size: 18px; text-wrap: pretty; }
.specs { margin-top: auto; border-top: 1px solid var(--ink); }
.specs div {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 0;
  border-bottom: 1px solid var(--rule); font-size: 15.5px;
}
.specs span:last-child { font: 400 12.5px/1.3 var(--mono); color: var(--muted); text-align: right; white-space: nowrap; }
.chapter figure { flex: 1.6 1 480px; min-width: 0; }
.chapter figure > div { border: 1px solid var(--ink); background: var(--ink); overflow: hidden; }
.chapter figure img { width: 100%; }
figcaption.fig { display: flex; gap: 16px; padding-top: 12px; font: 400 12.5px/1.5 var(--mono); color: var(--ink-2); }
figcaption.fig b { color: var(--ink); font-weight: 500; white-space: nowrap; }

/* Tools */
.tools { padding-top: clamp(80px, 10vw, 140px); padding-bottom: clamp(80px, 10vw, 140px); }
.tools > div { display: flex; flex-wrap: wrap; gap: 48px clamp(40px, 5vw, 80px); }
.tools-intro { flex: 1 1 300px; max-width: 400px; }
.tools-intro .label { font-size: 13px; line-height: 1; color: var(--muted); }
.tools-intro h2 { margin-top: 18px; font-size: clamp(34px, 3.6vw, 52px); line-height: 1; letter-spacing: -0.045em; }
.mini { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 36px; }
.mini figure > div { border: 1px solid var(--ink); overflow: hidden; }
.mini figcaption { padding-top: 8px; font: 400 11.5px/1.4 var(--mono); color: var(--ink-2); }
.tool-list { flex: 1.6 1 480px; border-top: 1px solid var(--ink); }
.tool {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 24px; align-items: baseline;
  padding: 18px 0; border-bottom: 1px solid var(--rule);
}
.tool strong { font-weight: 700; font-size: 20px; letter-spacing: -0.02em; }
.tool .k { font: 400 12.5px/1.3 var(--mono); color: var(--blue); text-align: right; }
.tool p { grid-column: 1 / -1; margin: 0; color: var(--ink-2); font-size: 15.5px; max-width: 560px; }
.next { display: flex; gap: 10px 18px; flex-wrap: wrap; padding: 18px 0; font: 400 12.5px/1.5 var(--mono); color: var(--muted); }
.next b { color: var(--ink); font-weight: 500; }

/* Download */
.download { background: var(--night-bg); color: var(--night-head); scroll-margin-top: 60px; }
.download > .wrap { padding-top: clamp(72px, 9vw, 128px); padding-bottom: clamp(72px, 9vw, 128px); }
.download .label { font-size: 13px; line-height: 1; color: var(--night-muted); }
.download h2 { margin-top: 20px; font-size: clamp(52px, 9vw, 136px); line-height: 0.92; letter-spacing: -0.055em; color: var(--night-head); }
.download .lede-row { margin: 40px 0 56px; }
.download .lede { flex-basis: 380px; max-width: 560px; font-size: 19px; color: var(--night-text); }
.download .cta { gap: 12px; }
.download .big-btn { background: var(--night-head); color: var(--night-bg); }
.download .big-btn:hover { background: var(--blue-2); color: var(--on-accent); }
.download .cta-sub { color: var(--night-muted); }
.platforms { border-top: 1px solid var(--night-head); }
.platform {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px 32px;
  align-items: baseline; padding: 22px 0; border-bottom: 1px solid var(--night-rule); color: var(--night-text);
}
.platform .name { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 28px; letter-spacing: -0.03em; }
.platform.mine .name { color: var(--night-head); }
.platform .yours {
  display: none; font: 500 11px/1 var(--mono); letter-spacing: 0.04em; padding: 5px 7px;
  border: 1px solid var(--blue-2); color: var(--blue-3); border-radius: 4px;
}
.platform.mine .yours { display: inline-block; }
.platform .api { font: 400 13px/1.5 var(--mono); }
.platform .note { font-size: 15.5px; }
.platform a { justify-self: start; font: 500 13px/1.4 var(--mono); color: var(--night-head); border-bottom: 1px solid var(--night-head); }
.platform a:hover { color: var(--blue-3); }
.source { display: flex; flex-wrap: wrap; gap: 24px 64px; margin-top: 64px; }
.source > div { flex: 1 1 280px; max-width: 380px; }
.source h3 { margin: 0 0 10px; font-weight: 700; font-size: 24px; letter-spacing: -0.02em; color: var(--night-head); }
.source p { margin: 0; color: var(--night-text); font-size: 15.5px; }
.source p code { font: 400 13px var(--mono); color: var(--night-head); }
.source pre {
  flex: 1.6 1 420px; margin: 0; padding: 22px 24px; border: 1px solid var(--night-rule); background: var(--pre-bg);
  color: var(--pre-fg); font: 400 14px/1.75 var(--mono); overflow-x: auto;
}
.source pre i { font-style: normal; color: var(--pre-dim); }

/* Theme: the header button and the dock it opens (theme.js). */
.theme-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 0; border: 0; background: none; cursor: pointer;
  color: var(--ink); font: 500 13px/1 var(--mono); letter-spacing: 0.02em; white-space: nowrap;
}
.theme-btn:hover { color: var(--blue); }
.theme-dot {
  width: 14px; height: 14px; border-radius: 50%; border: 1px solid var(--ink);
  background: linear-gradient(135deg, var(--paper) 50%, var(--blue) 50%);
}
.theme-dock {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 50;
  width: min(1100px, calc(100vw - 32px)); display: flex; flex-direction: column; gap: 10px; padding: 12px;
  border-radius: 14px; background: var(--dock-bg); border: 1px solid var(--dock-line);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .35); color: var(--dock-fg);
  font: 12px/1.3 Geist, system-ui, sans-serif;
}
.dock-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.dock-head b { font-weight: 600; font-size: 13px; }
.dock-name, .dock-keys { color: var(--dock-fg3); }
.dock-keys { display: flex; align-items: center; gap: 6px; }
.dock-keys kbd {
  min-width: 20px; padding: 3px 5px; font: 11px/1 system-ui, sans-serif; border-radius: 5px;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .14); color: var(--dock-fg);
}
.dock-close {
  margin-left: auto; width: 26px; height: 26px; border: 0; border-radius: 6px; cursor: pointer;
  background: rgba(255, 255, 255, .08); color: var(--dock-fg); font-size: 16px; line-height: 1;
}
.dock-chips { display: flex; gap: 8px; overflow-x: auto; overflow-y: hidden; padding-bottom: 8px; }
.chip {
  flex: 0 0 auto; display: flex; flex-direction: column; gap: 6px; padding: 5px; border: 0; border-radius: 9px;
  background: transparent; cursor: pointer; color: var(--dock-fg3); font: 500 11px/1.2 system-ui, sans-serif; text-align: left;
}
.chip.on { box-shadow: 0 0 0 2px var(--blue); color: var(--dock-fg); }
.chip .swatch {
  width: 84px; height: 44px; border-radius: 6px; border: 1px solid rgba(255, 255, 255, .14); padding: 7px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.chip .swatch i { width: 44px; height: 5px; border-radius: 3px; }
.chip .swatch > span { display: flex; gap: 4px; }
.chip .swatch u { width: 10px; height: 10px; border-radius: 50%; }
.chip-name { padding: 0 2px; white-space: nowrap; }

/* Four fixed columns when they fit, so the full-width installer row keeps the others' grid. */
@media (min-width: 960px) { .platform { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Footer */
.site-footer { padding-top: 40px; padding-bottom: 28px; overflow: hidden; }
.site-footer .row { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; font: 400 12.5px/1.4 var(--mono); color: var(--muted); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-left: auto; }
.wordmark {
  margin-top: 28px; font-weight: 900; font-size: min(16vw, 232px); line-height: 0.8;
  letter-spacing: -0.065em; white-space: nowrap;
}

@media (max-width: 640px) {
  .site-header .gh, .site-header nav { display: none; }
  .site-header .wrap { gap: 20px; }
  .specs span:last-child { white-space: normal; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .preview, .stage .flash, kbd { transition: none; }
}
