/* =========================================================================
   Brian Gomez — Personal Operating System
   Light + dark mode of one site. Theme via [data-theme] on <html>.
   ========================================================================= */

:root {
  --bg: #f4efe5;
  --grid: rgba(11, 11, 11, 0.035);
  --grid-2: rgba(11, 11, 11, 0.03);
  --text: #0b0b0b;
  --text-soft: #211f1b;
  --text-dim: #6a655c;
  --strike-word: #211f1b;
  --accent: #7c130d;
  /* Accent for SMALL text (labels, kickers, mono meta). Split from --accent
     because the dark-mode red fails 4.5:1 at label sizes; large headlines
     keep --accent, which clears the 3:1 large-text bar. */
  --accent-text: #7c130d;
  --signal: #d23b27;
  --head-big: #7c130d;
  --panel-bg: #15171a;
  --panel-text: #fbf7ee;
  --panel-line: rgba(251, 247, 238, 0.12);
  --line: rgba(11, 11, 11, 0.16);
  --hair: rgba(11, 11, 11, 0.1);
  --card: rgba(255, 252, 245, 0.7);
  --mark-bg: #0b0b0b;
  --mark-text: #f4efe5;
  --btn-bg: #0b0b0b;
  --btn-text: #f4efe5;
  --btn-hover: #7c130d;
  --glow: rgba(178, 35, 22, 0.16);
  --ring-line: rgba(11, 11, 11, 0.55);
  --gold: #b07d2a;
  --figure-filter: grayscale(0.24) contrast(1.12) saturate(0.85);
  --grain-op: 0.2;
  --grain-blend: multiply;
  --header-bg: rgba(244, 239, 229, 0.86);

  /* Cards that invert on hover (bg -> --text, text -> --bg). These derive
     from --bg/--text, and because the dark override lands on the same
     element (:root), they re-resolve per theme — define them once only.
     They replace a hardcoded ivory that vanished on dark-mode hover. */
  --on-invert-dim: color-mix(in srgb, var(--bg) 80%, var(--text));
  --on-invert-dimmer: color-mix(in srgb, var(--bg) 72%, var(--text));

  --display: "Playfair Display", Georgia, serif;
  --label: "Archivo Narrow", "Arial Narrow", sans-serif;
  --body: "Archivo", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

[data-theme="dark"] {
  --bg: #0e0f12;
  --grid: rgba(233, 224, 206, 0.04);
  --grid-2: rgba(233, 224, 206, 0.03);
  --text: #e9e0ce;
  --text-soft: rgba(233, 224, 206, 0.86);
  --text-dim: rgba(233, 224, 206, 0.58);
  --strike-word: rgba(233, 224, 206, 0.82);
  --accent: #c0271a;
  --accent-text: #e2452c;
  --signal: #e2452c;
  --head-big: #c0271a;
  --panel-bg: #08090b;
  --panel-text: #e9e0ce;
  --panel-line: rgba(233, 224, 206, 0.1);
  --line: rgba(233, 224, 206, 0.15);
  --hair: rgba(233, 224, 206, 0.1);
  --card: rgba(233, 224, 206, 0.03);
  --mark-bg: #e9e0ce;
  --mark-text: #0e0f12;
  --btn-bg: #c0271a;
  --btn-text: #f7efe0;
  --btn-hover: #e2452c;
  --glow: rgba(192, 39, 26, 0.3);
  --ring-line: rgba(233, 224, 206, 0.8);
  --gold: #c9a24a;
  --figure-filter: grayscale(0.6) contrast(1.32) brightness(0.9);
  --grain-op: 0.36;
  --grain-blend: soft-light;
  --header-bg: rgba(14, 15, 18, 0.82);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  font-family: var(--body);
  background:
    linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 58px 58px,
    linear-gradient(var(--grid-2) 1px, transparent 1px) 0 0 / 58px 58px,
    var(--bg);
  transition: background-color 280ms ease, color 280ms ease;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(circle at 15% 10%, var(--glow), transparent 26%),
    radial-gradient(circle at 88% 88%, var(--glow), transparent 30%);
}

.grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: var(--grain-op);
  mix-blend-mode: var(--grain-blend);
  background-image:
    repeating-radial-gradient(circle at 16% 20%, rgba(120, 120, 120, 0.5) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(122deg, rgba(150, 150, 150, 0.4) 0 1px, transparent 1px 6px);
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* Keyboard focus. currentColor is deliberate: it adapts to every surface
   the site has (ivory, obsidian, the dark panels, the accent-red card)
   without needing a per-surface override. */
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

/* The header is sticky, so anchored sections must clear it or the heading
   lands underneath. Header measures 65px desktop / 146px wrapped mobile. */
section[id], .work-card[id], #top { scroll-margin-top: 84px; }

.skip-link {
  position: absolute; left: 12px; top: -100px; z-index: 60;
  padding: 12px 18px; background: var(--text); color: var(--bg);
  font-family: var(--label); font-size: 12px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  transition: top 140ms;
}
.skip-link:focus-visible { top: 12px; }

/* ===== REVEAL (enhancement only) ===== */
[data-animate] { transition: opacity 700ms ease, transform 700ms ease; }
.js [data-animate] { opacity: 0; transform: translateY(18px); }
.js [data-animate].is-visible { opacity: 1; transform: translateY(0); }

/* ===== HEADER ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 20px;
  max-width: 1360px;
  margin: 0 auto;
  padding: 14px clamp(18px, 4vw, 46px);
  border-bottom: 1px solid var(--line);
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(16px); /* iOS Safari still needs the prefix. */
  backdrop-filter: blur(16px);
}
.brand { display: flex; align-items: center; gap: 11px; font-family: var(--label); font-weight: 700; letter-spacing: 0.14em; font-size: 14px; text-transform: uppercase; }
.beta { margin-left: 2px; padding: 3px 6px 2px; border: 1px solid var(--accent-text); color: var(--accent-text); font-family: var(--mono); font-size: 9.5px; font-weight: 500; letter-spacing: 0.16em; line-height: 1; }
.mark { display: grid; place-items: center; width: 34px; height: 34px; background: var(--mark-bg); color: var(--mark-text); font-size: 13px; }
.site-nav { display: flex; flex-wrap: wrap; gap: clamp(12px, 2vw, 26px); justify-content: center; }
.site-nav a { font-family: var(--label); font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dim); transition: color 160ms; }
.site-nav a:hover { color: var(--text); }
.toggle {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text); background: transparent; border: 1px solid var(--line);
  padding: 8px 12px; cursor: pointer; transition: border-color 160ms;
}
.toggle:hover { border-color: var(--accent); }
.header-cta {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 16px;
  font-family: var(--label); font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  border: 1px solid var(--text); color: var(--text); transition: background 160ms, color 160ms;
}
.header-cta:hover { background: var(--text); color: var(--bg); }

