/* Fonts are self-hosted: no third-party requests. */
@font-face { font-family: "Barlow Condensed"; font-style: italic; font-weight: 700; font-display: swap; src: url("fonts/barlow-condensed-latin-700-italic.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: italic; font-weight: 800; font-display: swap; src: url("fonts/barlow-condensed-latin-800-italic.woff2") format("woff2"); }
@font-face { font-family: "Hanken Grotesk"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/hanken-grotesk-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Hanken Grotesk"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/hanken-grotesk-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Hanken Grotesk"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/hanken-grotesk-latin-700-normal.woff2") format("woff2"); }

/* 4 Flames Athletics
   Layout: full-bleed video hero, then a quiet black-glass body.
   Boldness lives in the hero video and the headline type; everything below stays disciplined. */
:root {
  --void: #000000;
  --bone: #f3eee8;
  --ash: #a39a91;
  --ember: #e8431a;
  --flame: #ff8a1f;
  --gold: #ffc82e;
  --edge: rgba(255, 255, 255, 0.12);
  --edge-soft: rgba(255, 255, 255, 0.07);
  --glass-top: rgba(255, 255, 255, 0.075);
  --glass-bot: rgba(255, 255, 255, 0.02);
  --on-fire: #140700;

  --display: "Barlow Condensed", "Arial Narrow", Impact, sans-serif;
  --body: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: max(16px, 4vw);
  --measure: 62ch;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--void); scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--void);
  color: var(--bone);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-style: italic; font-weight: 800; text-transform: uppercase; line-height: 0.95; text-wrap: balance; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: var(--on-fire); padding: 8px 14px; z-index: 100; font-weight: 700; }
.skip:focus { left: 8px; }

.wrap { width: 100%; max-width: 1180px; margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  background: linear-gradient(180deg, rgba(0,0,0,0.82), rgba(0,0,0,0.55));
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--edge-soft);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { height: 44px; width: auto; }
.brand span { font-family: var(--display); font-style: italic; font-weight: 800; font-size: 1.2rem; text-transform: uppercase; letter-spacing: 0.02em; }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a { display: block; padding: 10px 14px; text-decoration: none; color: var(--ash); font-weight: 500; border-radius: 8px; transition: color .15s; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--bone); }
.nav-links .btn { margin-left: 8px; padding: 10px 18px; color: var(--on-fire); }
.nav-toggle { display: none; background: none; border: 1px solid var(--edge); color: var(--bone); font: inherit; font-weight: 500; padding: 8px 14px; border-radius: 999px; cursor: pointer; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 26px; border-radius: 999px; border: 1px solid transparent;
  font: 700 1rem/1 var(--body); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .15s, box-shadow .15s, background .15s;
}
.btn-fire { background: linear-gradient(95deg, var(--ember), var(--flame) 70%, var(--gold)); color: var(--on-fire); box-shadow: 0 6px 28px -8px rgba(255, 110, 30, 0.7); }
.btn-fire:hover { transform: translateY(-1px); box-shadow: 0 10px 32px -8px rgba(255, 110, 30, 0.9); }
.btn-glass { background: linear-gradient(180deg, var(--glass-top), var(--glass-bot)); border-color: var(--edge); color: var(--bone); box-shadow: inset 0 1px 0 rgba(255,255,255,0.16); }
.btn-glass:hover { background: rgba(255,255,255,0.1); }
.btn[aria-disabled="true"] { background: transparent; border: 1px dashed var(--edge); color: var(--ash); box-shadow: none; cursor: default; transform: none; }

/* ---------- Hero (video) ---------- */
.hero { position: relative; isolation: isolate; min-height: clamp(560px, 84svh, 880px); display: flex; align-items: flex-end; overflow: hidden; }
.hero-media { position: absolute; inset: 0; z-index: -2; background: var(--void) url("hero-poster.jpg") center / cover no-repeat; }
.hero-video { width: 100%; height: 100%; object-fit: cover; }
.hero-scrim { position: absolute; inset: 0; z-index: -1; background:
  linear-gradient(90deg, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.55) 42%, rgba(0,0,0,0.05) 78%),
  linear-gradient(0deg, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 34%); }
