@import url("fonts/geist.css");

/* ── tokens ─────────────────────────────────────────────────────── */
:root {
  color-scheme: dark;
  --bg: #0b0d10;
  --surface: #11151b;
  --surface-2: #161b22;
  --border: #262c34;
  --border-2: #30363d;
  --text: #e6edf3;
  --muted: #a3adb8;
  --faint: #7d8590;
  --amber: #f59e0b;
  --amber-hover: #fbbf24;
  --amber-ink: #0b0d10;
  --amber-text: #f59e0b;
  --amber-wash: rgba(245, 158, 11, 0.1);
  --green: #3fb950;
  --blue: #79c0ff;
  --shadow: none;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", "DejaVu Sans Mono", monospace;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --r: 12px;
  --r-sm: 8px;
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #ffffff;
    --surface: #f6f8fa;
    --surface-2: #eff2f5;
    --border: #d8dee4;
    --border-2: #c9d1d9;
    --text: #1f2328;
    --muted: #4b545e;
    --faint: #59636e;
    --amber-text: #9a6700;
    --amber-wash: rgba(245, 158, 11, 0.14);
    --green: #1a7f37;
    --blue: #0969da;
    --shadow: none;
  }
}

/* ── base ───────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html {
  background: var(--bg); color: var(--text);
  scroll-behavior: smooth; scroll-padding-top: 84px;
  -webkit-text-size-adjust: 100%;
  scrollbar-color: var(--border-2) var(--bg);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
body {
  margin: 0; background: var(--bg);
  font: 400 1.0625rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--amber); color: var(--amber-ink); }
a { color: inherit; text-decoration: none; }
p a, li a, .link {
  color: var(--text); text-decoration: underline; text-underline-offset: 0.2em;
  text-decoration-color: color-mix(in srgb, var(--amber) 60%, transparent); text-decoration-thickness: 1px;
}
p a:hover, li a:hover, .link:hover { text-decoration-color: var(--amber); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 4px; }
img { max-width: 100%; }
code, pre, .mono { font-family: var(--mono); font-variant-ligatures: none; }
code { font-size: 0.875em; background: var(--surface-2); border: 1px solid var(--border); border-radius: 5px; padding: 0.08em 0.36em; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.02em; text-wrap: balance; }
p { margin: 0; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.skip {
  position: absolute; left: var(--gutter); top: -48px; z-index: 50;
  background: var(--amber); color: var(--amber-ink); padding: 8px 12px; border-radius: var(--r-sm); font-weight: 600;
}
.skip:focus { top: 10px; }

/* ── buttons ────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px;
  border-radius: var(--r-sm); border: 1px solid var(--border-2);
  font: 600 0.9375rem/1 var(--sans); color: var(--text); background: var(--surface);
  transition: background-color 0.15s, border-color 0.15s, transform 0.15s;
}
.btn:hover { border-color: var(--faint); background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--amber); border-color: var(--amber); color: var(--amber-ink); }
.btn-primary:hover { background: var(--amber-hover); border-color: var(--amber-hover); }

/* ── top bar ────────────────────────────────────────────────────── */
.bar {
  position: sticky; top: 0; z-index: 20; background: var(--bg);
  border-bottom: 1px solid transparent; transition: border-color 0.2s;
}
.bar.scrolled { border-bottom-color: var(--border); }
.bar .wrap { display: flex; align-items: center; gap: 28px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 1rem; white-space: nowrap; }
.brand svg { width: 30px; height: 30px; flex: none; }
.brand small { font-weight: 500; color: var(--faint); font-size: 0.875rem; }
.nav { display: flex; gap: 24px; font-size: 0.9375rem; color: var(--muted); }
.nav a:hover { color: var(--text); }
.bar .right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.lang { display: flex; border: 1px solid var(--border); border-radius: var(--r-sm); overflow: hidden; font: 500 0.8125rem/1 var(--mono); }
.lang a { padding: 8px 10px; color: var(--faint); }
.lang a[aria-current="page"] { color: var(--text); background: var(--surface-2); }
.lang a:hover { color: var(--text); }
.bar .btn { height: 38px; padding: 0 14px; font-size: 0.875rem; }

