/* rldash.com public site, direction "Pitch".
   Tokens are the app's (src/App.css). Site-only additions are marked NEW. */
:root {
  color-scheme: dark;
  --bg: #060c18;
  --surface: #0d1628;
  --surface-2: #142038;
  --surface-3: #1c2c4c;
  --border: #1d2b47;
  --border-strong: #2e4168;
  --text: #eef3fb;
  --text-2: #b7c3d9;
  --muted: #7d8ca9;
  --accent: #1a8cff;
  --team-0: #1a8cff;
  --team-1: #e86c0c;
  --field: #111d35;
  --good: #3ecf7a;
  --bad: #ff6b6b;

  /* NEW: the heat map's five bands (today they live in Heatmap.tsx) and its line weights. */
  --heat-0: #8a3a08;
  --heat-1: #c85a0c;
  --heat-2: #f08a24;
  --heat-3: #ffb768;
  --heat-4: #ffe6cc;
  --line: rgba(255, 255, 255, 0.5);
  --line-faint: rgba(255, 255, 255, 0.16);
  /* NEW: corner cut. Replaces --radius on the site: every panel is a small pitch. */
  --cut: 16px;

  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 84px; }
body { margin: 0; min-width: 320px; overflow-wrap: break-word; }
h1, h2, h3, p, dl, dd, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: #6db5ff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
.icon { flex: none; }

.wrap { width: min(100% - 48px, 1160px); margin-inline: auto; }
.skip {
  position: absolute; left: 12px; top: -80px; z-index: 30; padding: 10px 14px;
  background: var(--surface-3); color: var(--text); border: 1px solid var(--border-strong);
}
.skip:focus { top: 12px; }

/* Cut corners: a 1px edge that follows a 45 degree chamfer, as the pitch outline does.
   The element paints the edge colour; ::before paints the fill, inset by the edge width. */
.cut {
  --edge: var(--border);
  --fill: var(--surface);
  position: relative; isolation: isolate; background: var(--edge);
  clip-path: polygon(
    var(--cut) 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% calc(100% - var(--cut)),
    calc(100% - var(--cut)) 100%, var(--cut) 100%, 0 calc(100% - var(--cut)), 0 var(--cut)
  );
}
.cut::before {
  --in: calc(var(--cut) - 0.42px);
  content: ""; position: absolute; inset: 1px; z-index: -1; background: var(--fill);
  clip-path: polygon(
    var(--in) 0, calc(100% - var(--in)) 0, 100% var(--in), 100% calc(100% - var(--in)),
    calc(100% - var(--in)) 100%, var(--in) 100%, 0 calc(100% - var(--in)), 0 var(--in)
  );
}

/* Type */
.eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
h1 { font-size: clamp(34px, 4.3vw, 52px); line-height: 1.06; font-weight: 650; letter-spacing: -0.022em; text-wrap: balance; }
h2 { font-size: clamp(24px, 2.6vw, 30px); line-height: 1.2; font-weight: 650; letter-spacing: -0.012em; text-wrap: balance; }
h3 { font-size: 17px; line-height: 1.3; font-weight: 600; }

/* Buttons */
.btn {
  --cut: 8px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 40px; padding: 0 16px; font-weight: 600; font-size: 14.5px; text-decoration: none;
  color: var(--text); cursor: pointer;
}
.btn-quiet { --edge: var(--border-strong); --fill: var(--surface-2); }
.btn-quiet:hover { --fill: var(--surface-3); color: var(--text); }
.btn-primary {
  --cut: 11px; --edge: var(--team-1); --fill: var(--team-1);
  min-height: 52px; padding: 0 26px 0 22px; font-size: 16.5px; color: #1a0d00;
}
.btn-primary:hover { --edge: #ff8a2e; --fill: #ff8a2e; color: #1a0d00; }
/* clip-path would cut a normal outline off, so focus thickens the edge instead. */
.btn:focus-visible { outline: none; --edge: #fff; }
.btn:focus-visible::before { inset: 3px; --in: calc(var(--cut) - 1.25px); }

/* Top bar: same construction as the app's, kickoff-line hairline included. */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(to right, var(--team-0), transparent 35% 65%, var(--team-1));
}
.topbar-in { display: flex; align-items: center; gap: 28px; height: 60px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px;
  font-weight: 650; font-size: 16px; letter-spacing: 0.01em; color: var(--text); text-decoration: none;
}
.brand:hover { color: var(--text); }
.nav { display: flex; gap: 4px; margin-right: auto; }
.nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px;
  color: var(--muted); font-weight: 500; font-size: 14.5px; text-decoration: none;
}
.nav a:hover { color: var(--text); }

