:root {
  --ink: #2b1a0e;
  --wood-dark: #3b2312;
  --wood: #6e4220;
  --wood-light: #9a6233;
  --parchment: #f4e4c1;
  --parchment-deep: #e9d2a2;
  --cream: #fff4dc;
  --gold: #f5b02a;
  --gold-deep: #dc7a17;
  --leaf: #50702c;
  --red: #b5361e;
  --muted: #6b5137;
  --display: "Fraunces", "Cooper Black", Georgia, serif;
  --body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: 16px;
  --radius: 18px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--parchment);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--body);
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 {
  font-family: var(--display);
  font-variation-settings: "SOFT" 100;
  font-weight: 900;
  line-height: 1.05;
  margin: 0;
  letter-spacing: -0.01em;
}
h2 { font-size: clamp(2rem, 7.5vw, 3.6rem); }
h3 { font-size: clamp(1.35rem, 4.6vw, 1.75rem); }
p { margin: 0; }
.wrap { width: min(100% - 2 * var(--gutter), 1080px); margin-inline: auto; }
.wrap-wide { width: min(100% - 2 * var(--gutter), 1180px); margin-inline: auto; }
[hidden] { display: none !important; }
.sr-only, .trap {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--cream); padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--gold-deep); outline-offset: 3px; }

.kicker {
  font: 800 0.8rem/1 var(--body);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 12px;
}

/* Buttons: chunky, a little like the game's own */
.btn {
  --b: var(--gold);
  --s: var(--gold-deep);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 24px;
  font: 800 1.05rem/1 var(--body);
  color: var(--ink); text-decoration: none;
  background: var(--b);
  border: 3px solid var(--wood-dark);
  border-radius: 14px;
  box-shadow: 0 5px 0 var(--wood-dark), inset 0 -4px 0 var(--s), inset 0 2px 0 rgba(255,255,255,.45);
  cursor: pointer;
  transition: transform .08s ease, box-shadow .08s ease, filter .15s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--wood-dark), inset 0 -3px 0 var(--s), inset 0 2px 0 rgba(255,255,255,.45); }
.btn svg { width: 22px; height: 22px; fill: currentColor; }
.btn-wood { --b: var(--wood-light); --s: var(--wood); color: var(--cream); }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }

/* Hero */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: end;
  overflow: hidden;
  background: #1a1009;
  color: var(--cream);
  isolation: isolate;
}
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero-shade {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(120% 70% at 50% 100%, rgba(26,16,9,.92) 20%, rgba(26,16,9,.35) 60%, rgba(26,16,9,.15) 100%),
    linear-gradient(to bottom, rgba(26,16,9,.55), transparent 25%);
}
.hero-inner {
  width: min(100% - 2 * var(--gutter), 760px);
  margin: 0 auto;
  padding: 18vh 0 max(36px, env(safe-area-inset-bottom));
  text-align: center;
  display: grid; justify-items: center; gap: 14px;
}
.logo img { width: min(88vw, 520px); height: auto; filter: drop-shadow(0 10px 18px rgba(0,0,0,.55)); }
.logo { animation: sway 6s ease-in-out infinite; transform-origin: 50% 0; }
@keyframes sway { 0%, 100% { transform: rotate(-1.2deg); } 50% { transform: rotate(1.2deg); } }
.tagline {
  font: 900 clamp(1.5rem, 6vw, 2.3rem)/1.1 var(--display);
  font-variation-settings: "SOFT" 100;
  color: var(--gold);
  -webkit-text-stroke: 1.5px var(--wood-dark);
  paint-order: stroke fill;
  text-shadow: 0 3px 0 var(--wood-dark), 0 6px 18px rgba(0,0,0,.6);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px 14px; justify-content: center; margin-top: 8px; }
.platforms { font-size: .95rem; color: rgba(255,244,220,.85); }
.platforms a { color: var(--gold); font-weight: 800; text-underline-offset: 3px; }

