/* Agewalker site. Direction: a museum hall of Sumerian artefacts in the game's bronze-age palette.
   Light theme — sun-dried clay; dark theme — lapis night. Hero, CTA band and footer stay lapis in both.
   Files: site.css (tokens, frame, bands), motifs.css (SVG motifs), exhibits.css (features, gallery, press). */

@font-face { font-family: "Podkova"; src: url("../fonts/Podkova-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("../fonts/Nunito-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("../fonts/Nunito-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --lapis-950: #081026;
  --lapis-900: #0d1633;
  --lapis-800: #16244d;
  --lapis-700: #1f3473;
  --lapis-500: #3555b0;
  --gold-400: #f4c45c;
  --gold-500: #dba23a;
  --gold-700: #8f6418;
  --brick-500: #b4552d;
  --brick-700: #7d3519;
  --clay-50: #fbf4e6;
  --clay-100: #f3e6cc;
  --clay-200: #e8d4ae;
  --clay-300: #dcc49a;
  --ink-900: #22190f;
  --ink-700: #4a3a28;
  --cream: #f1e6cf;
  --cream-soft: #d8cbb0;

  /* Surface ladder: sunk (exhibit hall) < page < raised (mats, plates). */
  --bg: var(--clay-100);
  --bg-sunk: var(--clay-200);
  --bg-raised: var(--clay-50);
  --mat: var(--clay-50);
  --hairline: var(--gold-700);
  --outline: var(--ink-900);
  --text: var(--ink-900);
  --text-soft: var(--ink-700);
  --accent: var(--brick-500);
  --accent-text: var(--brick-700);
  --line: rgba(74, 58, 40, 0.18);
  --lip: rgba(255, 255, 255, 0.7);
  --shadow: 0 1px 2px rgba(60, 35, 10, 0.18), 0 18px 36px -18px rgba(60, 35, 10, 0.5);
  --shadow-lift: 0 2px 4px rgba(60, 35, 10, 0.18), 0 28px 44px -20px rgba(60, 35, 10, 0.55);
  --link: var(--lapis-700);
  --focus: var(--lapis-700);

  --font-display: "Podkova", "Rockwell", "Roboto Slab", Georgia, serif;
  --font-body: "Nunito", "Segoe UI", system-ui, sans-serif;
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lead: clamp(1.08rem, 0.98rem + 0.5vw, 1.3rem);
  --text-h1: clamp(2.5rem, 1.4rem + 5vw, 5.4rem);
  --text-h2: clamp(1.8rem, 1.2rem + 2.6vw, 3.2rem);
  --text-h3: clamp(1.45rem, 1.15rem + 1.2vw, 2.1rem);

  /* One horizontal grid: every band is full-bleed, every content edge sits on --inline. */
  --container: 1320px;
  --gutter: clamp(16px, 4vw, 56px);
  --inline: max(var(--gutter), calc((100% - var(--container)) / 2 + var(--gutter)));
  --section: clamp(3.5rem, 2.6rem + 3.6vw, 6.5rem);
  --step: 10px;

  --r-sm: 4px;
  --r-md: 8px;
  --r-pill: 999px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .3 0 0 0 0 .2 0 0 0 0 .1 0 0 0 .09 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1330;
    --bg-sunk: #060b1f;
    --bg-raised: #172552;
    --mat: #172552;
    --hairline: rgba(244, 196, 92, 0.42);
    --outline: #050a1c;
    --text: var(--cream);
    --text-soft: #c6b89c;
    --accent: var(--gold-400);
    --accent-text: var(--gold-400);
    --line: rgba(244, 196, 92, 0.2);
    --lip: rgba(255, 255, 255, 0.07);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 20px 40px -18px rgba(0, 0, 0, 0.85);
    --shadow-lift: 0 2px 4px rgba(0, 0, 0, 0.45), 0 30px 48px -20px rgba(0, 0, 0, 0.9);
    --link: var(--gold-400);
    --focus: var(--gold-400);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  margin: 0;
  background: var(--grain), var(--bg);
  color: var(--text);
  font: 400 var(--text-base)/1.6 var(--font-body);
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
/* Dark surfaces in both themes keep the gold ring. */
.top, .hero, .cta-band, .foot, .lightbox { --focus: var(--gold-400); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.05; margin: 0; letter-spacing: -0.01em; text-wrap: balance; }
p { margin: 0 0 1em; text-wrap: pretty; }

.skip { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--gold-400); color: var(--ink-900); padding: 8px 14px; }
.skip:focus { left: 8px; }

/* ── Top bar ─────────────────────────────────────────── */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 1rem;
  padding: 10px var(--inline);
  background: rgba(13, 22, 51, 0.95);
  backdrop-filter: blur(10px) saturate(1.2);
  -webkit-backdrop-filter: blur(10px) saturate(1.2);
  box-shadow: 0 1px 0 rgba(244, 196, 92, 0.24), 0 10px 24px -14px rgba(5, 10, 28, 0.7);
}
.wordmark {
  font-family: var(--font-display); font-size: 1.45rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--gold-400); text-decoration: none;
  text-shadow: 0 2px 0 var(--ink-900);
}
.wordmark.small { font-size: 1.15rem; }
.top-nav { display: flex; gap: clamp(0.8rem, 2vw, 1.8rem); margin-left: auto; }
.top-nav a { color: #e9dcc0; text-decoration: none; font-weight: 700; font-size: 0.95rem; padding: 6px 0; position: relative; }
.top-nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--gold-400); transform: scaleX(0); transform-origin: left; transition: transform 300ms var(--ease); }
@media (hover: hover) { .top-nav a:hover::after { transform: scaleX(1); } }
/* Without the script the switch cannot work; hidden, not removed, so the bar does not shift when it appears. */
html:not(.js) .lang { visibility: hidden; }
.lang { display: flex; border: 1px solid rgba(244, 196, 92, 0.45); border-radius: var(--r-pill); overflow: hidden; }
.lang button {
  font: 700 0.8rem/1 var(--font-body); letter-spacing: 0.06em; padding: 8px 12px; min-width: 44px; min-height: 40px;
  background: transparent; color: #e9dcc0; border: 0; cursor: pointer;
  transition-property: background-color, color; transition-duration: 150ms;
}
/* .lang clips its corners, so the ring is drawn inside the button. */
.lang button:focus-visible { outline-offset: -3px; }
.lang button[aria-pressed="true"]:focus-visible { outline-color: var(--lapis-800); }
@media (hover: hover) { .lang button:not([aria-pressed="true"]):hover { background: rgba(244, 196, 92, 0.16); } }
.lang button[aria-pressed="true"] { background: var(--gold-400); color: var(--ink-900); }
@media (max-width: 640px) { .top-nav { display: none; } .lang { margin-left: auto; } }

