/* Rope & Rubble website. The look follows the Art Style Guide and the game's UI (data/ui.json): gloom with warm
   pools of light, brass, leather and canvas, the game's own serif faces (OFL, from game/assets/fonts as WOFF2 subsets: tools/website/assets.py). */
@font-face {
  font-family: "Old Standard TT";
  src: url("/assets/fonts/OldStandard-Bold.woff2?v=e82b8c5426") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Libre Baskerville";
  src: url("/assets/fonts/LibreBaskerville-Variable.woff2?v=1dccb45363") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --bg: #0e0c0a;          /* ui.json background */
  --bg-raised: #17120d;
  --leather: #2a1a10;     /* ui.json leather */
  --leather-dark: #140c07;
  --brass: #b5894a;       /* ui.json brass */
  --brass-light: #e6c27a;
  --brass-dark: #5e4220;
  --lamp: #e0a24e;        /* the style guide's lamp amber */
  --canvas: #cfc09c;      /* ui.json cloth */
  --text: #ede6d6;        /* ui.json text */
  --text-dim: #b0a38f;    /* ui.json text_dim */
  --line: #3a2c1e;
  --danger: #e5484d;
  --ok: #8fc46a;
  --f-display: "Old Standard TT", "Libre Baskerville", Georgia, serif;
  --f-body: "Libre Baskerville", Georgia, "Times New Roman", serif;
  --wrap: 1100px;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 var(--f-body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }
a { color: var(--brass-light); text-underline-offset: 3px; }
a:hover { color: #fff3d6; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 700; line-height: 1.15; margin: 0 0 .5em; text-wrap: balance; }
h2 { font-size: clamp(28px, 4vw, 42px); }
h3, .h3 { font-size: 22px; }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--lamp); outline-offset: 3px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.narrow { max-width: 760px; }
.band { padding: clamp(56px, 9vw, 104px) 0; }
.eyebrow { font-family: var(--f-display); font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: var(--lamp); margin: 0 0 .6em; }
.lede { font-size: clamp(17px, 2vw, 19px); }
.muted { color: var(--text-dim); }
.small { font-size: 14px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--brass); color: #120c06; padding: 8px 14px; }
.skip:focus { left: 8px; }

/* Buttons: brass plates like the game's menus. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px; border-radius: 4px;
  font: 700 16px/1.2 var(--f-display); letter-spacing: .03em; text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: filter .15s, background-color .15s, border-color .15s;
}
.btn-brass {
  color: #1d1208;
  background: linear-gradient(180deg, var(--brass-light), var(--brass) 55%, #8e6732);
  border-color: #5e4220;
  box-shadow: inset 0 1px 0 rgba(255, 240, 200, .5), 0 2px 10px rgba(0, 0, 0, .5);
}
.btn-brass:hover { filter: brightness(1.08); color: #1d1208; }
.btn-ghost { color: var(--text); background: rgba(20, 12, 7, .55); border-color: rgba(230, 194, 122, .45); }
.btn-ghost:hover { border-color: var(--brass-light); color: #fff; }
.btn-small { min-height: 40px; padding: 8px 16px; font-size: 15px; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* Top bar */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 20; height: 60px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 var(--gutter);
  background: linear-gradient(180deg, rgba(10, 8, 6, .85), rgba(10, 8, 6, 0));
}
.topbar.scrolled { background: rgba(14, 12, 10, .94); border-bottom: 1px solid var(--line); }
.topbar-mark img { border-radius: 50%; }
.topbar-nav { display: flex; align-items: center; gap: clamp(10px, 2.4vw, 28px); font-family: var(--f-display); }
.topbar-nav a { color: var(--text); text-decoration: none; font-size: 15px; }
.topbar-nav a:hover { color: var(--brass-light); }
.topbar-cta { padding: 6px 14px; border: 1px solid rgba(230, 194, 122, .55); border-radius: 4px; }
@media (max-width: 560px) { .topbar-nav a:not(.topbar-cta) { display: none; } }

