/* RunnersVibe site styles. Apple-style system: light grey page, white and black tiles,
   one green accent, Inter for text, JetBrains Mono for every number a runner reads (paces, splits, grams). */

@font-face { font-family: "Inter"; src: url("../fonts/inter-latin.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/jetbrains-mono-latin.woff2") format("woff2"); font-weight: 600 700; font-display: swap; }

:root {
  --page: #f5f5f7; --white: #ffffff; --black: #000000; --ink: #1d1d1f; --text: #1d1d1f; --muted: #6e6e73;
  --line: #d2d2d7; --nav: rgba(251,251,253,.86);
  --accent: #1d7316; --accent-dark: #6fe065; --pill: #46cf3c; --on-pill: #071006; --new: #b64400;
  --f: "Inter", -apple-system, "SF Pro Text", "Helvetica Neue", "Segoe UI", Arial, sans-serif;
  --f-data: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; }
body { background: var(--white); color: var(--text); font: 400 17px/1.47 var(--f); letter-spacing: -.022em; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--pill); outline-offset: 2px; }
.num { font-family: var(--f-data); font-variant-numeric: tabular-nums; }
.wrap { max-width: 1024px; margin: 0 auto; padding-inline: 16px; }
.wide { max-width: 1240px; margin: 0 auto; padding-inline: 16px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }

/* global nav */
.gnav { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--nav); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid rgba(0,0,0,.06); }
.gnav .in { max-width: 1024px; margin: 0 auto; padding-inline: 16px; height: 96px; display: flex; align-items: center; gap: 26px; font-size: 13px; color: #333; }
.gnav .logo { margin-right: auto; display: flex; align-items: center; gap: 14px; font-weight: 800; font-size: 30px; letter-spacing: -.01em; }
.gnav .logo img { width: 80px; height: 80px; border-radius: 50%; }
.gnav .logo b { color: var(--pill); font-weight: 700; }
.gnav a:hover { color: #000; }
.gnav a[aria-current="page"] { color: #000; font-weight: 600; }
.gnav .cta { background: var(--pill); color: var(--on-pill); font-weight: 600; padding: 6px 12px; border-radius: 980px; }
.banner { background: var(--page); text-align: center; font-size: 14px; padding: 12px 16px; }
.banner a { color: var(--accent); }
.banner a::after { content: " ›"; }

/* buttons and links */
.pill { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 20px; border-radius: 980px; font: 500 17px var(--f); border: 1px solid transparent; cursor: pointer; background: none; color: inherit; }
.pill.fill { background: var(--pill); color: var(--on-pill); }
.pill.line { border-color: var(--accent); color: var(--accent); }
.dark .pill.line { border-color: var(--accent-dark); color: var(--accent-dark); }
.more { color: var(--accent); }
.more::after { content: " ›"; }
.dark .more { color: var(--accent-dark); }
.ctas { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }

/* page header for inner pages */
.phead { text-align: center; padding: 56px 16px 28px; }
.phead .eyebrow { font-size: 14px; font-weight: 600; color: var(--accent); }
.phead h1 { margin: 6px 0 0; font-size: clamp(40px, 6.4vw, 64px); font-weight: 700; letter-spacing: -.035em; line-height: 1.05; text-wrap: balance; }
.phead p { margin: 10px auto 0; max-width: 40ch; font-size: clamp(19px, 2.2vw, 24px); color: var(--muted); letter-spacing: -.02em; }

/* tiles */
.tile { text-align: center; overflow: hidden; padding-top: 52px; display: grid; justify-items: center; }
.tile + .tile { margin-top: 12px; }
.tile.dark { background: var(--black); color: #f5f5f7; }
.tile.grey { background: var(--page); }
.tile h2 { margin: 0; font-size: clamp(40px, 5.6vw, 56px); font-weight: 600; letter-spacing: -.03em; line-height: 1.07; text-wrap: balance; }
.tile .sub { margin: 6px 0 0; font-size: clamp(21px, 2.4vw, 28px); letter-spacing: -.02em; }
.stage { width: 100%; max-width: 1100px; padding: 28px 16px 0; }

/* sections on inner pages */
section.block { padding-block: 56px; scroll-margin-top: 60px; }
.sh { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.sh h2 { margin: 0; font-size: clamp(30px, 4.4vw, 44px); font-weight: 700; letter-spacing: -.03em; line-height: 1.08; text-wrap: balance; }
.card { background: var(--white); border-radius: 24px; padding: clamp(20px, 3vw, 32px); }
.on-grey { background: var(--page); }
.prose { max-width: 680px; }
.prose h2 { font-size: 28px; letter-spacing: -.02em; margin: 40px 0 10px; }
.prose h3 { font-size: 20px; margin: 28px 0 6px; }
.prose p, .prose li { color: #3a3a3c; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* segmented controls and chips */
.seg { display: inline-flex; flex-wrap: wrap; gap: 2px; background: #e8e8ed; border-radius: 980px; padding: 3px; }
.seg button { font: 500 14px var(--f); letter-spacing: -.01em; border: 0; background: transparent; color: var(--text); padding: 7px 14px; border-radius: 980px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--white); box-shadow: 0 1px 4px rgba(0,0,0,.14); font-weight: 600; }
.dark .seg { background: #2c2c2e; }
.dark .seg button { color: #f5f5f7; }
.dark .seg button[aria-pressed="true"] { background: var(--pill); color: var(--on-pill); box-shadow: none; }

/* forms */
.signup { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; width: min(500px, 100%); margin-inline: auto; }
.signup input[type=email] { flex: 1 1 230px; min-width: 0; min-height: 44px; border-radius: 980px; border: 1px solid var(--line); background: var(--white); padding: 0 18px; font: 400 17px var(--f); color: var(--text); }
.signup button { min-height: 44px; border: 0; border-radius: 980px; background: var(--pill); color: var(--on-pill); font: 600 16px var(--f); padding: 0 22px; cursor: pointer; }
.signup button[disabled] { opacity: .6; cursor: wait; }
.consent { font-size: 12px; color: var(--muted); margin-top: 10px; text-align: center; }
.consent a { text-decoration: underline; }
.msg { font-size: 15px; font-weight: 600; margin-top: 10px; text-align: center; min-height: 1.4em; }
.msg.ok { color: var(--accent); } .msg.err { color: #c0392b; }
.dark .msg.ok { color: var(--accent-dark); }

/* pace calculator */
.calc { background: var(--white); border-radius: 28px; padding: clamp(20px, 3vw, 32px); display: grid; gap: 16px; text-align: left; box-shadow: 0 20px 50px -34px rgba(0,0,0,.35); }
.calc .row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.time { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.time label, .dk { display: grid; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.time input, .dk input { width: 100%; min-width: 0; font: 700 clamp(24px, 3.4vw, 34px) var(--f-data); padding: 10px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--page); color: var(--text); }
.out { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.out div { background: var(--page); border-radius: 14px; padding: 12px 14px; font-size: 13px; color: var(--muted); }
.out b { display: block; font: 700 clamp(22px, 3vw, 32px) var(--f-data); color: var(--text); margin-top: 2px; }
.out div:first-child b { color: var(--accent); }
.units { display: inline-flex; gap: 2px; background: #e8e8ed; border-radius: 980px; padding: 3px; }
.units button { font: 600 13px var(--f); border: 0; background: transparent; color: var(--text); padding: 6px 12px; border-radius: 980px; cursor: pointer; }
.units button[aria-pressed="true"] { background: var(--pill); color: var(--on-pill); }

/* pace band */
.band { display: flex; overflow-x: auto; background: var(--pill); color: var(--on-pill); border-radius: 20px; scrollbar-width: thin; }
.band > div { flex: 1 0 86px; padding: 14px 12px; border-left: 2px dashed rgba(7,16,6,.3); text-align: center; }
.band > div:first-child { border-left: 0; flex: 0 0 auto; text-align: left; background: rgba(7,16,6,.12); padding-inline: 16px; }
.band span { display: block; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; opacity: .75; }
.band b { font: 700 18px var(--f-data); font-variant-numeric: tabular-nums; }
.band .key { background: rgba(7,16,6,.08); }

/* footer */
footer.site { background: var(--page); color: var(--muted); font-size: 12px; margin-top: 12px; }
footer.site .in { max-width: 1024px; margin: 0 auto; padding: 16px 16px 48px; }
footer.site ol { margin: 0 0 14px; padding: 0 0 14px 16px; border-bottom: 1px solid var(--line); display: grid; gap: 6px; }
.dir { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding-block: 8px 18px; border-bottom: 1px solid var(--line); }
.dir h4 { margin: 0 0 8px; color: var(--text); font-size: 12px; font-weight: 600; }
.dir a { display: block; margin-bottom: 6px; }
.dir a:hover { color: var(--text); text-decoration: underline; }
.legal { padding-top: 14px; display: flex; gap: 16px; flex-wrap: wrap; justify-content: space-between; }

@media (max-width: 834px) {
  .gnav .hide { display: none; }
  .dir { grid-template-columns: 1fr 1fr; }
}
.gnav .in a { white-space: nowrap; }
@media (max-width: 560px) {
  /* small screens: logo and Newsletter on the first line, the page links on a second line */
  .gnav .in { flex-wrap: wrap; height: auto; min-height: 76px; padding-block: 8px; row-gap: 6px; column-gap: 18px; }
  .gnav .logo { order: 1; }
  .gnav .cta { order: 2; }
  .gnav .in > a:not(.logo):not(.cta) { order: 3; font-size: 14px; }
  .gnav .in::after { content: ""; order: 2; flex-basis: 100%; height: 0; }
}
@media (max-width: 520px) {
  .out { grid-template-columns: 1fr 1fr; }
  .out div:first-child { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

/* shop: the race-day guide product visual (an English cover card plus two real pace band strips from the PDF) */
.gpack { position: relative; width: min(520px, 100%); aspect-ratio: 1 / 1; margin: 0 auto; }
.gpack .strip { position: absolute; width: 92%; border-radius: 10px; box-shadow: 0 30px 50px -30px rgba(0,0,0,.55); background: #fff; }
.gpack .strip { z-index: 3; width: 78%; }
.gpack .strip.s1 { right: 0; top: 60%; transform: rotate(4deg); }
.gpack .strip.s2 { right: 6%; top: 81%; transform: rotate(-3deg); }
.gcover { position: absolute; left: 2%; top: 2%; width: 58%; aspect-ratio: 210 / 297; background: #0d0d0d; color: #fff; border-radius: 6px;
  padding: 8% 7%; display: grid; align-content: space-between; text-align: left; box-shadow: 0 40px 70px -30px rgba(0,0,0,.7); transform: rotate(-3deg); z-index: 2; }
.gcover .brand { font-weight: 800; font-size: clamp(9px, 1.3vw, 13px); letter-spacing: .08em; }
.gcover .brand b, .gcover .t b { color: var(--pill); }
.gcover .t { font-weight: 800; font-size: clamp(22px, 4vw, 40px); line-height: 1.02; letter-spacing: -.035em; }
.gcover .d { font-size: clamp(9px, 1.15vw, 12px); color: #c7c7cc; line-height: 1.4; margin-top: 8px; }
.gcover .chips { display: flex; flex-wrap: wrap; gap: 4px; }
.gcover .chips span { border: 1px solid var(--pill); border-radius: 99px; padding: 2px 7px; font-size: clamp(7px, .9vw, 10px); font-weight: 600; }
.price { font: 700 clamp(28px, 3.2vw, 36px) var(--f); letter-spacing: -.03em; }
.price small { font: 500 15px var(--f); color: var(--muted); letter-spacing: 0; margin-left: 6px; }
.dark .price small { color: #a1a1a6; }
@media (max-width: 560px) { .gnav .logo img { width: 60px; height: 60px; } .gnav .logo { font-size: 24px; } }