/* Hero */
.hero { position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(640px 420px at 8% -6%, rgba(26, 140, 255, 0.11), transparent 70%),
    radial-gradient(560px 620px at 82% 52%, rgba(232, 108, 12, 0.1), transparent 70%);
}
.hero-in {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 64px; align-items: center;
  padding-block: 56px 72px;
}
.hero-copy { max-width: 560px; }
.hero h1 { margin-top: 18px; }
.lede { margin-top: 22px; font-size: 18px; line-height: 1.6; color: var(--text-2); max-width: 34em; }

.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 22px; margin-top: 32px; }
/* Two lines are always reserved, so nothing moves when the manifest arrives. */
.cta-meta { flex: 1 1 240px; min-height: 46px; font-size: 14px; line-height: 23px; }
.release { color: var(--text-2); font-variant-numeric: tabular-nums; }
.others { color: var(--muted); }
/* Padding with matching negative margin: a taller touch target without a taller line. */
.others a { display: inline-block; white-space: nowrap; padding: 10px 6px; margin: -10px -6px; }

.hero-facts {
  display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 36px; padding-top: 22px;
  border-top: 1px solid var(--border); font-size: 14px; color: var(--text-2);
}
.hero-facts li { display: inline-flex; align-items: center; gap: 8px; }
.hero-facts .icon { color: var(--muted); }

/* The pitch: the app's heat map drawing, large. */
.pitch-figure { --pitch-w: 404px; --notes-w: 148px; padding-right: var(--notes-w); }
.pitch-col { position: relative; width: var(--pitch-w); max-width: 100%; margin-inline: auto; }
.pitch-end { text-align: center; font-size: 12px; letter-spacing: 0.02em; color: var(--muted); padding: 6px 0; }
.pitch { position: relative; aspect-ratio: 820 / 1200; }
.pitch svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.pitch svg * { vector-effect: non-scaling-stroke; }
.turf { fill: var(--field); }
.band-0 { fill: var(--heat-0); background: var(--heat-0); }
.band-1 { fill: var(--heat-1); background: var(--heat-1); }
.band-2 { fill: var(--heat-2); background: var(--heat-2); }
.band-3 { fill: var(--heat-3); background: var(--heat-3); }
.band-4 { fill: var(--heat-4); background: var(--heat-4); }
.zone-lines *, .field-lines *, .boost-pads * { fill: none; stroke-width: 1px; }
.zone-lines * { stroke: var(--line-faint); }
.field-lines * { stroke: var(--line); stroke-linejoin: miter; }
.boost-pads * { stroke: rgba(255, 255, 255, 0.6); stroke-width: 1.5px; }
.zone-label {
  position: absolute; transform: translate(-50%, -50%);
  padding: 1px 7px; border-radius: 999px; background: rgba(4, 9, 18, 0.78);
  font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--text);
}

.pitch-notes {
  position: absolute; left: 100%; top: 0; bottom: 0; width: var(--notes-w);
  display: grid; grid-template-rows: 88fr 341.33fr 341.33fr 341.33fr 88fr;
}
.pitch-notes > div {
  display: flex; flex-direction: column; justify-content: center; gap: 2px;
  padding-left: 18px; border-top: 1px solid var(--line-faint);
}
.pitch-notes > div:nth-child(1) { grid-row: 2; }
.pitch-notes > div:nth-child(2) { grid-row: 3; }
.pitch-notes > div:nth-child(3) { grid-row: 4; border-bottom: 1px solid var(--line-faint); }
.pitch-notes dt { font-size: 12.5px; color: var(--muted); }
.pitch-notes dd { font-size: 24px; line-height: 1.15; font-weight: 650; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }

.legend { margin-top: 6px; font-size: 11.5px; color: var(--muted); text-align: center; }
.legend-steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; margin-bottom: 5px; }
.legend-steps span { display: flex; flex-direction: column; gap: 4px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.legend-steps i { height: 8px; }
.pitch-figure figcaption { margin-top: 14px; font-size: 12.5px; color: var(--muted); text-align: center; }

/* Section furniture */
.section { padding-block: 80px; }
.section-head { margin-bottom: 36px; }
.section-head h2 { margin-top: 10px; }
.section-head .release { margin-top: 10px; min-height: 24px; font-size: 15px; }
.section-head.with-icon { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 0 22px; }
.section-head.with-icon img { grid-row: 1 / span 3; }

/* Divider: the centre line, with a boost pad at each wall. */
.fieldline { display: flex; align-items: center; }
.fieldline::before, .fieldline::after {
  content: ""; flex: none; width: 11px; height: 11px; border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.38);
}
.fieldline i { flex: 1; height: 1px; background: var(--border-strong); }

/* Features: one panel split into zones, like the pitch's 3 x 3 grid. */
.zones { --cut: 28px; --edge: var(--border-strong); display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 1fr; }
.zone { padding: 32px 30px 34px; border: 0 solid var(--border); }
.zone:not(:nth-child(3n + 1)) { border-left-width: 1px; }
.zone:nth-child(n + 4) { border-top-width: 1px; }
.zone-icon {
  --cut: 10px; --edge: var(--border-strong); --fill: var(--surface-2);
  display: grid; place-items: center; width: 46px; height: 46px; color: var(--text);
}
.zone h3 { margin-top: 20px; }
.zone p { margin-top: 8px; font-size: 15px; color: var(--text-2); }
.pad {
  position: absolute; top: 50%; width: 13px; height: 13px; border-radius: 50%; transform: translate(-50%, -50%);
  background: var(--surface); border: 1.5px solid rgba(255, 255, 255, 0.45);
}
.pad-a { left: 33.333%; }
.pad-b { left: 66.667%; }

[hidden] { display: none !important; }

/* Screenshots */
.shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 24px; }
.shot-wide { grid-column: 1 / -1; }
/* A chamfered matte around a square-cornered screenshot: the app's own corners stay as they are. */
.frame { --cut: 20px; --edge: var(--border-strong); padding: 12px; }
.view { overflow: hidden; background: var(--bg); border: 1px solid var(--border); }
/* Each image is already cut to the detail it shows (scripts/screenshots.mjs --site). */
.view img { display: block; width: 100%; height: auto; }
/* Two images side by side at one height: each flexes by its own aspect ratio (--ar). */
.view-pair { display: flex; gap: 12px; }
.view-pair img { flex: calc(var(--ar)) 1 0; width: auto; min-width: 0; aspect-ratio: var(--ar); }
.shot figcaption { margin-top: 16px; padding-left: 2px; }
.shot figcaption h3 { font-size: 16px; }
.shot figcaption p { margin-top: 4px; font-size: 14.5px; color: var(--muted); max-width: 46em; }

/* How it works: three pads along the centre line. */
.steps { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; counter-reset: step; }
.steps::before {
  content: ""; position: absolute; left: 0; right: 0; top: 19px; height: 1px;
  background: linear-gradient(to right, var(--team-0), var(--border-strong) 30% 70%, var(--team-1));
}
.steps li { position: relative; padding-top: 64px; }
.step-pad {
  position: absolute; left: 0; top: 0; width: 39px; height: 39px; border-radius: 50%;
  display: grid; place-items: center; background: var(--bg);
  border: 1.5px solid rgba(255, 255, 255, 0.6); box-shadow: 0 0 0 8px var(--bg);
  font-size: 15px; font-weight: 650; font-variant-numeric: tabular-nums;
}
.steps h3 { display: flex; align-items: center; gap: 10px; }
.steps h3 .icon { color: var(--muted); }
.steps p { margin-top: 8px; font-size: 15px; color: var(--text-2); max-width: 30em; }