/* ===== SHARED SECTION SHELL ===== */
.section-label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.28em; text-transform: uppercase; color: var(--accent-text); margin: 0 0 12px; }
.section-head { display: grid; grid-template-columns: 0.5fr 1.5fr; gap: 18px; align-items: end; border-bottom: 1px solid var(--line); padding-bottom: 26px; margin-bottom: 34px; }
h2.head { margin: 0; font-family: var(--display); font-weight: 900; text-transform: uppercase; line-height: 0.9; font-size: clamp(36px, 5vw, 76px); }

/* ===== HERO =====
   Professional landing: name, positioning, contact CTAs. The struck masthead
   and manifesto voice moved to #coaching — see that section below. */
/* The portrait glow is wider than the portrait; clip it so phones don't scroll sideways. */
.hero { overflow-x: clip; max-width: 1360px; margin: 0 auto; padding: clamp(40px, 6vw, 86px) clamp(18px, 4vw, 46px) clamp(34px, 4.5vw, 60px); }
.hero-name { margin: 0 0 22px; font-family: var(--display); font-weight: 900; text-transform: uppercase; line-height: 0.86; letter-spacing: -0.012em; font-size: clamp(52px, 8vw, 118px); color: var(--text); }
.kicker { margin: 0 0 18px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.34em; text-transform: uppercase; color: var(--accent-text); }
.kicker::before { content: ""; display: inline-block; width: 34px; height: 1px; margin-right: 12px; vertical-align: middle; background: var(--accent-text); }
.headline { margin: 0; font-family: var(--display); font-weight: 900; line-height: 0.82; text-transform: uppercase; letter-spacing: -0.005em; }
.struck { position: relative; display: inline-block; white-space: nowrap; font-size: clamp(24px, 3.7vw, 54px); font-weight: 700; color: var(--strike-word); letter-spacing: 0.01em; margin-bottom: 4px; }
.struck .strike { position: absolute; left: -2%; top: 15%; width: 104%; height: 80%; overflow: visible; pointer-events: none; }
.struck .strike path { stroke: var(--accent); }
.headline .big { display: block; color: var(--head-big); font-size: clamp(44px, 8vw, 112px); }

