/* ==========================================================================
   TBG Strategic — design system
   Same brand layer as the Firstkontak product work (near-black ground, warm
   whites, single gold accent), recomposed for long-form reading rather than
   a dense console: generous vertical rhythm, ~65ch measure, scroll as nav.
   ========================================================================== */

/* ---- Fonts (self-hosted, no CDN) ---------------------------------------- */

@font-face {
  font-family: "Syne";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/assets/fonts/syne-variable.woff2") format("woff2");
}

@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/dmsans-variable.woff2") format("woff2");
}

@font-face {
  font-family: "DM Sans";
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/dmsans-italic-variable.woff2") format("woff2");
}

@font-face {
  font-family: "DM Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/dmmono-400.woff2") format("woff2");
}

@font-face {
  font-family: "DM Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/dmmono-500.woff2") format("woff2");
}

/* ---- Tokens --------------------------------------------------------------
   Ground, text, accent and shape tokens are the canonical Firstkontak
   values (see visual-standards/reference/brand.md). The type scale below
   adds display sizes for long-form marketing headings — the dashboard
   --fs-* scale is a floor for dense UI chrome, not a ceiling for a hero. */

:root {
  /* ground */
  --bg: #0a0a0a;
  --bg2: #111111;
  --bg3: #1a1a1a;
  --bg4: #222222;
  --bg5: #2a2a2a;

  /* text — brand whites, ranked by size/weight/tracking, never by dimness */
  --text: #ffffff;
  --muted: #f7f5f1;
  --muted2: #e4e1da;

  /* accent + semantics */
  --gold: #c9a84c;
  --gold-d: #a8853a;
  --gold-light: #e8c96a;
  --green: #4caf7a;
  --amber: #e2a53a;
  --red: #e05555;

  --border: rgba(201, 168, 76, 0.15);
  --border2: rgba(201, 168, 76, 0.08);

  /* fonts */
  --font-display: "Syne", ui-sans-serif, system-ui, sans-serif;
  --font-body: "DM Sans", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "DM Mono", ui-monospace, "SFMono-Regular", monospace;

  /* dashboard floor sizes, reused for chrome/labels on this site */
  --fs-micro: 11px;
  --fs-meta: 12px;
  --fs-desc: 13.5px;
  --fs-lede: 15px;

  /* marketing display scale — fluid, one ramp, always from this list */
  --fs-body: 1.0625rem; /* 17px, long-form reading size */
  --fs-h3: clamp(1.25rem, 1.1rem + 0.7vw, 1.5rem);
  --fs-h2: clamp(1.75rem, 1.5rem + 1.3vw, 2.25rem);
  --fs-h1: clamp(2.25rem, 1.85rem + 2vw, 3.25rem);
  --fs-hero: clamp(2.5rem, 1.9rem + 3vw, 4.25rem);

  /* shape + rhythm */
  --radius-sm: 5px;
  --radius-md: 9px;
  --radius-lg: 14px;
  --radius-xl: 16px;
  --radius-pill: 999px;

  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 24px;
  --space-2xl: 40px;
  --space-3xl: 64px;
  --space-4xl: 96px;

  --measure: 65ch;

  color-scheme: dark;
}

/* ---- Reset ---------------------------------------------------------------*/

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
}

img,
svg {
  display: block;
  max-width: 100%;
}

/* ---- Base -----------------------------------------------------------------*/

body {
  background: var(--bg)
    radial-gradient(circle, var(--border2) 1px, transparent 1px) 0 0 / 30px 30px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.65;
  font-feature-settings: "tnum" 1, "lnum" 1;
  overflow-x: hidden;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-lg);
  color: var(--text);
}

h1 {
  font-size: var(--fs-h1);
}
h2 {
  font-size: var(--fs-h2);
}
h3 {
  font-size: var(--fs-h3);
  font-weight: 600;
}

p {
  margin: 0 0 var(--space-lg);
  max-width: var(--measure);
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: inherit;
}

.link {
  color: var(--gold-light);
  text-decoration-color: var(--border);
  text-underline-offset: 3px;
  transition: text-decoration-color 140ms ease-out;
}

.link:hover {
  text-decoration-color: var(--gold-light);
}

strong {
  color: var(--text);
  font-weight: 700;
}

/* label style — letterspaced uppercase mono, the house treatment */
.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin: 0 0 var(--space-md);
}

.lede {
  font-size: var(--fs-lede);
  color: var(--muted);
  max-width: var(--measure);
}

/* ---- Focus -----------------------------------------------------------------*/

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---- Skip link -----------------------------------------------------------*/

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-lg);
  z-index: 100;
  background: var(--bg5);
  color: var(--text);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: top 160ms ease-out;
}

.skip-link:focus {
  top: var(--space-lg);
}

/* ---- Layout -----------------------------------------------------------------*/

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

.prose {
  max-width: var(--measure);
}

section {
  padding: var(--space-4xl) 0;
}

section + section {
  border-top: 1px solid var(--border2);
}

