/* glean.quest: one hand-written stylesheet (Docs/Backend.md §19, Website/README.md).
   Stylized low-poly medieval fantasy: parchment by day, night sky by night, faceted gold accents.
   No web fonts, no external origin, no inline styles anywhere (CSP default-src 'self'). */

:root {
  color-scheme: light dark;
  --bg: #f6efdf;
  --surface: #fffaf0;
  --surface-2: #efe4cc;
  --text: #2a2117;
  --muted: #5b4b38;
  --border: #d3bf97;
  /* Form-control edges (WCAG 1.4.11, at least 3:1): 3.91:1 on --bg, 4.31:1 on --surface, 3.55:1 on --surface-2. */
  --field-border: #8c7350;
  --link: #8a470b;
  --link-hover: #5e2f05;
  --accent: #7a3d0c;
  --on-accent: #fff8ea;
  --gold: #e0a63f;
  --gold-soft: #f3d79a;
  --night: #1f2a44;
  --night-2: #2b3a5e;
  --on-night: #f6efdf;
  --on-night-muted: #d9cfbb;
  --danger: #9b2617;
  --danger-bg: #fbe7e2;
  --ok: #24602a;
  --ok-bg: #e5f2e1;
  --warn-bg: #fbf0d4;
  --focus: #1b55b8;
  --shadow: 0 1px 2px rgb(42 33 23 / 12%), 0 6px 18px rgb(42 33 23 / 10%);
  --radius: 6px;
  --wrap: 72rem;
  --narrow: 44rem;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", "URW Palladio L", Georgia, serif;
  --font-mono: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141a2c;
    --surface: #1b2338;
    --surface-2: #232c45;
    --text: #ece4d2;
    --muted: #bdb29c;
    --border: #3a4566;
    /* 4.07:1 on --bg, 3.67:1 on --surface, 3.25:1 on --surface-2. */
    --field-border: #6b7aa3;
    --link: #f0b955;
    --link-hover: #ffd58a;
    --accent: #e8b04a;
    --on-accent: #1d1508;
    --gold: #e8b04a;
    --gold-soft: #6e5524;
    --night: #0e1322;
    --night-2: #1b2440;
    --danger: #ff9b8a;
    --danger-bg: #3b1d1d;
    --ok: #9ed69a;
    --ok-bg: #1d3221;
    --warn-bg: #3a3020;
    --focus: #8fb8ff;
    --shadow: 0 1px 2px rgb(0 0 0 / 40%), 0 8px 24px rgb(0 0 0 / 30%);
  }
}

/* ---------- base ---------- */

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

[hidden] { display: none !important; }

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 1rem/1.6 var(--font-body);
  overflow-wrap: break-word;
}

main { flex: 1 0 auto; }
main:focus { outline: none; }

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

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.2;
  margin: 1.6em 0 0.5em;
  letter-spacing: 0.005em;
}
h1 { font-size: clamp(2rem, 1.5rem + 2.4vw, 3rem); margin-top: 0; }
h2 { font-size: clamp(1.45rem, 1.2rem + 1vw, 1.9rem); }
h3 { font-size: 1.2rem; }

p, ul, ol, dl { margin: 0 0 1em; }

a { color: var(--link); text-decoration-thickness: 0.08em; text-underline-offset: 0.18em; }
a:hover { color: var(--link-hover); }

code, pre { font-family: var(--font-mono); font-size: 0.92em; }
pre { overflow-x: auto; padding: 1rem; background: var(--surface-2); border-radius: var(--radius); }
blockquote { margin: 0 0 1em; padding: 0.25rem 1rem; border-left: 4px solid var(--gold); color: var(--muted); }

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

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 1rem; top: -4rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  background: var(--surface);
  color: var(--text);
  border: 2px solid var(--focus);
  border-radius: var(--radius);
}
.skip-link:focus { top: 1rem; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}
.narrow { max-width: calc(var(--narrow) + 4rem); }

/* ---------- header and footer: a faceted night band ---------- */

.site-header,
.site-footer,
.band-callout {
  background-color: var(--night);
  background-image:
    linear-gradient(118deg, rgb(255 255 255 / 6%) 0 22%, transparent 22.1%),
    linear-gradient(242deg, rgb(0 0 0 / 22%) 0 18%, transparent 18.1%),
    linear-gradient(165deg, transparent 0 62%, rgb(232 176 74 / 9%) 62.1% 78%, transparent 78.1%),
    linear-gradient(20deg, var(--night) 0 50%, var(--night-2) 50.1%);
  color: var(--on-night);
}