.hero-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(290px, 0.66fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.intro { max-width: 33em; margin: 4px 0 16px; font-size: clamp(16px, 1.2vw, 19px); line-height: 1.52; color: var(--text-soft); }
.intro b { color: var(--text); font-weight: 600; }
.intro-sub { max-width: 34em; margin: 0 0 30px; font-size: clamp(14.5px, 1vw, 16.5px); line-height: 1.6; color: var(--text-dim); }
.intro-sub b { color: var(--text-soft); font-weight: 600; }
.oldnew { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; max-width: 520px; margin: 0 0 28px; border-top: 1px solid var(--line); padding-top: 20px; }
.oldnew div span { display: block; font-family: var(--display); font-style: italic; font-weight: 700; font-size: 22px; margin-bottom: 6px; }
.oldnew .old span { color: var(--text-dim); }
.oldnew .new span { color: var(--accent); }
.oldnew em { font-family: var(--mono); font-style: normal; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-soft); }

.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; min-height: 50px; padding: 0 24px; font-family: var(--label); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; font-size: 13px; border: 1.5px solid var(--text); color: var(--text); transition: background 160ms, color 160ms, border-color 160ms; }
.btn.primary { background: var(--btn-bg); border-color: var(--btn-bg); color: var(--btn-text); }
.btn.primary:hover { background: var(--btn-hover); border-color: var(--btn-hover); }
.btn.ghost:hover { background: color-mix(in srgb, var(--text) 8%, transparent); }
.btn.on-dark { border-color: rgba(251, 247, 238, 0.6); color: var(--panel-text); }
.btn.on-dark:hover { background: rgba(251, 247, 238, 0.1); }

/* frameless figure */
.figure { position: relative; width: min(440px, 100%); margin-left: auto; }
.figure::before { content: ""; position: absolute; left: 52%; top: 44%; transform: translate(-50%, -50%); width: 116%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, var(--glow) 0 42%, transparent 70%); z-index: 0; }
.figure img { position: relative; z-index: 1; width: 100%; height: auto; filter: var(--figure-filter) drop-shadow(0 22px 26px rgba(0, 0, 0, 0.34)); }
.figure .ring { position: absolute; top: 6%; right: 2%; width: 104px; height: 104px; z-index: 3; display: grid; place-items: center; border: 1px solid var(--ring-line); border-radius: 50%; color: var(--text); }
.figure .ring::before, .figure .ring::after { content: ""; position: absolute; background: var(--ring-line); }
.figure .ring::before { width: 140px; height: 1px; }
.figure .ring::after { width: 1px; height: 140px; }
.figure .ring i { position: absolute; inset: 26px; border: 1px solid var(--ring-line); border-radius: 50%; }
.figure .ring i.core { inset: 40px; background: var(--accent); border: none; }
.figure .ring b { position: relative; z-index: 2; font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.16em; text-transform: uppercase; }
.figure .tag { position: absolute; left: -6px; bottom: 12%; z-index: 3; padding-left: 12px; border-left: 1px solid var(--accent); font-family: var(--mono); font-size: 10px; line-height: 1.5; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-dim); }

/* ===== STACK STRIP =====
   Scannable capability list under the hero — mirrors the GitHub profile's
   tech section. Deliberately plain: it exists to be read fast. */
.stack { max-width: 1360px; margin: 0 auto; padding: clamp(18px, 2.4vw, 26px) clamp(18px, 4vw, 46px); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: grid; grid-template-columns: auto 1fr; gap: clamp(14px, 3vw, 34px); align-items: baseline; }
.stack-label { margin: 0; font-family: var(--mono); font-size: 11px; letter-spacing: 0.28em; text-transform: uppercase; color: var(--accent-text); }
.stack-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.stack-list li { font-family: var(--label); font-size: 12.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-dim); }

/* ===== MANIFESTO (lives inside #coaching) ===== */
.manifesto { max-width: 1360px; margin: 0 auto; padding: clamp(26px, 3.4vw, 44px) clamp(18px, 4vw, 46px) 0; }
.m-kicker { font-family: var(--mono); font-size: 11px; letter-spacing: 0.28em; text-transform: uppercase; color: var(--accent-text); margin: 0 0 10px; }
.m-head { margin: 0; font-family: var(--display); font-weight: 900; text-transform: uppercase; line-height: 0.88; font-size: clamp(30px, 4.2vw, 62px); }
.m-head .one { color: var(--text); display: block; }
.m-head .two { color: var(--accent); display: block; }
.m-sub { margin: 16px 0 0; max-width: 42em; font-size: clamp(15px, 1.1vw, 18px); line-height: 1.5; color: var(--text-dim); }

