/* ── Tokens ───────────────────────────────────────────────────────────── */
:root {
  --paper: #f6f4ef;
  --paper-2: #fbf9f4;
  --card: #ffffff;
  --ink: #14110d;
  --ink-2: #2b2722;
  --muted: #6b6660;
  --hairline: #e7e2d4;
  --hairline-strong: #d6d0bf;
  --accent: #4584b6;
  --accent-ink: #ffffff;
  --code-green: #2d7a4e;

  --shadow-sm: 0 1px 2px rgba(20,17,13,.04), 0 2px 6px rgba(20,17,13,.04);
  --shadow-md: 0 2px 4px rgba(20,17,13,.05), 0 12px 32px rgba(20,17,13,.06);
  --shadow-cta: 0 1px 0 rgba(255,255,255,.06) inset, 0 10px 28px rgba(20,17,13,.18), 0 2px 6px rgba(20,17,13,.12);

  --radius: 10px;
  --radius-lg: 14px;
  --max: 1180px;
  --gutter: 28px;

  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

/* ── Reset / base ─────────────────────────────────────────────────────── */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--accent); color: var(--accent-ink); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.mono { font-family: var(--font-mono); font-feature-settings: "ss01","cv11"; }

/* ── Nav (shared) ─────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklab, var(--paper) 88%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--hairline);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px; gap: 24px;
}
.nav-left { display: flex; align-items: center; gap: 28px; min-width: 0; }
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 600; letter-spacing: -.01em; flex-shrink: 0;
}
.nav-logo img { height: 36px; width: auto; }
.nav-site { display: flex; align-items: center; gap: 2px; }
.nav-site a {
  padding: 7px 11px; font-size: 14px; color: var(--ink-2);
  border-radius: 6px;
  transition: color .15s, background .15s;
}
.nav-site a:hover { background: rgba(20,17,13,.05); }
.nav-site a.current {
  color: var(--ink); font-weight: 500;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--hairline);
}
.nav-right { display: flex; align-items: center; gap: 6px; }
.nav-cta {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  background: var(--ink); color: var(--paper-2);
  border-radius: 7px; font-size: 13px; font-weight: 500;
  transition: transform .15s, background .15s;
}
.nav-cta:hover { background: #000; transform: translateY(-1px); }
.nav-cta .arrow { transition: transform .2s; }
.nav-cta:hover .arrow { transform: translate(2px,-2px); }

/* ── Buttons (shared) ─────────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 20px;
  background: var(--ink); color: var(--paper-2);
  border-radius: 10px; border: 0;
  font: 600 15px var(--font-sans);
  box-shadow: var(--shadow-cta);
  cursor: pointer;
  transition: transform .12s, background .15s;
  position: relative; overflow: hidden;
}
.btn-primary:hover { transform: translateY(-1px); background: #000; }
.btn-primary::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 38%, rgba(255,255,255,.15) 50%, transparent 62%);
  transform: translateX(-100%); transition: transform .8s;
}
.btn-primary:hover::after { transform: translateX(100%); }
.btn-primary .arrow { transition: transform .25s; }
.btn-primary:hover .arrow { transform: translate(3px,-3px); }

.btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 16px;
  background: transparent; color: var(--ink-2);
  border: 1px solid var(--hairline-strong);
  border-radius: 10px;
  font-size: 14px; font-weight: 500;
  transition: background .15s, border-color .15s, color .15s;
}
.btn-secondary:hover {
  background: var(--card); border-color: var(--ink); color: var(--ink);
}

/* ── Eyebrow pill (shared) ────────────────────────────────────────────── */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 12.5px;
  color: var(--muted);
  padding: 5px 10px;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  margin-bottom: 22px;
}
.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--code-green);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--code-green) 22%, transparent);
}