.site-header { border-bottom: 3px solid var(--gold); }

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-block: 0.75rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--on-night);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
}
.brand:hover { color: #ffffff; }
.brand-mark { width: 36px; height: 36px; }

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav a {
  display: block;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius);
  color: var(--on-night);
  text-decoration: none;
  font-weight: 600;
}
.site-nav a:hover { background: rgb(255 255 255 / 10%); color: #ffffff; }
.site-nav a[aria-current] {
  background: rgb(232 176 74 / 18%);
  box-shadow: inset 0 -3px 0 var(--gold);
}
.site-header :focus-visible,
.site-footer :focus-visible,
.band-callout :focus-visible,
.hero :focus-visible { outline-color: #ffd58a; }

.site-footer {
  margin-top: 4rem;
  border-top: 3px solid var(--gold);
  font-size: 0.95rem;
}
.footer-inner {
  display: grid;
  gap: 1rem 2rem;
  grid-template-columns: 1fr;
  padding-block: 2rem;
}
.footer-name { font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; margin: 0; }
.footer-tagline { color: var(--on-night-muted); margin: 0.25rem 0 0; }
.footer-nav ul { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; margin: 0; padding: 0; list-style: none; }
.footer-nav a, .site-footer a { color: var(--on-night); }
.footer-meta { color: var(--on-night-muted); margin: 0; }
.env-badge {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0 0.5rem;
  border: 1px solid var(--gold);
  border-radius: 999px;
  color: #ffd58a;
  font-size: 0.85em;
}
@media (min-width: 48rem) {
  .footer-inner { grid-template-columns: 2fr 1fr; align-items: start; }
  .footer-meta { grid-column: 1 / -1; }
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  display: grid;
  min-height: clamp(22rem, 52vw, 34rem);
  overflow: hidden;
  background: var(--night);
  color: #ffffff;
  isolation: isolate;
}
.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 40%;
  z-index: -2;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgb(14 19 34 / 88%) 0%, rgb(14 19 34 / 66%) 45%, rgb(14 19 34 / 18%) 100%),
    linear-gradient(0deg, rgb(14 19 34 / 70%) 0%, transparent 40%);
}
.hero-inner {
  align-self: end;
  padding-block: 3rem 2.5rem;
  text-shadow: 0 2px 6px rgb(0 0 0 / 55%);
}
.hero h1 {
  font-size: clamp(2.5rem, 1.6rem + 4.5vw, 4.5rem);
  margin: 0 0 0.25rem;
  color: #ffffff;
}
.hero-kicker {
  margin: 0 0 0.5rem;
  color: #ffd58a;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.85rem;
}
.hero-tagline { max-width: 36rem; font-size: 1.2rem; color: #f6efdf; }
.hero-actions, .callout-actions, .form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0 0;
}

/* ---------- buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.55rem 1.2rem;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.15s ease;
}
.button:hover { transform: translateY(-1px); }
.button:disabled { cursor: progress; opacity: 0.65; transform: none; }
.button-primary {
  background: linear-gradient(160deg, var(--accent) 0 55%, color-mix(in srgb, var(--accent) 82%, #000000) 55.1%);
  color: var(--on-accent);
  border-color: color-mix(in srgb, var(--accent) 70%, #000000);
}
.button-primary:hover { color: var(--on-accent); background: var(--accent); }
.button-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--field-border);
}
.button-secondary:hover { color: var(--text); background: var(--surface-2); }
.hero .button-secondary,
.band-callout .button-secondary {
  background: rgb(14 19 34 / 55%);
  color: #ffffff;
  border-color: rgb(255 255 255 / 55%);
}
.hero .button-primary,
.band-callout .button-primary {
  background: linear-gradient(160deg, #f0bb55 0 55%, #d99a35 55.1%);
  color: #1d1508;
  border-color: #b97d22;
}
.button-danger {
  background: var(--danger);
  color: var(--surface);
  border-color: var(--danger);
}
.button-danger:hover { color: var(--surface); filter: brightness(1.08); }

/* ---------- sections and cards ---------- */

.band { padding-block: 2.5rem 0.5rem; }
.band-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
}
.band-header h2 { margin: 0 0 1rem; }
.band-more { font-weight: 700; }

.band-callout {
  margin-top: 3rem;
  padding-block: 3rem;
  clip-path: polygon(0 1.5rem, 100% 0, 100% calc(100% - 1.5rem), 0 100%);
}
.band-callout h2 { margin-top: 0; color: #ffffff; }
.band-callout p { color: var(--on-night-muted); }
.callout-inner { display: grid; gap: 1rem 2rem; align-items: center; }
@media (min-width: 48rem) { .callout-inner { grid-template-columns: 3fr 2fr; } }

.intro-grid { display: grid; gap: 1.5rem 3rem; align-items: center; }
.intro-image {
  justify-self: center;
  width: min(100%, 20rem);
  border-radius: var(--radius);
  clip-path: polygon(8% 0, 100% 0, 100% 88%, 90% 100%, 0 100%, 0 10%);
  background: var(--surface-2);
}
@media (min-width: 48rem) { .intro-grid { grid-template-columns: 3fr 2fr; } }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr));
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.card-grid-large { grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr)); margin-top: 1.5rem; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover { transform: translateY(-2px); }
.card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
  text-decoration: none;
  border-radius: var(--radius);
}
.card-link:hover { color: inherit; }
.card-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius) var(--radius) 0 0;
  clip-path: polygon(0 0, 100% 0, 100% 86%, 62% 100%, 0 92%);
  background: var(--surface-2);
}
.card-body { display: flex; flex-direction: column; gap: 0.5rem; padding: 0.75rem 1.1rem 1.2rem; }
.card-title { font-family: var(--font-display); font-size: 1.45rem; font-weight: 700; color: var(--text); }
.card-link:hover .card-title { color: var(--link); text-decoration: underline; text-underline-offset: 0.18em; }
.card-summary { color: var(--muted); }
.card-variants { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.is-coming-soon .card-image { filter: saturate(0.85); }

.chip, .badge {
  display: inline-block;
  width: fit-content;
  padding: 0.1rem 0.6rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.6;
}
.chip { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); font-weight: 600; }
.badge { margin: 0; border: 1px solid currentColor; }
.badge-live { color: var(--ok); background: var(--ok-bg); }
.badge-soon { color: var(--link); background: var(--warn-bg); }
.badge-pinned { color: var(--link); background: var(--warn-bg); }
.badge-ok { color: var(--ok); background: var(--ok-bg); }
.badge-warn { color: var(--danger); background: var(--danger-bg); }

