/* ============================================================
   THE MERIDIAN — shared design system
   Editorial "paper of record" register.
   Type system (one job each):
     · Blackletter masthead        — UnifrakturCook (wordmark only)
     · Display / headline serif     — "Libre Caslon Display" + "…Text"
     · Body serif                   — Georgia (digital reading face)
     · Functional sans (Franklin)   — "Libre Franklin" (nav, kickers, UI)
     · Slab (Games display)         — "Zilla Slab"
   ============================================================ */

:root {
  /* ink + paper */
  --ink:        #121212;
  --ink-soft:   #333333;
  --ink-mute:   #666666;
  --ink-faint:  #8a8a8a;
  --paper:      #ffffff;
  --paper-warm: #f7f5f0;
  --paper-band: #f2efe9;
  --rule:       #e2e2e2;
  --rule-dark:  #cfcfcf;
  --link:       #326891;   /* the paper's link blue */
  --link-dark:  #1d4b6e;
  --flag:       #b02b1f;   /* editorial red — Live / breaking flag */

  /* games accent (FIVES) — our own palette, distinct from any other game */
  --g-correct:  #4a9d7f;   /* teal-green */
  --g-present:  #d6a84e;   /* amber */
  --g-absent:   #6b7280;   /* slate */
  --g-empty:    #d3d6da;
  --g-filled:   #878a8c;
  --g-key:      #d7dbdf;

  /* type families */
  --f-mast:  "UnifrakturCook", "Times New Roman", serif;
  --f-disp:  "Libre Caslon Display", Georgia, "Times New Roman", serif;
  --f-head:  "Libre Caslon Text", Georgia, "Times New Roman", serif;
  --f-body:  Georgia, "Times New Roman", serif;
  --f-sans:  "Libre Franklin", "Helvetica Neue", Arial, sans-serif;
  --f-slab:  "Zilla Slab", Georgia, serif;

  /* spacing scale (8-based) */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px;
  --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px; --s10: 128px;

  --maxw: 1200px;
  --readw: 42rem;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
button { font-family: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
::selection { background: #cfe0ec; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--s5); }
.wrap-narrow { max-width: 720px; margin: 0 auto; padding: 0 var(--s5); }

/* ---- kicker / eyebrow (Franklin, letterspaced) ---- */
.kicker {
  font-family: var(--f-sans);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--flag);
}
.kicker--ink { color: var(--ink); }
.kicker--mute { color: var(--ink-mute); }

/* ---- headings ---- */
h1, h2, h3, h4 { font-family: var(--f-head); font-weight: 700; line-height: 1.08; letter-spacing: -0.01em; margin: 0 0 var(--s4); }
.display { font-family: var(--f-disp); font-weight: 700; line-height: 1.0; letter-spacing: -0.015em; }

/* ============ MASTHEAD / SITE HEADER ============ */
.topbar {
  border-bottom: 1px solid var(--ink);
  background: var(--paper);
}
.topbar__meta {
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--f-sans); font-size: 11px; letter-spacing: 0.04em;
  color: var(--ink-mute); padding: 6px var(--s5); max-width: var(--maxw);
  margin: 0 auto; text-transform: uppercase;
}
.topbar__meta .date { font-weight: 600; color: var(--ink-soft); }
.topbar__meta a { color: var(--ink-mute); }
.masthead {
  text-align: center;
  padding: var(--s4) var(--s5) var(--s3);
  border-bottom: 1px solid var(--ink);
}
.masthead__logo {
  font-family: var(--f-mast);
  font-weight: 700;
  font-size: clamp(38px, 8vw, 76px);
  line-height: 1;
  color: var(--ink);
  letter-spacing: 0.01em;
  display: inline-block;
}
.masthead__logo:hover { text-decoration: none; }
.masthead__tag {
  font-family: var(--f-sans); font-size: 11px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--ink-mute); margin-top: 6px;
}

/* primary section nav */
.sectionnav {
  border-bottom: 1px solid var(--ink);
  background: var(--paper);
  position: sticky; top: 0; z-index: 50;
}
.sectionnav__inner {
  display: flex; align-items: center; gap: var(--s5);
  max-width: var(--maxw); margin: 0 auto; padding: 0 var(--s5);
  font-family: var(--f-sans); font-weight: 600; font-size: 13.5px;
  overflow-x: auto; scrollbar-width: none;
}
.sectionnav__inner::-webkit-scrollbar { display: none; }
.sectionnav a {
  color: var(--ink); padding: 11px 0; white-space: nowrap;
  border-bottom: 3px solid transparent; margin-bottom: -1px;
}
.sectionnav a:hover { text-decoration: none; color: var(--flag); }
.sectionnav a.active { border-bottom-color: var(--ink); }
.sectionnav__spacer { flex: 1; }
.sectionnav a.sectionnav__cta {
  font-family: var(--f-sans); font-weight: 700; font-size: 13px;
  background: var(--ink); color: var(--paper); padding: 7px 15px;
  border-radius: 3px; border: 1px solid var(--ink); white-space: nowrap; margin-bottom: 0;
}
.sectionnav a.sectionnav__cta:hover { background: var(--paper); color: var(--ink); text-decoration: none; }
.sectionnav__ghost {
  font-family: var(--f-sans); font-weight: 600; font-size: 13px;
  color: var(--ink); white-space: nowrap;
}

/* ============ BUTTONS ============ */
.btn {
  font-family: var(--f-sans); font-weight: 700; font-size: 15px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 4px; border: 1px solid var(--ink);
  background: var(--ink); color: var(--paper); transition: background .15s, color .15s, transform .05s;
}
.btn:hover { background: #000; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }
.btn--wide { width: 100%; padding: 14px; }
.btn--accent { background: var(--g-correct); border-color: var(--g-correct); }
.btn--accent:hover { background: #3d8a6e; }

/* ============ FOOTER ============ */
.footer {
  border-top: 2px solid var(--ink);
  margin-top: var(--s9);
  padding: var(--s8) 0 var(--s7);
  background: var(--paper);
}
.footer__logo { font-family: var(--f-mast); font-size: 34px; color: var(--ink); }
.footer__grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s6);
  margin-top: var(--s6);
}
.footer__col h4 {
  font-family: var(--f-sans); font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-mute); margin: 0 0 var(--s3);
}
.footer__col ul { list-style: none; padding: 0; margin: 0; }
.footer__col li { margin-bottom: 8px; }
.footer__col a { font-family: var(--f-sans); font-size: 14px; color: var(--ink-soft); }
.footer__base {
  margin-top: var(--s7); padding-top: var(--s4); border-top: 1px solid var(--rule);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--s3);
  font-family: var(--f-sans); font-size: 12px; color: var(--ink-mute);
}

/* ============ generic editorial bits ============ */
.byline { font-family: var(--f-sans); font-size: 13px; color: var(--ink-mute); }
.byline b { color: var(--ink); font-weight: 700; }
.hairline { border: 0; border-top: 1px solid var(--rule); margin: var(--s5) 0; }
.section-band { background: var(--paper-warm); }
.section-band--dark { background: var(--ink); color: var(--paper); }

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ============ responsive ============ */
@media (max-width: 900px) {
  .footer__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  body { font-size: 17px; }
  .sectionnav__ghost { display: none; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
