:root {
  --ink: #171713;
  --paper: #eee8da;
  --paper-2: #e1dacb;
  --cream: #f7f2e7;
  --gold: #c6a761;
  --gold-light: #e1ca8d;
  --muted: #aaa18f;
  --line: rgba(198, 167, 97, .28);
  --max: 1220px;
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--sans);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
::selection { background: var(--gold); color: #111; }

.skip-link {
  position: fixed; top: 10px; left: 10px; z-index: 1000;
  transform: translateY(-150%); padding: 10px 14px;
  background: var(--cream); color: #111; text-decoration: none;
}
.skip-link:focus { transform: none; }

.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: 82px; padding: 0 clamp(22px, 4vw, 68px);
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid transparent;
  transition: background .25s ease, border-color .25s ease, height .25s ease;
}
.site-header.scrolled {
  height: 68px;
  background: rgba(13, 13, 11, .94);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.brand {
  display: inline-flex; align-items: center; gap: 12px;
  text-decoration: none; letter-spacing: .14em;
}
.brand-mark {
  width: 31px;
  height: 43px;
  object-fit: contain;
  flex: 0 0 auto;
  display: block;
}
.brand strong { display: block; font-family: var(--serif); font-size: 17px; font-weight: 500; letter-spacing: .22em; }
.brand small { display: block; margin-top: 2px; color: #bbb19e; font-size: 8px; letter-spacing: .24em; }
.main-nav { display: flex; align-items: center; gap: 28px; }
.main-nav a { color: #ddd6c8; font-size: 12px; text-decoration: none; letter-spacing: .1em; text-transform: uppercase; }
.main-nav a:hover { color: var(--gold-light); }
.nav-cta { padding: 10px 16px; border: 1px solid rgba(225,202,141,.55); }
.nav-toggle { display: none; }

.hero {
  position: relative; min-height: 94vh; min-height: 720px;
  display: grid; align-items: center; overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 52% 50%; transform: scale(1.025); }
.hero-shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(8,8,7,.9) 0%, rgba(8,8,7,.66) 35%, rgba(8,8,7,.16) 68%, rgba(8,8,7,.28) 100%),
    linear-gradient(0deg, rgba(8,8,7,.73) 0%, transparent 38%);
}
.hero-grain { position: absolute; inset: 0; opacity: .16; pointer-events: none; background-image: radial-gradient(rgba(255,255,255,.22) .5px, transparent .6px); background-size: 6px 6px; mix-blend-mode: soft-light; }
.hero-content {
  position: relative; z-index: 2; width: min(780px, 82vw);
  margin-left: max(6vw, calc((100vw - var(--max)) / 2));
  padding-top: 70px;
}
.eyebrow { margin: 0 0 18px; color: var(--gold-light); font-size: 11px; font-weight: 700; letter-spacing: .28em; text-transform: uppercase; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; }
h1 { margin: 0; font-size: clamp(54px, 7.4vw, 108px); line-height: .93; letter-spacing: -.035em; text-wrap: balance; }
h1 em { color: var(--gold-light); font-weight: 400; }
.hero-copy { max-width: 650px; margin: 30px 0 0; color: #e5ddce; font-size: clamp(17px, 1.5vw, 21px); line-height: 1.65; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.button { min-height: 48px; padding: 14px 21px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; cursor: pointer; font: 700 11px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; text-decoration: none; transition: .2s ease; }
.button-primary { background: var(--gold); color: #171510; border-color: var(--gold); }
.button-primary:hover { background: var(--gold-light); border-color: var(--gold-light); transform: translateY(-1px); }
.button-ghost { background: rgba(10,10,8,.25); color: var(--cream); border-color: rgba(242,230,199,.42); backdrop-filter: blur(8px); }
.button-ghost:hover { border-color: var(--gold-light); color: var(--gold-light); }
.hero-meta {
  position: absolute; z-index: 2; left: max(6vw, calc((100vw - var(--max)) / 2)); right: max(6vw, calc((100vw - var(--max)) / 2)); bottom: 28px;
  display: flex; gap: 28px; padding-top: 18px; border-top: 1px solid rgba(225,202,141,.25);
  color: #c3baaa; font-size: 10px; letter-spacing: .15em; text-transform: uppercase;
}

.section { padding: 120px max(6vw, calc((100vw - var(--max)) / 2)); }
.section-heading { max-width: 810px; }
.section-heading h2, .realm h2, .wonder-copy h2, .chronicle-copy h2, .playtest h2 { margin: 0; font-size: clamp(42px, 5.2vw, 78px); line-height: 1.02; letter-spacing: -.025em; }
.section-heading > p:last-child { max-width: 740px; margin-top: 26px; color: #756e61; font-size: 18px; }
.intro { background: var(--paper); color: var(--ink); }
.intro .eyebrow, .factions .eyebrow, .chronicle .eyebrow { color: #8f7438; }
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 76px; background: rgba(34,28,18,.14); border: 1px solid rgba(34,28,18,.14); }
.pillar { min-height: 320px; padding: 34px; background: var(--paper); }
.pillar-num { color: #9a7c3d; font-family: var(--serif); font-size: 14px; }
.pillar h3 { margin: 68px 0 14px; font-size: 32px; }
.pillar p { margin: 0; color: #766e60; }

.section-dark { background: #11110f; }
.realm { position: relative; min-height: 760px; display: grid; grid-template-columns: 1fr 1.08fr; align-items: center; gap: 70px; overflow: hidden; }
.realm-map-wrap { position: absolute; inset: 0 51% 0 0; overflow: hidden; border-right: 1px solid var(--line); }
.realm-map { width: 100%; height: 100%; object-fit: cover; filter: sepia(.28) contrast(1.08) brightness(.68); transform: scale(1.05); }
.realm-map-wrap::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 55%, #11110f 100%); }
.realm-copy { grid-column: 2; position: relative; z-index: 2; padding-left: 20px; }
.realm-copy > p:nth-of-type(2) { max-width: 590px; color: #b9b0a0; font-size: 17px; }
.year-cycle { margin-top: 42px; border-top: 1px solid var(--line); }
.year-cycle > div { display: grid; grid-template-columns: 50px 150px 1fr; align-items: baseline; gap: 14px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.year-cycle span { color: #75694f; font-family: var(--serif); }
.year-cycle strong { color: var(--gold-light); font-family: var(--serif); font-size: 20px; font-weight: 400; }
.year-cycle small { color: #8f8778; }

.factions { background: #e8e1d2; color: var(--ink); overflow: hidden; }
.split-heading { max-width: none; display: grid; grid-template-columns: 1.1fr .9fr; gap: 70px; align-items: end; }
.split-heading > p { margin: 0 0 6px; color: #766e60; font-size: 17px; }
.faction-stage { position: relative; margin-top: 62px; display: flex; align-items: center; gap: 18px; }
.faction-track { width: 100%; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; align-items: center; }
.faction-card { margin: 0; opacity: .48; transform: scale(.94); transition: opacity .25s ease, transform .25s ease, filter .25s ease; filter: saturate(.72); cursor: pointer; }
.faction-card img { width: 100%; border: 1px solid rgba(118,89,42,.28); box-shadow: 0 18px 42px rgba(38,27,10,.12); }
.faction-card:hover, .faction-card.is-active { opacity: 1; filter: none; transform: scale(1); }
.faction-arrow { display: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(48,38,23,.25); background: rgba(255,255,255,.3); font: 30px/1 var(--serif); cursor: pointer; }
.faction-dots { display: none; }

.section-bleed { padding-right: 0; display: grid; grid-template-columns: .75fr 1.35fr; gap: 70px; align-items: center; background: #0d0d0c; }
.wonder-copy { max-width: 470px; }
.wonder-copy p:nth-of-type(2) { color: #a9a08f; }
.text-link { display: inline-flex; gap: 12px; margin-top: 18px; color: var(--gold-light); text-decoration: none; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.text-link span { transition: transform .2s ease; }
.text-link:hover span { transform: translateX(5px); }
.wonder-gallery { min-height: 600px; display: grid; grid-template-columns: 1.2fr .8fr; grid-template-rows: 1fr 1fr; gap: 1px; background: #2d281e; }
.wonder-card { margin: 0; min-height: 280px; overflow: hidden; background: #080807; }
.wonder-card.tall { grid-row: 1 / 3; }
.wonder-card img { width: 100%; height: 100%; object-fit: contain; transition: transform .5s ease; }
.wonder-card:hover img { transform: scale(1.03); }

.chronicle { background: var(--paper); color: var(--ink); display: grid; grid-template-columns: .95fr 1.05fr; gap: 85px; align-items: center; }
.chronicle-art { position: relative; min-height: 540px; }
.chronicle-art img { position: absolute; width: 75%; border: 1px solid rgba(80,58,25,.24); box-shadow: 0 26px 60px rgba(46,31,9,.18); }
.chronicle-art img:first-child { left: 0; top: 0; transform: rotate(-3deg); }
.chronicle-art img:last-child { right: 0; bottom: 0; transform: rotate(4deg); }
.chronicle-copy > p:nth-of-type(2) { color: #746b5d; font-size: 17px; }
.future-grid { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 34px; border-top: 1px solid rgba(45,34,18,.2); border-left: 1px solid rgba(45,34,18,.2); }
.future-grid span { padding: 14px 12px; border-right: 1px solid rgba(45,34,18,.2); border-bottom: 1px solid rgba(45,34,18,.2); color: #6f624c; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }

.playtest { position: relative; text-align: center; background: #15140f; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.playtest::before { content: ""; position: absolute; inset: 0; opacity: .08; background-image: url('assets/realm_map.webp'); background-size: cover; background-position: center; filter: grayscale(1); }
.playtest-inner { position: relative; z-index: 1; max-width: 830px; margin: auto; }
.playtest p:nth-of-type(2) { max-width: 630px; margin: 24px auto 30px; color: #aaa18f; }
.prototype-note { min-height: 22px; margin-top: 14px !important; color: var(--gold-light) !important; font-size: 13px; }

.site-footer { padding: 38px max(6vw, calc((100vw - var(--max)) / 2)); display: grid; grid-template-columns: 1fr auto auto; gap: 28px; align-items: center; background: #090908; color: #756f64; font-size: 11px; }
.footer-brand strong { color: #d6cebf; }
.footer-domain { color: var(--gold-light); letter-spacing: .08em; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .65s ease, transform .65s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (max-width: 1000px) {
  .main-nav { gap: 18px; }
  .main-nav a { font-size: 10px; }
  .realm { grid-template-columns: 1fr; padding-top: 460px; }
  .realm-map-wrap { inset: 0 0 auto 0; height: 410px; border-right: 0; border-bottom: 1px solid var(--line); }
  .realm-map-wrap::after { background: linear-gradient(0deg, #11110f 0%, transparent 55%); }
  .realm-copy { grid-column: 1; padding-left: 0; }
  .faction-track { gap: 10px; }
  .section-bleed { grid-template-columns: 1fr; padding-right: max(6vw, calc((100vw - var(--max)) / 2)); }
  .wonder-copy { max-width: 720px; }
  .wonder-gallery { min-height: 480px; }
  .chronicle { grid-template-columns: 1fr; }
  .chronicle-art { min-height: 470px; width: min(720px, 100%); }
}

@media (max-width: 760px) {
  .site-header { height: 68px; padding: 0 20px; }
  .brand-mark { width: 27px; height: 38px; }
  .brand strong { font-size: 15px; }
  .nav-toggle { display: block; border: 1px solid rgba(225,202,141,.38); background: rgba(10,10,8,.35); color: var(--cream); padding: 9px 12px; font: 700 10px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; }
  .main-nav { position: fixed; top: 68px; left: 0; right: 0; display: none; flex-direction: column; align-items: stretch; gap: 0; padding: 14px 20px 24px; background: rgba(10,10,8,.98); border-bottom: 1px solid var(--line); }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 13px 4px; font-size: 11px; border-bottom: 1px solid rgba(225,202,141,.1); }
  .nav-cta { margin-top: 8px; text-align: center; border: 1px solid rgba(225,202,141,.45) !important; }

  .hero { min-height: 760px; align-items: end; }
  .hero-image { object-position: 62% center; }
  .hero-shade { background: linear-gradient(0deg, rgba(7,7,6,.94) 4%, rgba(7,7,6,.63) 48%, rgba(7,7,6,.28) 100%); }
  .hero-content { width: auto; margin: 0; padding: 0 22px 150px; }
  h1 { font-size: clamp(48px, 15vw, 72px); }
  .hero-copy { font-size: 16px; }
  .hero-meta { left: 22px; right: 22px; gap: 14px; flex-wrap: wrap; font-size: 8px; }
  .section { padding: 82px 22px; }
  .section-heading h2, .realm h2, .wonder-copy h2, .chronicle-copy h2, .playtest h2 { font-size: 44px; }
  .pillars { grid-template-columns: 1fr; margin-top: 48px; }
  .pillar { min-height: 240px; }
  .pillar h3 { margin-top: 38px; }
  .realm { padding-top: 380px; }
  .realm-map-wrap { height: 340px; }
  .year-cycle > div { grid-template-columns: 34px 110px 1fr; gap: 8px; }
  .split-heading { grid-template-columns: 1fr; gap: 22px; }

  .faction-stage { gap: 8px; }
  .faction-track { display: block; position: relative; height: min(124vw, 680px); }
  .faction-card { position: absolute; inset: 0; display: none; width: min(560px, 100%); margin: auto; transform: none; opacity: 0; }
  .faction-card.is-active { display: block; opacity: 1; transform: none; }
  .faction-card img { width: 100%; height: 100%; object-fit: contain; }
  .faction-arrow { display: block; flex: 0 0 auto; }
  .faction-dots { display: flex; justify-content: center; gap: 8px; margin-top: 18px; }
  .faction-dots button { width: 7px; height: 7px; border: 0; border-radius: 50%; background: #afa592; padding: 0; cursor: pointer; }
  .faction-dots button.active { background: #7d642f; transform: scale(1.35); }

  .section-bleed { padding-right: 22px; }
  .wonder-gallery { grid-template-columns: 1fr 1fr; min-height: 420px; }
  .wonder-card.tall { grid-row: 1 / 3; }
  .chronicle-art { min-height: 360px; }
  .future-grid { grid-template-columns: repeat(2, 1fr); }
  .site-footer { grid-template-columns: 1fr; gap: 12px; text-align: center; }
  .footer-brand { justify-self: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
