/* The public pages (/studio/, /kit/): shared look. Moved out of studio.html 2026-11-16. */
/* ── Reset + Base (shared with /works) ───────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
/* -- chameleon breath ---------------------------------------------------
   The front page drifts its accent through four adjacent hues on a 3-minute
   cycle -- slow enough to read as "alive" rather than as an animation. All
   four stops were contrast-checked against the white ground before being
   chosen (5.17:1 at the worst point; the floor is 4.5:1) and they sit at
   similar luminance, so the interpolated colours between them stay compliant
   too. An accent that drifts out of contrast halfway round the loop is a
   readability bug that only shows up 40 seconds after you stop looking.

   @property is what makes a custom property animatable at all: without the
   type declaration a browser treats --brand as an opaque string and the
   keyframes snap instead of easing. Where it is unsupported the initial-value
   simply holds and the page is static, which is a fine outcome.

   prefers-reduced-motion disables it outright -- a slowly pulsing page is
   precisely the ambient movement that setting exists for. */
@property --brand {
  syntax: '<color>';
  inherits: true;
  initial-value: #2563eb;
}
@keyframes chameleon {
  0%,100% { --brand: #2563eb; }
  25%     { --brand: #4f46e5; }
  50%     { --brand: #0369a1; }
  75%     { --brand: #0e7490; }
}
@keyframes chameleon-ground {
  0%,100% { background-color: #ffffff; }
  25%     { background-color: #fdfdff; }
  50%     { background-color: #fbfdff; }
  75%     { background-color: #fcfeff; }
}
html { animation: chameleon 180s ease-in-out infinite; }
body { animation: chameleon-ground 180s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) {
  html, body { animation: none; }
}
:root {
  --brand: #2563eb;
  --bg:    #ffffff;
  --bg2:   #f7f8fc;
  --bg3:   #eef0f7;
  --border: rgba(15,20,35,.10);
  --text:  #14161f;
  --muted: #565d70;
  --faint: #b8bdcc;
  --green: #0f9d63;
  --teal:  #0d9488;
  --orange:#c2410c;
  --r-sm:  6px; --r-md: 8px; --r-lg: 12px; --r-full: 999px;
  --mono:  'DM Mono', monospace;
  --ui:    'Syne', sans-serif;
}
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.bg-canvas { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; will-change: transform; }
.orb { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .18; will-change: transform; transition: transform .08s linear; }
.orb-1 { width: 700px; height: 700px; top: -200px; left: -150px; background: radial-gradient(circle, #2563eb 0%, transparent 70%); }
.orb-2 { width: 500px; height: 500px; top: 30vh; right: -100px;  background: radial-gradient(circle, #0d9488 0%, transparent 70%); }
.orb-3 { width: 600px; height: 600px; bottom: 0;  left: 20%;     background: radial-gradient(circle, #c2410c 0%, transparent 70%); opacity: .1; }
body::after {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 1; opacity: .04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* ── Nav ───────────────────────────────────────────────────────────────── */
.wk-nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; padding: 16px 32px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid transparent; transition: border-color .2s, background .2s, backdrop-filter .2s; }
.wk-nav.scrolled { border-color: var(--border); background: rgba(7,7,14,.7); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.wk-logo { font-family: var(--ui); font-size: 18px; font-weight: 800; letter-spacing: -.02em; color: var(--text); text-decoration: none; }
.wk-logo span { color: var(--brand); }
.wk-nav-links { display: flex; align-items: center; gap: 20px; }
.wk-nav-links a { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); text-decoration: none; transition: color .15s; }
.wk-nav-links a:hover { color: var(--text); }
.wk-nav-links a.active { color: var(--brand); }
.wk-nav-links a.cta { padding: 6px 16px; border-radius: var(--r-full); border: 1px solid rgba(124,106,247,.4); color: var(--brand); background: rgba(124,106,247,.08); }
.wk-nav-links a.cta:hover { background: rgba(124,106,247,.18); border-color: var(--brand); }

/* ── Hero ──────────────────────────────────────────────────────────────── */
.wk-hero { position: relative; z-index: 10; min-height: 92svh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 140px 32px 60px; }
.hero-eyebrow { font-family: var(--mono); font-size: 10px; letter-spacing: .25em; text-transform: uppercase; color: var(--brand); margin-bottom: 20px; opacity: .8; }
.hero-title { font-family: var(--ui); font-weight: 800; font-size: clamp(38px, 7.5vw, 80px); line-height: .98; letter-spacing: -.03em; color: var(--text); margin-bottom: 26px; }
.hero-title em { font-style: normal; color: var(--brand); }
.hero-sub { font-family: var(--mono); font-size: clamp(13px, 1.8vw, 16px); color: var(--muted); max-width: 540px; line-height: 1.75; margin-bottom: 40px; }
.hero-stats { display: flex; gap: 40px; justify-content: center; flex-wrap: wrap; }
.hero-stat { text-align: center; }
.hero-stat-n { font-family: var(--ui); font-size: 26px; font-weight: 800; color: var(--text); line-height: 1; }
.hero-stat-l { font-family: var(--mono); font-size: 9px; letter-spacing: .15em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }

/* ── Sections ──────────────────────────────────────────────────────────── */
.wk-section { position: relative; z-index: 10; padding: 40px 32px 90px; max-width: 1160px; margin: 0 auto; }
.wk-secthead { margin: 0 0 32px; }
.sect-label { font-family: var(--mono); font-size: 10px; letter-spacing: .25em; text-transform: uppercase; color: var(--brand); display: block; margin-bottom: 10px; opacity: .85; }
.sect-title { font-family: var(--ui); font-weight: 800; font-size: clamp(24px, 3.4vw, 38px); letter-spacing: -.02em; color: var(--text); margin-bottom: 10px; }
.sect-sub { font-family: var(--mono); font-size: 13px; line-height: 1.6; color: var(--muted); max-width: 62ch; }
.sect-rule { height: 1px; margin-top: 24px; background: linear-gradient(90deg, var(--border), transparent); }

/* ── Principles grid ───────────────────────────────────────────────────── */
.prin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.prin { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 24px 22px; }
.prin i { font-size: 16px; color: var(--brand); margin-bottom: 14px; display: block; }
.prin h3 { font-family: var(--ui); font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 8px; letter-spacing: -.01em; }
.prin p { font-size: 12px; line-height: 1.65; color: var(--muted); }

/* ── Founders ──────────────────────────────────────────────────────────── */
.founder-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
.founder { background: var(--bg2); border: 1px solid var(--border); border-top: 2px solid var(--mc, var(--brand)); border-radius: var(--r-lg); padding: 30px 28px; }
.founder-mark { width: 44px; height: 44px; border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; font-family: var(--ui); font-weight: 800; font-size: 17px; background: color-mix(in srgb, var(--mc, var(--brand)) 14%, transparent); color: var(--mc, var(--brand)); border: 1px solid color-mix(in srgb, var(--mc, var(--brand)) 22%, transparent); margin-bottom: 18px; }
.founder-name { font-family: var(--ui); font-size: 19px; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.founder-role { font-family: var(--mono); font-size: 10px; letter-spacing: .15em; text-transform: uppercase; color: var(--mc, var(--brand)); margin-bottom: 16px; }
.founder p { font-size: 13px; line-height: 1.75; color: var(--muted); }
.founder p + p { margin-top: 12px; }

/* ── Case study (flagship, editorial) ─────────────────────────────────── */
.case-flagship { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 40px; position: relative; overflow: hidden; margin-bottom: 20px; }
.case-flagship::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(124,106,247,.5), transparent); }
.case-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 10px; letter-spacing: .15em; text-transform: uppercase; color: var(--brand); border: 1px solid rgba(124,106,247,.3); background: rgba(124,106,247,.08); padding: 4px 12px; border-radius: var(--r-full); margin-bottom: 18px; }
.case-flagship h3 { font-family: var(--ui); font-size: clamp(22px, 3vw, 30px); font-weight: 800; color: var(--text); margin-bottom: 14px; letter-spacing: -.01em; }
.case-flagship p { font-size: 13.5px; line-height: 1.75; color: var(--muted); max-width: 68ch; }
.case-flagship p + p { margin-top: 12px; }

.case-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
.case-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 26px 26px 22px; display: flex; flex-direction: column; }
.case-card .case-tag { margin-bottom: 14px; }
.case-card h3 { font-family: var(--ui); font-size: 17px; font-weight: 700; color: var(--text); margin-bottom: 10px; }
.case-card p { font-size: 12.5px; line-height: 1.7; color: var(--muted); flex: 1; }
.case-link { margin-top: 16px; display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 11px; color: var(--brand); text-decoration: none; }
.case-link:hover { text-decoration: underline; }

/* ── Passion-project chips ────────────────────────────────────────────── */
.piece-list { display: flex; flex-wrap: wrap; gap: 8px; }
.piece { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11.5px; padding: 7px 13px; border-radius: var(--r-full); border: 1px solid var(--border); background: var(--bg2); color: var(--muted); text-decoration: none; transition: color .15s, border-color .15s; }
.piece:hover { color: var(--text); border-color: var(--brand); }
.piece i { font-size: 10px; color: var(--mc, var(--brand)); }

/* ── Projects (the one-page front, 2026-11-16) ───────────────────────── */
.wk-hero-short { min-height: auto; padding: 150px 32px 40px; }
.proj-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; max-width: 980px; margin: 0 auto; }
@media (max-width: 680px) { .proj-grid { grid-template-columns: minmax(0, 1fr); } }
.proj { background: var(--bg2); border: 1px solid var(--border); border-top: 2px solid var(--mc, var(--brand)); border-radius: var(--r-lg); padding: 24px 24px 20px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.proj-head { display: flex; align-items: center; gap: 10px; }
.proj-head i { color: var(--mc, var(--brand)); font-size: 16px; }
.proj h2 { font-family: var(--ui); font-size: 19px; font-weight: 700; letter-spacing: -.01em; color: var(--text); }
.proj p { font-size: 13px; line-height: 1.7; color: var(--muted); max-width: 70ch; }
.proj-inset { border: 1px solid color-mix(in srgb, var(--mc) 30%, transparent); background: color-mix(in srgb, var(--mc) 7%, transparent); border-radius: var(--r-md); padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.proj-inset-tag { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--mc); display: flex; align-items: center; gap: 8px; }
.proj-links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: auto; padding-top: 4px; }
.proj-links a { font-size: 12px; color: var(--mc, var(--brand)); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.proj-links a:hover, .proj-links a:focus-visible { text-decoration: underline; }
.proj-links a i { font-size: 10px; }
.proj-soon { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--border); border-radius: var(--r-full); padding: 3px 10px; }
@media (max-width: 680px) { .wk-hero-short { padding: 110px 20px 24px; } }
.wk-section-tight { padding-top: 10px; }
.wk-section-tight .wk-secthead { max-width: 980px; margin: 0 auto 20px; }
.proj-compact { text-decoration: none; color: inherit; gap: 6px; padding: 18px 20px 16px; transition: border-color .15s, transform .15s; }
.proj-compact:hover, .proj-compact:focus-visible { border-color: var(--mc); transform: translateY(-1px); }
.proj-compact h3 { font-family: var(--ui); font-size: 16px; font-weight: 700; color: var(--text); }
.proj-compact p { font-size: 12.5px; }
.proj-url { font-size: 11.5px; color: var(--mc); display: inline-flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 4px; }
.proj-url i { font-size: 9px; }
@media (prefers-reduced-motion: reduce) { .proj-compact { transition: none; } .proj-compact:hover { transform: none; } }
.proj-grid-3 { display: flex; flex-wrap: wrap; justify-content: center; }
.proj-grid-3 > .proj { flex: 0 1 calc((100% - 36px) / 3); }
@media (max-width: 860px) { .proj-grid-3 > .proj { flex-basis: calc((100% - 18px) / 2); } }
@media (max-width: 560px) { .proj-grid-3 > .proj { flex-basis: 100%; } }
.kit { max-width: 980px; margin: 0 auto; display: flex; align-items: center; gap: 20px 24px; flex-wrap: wrap; background: var(--bg2); border: 1px solid var(--border); border-left: 3px solid var(--mc); border-radius: var(--r-lg); padding: 20px 24px; }
.kit-icon { font-size: 26px; color: var(--mc); }
.kit-text { flex: 1 1 320px; min-width: 0; }
.kit-text h2 { font-family: var(--ui); font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.kit-text p { font-size: 12.5px; line-height: 1.65; color: var(--muted); }
.kit-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.kit-actions a { font-size: 12px; color: var(--mc); text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.kit-actions a:hover { text-decoration: underline; }
.kit-btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px; border-radius: var(--r-full); border: 1px dashed color-mix(in srgb, var(--mc) 50%, transparent); color: var(--mc); font-size: 12px; cursor: default; }
.proj .proj-also { font-size: 12.5px; color: var(--muted); border-left: 2px solid var(--mc); padding-left: 10px; }
.proj-also i, .proj-also strong { color: var(--mc); }
.proj-also a { color: var(--mc); }
/* ── CTA ───────────────────────────────────────────────────────────────── */
.wk-cta { position: relative; z-index: 10; max-width: 720px; margin: 0 auto; padding: 0 32px 110px; text-align: center; }
.wk-cta h2 { font-family: var(--ui); font-size: clamp(24px, 3.4vw, 34px); font-weight: 800; color: var(--text); margin-bottom: 14px; letter-spacing: -.02em; }
.wk-cta p { font-size: 13px; color: var(--muted); line-height: 1.75; margin-bottom: 26px; }
.wk-cta a.cta-btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 26px; border-radius: var(--r-full); background: var(--brand); color: #fff; text-decoration: none; font-family: var(--mono); font-size: 12px; letter-spacing: .06em; transition: background .15s; }
.wk-cta a.cta-btn:hover { background: color-mix(in srgb, var(--brand) 80%, #000); }

/* ── Footer ────────────────────────────────────────────────────────────── */
.wk-footer { position: relative; z-index: 10; text-align: center; padding: 24px 32px 40px; border-top: 1px solid var(--border); font-size: 11px; color: var(--faint); letter-spacing: .05em; }
.wk-footer a { color: var(--muted); text-decoration: none; }
.wk-footer a:hover { color: var(--text); }

/* ── Mobile ────────────────────────────────────────────────────────────── */
@media (max-width: 680px) {
  .wk-nav { padding: 14px 20px; }
  .wk-hero { padding: 110px 20px 50px; }
  .hero-stats { gap: 22px; }
  .wk-section { padding: 20px 16px 60px; }
  .case-flagship { padding: 26px 22px; }
  .founder { padding: 24px 22px; }
  .orb-1 { width: 400px; height: 400px; }
  .orb-2 { width: 320px; height: 320px; }
  .orb-3 { width: 400px; height: 400px; }
}
.kit-btn-live { border-style: solid; background: var(--mc); color: #fff !important; cursor: pointer; text-decoration: none !important; }
.kit-btn-live:hover { background: color-mix(in srgb, var(--mc) 82%, #000); }
/* ── /kit/ page ──────────────────────────────────────────────────────── */
.kit-shots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.kit-shots figure { margin: 0; background: var(--bg2); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.kit-shots img { display: block; width: 100%; height: 260px; object-fit: cover; object-position: top; }
.kit-shots figcaption { font-size: 11px; color: var(--muted); padding: 8px 12px; }
.kit-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 28px; padding: 0; list-style: none; }
.kit-list li { font-size: 13px; line-height: 1.6; color: var(--muted); padding-left: 16px; position: relative; }
.kit-list li::before { content: ''; position: absolute; left: 0; top: .65em; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
.kit-list strong { color: var(--text); font-weight: 600; }
.kit-steps { counter-reset: s; display: grid; gap: 10px; padding: 0; list-style: none; max-width: 70ch; }
.kit-steps li { counter-increment: s; font-size: 13px; color: var(--muted); padding-left: 30px; position: relative; }
.kit-steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: 50%; background: var(--bg3); color: var(--text); font-size: 11px; display: grid; place-items: center; }
.kit-steps code, .kit-page code { font-family: var(--mono); font-size: 12px; background: var(--bg3); padding: 1px 6px; border-radius: 4px; color: var(--text); }
@media (max-width: 760px) { .kit-shots { grid-template-columns: minmax(0, 1fr); } .kit-list { grid-template-columns: minmax(0, 1fr); } }
.kit-page .wk-section > * { max-width: 980px; margin-left: auto; margin-right: auto; }

/* ════════════════════════════════════════════════════════════════════════
   2026-11-17 — the deck. The public pages take the internal app's three
   themes (dark default, light, terminal: same tokens as static/css/main.css,
   same `hl_theme` key) and one colour rule:

   EVERY CARD HAS THE SAME LIGHTNESS AND CHROMA; ONLY THE HUE CHANGES.
   Colours are oklch(L C h). L and C are set once per theme (--card-l,
   --card-c); a card supplies --h. In OKLCH equal L reads as equal weight, so
   fifteen hues sit side by side and none shouts. (In hex/HSL a yellow and a
   blue at the "same" lightness are nowhere near it.) Terminal keeps the hues
   but drops chroma, so they read as tints on a phosphor screen.

   The page accent is the same formula on --page-h, a registered <number>, so
   it can be animated and transitioned: it drifts slowly through neighbouring
   hues (the old "chameleon"), and takes the hue of whichever card you touch.
   ════════════════════════════════════════════════════════════════════════ */
@property --page-h { syntax: '<number>'; inherits: true; initial-value: 285; }
@keyframes hue-drift { 0%,100% { --page-h: 285; } 25% { --page-h: 262; } 50% { --page-h: 232; } 75% { --page-h: 305; } }
@keyframes hue-lap   { from { --page-h: 0; } to { --page-h: 360; } }

:root {
  --bg: #0a0a0c; --bg2: #111115; --bg3: #18181e; --bg4: #1f1f28;
  --border: #2a2a36; --text: #e8e6f0; --muted: #8f8da3; --faint: #5a5868;
  --brand-l: .72; --brand-c: .16; --card-l: .80; --card-c: .13;
  --brand: #7c6af7;
  --brand: oklch(var(--brand-l) var(--brand-c) var(--page-h));
  --on-brand: #0a0a0c;
  --mono: 'DM Mono', ui-monospace, monospace; --ui: 'Syne', system-ui, sans-serif;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f5f4f9; --bg2: #ffffff; --bg3: #eeedf5; --bg4: #e5e3f0;
  --border: #d0cee6; --text: #1a1828; --muted: #5a5870; --faint: #9b99b0;
  --brand-l: .50; --brand-c: .19; --card-l: .47; --card-c: .15;
  --on-brand: #ffffff;
  color-scheme: light;
}
:root[data-theme="terminal"] {
  --bg: #0a0d0a; --bg2: #16241a; --bg3: #0e1410; --bg4: #1c2e21;
  --border: #2f4a36; --text: #dfe8dc; --muted: #8a9c86; --faint: #5c6b58;
  --card-l: .86; --card-c: .07;
  --brand: #9ff2a8; --on-brand: #0a0d0a;
  --mono: 'IBM Plex Mono', 'DM Mono', monospace; --ui: 'IBM Plex Sans', 'Syne', sans-serif;
  color-scheme: dark;
}
html { animation: hue-drift 180s ease-in-out infinite; transition: --page-h .7s ease; }
html.held { animation: none; }
html.lap { animation: hue-lap 3.2s linear 1; }
body { animation: none; background: var(--bg); }
@media (prefers-reduced-motion: reduce) { html, html.lap { animation: none; transition: none; } }
.orb-1 { background: radial-gradient(circle, var(--brand) 0%, transparent 70%); }
.orb-2 { background: radial-gradient(circle, oklch(var(--card-l) var(--card-c) calc(var(--page-h) - 90)) 0%, transparent 70%); }
.orb-3 { background: radial-gradient(circle, oklch(var(--card-l) var(--card-c) calc(var(--page-h) + 110)) 0%, transparent 70%); }
:root[data-theme="light"] .orb { opacity: .12; }
:root[data-theme="terminal"] .orb { display: none; }
:root[data-theme="terminal"] body::after { opacity: .5; background-image: repeating-linear-gradient(0deg, rgba(0,0,0,.18) 0 1px, transparent 1px 3px); }
.wk-nav.scrolled { background: color-mix(in srgb, var(--bg) 78%, transparent); }
.wk-nav-links a.cta, .case-tag { border-color: color-mix(in srgb, var(--brand) 40%, transparent); background: color-mix(in srgb, var(--brand) 10%, transparent); }
.wk-nav-links a.cta:hover { background: color-mix(in srgb, var(--brand) 20%, transparent); }
.wk-cta a.cta-btn, .kit-btn-live { color: var(--on-brand) !important; }
.kit, .kit-page { --mc: var(--brand); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }

/* ── Theme switch (three states, like the app) ────────────────────────── */
.theme-sw { display: inline-flex; border: 1px solid var(--border); border-radius: var(--r-full); padding: 2px; background: var(--bg2); }
.theme-sw button { all: unset; cursor: pointer; font: 500 10px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 7px 11px; border-radius: var(--r-full); display: inline-flex; gap: 6px; align-items: center; }
.theme-sw button[aria-pressed="true"] { background: var(--brand); color: var(--on-brand); }
.theme-sw button:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
@media (max-width: 560px) { .theme-sw button span { display: none; } }

/* ── Deck bar: filters + how many you have opened ─────────────────────── */
.deck-wrap { position: relative; z-index: 10; max-width: 1160px; margin: 0 auto; padding: 0 32px 80px; }
.deck-bar { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { all: unset; cursor: pointer; font: 500 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; padding: 9px 14px; border-radius: var(--r-full); border: 1px solid var(--border); color: var(--muted); background: var(--bg2); transition: color .15s, border-color .15s; }
.chip:hover { color: var(--text); border-color: var(--brand); }
.chip[aria-pressed="true"] { color: var(--on-brand); background: var(--brand); border-color: var(--brand); }
.chip:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.deck-count { font: 400 11px/1 var(--mono); color: var(--muted); display: flex; align-items: center; gap: 10px; font-variant-numeric: tabular-nums; }
.pips { display: inline-flex; gap: 3px; }
.pips i { width: 7px; height: 14px; border-radius: 2px; background: var(--bg4); transition: background .3s; }
.pips i.on { background: oklch(var(--card-l) var(--card-c) var(--h)); }
.deck-done-msg { display: none; color: var(--brand); }
html.deck-done .deck-done-msg { display: inline; }

/* ── The cards ────────────────────────────────────────────────────────── */
.deck { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; grid-auto-flow: dense; }
.card { --mc: oklch(var(--card-l) var(--card-c) var(--h)); position: relative; background: var(--bg2); border: 1px solid var(--border); border-radius: 14px; min-width: 0; view-transition-class: card; transition: border-color .2s; }
.card[hidden] { display: none; }
.card:hover, .card.open { border-color: color-mix(in srgb, var(--mc) 60%, var(--border)); }
.card-front { all: unset; box-sizing: border-box; cursor: pointer; display: grid; grid-template-columns: 34px minmax(0, 1fr); width: 100%; height: 100%; border-radius: 14px; position: relative; overflow: hidden; transform: perspective(900px) rotateX(calc(var(--ry, 0) * 1deg)) rotateY(calc(var(--rx, 0) * 1deg)); transition: transform .25s ease; }
.card-front:focus-visible { outline: 2px solid var(--mc); outline-offset: 3px; }
/* the rail: a card number and its kind, like a ticket stub */
.card-rail { background: color-mix(in srgb, var(--mc) 16%, var(--bg3)); border-right: 1px dashed color-mix(in srgb, var(--mc) 45%, transparent); display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 12px 0; color: var(--mc); }
.card-rail b { font: 700 13px/1 var(--ui); font-variant-numeric: tabular-nums; }
.card-rail i { font: 500 9px/1 var(--mono); font-style: normal; letter-spacing: .18em; text-transform: uppercase; writing-mode: vertical-rl; transform: rotate(180deg); }
.card-face { display: flex; flex-direction: column; min-width: 0; }
.card-meta { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-meta strong { font: 700 18px/1.15 var(--ui); letter-spacing: -.01em; color: var(--text); }
.card-meta span { font-size: 12.5px; line-height: 1.55; color: var(--muted); }
.card-meta em { font: 400 11px/1 var(--mono); font-style: normal; color: var(--mc); margin-top: auto; padding-top: 8px; display: flex; justify-content: space-between; gap: 8px; }
.card-meta em::after { content: 'open +'; color: var(--faint); letter-spacing: .08em; text-transform: uppercase; font-size: 10px; }
.card.open .card-meta em::after { content: 'close \2212'; color: var(--mc); }
/* a light that follows the pointer across the card */
.card-sheen { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .25s; background: radial-gradient(420px circle at calc(var(--mx, 50) * 1%) calc(var(--my, 50) * 1%), color-mix(in srgb, var(--mc) 26%, transparent), transparent 60%); }
.card-front:hover .card-sheen { opacity: 1; }

/* ── Thumbnails: a small drawing of the kind of page it is ────────────── */
.card-thumb { --a: color-mix(in srgb, var(--mc) 70%, var(--bg3)); --b: color-mix(in srgb, var(--mc) 28%, var(--bg3)); --c: color-mix(in srgb, var(--mc) 12%, var(--bg3)); height: 118px; background-color: var(--bg3); border-bottom: 1px solid var(--border); position: relative; background-repeat: no-repeat; }
.card-thumb::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 14px; background: radial-gradient(circle at 12px 7px, var(--a) 2.5px, transparent 3px), radial-gradient(circle at 22px 7px, var(--b) 2.5px, transparent 3px), radial-gradient(circle at 32px 7px, var(--b) 2.5px, transparent 3px), var(--c); }
.card-thumb img { position: absolute; inset: 14px 0 0 0; width: 100%; height: calc(100% - 14px); object-fit: cover; object-position: top; }
.mock-feed { background-image: linear-gradient(var(--a), var(--a)), linear-gradient(var(--b), var(--b)), linear-gradient(var(--a), var(--a)), linear-gradient(var(--b), var(--b)), linear-gradient(var(--a), var(--a)), linear-gradient(var(--b), var(--b)); background-size: 26px 24px, 58% 8px, 26px 24px, 46% 8px, 26px 24px, 52% 8px; background-position: 14px 26px, 50px 34px, 14px 56px, 50px 64px, 14px 86px, 50px 94px; }
.mock-wave { background-image: repeating-linear-gradient(90deg, var(--a) 0 3px, transparent 3px 9px), repeating-linear-gradient(90deg, var(--b) 0 3px, transparent 3px 6px); background-size: 84% 30px, 84% 62px; background-position: center 56px, center 40px; }
.mock-board { background-image: linear-gradient(var(--a), var(--a)), linear-gradient(var(--b), var(--b)), linear-gradient(var(--b), var(--b)), linear-gradient(var(--a), var(--a)), linear-gradient(var(--b), var(--b)); background-size: 26% 44px, 26% 30px, 26% 54px, 26% 34px, 26% 28px; background-position: 6% 26px, 50% 26px, 94% 26px, 50% 64px, 6% 78px; }
.mock-shop { background-image: linear-gradient(var(--b), var(--b)), linear-gradient(var(--a), var(--a)), linear-gradient(var(--b), var(--b)), linear-gradient(var(--a), var(--a)), linear-gradient(var(--a), var(--a)), linear-gradient(var(--a), var(--a)); background-size: 27% 52px, 27% 52px, 27% 52px, 18% 6px, 18% 6px, 18% 6px; background-position: 6% 26px, 50% 26px, 94% 26px, 5% 88px, 50% 88px, 86% 88px; }
.mock-term { background-image: linear-gradient(var(--a), var(--a)), linear-gradient(var(--b), var(--b)), linear-gradient(var(--b), var(--b)), linear-gradient(var(--a), var(--a)), linear-gradient(var(--b), var(--b)), linear-gradient(var(--a), var(--a)); background-size: 8px 8px, 46% 6px, 62% 6px, 8px 8px, 38% 6px, 10px 12px; background-position: 14px 28px, 30px 29px, 14px 46px, 14px 64px, 30px 65px, 14px 84px; }
.mock-grid { background-image: linear-gradient(var(--a), var(--a)), linear-gradient(var(--b), var(--b)), linear-gradient(var(--a), var(--a)), linear-gradient(var(--b), var(--b)), linear-gradient(var(--b), var(--b)), linear-gradient(var(--c), var(--c)), linear-gradient(var(--c), var(--c)), linear-gradient(var(--c), var(--c)); background-size: 22% 18px, 22% 18px, 22% 18px, 22% 18px, 22% 18px, 28% 86px, 28% 86px, 28% 86px; background-position: 8% 32px, 8% 58px, 50% 32px, 92% 32px, 92% 58px, 5% 24px, 50% 24px, 95% 24px; }
.mock-page { background-image: linear-gradient(var(--b), var(--b)), linear-gradient(var(--a), var(--a)), linear-gradient(var(--b), var(--b)), linear-gradient(var(--b), var(--b)), linear-gradient(var(--a), var(--a)); background-size: 100% 40px, 44% 9px, 70% 6px, 58% 6px, 54px 14px; background-position: 0 14px, 14px 30px, 14px 68px, 14px 82px, 14px 96px; }
.mock-viz { background-image: repeating-radial-gradient(circle at 50% 62%, var(--a) 0 2px, transparent 2px 11px); }
.mock-viz::after { content: ''; position: absolute; inset: 14px 0 0 0; background: radial-gradient(circle at 50% 56%, transparent 0 46%, var(--bg3) 72%); }

/* ── Open: the back of the card slides out beside the front ───────────── */
.card-back { display: none; }
.card.open { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(250px, 340px) minmax(0, 1fr); }
.card.open .card-front { border-radius: 14px 0 0 14px; }
.card.open .card-back { display: block; border-left: 1px dashed color-mix(in srgb, var(--mc) 45%, transparent); }
.card-back-in { padding: 18px 22px 20px; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 18px 28px; height: 100%; align-content: start; }
.card-back h3 { font: 500 10px/1 var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--mc); margin-bottom: 10px; }
.feat { list-style: none; padding: 0; display: grid; gap: 8px; counter-reset: f; }
.feat li { counter-increment: f; font-size: 13px; line-height: 1.5; color: var(--text); padding-left: 26px; position: relative; }
.feat li::before { content: counter(f); position: absolute; left: 0; top: 1px; width: 17px; height: 17px; border-radius: 4px; background: color-mix(in srgb, var(--mc) 20%, transparent); color: var(--mc); font: 500 10px/17px var(--mono); text-align: center; }
.sig { display: block; text-decoration: none; border: 1px solid color-mix(in srgb, var(--mc) 40%, transparent); background: color-mix(in srgb, var(--mc) 9%, transparent); border-radius: 10px; padding: 12px 14px; transition: background .15s; }
.sig:hover { background: color-mix(in srgb, var(--mc) 17%, transparent); }
.sig b { display: block; font: 700 15px/1.2 var(--ui); color: var(--text); margin-bottom: 4px; }
.sig span { font-size: 12px; line-height: 1.5; color: var(--muted); }
.stats { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 0; border-top: 1px solid var(--border); padding-top: 12px; margin: 0; align-items: end; }
.stats div { flex: 1 1 120px; }
.stats dt { font: 500 9px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--faint); margin-bottom: 5px; }
.stats dd { margin: 0; font: 600 13px/1.2 var(--ui); color: var(--text); }
.visit { font: 500 12px/1 var(--mono); color: var(--on-brand); background: var(--mc); padding: 10px 16px; border-radius: var(--r-full); text-decoration: none; white-space: nowrap; display: inline-flex; gap: 8px; align-items: center; }
:root[data-theme="light"] .visit { color: #fff; }
.visit:hover { filter: brightness(1.1); }
@keyframes slide-in { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; transform: none; } }
.card.open .feat li, .card.open .sig, .card.open .stats { animation: slide-in .38s cubic-bezier(.2,.7,.2,1) both; }
.card.open .feat li:nth-child(2) { animation-delay: .05s; } .card.open .feat li:nth-child(3) { animation-delay: .1s; }
.card.open .feat li:nth-child(4) { animation-delay: .15s; } .card.open .sig { animation-delay: .2s; } .card.open .stats { animation-delay: .26s; }
::view-transition-group(.card) { animation-duration: .32s; animation-timing-function: cubic-bezier(.2,.7,.2,1); }
@media (max-width: 900px) { .deck { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) {
  .deck-wrap { padding: 0 16px 60px; }
  .deck { grid-template-columns: minmax(0, 1fr); }
  .card.open { grid-template-columns: minmax(0, 1fr); }
  .card.open .card-front { border-radius: 14px 14px 0 0; }
  .card.open .card-back { border-left: 0; border-top: 1px dashed color-mix(in srgb, var(--mc) 45%, transparent); }
  .card-back-in { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce), (pointer: coarse) { .card-front { transform: none !important; } }
@media (prefers-reduced-motion: reduce) { .card.open .feat li, .card.open .sig, .card.open .stats { animation: none; } }

/* ── Loyd's terminal: replays of real work ────────────────────────────── */
.loyd { position: relative; z-index: 10; max-width: 980px; margin: 0 auto; padding: 0 32px 90px; }
.loyd-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 24px; margin-bottom: 16px; }
.term { background: #0b0d10; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; box-shadow: 0 20px 60px -30px color-mix(in srgb, var(--brand) 60%, transparent); }
:root[data-theme="terminal"] .term { background: #060906; }
.term-bar { display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-bottom: 1px solid #23262d; font: 400 11px/1 var(--mono); color: #7d8590; }
.term-bar i { width: 9px; height: 9px; border-radius: 50%; background: #2d3139; }
.term-bar span { margin-left: auto; }
.term-out { margin: 0; padding: 16px 18px 20px; min-height: 290px; font: 400 12.5px/1.75 var(--mono); color: #c9d1d9; white-space: pre-wrap; word-break: break-word; overflow-x: auto; }
.term-out .c { color: #7d8590; } .term-out .p { color: #e6edf3; } .term-out .p::before { content: 'loyd \25B8 '; color: var(--brand); }
.term-out .o { color: #9aa4af; } .term-out .m { color: #f0a3a3; background: rgba(240,90,90,.10); display: inline-block; width: 100%; } .term-out .m::before { content: '- '; }
.term-out .a { color: #9be9a8; background: rgba(60,200,110,.10); display: inline-block; width: 100%; } .term-out .a::before { content: '+ '; }
.term-out .ok { color: var(--brand); } .term-out .ok::before { content: '\2713  '; }
.term-caret { display: inline-block; width: 7px; height: 14px; background: var(--brand); vertical-align: -2px; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.term-foot { font: 400 11px/1.5 var(--mono); color: var(--muted); margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: space-between; }
.term-foot button { all: unset; cursor: pointer; color: var(--brand); } .term-foot button:hover { text-decoration: underline; } .term-foot button:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
@media (max-width: 680px) { .loyd { padding: 0 16px 60px; } .term-out { font-size: 11.5px; min-height: 320px; } }
@media (prefers-reduced-motion: reduce) { .term-caret { animation: none; } }

/* ── Contact (the one way in; /works/ redirects here) ─────────────────── */
.contact { position: relative; z-index: 10; max-width: 1060px; margin: 0 auto; padding: 0 32px 100px; scroll-margin-top: 80px; }
.contact-in { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 32px 48px; align-items: start; background: var(--bg2); border: 1px solid var(--border); border-radius: 16px; padding: 32px; position: relative; overflow: hidden; }
.contact-in::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 2px; background: linear-gradient(90deg, transparent, var(--brand), transparent); }
.contact-copy p { font-size: 13px; line-height: 1.75; color: var(--muted); max-width: 42ch; }
.contact-form { display: grid; gap: 14px; }
.contact-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.contact-form label { display: grid; gap: 6px; }
.contact-form label span { font: 500 10px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.contact-form input, .contact-form select, .contact-form textarea { font: 400 14px/1.5 var(--mono); color: var(--text); background: var(--bg3); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; width: 100%; min-width: 0; resize: vertical; }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
.contact-form [aria-invalid="true"] { border-color: oklch(.65 .2 25); }
.contact-foot { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; }
.contact-form .visit { --mc: var(--brand); border: 0; cursor: pointer; }
.contact-form .visit[disabled] { opacity: .6; cursor: wait; }
.contact-msg { font-size: 12.5px; color: var(--muted); margin: 0; }
.contact-msg.ok { color: var(--brand); }
.contact-msg.err { color: oklch(.68 .19 25); }
@media (max-width: 760px) { .contact { padding: 0 16px 70px; } .contact-in { grid-template-columns: minmax(0, 1fr); padding: 22px 18px; } .contact-row { grid-template-columns: minmax(0, 1fr); } }