/* Hero */
.hero { position: relative; min-height: min(100svh, 980px); display: grid; align-items: end; overflow: hidden; }
.hero-art, .hero-art img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-art img { object-fit: cover; object-position: 60% 50%; }
.hero-shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(14, 12, 10, .2) 0%, rgba(14, 12, 10, 0) 30%, rgba(14, 12, 10, .55) 70%, var(--bg) 100%),
    linear-gradient(90deg, rgba(14, 12, 10, .7) 0%, rgba(14, 12, 10, 0) 60%);
}
.hero-copy { position: relative; padding: 120px var(--gutter) clamp(48px, 8vw, 96px); max-width: 860px; }
.hero-wordmark { margin: 0 0 18px; width: min(560px, 86vw); filter: drop-shadow(0 6px 24px rgba(0, 0, 0, .8)); }
.hero-hook { font-family: var(--f-display); font-size: clamp(24px, 3.6vw, 36px); line-height: 1.2; margin-bottom: .4em; text-shadow: 0 2px 12px #000; }
.hero-sub { font-size: clamp(16px, 2vw, 19px); color: var(--text); max-width: 34em; text-shadow: 0 1px 8px #000; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

/* Trailer */
.trailer { padding-top: 0; padding-bottom: clamp(24px, 4vw, 48px); }
.trailer + .band { padding-top: clamp(24px, 4vw, 48px); }
#about { padding-bottom: clamp(24px, 4vw, 48px); }
#gallery { padding-top: clamp(24px, 4vw, 48px); }
.video { position: relative; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; background: #000; border: 1px solid var(--line); box-shadow: 0 20px 60px rgba(0, 0, 0, .6); }
.video img, .video iframe, .video video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
.video video { object-fit: contain; }
.video-label {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 24px 20px;
  display: flex; flex-direction: column; gap: 2px; font-family: var(--f-display); font-size: 20px;
  background: linear-gradient(0deg, rgba(0, 0, 0, .8), rgba(0, 0, 0, 0));
}
.video-label .eyebrow { margin: 0; }
.video-play {
  position: absolute; inset: 0; margin: auto; width: 92px; height: 92px; border-radius: 50%;
  border: 2px solid var(--brass-light); background: rgba(14, 12, 10, .65); cursor: pointer;
}
.video-play::after { content: ""; position: absolute; left: 36px; top: 28px; border: 18px solid transparent; border-left: 28px solid var(--brass-light); border-right: 0; }

/* Pillars */
.pillars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 36px); margin-top: 48px; }
@media (max-width: 860px) { .pillars { grid-template-columns: 1fr; } }
.pillar img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; border: 1px solid var(--line); margin-bottom: 18px; }
.pillar h3 { font-size: clamp(18px, 1.5vw, 21px); text-wrap: nowrap; }
@media (max-width: 860px) { .pillar h3 { text-wrap: balance; } }
.pillar p { color: var(--text-dim); }


/* Gallery */
.gallery { list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 14px; }
.gallery a { display: block; border-radius: 4px; overflow: hidden; border: 1px solid var(--line); }
.gallery picture { display: block; }
.gallery img, .gallery video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .25s; }
.gallery a:hover img, .gallery a:hover video { transform: scale(1.03); }
.lightbox { padding: 0; border: 0; background: transparent; max-width: 96vw; max-height: 92vh; }
.lightbox::backdrop { background: rgba(0, 0, 0, .88); }
.lightbox img, .lightbox video { display: block; max-width: 96vw; max-height: 92vh; object-fit: contain; }
.lightbox-close { position: fixed; top: 12px; right: 16px; width: 44px; height: 44px; font-size: 30px; color: var(--text); background: rgba(0, 0, 0, .6); border: 1px solid var(--line); border-radius: 50%; cursor: pointer; }

