/* ============================================================================
   PB& Games — "Forged & Furled", web edition.

   The game's own design language (docs/design_language.md): blackened iron
   furniture, aged vellum reading surfaces, gilt hairline inlays, battle-crimson
   cloth. Every neutral is a warm iron brown biased toward the gold, never a cool
   slate, so nothing reads as generic dark mode. Tokens are the same ones the
   in-engine UIKit uses, ported once in marketing/presentation/index.html and
   carried here so the site, the deck and the game agree.
   ========================================================================== */

:root {
  --bg0: #120e09;
  --bg1: #1c1610;
  --bg2: #241c13;
  --panel: #231b12;
  --panel-hi: #2d2418;
  --iron: #4a3b24;
  --iron-dim: #372c1b;
  --gold: #d9a84e;
  --gold-hi: #f2cd7e;
  --gold-dim: #8a6d38;
  --vellum: #e9dcbe;
  --vellum-dim: #d5c39a;
  --ink: #241b10;
  --ink-soft: #4e3f26;
  --crimson: #b03a34;
  --crimson-hi: #d4574e;
  --tx: #efe4c8;
  --tx2: #cbbb96;
  --tx3: #a8956c;
  --serif: 'EB Garamond', Georgia, 'Times New Roman', serif;
  --disp: 'Cinzel', 'Palatino Linotype', Palatino, Georgia, serif;
  --maxw: 1160px;
  --rail: clamp(20px, 5vw, 56px);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg0);
  color: var(--tx);
  font-family: var(--serif);
  font-size: clamp(17px, 1.05vw + 13px, 20px);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* The warm ground the whole page sits on: a low ember glow at the foot, a cool
   fall-off at the head, so long pages never flatten into a black rectangle. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(120% 70% at 50% 100%, rgba(176, 58, 52, .10), transparent 60%),
    radial-gradient(110% 80% at 50% 0%, var(--bg2) 0%, var(--bg1) 42%, var(--bg0) 100%);
}

img, video { max-width: 100%; height: auto; display: block; }

a { color: var(--gold-hi); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--vellum); }

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

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--gold);
  color: var(--ink);
  padding: 12px 20px;
  font-family: var(--disp);
  font-weight: 700;
  z-index: 100;
}
.skip:focus { left: 8px; top: 8px; }

/* ---------------------------------------------------------------- typography */

h1, h2, h3, h4 { font-family: var(--disp); font-weight: 700; line-height: 1.12; margin: 0; }
h1 { font-size: clamp(38px, 6vw, 74px); letter-spacing: .005em; }
h2 { font-size: clamp(28px, 3.4vw, 44px); }
h3 { font-size: clamp(21px, 1.7vw, 27px); }
p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

em { color: var(--gold-hi); font-style: italic; }
strong { color: var(--vellum); font-weight: 600; }

/* The spaced-caps eyebrow — the web echo of UIKit.spaced_caps, used on every
   section so the page scans like a ledger's column headings. */
.kicker {
  font-family: var(--disp);
  font-weight: 700;
  font-size: clamp(11px, .8vw + 7px, 14px);
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.kicker::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(217, 168, 78, .5), transparent);
}
.kicker.center { justify-content: center; }
.kicker.center::after, .kicker.center::before {
  content: "";
  flex: 0 1 90px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(217, 168, 78, .5));
}
.kicker.center::after { background: linear-gradient(90deg, rgba(217, 168, 78, .5), transparent); }

.lede { font-size: clamp(19px, 1.3vw + 13px, 25px); color: var(--tx2); max-width: 62ch; }
.muted { color: var(--tx3); }
.small { font-size: .85em; }

/* -------------------------------------------------------------------- layout */

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--rail); }
.section { padding: clamp(56px, 8vw, 108px) 0; }
.section + .section { border-top: 1px solid rgba(74, 59, 36, .5); }
.stack > * + * { margin-top: 22px; }

