/* The Long Road: the game's own palette (scripts/ui.gd) and fonts. */
@font-face { font-family: "Spectral"; src: url("fonts/spectral-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Spectral"; src: url("fonts/spectral-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Spectral"; src: url("fonts/spectral-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Archivo"; src: url("fonts/archivo-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Archivo"; src: url("fonts/archivo-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --ink: #131a24; --ink-deep: #0e141c; --vellum: #1b2431; --rule: #2a3644; --rule-bright: #3a4a5c;
  --parchment: #e6decc; --parchment-dim: #949a96; --parchment-faint: #5f6a72;
  --verdigris: #5fa396; --seal: #b0574a; --gold: #e8c35a; --ember: #ff8a3d;
  --serif: "Spectral", Georgia, serif; --sans: "Archivo", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--ink-deep); color: var(--parchment); font: 18px/1.65 var(--serif); overflow-x: hidden; }
a { color: inherit; }

#scene { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; z-index: 0; }
/* Darkens the scene behind text-heavy panels; site.js sets its opacity on scroll. */
.veil { position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(14,20,28,.92), rgba(14,20,28,.55) 60%, rgba(14,20,28,.3)); transition: opacity .4s; }

.bar { position: fixed; top: 0; left: 0; right: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between;
  padding: 14px max(16px, env(safe-area-inset-left)); background: linear-gradient(rgba(14,20,28,.85), rgba(14,20,28,0)); }
.mark { display: flex; gap: 10px; align-items: center; text-decoration: none; font: 600 12px/1 var(--sans); letter-spacing: .32em; color: var(--parchment); }
.mark img { border-radius: 7px; }
.bar nav { display: flex; gap: 18px; align-items: center; font: 500 13px/1 var(--sans); letter-spacing: .06em; }
.bar nav a { text-decoration: none; color: var(--parchment-dim); }
.bar nav a:hover { color: var(--parchment); }
.bar nav .cta-small { color: var(--ink-deep); background: var(--gold); padding: 8px 14px; border-radius: 6px; }
@media (max-width: 560px) { .bar nav a:not(.cta-small) { display: none; } }

main { position: relative; z-index: 2; }
.panel { min-height: 100vh; padding: 120px max(16px, 6vw) 80px; display: flex; flex-direction: column; justify-content: center; max-width: 720px; }
.kicker { font: 600 12px/1 var(--sans); letter-spacing: .3em; text-transform: uppercase; color: var(--gold); margin: 0 0 18px; }
h1 { font: 500 clamp(56px, 11vw, 132px)/.92 var(--serif); letter-spacing: .06em; margin: 0 0 24px; color: var(--parchment);
  text-shadow: 0 0 40px rgba(255,138,61,.35), 0 2px 0 rgba(0,0,0,.5); }
h2 { font: 500 clamp(32px, 5vw, 52px)/1.1 var(--serif); margin: 0 0 22px; }
h3 { font: 500 30px/1.1 var(--serif); margin: 0 0 8px; color: var(--gold); }
.lede { font-size: clamp(19px, 2.2vw, 23px); color: var(--parchment); max-width: 30em; margin: 0 0 34px; }
.story p { max-width: 34em; color: #d4ccba; }
.pull { font-style: italic; font-size: 22px; color: var(--parchment) !important; border-left: 2px solid var(--ember); padding-left: 18px; margin-top: 18px; }
em { color: var(--gold); font-style: italic; }

.actions { display: flex; gap: 12px; flex-wrap: wrap; }
.button { display: inline-block; text-decoration: none; font: 600 15px/1 var(--sans); letter-spacing: .04em; padding: 16px 22px; border-radius: 8px;
  border: 1px solid var(--rule-bright); background: rgba(19,26,36,.7); color: var(--parchment); backdrop-filter: blur(4px); transition: transform .15s, border-color .15s; }
.button:hover { transform: translateY(-1px); border-color: var(--parchment-dim); }
.button.gold { background: var(--gold); color: var(--ink-deep); border-color: var(--gold); box-shadow: 0 6px 30px rgba(232,195,90,.25); }
.scroll-hint { position: absolute; bottom: 28px; left: max(16px, 6vw); font: 600 11px/1 var(--sans); letter-spacing: .35em; text-transform: uppercase; color: var(--parchment-faint); animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(6px); } }
.hero { position: relative; }

/* Heroes: the 3D hero stands to the right; the card sits left. */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 24px; }
.tab { font: 600 14px/1 var(--sans); letter-spacing: .04em; padding: 12px 16px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--rule-bright); background: rgba(19,26,36,.75); color: var(--parchment-dim); }
.tab[aria-selected="true"] { color: var(--ink-deep); background: var(--parchment); border-color: var(--parchment); }
.hero-card { background: rgba(19,26,36,.78); border: 1px solid var(--rule); border-radius: 12px; padding: 22px 24px; backdrop-filter: blur(6px); max-width: 30em; }
.hero-blurb { margin: 0 0 14px; color: #d4ccba; }
.abilities { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.abilities li { display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: start; font-size: 15px; line-height: 1.45; color: var(--parchment-dim); }
.abilities b { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--gold); color: var(--gold); font: 600 14px/1 var(--sans); }
.abilities strong { color: var(--parchment); font-weight: 500; display: block; }
.note { font-size: 15px; color: var(--parchment-dim); max-width: 30em; margin-top: 18px; }

/* Acts: a wide panel of screenshots. */
.acts { max-width: none; }
.act-list { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.act { margin: 0; background: rgba(19,26,36,.82); border: 1px solid var(--rule); border-radius: 12px; overflow: hidden; backdrop-filter: blur(6px); }
.act img { display: block; width: 100%; height: auto; aspect-ratio: 16/9; object-fit: cover; transition: transform .6s; }
.act:hover img { transform: scale(1.04); }
.act figcaption { padding: 16px 18px 18px; }
.act .num { font: 600 11px/1 var(--sans); letter-spacing: .3em; color: var(--gold); }
.act h3 { font-size: 24px; color: var(--parchment); margin: 8px 0 6px; }
.act p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--parchment-dim); }

.feature-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.feature-grid li { background: rgba(19,26,36,.78); border: 1px solid var(--rule); border-radius: 12px; padding: 18px 20px; backdrop-filter: blur(6px); }
.feature-grid strong { display: block; font: 500 20px/1.2 var(--serif); color: var(--gold); margin-bottom: 6px; }
.feature-grid span { font-size: 15px; color: var(--parchment-dim); line-height: 1.5; }
.features { max-width: 900px; }

.play { align-items: flex-start; }
.app-icon { border-radius: 24px; box-shadow: 0 0 60px rgba(255,138,61,.35); margin-bottom: 22px; }
.play p { color: #d4ccba; max-width: 30em; }

.foot { position: relative; z-index: 2; display: flex; gap: 22px; flex-wrap: wrap; padding: 28px max(16px, 6vw) 40px; border-top: 1px solid var(--rule);
  background: var(--ink-deep); font: 400 14px/1.4 var(--sans); color: var(--parchment-faint); }
.foot a { color: var(--parchment-dim); }

.loading { position: fixed; left: 0; right: 0; top: 0; height: 2px; z-index: 6; pointer-events: none; }
.loading span { display: block; height: 100%; width: 0; background: var(--ember); box-shadow: 0 0 12px var(--ember); transition: width .3s, opacity .6s; }

@media (max-width: 760px) {
  .panel { padding-top: 96px; min-height: 92vh; }
  /* The 3D hero stands in the space above the heading. */
  .heroes { justify-content: flex-start; padding-top: 58vh; }
  .heroes .hero-card { background: rgba(19,26,36,.9); }
  .hero-card { padding: 18px; }
}

/* Wide screens: Act I large, the other four in a block beside it. */
@media (min-width: 1100px) {
  .act-list { grid-template-columns: repeat(4, 1fr); }
  .act:first-child { grid-column: span 2; grid-row: span 2; display: flex; flex-direction: column; }
  .act:first-child img { flex: 1; min-height: 0; aspect-ratio: auto; }
  .act:first-child h3 { font-size: 32px; }
  .act:first-child p { font-size: 17px; }
}

/* ?card: the share image (see site.js). */
body.card .bar, body.card .actions, body.card .scroll-hint, body.card .loading, body.card main > section:not(.hero) { display: none; }
body.card .hero { min-height: 630px; padding: 0 0 0 64px; }
body.card h1 { font-size: 104px; }
body.card .lede { font-size: 26px; margin: 0; }
body.card .kicker { font-size: 15px; }
