:root {
  --bg: #f4f3ef;
  --ink: #111111;
  --muted: #5e5e59;
  --rule: #111111;
  --accent: #e5341d;
  --on-accent: #111111;
  --gutter: clamp(16px, 4vw, 48px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111111;
    --ink: #f1f0ea;
    --muted: #a3a39c;
    --rule: #f1f0ea;
    --accent: #ff4a2e;
    --on-accent: #111111;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111111;
  --ink: #f1f0ea;
  --muted: #a3a39c;
  --rule: #f1f0ea;
  --accent: #ff4a2e;
  --on-accent: #111111;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter Tight", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  font-feature-settings: "tnum" 1;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, p, ol, dl, dd { margin: 0; padding: 0; }
ol { list-style: none; }
a { color: inherit; }
::selection { background: var(--accent); color: var(--on-accent); }

.page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 0 var(--gutter);
}
main { flex: 1; }

/* 12-column grid: a narrow label column on the left, content on the right.
   Below 800px everything stacks into one column. */
.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
}
.col-meta { grid-column: 1 / span 3; }
.col-main { grid-column: 4 / -1; }

/* Full-bleed colour band: escapes the page gutter, keeps content aligned to it */
.band {
  margin: 0 calc(-1 * var(--gutter));
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* Top bar */
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  border-bottom: 3px solid var(--rule);
}
.mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -.01em;
  text-decoration: none;
}
.mark-sq { width: 16px; height: 16px; background: var(--accent); }

.lang { display: flex; border: 2px solid var(--rule); }
.lang button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 12px;
  cursor: pointer;
}
.lang button + button { border-left: 2px solid var(--rule); }
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.lang button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Hero: the wordmark fills the content width edge to edge.
   Font size is derived from the hero's width (cqw) so "Mystara" spans it exactly. */
.hero { padding: 0 0 clamp(72px, 12vw, 160px); container-type: inline-size; }
.wordmark {
  grid-column: 1 / -1;
  font-size: calc(100cqw / 3.33);
  line-height: .8;
  font-weight: 700;
  letter-spacing: -.065em;
  margin: .08em 0 .26em -.03em;
  white-space: nowrap;
}
.hero .label, .facts .label { padding-top: 10px; border-top: 3px solid var(--rule); }
.principles .label { padding-top: 10px; border-top: 3px solid var(--on-accent); }
.principles .label, .facts .label { align-self: start; }
.hero h1 {
  padding-top: 6px;
  border-top: 3px solid var(--rule);
  font-size: clamp(34px, 4.8vw, 72px);
  line-height: 1.02;
  font-weight: 600;
  letter-spacing: -.035em;
  text-wrap: balance;
}
.hero .lede {
  margin-top: clamp(24px, 3vw, 40px);
  max-width: 32em;
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.4;
  color: var(--muted);
}

/* Principles: red band with oversized numerals */
.principles {
  background: var(--accent);
  color: var(--on-accent);
  padding-top: 28px;
  padding-bottom: clamp(56px, 8vw, 104px);
}
.cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 24px;
}
.principles li { border-top: 3px solid var(--on-accent); padding-top: 12px; }
.num {
  display: block;
  font-size: clamp(72px, 9vw, 140px);
  line-height: .85;
  font-weight: 700;
  letter-spacing: -.06em;
  margin: 0 0 clamp(28px, 4vw, 56px) -.04em;
}
.principles h3 { font-size: clamp(22px, 2vw, 28px); font-weight: 700; letter-spacing: -.02em; line-height: 1.1; margin-bottom: 10px; }
.principles p { max-width: 22em; font-weight: 500; }

/* Facts */
.facts { padding: 28px 0 clamp(56px, 8vw, 104px); }
.facts dl div { border-top: 3px solid var(--rule); padding-top: 12px; }
.facts dt { font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-bottom: 20px; }
.facts dd { font-size: clamp(26px, 2.6vw, 38px); font-weight: 700; letter-spacing: -.03em; line-height: 1.05; }

/* Footer: inverted band */
.foot {
  background: var(--ink);
  color: var(--bg);
  padding-top: 28px;
  padding-bottom: 32px;
  font-size: 13px;
  font-weight: 500;
}
.legal { letter-spacing: .03em; }

@media (max-width: 800px) {
  .col-meta, .col-main { grid-column: 1 / -1; }
  .principles .col-meta, .facts .col-meta { margin-bottom: 20px; }
  .hero h1 { margin-top: 28px; }
  .cols { grid-template-columns: 1fr; row-gap: 36px; }
  .foot .legal { margin-top: 6px; }
}
