/* Muddle Ages: site styles. Warm parchment, mud browns, gold. Mobile first. */

/* ---------- fonts (self-hosted, SIL Open Font License: fonts/OFL-*.txt) ---------- */
@font-face { font-family: "Alegreya SC"; src: url("../fonts/alegreya-sc-black.woff2") format("woff2"); font-weight: 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Alegreya SC"; src: url("../fonts/alegreya-sc-bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Alegreya"; src: url("../fonts/alegreya-variable.woff2") format("woff2-variations"), url("../fonts/alegreya-variable.woff2") format("woff2"); font-weight: 400 800; font-style: normal; font-display: swap; }
/* Cyrillic parts (Russian pages), from Google Fonts, OFL: downloaded only where Cyrillic text appears. */
@font-face { font-family: "Alegreya SC"; src: url("../fonts/alegreya-sc-black-cyrillic.woff2") format("woff2"); font-weight: 900; font-style: normal; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Alegreya SC"; src: url("../fonts/alegreya-sc-bold-cyrillic.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Alegreya"; src: url("../fonts/alegreya-variable-cyrillic.woff2") format("woff2-variations"), url("../fonts/alegreya-variable-cyrillic.woff2") format("woff2"); font-weight: 400 800; font-style: normal; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "IM Fell English"; src: url("../fonts/im-fell-english-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }

/* ---------- tokens ---------- */
:root {
  /* Page surfaces: near-black with a touch of grey (were mud browns). */
  --mud-950: #070707;
  --mud-900: #0c0c0c;
  --mud-850: #131313;
  --mud-800: #1b1b1b;
  --mud-700: #3d2a1a;
  --mud-600: #5a3e26;
  --mud-500: #7a5634;
  --parch-50: #fbf4e4;
  --parch-100: #f4e7ca;
  --parch-200: #ead6ac;
  --parch-300: #dcc08a;
  --ink: #2a1c10;
  --ink-soft: #5b432b;
  --gold-200: #ffe7ad;
  --gold-300: #ffd98a;
  --gold-400: #f5c152;
  --gold-500: #e3a334;
  --gold-600: #b87a1c;
  --gold-700: #7c4d0e;
  --moss: #8fbf4a;
  --teal: #4cc9b6;
  --wax: #9e2f27;
  --on-dark: #f3e7cf;
  --on-dark-soft: #d4c19c;
  --radius: 14px;
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, .45);
  --header-h: 64px;
  --font-head: "Alegreya SC", "Palatino Linotype", Palatino, Georgia, serif;
  --font-body: "Alegreya", "Palatino Linotype", Palatino, Georgia, serif;
  --font-quote: "IM Fell English", "Palatino Linotype", Georgia, serif;
  --grain: url("../img/grain.png");
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 12px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--mud-900) var(--grain);
  color: var(--on-dark);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: hidden;
}
@media (min-width: 960px) { body { font-size: 1.125rem; } }
img, video, picture, svg { display: block; max-width: 100%; }
img, video { height: auto; }
a { color: var(--gold-300); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--gold-200); }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; line-height: 1.08; font-family: var(--font-head); font-weight: 900; }
ul, ol { padding: 0; margin: 0; list-style: none; }
strong { font-weight: 700; }
::selection { background: var(--gold-400); color: var(--ink); }
:focus-visible { outline: 3px solid var(--gold-400); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(100% - 32px, 1200px); margin-inline: auto; }
.wrap.narrow { width: min(100% - 32px, 820px); }
.small { font-size: .9rem; }
.muted { color: var(--on-dark-soft); }
.center { justify-content: center; text-align: center; }
.visually-hidden, .visually-hidden-focusable:not(:focus):not(:focus-within) {
  position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important;
  overflow: hidden !important; clip: rect(0 0 0 0) !important; white-space: nowrap !important; border: 0 !important;
}
.skip-link { position: absolute; left: 12px; top: -80px; z-index: 100; background: var(--gold-400); color: var(--ink); padding: 10px 16px; border-radius: 8px; font-weight: 700; }
.skip-link:focus { top: 12px; }