/* Downloads */
.platforms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; }
.platform { --cut: 22px; --edge: var(--border-strong); }
.platform.is-yours { --edge: color-mix(in srgb, var(--accent) 60%, var(--border-strong)); }
.platform > header { display: flex; align-items: center; gap: 16px; padding: 24px 26px 22px; }
.platform > header p { font-size: 13.5px; color: var(--muted); }
.platform > header .icon { color: var(--text); }
.yours {
  margin-left: auto; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap;
  color: #8ec5ff; border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
}
.files li { border-top: 1px solid var(--border); }
.file {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 14px;
  min-height: 58px; padding: 8px 26px; color: var(--text); text-decoration: none; font-weight: 500;
}
.file .icon { color: var(--muted); }
.file[href]:hover { background: var(--surface-2); color: var(--text); }
.file[href]:hover .icon { color: var(--team-1); }
.file:focus-visible { outline-offset: -3px; }
/* Before the manifest loads, and for formats a release doesn't include. */
.file:not([href]) { color: var(--muted); }
.file:not([href]) .icon { opacity: 0.35; }
.file-type {
  font-family: ui-monospace, "Cascadia Code", Menlo, Consolas, monospace; font-size: 13px;
  color: var(--text-2); background: var(--surface-2); padding: 2px 7px;
}
.file-name { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.rec {
  padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600;
  color: var(--text-2); border: 1px solid var(--border-strong); white-space: nowrap;
}
.file:not([href]) .rec { display: none; }
.downloads-note { display: flex; align-items: flex-start; gap: 10px; margin-top: 28px; font-size: 14.5px; color: var(--muted); }
.downloads-note .icon { margin-top: 3px; }

/* Footer */
.footer { border-top: 1px solid var(--border); margin-top: 24px; }
.footer-in { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; padding-block: 28px 36px; font-size: 13.5px; color: var(--muted); }
.footer .brand { font-size: 14.5px; min-height: 0; margin-right: auto; }

/* Narrower: the pitch drops under the copy. */
@media (max-width: 1040px) {
  .hero-in { grid-template-columns: minmax(0, 1fr); gap: 48px; padding-block: 44px 56px; }
  .hero-copy { max-width: 640px; }
  .zones { grid-template-columns: repeat(2, 1fr); }
  .zone:not(:nth-child(3n + 1)) { border-left-width: 0; }
  .zone:nth-child(even) { border-left-width: 1px; }
  .zone:nth-child(n + 3) { border-top-width: 1px; }
  .pad { display: none; }
}

@media (max-width: 720px) {
  .wrap { width: min(100% - 40px, 1160px); }
  .nav { display: none; }
  .topbar-in { justify-content: space-between; height: 56px; }
  .btn { min-height: 44px; }
  .btn-primary { min-height: 52px; width: 100%; }
  .lede { font-size: 17px; }
  .cta-meta { flex-basis: 100%; }
  .hero-facts { flex-direction: column; gap: 10px; }

  .pitch-figure { --pitch-w: 300px; padding-right: 0; }
  .pitch-notes { display: none; }

  .section { padding-block: 56px; }
  .section-head { margin-bottom: 28px; }
  .section-head.with-icon { gap: 0 16px; }
  .section-head.with-icon img { width: 60px; height: 60px; }

  .zones { --cut: 20px; grid-template-columns: 1fr; grid-auto-rows: auto; }
  .zone { padding: 26px 22px 28px; display: grid; grid-template-columns: 46px minmax(0, 1fr); column-gap: 16px; }
  .zone:nth-child(even) { border-left-width: 0; }
  .zone:nth-child(n + 2) { border-top-width: 1px; }
  .zone-icon { grid-row: 1 / span 2; }
  .zone h3 { margin-top: 2px; }

  .shots { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .view-pair { flex-direction: column; }
  .view-pair img { flex: none; width: 100%; }
  .frame { --cut: 14px; padding: 8px; }

  .steps { grid-template-columns: 1fr; gap: 32px; }
  .steps::before { left: 19px; right: auto; top: 0; bottom: 0; width: 1px; height: auto; background: linear-gradient(to bottom, var(--team-0), var(--border-strong) 30% 70%, var(--team-1)); }
  .steps li { padding: 6px 0 0 60px; }

  .platforms { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .platform { --cut: 16px; }
  .platform > header { padding: 20px 20px 18px; gap: 14px; }
  .file { padding-inline: 20px; gap: 10px; }
  .footer .brand { flex-basis: 100%; }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .btn::before, .file, .nav a { transition: background-color 0.12s, color 0.12s; }
  /* The bands settle in from the outside, coolest first. */
  .heat .band { animation: band-in 0.5s ease-out both; }
  .heat .band-1 { animation-delay: 0.08s; }
  .heat .band-2 { animation-delay: 0.16s; }
  .heat .band-3 { animation-delay: 0.24s; }
  .heat .band-4 { animation-delay: 0.32s; }
  @keyframes band-in { from { opacity: 0; } }
}