/* Forms: a canvas-coloured card with leather ink, like the game's dialogue window */
.signup-band { background: radial-gradient(ellipse at 20% 40%, rgba(224, 162, 78, .12), transparent 60%), var(--bg); }
.signup-grid h2 { font-size: clamp(28px, 2.7vw, 38px); }
@media (min-width: 1000px) { .signup-grid h2 { text-wrap: nowrap; } }
.signup-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 400px); gap: clamp(28px, 5vw, 64px); align-items: start; }
@media (max-width: 860px) { .signup-grid { grid-template-columns: 1fr; } }
.card { background: var(--bg-raised); border: 1px solid var(--line); border-radius: 6px; padding: clamp(20px, 3vw, 32px); box-shadow: 0 16px 50px rgba(0, 0, 0, .45); }
.form { display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, fieldset legend { font-family: var(--f-display); font-size: 16px; }
.opt { font-family: var(--f-body); font-size: 13px; color: var(--text-dim); }
.hint { font-size: 13px; color: var(--text-dim); margin: 0; }
input[type=email], input[type=text], input[type=url], select, textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; border-radius: 4px;
  font: 16px/1.4 var(--f-body); color: var(--text); background: #0b0907; border: 1px solid #4a3826;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--lamp); outline: none; box-shadow: 0 0 0 3px rgba(224, 162, 78, .25); }
input[aria-invalid=true], select[aria-invalid=true] { border-color: var(--danger); }
fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
fieldset legend { margin-bottom: 6px; padding: 0; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice span { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 14px; border: 1px solid #4a3826; border-radius: 999px; font-size: 15px; background: #0b0907; }
.choice input:checked + span { background: var(--brass); color: #1d1208; border-color: var(--brass-light); }
.choice input:focus-visible + span { outline: 2px solid var(--lamp); outline-offset: 2px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.check input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--brass); flex: none; }
.form-status { margin: 0; min-height: 1.4em; font-size: 15px; }
.form-status.ok { color: var(--ok); }
.form-status.err { color: var(--danger); }
.form-note { margin: 0; }
.form.done > :not(.form-status):not(.form-done) { display: none; }
.form-done { display: none; }
.form.done .form-done { display: block; }
.conditional[hidden] { display: none; }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 48px 0 32px; background: var(--leather-dark); }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 28px; align-items: start; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-wordmark { width: 220px; margin-bottom: 10px; }
.social, .footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.card .social { flex-direction: row; flex-wrap: wrap; gap: 8px 18px; }
.social a, .footer-links a { color: var(--text-dim); text-decoration: none; }
.social a:hover, .footer-links a:hover { color: var(--brass-light); }
.copyright { margin-top: 28px; }

/* Consent bar */
.consent {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 40; max-width: 640px; margin: 0 auto;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; padding: 16px 18px;
  background: rgba(23, 18, 13, .97); border: 1px solid var(--brass-dark); border-radius: 6px; box-shadow: 0 10px 40px rgba(0, 0, 0, .6);
}
.consent p { margin: 0; flex: 1 1 280px; font-size: 14px; }
.consent-actions { display: flex; gap: 10px; }

/* The links page: the key art behind the menu, darkened so the buttons read */
.links-page {
  min-height: 100svh; display: flex; flex-direction: column; justify-content: center;
  background: linear-gradient(180deg, rgba(14, 12, 10, .55), rgba(14, 12, 10, .8) 60%, var(--bg)),
              url("/assets/img/hero-1600.webp?v=29a06e5855") center 40% / cover no-repeat;
}
@media (max-width: 700px) and (orientation: portrait) {
  .links-page { background-image: linear-gradient(180deg, rgba(14, 12, 10, .55), rgba(14, 12, 10, .8) 60%, var(--bg)), url("/assets/img/hero-tall-720.webp?v=1d09021612"); }
}

/* Plain pages (privacy, links, playtest) */
.page { padding: 110px 0 72px; }
.page-head { margin-bottom: 32px; }
.page h2 { font-size: 26px; margin-top: 1.6em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }
.linklist { list-style: none; padding: 0; margin: 0 auto; max-width: 460px; display: flex; flex-direction: column; gap: 12px; }
.linklist .btn { width: 100%; }
.playtest-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 620px); gap: clamp(28px, 5vw, 64px); align-items: start; }
@media (max-width: 960px) { .playtest-grid { grid-template-columns: 1fr; } }
.playtest-aside img { border-radius: 4px; border: 1px solid var(--line); margin-bottom: 20px; }
.steps { padding-left: 1.2em; }
.steps li { margin-bottom: .6em; }

/* The press and creator pages (/press/, /creators/): a fact sheet, download tiles and plain sections */
.kit-nav { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0 0 8px; padding: 0; list-style: none; font-family: var(--f-display); }
.kit-nav a { text-decoration: none; }
.prose ul.kit-nav, .prose ul.tiles, .prose ul.social { padding-left: 0; }
.kit-section { padding-top: 8px; }
.facts { display: grid; grid-template-columns: minmax(0, 190px) minmax(0, 1fr); margin: 0; border-top: 1px solid var(--line); }
.facts dt, .facts dd { margin: 0; padding: 10px 0; border-bottom: 1px solid var(--line); }
.facts dt { font-family: var(--f-display); color: var(--text-dim); padding-right: 16px; }
@media (max-width: 560px) { .facts { grid-template-columns: 1fr; } .facts dt { border-bottom: 0; padding-bottom: 0; } }
.tiles { list-style: none; padding: 0; margin: 20px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 16px; }
.tile { display: flex; flex-direction: column; gap: 8px; }
.tile img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 4px; border: 1px solid var(--line); background: #000; }
.tile.tall img { aspect-ratio: 16 / 9; object-fit: contain; }
.tile.logo img { object-fit: contain; padding: 16px; background: var(--bg-raised); }
.tile p { margin: 0; font-size: 14px; }
.copy-block { position: relative; }
.copy-block blockquote { margin: 0; padding: 16px 18px; border-left: 3px solid var(--brass); background: var(--bg-raised); border-radius: 0 4px 4px 0; }
.note-card { margin: 24px 0; }
.note-card h3 { margin-top: 0; }