/* ---------- pages ---------- */

.page { padding-block: 2.5rem 1rem; }
.page-header { margin-bottom: 1.5rem; }
.page-header h1 { margin-bottom: 0.4rem; }
.lead { font-size: 1.15rem; color: var(--muted); }
.prose { max-width: var(--narrow); }
.prose > :first-child { margin-top: 0; }
.prose li + li { margin-top: 0.3rem; }
.prose img { border-radius: var(--radius); margin-block: 1rem; }
.breadcrumbs { margin-bottom: 1rem; color: var(--muted); font-size: 0.95rem; }
.back-link { margin-top: 2rem; font-weight: 700; }

.mode-header { display: grid; gap: 0.5rem; justify-items: start; }
.mode-header .lead { margin: 0; }
.mode-image {
  width: 100%;
  max-width: 60rem;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius);
  clip-path: polygon(0 0, 100% 0, 100% 92%, 70% 100%, 0 95%);
  margin-bottom: 1.5rem;
}
.variant-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
  gap: 1rem;
  margin: 0 0 2rem;
  padding: 0;
  list-style: none;
}
.variant {
  padding: 1rem 1.2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 4px solid var(--gold);
  border-radius: var(--radius);
}
.variant h3 { margin: 0 0 0.6rem; }

.facts { display: grid; gap: 0.5rem; margin: 0; }
.facts > div { display: grid; grid-template-columns: minmax(7rem, 38%) 1fr; gap: 0.75rem; }
.facts dt { color: var(--muted); font-weight: 600; }
.facts dd { margin: 0; }
.hash { word-break: break-all; }