.grid { display: grid; gap: clamp(20px, 3vw, 34px); }
@media (min-width: 760px) {
  .grid.two { grid-template-columns: 1fr 1fr; }
  .grid.three { grid-template-columns: repeat(3, 1fr); }
  .grid.side { grid-template-columns: 1.05fr .95fr; align-items: center; }
}

/* ------------------------------------------------------------------ site head */

.masthead {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(18, 14, 9, .86);
  backdrop-filter: blur(10px) saturate(1.1);
  border-bottom: 1px solid rgba(74, 59, 36, .7);
}
.masthead .bar {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 68px;
  padding-block: 10px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-family: var(--disp);
  font-weight: 900;
  font-size: 20px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--tx);
  text-decoration: none;
  flex: none;
}
.brand img { width: 30px; height: 32px; filter: drop-shadow(0 1px 0 rgba(0,0,0,.6)); }
.brand:hover { color: var(--gold-hi); }
.brand .amp { color: var(--gold); }

.nav { margin-left: auto; display: flex; align-items: center; gap: clamp(6px, 1.4vw, 22px); }
.nav a {
  font-family: var(--disp);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--tx2);
  text-decoration: none;
  padding: 8px 4px;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.nav a:hover { color: var(--gold-hi); }
.nav a[aria-current="page"] { color: var(--gold-hi); border-bottom-color: var(--gold); }

.navtoggle {
  display: none;
  margin-left: auto;
  background: transparent;
  border: 1px solid var(--iron);
  border-radius: 4px;
  color: var(--tx);
  font-family: var(--disp);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .2em;
  text-transform: uppercase;
  padding: 9px 14px;
  cursor: pointer;
}

@media (max-width: 860px) {
  .navtoggle { display: block; }
  .nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg1);
    border-bottom: 1px solid var(--iron);
    padding: 8px var(--rail) 18px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 14px 0; border-bottom: 1px solid rgba(74, 59, 36, .5); font-size: 15px; }
  .nav a[aria-current="page"] { border-bottom-color: var(--gold); }
  .nav .btn { margin-top: 14px; text-align: center; }
}

/* ------------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--disp);
  font-weight: 700;
  font-size: clamp(13px, .55vw + 11px, 16px);
  letter-spacing: .16em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 15px 28px;
  border-radius: 3px;
  border: 1px solid var(--iron);
  background: linear-gradient(180deg, var(--panel-hi), var(--panel));
  color: var(--tx);
  box-shadow: 0 4px 0 rgba(0, 0, 0, .45), inset 0 1px 0 rgba(242, 205, 126, .10);
  transition: transform .14s ease, box-shadow .14s ease, background .14s ease;
  cursor: pointer;
  max-width: 100%;
  overflow-wrap: anywhere;
}
/* An address is not a label: it keeps its casing and its ability to wrap. */
.btn.address { text-transform: none; letter-spacing: .02em; font-size: clamp(14px, .6vw + 12px, 17px); }
.btn:hover { transform: translateY(-2px); color: var(--gold-hi); box-shadow: 0 6px 0 rgba(0,0,0,.45), inset 0 1px 0 rgba(242,205,126,.18); }
.btn:active { transform: translateY(1px); box-shadow: 0 2px 0 rgba(0,0,0,.45); }

