/* Empire State Games — site styles
   Palette and typography from BRANDING.md */

:root {
  --esg-blue: #1264ae;
  --esg-blue-dark: #0d4d8c;
  --esg-blue-deep: #093767;
  --esg-gold: #f0c34c;
  --esg-gold-dark: #cfa024;
  --esg-cream: #faf7ee;
  --esg-paper: #ffffff;
  --esg-ink: #1a1a1a;
  --esg-ink-soft: #4a4a4a;
  --esg-rule: #d8d2c0;

  --font-display: "Cinzel", "Trajan Pro", Georgia, serif;
  --font-body: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --shadow-card: 0 1px 2px rgba(9, 55, 103, .04), 0 8px 24px rgba(9, 55, 103, .04);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--esg-ink);
  background: var(--esg-cream);
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */

.site-header {
  background: var(--esg-paper);
  border-bottom: 3px solid var(--esg-blue);
  box-shadow: 0 1px 0 rgba(9, 55, 103, .04);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
  gap: 24px;
}
.brand { display: inline-block; line-height: 0; }
.brand img { display: block; }

.primary-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.primary-nav a {
  color: var(--esg-blue-dark);
  text-decoration: none;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: border-color .15s ease;
}
.primary-nav a:hover { border-bottom-color: var(--esg-gold); }
.primary-nav li.current a { border-bottom-color: var(--esg-blue); }

/* ---------- Content ---------- */

.content { padding: 40px 24px 80px; }

.page-head { margin: 0 0 32px; padding-bottom: 24px; border-bottom: 1px solid var(--esg-rule); }
.page-head h1 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: .02em;
  color: var(--esg-blue-deep);
  line-height: 1.15;
}
.page-head .subtitle {
  margin: 0;
  font-size: 18px;
  color: var(--esg-ink-soft);
}

.prose { max-width: 72ch; }
.prose h2, .prose h3, .prose h4 {
  font-family: var(--font-display);
  color: var(--esg-blue-deep);
  letter-spacing: .01em;
  line-height: 1.25;
}
.prose h2 { font-size: 26px; margin: 48px 0 12px; }
.prose h3 { font-size: 21px; margin: 32px 0 8px; }
.prose h4 { font-size: 17px; margin: 24px 0 6px; text-transform: uppercase; letter-spacing: .08em; }
.prose p { margin: 0 0 14px; }
.prose a { color: var(--esg-blue); text-decoration-color: var(--esg-gold); text-underline-offset: 3px; }
.prose a:hover { color: var(--esg-blue-dark); text-decoration-color: var(--esg-blue); }
.prose ul, .prose ol { margin: 0 0 16px; padding-left: 24px; }
.prose li { margin: 4px 0; }
.prose blockquote {
  margin: 20px 0;
  padding: 4px 18px;
  border-left: 3px solid var(--esg-gold);
  color: var(--esg-ink-soft);
  font-style: italic;
}
.prose hr { border: 0; border-top: 1px solid var(--esg-rule); margin: 32px 0; }
.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .92em;
  background: var(--esg-cream);
  padding: 1px 4px;
  border-radius: 3px;
}

/* Tables — used heavily for champions, hosts, results */
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  margin: 16px 0 28px;
}
.prose th, .prose td {
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid var(--esg-rule);
}
.prose th {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--esg-blue-deep);
  border-bottom: 2px solid var(--esg-blue);
  background: var(--esg-cream);
}
.prose tbody tr:hover { background: rgba(240, 195, 76, .07); }

/* ---------- Hub cards (home, section landings) ---------- */

.cards { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin: 32px 0; }
.card {
  background: var(--esg-paper);
  border: 1px solid var(--esg-rule);
  border-top: 4px solid var(--esg-blue);
  border-radius: 4px;
  padding: 22px 24px;
  box-shadow: var(--shadow-card);
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-1px); box-shadow: 0 2px 6px rgba(9, 55, 103, .08), 0 12px 32px rgba(9, 55, 103, .07); }
.card h3 { font-family: var(--font-display); margin: 0 0 6px; color: var(--esg-blue-deep); font-size: 20px; }
.card p { margin: 0 0 12px; color: var(--esg-ink-soft); font-size: 15px; }
.card .meta { font-size: 13px; color: var(--esg-ink-soft); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.card a.more {
  display: inline-block;
  margin-top: 4px;
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--esg-blue);
  text-decoration: none;
  border-bottom: 1px solid var(--esg-gold);
}
.card.active { border-top-color: var(--esg-gold); }
.card.active .meta { color: var(--esg-gold-dark); }

/* Status flags on hub cards */
.flag {
  display: inline-block;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 2px;
  font-weight: 700;
  margin-right: 6px;
}
.flag-active { background: var(--esg-gold); color: var(--esg-blue-deep); }
.flag-archive { background: var(--esg-rule); color: var(--esg-blue-deep); }

/* Outbound link callout used in the active sections */
.outbound-card {
  margin: 28px 0;
  padding: 18px 22px;
  background: var(--esg-paper);
  border: 1px solid var(--esg-rule);
  border-left: 4px solid var(--esg-gold);
  border-radius: 0 4px 4px 0;
}
.outbound-card h4 {
  margin: 0 0 4px;
  font-family: var(--font-display);
  color: var(--esg-blue-deep);
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.outbound-card p { margin: 0; font-size: 15px; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--esg-blue-deep);
  color: rgba(255, 255, 255, .82);
  padding: 40px 0 32px;
  margin-top: 60px;
  font-size: 14px;
}
.footer-inner { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px; }
.foot-col h4 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--esg-gold);
}
.foot-col ul { list-style: none; margin: 0; padding: 0; }
.foot-col li { margin: 4px 0; }
.foot-col a {
  color: rgba(255, 255, 255, .82);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.foot-col a:hover { color: #fff; border-bottom-color: var(--esg-gold); }
.foot-note { color: rgba(255, 255, 255, .68); }

/* ---------- Responsive nudges ---------- */
@media (max-width: 640px) {
  .header-inner { flex-direction: column; align-items: flex-start; gap: 14px; }
  .primary-nav ul { font-size: 12px; gap: 4px 14px; }
  .content { padding: 28px 20px 60px; }
  body { font-size: 16px; }
}
