/* ══════════════════════════════════════════════════════════════════════════
   site.css — shared chrome for every generated page on outrunr.com.au.

   index.html keeps its own inline copy of these tokens and is NOT served from
   this file: it is hand-owned, it is the page that matters most, and coupling
   it to a stylesheet it does not need would risk the landing page for no gain.
   The tokens below are copied from it, so the two stay one design.

   Generated by nothing — this is source. The build only writes HTML.
   ══════════════════════════════════════════════════════════════════════════ */

/* ── FONTS ─────────────────────────────────────
   The exact files the app bundles, so site and app share one voice. */
@font-face {
  font-family: 'Space Grotesk';
  src: url('/fonts/SpaceGrotesk-Bold.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Space Grotesk';
  src: url('/fonts/SpaceGrotesk-SemiBold.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/fonts/Inter-Regular.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/fonts/Inter-Medium.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/fonts/Inter-SemiBold.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}

:root {
  --bg:            #F7FBFA;
  --surface:       #FFFFFF;
  --stroke:        #E2E8F0;
  --highlight:     #F1F5F9;

  --text:          #0F1727;
  --text-2:        #334155;
  --text-dim:      #64748B;

  --primary:       #1BC7B4;
  --primary-press: #149E8E;
  --primary-text:  #0F766E;

  --gold:          #FFC93C;
  --gold-text:     #A16207;
  --orange:        #F97316;

  --ink:           #0F1727;
  --ink-teal:      #113A43;
  --ink-stroke:    rgba(255,255,255,0.10);
  --on-ink:        #FFFFFF;
  --on-ink-muted:  #94A3B8;
  --brand-orange:  #F2911C;

  --z1: #009688; --z2: #2196F3; --z3: #4CAF50; --z4: #FF9800; --z5: #F44336;

  --font-display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;

  --maxw: 1120px;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.6rem;
}

a { color: var(--primary-text); }
.accent { color: var(--primary); }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 1.5rem; }
.narrow { max-width: 760px; }

/* ── NAV ──────────────────────────────────────────────────────────────── */

#navbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.5rem;
  background: rgba(247,251,250,0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--stroke);
}
.nav-logo {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: var(--font-display); font-weight: 700; font-size: 1.15rem;
  color: var(--text); text-decoration: none;
}
.nav-logo .accent { color: var(--primary-text); }
.nav-links { display: flex; gap: 1.4rem; }
.nav-links a {
  color: var(--text-2); text-decoration: none;
  font-size: 0.92rem; font-weight: 500;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--primary-text); }
@media (max-width: 720px) { .nav-links { display: none; } }

/* ── BUTTONS ──────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.5rem;
  background: var(--primary);
  color: var(--ink);
  font-family: var(--font-body); font-weight: 600; font-size: 0.95rem;
  padding: 0.8rem 1.5rem;
  border: none; border-radius: 50px;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background 0.2s, transform 0.15s;
}
.btn:hover { background: var(--primary-press); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.btn-sm { font-size: 0.85rem; padding: 0.6rem 1.2rem; }
.btn-ghost {
  background: transparent; color: var(--primary-text);
  border: 1px solid var(--stroke);
}
.btn-ghost:hover { background: var(--highlight); }

/* ── PAGE HEAD ────────────────────────────────────────────────────────── */

.tool-head { padding: 2.75rem 0 1.5rem; }
.breadcrumb {
  font-size: 0.82rem; color: var(--text-dim);
  margin-bottom: 0.9rem;
}
.breadcrumb a { color: var(--text-dim); text-decoration: none; }
.breadcrumb a:hover { color: var(--primary-text); }
.tool-head h1 { font-size: clamp(1.75rem, 4vw, 2.6rem); }
.tool-head .lede {
  color: var(--text-2); font-size: 1.05rem; line-height: 1.75;
  max-width: 620px; margin: 0.4rem 0 0;
}

/* ── THE TOOL ─────────────────────────────────────────────────────────── */

.tool {
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: 20px;
  padding: 1.6rem;
  margin: 1.5rem 0 2.5rem;
}
@media (min-width: 720px) { .tool { padding: 2rem; } }

