/* Singletrack site: shared ink style. Values come from docs/design/tokens.json; rules from docs/design/STYLE.md.
   Hard offset shadows only, ink outlines on every shape, Bangers from 20px up, Barlow Condensed below. */

@font-face { font-family: "Bangers"; src: url("../fonts/bangers_regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("../fonts/barlow_condensed_bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  --ink: #16120E; --paper: #F3E6C8; --paper2: #E8D5A8; --surface: #FFFFFF;
  --orange: #FF6B2C; --yellow: #FFD23F; --red: #E63946; --teal: #19B5A5; --green: #6BBF3B;
  --ground: var(--paper); --text: var(--ink); --card: var(--surface);
  --stroke: 4px; --shadow: 6px 6px 0 var(--ink); --shadow-sm: 3px 3px 0 var(--ink);
  --radius-card: 22px; --radius-btn: 16px; --radius-chip: 12px;
  --display: "Bangers", "Impact", sans-serif; --body: "Barlow Condensed", system-ui, sans-serif;
  --gutter: 16px;
}
@media (prefers-color-scheme: dark) {
  :root { --ground: #1B2036; --text: #F3E6C8; --card: #434D78; }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--text); font: 700 20px/1.45 var(--body); }
img { max-width: 100%; height: auto; }
a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; }
h1, h2, h3, .btn, .logo, .sticker { font-family: var(--display); font-weight: 400; letter-spacing: 1px; }
h1 { font-size: clamp(38px, 8vw, 72px); line-height: 1.02; margin: 0 0 12px; }
h2 { font-size: clamp(30px, 5vw, 44px); line-height: 1.05; margin: 0 0 12px; }
h3 { font-size: 26px; line-height: 1.1; margin: 0 0 6px; }
p { margin: 0 0 12px; }

.wrap { max-width: 1100px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.stack { padding-top: 28px; padding-bottom: 28px; }
.stack > * + * { margin-top: 16px; }
.small { font-size: 17px; opacity: .9; }

/* Header and footer */
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; padding-bottom: 14px; flex-wrap: wrap; }
.bar nav { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.logo { font-size: 30px; text-decoration: none; color: var(--text); }
.foot { padding-top: 24px; padding-bottom: 40px; display: flex; gap: 8px 20px; flex-wrap: wrap; align-items: center; }
.foot p { flex-basis: 100%; margin: 4px 0 0; }

/* Cards, buttons, tags */
.card { background: var(--card); color: var(--text); border: var(--stroke) solid var(--ink); border-radius: var(--radius-card); box-shadow: var(--shadow); padding: 20px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 24px; font-size: 26px; line-height: 1; border: var(--stroke) solid var(--ink); border-radius: var(--radius-btn); background: var(--yellow); color: var(--ink); box-shadow: 0 6px 0 var(--ink); text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:active { transform: translateY(5px); box-shadow: 0 1px 0 var(--ink); }
.btn[disabled] { opacity: .55; cursor: default; }
.btn--ghost { background: var(--card); color: var(--text); }
.btn--small { min-height: 44px; padding: 0 16px; font-size: 22px; box-shadow: 0 4px 0 var(--ink); }
.chip { display: inline-block; padding: 2px 12px; border: 3px solid var(--ink); border-radius: var(--radius-chip); background: var(--paper2); color: var(--ink); font-size: 18px; }
.pill { display: inline-block; padding: 2px 14px; border: 3px solid var(--ink); border-radius: 999px; background: var(--card); color: var(--text); }
.sticker { display: inline-block; padding: 4px 14px; background: var(--red); color: #fff; border: 3px solid var(--ink); border-radius: var(--radius-chip); transform: rotate(-3deg); box-shadow: var(--shadow-sm); font-size: 24px; }

/* Status text: never colour alone, always a stripe too */
.ok, .bad { padding-left: 10px; border-left: 6px solid var(--green); }
.bad { border-left-color: var(--red); }

/* Forms */
label { display: block; font-size: 20px; margin-bottom: 6px; }
input { width: 100%; min-height: 52px; padding: 0 14px; font: 26px var(--display); letter-spacing: 1px; color: var(--ink); background: var(--paper); border: 3px solid var(--ink); border-radius: var(--radius-btn); }

/* Anything marked hidden stays hidden, even when a class sets display (the consent page shows and hides whole steps) */
[hidden] { display: none !important; }
.btn--block { width: 100%; white-space: normal; }
.terms { font-size: 18px; }

/* Focus is always visible */
.btn:focus-visible, a:focus-visible, input:focus-visible { outline: 4px solid var(--teal); outline-offset: 3px; }

/* Long reading text (the legal and consent pages) */
.legal { max-width: 44rem; padding-top: 12px; padding-bottom: 48px; font-size: 19px; line-height: 1.6; }
.legal h1 { font-size: clamp(34px, 7vw, 54px); }
.legal h2 { margin-top: 28px; }
.legal ul, .legal ol { padding-left: 1.3em; }
.legal li { margin-bottom: 6px; }
.legal .card { margin: 16px 0 24px; }
.legal .meta { opacity: .85; }
.legal div.msg { background: var(--card); color: var(--text); border: 3px solid var(--ink); border-radius: var(--radius-btn); padding: 10px 14px; margin: 8px 0; font-weight: 700; word-break: break-word; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