/* ── Section base ─────────────────────────────────────────────────────── */
.s { padding: 88px 0; border-bottom: 1px solid var(--hairline); }
.s-head {
  display: flex; align-items: end; justify-content: space-between;
  gap: 28px; margin-bottom: 40px;
}
.kicker {
  font-size: 12.5px; color: var(--muted);
  letter-spacing: .02em; margin-bottom: 10px;
}
.kicker b { color: var(--ink); font-weight: 600; }
.s-head h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.04; letter-spacing: -.025em; font-weight: 700;
  max-width: 22ch;
}
.more {
  font-size: 13px; color: var(--ink-2);
  padding: 8px 12px;
  border: 1px solid var(--hairline-strong);
  border-radius: 999px;
  transition: border-color .15s, color .15s, transform .15s;
  white-space: nowrap;
}
.more:hover { border-color: var(--ink); color: var(--ink); transform: translateY(-1px); }

/* ── Lightbox (shared) ────────────────────────────────────────────────── */
/* Elements opt in by setting [data-lightbox] (single trigger) or
   [data-lightbox-group] on a parent (each direct child with an <img>
   becomes a trigger). Cursor styling applies automatically. */
[data-lightbox], [data-lightbox-group] > * { cursor: zoom-in; }

.lightbox {
  display: none;
  position: fixed; inset: 0;
  z-index: 1000;
  background: rgba(20, 17, 13, .92);
  align-items: center; justify-content: center;
  padding: 40px;
  cursor: zoom-out;
  opacity: 0;
  transition: opacity .2s ease;
}
.lightbox.active { display: flex; opacity: 1; }
.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .55);
  cursor: default;
}
.lightbox .lightbox-close {
  position: absolute;
  top: 20px; right: 24px;
  width: 38px; height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(20, 17, 13, .6);
  color: white;
  font: 500 18px/1 var(--font-mono);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: background .15s, border-color .15s, transform .15s;
}
.lightbox .lightbox-close:hover {
  background: rgba(20, 17, 13, .92);
  border-color: rgba(255, 255, 255, .35);
  transform: translateY(-1px);
}
.lightbox .lightbox-nav {
  position: absolute;
  top: 50%;
  width: 46px; height: 46px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(20, 17, 13, .6);
  color: white;
  font: 500 26px/1 var(--font-mono);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: background .15s, border-color .15s, transform .15s;
}
.lightbox .lightbox-prev { left: 24px;  transform: translateY(-50%); }
.lightbox .lightbox-next { right: 24px; transform: translateY(-50%); }
.lightbox .lightbox-nav:hover {
  background: rgba(20, 17, 13, .92);
  border-color: rgba(255, 255, 255, .35);
}
.lightbox .lightbox-prev:hover { transform: translate(-1px, -50%); }
.lightbox .lightbox-next:hover { transform: translate( 1px, -50%); }
.lightbox .lightbox-nav[hidden] { display: none; }
.lightbox .lightbox-cap {
  position: absolute;
  bottom: 22px; left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono); font-size: 12px;
  color: rgba(255, 255, 255, .78);
  background: rgba(20, 17, 13, .6);
  padding: 6px 12px;
  border-radius: 999px;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
body.lightbox-open { overflow: hidden; }

/* ── Footer (shared) ──────────────────────────────────────────────────── */
footer {
  padding: 40px 0 60px;
  background: var(--paper);
  border-top: 1px solid var(--hairline);
}
.foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
}
.foot-l { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 13px; }
.foot-l img { height: 18px; opacity: .8; }
.foot-r { display: flex; gap: 16px; }
.foot-r a { color: var(--muted); font-size: 13px; }
.foot-r a:hover { color: var(--ink); }

/* ── Shared responsive ────────────────────────────────────────────────── */
@media (max-width: 940px) {
  .s-head { flex-direction: column; align-items: flex-start; gap: 14px; }
  .nav-site a:not(.current) { display: none; }
}
@media (max-width: 560px) {
  .nav-cta span:not(.arrow) { display: none; }
  .nav-site a.current { display: none; }
}