.field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1.1rem 1.25rem;
}
.field label {
  display: block;
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--text-dim);
  margin-bottom: 0.4rem;
}
.field input, .field select {
  width: 100%;
  font-family: var(--font-body); font-size: 1rem;
  color: var(--text); background: var(--bg);
  border: 1px solid var(--stroke); border-radius: 12px;
  padding: 0.7rem 0.9rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input:focus, .field select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(27,199,180,0.18);
}
.field .hint { font-size: 0.78rem; color: var(--text-dim); margin-top: 0.3rem; }
.field-error {
  display: none;
  font-size: 0.82rem; color: #B91C1C; margin-top: 0.35rem;
}
.field.invalid .field-error { display: block; }
.field.invalid input, .field.invalid select { border-color: #DC2626; }

.tool-actions {
  display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center;
  margin-top: 1.4rem;
}

/* ── THE RESULT ───────────────────────────────────────────────────────── */

.result { display: none; margin-top: 1.75rem; }
.result.shown { display: block; }

.result-hero {
  background: var(--ink);
  background-image: linear-gradient(160deg, var(--ink-teal), var(--ink) 65%);
  color: var(--on-ink);
  border-radius: 18px;
  padding: 1.6rem;
  text-align: center;
}
.result-hero .eyebrow {
  font-size: 0.74rem; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--primary);
}
.result-hero .figure {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2.4rem, 9vw, 3.6rem);
  line-height: 1.05; margin: 0.35rem 0 0.2rem;
  font-variant-numeric: tabular-nums;
}
.result-hero .caption { color: var(--on-ink-muted); font-size: 0.95rem; margin: 0; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
  margin-top: 0.9rem;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: 14px;
  padding: 0.95rem 1rem;
}
.stat .k {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-dim);
}
.stat .v {
  font-family: var(--font-display); font-weight: 700; font-size: 1.5rem;
  font-variant-numeric: tabular-nums;
  margin-top: 0.15rem;
}
.stat .sub { font-size: 0.8rem; color: var(--text-dim); }

.result-table { width: 100%; border-collapse: collapse; margin-top: 0.9rem; }
.result-table caption {
  text-align: left; font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-dim);
  padding-bottom: 0.5rem;
}
.result-table th, .result-table td {
  text-align: left; padding: 0.75rem 0.75rem 0.75rem 0;
  border-bottom: 1px solid var(--stroke); font-size: 0.95rem;
  vertical-align: baseline;
}
/* Column headers are labels, so they get the small-caps treatment. Row
   headers are CONTENT — a shoe name, a distance, an effort — and giving them
   the same treatment turned every table into a block of shouting. Scope the
   label styling to thead so a `th scope="row"` reads as the sentence it is. */
.result-table thead th {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-dim);
  padding-bottom: 0.5rem;
}
.result-table tbody th {
  font-weight: 500; color: var(--text); padding-right: 1.5rem;
}
.result-table td.num { font-variant-numeric: tabular-nums; text-align: right; }
.table-scroll { overflow-x: auto; }

.note {
  border-left: 3px solid var(--gold);
  background: rgba(255,201,60,0.10);
  border-radius: 0 12px 12px 0;
  padding: 0.85rem 1rem;
  margin-top: 0.9rem;
  font-size: 0.92rem; color: var(--text-2);
}
.note.teal { border-left-color: var(--primary); background: rgba(27,199,180,0.09); }

.meter {
  height: 10px; border-radius: 50px; background: var(--highlight);
  overflow: hidden; margin: 0.6rem 0 0.3rem;
}
.meter > span { display: block; height: 100%; border-radius: 50px; background: var(--primary); }

/* ── PROSE + FAQ ──────────────────────────────────────────────────────── */

/* Reading copy is capped by MEASURE, not by the container: 60-ish characters
   a line. The column used to run the full 760px, which at this size is nearly
   90 characters — long enough that the eye loses its place returning to the
   left edge, which is what makes a page of perfectly good prose feel like a
   wall. Tables and figures are exempt; they want the room. */
.prose { max-width: 100%; font-size: 1.0625rem; line-height: 1.75; }
.prose > p, .prose > ul, .prose > ol { max-width: 62ch; }
.prose p { margin: 0 0 1.15em; }

/* A hairline above each h2 so sections are separated by something the eye
   catches before it starts reading. */
.prose h2 {
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  margin-top: 3rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--stroke);
  text-wrap: balance;
}
.prose h3 {
  font-size: 1.15rem;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
  color: var(--text);
  text-wrap: balance;
}
.prose p, .prose li { color: var(--text-2); }
.prose strong { color: var(--text); font-weight: 600; }
.prose ul { padding-left: 1.25rem; margin: 0 0 1.15em; }
.prose li { margin-bottom: 0.6rem; padding-left: 0.25rem; }
.prose li::marker { color: var(--primary-text); }
.prose .table-scroll { margin: 1.5rem 0 2rem; }

/* The FAQ gets the same treatment as the prose: a rule above the section so
   it reads as a new region, and answers capped to a readable measure. */
