/* ═══════════════════════════════════════════════════════════════
   MythCraft - landing page
   "Olympus Day" theme, ported 1:1 from the app's Theme.swift:
   Aegean sky blues · ink-navy outlines · hard slab shadows ·
   sun-gold CTAs · Lilita One display / Nunito body.
   Sticker rules: outlines always ink, shadows are hard slabs
   (zero blur), gold = meaning not wallpaper.
   ═══════════════════════════════════════════════════════════════ */

:root {
  /* Palette - mirrors Myth.* tokens in the app */
  --aegean-900: #16337a;
  --aegean-700: #2557d6;
  --aegean-500: #3d8bff;
  --aegean-300: #7cc4ff;
  --sky-top:    #8fd0ff;

  --ink-900: #1b2340;
  --ink-700: #2a3357;
  --ink-500: #3e4a78;

  --marble-100: #ffffff;
  --marble-300: #f1f5ff;
  --marble-500: #d9e4f8;

  --sun-500: #ffb800;
  --sun-300: #ffd84d;
  --sun-100: #fff0b8;

  --coral:  #ff4f5e;
  --purple: #a855f7;
  --bolt:   #3be0ff;
  --laurel: #58cc02;
  --steel:  #8fa3c8;

  --text-ink:     var(--ink-900);
  --text-ink-2nd: #6b7ba3;

  --font-display: "Lilita One", "Arial Black", sans-serif;
  --font-body: "Nunito", -apple-system, sans-serif;

  --container: 1120px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--text-ink);
  background: var(--marble-300);
  overflow-x: hidden;
}

::selection {
  background: var(--sun-300);
  color: var(--ink-900);
}

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

.section-title, .hero-tagline { text-wrap: balance; }

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

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ─────────────── Type treatments ─────────────── */

.slab-text {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.5px;
  -webkit-text-stroke: 0;
}

.section-eyebrow {
  font-family: var(--font-body);
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 4px;
  color: var(--aegean-700);
  margin-bottom: 14px;
}
.section-eyebrow.gold { color: var(--sun-500); }
.section-eyebrow.centered { text-align: center; }

.section-title {
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.04;
  color: var(--ink-900);
  text-shadow: 0 3px 0 rgba(27, 35, 64, 0.14);
  margin-bottom: 20px;
}
.section-title.light {
  color: var(--marble-100);
  text-shadow:
    -2px -2px 0 var(--ink-900), 2px -2px 0 var(--ink-900),
    -2px  2px 0 var(--ink-900), 2px  2px 0 var(--ink-900),
    0 5px 0 var(--ink-900);
}
.section-title.centered { text-align: center; }

.section-lede {
  font-size: 19px;
  line-height: 1.6;
  color: var(--text-ink-2nd);
  max-width: 640px;
  margin-bottom: 44px;
}
.section-lede.light { color: var(--marble-500); }
.section-lede.centered { margin-left: auto; margin-right: auto; text-align: center; }
.section-lede em { font-style: italic; font-weight: 800; color: var(--ink-700); }
.section-lede.light em { color: var(--sun-300); }

/* Arc title - the box-art logotype curve. Glyph sweep (rotation + lift on a
   shared circle) is computed by JS from measured font metrics, mirroring the
   game's MythArcTitle. Vertical padding gives the crest and the dropped ends
   room, since transforms don't affect layout. */
.arc-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(52px, 9vw, 104px);
  line-height: 1;
  color: var(--sun-300);
  display: flex;
  justify-content: center;
  padding: 0.34em 0 0.38em;
  user-select: none;
}
.arc-title span {
  display: inline-block;
  transform-origin: center;
  text-shadow:
    -3px -3px 0 var(--ink-900), 3px -3px 0 var(--ink-900),
    -3px  3px 0 var(--ink-900), 3px  3px 0 var(--ink-900),
    -3px  0   0 var(--ink-900), 3px  0   0 var(--ink-900),
     0   -3px 0 var(--ink-900), 0    3px 0 var(--ink-900),
     0    7px 0 var(--ink-900);
}