/* ===== INSTRUMENTS ===== */
.instruments { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(20px, 3vw, 44px); align-items: stretch; max-width: 1360px; margin: 0 auto; padding: clamp(34px, 4vw, 64px) clamp(18px, 4vw, 46px); }
.panel-head { font-family: var(--mono); font-size: 11px; letter-spacing: 0.26em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 16px; display: flex; align-items: center; gap: 10px; }
.panel-head::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.ios { position: relative; }
.radial { width: 100%; height: auto; max-width: 560px; display: block; margin-top: 6px; }
.radial text { font-family: var(--label); fill: var(--text); }
.radial .lab { font-weight: 700; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; }
.radial .desc { font-family: var(--mono); font-size: 8.5px; fill: var(--text-dim); letter-spacing: 0.04em; }
.radial .core-t { fill: var(--panel-text); font-weight: 700; font-size: 11px; letter-spacing: 0.14em; }
[data-theme="dark"] .radial .core-t { fill: var(--text); }
.radial .connectors line { stroke: var(--line); }
.radial .orbit { stroke: var(--line); }
.radial .core-fill { fill: var(--accent); }
.radial .core-ring { stroke: var(--accent); stroke-opacity: 0.4; }
.radial .node { fill: var(--text); }

.diagnosis { background: var(--panel-bg); color: var(--panel-text); padding: clamp(22px, 2.4vw, 32px); position: relative; border: 1px solid var(--panel-line); }
.diagnosis .panel-head { color: var(--gold); }
.diagnosis .panel-head::after { background: var(--panel-line); }
.meters { list-style: none; margin: 0; padding: 0; }
.meters li { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--panel-line); }
.meters .name { font-family: var(--label); font-weight: 600; letter-spacing: 0.1em; font-size: 13px; text-transform: uppercase; color: rgba(233, 224, 206, 0.78); }
.dots { font-family: var(--mono); font-size: 13px; letter-spacing: 2px; }
.dots .on { color: var(--signal); }
.dots .off { color: rgba(233, 224, 206, 0.24); }
.meters .pct { font-family: var(--mono); font-size: 13px; color: var(--panel-text); min-width: 42px; text-align: right; }
.warn { margin-top: 18px; display: flex; gap: 10px; align-items: flex-start; font-family: var(--mono); font-size: 11px; line-height: 1.4; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(233, 224, 206, 0.72); }
.warn span { color: var(--signal); font-size: 14px; line-height: 1; }

/* ===== CRUCIBLE (always a dark zone) ===== */
.crucible { background: var(--panel-bg); color: var(--panel-text); border-block: 1px solid var(--panel-line); position: relative; }
.crucible-inner { display: grid; grid-template-columns: 0.84fr 1.16fr; gap: clamp(30px, 5vw, 72px); align-items: center; max-width: 1360px; margin: 0 auto; padding: clamp(54px, 7vw, 104px) clamp(18px, 4vw, 46px); }
.crucible .section-label { color: var(--gold); }
.crucible h2 { margin: 0 0 22px; font-family: var(--display); font-weight: 900; text-transform: uppercase; line-height: 0.88; font-size: clamp(40px, 6vw, 84px); color: var(--panel-text); }
.crucible p { margin: 0; color: rgba(233, 224, 206, 0.74); font-size: clamp(16px, 1.3vw, 20px); line-height: 1.5; max-width: 36em; }
.crucible-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }

.crucible-showcase { display: grid; grid-template-columns: minmax(220px, 0.78fr) minmax(220px, 1fr); gap: 22px; align-items: center; min-width: 0; }
.phone { background: #0c0a07; border: 1px solid rgba(233, 224, 206, 0.28); box-shadow: 0 26px 56px rgba(0, 0, 0, 0.5); min-height: 480px; padding: 22px; position: relative; }
.phone::before { content: ""; position: absolute; inset: 12px; border: 1px solid rgba(201, 162, 74, 0.4); pointer-events: none; }
.phone-top { display: flex; align-items: center; gap: 14px; position: relative; z-index: 1; }
.phone-top img { width: 52px; height: 52px; }
.phone-top span { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(233, 224, 206, 0.55); }
.phone-top strong { display: block; font-family: var(--label); font-size: 21px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold); margin-top: 4px; }
.trial-stack { display: grid; gap: 12px; margin-top: 56px; position: relative; z-index: 1; }
.trial-stack div { border: 1px solid rgba(233, 224, 206, 0.16); padding: 16px 18px; }
.trial-stack span { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(233, 224, 206, 0.55); }
.trial-stack strong { display: block; font-family: var(--display); font-weight: 700; font-size: 30px; line-height: 0.96; text-transform: uppercase; margin-top: 8px; color: var(--panel-text); }
.crucible-art { position: relative; min-height: 500px; }
.crucible-art img { position: absolute; box-shadow: 0 26px 58px rgba(0, 0, 0, 0.5); object-fit: cover; }
.crucible-art .rival { top: 0; right: 0; width: min(420px, 100%); height: 460px; }
.crucible-art .medal { bottom: 0; left: 0; width: 200px; height: 200px; border: 1px solid rgba(233, 224, 206, 0.22); }