.faq { margin-top: 3rem; padding-top: 1.75rem; border-top: 1px solid var(--stroke); }
.faq h2 { font-size: clamp(1.4rem, 3vw, 1.85rem); margin-bottom: 1rem; }
.faq details {
  border-bottom: 1px solid var(--stroke);
  padding: 1.1rem 0;
}
.faq summary {
  cursor: pointer; font-weight: 600; font-family: var(--font-display);
  font-size: 1.05rem; list-style: none;
  padding-right: 1.5rem; position: relative;
  text-wrap: balance;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+'; position: absolute; right: 0; top: 0;
  color: var(--text-dim); font-weight: 400; font-size: 1.2rem; line-height: 1;
}
.faq details[open] summary::after { content: '–'; }
.faq details[open] summary { color: var(--primary-text); }
.faq p {
  color: var(--text-2); margin: 0.7rem 0 0;
  max-width: 62ch; line-height: 1.75;
}

/* ── CROSS-LINKS ──────────────────────────────────────────────────────── */

.tool-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}
.more-tools {
  margin-top: 3rem; padding-top: 1.75rem;
  border-top: 1px solid var(--stroke);
}
.more-tools h2 { font-size: clamp(1.4rem, 3vw, 1.85rem); }
.tool-link {
  display: block;
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: 16px;
  padding: 1.15rem;
  text-decoration: none; color: inherit;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}
.tool-link:hover {
  border-color: rgba(27,199,180,0.45);
  transform: translateY(-3px);
  box-shadow: 0 14px 36px rgba(15,23,39,0.07);
}
.tool-link strong { display: block; font-family: var(--font-display); font-size: 1.05rem; }
.tool-link span { font-size: 0.9rem; color: var(--text-dim); }

/* ── CLOSING ASK ──────────────────────────────────────────────────────── */

.cta {
  background: var(--ink);
  background-image: linear-gradient(150deg, var(--ink-teal), var(--ink) 70%);
  color: var(--on-ink);
  border-radius: 22px;
  padding: 2.25rem 1.5rem;
  text-align: center;
  margin: 3rem 0;
}
.cta h2 { font-size: clamp(1.5rem, 3.6vw, 2.1rem); }
.cta p { color: var(--on-ink-muted); max-width: 480px; margin: 0 auto 1.25rem; }

.waitlist-form {
  display: flex; flex-direction: column; gap: 0.6rem;
  width: 100%; max-width: 480px; margin: 0 auto 0.75rem;
}
.form-row { display: flex; gap: 0.6rem; }
.waitlist-input {
  flex: 1; min-width: 0;
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--ink-stroke);
  color: var(--on-ink);
  font-family: var(--font-body); font-size: 1rem;
  padding: 0.85rem 1.25rem; border-radius: 50px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.waitlist-input::placeholder { color: var(--on-ink-muted); }
.waitlist-input:focus {
  border-color: var(--primary);
  background: rgba(255,255,255,0.1);
  box-shadow: 0 0 0 3px rgba(27,199,180,0.2);
}
.form-note { font-size: 0.78rem; color: var(--on-ink-muted); }
.form-msg {
  display: none;
  max-width: 480px; margin: 0 auto 0.75rem;
  padding: 0.875rem 1.5rem; border-radius: 14px;
  font-size: 0.95rem; font-weight: 500;
}
.form-msg.shown { display: block; }
.form-msg.success { background: rgba(27,199,180,0.14); border: 1px solid rgba(27,199,180,0.34); color: var(--primary); }
.form-msg.already { background: rgba(255,201,60,0.14); border: 1px solid rgba(255,201,60,0.34); color: var(--gold); }
.form-msg.error   { background: rgba(244,67,54,0.13); border: 1px solid rgba(244,67,54,0.32); color: #FCA5A5; }

/* ── FOOTER ───────────────────────────────────────────────────────────── */

footer { border-top: 1px solid var(--stroke); padding: 2.25rem 0 2.75rem; }
.footer-top {
  display: flex; flex-wrap: wrap; gap: 1rem 1.75rem;
  align-items: center; justify-content: space-between;
}
.footer-logo {
  font-family: var(--font-display); font-weight: 700; font-size: 1.1rem;
  color: var(--text); text-decoration: none;
}
.footer-logo .accent { color: var(--primary-text); }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.1rem; }
.footer-links a { color: var(--text-2); text-decoration: none; font-size: 0.9rem; }
.footer-links a:hover { color: var(--primary-text); }
.footer-legal { margin-top: 1.75rem; font-size: 0.8rem; color: var(--text-dim); }
.footer-legal p { margin: 0 0 0.6rem; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.btn-spinner {
  width: 15px; height: 15px;
  border: 2px solid rgba(15,23,39,0.25);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