/* ─────────────── Buttons - sticker construction ─────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  text-decoration: none;
  border-radius: 20px;
  border: 3px solid var(--ink-900);
  box-shadow: 0 5px 0 var(--ink-900);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 7px 0 var(--ink-900); }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--ink-900); }

.btn-gold {
  background: linear-gradient(180deg, var(--sun-300), #f5a800);
  color: var(--ink-900);
}
.btn-ghost {
  background: linear-gradient(180deg, var(--ink-500), var(--ink-700));
  color: var(--marble-100);
}

.btn-big {
  font-size: 21px;
  padding: 14px 30px;
  border-radius: 22px;
}
.btn-big small {
  display: block;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 1px;
  opacity: 0.75;
}
.btn-small {
  font-size: 15px;
  padding: 9px 20px;
  border-width: 2.5px;
  box-shadow: 0 3.5px 0 var(--ink-900);
}

/* App Store badge - the canonical black store badge, rebuilt with the
   sticker construction: ink face, gold rim light, hard slab shadow. */
.btn-store {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  height: 66px;
  padding: 0 26px 0 20px;
  background: linear-gradient(180deg, #262f52, var(--ink-900));
  border: 3px solid var(--ink-900);
  border-radius: 18px;
  box-shadow:
    inset 0 1.5px 0 rgba(255, 216, 77, 0.45),
    0 5px 0 var(--ink-900);
  text-decoration: none;
  color: var(--marble-100);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}
.btn-store:hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 1.5px 0 rgba(255, 216, 77, 0.45),
    0 7px 0 var(--ink-900);
}
.btn-store:active {
  transform: translateY(3px);
  box-shadow:
    inset 0 1.5px 0 rgba(255, 216, 77, 0.45),
    0 2px 0 var(--ink-900);
}
.btn-store-logo {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
}
.btn-store-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1;
}
.btn-store-text small {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 10.5px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--sun-300);
  margin-bottom: 4px;
}
.btn-store-text strong {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 24px;
  letter-spacing: 0.4px;
  color: var(--marble-100);
}

/* ─────────────── Nav ─────────────── */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  padding: 14px 0;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
.nav.scrolled {
  background: rgba(27, 35, 64, 0.92);
  backdrop-filter: blur(12px);
  box-shadow: 0 3px 0 rgba(255, 216, 77, 0.35);
}
.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--sun-300);
  text-shadow:
    -1.5px -1.5px 0 var(--ink-900), 1.5px -1.5px 0 var(--ink-900),
    -1.5px  1.5px 0 var(--ink-900), 1.5px  1.5px 0 var(--ink-900);
}
.nav-logo img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 2.5px solid var(--ink-900);
  box-shadow: 0 3px 0 var(--ink-900);
}
.nav-links {
  display: flex;
  gap: 22px;
  margin-left: auto;
}
.nav-links a {
  font-weight: 900;
  font-size: 15px;
  text-decoration: none;
  color: var(--marble-100);
  text-shadow: 0 1.5px 0 rgba(27, 35, 64, 0.6);
  transition: color 0.15s ease;
}
.nav-links a:hover { color: var(--sun-300); }

/* Language switcher + CTA cluster */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.lang-select {
  appearance: none;
  -webkit-appearance: none;
  font-family: var(--font-body);
  font-weight: 900;
  font-size: 13px;
  color: var(--marble-100);
  background: rgba(27, 35, 64, 0.6);
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  padding: 7px 26px 7px 12px;
  cursor: pointer;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23ffd84d' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}
.lang-select:hover { border-color: var(--sun-300); }
.lang-select option { color: var(--ink-900); }

/* ─────────────── Hero ─────────────── */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
}
/* Landscape key art on desktop; the original portrait title art on phones,
   where its 9:19 framing is exactly right. */
.hero-art {
  position: absolute;
  inset: 0;
  background: url("../assets/art/hero-wide.jpg") center 30% / cover no-repeat;
}
@media (max-aspect-ratio: 4/5) {
  .hero-art {
    background: url("../assets/art/title-hero.jpg") center 20% / cover no-repeat;
  }
}
/* Slow Ken Burns drift - barely perceptible, keeps the sky alive. */
@media (prefers-reduced-motion: no-preference) {
  .hero-art {
    animation: hero-drift 26s ease-in-out infinite alternate;
  }
  @keyframes hero-drift {
    from { transform: scale(1); }
    to { transform: scale(1.06); }
  }
}
.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(27, 35, 64, 0.35) 0%,
    transparent 30%,
    transparent 55%,
    rgba(27, 35, 64, 0.78) 100%
  );
}