/* ===== PRODUCT CARDS (coaching: "Also coming") ===== */
.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.product-card { background: var(--bg); padding: clamp(22px, 3vw, 36px); min-height: 300px; transition: background 160ms, color 160ms; }
.product-card .num { font-family: var(--display); font-weight: 900; font-size: 50px; color: var(--accent); line-height: 1; }
.product-card h3 { margin: 26px 0 14px; font-family: var(--display); font-weight: 700; text-transform: uppercase; line-height: 0.94; font-size: clamp(28px, 3vw, 42px); }
.product-card p { margin: 0; font-size: 15px; line-height: 1.46; color: var(--text-dim); }
.product-card a { display: inline-block; margin-top: 16px; font-family: var(--label); font-size: 12px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; border-bottom: 2px solid currentColor; padding-bottom: 5px; }
/* Same honest-status treatment the Workshop cards use, for a product that
   has no link yet. */
.product-status { display: inline-block; margin-top: 16px; font-family: var(--label); font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dim); }
.product-status::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; background: var(--accent-text); vertical-align: 1px; }
.product-card:hover .product-status { color: var(--on-invert-dim); }
.product-card:hover { background: var(--text); color: var(--bg); }
.product-card:hover .num { color: var(--bg); }
.product-card:hover p { color: var(--on-invert-dim); }

/* ===== WORKSHOP (proof of work) ===== */
.workshop { max-width: 1360px; margin: 0 auto; padding: clamp(54px, 7vw, 100px) clamp(18px, 4vw, 46px); border-top: 1px solid var(--line); }
.work-intro { margin: -10px 0 34px; max-width: 46em; font-size: clamp(15px, 1.15vw, 18px); line-height: 1.5; color: var(--text-soft); }
.work-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.work-card { background: var(--bg); padding: clamp(18px, 2.4vw, 28px); display: flex; flex-direction: column; gap: 12px; transition: background 160ms, color 160ms; }
/* overflow must not be visible, or a tall image overrides the 16:10 ratio. */
.work-shot { aspect-ratio: 16 / 10; overflow: hidden; display: grid; place-items: center; border: 1px solid var(--line); background:
  repeating-linear-gradient(135deg, transparent 0 10px, color-mix(in srgb, var(--line) 55%, transparent) 10px 11px); }
.work-shot span { font-family: var(--mono); font-size: 10px; letter-spacing: 0.26em; text-transform: uppercase; color: var(--text-dim); background: var(--bg); padding: 6px 10px; border: 1px solid var(--line); }
.work-shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.work-meta { margin: 4px 0 0; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-text); line-height: 1.5; }
.work-card h3 { margin: 0; font-family: var(--display); font-weight: 700; text-transform: uppercase; line-height: 0.94; font-size: clamp(26px, 2.6vw, 36px); }
.work-card p:not(.work-meta) { margin: 0; font-size: 14.5px; line-height: 1.46; color: var(--text-dim); }
.work-status { margin-top: auto; padding-top: 8px; font-family: var(--label); font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-soft); }
.work-status::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; background: var(--accent); vertical-align: 1px; }
.work-card > a { margin-top: auto; align-self: flex-start; font-family: var(--label); font-size: 12px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; border-bottom: 2px solid currentColor; padding-bottom: 5px; }
/* Crucible is the one card with a status AND a link. The status already
   claimed the auto margin, so a second one would split the free space
   between them instead of keeping the pair together at the bottom. */
.work-status + a { margin-top: 0; }
.work-card:hover { background: var(--text); color: var(--bg); }
.work-card:hover p:not(.work-meta), .work-card:hover .work-status { color: var(--on-invert-dim); }
/* The accent stack line is unreadable on the inverted card — same treatment
   the product-card number gets on hover. */
.work-card:hover .work-meta { color: var(--bg); }
.work-card:hover .work-shot span { background: var(--text); color: var(--on-invert-dim); }

/* ===== COACHING =====
   The manifesto's home. Order: struck masthead -> the Prescription beat ->
   who it's for -> the Identity OS instruments. */
