:root {
  color-scheme: dark;
  --ink: #06040a;
  --night: #0c0713;
  --stone: #d8c6a0;
  --gold: #e9bc52;
  --gold-bright: #ffe38c;
  --bronze: #7b4926;
  --cyan: #51e5ff;
  --muted: #a99f90;
  --line: rgba(230, 185, 82, 0.24);
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--ink); }
body { margin: 0; color: #f5efe4; background: radial-gradient(circle at 50% 0%, #1a1020, var(--ink) 38rem); font-family: var(--sans); overflow-x: hidden; }
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 20; opacity: .02; background: repeating-linear-gradient(117deg, transparent 0 3px, rgba(255,255,255,.45) 3px 4px); }
img { max-width: 100%; display: block; }
a { color: inherit; }
.skip-link { position: fixed; z-index: 100; left: 1rem; top: -5rem; background: var(--gold); color: #120903; padding: .8rem 1rem; border-radius: .25rem; font-weight: 700; }
.skip-link:focus { top: 1rem; }

.site-header { position: fixed; inset: 0 0 auto; z-index: 30; height: 84px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 clamp(1.2rem, 4vw, 4.5rem); border-bottom: 1px solid transparent; transition: background .35s, border-color .35s, height .35s; }
.site-header.scrolled { height: 68px; background: rgba(5, 3, 9, .88); border-color: var(--line); backdrop-filter: blur(18px); }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; justify-self: start; }
.brand .brand-emblem { width: 46px; height: auto; filter: drop-shadow(0 0 14px rgba(230, 173, 55, .28)); }
.brand .brand-wordmark { width: 112px; height: auto; filter: drop-shadow(0 5px 12px rgba(0, 0, 0, .55)); }
nav { display: flex; gap: clamp(1.4rem, 3vw, 3.2rem); }
nav a, footer > a { color: #d9d0c1; text-decoration: none; text-transform: uppercase; font-size: .69rem; letter-spacing: .17em; transition: color .2s; }
nav a:hover, nav a:focus-visible, footer > a:hover { color: var(--gold-bright); }
.header-cta { justify-self: end; padding: .72rem 1.1rem; border: 1px solid rgba(232, 188, 82, .55); text-decoration: none; text-transform: uppercase; font-size: .64rem; letter-spacing: .14em; color: var(--gold-bright); background: rgba(40, 22, 10, .35); }

.hero { min-height: 100svh; position: relative; isolation: isolate; display: flex; align-items: center; overflow: hidden; background: #020204; }
.hero-poster, .hero-canvas, .hero-vignette { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-poster img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero-poster { transition: opacity 1.2s ease; }
.hero-poster.loaded { opacity: 0; }
.hero-canvas { z-index: 1; cursor: grab; opacity: 0; transition: opacity 1s ease; touch-action: none; }
.hero-canvas.visible { opacity: 1; }
.hero-canvas:active { cursor: grabbing; }
.hero-vignette { z-index: 2; pointer-events: none; background: linear-gradient(90deg, rgba(2,1,4,.97) 0%, rgba(3,2,6,.78) 28%, rgba(3,2,6,.12) 58%, rgba(2,1,4,.2) 100%), linear-gradient(0deg, #050309 0%, transparent 25%, rgba(1,1,2,.2) 85%, rgba(1,1,2,.7) 100%); }
.hero-content { position: relative; z-index: 3; width: min(720px, 50vw); margin-left: clamp(1.3rem, 7vw, 8.5rem); padding-top: 5rem; }
.hero-wordmark { width: min(360px, 70%); height: auto; margin: 0 0 .8rem; filter: drop-shadow(0 16px 34px rgba(0,0,0,.62)); }
.eyebrow { margin: 0 0 1.1rem; color: var(--gold); font: 600 .72rem/1.4 var(--serif); text-transform: uppercase; letter-spacing: .32em; }
.eyebrow.cyan { color: var(--cyan); }
h1, h2, h3 { font-family: var(--serif); margin: 0; }
h1 { font-size: clamp(3rem, 5vw, 5.6rem); line-height: .94; letter-spacing: -.04em; text-shadow: 0 8px 48px #000; }
h1 em, h2 em { color: var(--gold-bright); font-style: normal; font-weight: 500; }
.hero-copy { width: min(650px, 92%); color: #cfc6b8; font-size: clamp(.96rem, 1.15vw, 1.1rem); line-height: 1.65; margin: 1.25rem 0 1.4rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; }
.image-cta { display: inline-block; line-height: 0; text-decoration: none; transition: transform .2s ease, filter .2s ease, opacity .2s ease; }
.image-cta img { width: 100%; height: auto; }
.image-cta:hover, .image-cta:focus-visible { transform: translateY(-3px) scale(1.01); filter: brightness(1.08) drop-shadow(0 15px 28px rgba(197, 126, 40, .28)); }
.image-cta:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 4px; }
.explore-cta { width: clamp(250px, 27vw, 420px); }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 1.45rem; text-decoration: none; text-transform: uppercase; font: 600 .72rem/1 var(--serif); letter-spacing: .13em; border: 1px solid transparent; transition: transform .2s, box-shadow .2s, background .2s; }
.button:hover, .button:focus-visible { transform: translateY(-2px); }
.button-primary { color: #160c05; background: linear-gradient(135deg, var(--gold-bright), #b36b1d); box-shadow: 0 12px 38px rgba(208, 119, 25, .2); }
.button-primary:hover { box-shadow: 0 16px 48px rgba(232, 153, 45, .34); }
.button-disabled { cursor: default; user-select: none; }
.button-disabled:hover { transform: none; box-shadow: 0 12px 38px rgba(208, 119, 25, .2); }
.button-quiet { color: #e5d7be; border-color: rgba(221, 197, 152, .3); background: rgba(7,4,10,.4); backdrop-filter: blur(8px); }
.button-quiet span { color: var(--cyan); margin-right: .6rem; }
.interaction-hint { margin-top: 1.4rem; color: #7e766c; font-size: .72rem; letter-spacing: .08em; }
.interaction-hint span { color: var(--gold); }
.load-status { position: absolute; z-index: 4; right: 2rem; bottom: 2rem; width: 220px; opacity: .8; transition: opacity .5s; }
.load-status.done { opacity: 0; pointer-events: none; }
.load-status span { display: block; font: 500 .57rem/1 var(--serif); letter-spacing: .18em; text-transform: uppercase; color: #cfc6b7; margin-bottom: .6rem; }
.load-status::after { content: ""; display: block; height: 1px; background: rgba(255,255,255,.14); }
.load-status i { display: block; position: absolute; bottom: 0; left: 0; width: 0%; height: 1px; background: var(--cyan); box-shadow: 0 0 9px var(--cyan); transition: width .2s; }
.scroll-mark { position: absolute; z-index: 4; bottom: 1.5rem; left: 50%; transform: translateX(-50%); color: #8d8376; text-decoration: none; text-transform: uppercase; font: 500 .55rem/1 var(--serif); letter-spacing: .22em; display: grid; justify-items: center; gap: .5rem; }
.scroll-mark span { width: 1px; height: 35px; background: linear-gradient(var(--gold), transparent); }

.section { position: relative; padding: clamp(6rem, 10vw, 10rem) clamp(1.3rem, 7vw, 8.5rem); }
.section-heading { width: min(860px, 100%); margin: 0 auto 4.5rem; text-align: center; }
h2 { font-size: clamp(2.5rem, 5vw, 5.4rem); line-height: 1.04; letter-spacing: -.035em; }
.section-heading > p:last-child, .faction-copy > p { max-width: 680px; margin: 1.6rem auto 0; color: var(--muted); line-height: 1.8; }
.board-section { background: radial-gradient(circle at 50% 30%, rgba(91,55,25,.19), transparent 32rem), linear-gradient(#050309, #0a060d 40%, #050309); border-top: 1px solid rgba(255,255,255,.035); }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); max-width: 1280px; margin: auto; border: 1px solid var(--line); }
.feature-card { min-height: 330px; padding: 2.3rem; border-right: 1px solid var(--line); background: linear-gradient(145deg, rgba(53,34,20,.22), rgba(8,5,11,.52)); }
.feature-card:last-child { border-right: 0; }
.roman-number { color: var(--gold); font: 500 3.8rem/1 var(--serif); opacity: .45; }
.feature-card h3 { margin-top: 4rem; font-size: 1.45rem; letter-spacing: .01em; }
.feature-card p { color: var(--muted); font-size: .9rem; line-height: 1.75; }
.floating-sigil { position: absolute; width: clamp(150px, 18vw, 310px); opacity: .08; filter: saturate(1.5); pointer-events: none; }
.sigil-left { left: -5vw; top: 10%; }
.ornament-divider { width: min(820px, 76vw); margin: 6rem auto -2rem; opacity: .45; }

.factions, .shadow-section { display: grid; grid-template-columns: minmax(280px, .78fr) minmax(460px, 1.22fr); align-items: center; gap: clamp(3rem, 8vw, 9rem); max-width: 1600px; margin: auto; }
.faction-copy .eyebrow { margin-bottom: 1.2rem; }
.faction-copy > p { margin-left: 0; }
.insignia-list { list-style: none; margin: 2.5rem 0 0; padding: 0; display: grid; gap: .7rem; }
.insignia-list li { display: flex; align-items: center; gap: .9rem; padding: .8rem 0; border-bottom: 1px solid rgba(255,255,255,.07); }
.insignia-list b { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line); color: var(--gold); font-family: var(--serif); }
.insignia-list span { display: flex; gap: .7rem; color: var(--muted); font-size: .82rem; }
.insignia-list strong { color: #eee4d5; min-width: 80px; }
.artifact-frame { position: relative; padding: 1px; background: linear-gradient(140deg, #a56a26, transparent 32%, #3f271a 72%, #d49c40); box-shadow: 0 40px 90px rgba(0,0,0,.42); }
.artifact-frame::before { content: ""; position: absolute; inset: 10px; border: 1px solid rgba(255,225,151,.22); pointer-events: none; z-index: 1; }
.artifact-frame img { width: 100%; aspect-ratio: 16/10; object-fit: cover; filter: saturate(.82) contrast(1.05) brightness(.8); }
.artifact-caption { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 1.2rem; background: #0d090e; border-top: 1px solid var(--line); text-transform: uppercase; font: 600 .7rem/1 var(--serif); letter-spacing: .14em; }
.artifact-caption small { color: var(--muted); font: 500 .58rem/1 var(--sans); letter-spacing: .12em; }
.shadow-section { grid-template-columns: minmax(460px, 1.22fr) minmax(280px, .78fr); padding-top: 4rem; }
.shadow-art { background: linear-gradient(140deg, #145c70, transparent 30%, #11283c 70%, #51e5ff); }
.danger-rule { margin-top: 2.3rem; border-left: 2px solid var(--cyan); padding: .4rem 0 .4rem 1.1rem; }
.danger-rule span { display: block; color: var(--cyan); text-transform: uppercase; font-size: .58rem; letter-spacing: .18em; margin-bottom: .4rem; }
.danger-rule strong { font-family: var(--serif); font-size: .95rem; }

.ritual { background: linear-gradient(180deg, transparent, rgba(75,43,18,.14), transparent); }
.turn-sequence { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); max-width: 1320px; margin: 0 auto; padding: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.turn-sequence li { min-height: 250px; padding: 2rem; display: flex; flex-direction: column; border-right: 1px solid var(--line); }
.turn-sequence li:last-child { border: 0; }
.turn-sequence span { color: var(--gold); font: 600 .65rem/1 var(--serif); letter-spacing: .16em; }
.turn-sequence strong { margin-top: auto; font: 600 1.45rem/1 var(--serif); }
.turn-sequence small { color: var(--muted); margin-top: .7rem; line-height: 1.5; }

.dispatch { min-height: 680px; position: relative; display: grid; grid-template-columns: .8fr 1.2fr; align-items: center; gap: 6rem; padding: clamp(6rem, 10vw, 10rem) clamp(1.3rem, 12vw, 14rem); overflow: hidden; background: radial-gradient(circle at 25% 50%, rgba(113,64,18,.23), transparent 26rem), linear-gradient(130deg, #08050a, #140b13); border-block: 1px solid var(--line); }
.dispatch::after { content: ""; position: absolute; inset: 0; opacity: .1; background: repeating-radial-gradient(circle at 25% 50%, transparent 0 44px, var(--gold) 45px 46px); pointer-events: none; }
.dispatch-seal { justify-self: center; width: min(380px, 68vw); position: relative; z-index: 1; filter: drop-shadow(0 30px 70px rgba(0,0,0,.6)); animation: seal-float 7s ease-in-out infinite; }
.dispatch > div { position: relative; z-index: 2; max-width: 700px; }
.dispatch p:not(.eyebrow) { color: var(--muted); line-height: 1.8; max-width: 620px; margin: 1.5rem 0 2rem; }
.app-store-cta { width: min(560px, 100%); }
.app-store-cta.is-disabled { cursor: default; opacity: .72; }
.app-store-cta.is-disabled:hover { transform: none; filter: none; }
.app-store-note { display: block; margin-top: .65rem; color: #857b6d; font-size: .65rem; letter-spacing: .08em; text-transform: uppercase; }

footer { min-height: 130px; padding: 2rem clamp(1.3rem, 7vw, 8.5rem); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 2rem; background: #030205; }
footer p { color: #756d63; font-size: .65rem; text-align: center; }
footer > a:last-child { justify-self: end; }
.footer-brand .brand-emblem { width: 42px; }
.footer-brand .brand-wordmark { width: 108px; }
.noscript { position: fixed; bottom: 0; z-index: 60; width: 100%; margin: 0; padding: 1rem; text-align: center; background: #260f0b; color: #fff; }

.reveal { opacity: 0; transform: translateY(34px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in-view { opacity: 1; transform: none; }
@keyframes seal-float { 0%,100% { transform: translateY(-8px) rotate(-2deg); } 50% { transform: translateY(10px) rotate(2deg); } }

@media (max-width: 950px) {
  .site-header { grid-template-columns: 1fr auto; }
  nav { display: none; }
  .hero-vignette { background: linear-gradient(0deg, rgba(2,1,4,.98) 0%, rgba(3,2,6,.75) 45%, rgba(3,2,6,.2) 74%, rgba(1,1,2,.72) 100%); }
  .hero-content { width: min(720px, 86vw); margin: auto; align-self: flex-end; padding: 0 0 10vh; }
  .feature-grid { grid-template-columns: 1fr; }
  .feature-card { min-height: 230px; border-right: 0; border-bottom: 1px solid var(--line); }
  .feature-card h3 { margin-top: 2.5rem; }
  .factions, .shadow-section { grid-template-columns: 1fr; }
  .shadow-section .shadow-art { order: 2; }
  .turn-sequence { grid-template-columns: repeat(2, 1fr); }
  .turn-sequence li:nth-child(2) { border-right: 0; }
  .turn-sequence li:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .dispatch { grid-template-columns: 1fr; text-align: center; gap: 2rem; padding-inline: 8vw; }
  .dispatch p:not(.eyebrow) { margin-inline: auto; }
}

@media (max-width: 620px) {
  .site-header { height: 70px; padding-inline: 1rem; }
  .brand .brand-emblem { width: 38px; }
  .brand .brand-wordmark { width: 88px; }
  .header-cta { font-size: .53rem; padding: .62rem .7rem; }
  .hero { min-height: 900px; height: 100svh; }
  .hero-poster img { object-position: center; }
  .hero-content { width: calc(100% - 2rem); padding-bottom: 8vh; }
  .hero-wordmark { width: min(280px, 72%); margin-bottom: .65rem; }
  h1 { font-size: clamp(2.65rem, 13vw, 4.4rem); }
  .hero-copy { font-size: .91rem; line-height: 1.65; margin-block: 1.3rem; }
  .hero-actions { display: grid; grid-template-columns: 1fr; }
  .button { min-height: 48px; }
  .interaction-hint, .scroll-mark, .load-status { display: none; }
  .section { padding-inline: 1.1rem; }
  .section-heading { text-align: left; }
  h2 { font-size: clamp(2.2rem, 11vw, 3.4rem); }
  .feature-card { padding: 1.6rem; }
  .artifact-caption { align-items: flex-start; flex-direction: column; }
  .turn-sequence { grid-template-columns: 1fr; }
  .turn-sequence li { min-height: 190px; border-right: 0; border-bottom: 1px solid var(--line); }
  .dispatch { min-height: 760px; }
  footer { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  footer > a:last-child { justify-self: center; }
}

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