/* ── Hero: a lapis slab with pyrite, a ziggurat behind the trailer ── */
.hero {
  position: relative; isolation: isolate;
  display: grid; gap: clamp(2rem, 4vw, 4rem); align-items: center;
  padding: clamp(2.5rem, 2rem + 4vw, 6rem) var(--inline) clamp(3rem, 2rem + 4vw, 6.5rem);
  color: var(--cream);
  background:
    linear-gradient(to bottom, transparent calc(100% - 40px), rgba(180, 85, 45, 0.22)),
    radial-gradient(110% 90% at 85% 5%, rgba(53, 85, 176, 0.6), transparent 62%),
    var(--lapis-800);
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background: var(--motif-lapis) center / cover no-repeat;
  opacity: 0.42;
}
/* A low three-terrace ziggurat under the trailer column: the trailer stands on its top terrace, its base on the frieze. */
.hero::after {
  content: ""; position: absolute; right: calc(var(--inline) - 24px); bottom: 0; z-index: -1; pointer-events: none;
  width: min(46%, 700px); aspect-ratio: 3 / 1;
  background: var(--motif-ziggurat) center bottom / 100% 100% no-repeat;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 18%);
  mask-image: linear-gradient(to right, transparent, #000 18%);
  opacity: 0.6;
}
.eyebrow { text-wrap: balance; font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.8rem; color: var(--gold-400); margin-bottom: 1.1rem; }
.hero h1 { font-size: var(--text-h1); color: #fbf1dc; }
/* Side by side, each sentence holds one line: the headline is sized from its column (EN line 1 is ~8.1em). */
@media (min-width: 960px) {
  .hero { grid-template-columns: minmax(0, 7fr) minmax(0, 6fr); }
  .hero-copy { container-type: inline-size; }
  .hero h1 { font-size: min(5.4rem, 12cqi); }
  .hero h1 span { display: block; white-space: nowrap; }
}
.hero h1 em { font-style: normal; display: block; color: var(--gold-400); text-shadow: 0 3px 0 var(--ink-900); }
.lead { font-size: var(--text-lead); max-width: 34em; margin-top: 1.3rem; color: var(--cream-soft); }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; margin-top: 1.8rem; }
.btn {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 2px;
  min-height: 60px; padding: 10px 22px; border-radius: var(--r-md);
  font: 700 1.1rem/1.15 var(--font-display); text-decoration: none;
  transition-property: transform, box-shadow; transition-duration: 150ms; transition-timing-function: var(--ease);
}
.btn small { font: 700 0.75rem/1.2 var(--font-body); letter-spacing: 0.04em; opacity: 0.8; }
.btn-gold {
  background: linear-gradient(180deg, #ffd77d, var(--gold-500)); color: var(--ink-900);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 0 0 2px var(--outline), 0 5px 0 2px var(--gold-700), 0 14px 30px -10px rgba(244, 196, 92, 0.6);
}
@media (hover: hover) { .btn-gold:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 0 0 2px var(--outline), 0 7px 0 2px var(--gold-700), 0 20px 36px -10px rgba(244, 196, 92, 0.7); } }
.btn-gold:active { transform: translateY(3px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 0 0 2px var(--outline), 0 2px 0 2px var(--gold-700); }
.soon {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 2px; min-height: 60px; padding: 0 0 0 16px;
  border-left: 1px dashed rgba(244, 196, 92, 0.4);
  font: 700 0.95rem/1.15 var(--font-display); color: #b9ac92; cursor: default;
}
.soon small { font: 400 0.75rem/1.2 var(--font-body); letter-spacing: 0.04em; }
@media (max-width: 399px) { .soon { border-left: 0; padding-left: 4px; } }
.facts { display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; padding: 0; margin: 1.6rem 0 0; font-size: 0.9rem; color: #b9ac92; }
.facts li::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 9px; vertical-align: 0.2em; background: var(--gold-500); transform: rotate(45deg); }

.trailer { margin: 0; }
.trailer-frame {
  position: relative; padding: 10px; border-radius: var(--r-md);
  background: linear-gradient(135deg, #ffd77d, var(--gold-500) 40%, var(--gold-700));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 0 0 2px var(--outline), 0 30px 60px -20px rgba(0, 0, 0, 0.75);
  transform: rotate(-0.6deg);
}
.trailer-frame video { width: 100%; aspect-ratio: 16 / 9; border-radius: var(--r-sm); background: #000; box-shadow: 0 0 0 2px var(--ink-900); }
.trailer figcaption { margin-top: 14px; font-size: 0.85rem; color: #a99d84; text-align: right; }

/* Phones: the trailer right under the headline, before the buttons. */
@media (max-width: 959px) {
  .hero { gap: 0; }
  .hero-copy { display: contents; }
  .eyebrow { order: 1; } .hero h1 { order: 2; } .lead { order: 3; }
  .trailer { order: 4; margin-top: 1.75rem; }
  .trailer figcaption { text-align: left; }
  .cta-row { order: 5; } .facts { order: 6; }
  .hero::after { right: 0; width: 100%; aspect-ratio: 4 / 1; opacity: 0.45; -webkit-mask-image: linear-gradient(to right, transparent, #000 15% 85%, transparent); mask-image: linear-gradient(to right, transparent, #000 15% 85%, transparent); }
}

/* ── Dividers ────────────────────────────────────────── */
/* Mudbrick course: staggered, lit from above. Opens the page under the hero and closes it over the footer. */
.frieze { height: 30px; background: var(--motif-mudbrick) 0 0 / 224px 30px repeat-x; }
/* A cylinder seal rolled once across wet clay: the doorway into the press room. */
.frieze-seal {
  height: 56px;
  background: var(--motif-seal) -36px 0 / 240px 56px repeat-x, var(--bg-sunk);
  box-shadow: inset 0 3px 4px -2px rgba(60, 35, 10, 0.35), inset 0 -1px 0 var(--lip);
}
@media (prefers-color-scheme: dark) {
  .frieze-seal { background-image: var(--motif-seal-dark); box-shadow: inset 0 3px 5px -2px rgba(0, 0, 0, 0.7), inset 0 -1px 0 var(--lip); }
}

/* ── Call to play: a glazed lapis wall, gold-edged on both sides ── */
.cta-band {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; gap: 1.25rem 2.5rem; align-items: center; justify-items: start;
  padding: clamp(2.5rem, 2rem + 2.2vw, 4rem) var(--inline);
  background:
    var(--motif-glaze) 0 0 / 72px 28px,
    radial-gradient(90% 140% at 100% 0%, rgba(53, 85, 176, 0.55), transparent 60%),
    var(--lapis-800);
  box-shadow: inset 0 3px 0 var(--gold-500), inset 0 -3px 0 var(--gold-500);
  color: var(--cream);
}
@media (prefers-color-scheme: dark) {
  .cta-band { background: var(--motif-glaze) 0 0 / 72px 28px, radial-gradient(90% 140% at 100% 0%, rgba(53, 85, 176, 0.75), transparent 62%), var(--lapis-800); }
}
.cta-band h2 { font-size: var(--text-h3); color: #fbf1dc; }
.cta-band h2 em { font-style: normal; color: var(--gold-400); }
.cta-band p { margin: 0.6rem 0 0; color: var(--cream-soft); }
@media (min-width: 760px) { .cta-band { grid-template-columns: minmax(0, 1fr) auto; } }

/* ── Footer: the page opened on plain mudbrick and closes on a glazed course, an Ishtar-gate echo ── */
.foot {
  position: relative;
  background: var(--lapis-900); color: #c6b89c;
  padding: calc(30px + 2.75rem) var(--inline) 2rem;
}
.foot::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 30px; background: var(--motif-mudbrick-glazed) -56px 0 / 224px 30px repeat-x; box-shadow: 0 3px 0 var(--gold-500); }
.foot-row { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; }
.foot-links { display: flex; flex-wrap: wrap; gap: 0.6rem 1.6rem; list-style: none; padding: 0; margin: 0; }
@media (min-width: 760px) { .foot-links { margin-left: auto; } }
.foot a { color: var(--cream); }
.socials { flex-basis: 100%; }
@media (min-width: 760px) { .socials { justify-content: flex-end; } }
.ai-note, .copy { margin: 1.75rem 0 0; font-size: 0.85rem; max-width: 70ch; }
.ai-note { padding-top: 1.25rem; border-top: 1px solid rgba(244, 196, 92, 0.16); max-width: none; }
.copy { margin-top: 0.5rem; opacity: 0.75; }

/* ── Motion: reveal on scroll, only when JS marked it and the user allows motion ── */
@media (prefers-reduced-motion: no-preference) {
  .reveal { transition: opacity 500ms var(--ease), transform 600ms var(--ease); }
  .reveal:not(.is-in) { opacity: 0; transform: translateY(14px); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* Paper has no scroll: exhibits that never rose into place still print. */
@media print {
  .reveal, .reveal:not(.is-in) { opacity: 1; transform: none; }
}

/* 404 */
.lost { min-height: 100vh; }