#coaching { border-top: 1px solid var(--line); }
.coaching-head { max-width: 1360px; margin: 0 auto; padding: clamp(54px, 7vw, 100px) clamp(18px, 4vw, 46px) 0; }
.coaching-inner { display: grid; grid-template-columns: 1fr 0.9fr; gap: clamp(28px, 5vw, 70px); align-items: center; max-width: 1360px; margin: 0 auto; padding: clamp(38px, 5vw, 68px) clamp(18px, 4vw, 46px) clamp(20px, 3vw, 34px); }
.coaching-sub { margin: 0 0 18px; font-family: var(--display); font-weight: 700; text-transform: uppercase; line-height: 0.94; font-size: clamp(28px, 3.4vw, 48px); }
.coaching-copy p { margin: 0 0 26px; font-size: clamp(16px, 1.2vw, 19px); line-height: 1.5; color: var(--text-soft); max-width: 34em; }
.fit-list { display: grid; gap: 1px; list-style: none; margin: 0; padding: 0; }
.fit-list li { background: var(--card); border-left: 4px solid var(--accent); padding: 18px 20px; font-size: clamp(16px, 1.3vw, 20px); font-weight: 600; line-height: 1.32; }

/* ===== MEDIA ===== */
.media { max-width: 1360px; margin: 0 auto; padding: clamp(54px, 7vw, 100px) clamp(18px, 4vw, 46px); }
.media-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.media-card { background: var(--bg); padding: clamp(22px, 3vw, 34px); min-height: 230px; display: flex; flex-direction: column; gap: 10px; transition: background 160ms, color 160ms; }
.media-card .badge { display: grid; place-items: center; width: 46px; height: 46px; border: 1px solid currentColor; font-family: var(--label); font-weight: 700; font-size: 16px; letter-spacing: 0.06em; }
.media-card strong { margin-top: auto; font-family: var(--display); font-weight: 700; text-transform: uppercase; font-size: 34px; line-height: 0.95; }
.media-card em { font-style: normal; font-size: 14px; color: var(--text-dim); line-height: 1.3; }
.media-card:hover { background: var(--text); color: var(--bg); }
.media-card:hover em { color: var(--on-invert-dimmer); }
/* Beta: a handle that isn't live yet renders as a non-link, so it must not
   invite a click with the hover inversion. */
.media-card.soon:hover { background: var(--bg); color: inherit; }
.media-card.soon:hover em { color: var(--text-dim); }
.soon-tag { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent-text); }
.soon-text { color: var(--text-dim); }
/* A placeholder CTA must not look pressable: dashed, muted, no hover. */
.btn.is-soon, .btn.primary.is-soon, .btn.primary.is-soon:hover { cursor: default; background: transparent; color: var(--text-soft); border: 1.5px dashed var(--text-dim); }