/* The one job of this site: the wishlist. It is the only gilt button on a page. */
.btn.primary {
  background: linear-gradient(180deg, var(--gold-hi), var(--gold) 55%, #b98c33);
  border-color: #8a6d38;
  color: var(--ink);
  padding: 17px 34px;
  box-shadow: 0 4px 0 #6b5227, 0 12px 30px rgba(217, 168, 78, .22);
}
.btn.primary:hover { color: var(--ink); box-shadow: 0 6px 0 #6b5227, 0 16px 38px rgba(217, 168, 78, .30); }
.btn.primary:active { box-shadow: 0 2px 0 #6b5227; }

.btn.crimson {
  background: linear-gradient(180deg, var(--crimson-hi), var(--crimson));
  border-color: #7c2620;
  color: #fff5ec;
}
.btn.crimson:hover { color: #fff; }

.btn .steam { width: 20px; height: 20px; flex: none; fill: currentColor; }

.cta-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.cta-note { font-size: .82em; color: var(--tx3); font-style: italic; }

/* -------------------------------------------------------------------- panels */

/* Forged surface: iron rail, gilt hairline inlay just inside it, corner rivets.
   Straight out of UIKit.forged_surface. */
.panel {
  position: relative;
  background: linear-gradient(180deg, var(--panel-hi), var(--panel));
  border: 1px solid var(--iron);
  border-radius: 10px;
  padding: clamp(22px, 3vw, 36px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .38), inset 0 0 0 1px rgba(242, 205, 126, .08);
}
/* Four corner rivets, drawn as one background so they never need extra elements. */
.panel.rivets::before {
  content: "";
  position: absolute;
  inset: 9px;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 35% 30%, var(--gold-hi), var(--gold-dim) 55%, #3a2c15 100%),
    radial-gradient(circle at 35% 30%, var(--gold-hi), var(--gold-dim) 55%, #3a2c15 100%),
    radial-gradient(circle at 35% 30%, var(--gold-hi), var(--gold-dim) 55%, #3a2c15 100%),
    radial-gradient(circle at 35% 30%, var(--gold-hi), var(--gold-dim) 55%, #3a2c15 100%);
  background-size: 5px 5px;
  background-repeat: no-repeat;
  background-position: 0 0, 100% 0, 0 100%, 100% 100%;
  opacity: .85;
}

/* Vellum: dark ink on baked parchment. The press kit and the fact sheet live on
   it, which is what makes those pages read as documents rather than web pages. */
.vellum {
  background:
    radial-gradient(120% 90% at 20% 0%, rgba(255, 255, 255, .34), transparent 55%),
    linear-gradient(180deg, #efe3c4, #ddcaa0);
  color: var(--ink);
  border: 1px solid #b7a074;
  border-radius: 8px;
  padding: clamp(24px, 3.2vw, 42px);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .48);
}
.vellum h2, .vellum h3 { color: #6b4514; }
.vellum a { color: #7a3f16; }
.vellum a:hover { color: #4a2508; }
/* #634c1d, not the deck's #7d6634: against the DARK end of the parchment gradient
   the lighter brown only reaches 3.4:1, and these are small bold labels. */
.vellum .kicker { color: #634c1d; }
.vellum .kicker::after { background: linear-gradient(90deg, rgba(99, 76, 29, .55), transparent); }
.vellum strong { color: var(--ink); }
.vellum em { color: #6b4514; }

/* Iron frame for any screenshot or clip. */
.frame {
  border: 1px solid var(--iron);
  border-radius: 10px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 26px 64px rgba(0, 0, 0, .55), inset 0 0 0 1px rgba(242, 205, 126, .07);
}
.frame img, .frame video { width: 100%; display: block; }
figure { margin: 0; }
figcaption { font-size: .82em; color: var(--tx3); font-style: italic; margin-top: 10px; }

/* --------------------------------------------------------------------- hero */

.hero { position: relative; overflow: hidden; isolation: isolate; }
.hero-art {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: url("img/keyart-hero-1200.webp");
  background-size: cover;
  background-position: 50% 34%;
}
@media (min-width: 760px) {
  .hero-art { background-image: url("img/keyart-hero-2400.webp"); }
}
/* Two veils. The vertical one seats the hero into the page; the horizontal one only
   appears once there is room for the text to sit beside the art instead of on top of
   it, so on a wide screen the king and the castle stay visible on the right. */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg,
    rgba(18, 14, 9, .58) 0%,
    rgba(18, 14, 9, .40) 34%,
    rgba(18, 14, 9, .86) 78%,
    var(--bg0) 100%);
}
@media (min-width: 900px) {
  .hero::after {
    background:
      linear-gradient(90deg,
        rgba(18, 14, 9, .80) 0%,
        rgba(18, 14, 9, .55) 42%,
        rgba(18, 14, 9, .12) 78%,
        rgba(18, 14, 9, .05) 100%),
      linear-gradient(180deg,
        rgba(18, 14, 9, .34) 0%,
        rgba(18, 14, 9, .22) 34%,
        rgba(18, 14, 9, .80) 80%,
        var(--bg0) 100%);
  }
  .hero .wrap > * { max-width: 66%; }
  .hero .lede { max-width: min(56ch, 66%); }
}
.hero .wrap { padding-block: clamp(64px, 12vw, 132px); position: relative; }
.hero-logo { width: min(560px, 82%); margin: 0 0 26px; filter: drop-shadow(0 8px 26px rgba(0,0,0,.7)); }
.hero h1 { text-shadow: 0 2px 0 rgba(0,0,0,.55), 0 0 42px rgba(176, 58, 52, .35); }
.hero .lede { text-shadow: 0 1px 10px rgba(0,0,0,.7); }

/* The ember drift. Purely decorative, switched off for reduced motion. */
#embers { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { #embers { display: none; } }

/* ---------------------------------------------------------------- stat ledger */

/* Column counts are declared per ledger (.n6 / .n10) rather than left to auto-fit,
   because an auto-fit grid strands one lonely cell on its own row at most widths. */
.ledger {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: rgba(74, 59, 36, .7);
  border: 1px solid var(--iron);
  border-radius: 10px;
  overflow: hidden;
}
.ledger div {
  background: linear-gradient(180deg, var(--panel-hi), var(--panel));
  padding: 22px 14px 20px;
  text-align: center;
}
.ledger .v {
  display: block;
  font-family: var(--disp);
  font-weight: 700;
  font-size: clamp(30px, 3vw, 42px);
  color: var(--gold-hi);
  line-height: 1;
}
.ledger .l {
  display: block;
  font-size: 13px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--tx2);
  margin-top: 9px;
  font-family: var(--disp);
  font-weight: 700;
}
@media (min-width: 620px) { .ledger.n6 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 980px) {
  .ledger.n6 { grid-template-columns: repeat(6, 1fr); }
  .ledger.n10 { grid-template-columns: repeat(5, 1fr); }
}

/* ------------------------------------------------------------------ features */

.feature { display: grid; gap: clamp(20px, 3vw, 44px); align-items: center; }
@media (min-width: 860px) {
  .feature { grid-template-columns: 1fr 1fr; }
  .feature.flip > *:first-child { order: 2; }
}
/* Heading LEVEL is decided by document order (a screen reader must not meet an h3
   before an h2); heading SIZE is decided here. The two are deliberately decoupled. */
.feature h2, .feature h3, .panel > h2 {
  font-size: clamp(21px, 1.7vw, 27px);
  color: var(--tx);
  margin-bottom: 12px;
}

.cardlist { list-style: none; margin: 0; padding: 0; }
.cardlist li {
  position: relative;
  padding: 0 0 0 30px;
  margin-bottom: 12px;
  color: var(--tx2);
}
.cardlist li::before {
  content: "";
  position: absolute;
  left: 4px; top: .62em;
  width: 9px; height: 9px;
  background: var(--gold);
  transform: rotate(45deg);
  box-shadow: inset -1px -1px 0 rgba(0,0,0,.35);
}
.cardlist b { color: var(--gold-hi); font-weight: 600; }

/* -------------------------------------------------------------------- shots */

.shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.shots a {
  display: block;
  border: 1px solid var(--iron);
  border-radius: 8px;
  overflow: hidden;
  background: #000;
  line-height: 0;
  box-shadow: 0 12px 30px rgba(0,0,0,.4), inset 0 0 0 1px rgba(242,205,126,.06);
  transition: transform .16s ease, box-shadow .16s ease;
}
.shots a:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(0,0,0,.5), inset 0 0 0 1px rgba(242,205,126,.22); }
@media (prefers-reduced-motion: reduce) { .shots a:hover { transform: none; } }

/* ---------------------------------------------------------------- banner CTA */

.banner {
  position: relative;
  text-align: center;
  padding: clamp(44px, 6vw, 78px) clamp(20px, 4vw, 60px);
  border-radius: 10px;
  border: 1px solid #7c2620;
  background:
    linear-gradient(180deg, rgba(212, 87, 78, .22), rgba(176, 58, 52, .10)),
    linear-gradient(180deg, var(--panel-hi), var(--panel));
  box-shadow: 0 22px 56px rgba(0,0,0,.45), inset 0 0 0 1px rgba(242, 205, 126, .12);
}
.banner h2 { margin-bottom: 14px; }
.banner p { color: var(--tx2); max-width: 54ch; margin-inline: auto; }
.banner .cta-row { justify-content: center; margin-top: 26px; }

/* ------------------------------------------------------------------ fact list */

.facts { margin: 0; }
.facts div {
  display: grid;
  grid-template-columns: minmax(150px, 210px) 1fr;
  gap: 10px 22px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(120, 100, 60, .28);
}
.facts div:last-child { border-bottom: 0; }
.facts dt {
  font-family: var(--disp);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #634c1d;
  padding-top: .25em;
}
.facts dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 620px) {
  .facts div { grid-template-columns: 1fr; gap: 2px; }
}

/* --------------------------------------------------------------- downloads */

.dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.dl a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 18px;
  border: 1px solid var(--iron);
  border-radius: 8px;
  background: linear-gradient(180deg, var(--panel-hi), var(--panel));
  text-decoration: none;
  color: var(--tx);
  transition: border-color .14s ease, transform .14s ease;
}
.dl a:hover { border-color: var(--gold-dim); transform: translateY(-2px); color: var(--tx); }
.dl .n { font-family: var(--disp); font-weight: 700; font-size: 15px; letter-spacing: .06em; color: var(--gold-hi); }
.dl .m { font-size: 13px; color: var(--tx3); letter-spacing: .05em; overflow-wrap: anywhere; }

code {
  font-family: 'Cascadia Code', Consolas, monospace;
  font-size: .88em;
  background: rgba(74, 59, 36, .35);
  border: 1px solid rgba(74, 59, 36, .8);
  border-radius: 3px;
  padding: 1px 6px;
  overflow-wrap: anywhere;
}

/* ------------------------------------------------------------------- footer */

.foot {
  border-top: 1px solid rgba(74, 59, 36, .7);
  padding: clamp(40px, 6vw, 64px) 0 clamp(30px, 4vw, 48px);
  background: rgba(9, 7, 4, .5);
}
.foot .cols { display: grid; gap: 30px; }
@media (min-width: 720px) { .foot .cols { grid-template-columns: 1.4fr 1fr 1fr; } }
.foot h3 {
  font-size: 12px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
}
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin-bottom: 9px; }
.foot a { color: var(--tx2); text-decoration: none; }
.foot a:hover { color: var(--gold-hi); text-decoration: underline; }
.foot .mark { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.foot .mark img { width: 40px; height: 42px; }
.foot .mark span { font-family: var(--disp); font-weight: 900; font-size: 19px; letter-spacing: .12em; text-transform: uppercase; }
.foot .mark .amp { color: var(--gold); }
.foot .fine { margin-top: 34px; font-size: 14px; color: var(--tx3); }
.foot .fine a { color: var(--tx3); text-decoration: underline; }

/* ---------------------------------------------------------------- utilities */

.center { text-align: center; }
.center .lede, .center .facts { margin-inline: auto; }
.center .cta-row { justify-content: center; }
.vh {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.tag {
  display: inline-block;
  font-family: var(--disp);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--gold-dim);
  border-radius: 999px;
  padding: 5px 14px;
}