.float-chip {
  position: absolute;
  width: clamp(64px, 8vw, 116px);
  filter: drop-shadow(0 6px 0 rgba(27, 35, 64, 0.35));
  animation: bob 5s ease-in-out infinite;
  z-index: 2;
}
/* Kept to the open left sky - Zeus owns the right of the key art. */
.fc-1 { top: 15%; left: 7%; animation-delay: 0s; rotate: -12deg; }
.fc-2 { top: 38%; left: 13%; animation-delay: -1.6s; rotate: 10deg; width: clamp(48px, 5.5vw, 84px); }
.fc-3 { top: 62%; left: 5%; animation-delay: -3.1s; rotate: 8deg; width: clamp(52px, 6vw, 90px); }
.fc-4 { top: 76%; right: 4%; animation-delay: -2.2s; rotate: -8deg; width: clamp(56px, 7vw, 100px); }

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-16px); }
}

.hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  padding: 0 24px 9svh;
  max-width: 780px;
}
.hero-eyebrow {
  font-weight: 900;
  font-size: 14px;
  letter-spacing: 5px;
  color: var(--sun-100);
  text-shadow: 0 2px 0 rgba(27, 35, 64, 0.7);
  margin-bottom: 6px;
}
.hero-sub {
  font-size: clamp(19px, 2.6vw, 28px);
  color: var(--sun-300);
  letter-spacing: 2px;
  text-shadow:
    -2px -2px 0 var(--ink-900), 2px -2px 0 var(--ink-900),
    -2px  2px 0 var(--ink-900), 2px  2px 0 var(--ink-900),
    0 4px 0 var(--ink-900);
  margin: -6px 0 22px; /* tucked closer under the arc title, matching the app */
}
.hero-tagline {
  font-size: clamp(17px, 2vw, 21px);
  font-weight: 800;
  line-height: 1.55;
  color: var(--marble-100);
  text-shadow: 0 2px 0 rgba(27, 35, 64, 0.65);
  margin-bottom: 30px;
}
.hero-ctas {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.hero-fineprint {
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: var(--marble-500);
  text-shadow: 0 1.5px 0 rgba(27, 35, 64, 0.7);
}

/* Greek-key band closing the hero - the app's GreekKeyBand cornice */
.hero-wave {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 26px;
  z-index: 4;
  background-color: var(--ink-900);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='26' viewBox='0 0 36 26'%3E%3Cpath d='M0 18 h9 v-10 h9 v10 h9 v-10 h9' fill='none' stroke='%23ffd84d' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  border-top: 3px solid var(--ink-900);
  box-shadow: inset 0 -2px 0 rgba(255, 184, 0, 0.9);
}

/* ─────────────── Pitch section ─────────────── */

.pitch {
  padding: 110px 0 90px;
  background:
    radial-gradient(1000px 500px at 85% -10%, rgba(124, 196, 255, 0.35), transparent 65%),
    var(--marble-300);
}

.combine-strip {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 0 0 64px;
}
.combine-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.mini-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(180deg, var(--marble-100), #e9f0fc);
  border: 2.5px solid var(--ink-900);
  border-radius: 16px;
  box-shadow: 0 4px 0 var(--ink-900);
  padding: 8px 18px 8px 10px;
  font-weight: 900;
  font-size: 17px;
}
.mini-chip img { width: 44px; height: 44px; }
.mini-chip.is-result {
  background: linear-gradient(180deg, var(--sun-100), var(--sun-300));
}
.mini-chip.is-pivotal {
  background: linear-gradient(180deg, #ffe9a8, var(--sun-500));
  animation: pivotal-pulse 2.2s ease-in-out infinite;
}
/* The unanswered combine - a glowing question mark instead of a spoiler. */
.mini-chip.is-mystery {
  background: linear-gradient(180deg, var(--ink-500), var(--ink-700));
  color: var(--sun-300);
  animation: pivotal-pulse 2.2s ease-in-out infinite;
}
.mystery-mark {
  font-family: var(--font-display);
  font-size: 30px;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--sun-300);
  text-shadow: 0 0 12px rgba(255, 216, 77, 0.7), 0 2.5px 0 rgba(0, 0, 0, 0.5);
}
@keyframes pivotal-pulse {
  0%, 100% { box-shadow: 0 4px 0 var(--ink-900), 0 0 0 0 rgba(255, 184, 0, 0.55); }
  50% { box-shadow: 0 4px 0 var(--ink-900), 0 0 0 12px rgba(255, 184, 0, 0); }
}
.combine-plus, .combine-eq {
  font-family: var(--font-display);
  font-size: 26px;
  color: var(--aegean-700);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 26px;
}
.feature-card {
  background: linear-gradient(180deg, var(--marble-100), #e9f0fc);
  border: 3px solid var(--ink-900);
  border-radius: 24px;
  box-shadow: 0 6px 0 var(--ink-900);
  padding: 30px 26px 26px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 0 var(--ink-900);
}
.feature-chip {
  width: 84px;
  height: 84px;
  margin-bottom: 16px;
  filter: drop-shadow(0 4px 0 rgba(27, 35, 64, 0.25));
}
.feature-card h3 {
  font-size: 21px;
  color: var(--ink-900);
  margin-bottom: 10px;
}
.feature-card p {
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--text-ink-2nd);
}
.feature-card em { font-style: italic; font-weight: 800; }

/* ─────────────── Oracle demo ─────────────── */

.oracle {
  position: relative;
  padding: 110px 0;
  background:
    radial-gradient(900px 460px at 15% 0%, rgba(61, 139, 255, 0.4), transparent 60%),
    linear-gradient(180deg, var(--ink-900), #142051 55%, var(--aegean-900));
  overflow: hidden;
}

.oracle-board {
  background: rgba(27, 35, 64, 0.55);
  border: 3px solid rgba(255, 216, 77, 0.55);
  border-radius: 28px;
  box-shadow: 0 7px 0 rgba(0, 0, 0, 0.4);
  padding: 40px 32px 32px;
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
}

.oracle-slots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.oracle-slot, .oracle-result {
  width: 112px;
  height: 112px;
  border-radius: 22px;
  border: 3px dashed rgba(255, 216, 77, 0.5);
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.oracle-slot.filled, .oracle-result.filled {
  border-style: solid;
  border-color: var(--sun-300);
  background: rgba(255, 216, 77, 0.12);
}
.oracle-result.blocked {
  border-color: var(--coral);
  background: rgba(255, 79, 94, 0.12);
}
.oracle-slot img, .oracle-result img { width: 74px; height: 74px; }
.oracle-slot b, .oracle-result b {
  font-size: 12px;
  font-weight: 900;
  color: var(--marble-100);
}
.slot-hint {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--steel);
  padding: 0 8px;
}
.oracle-result .slot-hint { font-family: var(--font-display); font-size: 34px; color: var(--sun-300); }
.oracle-plus, .oracle-eq {
  font-family: var(--font-display);
  font-size: 34px;
  color: var(--sun-300);
  text-shadow: 0 3px 0 var(--ink-900);
}

.oracle-verdict {
  min-height: 48px;
  font-size: 16.5px;
  font-weight: 800;
  font-style: italic;
  color: var(--marble-500);
  max-width: 560px;
  margin: 0 auto 24px;
  line-height: 1.5;
}
.oracle-verdict.success { color: var(--sun-300); }
.oracle-verdict.blocked { color: #ff8d97; }

.oracle-rack {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 22px;
}
.rack-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(180deg, var(--marble-100), #e9f0fc);
  border: 2.5px solid var(--ink-900);
  border-radius: 14px;
  box-shadow: 0 3.5px 0 var(--ink-900);
  padding: 6px 14px 6px 8px;
  font-family: var(--font-body);
  font-weight: 900;
  font-size: 14.5px;
  color: var(--ink-900);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
}
.rack-chip img { width: 34px; height: 34px; }
.rack-chip:hover { transform: translateY(-2px); box-shadow: 0 5.5px 0 var(--ink-900); }
.rack-chip:active { transform: translateY(2px); box-shadow: 0 1.5px 0 var(--ink-900); }
.rack-chip.used { opacity: 0.35; pointer-events: none; }
.rack-chip.unlocked {
  background: linear-gradient(180deg, var(--sun-100), var(--sun-300));
  animation: chip-land 0.45s cubic-bezier(0.25, 1.6, 0.5, 1);
}
@keyframes chip-land {
  0% { transform: scale(0.2); }
  100% { transform: scale(1); }
}

.oracle-reset { font-family: var(--font-body); font-weight: 900; }

/* Clash overlay - the web nod to ArchonClashView */
.clash-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: radial-gradient(ellipse at center, #2a3357 0%, #10162e 70%);
  display: none;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.clash-overlay.active { display: flex; }
.clash-left, .clash-right {
  position: absolute;
  width: clamp(140px, 24vw, 280px);
  top: 50%;
  filter: drop-shadow(0 10px 0 rgba(0, 0, 0, 0.5));
}
.clash-left { left: 50%; transform: translate(-260%, -50%); animation: clash-in-left 1.15s cubic-bezier(0.6, 0, 0.9, 0.4) forwards; }
.clash-right { left: 50%; transform: translate(160%, -50%) scaleX(-1); animation: clash-in-right 1.15s cubic-bezier(0.6, 0, 0.9, 0.4) forwards; }
@keyframes clash-in-left {
  0% { transform: translate(-260%, -50%) rotate(-8deg); }
  55% { transform: translate(-150%, -50%) rotate(-4deg); }
  70% { transform: translate(-150%, -50%) rotate(-4deg) translateX(-6px); }
  80% { transform: translate(-150%, -50%) rotate(-4deg) translateX(6px); }
  100% { transform: translate(-58%, -50%) rotate(4deg); }
}
@keyframes clash-in-right {
  0% { transform: translate(160%, -50%) rotate(8deg) scaleX(-1); }
  55% { transform: translate(50%, -50%) rotate(4deg) scaleX(-1); }
  70% { transform: translate(50%, -50%) rotate(4deg) scaleX(-1) translateX(-6px); }
  80% { transform: translate(50%, -50%) rotate(4deg) scaleX(-1) translateX(6px); }
  100% { transform: translate(-42%, -50%) rotate(-4deg) scaleX(-1); }
}
.clash-flash {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, #fff 0%, var(--sun-300) 30%, transparent 70%);
  opacity: 0;
  animation: clash-flash 0.5s ease-out 1.1s both;
}
@keyframes clash-flash {
  0% { opacity: 0; transform: scale(0.2); }
  25% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.6); }
}
.clash-title {
  position: relative;
  font-size: clamp(44px, 9vw, 110px);
  color: var(--sun-300);
  text-shadow:
    -3px -3px 0 var(--ink-900), 3px -3px 0 var(--ink-900),
    -3px  3px 0 var(--ink-900), 3px  3px 0 var(--ink-900),
    0 8px 0 var(--ink-900);
  opacity: 0;
  animation: clash-title 0.55s cubic-bezier(0.2, 1.4, 0.4, 1) 1.25s both;
}
@keyframes clash-title {
  0% { opacity: 0; transform: scale(2.6); }
  100% { opacity: 1; transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .clash-left, .clash-right { animation: none; opacity: 0; }
  .clash-flash { animation: none; opacity: 0.5; }
  .clash-title { animation: none; opacity: 1; transform: none; }
  .float-chip { animation: none; }
}

/* ─────────────── Books ─────────────── */

.books {
  padding: 110px 0 100px;
  background:
    radial-gradient(900px 480px at 10% 100%, rgba(255, 216, 77, 0.22), transparent 60%),
    var(--marble-300);
}
.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 26px;
}
.book-card {
  border: 3px solid var(--ink-900);
  border-radius: 24px;
  box-shadow: 0 6px 0 var(--ink-900);
  padding: 28px 24px 26px;
  color: var(--marble-100);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.book-card:hover { transform: translateY(-5px); box-shadow: 0 11px 0 var(--ink-900); }
.book-1 { background: linear-gradient(165deg, var(--aegean-500), var(--aegean-900)); }
.book-2 { background: linear-gradient(165deg, #d6544f, #7c1f2e); }
.book-3 { background: linear-gradient(165deg, #7b5fd0, #2c1e5e); }
.book-4 { background: linear-gradient(165deg, #e0912f, #8a4110); }

.book-chips {
  display: flex;
  margin-bottom: 18px;
}
.book-chips img {
  width: 62px;
  height: 62px;
  filter: drop-shadow(0 4px 0 rgba(27, 35, 64, 0.4));
}
.book-chips img + img { margin-left: -14px; }
.book-number {
  font-weight: 900;
  font-size: 12px;
  letter-spacing: 3px;
  opacity: 0.85;
  margin-bottom: 6px;
}
.book-card h3 {
  font-size: 24px;
  margin-bottom: 10px;
  text-shadow: 0 3px 0 rgba(27, 35, 64, 0.45);
}
.book-card p {
  font-size: 15px;
  line-height: 1.6;
  opacity: 0.92;
}

/* ─────────────── Codex marquee ─────────────── */

.codex {
  padding: 110px 0 90px;
  background: linear-gradient(180deg, var(--aegean-900), var(--ink-900));
  overflow: hidden;
}
.codex .section-eyebrow, .codex .section-title, .codex .section-lede { padding: 0 24px; }
.codex .section-lede { margin-bottom: 50px; }

.codex .marquee-window {
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  overflow: hidden;
}
.marquee {
  display: flex;
  gap: 26px;
  width: max-content;
  padding: 10px 0;
  animation: marquee-scroll 46s linear infinite;
}
.marquee-reverse { animation-direction: reverse; animation-duration: 54s; }
.marquee:hover { animation-play-state: paused; }
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.marquee img {
  width: 96px;
  height: 96px;
  cursor: pointer;
  filter: drop-shadow(0 5px 0 rgba(0, 0, 0, 0.35));
  transition: transform 0.18s ease;
}
.marquee img:hover { transform: scale(1.18) rotate(-4deg); }
/* Reduced motion: each row holds still as a single strip under the edge mask
   (wrapping left orphaned chips and showed the looped duplicates). */
@media (prefers-reduced-motion: reduce) {
  .marquee { animation: none; }
}

.codex-card {
  display: flex;
  align-items: center;
  gap: 20px;
  max-width: 620px;
  margin: 44px auto 0;
  background: linear-gradient(180deg, var(--marble-100), #e9f0fc);
  border: 3px solid var(--ink-900);
  border-radius: 22px;
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.45);
  padding: 20px 26px;
  transition: opacity 0.2s ease;
}
.codex-card img { width: 88px; height: 88px; flex-shrink: 0; }
.codex-card h4 { font-size: 22px; color: var(--ink-900); margin-bottom: 4px; }
.codex-card p { font-size: 15.5px; line-height: 1.5; color: var(--text-ink-2nd); font-style: italic; }

/* ─────────────── Promises ─────────────── */

.promises {
  padding: 90px 0;
  background: var(--marble-300);
}
.promises-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 40px;
}
.promise { text-align: center; }
.promise-art {
  width: 96px;
  height: 96px;
  margin: 0 auto 16px;
  filter: drop-shadow(0 5px 0 rgba(27, 35, 64, 0.22));
}
.promise h3 { font-size: 20px; color: var(--ink-900); margin-bottom: 10px; }
.promise p { font-size: 15.5px; line-height: 1.6; color: var(--text-ink-2nd); }

/* ─────────────── Finale ─────────────── */

.finale {
  position: relative;
  padding: 130px 24px;
  text-align: center;
  overflow: hidden;
}
.finale-art {
  position: absolute;
  inset: 0;
  background: url("../assets/art/horizon-3.jpg") center 65% / cover no-repeat;
}
.finale-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 39, 133, 0.55), rgba(27, 35, 64, 0.25) 45%, rgba(27, 35, 64, 0.6));
}
.finale-content { position: relative; z-index: 2; }
/* Straight logotype treatment - same slab construction as the game's
   MythTitle, no arc, no slant. */
.finale-title {
  font-size: clamp(40px, 6.5vw, 76px);
  color: var(--sun-300);
  text-shadow:
    -3px -3px 0 var(--ink-900), 3px -3px 0 var(--ink-900),
    -3px  3px 0 var(--ink-900), 3px  3px 0 var(--ink-900),
    -3px  0   0 var(--ink-900), 3px  0   0 var(--ink-900),
     0   -3px 0 var(--ink-900), 0    3px 0 var(--ink-900),
     0    6px 0 var(--ink-900);
  letter-spacing: 1px;
}
.finale-copy {
  font-size: 19px;
  font-weight: 800;
  color: var(--marble-100);
  text-shadow: 0 2px 0 rgba(27, 35, 64, 0.7);
  margin: 18px 0 30px;
}
.finale-note {
  margin-top: 18px;
  font-size: 13.5px;
  font-weight: 800;
  color: var(--marble-500);
  text-shadow: 0 1.5px 0 rgba(27, 35, 64, 0.7);
}

/* ─────────────── Footer ─────────────── */

.footer {
  background: var(--ink-900);
  padding: 44px 0;
  border-top: 3px solid var(--sun-500);
}
.footer-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 19px;
  color: var(--sun-300);
}
.footer-brand img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 2px solid rgba(255, 216, 77, 0.5);
}
.footer-legal {
  font-size: 13px;
  line-height: 1.6;
  color: var(--steel);
  flex: 1;
  min-width: 260px;
}
.footer-links { display: flex; gap: 18px; }
.footer-links a {
  font-size: 14px;
  font-weight: 900;
  color: var(--marble-500);
  text-decoration: none;
}
.footer-links a:hover { color: var(--sun-300); }

/* ─────────────── Scroll reveal ─────────────── */

[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.8, 0.3, 1);
}
[data-reveal].revealed { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* ─────────────── Responsive ─────────────── */

@media (max-width: 720px) {
  .nav-links { display: none; }
  /* the hidden links used to push the actions right */
  .nav-inner { gap: 12px; }
  .nav-actions { margin-left: auto; gap: 8px; }
  .float-chip { display: none; }
  .oracle-slots { gap: 10px; }
  .oracle-slot, .oracle-result { width: 88px; height: 88px; }
  .oracle-slot img, .oracle-result img { width: 56px; height: 56px; }
  .footer-inner { flex-direction: column; text-align: center; }
}

/* Phones: the icon stands in for the wordmark (the hero's logotype sits right
   below), so language and CTA fit in every locale. */
.nav-logo { flex-shrink: 0; }
@media (max-width: 430px) {
  .nav-inner { padding: 0 16px; }
  .nav-logo span { display: none; }
}

/* ─────────────── Privacy + support pages ─────────────── */

.legal { padding: 150px 24px 100px; }
.legal-inner { max-width: 760px; margin: 0 auto; }
.legal .section-title { font-size: clamp(34px, 6vw, 52px); }
.legal-updated { font-weight: 800; font-size: 14px; color: var(--text-ink-2nd); margin: -6px 0 18px; }
.legal .section-lede { max-width: none; margin-bottom: 40px; }
.legal h2 { font-size: 22px; color: var(--ink-900); margin-bottom: 12px; }
.legal p, .legal li { font-size: 16.5px; line-height: 1.65; color: var(--ink-700); }
.legal p + p { margin-top: 12px; }
.legal a:not(.btn) { color: var(--aegean-700); font-weight: 800; }
.legal-section { padding: 28px 0; border-top: 2px solid var(--marble-500); }
.legal-promises, .legal-contact {
  background: var(--marble-100);
  border: 2.5px solid var(--ink-900);
  border-radius: 22px;
  box-shadow: 0 5px 0 var(--ink-900);
  padding: 26px 28px;
  margin-bottom: 40px;
}
.legal-promises ul { list-style: none; display: grid; gap: 8px; }
.legal-promises li { padding-left: 28px; position: relative; }
.legal-promises li::before { content: "✦"; position: absolute; left: 4px; color: var(--sun-500); }
.legal-contact { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.legal-contact h2 { margin-bottom: 4px; }
.legal-faq-title { margin-bottom: 16px; }
.legal-faq { border-top: 2px solid var(--marble-500); padding: 18px 0; }
.legal-faq:last-of-type { border-bottom: 2px solid var(--marble-500); }
.legal-faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-weight: 900;
  font-size: 18px;
  color: var(--ink-900);
}
.legal-faq summary::-webkit-details-marker { display: none; }
.legal-faq summary::after { content: "+"; color: var(--aegean-700); font-size: 22px; line-height: 1; }
.legal-faq[open] summary::after { content: "−"; }
.legal-faq p { margin-top: 10px; }
.legal-note { margin-top: 32px; }
.nav-links a[aria-current="page"] { color: var(--sun-300); }
