/* LFF5 shared styles: "Texas grit", issue 66 and its owner amendment (2026-11-29).
   A gig poster at a ranch gate, not a juice bar. Lemon yellow is the accent and CTA colour only.
   Used by the home page, shop, races (WS4), order and success pages (WS5) and ticket pages (WS6).
   Don't fork the palette: add a token here instead.

   Fonts (Google Fonts), loaded by each page:
   <link href="https://fonts.googleapis.com/css2?family=Anton&family=Archivo:wght@400;600;800&family=DM+Mono:wght@400;500&family=Rye&display=swap" rel="stylesheet">
   Anton: display. Rye: rare wood-type accents (badges, stamps). Archivo: UI and body. DM Mono: receipts, tickets, bibs. */

:root {
  /* Brand */
  --lemon: #FFD60A;    /* accent and CTAs only, with ink text on top */
  --ink: #1B1406;      /* text and outlines */
  /* Earth */
  --caliche: #D9C7A3;  /* dust: the light background */
  --dust: var(--caliche); /* alias used by shop/races.js (WS4) */
  --paper: #EFE4CC;    /* cards and ticket stock on caliche */
  --rust: #A4471E;     /* large display text (24px+) and rules on caliche (3.6:1); white or paper text on it */
  --mesquite: #3B2A1A; /* dark panels; caliche or lemon text on it */
  --mesquite-deep: #24190F; /* deepest ground (home page at dusk); granite text 5.3:1 on it */
  --sage: #7A8B6A;     /* quiet fills and "added" states, ink text on it */
  --granite: #C97B6B;  /* pink-granite hill silhouettes */
  /* Night */
  --night: #12204A;    /* Moonlight Races sections */
  --moon: #F4F1E6;     /* text on night */
  /* Kids items only, muted */
  --kid: #C98A92;

  --bg: var(--caliche);
  --fg: var(--ink);
  --muted: #4A3B28;    /* secondary text: 6.5:1 on caliche, 8.5:1 on paper */
  --line: rgba(27, 20, 6, .22);

  --font-display: 'Anton', 'Arial Narrow', Impact, sans-serif;
  --font-wood: 'Rye', 'Anton', serif;
  --font-ui: 'Archivo', system-ui, sans-serif;
  --font-mono: 'DM Mono', ui-monospace, monospace;
  --gutter: 16px;
  --tap: 48px;
  --heavy: cubic-bezier(.2, .7, .2, 1);

  /* Textures, all inline SVG under 10 KB together. */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .11 0 0 0 0 .08 0 0 0 0 .02 0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E");
  --tire-track: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='14'%3E%3Cpath d='M2 2l8 5-8 5M14 2l8 5-8 5' fill='none' stroke='%231B1406' stroke-width='2.5' stroke-linejoin='round'/%3E%3C/svg%3E");
  --tire-track-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='14'%3E%3Cpath d='M2 2l8 5-8 5M14 2l8 5-8 5' fill='none' stroke='%23D9C7A3' stroke-opacity='.4' stroke-width='2.5' stroke-linejoin='round'/%3E%3C/svg%3E");
  --topo-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='120' fill='none' stroke='%23D9C7A3' stroke-opacity='.07'%3E%3Cpath d='M0 90c40-30 80 10 120-20s80-10 120-40'/%3E%3Cpath d='M0 104c40-28 80 12 120-18s80-8 120-38'/%3E%3Cpath d='M0 76c40-32 80 8 120-22s80-12 120-42'/%3E%3Cpath d='M0 118c40-26 80 14 120-16s80-6 120-36'/%3E%3C/svg%3E");
  --topo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='120' fill='none' stroke='%231B1406' stroke-opacity='.12'%3E%3Cpath d='M0 90c40-30 80 10 120-20s80-10 120-40'/%3E%3Cpath d='M0 104c40-28 80 12 120-18s80-8 120-38'/%3E%3Cpath d='M0 76c40-32 80 8 120-22s80-12 120-42'/%3E%3Cpath d='M0 118c40-26 80 14 120-16s80-6 120-36'/%3E%3C/svg%3E");
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg: var(--night); --fg: var(--moon); --muted: #C9C3B0; --line: rgba(244, 241, 230, .22); }
}
:root[data-theme="dark"] { --bg: var(--night); --fg: var(--moon); --muted: #C9C3B0; --line: rgba(244, 241, 230, .22); }

body { background: var(--bg); color: var(--fg); font-family: var(--font-ui); }
/* Paper grain over everything, never in the way. */
.lff-grain { position: relative; }
.lff-grain::before { content: ''; position: absolute; inset: 0; background: var(--grain); pointer-events: none; mix-blend-mode: multiply; }

.lff-display { font-family: var(--font-display); font-weight: 400; line-height: .95; letter-spacing: .01em; text-transform: uppercase; }
.lff-wood { font-family: var(--font-wood); font-weight: 400; }
.lff-mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* Dividers */
.lff-track { height: 14px; background: var(--tire-track) repeat-x center / 24px 14px; opacity: .55; border: 0; }
.lff-topo { background-image: var(--topo); background-size: 240px 120px; }

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--fg);
  outline-offset: 2px;
}

/* Press-down button: heavy, no bounce. */
.lff-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  padding: 0 22px;
  border: 2px solid var(--ink);
  border-radius: 6px;
  background: var(--lemon);
  color: var(--ink);
  font: 800 1rem/1 var(--font-ui);
  letter-spacing: .04em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 0 var(--ink);
  transition: transform 90ms var(--heavy), box-shadow 90ms var(--heavy);
}
.lff-btn:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 2px 0 var(--ink); }
.lff-btn:disabled { opacity: .5; cursor: default; }
.lff-btn-quiet { background: var(--paper); }

/* Chips toggle with aria-pressed. */
.lff-chip[aria-pressed="true"] { background: var(--lemon); color: var(--ink); }

/* Letterpress stamp for badges. */
.lff-stamp {
  display: inline-block;
  font: 400 .8rem/1 var(--font-wood);
  color: var(--rust);
  border: 2px solid currentColor;
  border-radius: 4px;
  padding: 4px 8px 3px;
  transform: rotate(-3deg);
  text-transform: uppercase;
}

/* Riders drift slowly; nothing bounces. */
@keyframes lff-drift { 50% { transform: translateX(6px); } }
.lff-drift { animation: lff-drift 6s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
