/* ================================================================
   StreetWhiz Site — Design System
   Mirrors the Flutter app's hood_colors.dart, hood_spacing.dart,
   and hood_typography.dart tokens.
   ================================================================ */

/* ── Tokens ─────────────────────────────────────────────────────── */
:root {
  /* Brand green */
  --green-100: #E8F5D4;
  --green-400: #78C83D;
  --green-500: #58A700;
  --green-600: #478700;

  /* Accent yellow */
  --yellow-100: #FFF3C2;
  --yellow-500: #FFC800;
  --yellow-600: #D9A900;

  /* Surfaces */
  --paper:  #FDFAF4;
  --card:   #FFFFFF;

  /* Borders */
  --border-subtle: #EDE6D5;
  --border-strong: #D7CCB3;

  /* Ink */
  --ink-1:      #2F2A24;
  --ink-2:      #7A7268;
  --ink-3:      #C4BDAF;
  --ink-on-dark: #FFFFFF;

  /* Focus */
  --focus: #1CB0F6;

  /* Typography */
  --font-display: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-body:    'Hanken Grotesk', system-ui, sans-serif;

  /* Spacing */
  --sp-xs:  4px;
  --sp-sm:  8px;
  --sp-md:  12px;
  --sp-lg:  16px;
  --sp-xl:  24px;
  --sp-2xl: 40px;
  --sp-3xl: 64px;

  /* Radius */
  --r-sm:  8px;
  --r-md:  12px;
  --r-lg:  16px;
  --r-xl:  20px;

  /* Content widths */
  --max-prose:   65ch;
  --max-content: 980px;
}

/* ── Reset ───────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--ink-1);
  background: var(--paper);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  color: var(--ink-1);
}

p {
  color: var(--ink-2);
  line-height: 1.65;
}

a {
  color: var(--green-500);
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 3px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ── Layout helpers ──────────────────────────────────────────────── */
.container {
  max-width: var(--max-content);
  margin-inline: auto;
  padding-inline: var(--sp-xl);
}

@media (max-width: 700px) {
  .container { padding-inline: var(--sp-md); }
}

.section {
  padding-block: var(--sp-3xl);
}

/* Long-form prose passages (e.g. /about/). Constrains line length and
   establishes vertical rhythm between headings, paragraphs, and lists. */
.prose {
  max-width: var(--max-prose);
}

.prose h1 {
  font-size: clamp(2rem, 5vw, 2.75rem);
  margin-bottom: var(--sp-xl);
}

.prose h2 {
  font-size: 1.375rem;
  margin-top: var(--sp-2xl);
  margin-bottom: var(--sp-sm);
}

.prose h2:first-of-type {
  margin-top: var(--sp-md);
}

.prose h3 {
  font-size: 1.125rem;
  margin-top: var(--sp-xl);
  margin-bottom: var(--sp-xs);
}

.prose p,
.prose ul,
.prose ol {
  margin-block: 0 var(--sp-md);
  font-size: 1rem;
}

.prose ul,
.prose ol {
  padding-left: var(--sp-xl);
}

.prose li {
  color: var(--ink-2);
  line-height: 1.65;
  margin-block: var(--sp-xs);
}

.prose a {
  color: var(--ink-1);
  text-decoration: underline;
  text-decoration-color: var(--border-subtle);
  text-underline-offset: 3px;
}

.prose a:hover {
  text-decoration-color: var(--ink-2);
}

/* ── Skip link ───────────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -999px;
  left: var(--sp-lg);
  background: var(--green-500);
  color: var(--ink-on-dark);
  font-weight: 600;
  padding: var(--sp-sm) var(--sp-lg);
  border-radius: var(--r-md);
  text-decoration: none;
  z-index: 100;
}
.skip-link:focus {
  top: var(--sp-lg);
}

/* ── Nav ─────────────────────────────────────────────────────────── */
.site-nav {
  padding-block: var(--sp-lg);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.0625rem;
  color: var(--ink-on-dark);
  background: var(--green-500);
  padding: var(--sp-xs) var(--sp-md);
  border-radius: var(--r-sm);
  text-decoration: none;
  letter-spacing: 0.03em;
}

/* ── Hero ────────────────────────────────────────────────────────── */
.hero {
  padding-top: var(--sp-2xl);
  padding-bottom: var(--sp-3xl);
  background-image:
    linear-gradient(rgba(88, 167, 0, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(88, 167, 0, 0.045) 1px, transparent 1px);
  background-size: 48px 48px;
  background-color: var(--paper);
}

.hero h1 {
  font-size: clamp(2.5rem, 7vw, 3.75rem);
  margin-bottom: var(--sp-lg);
  max-width: 14ch;
}

.hero__sub {
  font-size: 1.125rem;
  color: var(--ink-2);
  max-width: 50ch;
  margin-bottom: var(--sp-md);
}

.hero__meta {
  font-size: 0.875rem;
  color: var(--ink-3);
  margin-bottom: var(--sp-2xl);
}

.hero__meta a {
  color: var(--ink-2);
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-md);
}