/* Pitch */
.pitch { padding: 72px 0 40px; }
.pitch h2 em { font-style: normal; color: var(--gold-deep); }
.lede { font-size: clamp(1.08rem, 2.6vw, 1.25rem); max-width: 60ch; margin-top: 18px; color: #4a3220; }
.beats { display: grid; gap: 48px; margin-top: 52px; }
.beat { display: grid; gap: 18px; align-items: center; }
.beat-text { position: relative; }
.beat-num {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px; margin-bottom: 10px;
  font: 900 1.1rem/1 var(--display);
  background: var(--wood); color: var(--cream);
  border-radius: 50%; border: 3px solid var(--wood-dark);
}
.beat-text p { margin-top: 10px; color: #4a3220; max-width: 46ch; }
.frame {
  border: 5px solid var(--wood-dark);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--wood-dark);
  box-shadow: 0 10px 0 rgba(59,35,18,.18), 0 18px 40px rgba(59,35,18,.25);
  transform: rotate(-0.6deg);
}
.beat:nth-child(2) .frame { transform: rotate(0.7deg); }
.frame video, .frame img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.cards { position: relative; height: clamp(200px, 56vw, 300px); }
.card {
  position: absolute; top: 8%; left: 50%;
  width: 40%; max-width: 210px; aspect-ratio: 1;
  border: 5px solid var(--cream); outline: 3px solid var(--wood-dark);
  border-radius: 14px;
  box-shadow: 0 12px 26px rgba(59,35,18,.35);
  transition: transform .35s cubic-bezier(.3,1.6,.5,1);
}
.c1 { transform: translateX(-120%) rotate(-11deg); }
.c2 { transform: translateX(-50%) translateY(-6%) rotate(1deg); z-index: 2; }
.c3 { transform: translateX(20%) rotate(10deg); }
.cards:hover .c1 { transform: translateX(-128%) rotate(-15deg) translateY(-4%); }
.cards:hover .c3 { transform: translateX(28%) rotate(14deg) translateY(-4%); }
.cards:hover .c2 { transform: translateX(-50%) translateY(-12%) rotate(0deg) scale(1.04); }

/* How to play: the game's own tutorial, playable */
.learn {
  padding: 64px 0 72px;
  background: linear-gradient(to bottom, var(--parchment), transparent 60px), var(--parchment-deep);
}
.learn-grid { display: grid; gap: 32px; align-items: center; }
.learn-lede { margin-top: 16px; max-width: 52ch; color: #4a3220; font-size: clamp(1.05rem, 2.4vw, 1.18rem); }
.chapter-list { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 10px; }
.chapter-list li { display: flex; gap: 12px; align-items: flex-start; color: #4a3220; font-size: .98rem; }
.chapter-list b {
  flex: none; display: inline-grid; place-items: center; width: 30px; height: 30px; margin-top: -2px;
  border-radius: 50%; background: var(--wood); color: var(--cream); border: 2px solid var(--wood-dark);
  font: 900 .95rem/1 var(--display);
}
.chapter-list strong { color: var(--ink); }
.learn-cta { margin-top: 26px; }
.learn-note { margin-top: 10px; }
.phone {
  position: relative; display: block; justify-self: center;
  width: min(100%, 340px); aspect-ratio: 9 / 16; padding: 0; overflow: hidden; cursor: pointer;
  border: 10px solid var(--wood-dark); border-radius: 34px; background: var(--wood-dark);
  box-shadow: 0 12px 0 rgba(59,35,18,.25), 0 26px 50px rgba(59,35,18,.35);
  transform: rotate(1.5deg); transition: transform .25s cubic-bezier(.3,1.6,.5,1);
  -webkit-tap-highlight-color: transparent;
}
.phone:hover { transform: rotate(0deg) scale(1.02); }
.phone img { width: 100%; height: 100%; object-fit: cover; }
.phone-play {
  position: absolute; left: 50%; bottom: 12%; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 10px; white-space: nowrap;
  padding: 14px 22px; font: 800 1.05rem/1 var(--body); color: var(--ink);
  background: var(--gold); border: 3px solid var(--wood-dark); border-radius: 14px;
  box-shadow: 0 5px 0 var(--wood-dark), inset 0 -4px 0 var(--gold-deep), inset 0 2px 0 rgba(255,255,255,.45);
}
.phone-play svg, .learn-cta svg { width: 22px; height: 22px; fill: currentColor; }

/* The tutorial player: full screen on a phone, a phone-sized frame on a computer */
.player { padding: 0; border: 0; margin: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; background: #1a1009; }
.player[open] { display: flex; flex-direction: column; }
.player::backdrop { background: rgba(15,9,4,.9); }
.player-bar {
  flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: max(6px, env(safe-area-inset-top)) 10px 6px 14px; min-height: 48px;
  background: var(--wood-dark); color: var(--cream); font: 800 .9rem/1 var(--body);
}
.player-close {
  min-height: 36px; padding: 0 14px; border-radius: 999px; cursor: pointer;
  border: 2px solid var(--wood-light); background: var(--cream); color: var(--ink); font: 800 .9rem/1 var(--body);
}
.player-frame { flex: 1; position: relative; background: #1a1009; }
.player-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }

/* Cast */
.cast { padding: 72px 0 64px; background: var(--wood-dark); color: var(--cream); }
.cast .kicker { color: var(--gold); }
.cast-row {
  list-style: none; margin: 28px 0 0; padding: 4px var(--gutter) 18px;
  display: grid; grid-auto-flow: column; grid-auto-columns: min(72vw, 270px); gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: var(--gutter);
  scrollbar-width: thin; scrollbar-color: var(--wood-light) transparent;
}
.cast-card {
  scroll-snap-align: start;
  background: var(--cream); color: var(--ink);
  border-radius: 18px; overflow: hidden;
  border: 4px solid var(--parchment-deep);
  display: flex; flex-direction: column;
}
.cast-card.foe { border-color: #d77a5e; }
.cast-card img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.cast-card h3 { font-size: 1.35rem; padding: 14px 16px 4px; }
.cast-card p { padding: 0 16px 18px; font-size: .97rem; color: #4a3220; }
.cast-card.foe h3::before { content: "Trouble"; display: block; margin-bottom: 5px; font: 800 .68rem/1 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--red); }
.cast-card.ours h3::before { content: "Management"; display: block; margin-bottom: 5px; font: 800 .68rem/1 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--leaf); }

/* Join */
.join {
  padding: 80px var(--gutter) 88px;
  background:
    linear-gradient(to bottom, rgba(244,228,193,.15), rgba(244,228,193,.15)),
    url(/assets/media/join-bg.webp) center 30% / cover;
  display: grid; place-items: center;
}
.join-card {
  width: min(100%, 620px);
  background: var(--cream);
  border: 5px solid var(--wood-dark);
  border-radius: 24px;
  padding: 28px 20px 24px;
  text-align: center;
  box-shadow: 0 10px 0 var(--wood-dark), 0 30px 60px rgba(0,0,0,.35);
  display: grid; gap: 14px; justify-items: center;
}
.join-logo { width: min(64%, 280px); height: auto; margin-top: -4px; }
.join-card > p { color: #4a3220; max-width: 46ch; }
form { width: 100%; }
.field { display: flex; flex-direction: column; gap: 10px; width: 100%; }
input[type="email"] {
  width: 100%; min-height: 54px; padding: 0 16px;
  font: 600 1.05rem var(--body); color: var(--ink);
  background: #fff; border: 3px solid var(--wood); border-radius: 14px;
}
input[type="email"]:focus { outline: none; border-color: var(--gold-deep); box-shadow: 0 0 0 4px rgba(245,176,42,.35); }
.form-msg { min-height: 1.6em; margin-top: 10px; font-weight: 700; }
.form-msg.ok { color: var(--leaf); }
.form-msg.err { color: var(--red); }
.fine { font-size: .85rem; color: var(--muted); }
form.done .field { display: none; }

/* Footer */
.foot { background: #1f130a; color: rgba(255,244,220,.75); padding: 26px 0 max(26px, env(safe-area-inset-bottom)); font-size: .92rem; }
.foot-inner { display: flex; flex-direction: column; gap: 10px; align-items: center; text-align: center; }
.foot nav { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; }
.foot a, .foot .linkish { color: var(--gold); }

/* Trailer dialog */
.trailer { padding: 0; border: 0; background: transparent; width: min(100vw - 24px, 1280px); max-width: none; max-height: none; }
.trailer::backdrop { background: rgba(15,9,4,.88); }
.trailer-box { position: relative; border: 4px solid var(--wood-dark); border-radius: 14px; overflow: hidden; background: #000; }
.trailer video { width: 100%; aspect-ratio: 16 / 9; background: #000; }
.trailer-close {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  width: 44px; height: 44px; border-radius: 50%;
  border: 3px solid var(--wood-dark); background: var(--cream); color: var(--ink);
  font: 900 1.1rem/1 var(--body); cursor: pointer;
}

@media (min-width: 720px) {
  :root { --gutter: 28px; }
  .beat { grid-template-columns: 1.15fr 1fr; gap: 40px; }
  .beat:nth-child(2) .beat-media { order: 2; }
  .field { flex-direction: row; }
  .field .btn { flex: none; }
  .learn-grid { grid-template-columns: 1.1fr 1fr; gap: 48px; }
  .player { width: min(460px, 100vw - 32px); height: min(940px, 100dvh - 32px); margin: auto; border: 6px solid var(--wood-dark); border-radius: 22px; overflow: hidden; }
  .cast-row { grid-auto-columns: 250px; padding-inline: max(var(--gutter), calc((100vw - 1080px) / 2)); }
  .foot-inner { flex-direction: row; justify-content: space-between; }
}
@media (min-width: 1100px) {
  .cast-row { grid-auto-flow: row; grid-template-columns: repeat(7, 1fr); overflow: visible; width: min(100% - 56px, 1400px); margin-inline: auto; padding-inline: 0; }
  .cast-card h3 { font-size: 1.2rem; }
  .cast-card p { font-size: .9rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .logo { animation: none; }
  .card, .phone { transition: none; }
}
