/* ---------------------------------------------------------------------------
   playtrumpdump.com

   Palette and motifs are taken from the game's own documented art rather than
   invented for the web: every colour below is a row in ASSET_REQUIREMENTS.md's
   palette table, and the bunting band is the podium obstacle's decoration.
   That decoration is VERTICAL stripes in the game for a structural reason - the
   same texture serves the ceiling obstacle via flip_v, and a hanging swag would
   sag upward when flipped - so vertical is the honest form to carry over here.

   It is tricolour drapery, NOT a flag: no stars, no canton, no device, no
   wordmark. STORE_REVIEW_NOTES.md section 4 draws that line hard, and it
   applies to the marketing surface as much as to the build.

   No webfonts. The privacy page should not make a third-party request to
   render the sentence "this app makes no network requests", so the type is a
   system stack and the whole site is self-contained.
   --------------------------------------------------------------------------- */

:root {
  --navy: #1b2a4a;
  --navy-2: #26385c;
  --navy-deep: #131f38;
  --gold: #e8b33c;
  --gold-deep: #b98a25;
  --cream: #f4f1e8;
  --red: #b33a3a;
  --sky: #476aa3;
  --ink: #23252b;

  --display: Impact, "Haettenschweiler", "Franklin Gothic Bold",
    "Arial Narrow", "Helvetica Neue", sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --measure: 68ch;
  --shell: 1140px;
  --radius: 3px;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--navy);
  color: var(--cream);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  overflow-x: hidden;
}

/* The signature. A 6px tricolour band pinned to the top of every page. */
.bunting {
  height: 5px;
  background: repeating-linear-gradient(
    90deg,
    var(--red) 0 9px,
    var(--cream) 9px 18px,
    var(--sky) 18px 27px
  );
}

.shell {
  width: min(100% - 2.5rem, var(--shell));
  margin-inline: auto;
}

/* ------------------------------------------------------------------ masthead */

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.35rem 0;
  flex-wrap: wrap;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: inherit;
}

.wordmark img {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: block;
}

.wordmark b {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.6rem;
  letter-spacing: 0.02em;
  color: var(--gold);
  text-transform: uppercase;
}

.nav {
  display: flex;
  gap: 1.6rem;
  font-size: 0.82rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  font-weight: 600;
}

.nav a {
  color: var(--cream);
  text-decoration: none;
  opacity: 0.72;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
}

.nav a:hover,
.nav a[aria-current="page"] {
  opacity: 1;
  border-bottom-color: var(--gold);
}

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

/* Desktop: the stage occupies column 1 across both rows; the two copy blocks
   stack in column 2. Mobile collapses to one column and the DOM order
   (headline, game, supporting copy) takes over. */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 370px) minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: clamp(2rem, 5vw, 4.5rem);
  row-gap: 1.4rem;
  align-content: center;
  padding: clamp(2rem, 5vw, 4rem) 0 clamp(2.5rem, 6vw, 5rem);
}

.hero .stage {
  grid-column: 1;
  grid-row: 1 / span 2;
  align-self: center;
}

.hero .copy-head {
  grid-column: 2;
  grid-row: 1;
  align-self: end;
}

.hero .copy-body {
  grid-column: 2;
  grid-row: 2;
  align-self: start;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 1.1rem;
}

.hero h1 {
  font-family: var(--display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(3.2rem, 9vw, 5.6rem);
  line-height: 0.86;
  letter-spacing: 0.005em;
  margin: 0 0 1.4rem;
  color: var(--cream);
}

.hero h1 em {
  font-style: normal;
  color: var(--gold);
  display: block;
}

.lede {
  font-size: 1.1rem;
  max-width: 46ch;
  margin: 0 0 2rem;
  color: rgba(244, 241, 232, 0.86);
}

/* --------------------------------------------------------------------- stage */

/* The playable canvas. Portrait 540x960, the project's own aspect ratio. */
.stage {
  position: relative;
  aspect-ratio: 540 / 960;
  max-height: 74vh;
  margin-inline: auto;
  width: 100%;
  background: var(--navy-deep);
  border: 3px solid var(--gold-deep);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.45);
}

.stage iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* Poster state. THE WASM IS 40 MB, so nothing loads until this is clicked -
   a marketing page that costs a mobile visitor 40 MB on arrival is a worse
   introduction than no playable build at all. */
.poster {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
  padding: 2rem 1.5rem;
  background: linear-gradient(170deg, var(--navy-2), var(--navy-deep));
  border: 0;
  width: 100%;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-align: center;
}

.poster img {
  width: 96px;
  height: 96px;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

/* Echoes the game's own boot splash, so the poster reads as the first frame
   rather than as a placeholder waiting for one. */
.poster-title {
  font-family: var(--display);
  font-size: 2.1rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--gold);
  line-height: 1;
  margin-top: 0.2rem;
}

/* The boot splash is the mark plus a plain gold rule and no text. Repeating the
   rule here is why the poster reads as this game's first frame rather than as a
   generic play button on a coloured box. */
.poster-rule {
  width: 74px;
  height: 2px;
  background: var(--gold-deep);
  margin: 0.15rem 0 0.5rem;
}

.poster .play-cta {
  font-family: var(--display);
  font-size: 1.9rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--navy);
  background: var(--gold);
  padding: 0.5rem 1.9rem;
  border-radius: var(--radius);
  border-bottom: 4px solid var(--gold-deep);
  transition: transform 0.14s ease, background 0.14s ease;
}