.cities__sub-heading {
  margin-top: var(--sp-3xl);
}

/* "Coming next" placeholder card — visually disabled */
.city-card--coming {
  background: transparent;
  border-style: dashed;
  cursor: default;
  opacity: 0.85;
}

.city-card--coming:hover {
  border-color: var(--border-subtle);
  box-shadow: none;
  transform: none;
}

.city-card--coming .city-card__title {
  color: var(--ink-2);
}

.city-card__status {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: var(--sp-xs);
}

/* ── Buttons ─────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-sm);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  padding: 0.75rem 1.375rem;
  border-radius: var(--r-lg);
  transition: transform 80ms ease, box-shadow 80ms ease, background 80ms ease;
  cursor: pointer;
  border: none;
  white-space: nowrap;
}

.btn-primary {
  color: var(--ink-on-dark);
  background: var(--green-500);
  box-shadow: 0 4px 0 var(--green-600);
}
.btn-primary:hover {
  background: var(--green-400);
  box-shadow: 0 3px 0 var(--green-600);
}
.btn-primary:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--green-600);
}

.btn-secondary {
  color: var(--ink-1);
  background: var(--card);
  border: 2px solid var(--border-strong);
  box-shadow: 0 4px 0 var(--border-strong);
}
.btn-secondary:hover {
  border-color: var(--green-500);
  color: var(--green-500);
  box-shadow: 0 4px 0 var(--green-500);
}
.btn-secondary:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--border-strong);
}

/* ── Cities (content hub) ────────────────────────────────────────── */
.cities {
  border-top: 1.5px solid var(--border-subtle);
}

.cities h2 {
  font-size: 1.75rem;
  margin-bottom: var(--sp-sm);
}

.cities__sub {
  font-size: 1rem;
  color: var(--ink-2);
  margin-bottom: var(--sp-2xl);
  max-width: 55ch;
}

.cities__grid {
  display: grid;
  gap: var(--sp-xl);
  grid-template-columns: 1fr;
}

@media (min-width: 520px) {
  .cities__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.city-card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
  padding: var(--sp-xl);
  background: var(--card);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--r-xl);
  text-decoration: none;
  transition: border-color 80ms ease, box-shadow 80ms ease, transform 80ms ease;
}

.city-card:hover {
  border-color: var(--green-500);
  box-shadow: 0 4px 16px rgba(88, 167, 0, 0.12);
  transform: translateY(-1px);
}

.city-card__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.375rem;
  color: var(--ink-1);
  margin: 0;
  line-height: 1.25;
}

.city-card__meta {
  font-size: 0.875rem;
  color: var(--ink-2);
}

/* legacy class names retained for resilience */
.city-card__location {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.375rem;
  color: var(--ink-1);
}

.city-card__hook {
  font-size: 0.9375rem;
  color: var(--ink-2);
  line-height: 1.55;
  flex: 1;
}

.city-card__tag {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--green-600);
  margin-top: var(--sp-xs);
  text-decoration: none;
}

.city-card__tag:hover { text-decoration: underline; }

.city-card--coming-soon {
  background: var(--paper);
  cursor: default;
}

.city-card--coming-soon:hover {
  border-color: var(--border-subtle);
  box-shadow: none;
  transform: none;
}

.city-card--coming-soon .city-card__location {
  color: var(--ink-3);
}

/* ── Game section ────────────────────────────────────────────────── */
.game {
  border-top: 1.5px solid var(--border-subtle);
  background: var(--green-100);
}

.game__inner {
  display: grid;
  gap: var(--sp-2xl);
  align-items: center;
}

@media (min-width: 600px) {
  .game__inner {
    grid-template-columns: 1fr 1fr;
  }
}

.game__copy h2 {
  font-size: 1.75rem;
  margin-bottom: var(--sp-md);
}

.game__copy p {
  font-size: 1.0625rem;
  max-width: var(--max-prose);
  margin-bottom: var(--sp-xl);
}

.game__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-md);
}

.game__screenshot {
  border-radius: var(--r-xl);
  border: 2px solid var(--border-subtle);
  box-shadow: 4px 4px 0 var(--border-strong);
  overflow: hidden;
}

/* ── Footer ──────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1.5px solid var(--border-subtle);
  padding-block: var(--sp-2xl);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-md);
  align-items: center;
  justify-content: space-between;
  font-size: 0.875rem;
  color: var(--ink-2);
}

.site-footer__links {
  display: flex;
  gap: var(--sp-xl);
  list-style: none;
}

.site-footer__links a {
  color: var(--ink-2);
  text-decoration: none;
}

.site-footer__links a:hover {
  color: var(--green-500);
}