/* ── hero ───────────────────────────────────────────────────────── */
.hero { padding: clamp(56px, 9vw, 112px) 0 clamp(40px, 6vw, 64px); text-align: center; }
.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.25rem); line-height: 1.04; letter-spacing: -0.035em; font-weight: 700;
  max-width: 15ch; margin: 0 auto 22px;
}
.hero h1 em { font-style: normal; color: var(--amber-text); }
.hero .sub { font-size: clamp(1.0625rem, 1.6vw, 1.25rem); color: var(--muted); max-width: 46ch; margin: 0 auto 36px; line-height: 1.55; }

.cmd {
  display: flex; align-items: center; gap: 12px; max-width: 960px; margin: 0 auto 22px; text-align: left;
  background: var(--surface); border: 1px solid var(--border-2); border-radius: var(--r);
  padding: 8px 8px 8px 18px; box-shadow: var(--shadow);
}
.cmd pre {
  margin: 0; flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none;
  font: 400 0.875rem/1.5 var(--mono); color: var(--text); padding: 8px 0;
}
.cmd pre::-webkit-scrollbar { display: none; }
.cmd .p { color: var(--amber-text); user-select: none; }
.copy {
  flex: none; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px;
  border-radius: var(--r-sm); border: 1px solid var(--border-2); background: var(--surface-2);
  color: var(--text); font: 600 0.875rem/1 var(--sans); cursor: pointer; transition: background-color 0.15s, color 0.15s;
}
.copy:hover { background: var(--amber); border-color: var(--amber); color: var(--amber-ink); }
.copy[data-done] { color: var(--green); }
.copy[data-done]:hover { background: var(--surface-2); border-color: var(--border-2); color: var(--green); }

.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-bottom: 26px; }
.facts { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 26px; color: var(--muted); font-size: 0.9375rem; list-style: none; padding: 0; margin: 0; }
.facts li { display: inline-flex; align-items: center; gap: 8px; }
.facts .icon { color: var(--green); width: 18px; height: 18px; }

/* the window with the real erssi */
.shot { padding: 0 var(--gutter); margin: 0 auto clamp(8px, 2vw, 24px); max-width: calc(1280px + 2 * var(--gutter)); }
.window {
  border: 1px solid var(--border-2); border-radius: var(--r); overflow: hidden; background: var(--bg);
  box-shadow: var(--shadow);
  animation: rise 0.9s cubic-bezier(0.16, 1, 0.3, 1) both 0.1s;
}
@keyframes rise { from { transform: translateY(18px); } to { transform: none; } }
.titlebar {
  display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 14px;
  background: var(--surface); border-bottom: 1px solid var(--border);
  font: 500 0.8125rem/1 var(--mono); color: var(--faint);
}
.titlebar .dots { display: flex; gap: 7px; }
.titlebar .dots i { width: 11px; height: 11px; border-radius: 50%; background: var(--border-2); }
.titlebar .t { flex: 1; text-align: center; margin-right: 52px; }
.window picture, .window img { display: block; width: 100%; height: auto; }
.shot figcaption { text-align: center; color: var(--faint); font-size: 0.875rem; margin-top: 16px; }

/* ── sections ───────────────────────────────────────────────────── */
.section { padding: clamp(72px, 10vw, 120px) 0; }
.section + .section { border-top: 1px solid var(--border); }
.section-head { max-width: 640px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { font-size: clamp(2rem, 3.6vw, 2.75rem); line-height: 1.1; letter-spacing: -0.03em; margin-bottom: 16px; }
.section-head p { color: var(--muted); font-size: 1.125rem; }

/* features */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tile {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r);
  padding: 26px; display: flex; flex-direction: column; gap: 10px; min-width: 0;
}
.tile h3 { font-size: 1.1875rem; letter-spacing: -0.015em; }
.tile p { color: var(--muted); font-size: 0.9875rem; line-height: 1.6; }
.tile.wide { grid-column: span 2; }
.tile .sample {
  margin-top: 8px; padding-top: 6px; display: grid; gap: 6px;
  font: 400 0.8125rem/1.5 var(--mono); color: var(--muted);
}
.tile .sample div { background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 9px 12px; overflow-x: auto; white-space: nowrap; }
.tile .sample b { font-weight: 500; color: var(--text); }
.tile .sample .a { color: var(--amber-text); }
.tile .sample .g { color: var(--green); }
.note { color: var(--faint); font-size: 0.875rem; margin-top: 22px; }