/* ===== CONTACT (the business-card destination) ===== */
.contact { max-width: 1360px; margin: 0 auto; padding: clamp(54px, 7vw, 100px) clamp(18px, 4vw, 46px); border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: clamp(28px, 5vw, 64px); align-items: start; }
.contact-copy > p { margin: 0 0 28px; font-size: clamp(15px, 1.1vw, 18px); line-height: 1.5; color: var(--text-dim); max-width: 34em; }
.contact-list { margin: 0; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.contact-list > div { background: var(--bg); display: grid; grid-template-columns: minmax(0, 140px) minmax(0, 1fr); gap: 8px 16px; padding: 15px 20px; align-items: baseline; }
.contact-list dt { font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-dim); }
.contact-list dd { margin: 0; font-family: var(--label); font-size: clamp(15px, 1.2vw, 18px); font-weight: 600; letter-spacing: 0.02em; overflow-wrap: anywhere; }
.contact-list a { border-bottom: 1px solid var(--accent-text); padding-bottom: 2px; transition: color 160ms; }
.contact-list a:hover { color: var(--accent-text); }
.qr-block { display: grid; gap: 14px; justify-items: center; }
.qr-note { margin: 0; font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-dim); text-align: center; }
.qr-card { background: #fbf7ee; border: 1px solid #0b0b0b; padding: 18px; width: min(280px, 100%); box-shadow: 0 22px 50px rgba(0, 0, 0, 0.25); }
/* Real, scannable QR — regenerate with tools/make-qr.py, never hand-edit. */
.qr-code { display: block; width: 100%; height: auto; }
.qr-card p { margin: 14px 0 0; font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; color: #6a655c; }

/* ===== MULTI-PAGE SHELL ===== */
/* Current page in the nav — the pages share one header, so this is the only
   "you are here" signal. */
.site-nav a[aria-current="page"] { color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); padding-bottom: 4px; }
.page-head { max-width: 1360px; margin: 0 auto; padding: clamp(46px, 6vw, 88px) clamp(18px, 4vw, 46px) 0; }
.page-head .kicker { margin-bottom: 14px; }
.page-title { margin: 0 0 22px; font-family: var(--display); font-weight: 900; text-transform: uppercase; line-height: 0.86; font-size: clamp(46px, 7vw, 104px); }
.page-intro { margin: 0; max-width: 42em; font-size: clamp(16px, 1.2vw, 19px); line-height: 1.52; color: var(--text-soft); }
.text-link { display: inline-block; font-family: var(--label); font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; border-bottom: 2px solid currentColor; padding-bottom: 4px; }
.text-link:hover { color: var(--accent-text); }

/* ===== HOME: SELECTED WORK ===== */
.featured { max-width: 1360px; margin: 0 auto; padding: clamp(54px, 7vw, 100px) clamp(18px, 4vw, 46px); }
.work-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.featured-foot { margin-top: 26px; }
/* Whole-card links on Home; the label at the bottom names where it goes. */
a.work-card { color: inherit; }
.work-go { margin-top: auto; padding-top: 8px; font-family: var(--label); font-size: 12px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; }
.work-go::after { content: " →"; }

/* ===== HOME: COACHING BAND (deliberately secondary to the work) ===== */
.coach-band { background: var(--panel-bg); color: var(--panel-text); border-block: 1px solid var(--panel-line); }
.coach-band-inner { max-width: 1360px; margin: 0 auto; padding: clamp(38px, 5vw, 64px) clamp(18px, 4vw, 46px); display: grid; grid-template-columns: 1fr auto; gap: 22px 40px; align-items: center; }
.coach-band .section-label { color: var(--gold); }
.coach-band h2 { margin: 0 0 12px; font-family: var(--display); font-weight: 900; text-transform: uppercase; line-height: 0.9; font-size: clamp(30px, 3.6vw, 52px); }
.coach-band p { margin: 0; max-width: 40em; font-size: clamp(15px, 1.1vw, 18px); line-height: 1.5; color: rgba(233, 224, 206, 0.74); }

/* ===== WORK: GROUPS ===== */
.page-head + .crucible { margin-top: clamp(40px, 5vw, 70px); }
.work-group { max-width: 1360px; margin: 0 auto; padding: clamp(40px, 5vw, 70px) clamp(18px, 4vw, 46px) 0; }
.work-group:last-of-type { padding-bottom: clamp(54px, 7vw, 100px); }
.group-label { display: flex; align-items: center; gap: 14px; margin: 0 0 18px; font-family: var(--mono); font-size: 11px; font-weight: 400; letter-spacing: 0.28em; text-transform: uppercase; color: var(--accent-text); }
.group-label::after { content: ""; flex: 1; height: 1px; background: var(--line); }
/* Groups hold 1-3 projects. A grid would paint its empty tracks with the gap
   colour, so groups flow as fixed-width cards that butt their borders together. */
.work-group .work-grid { display: flex; flex-wrap: wrap; background: none; border: 0; gap: 0; }
.work-group .work-card { flex: 0 1 360px; border: 1px solid var(--line); margin: 0 -1px -1px 0; }
/* The panel is always dark, so buttons can't use the light-theme --btn-* tokens. */
.btn.accent { background: var(--accent); border-color: var(--accent); color: #f7efe0; }
.btn.accent:hover { background: var(--signal); border-color: var(--signal); }
.crucible .crucible-status { display: block; font-size: 11px; line-height: 1.6; margin: 18px 0 0; font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); }
.feature-list { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 10px; max-width: 36em; }
.feature-list li { padding-left: 18px; position: relative; font-size: 15.5px; line-height: 1.45; color: rgba(233, 224, 206, 0.8); }
.feature-list li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 7px; height: 7px; background: var(--gold); }
.feature-list b { color: var(--panel-text); font-weight: 600; }