/* ---- Header / nav -----------------------------------------------------------*/

.site-header {
  padding: var(--space-xl) 0;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  flex-wrap: wrap;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--text);
}

.wordmark span {
  color: var(--gold-light);
}

.wordmark-mark {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.site-nav {
  display: flex;
  gap: var(--space-xl);
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.site-nav a {
  position: relative;
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted2);
  padding-bottom: 3px;
  transition: color 140ms ease-out;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--gold-light);
  transition: right 160ms ease-out;
}

.site-nav a:hover {
  color: var(--gold-light);
}

.site-nav a:hover::after {
  right: 0;
}

/* ---- Hero -----------------------------------------------------------------*/

.hero {
  padding-top: var(--space-3xl);
  padding-bottom: var(--space-4xl);
}

.hero--split .container {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 340px);
  align-items: center;
  gap: var(--space-2xl);
}

.hero h1 {
  font-size: var(--fs-hero);
  max-width: 15ch;
}

.hero h1 .accent {
  background: linear-gradient(100deg, var(--gold-light), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero .lede {
  margin-top: var(--space-xl);
  margin-bottom: var(--space-2xl);
}

.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: -20%;
  background: radial-gradient(circle, var(--border) 0%, transparent 65%);
  pointer-events: none;
}

.hero-visual .fork-diagram {
  position: relative;
  width: 100%;
  height: auto;
}

.hero-visual figcaption {
  display: none;
}

/* ---- Sheet dividers (blueprint section markers) ----------------------------*/

.sheet-divider {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-2xl);
  color: var(--muted2);
}

.sheet-divider::before,
.sheet-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.sheet-divider span {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted2);
  white-space: nowrap;
}

.sheet-divider .tick {
  width: 6px;
  height: 6px;
  border: 1px solid var(--gold);
  transform: rotate(45deg);
  flex-shrink: 0;
}

/* ---- Fork diagram (shared decorative component) -----------------------------
   A single line splitting into a solid, gold "chosen" path and a dashed,
   dim "not taken" path that terminates in a small dead-end mark. Illustrates
   the site's actual thesis — a decision and its tradeoff — never live data. */

.fork-diagram .fork-trunk {
  stroke: var(--border);
  stroke-width: 1.5;
  fill: none;
}

.fork-diagram .fork-chosen {
  stroke: var(--gold);
  stroke-width: 2.25;
  stroke-linecap: round;
  fill: none;
}

.fork-diagram .fork-declined {
  stroke: var(--muted2);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-dasharray: 3 5;
  fill: none;
  opacity: 0.4;
}

.fork-diagram .fork-node {
  fill: var(--gold);
}

.fork-diagram .fork-node--end {
  fill: var(--gold-light);
}

.fork-diagram .fork-deadend {
  stroke: var(--muted2);
  stroke-width: 1.5;
  opacity: 0.4;
}

/* ---- Corner-bracket frame (blueprint callout) --------------------------------*/

.blueprint-frame {
  position: relative;
}

.blueprint-frame .corner {
  position: absolute;
  width: 14px;
  height: 14px;
  border: 1.5px solid var(--gold);
  opacity: 0.7;
  pointer-events: none;
}

.blueprint-frame .corner-tl {
  top: -1px;
  left: -1px;
  border-right: none;
  border-bottom: none;
}

.blueprint-frame .corner-tr {
  top: -1px;
  right: -1px;
  border-left: none;
  border-bottom: none;
}

.blueprint-frame .corner-bl {
  bottom: -1px;
  left: -1px;
  border-right: none;
  border-top: none;
}

.blueprint-frame .corner-br {
  bottom: -1px;
  right: -1px;
  border-left: none;
  border-top: none;
}

/* ---- Buttons -----------------------------------------------------------------*/

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  padding: var(--space-md) var(--space-xl);
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  transition: transform 140ms ease-out, border-color 140ms ease-out, background 140ms ease-out;
}

.btn-primary {
  background: linear-gradient(180deg, var(--gold-light), var(--gold-d));
  color: #16130a;
  font-weight: 600;
}

.btn-primary:hover {
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg2);
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover {
  border-color: var(--gold);
}

/* ---- Proof cards -----------------------------------------------------------*/

.proof-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-xl);
  margin-top: var(--space-2xl);
  list-style: none;
  padding: 0;
}

.proof-card {
  position: relative;
  overflow: hidden;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  transition: border-color 160ms ease-out, transform 160ms ease-out;
}

.proof-card:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
}

.proof-card .ghost-index {
  position: absolute;
  top: -0.15em;
  right: var(--space-lg);
  z-index: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 4.5rem;
  line-height: 1;
  color: var(--gold);
  opacity: 0.1;
  user-select: none;
  pointer-events: none;
}

.proof-card-content {
  position: relative;
  z-index: 1;
}

.proof-card h3 {
  max-width: 22ch;
  margin-bottom: var(--space-md);
}

.proof-card p {
  color: var(--muted);
  margin-bottom: var(--space-md);
}

