/* Treasure Hunt design tokens (plan §9). Single static stylesheet, no build step.
   Component styles land with their screens (Phase 1+); Phase 0 is tokens + base + header/footer. */

:root {
  /* Palette from the approved mockups */
  --th-navy: #0B2A5B;
  --th-blue: #1E5BC6;
  --th-gold: #F5B800;
  --th-green: #1B8A3A;
  --th-sand: #FBF6EA;
  --th-sand-deep: #F3EAD3;
  --th-sky: #DCEFFB;
  --th-red: #C8322B;
  --th-ink: #132238;
  --th-white: #FFFFFF;

  /* Type. Oswald (display) + Nunito (body) are self-hosted in Phase 7; system fallbacks until then. */
  --th-font-display: "Oswald", "Arial Narrow", Impact, sans-serif;
  --th-font-body: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Spacing scale */
  --th-space-1: 0.25rem;
  --th-space-2: 0.5rem;
  --th-space-3: 0.75rem;
  --th-space-4: 1rem;
  --th-space-6: 1.5rem;
  --th-space-8: 2rem;
  --th-space-12: 3rem;

  --th-radius: 12px;
  --th-radius-pill: 999px;
  --th-shadow: 0 2px 8px rgba(19, 34, 56, 0.12);
  --th-container: 1120px;
  --th-touch-target: 44px;
}

/* Breakpoints (plan §11): mobile ≤640px, tablet 641–1024px, desktop >1024px. */

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--th-font-body);
  color: var(--th-ink);
  background: var(--th-sand);
  line-height: 1.5;
}

h1, h2, h3 {
  font-family: var(--th-font-display);
  color: var(--th-navy);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.15;
  margin: 0 0 var(--th-space-4);
}

a { color: var(--th-blue); }

code { font-size: 0.9em; word-break: break-all; }

.container {
  width: 100%;
  max-width: var(--th-container);
  margin: 0 auto;
  padding: 0 var(--th-space-4);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--th-touch-target);
  padding: var(--th-space-2) var(--th-space-6);
  border-radius: var(--th-radius-pill);
  font-family: var(--th-font-display);
  font-weight: 700;
  text-transform: uppercase;
  text-decoration: none;
  letter-spacing: 0.04em;
}
.btn--gold { background: var(--th-gold); color: var(--th-navy); }

/* Header */
.site-header { background: var(--th-navy); color: var(--th-white); }
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--th-space-4);
  min-height: 64px;
  flex-wrap: wrap;
}
.brand {
  font-family: var(--th-font-display);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--th-gold);
  text-decoration: none;
}
.site-nav { display: flex; align-items: center; gap: var(--th-space-4); flex-wrap: wrap; }
.site-nav a { color: var(--th-white); text-decoration: none; min-height: var(--th-touch-target); display: inline-flex; align-items: center; }
.site-nav .btn { color: var(--th-navy); }

/* Footer */
.site-footer { margin-top: var(--th-space-12); padding: var(--th-space-6) 0; background: var(--th-sand-deep); font-size: 0.9rem; }
.site-footer__inner { display: flex; justify-content: space-between; gap: var(--th-space-4); flex-wrap: wrap; }
.site-footer nav { display: flex; gap: var(--th-space-4); flex-wrap: wrap; }

/* Phase 0 placeholder + spike page */
.hero { padding: var(--th-space-12) 0; text-align: center; }
.hero__title { font-size: clamp(2rem, 6vw, 3.5rem); }
.hero__lead { font-size: 1.25rem; }
.hero__note { color: var(--th-blue); }

.spike { padding: var(--th-space-8) 0; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: var(--th-space-2) var(--th-space-4); }
.kv dt { font-weight: 700; }
.kv dd { margin: 0; }
.tag { display: inline-block; padding: 0 var(--th-space-2); border-radius: var(--th-radius-pill); color: var(--th-white); font-weight: 700; }
.tag--ok { background: var(--th-green); }
.tag--bad { background: var(--th-red); }
.tag--warn { background: var(--th-gold); color: var(--th-navy); }

@media (max-width: 640px) {
  .kv { grid-template-columns: 1fr; }
  .kv dd { margin-bottom: var(--th-space-2); }
}

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