/* phone and web */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 7vw, 96px); align-items: center; }
.split .section-head { margin-bottom: 28px; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.checks li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 12px; color: var(--muted); }
.checks li b { color: var(--text); font-weight: 600; }
.checks .icon { color: var(--amber-text); margin-top: 3px; }
.phone {
  justify-self: center; width: min(360px, 100%); padding: 12px; border-radius: 40px;
  background: var(--surface-2); border: 1px solid var(--border-2); box-shadow: var(--shadow);
}
.phone .screen { border-radius: 30px; overflow: hidden; background: var(--bg); border: 1px solid var(--border); }
.phone .notch { height: 30px; display: flex; justify-content: center; align-items: center; background: var(--bg); }
.phone .notch i { width: 90px; height: 6px; border-radius: 6px; background: var(--border-2); }
.phone img { display: block; width: 100%; height: auto; }

/* install band: the one amber field */
.install-band { background: var(--amber); color: var(--amber-ink); }
.install-band + .section { border-top: 0; }
.install-band .section-head p { color: rgba(11, 13, 16, 0.78); }
.install-band code { background: rgba(11, 13, 16, 0.08); border-color: rgba(11, 13, 16, 0.18); color: var(--amber-ink); }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; counter-reset: s; }
.step { background: #0b0d10; color: #e6edf3; border-radius: var(--r); padding: 26px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.step h3 { font-size: 1.1875rem; }
.step p { color: #a3adb8; font-size: 0.9875rem; }
.step pre {
  margin: auto 0 0; padding: 12px 14px; border-radius: var(--r-sm); background: #161b22; border: 1px solid #262c34;
  font: 400 0.8125rem/1.6 var(--mono); color: #e6edf3; white-space: pre-wrap; overflow-wrap: anywhere;
}
.step pre .c { color: #7d8590; }
.step code { background: #161b22; border-color: #30363d; color: #e6edf3; }
.platforms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.platform { border: 1px solid rgba(11, 13, 16, 0.22); border-radius: var(--r); padding: 20px 22px; }
.platform h3 { font-size: 1rem; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.platform p { font-size: 0.9375rem; color: rgba(11, 13, 16, 0.8); }
.install-band .more { margin-top: 24px; font-weight: 600; }
.install-band .more a { text-decoration: underline; text-underline-offset: 0.2em; }

/* verify */
.release {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow);
}
.release header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.release header b { font-weight: 600; }
.release header span { font: 500 0.8125rem/1 var(--mono); color: var(--green); display: inline-flex; gap: 6px; align-items: center; }
.release dl { margin: 0; }
.release dl div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; padding: 13px 20px; border-bottom: 1px solid var(--border); align-items: baseline; }
.release dl div:last-child { border-bottom: 0; }
.release dt { color: var(--faint); font-size: 0.875rem; }
.release dd { margin: 0; font: 400 0.8125rem/1.55 var(--mono); color: var(--text); overflow-wrap: anywhere; display: flex; gap: 8px; align-items: baseline; }
.release dd .icon { width: 16px; height: 16px; color: var(--green); transform: translateY(3px); }
.verify pre {
  margin: 20px 0; padding: 16px 18px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--border);
  font: 400 0.8125rem/1.65 var(--mono); overflow-x: auto;
}
.verify p { color: var(--muted); }
.verify p + p { margin-top: 12px; }

/* what's new */
.changes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; list-style: none; margin: 0; padding: 0; }
.changes li { padding: 22px 0; border-top: 1px solid var(--border); display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 16px; }
.changes .tag {
  align-self: start; justify-self: start; font: 500 0.75rem/1 var(--mono); color: var(--amber-text);
  background: var(--amber-wash); border-radius: 999px; padding: 6px 10px; white-space: nowrap;
}
.changes p { color: var(--muted); font-size: 0.9875rem; }
.changes p b { color: var(--text); font-weight: 600; }
.after-list { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; }

/* community */
.cta {
  border: 1px solid var(--border); border-radius: calc(var(--r) + 4px); background: var(--surface);
  padding: clamp(32px, 5vw, 56px); display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 40px; align-items: center;
}
.cta h2 { font-size: clamp(1.75rem, 3vw, 2.25rem); letter-spacing: -0.03em; margin-bottom: 12px; }
.cta p { color: var(--muted); }
.cta pre {
  margin: 0; padding: 18px 20px; border-radius: var(--r); background: var(--bg); border: 1px solid var(--border);
  font: 400 0.9375rem/1.8 var(--mono);
}
.cta pre .c { color: var(--faint); }
.cta .actions { justify-content: flex-start; margin: 22px 0 0; }

/* footer */
footer { border-top: 1px solid var(--border); padding: 56px 0 40px; color: var(--muted); font-size: 0.9375rem; }
.foot { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: 32px; }
.foot p { max-width: 42ch; margin-top: 14px; color: var(--faint); font-size: 0.875rem; line-height: 1.6; }
.foot .fh { margin: 0 0 12px; font-size: 0.875rem; color: var(--text); font-weight: 600; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot ul a, .legal a { text-decoration: none; color: var(--muted); }
.foot ul a:hover, .legal a:hover { color: var(--text); }
.legal { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; color: var(--faint); font-size: 0.8125rem; }

/* ── narrower screens ───────────────────────────────────────────── */
@media (max-width: 1000px) {
  .nav { display: none; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile.wide { grid-column: span 2; }
  .split, .cta { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .changes { grid-template-columns: minmax(0, 1fr); }
  .foot { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .foot > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .bar .gh span { display: none; }
  .brand small { display: none; }
  .grid, .platforms { grid-template-columns: minmax(0, 1fr); }
  .tile.wide { grid-column: auto; }
  .cmd { flex-direction: column; align-items: stretch; padding: 12px; }
  .cmd pre { white-space: pre-wrap; overflow-wrap: anywhere; padding: 4px 4px 8px; }
  .copy { justify-content: center; height: 44px; }
  .actions .btn { flex: 1 1 auto; justify-content: center; }
  .titlebar .t { margin-right: 0; }
  .titlebar .dots { display: none; }
  .window { max-width: 420px; margin: 0 auto; }
  .release dl div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .changes li { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .foot { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* real erssi cut-outs inside feature tiles */
.tile.tall { grid-row: span 2; }
.crop.nicks {
  display: block; margin-top: auto; align-self: flex-start; padding: 14px 18px 8px 4px;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-sm);
}
.crop.nicks img { display: block; width: 118px; height: auto; }
.themes { margin-top: auto; padding-top: 12px; display: grid; gap: 10px; }
.themes figure { margin: 0; border: 1px solid var(--border); border-radius: var(--r-sm); overflow-x: auto; }
.themes img { display: block; width: 100%; height: auto; }
.themes figcaption {
  display: inline-block; margin-bottom: 6px; font: 500 0.6875rem/1 var(--mono); padding: 4px 7px;
  border-radius: 4px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border);
}
/* links on the amber band stay ink */
.install-band a { color: var(--amber-ink); text-decoration-color: rgba(11, 13, 16, 0.5); }
.install-band a code { color: var(--amber-ink); }
@media (max-width: 1000px) { .tile.tall { grid-row: auto; } }
@media (max-width: 640px) {
  .phone-visual { display: none; }
  .themes img { width: 560px; max-width: none; }
}
.themes figure { padding: 8px 12px; }
.themes figure:first-child { background: #0b0d10; }
.themes figure:last-child { background: #ffffff; }

/* icon beside the heading, not stacked above it */
.tile > h3 { display: flex; align-items: center; gap: 10px; }
.tile > h3 .icon { color: var(--amber-text); width: 22px; height: 22px; }
.tile.tall .crop.nicks { margin-top: 6px; }
.crop.e2e { margin: 8px 0 0; }
.crop.e2e img { display: block; width: 100%; height: auto; border-radius: var(--r-sm); border: 1px solid var(--border); background: #0b0d10; }
.crop.e2e figcaption { color: var(--faint); font-size: 0.875rem; margin-top: 8px; }