.download-box {
  padding: 1.25rem 1.4rem;
  margin-bottom: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.download-box h2 { margin-top: 0; }
.download-unavailable { margin: 0; color: var(--muted); }
.download-note { margin: 0.75rem 0 0; color: var(--muted); }
.requirements { padding-left: 1.25rem; }

/* ---------- notices ---------- */

.notice {
  margin: 0 0 1.5rem;
  padding: 1rem 1.2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 6px solid var(--gold);
  border-radius: var(--radius);
}
.notice p:last-child { margin-bottom: 0; }
.notice-title { font-weight: 800; margin-bottom: 0.25rem; }
.notice-placeholder {
  background: var(--warn-bg);
  border-color: var(--gold);
  border-left-width: 6px;
  border-style: dashed solid dashed solid;
}
.notice-placeholder .notice-title { text-transform: uppercase; letter-spacing: 0.08em; }
.notice-warn { background: var(--warn-bg); }
.notice-ok { background: var(--ok-bg); border-left-color: var(--ok); }
.notice-soon { background: var(--warn-bg); }

/* ---------- news ---------- */

.news-list { display: grid; gap: 1rem; margin: 0; padding: 0; list-style: none; }
.news-card article {
  display: grid;
  gap: 0 1.2rem;
  padding: 1rem 1.2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.news-card.is-pinned article { border-left: 5px solid var(--gold); }
.news-card.is-new article { box-shadow: 0 0 0 2px var(--gold-soft); }
.news-image { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); margin-bottom: 0.75rem; }
@media (min-width: 40rem) {
  .news-card article:has(.news-image) { grid-template-columns: 12rem 1fr; }
  .news-card .news-image { margin-bottom: 0; }
}
.news-meta { margin: 0 0 0.25rem; color: var(--muted); font-size: 0.92rem; display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.news-title { margin: 0 0 0.35rem; font-size: 1.3rem; }
.news-title a { color: var(--text); }
.news-title a:hover { color: var(--link); }
.news-summary { margin: 0; color: var(--muted); }
.news-empty { color: var(--muted); font-style: italic; }
.news-more { margin-top: 0.5rem; }
.news-more summary { cursor: pointer; font-weight: 700; color: var(--link); }
.news-more-body { margin-top: 0.75rem; }
.article-image { width: 100%; border-radius: var(--radius); margin-bottom: 1.5rem; }

/* ---------- forms and account ---------- */

.form {
  margin: 0 0 1.5rem;
  padding: 1.25rem 1.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.form-body { margin: 0; padding: 0; border: 0; min-width: 0; }
.form-body > legend { padding: 0; margin-bottom: 0.75rem; font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; }
.form-body:disabled { opacity: 0.75; }
.form-danger { border-color: var(--danger); }
.field { display: grid; gap: 0.3rem; margin-bottom: 1rem; }
.field label, .choice-group legend { font-weight: 700; }
.field input {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.5rem 0.75rem;
  border: 2px solid var(--field-border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font: inherit;
}
.field input:focus-visible { border-color: var(--focus); outline-offset: 1px; }
.field input[aria-invalid="true"] { border-color: var(--danger); }
.hint { margin: 0; color: var(--muted); font-size: 0.92rem; }
.field-check { display: flex; gap: 0.6rem; align-items: flex-start; margin-bottom: 0.6rem; }
.field-check input { width: 1.25rem; height: 1.25rem; margin: 0.2rem 0 0; flex: none; accent-color: var(--accent); }
.choice-group { margin: 0 0 1rem; padding: 0; border: 0; }
.choice-group legend { margin-bottom: 0.4rem; padding: 0; }
.form-aside { font-weight: 600; }
.form-footer { color: var(--muted); }

/* Shown only when the page's module has not started 4 s after load (it removes this notice as soon as it runs): a
   failed or stale script load is then visible instead of a silently disabled form (W1 fix W1-Q-01). */
.script-pending { position: absolute; visibility: hidden; animation: gq-reveal 0s linear 4s both; }
@keyframes gq-reveal { to { position: static; visibility: visible; } }

.status { margin: 0.75rem 0 0; min-height: 1.6em; font-weight: 600; }
.status:empty { min-height: 0; margin: 0; }
.status.is-error { color: var(--danger); }
.status.is-ok { color: var(--ok); }
.status.is-busy { color: var(--muted); }

.panel {
  margin: 0 0 1.5rem;
  padding: 1.25rem 1.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.panel > h2 { margin-top: 0; }
.panel .form { padding: 0; border: 0; box-shadow: none; margin: 0; background: transparent; }
.panel-danger { border-color: var(--danger); }

.session-list { margin: 0 0 1rem; padding: 0; list-style: none; display: grid; gap: 0.75rem; }
.session-list ul { margin: 0.75rem 0 0 1rem; padding: 0 0 0 0.75rem; list-style: none; border-left: 3px solid var(--border); display: grid; gap: 0.75rem; }
.session {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding: 0.75rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.session-info { display: grid; gap: 0.1rem; min-width: 0; }
.session-name { font-weight: 700; }
.session-meta { color: var(--muted); font-size: 0.92rem; }
.session .button { min-height: 2.5rem; }

/* ---------- small screens down to 320 px ---------- */

@media (max-width: 30rem) {
  .header-inner { justify-content: center; }
  .site-nav ul { justify-content: center; }
  .site-nav a { padding: 0.4rem 0.55rem; }
  .facts > div { grid-template-columns: 1fr; gap: 0; }
  .form, .panel { padding: 1rem; }
  .button { width: 100%; }
  .hero-actions .button, .callout-actions .button, .form-actions .button { width: 100%; }
}

/* ---------- motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .button:hover, .card:hover { transform: none; }
}

@media print {
  .site-header, .site-footer, .band-callout, .skip-link, .hero-image { display: none; }
  .hero { color: #000000; background: none; min-height: 0; }
  .hero::after { display: none; }
}

/* ---------- landing page rework ---------- */

.section-home {
  --landing-ink: #101727;
  --landing-blue: #172440;
  --landing-blue-soft: #26385d;
  --landing-gold: #f1b94f;
  --landing-cream: #f7f0df;
  background:
    linear-gradient(90deg, rgb(91 75 56 / 5%) 1px, transparent 1px) 0 0 / 5rem 5rem,
    var(--bg);
}

.section-home main { overflow: hidden; }
.section-home .site-footer { margin-top: 0; }
.section-home .site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 20;
  border-bottom-color: rgb(241 185 79 / 46%);
  background: linear-gradient(180deg, rgb(8 13 24 / 78%), rgb(8 13 24 / 20%));
  backdrop-filter: blur(12px);
}
.section-home .header-inner { padding-block: 1rem; }
.section-home .brand { letter-spacing: 0.025em; }
.section-home .site-nav a { font-size: 0.92rem; letter-spacing: 0.02em; }

.landing-hero {
  --pointer-x: 68%;
  --pointer-y: 34%;
  --hero-shift-x: 0px;
  --hero-shift-y: 0px;
  min-height: clamp(45rem, 100svh, 58rem);
  place-items: stretch;
  background: #0b1120;
}
.landing-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(circle at var(--pointer-x) var(--pointer-y), rgb(241 185 79 / 19%), transparent 24rem);
}
.landing-hero::after {
  background:
    linear-gradient(90deg, rgb(7 12 24 / 95%) 0%, rgb(8 14 28 / 80%) 38%, rgb(8 14 28 / 23%) 72%, rgb(8 14 28 / 56%) 100%),
    linear-gradient(0deg, #0b1120 0%, transparent 31%, rgb(4 8 18 / 12%) 64%, rgb(4 8 18 / 35%) 100%);
}
.landing-hero-image {
  object-position: 52% 42%;
  scale: 1.045;
  transform: translate3d(var(--hero-shift-x), var(--hero-shift-y), 0);
  transition: transform 0.7s cubic-bezier(.2, .8, .2, 1);
}
.landing-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 23rem);
  align-items: end;
  gap: clamp(2rem, 7vw, 8rem);
  padding-top: clamp(9rem, 18vh, 13rem);
  padding-bottom: clamp(7rem, 14vh, 10rem);
}
.landing-hero-copy { align-self: center; max-width: 49rem; }
.landing-hero h1 {
  display: grid;
  margin: 0;
  color: #ffffff;
  font-size: clamp(5.2rem, 13vw, 10.8rem);
  font-weight: 700;
  line-height: 0.68;
  letter-spacing: -0.075em;
  text-shadow: 0 0.06em 0.25em rgb(0 0 0 / 35%);
}
.landing-hero h1 span:last-child {
  margin-left: clamp(1rem, 7vw, 7rem);
  color: var(--landing-gold);
  -webkit-text-stroke: 1px rgb(255 230 173 / 35%);
}
.landing-hero .hero-kicker {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1.6rem;
  color: #fff0c7;
  font-family: var(--font-mono);
  font-size: 0.77rem;
  letter-spacing: 0.16em;
}
.status-pulse {
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 50%;
  background: #dfff85;
  box-shadow: 0 0 0 0.35rem rgb(223 255 133 / 15%), 0 0 1.2rem #dfff85;
  animation: signal-pulse 2.4s ease-in-out infinite;
}
@keyframes signal-pulse {
  50% { box-shadow: 0 0 0 0.6rem rgb(223 255 133 / 4%), 0 0 1.65rem #dfff85; }
}
.landing-hero .hero-tagline {
  max-width: 37rem;
  margin: 2.35rem 0 0;
  color: #f3eddf;
  font-size: clamp(1.08rem, 1rem + 0.55vw, 1.42rem);
  line-height: 1.55;
  text-shadow: 0 2px 10px rgb(0 0 0 / 65%);
}
.landing-hero .hero-actions { margin-top: 1.8rem; }
.button-arrow { gap: 0.8rem; }
.button-arrow span { font-size: 1.18em; transition: transform 0.18s ease; }
.button-arrow:hover span { transform: translate(0.15rem, -0.15rem); }
.button-ghost {
  background: rgb(8 13 24 / 36%);
  color: #ffffff;
  border-color: rgb(255 255 255 / 48%);
  backdrop-filter: blur(8px);
}
.button-ghost:hover { color: #ffffff; background: rgb(255 255 255 / 12%); border-color: #ffffff; }

.hero-facets { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero-facets span { position: absolute; border: 1px solid rgb(255 255 255 / 17%); rotate: 45deg; }
.hero-facets span:nth-child(1) { width: 8rem; height: 8rem; top: 18%; right: 5%; }
.hero-facets span:nth-child(2) { width: 2.2rem; height: 2.2rem; top: 37%; right: 32%; border-color: rgb(241 185 79 / 58%); }
.hero-facets span:nth-child(3) { width: 13rem; height: 13rem; right: -7rem; bottom: 4%; border-color: rgb(241 185 79 / 24%); }

.field-signal {
  position: relative;
  align-self: end;
  padding: 1.15rem;
  color: #ffffff;
  border: 1px solid rgb(255 255 255 / 28%);
  border-top-color: rgb(241 185 79 / 90%);
  background: linear-gradient(145deg, rgb(9 16 30 / 86%), rgb(18 31 56 / 66%));
  box-shadow: 0 1.5rem 4rem rgb(0 0 0 / 35%);
  backdrop-filter: blur(16px);
  clip-path: polygon(0 0, calc(100% - 2rem) 0, 100% 2rem, 100% 100%, 0 100%);
}
.field-signal::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgb(255 255 255 / 5%) 1px, transparent 1px),
    linear-gradient(rgb(255 255 255 / 5%) 1px, transparent 1px);
  background-size: 2rem 2rem;
  mask-image: linear-gradient(to bottom, #000, transparent 75%);
}
.signal-topline,
.signal-coordinates {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: #ccd4e1;
  font: 0.68rem/1.2 var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.signal-live { color: #dfff85; }
.signal-live::before { content: ""; display: inline-block; width: 0.38rem; height: 0.38rem; margin-right: 0.4rem; border-radius: 50%; background: currentColor; }
.signal-orbit {
  position: relative;
  display: grid;
  width: 10rem;
  height: 10rem;
  margin: 1.6rem auto 1.25rem;
  place-items: center;
}
.signal-orbit::before,
.signal-orbit::after,
.signal-orbit-ring {
  content: "";
  position: absolute;
  border: 1px solid rgb(241 185 79 / 50%);
  border-radius: 50%;
}
.signal-orbit::before { inset: 0; border-style: dashed; animation: orbit-spin 18s linear infinite; }
.signal-orbit::after { inset: 1rem; border-color: rgb(255 255 255 / 22%); }
.signal-orbit-ring { inset: 2.2rem; border-color: rgb(241 185 79 / 36%); }
.signal-orbit img { width: 4.6rem; filter: drop-shadow(0 0 1rem rgb(241 185 79 / 25%)); }
@keyframes orbit-spin { to { rotate: 360deg; } }
.signal-label { position: relative; margin: 0; color: var(--landing-gold); font: 0.68rem/1.2 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; }
.signal-title { position: relative; margin: 0.25rem 0 0.45rem; font: 700 1.65rem/1.1 var(--font-display); }
.signal-copy { position: relative; margin: 0 0 1.35rem; color: #dce1e9; font-size: 0.9rem; line-height: 1.55; }
.signal-coordinates { padding-top: 0.85rem; border-top: 1px solid rgb(255 255 255 / 17%); color: #9faabd; }
.hero-scroll {
  position: absolute;
  left: 50%;
  bottom: 1.5rem;
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: 0.55rem;
  color: #f4ecda;
  font: 0.65rem/1 var(--font-mono);
  letter-spacing: 0.15em;
  text-decoration: none;
  text-transform: uppercase;
  translate: -50% 0;
}
.hero-scroll i { display: block; width: 1px; height: 2.6rem; overflow: hidden; background: rgb(255 255 255 / 35%); }
.hero-scroll i::after { content: ""; display: block; width: 1px; height: 55%; background: var(--landing-gold); animation: scroll-line 2.2s ease-in-out infinite; }
@keyframes scroll-line { from { translate: 0 -120%; } to { translate: 0 220%; } }

.section-index {
  margin: 0 0 0.9rem;
  color: var(--link);
  font: 700 0.72rem/1.2 var(--font-mono);
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.landing-story {
  position: relative;
  padding-block: clamp(5rem, 10vw, 9rem);
  scroll-margin-top: 2rem;
  background:
    linear-gradient(145deg, transparent 0 66%, rgb(224 166 63 / 7%) 66.1% 82%, transparent 82.1%),
    var(--bg);
}
.landing-story::before {
  content: "GQ";
  position: absolute;
  right: -0.03em;
  bottom: -0.2em;
  color: rgb(122 61 12 / 4%);
  font: 700 clamp(13rem, 34vw, 31rem)/0.8 var(--font-display);
  letter-spacing: -0.12em;
  pointer-events: none;
}
.landing-story-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(17rem, 0.74fr); gap: clamp(3rem, 9vw, 8rem); align-items: center; }
.story-copy { max-width: 42rem; }
.story-copy h2 { margin: 0; max-width: 12ch; font-size: clamp(2.4rem, 5.4vw, 5.2rem); line-height: 0.96; letter-spacing: -0.045em; }
.story-copy h2 + p { margin-top: 2rem; }
.story-copy p { color: var(--muted); font-size: 1.06rem; }
.story-copy strong { color: var(--text); }
.realm-tags { display: flex; flex-wrap: wrap; gap: 0.55rem; margin: 1.8rem 0 0; padding: 0; list-style: none; }
.realm-tags li { padding: 0.35rem 0.75rem; color: var(--text); border: 1px solid var(--border); background: var(--surface); font-size: 0.82rem; font-weight: 700; }
.realm-tags li::before { content: "+"; margin-right: 0.45rem; color: var(--link); }

.story-portrait {
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  position: relative;
  width: min(100%, 24rem);
  margin: 0 auto;
  padding: 1rem;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  box-shadow: 1.5rem 1.5rem 0 color-mix(in srgb, var(--gold) 22%, transparent);
  transform: perspective(900px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.story-portrait.is-tilting { box-shadow: 1rem 1.2rem 2.5rem rgb(42 33 23 / 22%); }
.portrait-frame { position: relative; overflow: hidden; background: var(--surface-2); clip-path: polygon(0 0, 86% 0, 100% 11%, 100% 100%, 0 100%); }
.portrait-frame::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 1px rgb(255 255 255 / 20%); pointer-events: none; }
.portrait-frame img { width: 100%; aspect-ratio: 10 / 11; object-fit: cover; transition: scale 0.5s ease; }
.story-portrait:hover img { scale: 1.035; }
.portrait-mark { position: absolute; z-index: 1; display: grid; width: 2.2rem; height: 2.2rem; place-items: center; color: var(--landing-gold); border: 1px solid currentColor; background: rgb(16 23 39 / 76%); }
.portrait-mark-one { top: 1rem; left: 1rem; }
.portrait-mark-two { right: 1rem; bottom: 1rem; }
.story-portrait figcaption { display: flex; justify-content: space-between; gap: 1rem; padding-top: 0.8rem; color: var(--muted); font: 0.66rem/1.3 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; }

.match-rhythm {
  position: relative;
  padding-block: clamp(5rem, 10vw, 8rem);
  overflow: hidden;
  color: #f7f0df;
  background:
    radial-gradient(circle at 76% 15%, rgb(61 90 142 / 55%), transparent 28rem),
    linear-gradient(135deg, #0d1526, #182846 64%, #111b31);
}
.match-rhythm::after { content: ""; position: absolute; inset: auto -8% -11rem 31%; height: 18rem; border: 1px solid rgb(241 185 79 / 20%); rotate: -8deg; pointer-events: none; }
.rhythm-heading { display: grid; grid-template-columns: minmax(0, 2fr) minmax(16rem, 1fr); gap: 1rem 4rem; align-items: end; }
.rhythm-heading .section-index { grid-column: 1 / -1; color: var(--landing-gold); }
.rhythm-heading h2 { max-width: 13ch; margin: 0; color: #ffffff; font-size: clamp(2.2rem, 4.5vw, 4.4rem); line-height: 1; letter-spacing: -0.04em; }
.rhythm-heading > p:last-child { margin: 0; color: #c9d1dd; }
.rhythm-steps { counter-reset: rhythm; display: grid; grid-template-columns: repeat(3, 1fr); margin: clamp(3rem, 6vw, 5rem) 0 0; padding: 0; list-style: none; border-top: 1px solid rgb(255 255 255 / 20%); }
.rhythm-steps li { position: relative; min-height: 18rem; padding: 2rem clamp(1rem, 3vw, 2.4rem) 1rem; border-right: 1px solid rgb(255 255 255 / 15%); }
.rhythm-steps li:first-child { border-left: 1px solid rgb(255 255 255 / 15%); }
.rhythm-steps li::before { content: ""; position: absolute; width: 0.65rem; height: 0.65rem; top: -0.36rem; left: 2rem; border: 2px solid #172440; border-radius: 50%; background: var(--landing-gold); box-shadow: 0 0 0 0.35rem var(--landing-gold); }
.rhythm-number { color: #9eaabd; font: 0.68rem/1 var(--font-mono); }
.rhythm-icon { display: block; margin: 2.5rem 0 1.8rem; color: var(--landing-gold); font-size: 2.2rem; }
.rhythm-steps h3 { margin: 0 0 0.55rem; color: #ffffff; font-size: clamp(1.7rem, 2.8vw, 2.5rem); }
.rhythm-steps p { max-width: 18rem; margin: 0; color: #c9d1dd; }

.landing-modes,
.landing-news { padding-block: clamp(5rem, 10vw, 8rem); }
.landing-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 2rem; margin-bottom: clamp(2rem, 5vw, 4rem); }
.landing-section-heading h2 { max-width: 17ch; margin: 0; font-size: clamp(2.25rem, 4.5vw, 4.2rem); line-height: 1; letter-spacing: -0.04em; }
.text-link { flex: none; padding-bottom: 0.35rem; border-bottom: 1px solid currentColor; font-weight: 800; text-decoration: none; }
.text-link span { display: inline-block; margin-left: 0.5rem; transition: transform 0.18s ease; }
.text-link:hover span { transform: translate(0.15rem, -0.15rem); }

.landing-mode-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1rem, 3vw, 2rem); }
.landing-mode-grid .mode-card {
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  position: relative;
  overflow: hidden;
  border-radius: 0;
  transform: perspective(1100px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.landing-mode-grid .mode-card:hover { transform: perspective(1100px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y)); box-shadow: 0 1.2rem 3rem rgb(42 33 23 / 18%); }
.landing-mode-grid .mode-card::after { content: ""; position: absolute; inset: 0; pointer-events: none; border: 1px solid rgb(255 255 255 / 14%); }
.landing-mode-grid .card-link { position: relative; min-height: clamp(26rem, 48vw, 36rem); border-radius: 0; justify-content: end; overflow: hidden; }
.landing-mode-grid .card-image { position: absolute; inset: 0; height: 100%; aspect-ratio: auto; border-radius: 0; clip-path: none; transition: scale 0.65s cubic-bezier(.2, .8, .2, 1), filter 0.4s ease; }
.landing-mode-grid .card-link:hover .card-image { scale: 1.045; }
.landing-mode-grid .card-body { position: relative; z-index: 1; min-height: 14.5rem; justify-content: end; padding: clamp(1.35rem, 4vw, 2.4rem); color: #ffffff; background: linear-gradient(0deg, rgb(7 12 24 / 97%), rgb(7 12 24 / 83%) 62%, transparent); }
.landing-mode-grid .card-title { color: #ffffff; font-size: clamp(2rem, 4vw, 3.4rem); line-height: 1; }
.landing-mode-grid .card-link:hover .card-title { color: var(--landing-gold); }
.landing-mode-grid .card-summary { max-width: 34rem; color: #dce1e9; }
.landing-mode-grid .chip { color: #f4ecda; border-color: rgb(255 255 255 / 24%); background: rgb(255 255 255 / 8%); }
.landing-mode-grid .badge { position: absolute; top: 1.2rem; left: 1.2rem; color: #101727; border: 0; background: var(--landing-gold); text-transform: uppercase; letter-spacing: 0.09em; }
.landing-mode-grid .is-coming-soon .card-image { filter: saturate(0.58) contrast(1.08); }

.landing-callout {
  position: relative;
  padding-block: clamp(5rem, 10vw, 8rem);
  overflow: hidden;
  color: #ffffff;
  background: #111a2c;
}
.landing-callout::before { content: ""; position: absolute; width: 32rem; height: 32rem; top: 50%; right: 4%; border: 1px solid rgb(241 185 79 / 30%); transform: translateY(-50%) rotate(45deg); }
.callout-grid { position: absolute; inset: 0; opacity: 0.18; background: linear-gradient(90deg, transparent 49.8%, rgb(255 255 255 / 15%) 50%, transparent 50.2%) 0 0 / 5rem 5rem, linear-gradient(transparent 49.8%, rgb(255 255 255 / 15%) 50%, transparent 50.2%) 0 0 / 5rem 5rem; }
.landing-callout-inner { position: relative; grid-template-columns: minmax(0, 1.55fr) minmax(18rem, 0.8fr); gap: clamp(2rem, 7vw, 7rem); }
.landing-callout .section-index { color: var(--landing-gold); }
.landing-callout h2 { max-width: 12ch; margin: 0; color: #ffffff; font-size: clamp(2.7rem, 6vw, 5.8rem); line-height: 0.94; letter-spacing: -0.05em; }
.landing-callout p { margin-top: 1.25rem; color: #cdd4df; font-size: 1.05rem; }
.landing-callout .callout-actions { align-content: center; align-items: stretch; flex-direction: column; margin: 0; }
.landing-callout .button { width: 100%; min-height: 3.5rem; }

.landing-news .news-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.1rem; }
.landing-news .news-card article { height: 100%; align-content: start; padding: 0; overflow: hidden; border-radius: 0; }
.landing-news .news-card article:has(.news-image) { grid-template-columns: 1fr; }
.landing-news .news-image { margin: 0; border-radius: 0; clip-path: polygon(0 0, 100% 0, 100% 87%, 72% 100%, 0 91%); }
.landing-news .news-body { padding: 1.3rem 1.4rem 1.5rem; }
.landing-news .news-title { font-size: 1.48rem; }

.has-js [data-reveal] { opacity: 0; transform: translateY(1.5rem); transition: opacity 0.75s ease, transform 0.75s cubic-bezier(.2, .75, .2, 1); }
.has-js [data-reveal].is-visible { opacity: 1; transform: translateY(0); }
.has-js .rhythm-steps [data-reveal]:nth-child(2) { transition-delay: 0.1s; }
.has-js .rhythm-steps [data-reveal]:nth-child(3) { transition-delay: 0.2s; }

@media (max-width: 55rem) {
  .landing-hero-grid { grid-template-columns: 1fr; align-content: end; }
  .field-signal { display: none; }
  .landing-hero-copy { max-width: 45rem; }
  .landing-story-grid { grid-template-columns: 1fr 0.72fr; gap: 2.5rem; }
  .rhythm-heading { grid-template-columns: 1fr; }
  .rhythm-steps li { min-height: 16rem; }
  .landing-callout-inner { grid-template-columns: 1fr; }
  .landing-callout .callout-actions { max-width: 28rem; }
  .landing-news .news-list { grid-template-columns: 1fr 1fr; }
  .landing-news .news-card:first-child { grid-column: 1 / -1; }
}

@media (max-width: 42rem) {
  .section-home .site-header { background: rgb(8 13 24 / 86%); }
  .section-home .header-inner { gap: 0.65rem; }
  .section-home .brand { margin-inline: auto; }
  .section-home .site-nav { width: 100%; overflow-x: auto; scrollbar-width: none; }
  .section-home .site-nav ul { flex-wrap: nowrap; justify-content: center; min-width: max-content; }
  .landing-hero { min-height: 46rem; }
  .landing-hero-grid { padding-top: 10rem; padding-bottom: 5.5rem; }
  .landing-hero h1 { font-size: clamp(4.35rem, 24vw, 7rem); }
  .landing-hero h1 span:last-child { margin-left: 0.42em; }
  .hero-scroll { display: none; }
  .landing-story-grid { grid-template-columns: 1fr; }
  .story-portrait { width: min(86%, 22rem); }
  .rhythm-steps { grid-template-columns: 1fr; border-top: 0; border-left: 1px solid rgb(255 255 255 / 20%); }
  .rhythm-steps li,
  .rhythm-steps li:first-child { min-height: 0; padding: 1.7rem 1rem 2.5rem 2rem; border: 0; border-bottom: 1px solid rgb(255 255 255 / 15%); }
  .rhythm-steps li::before { top: 2.1rem; left: -0.36rem; }
  .rhythm-icon { margin: 1.4rem 0 1rem; }
  .landing-section-heading { display: grid; }
  .landing-mode-grid { grid-template-columns: 1fr; }
  .landing-mode-grid .card-link { min-height: 30rem; }
  .landing-news .news-list { grid-template-columns: 1fr; }
  .landing-news .news-card:first-child { grid-column: auto; }
  .landing-news .news-card article:has(.news-image) { grid-template-columns: 1fr; }
}

@media (max-width: 30rem) {
  .landing-hero .hero-actions .button { width: 100%; }
  .landing-hero .hero-kicker { letter-spacing: 0.1em; }
  .story-copy h2,
  .landing-section-heading h2 { font-size: 2.35rem; }
  .story-portrait { width: 92%; box-shadow: 0.8rem 0.8rem 0 color-mix(in srgb, var(--gold) 22%, transparent); }
  .landing-mode-grid .card-link { min-height: 27rem; }
}

@media (prefers-reduced-motion: reduce) {
  .status-pulse,
  .signal-orbit::before,
  .hero-scroll i::after { animation: none; }
  .landing-hero-image,
  .story-portrait,
  .landing-mode-grid .mode-card { transform: none; }
  .has-js [data-reveal] { opacity: 1; transform: none; }
}

@media print {
  .section-home .site-header { position: static; }
  .landing-hero { min-height: 0; }
  .field-signal, .hero-scroll, .hero-facets, .match-rhythm::after, .landing-callout::before, .callout-grid { display: none; }
  .landing-hero-grid, .landing-story-grid, .rhythm-heading, .landing-callout-inner { display: block; padding-block: 1rem; }
  .landing-hero h1, .landing-hero h1 span:last-child, .match-rhythm, .match-rhythm h2, .match-rhythm h3, .landing-callout, .landing-callout h2 { color: #000000; }
  .match-rhythm, .landing-callout { background: none; }
  /* Scroll reveals never fire on paper: print every section in its final state. */
  .has-js [data-reveal] { opacity: 1; transform: none; transition: none; }
}