.hero-copy { padding-block: clamp(72px, 12vw, 140px) clamp(40px, 6vw, 72px); }
.hero h1 { font-size: clamp(3.4rem, 10.5vw, 8.5rem); max-width: 6.4em; letter-spacing: -0.005em; }
.hero p { margin-top: 24px; max-width: 46ch; font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: #d9d2ca; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.video-toggle {
  position: absolute; right: var(--gutter); bottom: 20px; z-index: 2;
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
  background: rgba(0,0,0,0.5); border: 1px solid var(--edge); color: var(--bone);
  font: 500 0.875rem/1 var(--body); cursor: pointer; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.video-toggle[hidden] { display: none; }

/* ---------- Sections ---------- */
.section { padding-block: clamp(64px, 9vw, 124px); }
.section-head { display: grid; gap: 16px; max-width: 760px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head h2 { font-size: clamp(2.4rem, 6vw, 4.4rem); }
.section-head p { color: var(--ash); max-width: var(--measure); }
.rule-fire { height: 2px; border: 0; margin: 0; background: linear-gradient(90deg, var(--ember), var(--flame), var(--gold) 55%, transparent); opacity: .85; }

/* Spec ledger */
.ledger { border-bottom: 1px solid var(--edge); }
.ledger-row { display: grid; grid-template-columns: 1.15fr 1.6fr 1fr; gap: 8px 32px; padding-block: 22px; border-top: 1px solid var(--edge); align-items: baseline; }
.ledger-row.head { padding-block: 12px; color: var(--ash); font-size: 0.9rem; border-top: 0; }
.ledger-row h3 { font-size: 1.7rem; letter-spacing: 0.01em; line-height: 1; }
.ledger-row .tool { font-weight: 700; color: var(--gold); }
.ledger-row p { color: #cfc8c0; }

/* Three-part promise */
.pillars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-block: 1px solid var(--edge); }
.pillar { padding: clamp(28px, 4vw, 48px) clamp(20px, 3vw, 40px); display: grid; gap: 16px; align-content: start; min-width: 0; }
.pillar + .pillar { border-left: 1px solid var(--edge); }
.pillar h3 { font-size: clamp(2.6rem, 5vw, 4.4rem); background: linear-gradient(180deg, var(--bone) 30%, #8f8780); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pillar p { color: #cfc8c0; max-width: 34ch; }

/* Glass panel */
.panel {
  position: relative; border-radius: 14px; padding: clamp(28px, 4vw, 52px);
  background: linear-gradient(145deg, var(--glass-top), var(--glass-bot));
  border: 1px solid var(--edge);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 30px 80px -40px rgba(255, 90, 20, 0.35);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
.panel-split { display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px 56px; align-items: center; }
.panel h2 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
.panel p { margin-top: 16px; color: #cfc8c0; max-width: 50ch; }
.panel .btn { margin-top: 28px; }

/* Events */
.event-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 20px; }
.event {
  position: relative; display: grid; gap: 14px; align-content: start; padding: 28px 26px 26px;
  border-radius: 12px; border: 1px solid var(--edge);
  background: linear-gradient(160deg, rgba(255,255,255,0.06), rgba(255,255,255,0.015));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.14);
  overflow: hidden; min-width: 0;
}
.event::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; background: linear-gradient(90deg, var(--ember), var(--flame), var(--gold)); }
.pill { justify-self: start; padding: 4px 12px; border-radius: 999px; border: 1px solid rgba(255, 138, 31, 0.5); color: var(--flame); font-size: 0.85rem; font-weight: 700; }
.event h3 { font-size: 2.1rem; }
.event .when { font-weight: 700; }
.event .where, .event .note { color: var(--ash); font-size: 0.98rem; }
.event .btn { justify-self: start; margin-top: 6px; }
.empty { padding: 28px; border: 1px dashed var(--edge); border-radius: 12px; color: var(--ash); }

/* Leaderboard layout preview */
.board { border: 1px solid var(--edge); border-radius: 12px; overflow: hidden; background: linear-gradient(160deg, rgba(255,255,255,0.05), rgba(255,255,255,0.01)); }
.board-scroll { overflow-x: auto; }
.board table { width: 100%; min-width: 640px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.board th, .board td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--edge-soft); }
.board th { color: var(--ash); font-weight: 500; font-size: 0.9rem; background: rgba(255,255,255,0.04); }
.board td { color: #6f675f; }
.board caption { text-align: left; padding: 14px 18px; color: var(--ash); font-size: 0.92rem; border-bottom: 1px solid var(--edge); }
.board-embed iframe { width: 100%; min-height: 720px; border: 0; background: var(--void); border-radius: 12px; }

/* Page header (inner pages) */
.page-head { padding-block: clamp(56px, 8vw, 104px) clamp(24px, 4vw, 40px); }
.page-head h1 { font-size: clamp(2.3rem, 9vw, 6.5rem) }
.page-head p { margin-top: 20px; max-width: 56ch; color: #cfc8c0; font-size: 1.15rem; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.two-col > * { min-width: 0; }
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.stack > * { min-width: 0; }
.prose { max-width: var(--measure); display: grid; gap: 16px; color: #d4cdc5; }
.prose h2 { font-size: 2.3rem; color: var(--bone); margin-top: 8px; }
.contact-line { font-weight: 700; font-size: 1.25rem }
.copy { margin-left: 10px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--edge); background: transparent; color: var(--bone); font: 500 0.85rem var(--body); cursor: pointer; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--edge-soft); padding-block: 56px calc(40px + env(safe-area-inset-bottom, 0px)); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; align-items: start; }
.footer-grid img { width: min(340px, 100%); height: auto; }
.footer-grid h2 { font-size: 1.1rem; font-style: normal; letter-spacing: 0.04em; color: var(--ash); margin-bottom: 12px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-grid a { text-decoration: none; color: #d4cdc5; }
.footer-grid a:hover { color: var(--gold); }
.legal { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--edge-soft); color: var(--ash); font-size: 0.9rem; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .nav-toggle { display: inline-block; }
  .nav-links { position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; padding: 12px var(--gutter) 20px; background: rgba(0,0,0,0.96); border-bottom: 1px solid var(--edge); display: none; }
  .nav-links.open { display: flex; }
  .nav-links .btn { margin: 8px 0 0; }
  .brand span { display: none; }
  .ledger-row { grid-template-columns: 1fr; gap: 4px; }
  .ledger-row.head { display: none; }
  .pillars { grid-template-columns: 1fr; }
  .pillar + .pillar { border-left: 0; border-top: 1px solid var(--edge); }
  .panel-split, .two-col, .footer-grid { grid-template-columns: 1fr; }
  .hero-scrim { background: linear-gradient(0deg, rgba(0,0,0,1) 8%, rgba(0,0,0,0.55) 60%, rgba(0,0,0,0.35) 100%); }
  .video-toggle { bottom: auto; top: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}

.blend { mix-blend-mode: screen; }

/* ---------- Demo leaderboard ---------- */
.demo-board { border: 1px solid var(--edge); border-radius: 14px; background: linear-gradient(160deg, rgba(255,255,255,0.06), rgba(255,255,255,0.012)); box-shadow: inset 0 1px 0 rgba(255,255,255,0.1); overflow: hidden; min-width: 0; }
.bd-banner { display: flex; gap: 14px; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--edge); background: rgba(255, 138, 31, 0.07); }
.bd-banner p { color: #d4cdc5; font-size: 0.95rem; line-height: 1.45; }
.bd-tag { flex: none; padding: 3px 10px; border-radius: 999px; background: linear-gradient(95deg, var(--ember), var(--flame)); color: var(--on-fire); font-weight: 800; font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; }
.bd-filters { display: flex; flex-wrap: wrap; gap: 14px 28px; padding: 18px 20px 6px; }
.bd-f { display: grid; gap: 6px; min-width: 0; }
.bd-l { color: var(--ash); font-size: 0.8rem; font-weight: 500; }
.bd-seg { display: flex; flex-wrap: wrap; gap: 4px; padding: 3px; border: 1px solid var(--edge); border-radius: 999px; background: rgba(0,0,0,0.35); width: fit-content; max-width: 100%; }
.bd-seg button { background: none; border: 0; color: var(--ash); font: 500 0.9rem/1 var(--body); padding: 9px 14px; border-radius: 999px; cursor: pointer; }
.bd-seg button:hover { color: var(--bone); }
.bd-seg button[aria-pressed="true"] { background: linear-gradient(95deg, var(--ember), var(--flame)); color: var(--on-fire); font-weight: 700; }
.bd-meta { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 20px 14px; color: var(--ash); font-size: 0.88rem; }
.bd-scroll { overflow-x: auto; border-top: 1px solid var(--edge); }
.bd-table { width: 100%; min-width: 880px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.bd-table th { position: sticky; top: 0; padding: 12px 12px; text-align: right; color: var(--ash); font-weight: 500; font-size: 0.82rem; background: rgba(255,255,255,0.04); border-bottom: 1px solid var(--edge); white-space: nowrap; user-select: none; }
.bd-table th[data-k] { cursor: pointer; }
.bd-table th[data-k]:hover, .bd-table th[aria-sort] { color: var(--bone); }
.bd-table th[aria-sort="descending"]::after { content: " \25BE"; color: var(--flame); }
.bd-table th[aria-sort="ascending"]::after { content: " \25B4"; color: var(--flame); }
.bd-table th small { display: block; font-size: 0.72rem; color: #7d756d; font-weight: 400; }
.bd-table th.l, .bd-table td.l { text-align: left; padding-left: 20px; }
.bd-table td { padding: 12px 12px; text-align: right; border-bottom: 1px solid var(--edge-soft); }
.bd-row { cursor: pointer; transition: background .15s; }
.bd-row:hover, .bd-row.open { background: rgba(255,255,255,0.045); }
.bd-who { display: flex; align-items: center; gap: 12px; min-width: 260px; text-align: left; }
.bd-who b { display: block; font-family: var(--display); font-style: italic; font-weight: 800; font-size: 1.3rem; text-transform: uppercase; line-height: 1.05; }
.bd-who span:not(.bd-rank):not(.bd-av) { display: block; color: var(--ash); font-size: 0.82rem; }
.bd-rank { width: 28px; flex: none; font-family: var(--display); font-style: italic; font-weight: 800; font-size: 1.5rem; color: #6f675f; text-align: right; }
.bd-rank.top { color: var(--flame); }
.bd-av { flex: none; width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center; font-family: var(--display); font-style: italic; font-weight: 800; color: var(--gold); border: 1px solid var(--edge); background: radial-gradient(circle at 30% 25%, rgba(255,138,31,0.35), rgba(255,255,255,0.03)); }
.bd-score { display: flex; align-items: center; justify-content: flex-end; gap: 10px; min-width: 140px; }
.bd-bar { flex: 1; max-width: 80px; height: 6px; border-radius: 99px; background: rgba(255,255,255,0.1); overflow: hidden; }
.bd-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--ember), var(--gold)); }
.bd-score b { font-size: 1.3rem; min-width: 52px; text-align: right; }
.bd-stars { color: var(--gold); letter-spacing: 1px; white-space: nowrap; }
.bd-stars i { font-style: normal; color: rgba(255,255,255,0.14); }
.bd-table td.m span { display: inline-block; padding: 2px 8px; border-radius: 6px; color: var(--ash); }
.bd-table td.m .t3 { background: rgba(255,138,31,0.22); color: var(--bone); }
.bd-table td.m .t2 { background: rgba(255,200,46,0.12); color: var(--bone); }
.bd-table td.m .t1 { color: #cfc8c0; }
.bd-drow td { padding: 0; background: rgba(0,0,0,0.4); }
.bd-detail { padding: 22px 20px 26px 20px; text-align: left; }
.bd-dgrid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px 48px; }
.bd-dgrid > * { min-width: 0; }
.bd-detail h3 { font-size: 1.3rem; margin-bottom: 14px; color: var(--gold); }
.bd-m { padding: 8px 0; border-bottom: 1px solid var(--edge-soft); }
.bd-mh { display: flex; justify-content: space-between; gap: 12px; }
.bd-mh span small { display: block; color: var(--ash); font-size: 0.78rem; }
.bd-mh b small { color: var(--ash); font-weight: 400; }
.bd-mbar { height: 5px; border-radius: 99px; background: rgba(255,255,255,0.1); margin: 6px 0 4px; overflow: hidden; }
.bd-mbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--ember), var(--gold)); }
.bd-mf { display: flex; justify-content: space-between; color: var(--ash); font-size: 0.78rem; }
.bd-diag { border: 1px solid var(--edge); border-left: 3px solid var(--flame); border-radius: 8px; padding: 12px 14px; margin-bottom: 10px; background: rgba(255,255,255,0.03); }
.bd-diag.ok { border-left-color: #5fa8d3; }
.bd-diag b { display: block; margin-bottom: 4px; }
.bd-diag p, .bd-tier { color: #cfc8c0; font-size: 0.9rem; line-height: 1.5; }
.bd-tier { margin-top: 14px; }
.bd-empty { text-align: center !important; padding: 40px !important; color: var(--ash); }
.bd-foot { padding: 14px 20px 18px; color: var(--ash); font-size: 0.88rem; border-top: 1px solid var(--edge); }
@media (max-width: 860px) {
  .bd-dgrid { grid-template-columns: 1fr; }
  .bd-banner { align-items: flex-start; }
}
@media (max-width: 940px) {
  .bd-detail { position: sticky; left: 0; width: calc(100vw - 2 * var(--gutter) - 2px); box-sizing: border-box; padding-inline: 16px; }
  .bd-score { min-width: 120px; }
}