.proof-card .proof-fork {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin: var(--space-lg) 0;
}

.proof-card .proof-fork svg {
  width: 72px;
  height: 34px;
  flex-shrink: 0;
}

.proof-card .fork-legend {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.fork-legend .chosen {
  color: var(--gold-light);
}

.fork-legend .declined {
  color: var(--muted2);
  opacity: 0.55;
}

.proof-card .proof-tradeoff {
  font-size: var(--fs-desc);
  color: var(--muted2);
  border-top: 1px solid var(--border2);
  padding-top: var(--space-md);
  margin-top: var(--space-md);
}

.proof-tradeoff .eyebrow {
  display: block;
  margin-bottom: var(--space-xs);
}

.proof-card .read-more {
  display: inline-block;
  margin-top: var(--space-lg);
}

/* ---- Writing list -----------------------------------------------------------*/

.writing-list {
  list-style: none;
  padding: 0;
  margin: var(--space-2xl) 0 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.writing-item {
  display: flex;
  gap: var(--space-xl);
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid var(--border2);
}

.writing-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.writing-item .item-index {
  flex-shrink: 0;
  width: 2.4ch;
  font-family: var(--font-mono);
  font-size: var(--fs-lede);
  color: var(--gold);
  opacity: 0.5;
  padding-top: 0.2em;
}

.writing-item a.title-link {
  min-width: 0;
  text-decoration: none;
  color: var(--text);
}

.writing-item a.title-link:hover .writing-title {
  color: var(--gold-light);
}

.writing-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-h3);
  margin: 0 0 var(--space-sm);
  transition: color 140ms ease-out;
}

.writing-dek {
  color: var(--muted);
  margin: 0;
}

/* ---- Article -----------------------------------------------------------*/

.article-header {
  padding-bottom: var(--space-2xl);
}

.article-meta {
  display: flex;
  gap: var(--space-lg);
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted2);
  margin-bottom: var(--space-lg);
}

.article-body h2 {
  margin-top: var(--space-2xl);
}

.article-body blockquote {
  position: relative;
  margin: var(--space-2xl) 0;
  padding: var(--space-xl) var(--space-2xl);
  background: var(--bg2);
  border-radius: var(--radius-md);
  color: var(--muted);
  max-width: var(--measure);
}

.article-body blockquote::before {
  content: "Finding";
  position: absolute;
  top: -0.65em;
  left: var(--space-xl);
  padding: 0 var(--space-sm);
  background: var(--bg);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-light);
}

.article-body blockquote p {
  margin-bottom: 0;
}

.article-body ul,
.article-body ol {
  max-width: var(--measure);
  padding-left: 1.3em;
  margin: 0 0 var(--space-lg);
}

.article-body li {
  margin-bottom: var(--space-sm);
}

/* ---- Disclaimer callout -----------------------------------------------------*/

.disclaimer {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  font-size: var(--fs-desc);
  color: var(--muted2);
  max-width: var(--measure);
}

.disclaimer .eyebrow {
  color: var(--amber);
}

/* ---- Contact -----------------------------------------------------------*/

.contact-box {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xl);
}

.contact-box .contact-text h2 {
  margin-bottom: var(--space-sm);
}

.contact-box .contact-text p {
  color: var(--muted);
  margin: 0;
}

/* ---- Footer -----------------------------------------------------------*/

.site-footer {
  padding: var(--space-2xl) 0 var(--space-3xl);
  border-top: 1px solid var(--border2);
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg) var(--space-2xl);
  align-items: baseline;
  justify-content: space-between;
}

.footer-entity {
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  color: var(--muted2);
  max-width: 42ch;
}

.footer-links {
  display: flex;
  gap: var(--space-xl);
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
}

.footer-links a {
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--muted2);
}

.footer-links a:hover {
  color: var(--gold-light);
}

/* ---- 404 -----------------------------------------------------------*/

.error-page {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.error-page .fork-diagram {
  width: 220px;
  height: auto;
  margin-bottom: var(--space-2xl);
}

/* ---- Motion -----------------------------------------------------------
   No scroll-triggered animation on this site — only the hover/focus
   micro-transitions above. Under reduced motion even those collapse to
   instant, so the finished state is what's painted either way. */

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---- Responsive -----------------------------------------------------------*/

@media (max-width: 900px) {
  section {
    padding: var(--space-3xl) 0;
  }

  .contact-box {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero .container {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    order: -1;
    max-width: 220px;
    margin: 0 auto var(--space-xl);
  }

  .proof-list {
    grid-template-columns: 1fr;
  }

  .proof-card .ghost-index {
    font-size: 3.5rem;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 var(--space-lg);
  }

  .site-header .container {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-md);
  }

  .proof-card {
    padding: var(--space-xl);
  }

  .footer-entity {
    max-width: none;
  }

  .sheet-divider span {
    white-space: normal;
  }

  .article-body blockquote {
    padding: var(--space-lg);
  }
}