/* ---------- headings ---------- */
.kicker {
  font-family: var(--font-head); font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  font-size: .82rem; color: var(--gold-400); margin: 0 0 .6rem;
}
.carved {
  font-size: clamp(2rem, 1.35rem + 2.9vw, 3.5rem);
  letter-spacing: .005em;
  color: var(--gold-300);
  text-shadow: 0 2px 0 #5a3509, 0 3px 0 #2a1706, 0 8px 22px rgba(0, 0, 0, .55);
  text-wrap: balance;
}
@supports (-webkit-background-clip: text) or (background-clip: text) {
  .carved {
    background: linear-gradient(180deg, #fff1c9 0%, #ffd27a 38%, #e3a334 62%, #c9861f 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
    text-shadow: none;
    filter: drop-shadow(0 2px 0 #4a2b08) drop-shadow(0 6px 14px rgba(0, 0, 0, .5));
  }
}
.parchment .carved, .parchment-card .carved {
  background: none; -webkit-background-clip: border-box; background-clip: border-box; filter: none;
  color: #3a2212; text-shadow: 0 1px 0 rgba(255, 248, 225, .8), 0 -1px 0 rgba(60, 35, 15, .25);
}
.section-head { text-align: center; margin: 0 auto 2.4rem; max-width: 760px; }
.section-sub { margin: .9rem auto 0; color: var(--on-dark-soft); max-width: 620px; text-wrap: balance; }
.parchment .section-sub { color: var(--ink-soft); }
.parchment .kicker { color: #8a4f0c; }

/* ---------- buttons ---------- */
.btn {
  --b-bg: transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 48px; padding: .65em 1.35em;
  border-radius: 12px; border: 2px solid transparent;
  font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; letter-spacing: .03em; line-height: 1.1;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease, background-color .15s ease;
}
.btn svg { width: 1.15em; height: 1.15em; flex: none; }
.btn-note { font-family: var(--font-body); font-weight: 500; font-size: .85em; opacity: .8; letter-spacing: 0; }
.btn-steam {
  color: #2b1703;
  background: linear-gradient(180deg, #ffe7a8 0%, #f7c75a 45%, #e2a232 70%, #c8841c 100%);
  border-color: #6b3f0b;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), inset 0 -3px 0 rgba(120, 66, 8, .45), 0 4px 0 #4f2f08, 0 12px 26px rgba(0, 0, 0, .4);
  text-shadow: 0 1px 0 rgba(255, 240, 200, .6);
}
.btn-steam[href]:hover { filter: brightness(1.06) saturate(1.05); transform: translateY(-1px); color: #2b1703; }
.btn-steam[href]:active { transform: translateY(3px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 1px 0 #4f2f08, 0 5px 12px rgba(0, 0, 0, .35); }
.btn-steam[aria-disabled="true"] {
  cursor: default;
  background: linear-gradient(180deg, #f4e7ca, #e2cd9f);
  border: 2px dashed #8a5a1c;
  box-shadow: 0 3px 0 rgba(0, 0, 0, .35), 0 10px 22px rgba(0, 0, 0, .3);
  color: #4a2c0c;
}
.btn-lg { min-height: 56px; font-size: 1.2rem; padding: .7em 1.6em; }
.btn-sm { min-height: 40px; font-size: .92rem; padding: .45em .95em; border-radius: 10px; }
.btn-ghost {
  color: var(--gold-300);
  border-color: rgba(245, 193, 82, .75);
  background: rgba(14, 14, 14, .45);
}
.btn-ghost:hover { background: rgba(245, 193, 82, .14); color: var(--gold-200); transform: translateY(-1px); }
.parchment .btn-ghost { color: #6a3d08; border-color: #a86f1c; background: rgba(255, 250, 235, .5); }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: rgba(10, 10, 10, .9);
  border-bottom: 1px solid rgba(227, 163, 52, .22);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .25);
}
.header-row { height: 100%; display: flex; align-items: center; gap: 10px; }
.brand { display: block; flex: none; margin-right: auto; }
.brand img { height: 46px; width: auto; }
.main-nav { position: static; }
.nav-toggle {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px;
  background: transparent; color: var(--on-dark); border: 1px solid rgba(245, 193, 82, .45); border-radius: 10px;
  font-family: var(--font-head); font-weight: 700; font-size: .92rem; cursor: pointer;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; position: relative; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; } .nav-toggle-bars::after { top: 6px; }
.nav-list {
  display: none; position: absolute; left: 0; right: 0; top: var(--header-h);
  background: rgba(10, 10, 10, .97); border-bottom: 1px solid rgba(227, 163, 52, .3);
  padding: 8px 16px 16px; box-shadow: 0 16px 30px rgba(0, 0, 0, .4);
}
.nav-list.open { display: block; }
.nav-list a { display: block; padding: 12px 4px; color: var(--on-dark); text-decoration: none; font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; border-bottom: 1px solid rgba(245, 193, 82, .12); }
.nav-list a:hover { color: var(--gold-300); }
.no-js .nav-toggle { display: none; }
.no-js .nav-list { display: flex; position: static; background: none; box-shadow: none; padding: 0; border: 0; gap: 14px; }
.music-toggle {
  flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; cursor: pointer;
  background: transparent; color: var(--on-dark-soft); border: 1px solid rgba(245, 193, 82, .35);
}
.music-toggle svg { width: 22px; height: 22px; }
.music-toggle .waves { display: none; }
.music-toggle[aria-pressed="true"] { color: var(--gold-300); border-color: var(--gold-400); background: rgba(245, 193, 82, .12); }
.music-toggle[aria-pressed="true"] .waves { display: block; }
.music-toggle[aria-pressed="true"] .mute { display: none; }
.no-js .music-toggle { display: none; }
.site-header .btn-steam { display: none; }
@media (min-width: 600px) { .site-header .btn-steam { display: inline-flex; } }
@media (min-width: 960px) {
  .nav-toggle { display: none; }
  .nav-list { display: flex; position: static; background: none; box-shadow: none; padding: 0; border: 0; gap: 4px; }
  .nav-list a { border: 0; padding: 8px 10px; font-size: .98rem; border-radius: 8px; }
  .nav-list a:hover { background: rgba(245, 193, 82, .1); }
  .brand img { height: 50px; }
}

/* ---------- hero (simple version) ---------- */
.hero { position: relative; isolation: isolate; overflow: hidden; padding: 28px 0 56px; }
.hero-bg { position: absolute; inset: 0; z-index: -1; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 40%; opacity: .5; }
.hero-bg::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 70% 30%, rgba(12, 12, 12, .1), rgba(12, 12, 12, .75) 70%), linear-gradient(180deg, rgba(7, 7, 7, .35), var(--mud-900) 96%); }
.hero-inner { display: grid; gap: 28px; align-items: center; }
.hero-logo { margin: 0 auto; width: min(520px, 88%); }
.hero-logo img { width: 100%; filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .5)); }
.hook { font-size: clamp(1.28rem, 1.05rem + 1vw, 1.7rem); line-height: 1.3; font-weight: 600; margin: 8px auto 10px; text-align: center; max-width: 30ch; text-wrap: balance; color: #fff4dc; text-shadow: 0 2px 10px rgba(0, 0, 0, .6); }
.hero-meta { text-align: center; color: var(--on-dark-soft); font-size: .98rem; margin-bottom: 20px; }
.hero .cta-row { justify-content: center; }
.hero-hint { display: none; }
.frame {
  position: relative; overflow: hidden; border-radius: var(--radius);
  border: 3px solid #a8701c; background: #000;
  box-shadow: 0 0 0 1px #3b230a, inset 0 0 0 1px rgba(255, 220, 150, .35), var(--shadow-lg);
}
.hero-media { margin: 0; }
.hero-media .frame { aspect-ratio: 16 / 9; }
.hero-teaser { width: 100%; height: 100%; object-fit: cover; }
.hero-3d-poster { display: none; }
.teaser-toggle {
  position: absolute; right: 10px; bottom: 10px; z-index: 2; min-height: 34px; padding: 4px 12px;
  border-radius: 999px; border: 1px solid rgba(255, 230, 170, .6); background: rgba(7, 7, 7, .72); color: var(--on-dark);
  font-family: var(--font-head); font-weight: 700; font-size: .85rem; cursor: pointer;
}
.teaser-toggle .t-play { display: none; }
.teaser-toggle[aria-pressed="true"] .t-play { display: inline; }
.teaser-toggle[aria-pressed="true"] .t-pause { display: none; }
@media (min-width: 960px) {
  .hero { padding: 56px 0 88px; min-height: min(calc(100vh - var(--header-h)), 860px); display: flex; align-items: center; }
  .hero-inner { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; }
  .hero-logo { margin: 0 0 0 -8px; width: 100%; max-width: 520px; }
  .hook, .hero-meta { text-align: left; margin-left: 0; }
  .hero .cta-row { justify-content: flex-start; }
}

/* ---------- shared panels ---------- */
.parchment {
  position: relative; color: var(--ink);
  background: var(--grain),
    linear-gradient(180deg, #f5ead2 0, #f5ead2 6px, rgba(245, 234, 210, 0) 90px),
    linear-gradient(0deg, #e6cf9f 0, #e6cf9f 6px, rgba(230, 207, 159, 0) 90px),
    radial-gradient(ellipse at 50% 0%, #fdf7e8 0%, #f3e4c3 55%, #e6cf9f 100%);
}
.parchment::before, .parchment::after {
  content: ""; position: absolute; left: 0; right: 0; height: 18px; pointer-events: none;
  background-repeat: repeat-x; background-size: 260px 18px;
}
.parchment::before { top: -17px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='18' viewBox='0 0 260 18'%3E%3Cpath fill='%23f5ead2' d='M0 18V8l9-3 8 4 11-5 9 4 13-3 7 3 12-4 10 5 9-2 14 3 8-5 12 4 10-3 9 4 12-5 11 4 9-2 12 3 10-4 8 3 11-3 9 2 8-1 3 0l26 1V18z'/%3E%3C/svg%3E"); }
.parchment::after { bottom: -17px; transform: scaleY(-1); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='18' viewBox='0 0 260 18'%3E%3Cpath fill='%23e6cf9f' d='M0 18V8l12-3 8 3 10-4 11 5 9-3 12 4 8-4 13 4 9-2 10 3 12-5 8 4 11-3 10 4 9-3 12 3 8-4 11 4 9-2 10 3 9-2 7 0l42-2V18z'/%3E%3C/svg%3E"); }
.parchment a { color: #7a3f06; }
.parchment-card {
  color: var(--ink);
  background: var(--grain), linear-gradient(180deg, #fbf3e0, #efdcb2);
  border-radius: 10px;
  border: 1px solid #b98a45;
  box-shadow: inset 0 0 0 5px rgba(255, 250, 235, .55), inset 0 0 40px rgba(150, 100, 40, .25), 0 12px 30px rgba(0, 0, 0, .35);
}

/* ---------- story / how it works ---------- */
.story { position: relative; padding: 72px 0 40px; background: var(--grain), linear-gradient(180deg, var(--mud-900), var(--mud-850) 40%, var(--mud-900)); }
.prologue { margin: 0 auto 56px; max-width: 860px; }
.prologue-card { display: grid; grid-template-columns: 1fr; gap: 18px; padding: 22px 22px 8px; align-items: center; }
.prologue-baron img { width: 128px; margin: 0 auto; border-radius: 8px; border: 3px solid #a8701c; box-shadow: 0 6px 16px rgba(0, 0, 0, .35); }
.prologue .lead { font-size: 1.2rem; line-height: 1.45; }
@media (min-width: 600px) {
  .prologue-card { grid-template-columns: 150px 1fr; padding: 26px 30px 12px; gap: 26px; }
  .prologue-baron img { width: 150px; }
}
.chapters { display: grid; gap: 56px; counter-reset: step; }
.chapter { display: grid; gap: 18px; align-items: center; }
.chapter-media .loop, .chapter-media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); border: 3px solid #a8701c; box-shadow: var(--shadow-lg); background: #000; }
.chapter-card { position: relative; padding: 24px 24px 10px 24px; }
.chapter-card { color: var(--ink); background: var(--grain), linear-gradient(180deg, #fbf3e0, #efdcb2); border-radius: 10px; border: 1px solid #b98a45; box-shadow: inset 0 0 0 5px rgba(255, 250, 235, .55), inset 0 0 40px rgba(150, 100, 40, .25), 0 12px 30px rgba(0, 0, 0, .35); }
.chapter-card h3 { font-size: clamp(2rem, 1.6rem + 1.8vw, 2.9rem); margin: 0 0 .5rem; }
.chapter-card .carved { background: none; -webkit-background-clip: border-box; background-clip: border-box; filter: none; color: #3a2212; text-shadow: 0 1px 0 rgba(255, 248, 225, .8); }
.chapter-card p { font-size: 1.08rem; }
.chapter-num {
  position: absolute; top: -22px; right: 18px; width: 52px; height: 52px; margin: 0;
  display: grid; place-items: center; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #c9453a, var(--wax) 60%, #6e1d17);
  box-shadow: 0 0 0 3px rgba(110, 29, 23, .35), 0 4px 10px rgba(0, 0, 0, .35), inset 0 2px 3px rgba(255, 180, 160, .4);
  color: #ffe9c9; font-family: var(--font-head); font-weight: 900; font-size: 1.15rem; line-height: 1;
}
@media (min-width: 900px) {
  .chapter { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 40px; }
  .chapter:nth-child(even) .chapter-media { order: 2; }
  .chapter-card { padding: 30px 32px 14px; }
}

/* ---------- trailer + CTA ---------- */
.trailer-cta { position: relative; padding: 80px 0; background: var(--grain), radial-gradient(ellipse at 20% 50%, rgba(227, 163, 52, .16), transparent 60%), var(--mud-900); }
.trailer-grid { display: grid; gap: 32px; align-items: center; }
.trailer-copy .btn { margin-top: 6px; }
.steam-note { margin-top: 12px; }
.trailer-player { aspect-ratio: 16 / 9; }
.trailer-player video { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 960px) { .trailer-grid { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 56px; } }

/* ---------- features ---------- */
.features { padding: 84px 0 76px; }
.feature-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 600px) { .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .feature-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; } }
.feature {
  padding: 18px 18px 6px; border-radius: 12px;
  background: rgba(255, 250, 238, .6); border: 1px solid rgba(160, 110, 40, .35);
  box-shadow: 0 2px 0 rgba(120, 80, 30, .15), 0 10px 22px rgba(90, 60, 20, .12);
}
.feature img { width: 64px; height: 64px; margin-bottom: 8px; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .3)); }
@media (max-width: 599px) {
  .feature { display: grid; grid-template-columns: 52px 1fr; column-gap: 14px; padding: 16px 16px 4px; }
  .feature picture { grid-row: span 2; }
  .feature img { width: 52px; height: 52px; }
}
.feature h3 { font-size: 1.32rem; color: #3a2212; margin-bottom: .35rem; font-weight: 900; }
.feature p { font-size: 1rem; color: #3f2c1b; }
.depths { margin: 44px auto 0; text-align: center; }
.depths-title { font-size: 1.5rem; color: #3a2212; margin-bottom: 18px; }
.depth-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 10px; justify-items: center; }
@media (min-width: 700px) { .depth-list { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.depth-list li { display: grid; justify-items: center; gap: 6px; font-family: var(--font-head); font-weight: 700; color: #3a2212; font-size: 1.02rem; line-height: 1.2; }
.depth-list img { width: 96px; height: 96px; filter: drop-shadow(0 5px 6px rgba(0, 0, 0, .3)); }
.depth-list em { display: block; font-family: var(--font-body); font-weight: 500; font-size: .88rem; color: var(--ink-soft); }
.deep-dark-mark { width: 86px; height: 96px; display: grid; place-items: center; border-radius: 45% 45% 50% 50%; background: radial-gradient(circle at 50% 35%, #3d2a1a, #0f0a06 70%); color: var(--teal); font-size: 2.2rem; font-family: var(--font-head); box-shadow: 0 5px 10px rgba(0, 0, 0, .35), inset 0 0 18px rgba(76, 201, 182, .25); }
.extras { text-align: center; margin: 34px auto 0; color: var(--ink-soft); font-weight: 600; }

/* ---------- co-op ---------- */
.coop { padding: 96px 0 84px; background: var(--grain), radial-gradient(ellipse at 80% 40%, rgba(143, 191, 74, .10), transparent 55%), var(--mud-850); }
.coop-grid { display: grid; gap: 36px; align-items: center; }
.coop-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 22px; }
.coop-facts li { padding: 12px 14px; border-radius: 10px; background: rgba(245, 193, 82, .08); border: 1px solid rgba(245, 193, 82, .28); color: var(--on-dark-soft); line-height: 1.25; }
.coop-facts strong { display: block; font-family: var(--font-head); font-weight: 900; font-size: 1.3rem; color: var(--gold-300); }
.coop-figure { position: relative; margin: 0; }
.coop-figure figcaption { margin-top: 12px; text-align: right; }
.bubbles { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.bubbles li {
  position: relative; padding: 8px 14px 9px; border-radius: 16px; background: var(--parch-100); color: var(--ink);
  font-family: var(--font-head); font-weight: 900; font-size: .98rem; line-height: 1.2; box-shadow: 0 6px 14px rgba(0, 0, 0, .35);
}
.bubbles .who { display: block; font-family: var(--font-body); font-weight: 700; font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: #8a4f0c; }
@media (min-width: 960px) {
  .coop-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; }
  .bubbles { position: absolute; inset: 0; margin: 0; pointer-events: none; }
  .bubbles li { position: absolute; }
  .bubbles li::after { content: ""; position: absolute; bottom: -8px; left: 22px; border: 9px solid transparent; border-top-color: var(--parch-100); border-bottom: 0; }
  .bubbles .b1 { left: -28px; top: 8%; transform: rotate(-4deg); }
  .bubbles .b2 { right: -18px; top: 4%; transform: rotate(3deg); }
  .bubbles .b3 { right: 6%; top: 40%; transform: rotate(-2deg); }
  .bubbles .b4 { left: 4%; bottom: 20%; transform: rotate(2deg); }
}

/* ---------- Mortimer ---------- */
.mortimer { position: relative; isolation: isolate; overflow: hidden; padding: 110px 0; text-align: center; }
.mortimer-bg { position: absolute; inset: 0; z-index: -1; }
.mortimer-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 70% 50%; }
.mortimer-bg::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 50%, rgba(7, 7, 7, .55), rgba(7, 7, 7, .88) 75%); }
.mortimer-inner { max-width: 820px; }
.quote { margin: 0 0 1.4rem; }
.quote p { font-family: var(--font-quote); font-style: italic; font-size: clamp(2rem, 1.3rem + 3.4vw, 3.8rem); line-height: 1.12; color: #fff1d0; text-shadow: 0 3px 18px rgba(0, 0, 0, .75); margin: 0 0 .7rem; text-wrap: balance; min-height: 2.3em; display: grid; place-items: center; }
.quote footer { font-family: var(--font-head); font-weight: 700; color: var(--gold-400); letter-spacing: .06em; }
.mortimer-text { color: var(--on-dark-soft); max-width: 600px; margin: 0 auto 1.6rem; }

/* ---------- gallery ---------- */
.gallery { padding: 90px 0; background: var(--grain), var(--mud-900); }
.shots { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 600px) { .shots { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) { .shots { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; } }
.shots a { display: block; border-radius: 12px; overflow: hidden; border: 2px solid #7c5016; box-shadow: 0 10px 24px rgba(0, 0, 0, .4); transition: transform .2s ease, border-color .2s ease; }
.shots a:hover { transform: translateY(-3px); border-color: var(--gold-400); }
.shots img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

/* ---------- FAQ ---------- */
.faq { padding: 88px 0 80px; }
.faq-list details { border-bottom: 1px solid rgba(120, 80, 30, .3); }
.faq-list summary {
  cursor: pointer; list-style: none; padding: 18px 40px 18px 0; position: relative;
  font-family: var(--font-head); font-weight: 900; font-size: 1.28rem; color: #3a2212;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font-size: 1.6rem; color: #8a4f0c; }
.faq-list details[open] summary::after { content: "−"; }
.faq-list details p { margin: -4px 0 18px; color: #3f2c1b; }

/* ---------- final CTA ---------- */
.final-cta { padding: 110px 0 100px; text-align: center; background: var(--grain), radial-gradient(ellipse at 50% 60%, rgba(227, 163, 52, .22), transparent 60%), var(--mud-900); }
.final-inner p { color: var(--on-dark-soft); margin: 14px auto 26px; }

/* Launch list sign-up */
.cta-row[hidden] { display: none; }
.final-inner > p { max-width: 36em; }
.signup { max-width: 34rem; margin: 0 auto; }
.signup-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.signup input[type=email] {
  flex: 1 1 15rem; min-width: 0; min-height: 52px; padding: 0 16px; border-radius: 12px;
  border: 1px solid rgba(245, 193, 82, .45); background: rgba(0, 0, 0, .45); color: var(--on-dark);
  font: inherit; font-size: 1.05rem;
}
.signup input[type=email]::placeholder { color: rgba(212, 193, 156, .55); }
.signup input[type=email]:focus { outline: 3px solid var(--gold-400); outline-offset: 2px; border-color: var(--gold-400); }
.signup .btn { flex: 0 0 auto; min-height: 52px; }
.signup button[disabled] { opacity: .7; cursor: progress; }
.final-inner .signup-note { margin: 12px auto 0; font-size: .9rem; }
.final-inner .signup-msg { margin: 14px auto 0; color: #ffb3a7; font-weight: 600; }
.final-inner .signup-msg.is-ok { color: var(--gold-300); }
.signup.is-done .signup-row { opacity: .6; }
.signup-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 479px) { .signup .btn { flex: 1 1 100%; } }
/* Narrow phones: long (translated) button labels wrap instead of running off the screen. */
@media (max-width: 479px) { .btn { white-space: normal; max-width: 100%; text-align: center; } }

/* Language links in the footer */
.lang-switch ul { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 14px; }
.lang-switch a { color: var(--on-dark-soft); text-decoration: none; font-size: .95rem; }
.lang-switch a:hover { color: var(--gold-200); text-decoration: underline; }
.lang-switch a[aria-current] { color: var(--gold-300); font-weight: 700; }

/* ---------- footer ---------- */
.site-footer { background: var(--mud-950); border-top: 1px solid rgba(227, 163, 52, .2); padding: 56px 0 28px; }
.footer-grid { display: grid; gap: 32px; }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; } }
.footer-brand img { width: 180px; }
.footer-brand p { margin-top: 10px; color: var(--on-dark-soft); }
.footer-title { font-size: 1.1rem; font-weight: 700; color: var(--gold-400); margin-bottom: 12px; letter-spacing: .04em; }
.footer-links li, .social-list li { margin-bottom: 8px; }
.footer-links a[aria-disabled="true"] { color: var(--on-dark-soft); text-decoration: none; }
.social-list { display: flex; flex-wrap: wrap; gap: 8px; }
.social-list li { margin: 0; }
.social-list a { display: inline-block; padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(245, 193, 82, .45); text-decoration: none; font-family: var(--font-head); font-weight: 700; font-size: .92rem; }
.social-list a:hover { background: rgba(245, 193, 82, .12); }
.legal { margin-top: 36px; padding-top: 18px; border-top: 1px solid rgba(245, 193, 82, .12); }
.legal p { margin: 0; }

/* ---------- lightbox ---------- */
.lightbox { padding: 0; border: 0; background: transparent; max-width: min(96vw, 1400px); width: 100%; overflow: visible; }
.lightbox::backdrop { background: rgba(5, 5, 5, .9); }
.lightbox-body video, .lightbox-body img { width: 100%; max-height: 84vh; object-fit: contain; border-radius: 10px; background: #000; box-shadow: var(--shadow-lg); }
.lightbox-body p { text-align: center; margin: 10px 0 0; color: var(--on-dark-soft); }
.lightbox-close {
  position: absolute; top: -52px; right: 0; width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
  border: 2px solid var(--gold-400); background: var(--mud-900); color: var(--gold-300); font-size: 1.6rem; line-height: 1;
}

/* ---------- inner pages (press kit, privacy, 404) ---------- */
.page { padding: 56px 0 80px; }
.page h1 { font-size: clamp(2.2rem, 1.5rem + 3vw, 3.6rem); }
.page h2 { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.2rem); margin: 2.2rem 0 .8rem; color: var(--gold-300); }
.page h3 { font-size: 1.25rem; margin: 1.4rem 0 .5rem; color: var(--gold-300); }
.prose ul { list-style: disc; padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin-bottom: .35em; }

/* =====================================================================
   3D MODE: html.want-3d (a capable device, 3D loading) and html.mode-3d (3D running)
   ===================================================================== */
.only-3d { display: none; }
#world { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; opacity: 0; transition: opacity .8s ease; touch-action: pan-y; }
.mode-3d #world { opacity: 1; }
#world.off { visibility: hidden; }

/* While loading: a picture of the 3D mine stands in, full-bleed behind the text. */
.want-3d .hero { min-height: calc(100svh - var(--header-h)); padding: 22px 0 48px; }
.want-3d .hero-media { position: absolute; inset: 0; z-index: -1; }
.want-3d .hero-media .frame { position: absolute; inset: 0; aspect-ratio: auto; border: 0; border-radius: 0; box-shadow: none; background: transparent; }
.want-3d .hero-teaser, .want-3d .teaser-toggle { display: none !important; }
.want-3d .hero-3d-poster { display: block; position: absolute; inset: 0; }
.want-3d .hero-3d-poster img { width: 100%; height: 100%; object-fit: cover; object-position: 70% 50%; }
.want-3d .hero-bg { display: none; }
.want-3d .hero-inner { align-content: start; }
.want-3d .world-loading { display: flex; }
.world-loading {
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); align-items: center; gap: 10px;
  padding: 7px 14px; border-radius: 999px; background: rgba(7, 7, 7, .72); color: var(--on-dark-soft); font-size: .9rem;
  border: 1px solid rgba(245, 193, 82, .3); white-space: nowrap;
}
.world-loading span { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--gold-400); border-right-color: transparent; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (min-width: 960px) {
  .want-3d .hero-inner { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .want-3d .hero-media { position: absolute; }
}

/* Running: the canvas is fixed behind the page; hero and story are see-through. */
.mode-3d body { background: #0d0906; }
.mode-3d .site-header, .mode-3d main > section, .mode-3d .site-footer { position: relative; z-index: 1; }
.mode-3d .site-header { position: sticky; z-index: 50; }
.mode-3d .hero-media, .mode-3d .world-loading { display: none; }
/* No real GPU: the still poster stays, without the loading note. */
.no-gpu .world-loading { display: none; }
/* Phones: the still diorama sits under the text (where the live 3D puts it), fading in from the page. */
@media (max-width: 959px) {
  .want-3d .hero-3d-poster { top: 44%; -webkit-mask-image: linear-gradient(180deg, transparent, #000 22%); mask-image: linear-gradient(180deg, transparent, #000 22%); }
}
@media (max-width: 959px) and (max-height: 700px) {
  .want-3d .hero-3d-poster { top: 56%; }
}
.mode-3d .hero { background: none; pointer-events: none; }
.mode-3d .hero a, .mode-3d .hero button { pointer-events: auto; }
.mode-3d .hero-copy { pointer-events: none; }
.mode-3d .hero-copy > * { pointer-events: auto; }
.mode-3d .hero-hint {
  display: flex; transition: opacity .3s ease; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 18px 0 0; color: var(--on-dark-soft);
  font-family: var(--font-head); font-weight: 700; font-size: .92rem; letter-spacing: .04em; pointer-events: none;
}
.mode-3d .hero-hint span { color: var(--gold-300); }
.mode-3d:not(.world-hero) .hero-hint { opacity: 0; }
.mode-3d .only-3d.visually-hidden-focusable { display: inline-flex; }
.mode-3d .speech-bubble {
  display: block; position: fixed; left: 0; top: 0; z-index: 2; max-width: min(300px, 70vw); margin: 0;
  padding: 10px 16px 12px; border-radius: 18px; background: var(--parch-50); color: var(--ink);
  font-family: var(--font-quote); font-style: italic; font-size: 1.08rem; line-height: 1.25;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .45); pointer-events: none;
  transform: translate(-50%, -100%); transition: opacity .25s ease;
  will-change: transform;
}
.mode-3d .speech-bubble::after { content: ""; position: absolute; left: 50%; bottom: -10px; margin-left: -10px; border: 10px solid transparent; border-top-color: var(--parch-50); border-bottom: 0; }
.speech-bubble .speaker { display: block; font-family: var(--font-head); font-style: normal; font-weight: 700; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: #8a4f0c; }
.speech-bubble.hidden { opacity: 0; }
.speech-bubble.talking { animation: bob .5s ease-in-out infinite alternate; }
@keyframes bob { from { margin-top: 0; } to { margin-top: -4px; } }

.mode-3d .story { background: none; padding-top: 30vh; }
.mode-3d .story-head { margin-bottom: 30vh; }
.mode-3d .prologue { min-height: 150svh; margin: 0; }
.mode-3d .prologue-card, .mode-3d .chapter-card { position: sticky; top: calc(var(--header-h) + 18px); max-width: 440px; }
.mode-3d .prologue-card { max-width: 560px; grid-template-columns: 120px 1fr; }
.mode-3d .prologue-baron img { width: 120px; }
.mode-3d .chapters { gap: 0; }
.mode-3d .chapter { display: block; min-height: 175svh; }
.mode-3d .chapter:last-child { min-height: 190svh; }
.mode-3d .chapter-media { display: none; }
.mode-3d .trailer-cta { background: linear-gradient(180deg, rgba(12, 12, 12, 0), var(--mud-900) 140px), var(--grain); padding-top: 160px; }
@media (max-width: 959px) {
  .mode-3d .hero-copy { margin-top: 0; }
  .mode-3d .hero-logo { width: min(340px, 78%); }
  .mode-3d .hook { font-size: 1.2rem; margin-top: 4px; }
  .mode-3d .hero-meta { display: none; }
  .mode-3d .hero .cta-row { gap: 10px; }
  .mode-3d .hero .btn-lg { min-height: 50px; font-size: 1.05rem; }
  .mode-3d .hero-hint { position: fixed; left: 0; right: 0; bottom: 14px; margin: 0; }
  .mode-3d .prologue-card, .mode-3d .chapter-card { top: auto; max-width: none; }
  .mode-3d .chapter-card { position: sticky; top: calc(100svh - 250px); padding: 18px 18px 4px; }
  .mode-3d .chapter-card h3 { font-size: 1.9rem; }
  .mode-3d .chapter-card p { font-size: 1rem; }
  .mode-3d .prologue-card { position: sticky; top: calc(100svh - 300px); grid-template-columns: 72px 1fr; padding: 16px 16px 4px; gap: 14px; }
  .mode-3d .prologue-baron img { width: 72px; }
  .mode-3d .prologue .lead { font-size: 1.02rem; }
  .mode-3d .prologue p { font-size: .98rem; }
}
@media (min-width: 960px) {
  .mode-3d .hero { display: flex; align-items: center; }
  .mode-3d .hero-inner { grid-template-columns: minmax(0, 440px) 1fr; }
  .mode-3d .prologue-card, .mode-3d .chapter-card { top: calc(var(--header-h) + 14vh); }
}

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