.poster:hover .play-cta,
.poster:focus-visible .play-cta {
  background: var(--cream);
  transform: translateY(-2px);
}

.poster small {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(244, 241, 232, 0.55);
}

.stage.is-live .poster {
  display: none;
}

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

.downloads {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  margin-bottom: 1.1rem;
}

.store {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.7rem 1.5rem 0.75rem;
  border: 2px solid rgba(244, 241, 232, 0.22);
  border-radius: var(--radius);
  background: transparent;
  color: rgba(244, 241, 232, 0.6);
  text-decoration: none;
  min-width: 176px;
  cursor: not-allowed;
}

.store span {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.19em;
  text-transform: uppercase;
}

.store b {
  font-size: 1.02rem;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.store-note {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: rgba(244, 241, 232, 0.45);
  margin: 0;
}

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

.band {
  border-top: 1px solid rgba(244, 241, 232, 0.13);
  padding: clamp(2.4rem, 5vw, 3.6rem) 0;
}

.band-tight {
  padding: clamp(1.8rem, 4vw, 2.6rem) 0;
}

h2 {
  font-family: var(--display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  letter-spacing: 0.02em;
  line-height: 1.05;
  color: var(--gold);
  margin: 0 0 1rem;
}

h3 {
  font-size: 1.02rem;
  font-weight: 680;
  letter-spacing: 0.01em;
  margin: 2rem 0 0.5rem;
  color: var(--cream);
}

p,
li {
  max-width: var(--measure);
}

a {
  color: var(--gold);
}

/* The disclaimer is spec section 3's required text and appears in-app verbatim.
   It is given its own band rather than buried in the footer for the same reason
   the About screen carries it two taps from the main menu. */
.disclaimer {
  background: var(--navy-deep);
}

.disclaimer p {
  max-width: 80ch;
  font-size: 0.95rem;
  color: rgba(244, 241, 232, 0.78);
  margin: 0;
}

/* -------------------------------------------------------------------- policy */

.doc {
  padding: clamp(2rem, 5vw, 3.2rem) 0 4rem;
}

.doc h1 {
  font-family: var(--display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  line-height: 0.94;
  letter-spacing: 0.015em;
  color: var(--gold);
  margin: 0 0 0.5rem;
}

.meta {
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.09em;
  color: rgba(244, 241, 232, 0.6);
  margin: 0 0 2.4rem;
  padding-bottom: 1.6rem;
  border-bottom: 1px solid rgba(244, 241, 232, 0.14);
}

.doc table {
  border-collapse: collapse;
  width: 100%;
  max-width: var(--measure);
  margin: 1rem 0 1.5rem;
  font-size: 0.93rem;
}

.doc th,
.doc td {
  text-align: left;
  padding: 0.5rem 0.9rem 0.5rem 0;
  border-bottom: 1px solid rgba(244, 241, 232, 0.13);
  vertical-align: top;
}

.doc th {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
}

.doc td code {
  font-family: var(--mono);
  font-size: 0.87rem;
  color: var(--gold);
}

.none {
  font-family: var(--display);
  font-size: 2.6rem;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0.4rem 0 1.2rem;
  letter-spacing: 0.02em;
}

/* Signature on the privacy page: the claim is verifiable from the artefact, so
   the page shows the command and its (empty) output instead of asserting it. */
.proof {
  background: var(--navy-deep);
  border: 1px solid rgba(232, 179, 60, 0.3);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: 1.15rem 1.3rem;
  margin: 1.4rem 0 1.8rem;
  max-width: var(--measure);
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.84rem;
  line-height: 1.75;
}

.proof .cmd {
  color: var(--cream);
}

.proof .cmd::before {
  content: "$ ";
  color: var(--gold);
}

.proof .out {
  color: rgba(244, 241, 232, 0.62);
}

.proof .note {
  color: var(--sky);
}

/* ----------------------------------------------------------------------- faq */

.faq {
  max-width: var(--measure);
}

.faq details {
  border-bottom: 1px solid rgba(244, 241, 232, 0.14);
}

.faq summary {
  cursor: pointer;
  padding: 1rem 0;
  font-weight: 640;
  font-size: 1.02rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  font-family: var(--mono);
  color: var(--gold);
  font-size: 1.3rem;
  line-height: 1;
  flex: none;
}

.faq details[open] summary::after {
  content: "\2212";
}

.faq details p {
  margin: 0 0 1.1rem;
  color: rgba(244, 241, 232, 0.82);
}

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

.footer {
  border-top: 1px solid rgba(244, 241, 232, 0.13);
  padding: 2rem 0 2.6rem;
  font-size: 0.85rem;
  color: rgba(244, 241, 232, 0.5);
  display: flex;
  justify-content: space-between;
  gap: 1rem 2rem;
  flex-wrap: wrap;
}

.footer a {
  color: rgba(244, 241, 232, 0.72);
  text-decoration: none;
  margin-right: 1.3rem;
}

.footer a:hover {
  color: var(--gold);
}

/* ---------------------------------------------------------------- responsive */

@media (max-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    row-gap: 1.8rem;
  }

  /* Hand placement back to the source order: headline, game, then the rest. */
  .hero .stage,
  .hero .copy-head,
  .hero .copy-body {
    grid-column: 1;
    grid-row: auto;
  }

  .stage {
    max-width: 330px;
    max-height: none;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 16px;
  }

  .nav {
    gap: 1.1rem;
    font-size: 0.74rem;
  }

  .store {
    min-width: 0;
    flex: 1 1 100%;
  }
}

/* ------------------------------------------------------------ accessibility */

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

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