/* ===== COACHING PAGE ===== */
.coaching-page .coaching-head { padding-top: clamp(40px, 5vw, 76px); }
.credential { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 26px; padding: 10px 14px; border: 1px solid var(--line); font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-soft); }
.credential::before { content: ""; width: 8px; height: 8px; background: var(--gold); flex: none; }
.offer { max-width: 1360px; margin: 0 auto; padding: clamp(54px, 7vw, 100px) clamp(18px, 4vw, 46px) 0; }
.offer-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.offer-step { background: var(--bg); padding: clamp(24px, 3vw, 40px); display: flex; flex-direction: column; gap: 14px; }
.offer-step .num { font-family: var(--display); font-weight: 900; font-size: 46px; line-height: 1; color: var(--accent); }
.offer-step h3 { margin: 0; font-family: var(--display); font-weight: 700; text-transform: uppercase; line-height: 0.94; font-size: clamp(28px, 3vw, 42px); }
.price { margin: 0; font-family: var(--display); font-weight: 900; font-size: clamp(34px, 3.6vw, 52px); line-height: 1; }
.price small { font-size: 0.45em; font-weight: 700; }
.price span { display: block; margin-top: 8px; font-family: var(--mono); font-weight: 400; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-dim); }
.offer-step p:not(.price) { margin: 0; font-size: 15.5px; line-height: 1.5; color: var(--text-soft); }
.offer-step ul { margin: 0; padding-left: 18px; font-size: 15px; line-height: 1.6; color: var(--text-soft); }
.offer-step .btn { margin-top: auto; align-self: flex-start; }
.also { max-width: 1360px; margin: 0 auto; padding: clamp(54px, 7vw, 100px) clamp(18px, 4vw, 46px) 0; }
.fine-print { max-width: 1360px; margin: 0 auto; padding: 34px clamp(18px, 4vw, 46px) 40px; }
.fine-print p { margin: 0; max-width: 60em; font-family: var(--mono); font-size: 11px; line-height: 1.6; letter-spacing: 0.04em; color: var(--text-dim); }
.fine-print a { border-bottom: 1px solid currentColor; }
.social-row { margin: 22px 0 0; font-family: var(--label); font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dim); }
.social-row .soon-tag { margin-left: 8px; }

/* ===== LEGAL (terms, privacy) ===== */
.legal { max-width: 760px; margin: 0 auto; padding: clamp(40px, 5vw, 70px) clamp(18px, 4vw, 46px) clamp(54px, 7vw, 100px); }
.legal h1 { margin: 0 0 10px; font-family: var(--display); font-weight: 900; text-transform: uppercase; line-height: 0.9; font-size: clamp(40px, 6vw, 72px); }
.legal .updated { margin: 0 0 34px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-dim); }
.legal h2 { margin: 34px 0 10px; font-family: var(--label); font-size: 15px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.legal p, .legal li { font-size: 16px; line-height: 1.62; color: var(--text-soft); }
.legal p { margin: 0 0 14px; }
.legal ul { margin: 0 0 14px; padding-left: 20px; }
.legal a { border-bottom: 1px solid var(--accent-text); }

/* ===== FOOTER ===== */.site-footer { max-width: 1360px; margin: 0 auto; padding: 28px clamp(18px, 4vw, 46px) 46px; display: flex; flex-wrap: wrap; gap: 18px; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); }
.site-footer p, .site-footer a { font-family: var(--label); font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }
.site-footer p { margin: 0; }
.site-footer div { display: flex; flex-wrap: wrap; gap: 18px; }
.site-footer a { color: var(--text-dim); }
.site-footer a:hover { color: var(--text); }

/* ===== RESPONSIVE ===== */
@media (max-width: 980px) {
  /* The header wraps to three rows here (~146px), so anchors need more clearance. */
  section[id], .work-card[id], #top { scroll-margin-top: 164px; }
  .site-header { grid-template-columns: auto 1fr auto; row-gap: 12px; }
  .site-nav { order: 3; grid-column: 1 / -1; justify-content: flex-start; border-top: 1px solid var(--line); padding-top: 12px; overflow-x: auto; }
  .hero-body, .stack, .instruments, .crucible-inner, .coaching-inner, .section-head, .contact, .coach-band-inner, .offer-steps { grid-template-columns: 1fr; }
  .figure { margin: 0 auto; }
  .crucible-showcase, .media-grid, .work-grid, .work-grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact { justify-items: start; }
  .qr-block { justify-items: start; }
  .qr-note { text-align: left; }
}
@media (max-width: 600px) {
  .oldnew, .crucible-showcase, .product-grid, .media-grid, .work-grid, .work-grid.three { grid-template-columns: 1fr; }
  /* Label/value stack rather than squeezing a 140px term column. */
  .contact-list > div { grid-template-columns: 1fr; gap: 4px; }
  .crucible-art { min-height: 380px; }
  .crucible-art .rival { height: 320px; width: 80%; }
  .site-footer { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.001ms !important; }
  .js [data-animate] { opacity: 1 !important; transform: none !important; }
}
