/* Aligned bars: the header and footer content follow the same 1200px column as the page. */
.bar { padding-inline: max(var(--gutter), calc((100% - 1200px) / 2)); }
.footer { padding-inline: max(var(--gutter), calc((100% - 1200px) / 2)); }

/* Story hero: the painted valley becomes the finished city as you scroll. */
.story-hero { position: relative; background: var(--navy); }
.story-track { height: 230vh; }
.story-stage { position: sticky; top: 56px; height: calc(100svh - 56px); min-height: 520px; overflow: hidden; display: flex; align-items: flex-end; }
.story-layers { position: absolute; inset: 0; transform: scale(calc(1 + var(--p, 0) * .07)); transform-origin: 62% 40%; will-change: transform; }
.story-layers img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 30% top; }
.story-layers .city { opacity: var(--mix, 0); }
.story-layers .valley { opacity: calc(1 - var(--mix, 0)); }
.story-glow { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(60% 50% at 70% 28%, rgba(255, 212, 90, calc(.22 + var(--mix, 0) * .12)), transparent 70%); mix-blend-mode: screen; }
.story-shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(8, 20, 42, .25) 0%, rgba(8, 20, 42, 0) 22%, rgba(8, 20, 42, .5) 48%, rgba(8, 20, 42, .9) 72%, rgba(8, 20, 42, .96) 100%); }
.story-copy { position: relative; z-index: 2; width: min(1200px, 100% - 2 * var(--gutter)); margin: 0 auto; padding-bottom: clamp(1.5rem, 5vh, 3rem); text-shadow: 0 2px 16px rgba(0, 0, 0, .55); }
.story-copy h1 { margin-block: .35rem .5rem; }
.story-lines { position: relative; height: 1.6em; margin: 0 0 .75rem; font-weight: 700; color: var(--gold); letter-spacing: .02em; }
.story-lines span { position: absolute; left: 0; top: 0; transition: opacity .6s ease, transform .6s ease; }
/* Both lines sit in the same spot, so exactly one may show. With the scroll story running it is the valley line (the city line would repeat the headline when it lands on Prospers); reduced motion shows the finished city, so it swaps to the city line below. */
.story-lines .b { display: none; }
.story-copy .stats { margin-top: 14px; }
.story-copy .hero-note { text-shadow: none; }
.story-cue { position: absolute; z-index: 2; right: max(var(--gutter), calc((100% - 1200px) / 2)); bottom: 22px; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .75); opacity: calc(1 - var(--p, 0) * 4); }
.play-shot { background: var(--navy); padding: clamp(2rem, 5vw, 4rem) 0; }
.play-shot .frame { width: min(1200px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.worlds { background: var(--navy); }
.worlds .grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 26px; padding: 0; list-style: none; }
.worlds figure { margin: 0; position: relative; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); aspect-ratio: 16 / 9; background: var(--deep); }
.worlds figure img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.worlds figure:hover img { transform: scale(1.04); }
.worlds figcaption { position: absolute; inset: auto 0 0 0; padding: 22px 12px 10px; background: linear-gradient(transparent, rgba(8, 20, 42, .92)); font-weight: 700; display: flex; justify-content: space-between; gap: 8px; }
.worlds figcaption small { font-weight: 600; color: var(--gold); }
.realm { position: relative; }
.realm img { width: 100%; max-height: 80vh; object-fit: cover; object-position: 30% top; }
.realm .realm-copy { position: absolute; inset: auto 0 0 0; padding: 0 var(--gutter) clamp(1.2rem, 4vw, 3rem); max-width: 1200px; margin: 0 auto; text-shadow: 0 2px 14px rgba(0, 0, 0, .6); }
@media (max-width: 900px) { .worlds .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) {
  .story-track { height: 200vh; }
  .story-layers img { object-position: 24% top; }
  .worlds .grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .story-track { height: auto; }
  .story-stage { position: relative; top: 0; height: auto; min-height: 80svh; }
  .story-layers { transform: none; }
  .story-layers .city { opacity: 1; } .story-layers .valley { opacity: 0; }
  .story-glow, .story-cue { display: none; }
  /* Reduced motion shows the finished city, so only its caption: the two lines are stacked in the same spot and drew over each other. */
  .story-lines .a { display: none; }
  .story-lines .b { display: inline; opacity: 1; transform: none; }
}

/* Phones: brand and Play Now stay on one line. */
@media (max-width: 600px) {
  .bar { flex-wrap: nowrap; gap: 8px; }
  .brand { font-size: 1rem; min-width: 0; }
  .brand span { white-space: nowrap; }
  .bar nav { flex-wrap: nowrap; }
}

/* Typewriter word in the headline: reserves the longest word's width so nothing jumps. */
.type { display: inline-block; min-width: 9.2ch; white-space: nowrap; }
.type::after { content: ""; display: inline-block; width: .06em; height: .85em; margin-left: .08em; vertical-align: -.06em; background: currentColor; animation: caret 1s steps(1) infinite; }
.type.done::after { animation: caret 1s steps(1) 3, fade .6s ease 3.2s forwards; }
@keyframes caret { 50% { opacity: 0; } }
@keyframes fade { to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .type::after { display: none; } }

/* Footer: logo, address and support email on the left, then three link columns of equal width, one disclaimer line, one copyright line.
   Footer links are plain and underline on hover and keyboard focus, like the header menu. */
.footer { grid-template-columns: 1.3fr 1fr 1fr 1fr; }
.footer address { font-style: normal; margin: 6px 0 0; line-height: 1.5; }
.footer .col { display: flex; flex-direction: column; gap: 8px; }
.footer .col a { color: #d7e3ef; text-decoration: none; }
.footer .col a:hover, .footer .col a:focus-visible { color: #fff; text-decoration: underline; }
.footer .footer-email { align-self: flex-start; overflow-wrap: anywhere; }
.footer .fine { grid-column: 1 / -1; }
@media (max-width: 900px) { .footer { grid-template-columns: repeat(3, minmax(0, 1fr)); } .footer .brandcol { grid-column: 1 / -1; } }
/* Phones: one column, and each link is a full 44px tap target. */
@media (max-width: 600px) { .footer { grid-template-columns: 1fr; } .footer .col { gap: 0; } .footer .col a:not(.footer-logo) { display: flex; align-items: center; min-height: 44px; } .footer .col strong { margin-bottom: 4px; } }

/* Blog */
.post { width: min(46rem, 100% - 2 * var(--gutter)); margin: 0 auto; padding: clamp(2rem, 6vw, 4rem) 0 clamp(3rem, 8vw, 6rem); }
.post h1 { margin: 0 0 .4rem; }
.post .byline { color: var(--muted); margin: 0 0 1.6rem; }
.post h2 { margin: 1.8rem 0 .5rem; }
.post p, .post li { line-height: 1.7; font-size: 1.08rem; color: var(--ink); }
.post .callout { border-left: 4px solid var(--gold); padding: 10px 16px; background: rgba(255, 255, 255, .06); border-radius: 0 var(--r) var(--r) 0; margin: 1.4rem 0; }
.post-list { display: grid; gap: 14px; margin: 1.6rem 0 0; padding: 0; list-style: none; }
.post-list a { display: block; padding: 18px 20px; border-radius: var(--r); background: rgba(255, 255, 255, .07); border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.post-list a:hover { border-color: var(--gold); }
.post-list strong { display: block; font-size: var(--fs-card); margin-bottom: 4px; }
.post-list span { color: var(--muted); }

/* The offer line and How It Works */
.offer { margin: .2rem 0 .8rem; font-size: clamp(1.05rem, 2.2vw, 1.5rem); font-weight: 800; line-height: 1.35; color: #fff; }
.offer span { white-space: nowrap; }
.how { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 26px 0 0; padding: 0; list-style: none; }
.how li { position: relative; padding: 22px 18px 18px; border-radius: var(--r); background: rgba(255, 255, 255, .07); border: 1px solid var(--line); }
.how li b { display: inline-grid; place-items: center; width: 48px; height: 44px; padding-bottom: 6px; border-radius: 0; clip-path: polygon(22% 0,78% 0,100% 28%,50% 100%,0 28%); background: var(--gold); color: var(--goldInk); font-size: 1.05rem; }
.how h3 { margin: 12px 0 6px; }
.how p { margin: 0; color: var(--ink); font-size: .98rem; }
.on-light .split h3 { margin-top: 0; }
@media (max-width: 900px) { .how { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .how { grid-template-columns: 1fr; } .offer span { white-space: normal; } }

/* Icons outside the game screenshots are one colour: the brand teal. */
.ico, .ticks .ic { color: var(--teal); }
.ico svg, .ticks .ic svg { width: 1.35em; height: 1.35em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.25em; }
.on-light .ico { color: var(--tealInk); }
.ticks .ic { display: inline-grid; place-items: center; }
#learn .cards { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1000px) { #learn .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { #learn .cards { grid-template-columns: 1fr; } }

/* Funding section on the dark background */
.cards.on-dark .card { background: rgba(255, 255, 255, .07); border: 1px solid var(--line); color: var(--ink); box-shadow: none; }
.cards.on-dark .card p { color: var(--ink); }
.cards.on-dark .ico { color: var(--teal); }
#build .cards { grid-template-columns: repeat(3, 1fr); }
#build .cards + h3 + .lede + .cards { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1000px) { #build .cards, #build .cards + h3 + .lede + .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { #build .cards, #build .cards + h3 + .lede + .cards { grid-template-columns: 1fr; } }

/* PB cube brand mark beside the live name (see the brand guide: cube beside live text, not the whole lockup at small sizes) */
.brand img { width: 40px; height: 40px; flex: none; object-fit: contain; }
@media (max-width: 600px) { .brand img { width: 34px; height: 34px; } }

/* Keep the shared Learn/Blog navigation usable without crowding the brand on phones. */
@media(max-width:600px){.bar{flex-wrap:wrap}.bar nav{width:100%;margin-left:0;gap:8px}.bar nav .btn{flex:1}.bar .brand{min-height:40px}}

/* Slightly quieter independence disclosure, with comfortable line spacing. */
.footer .fine.independence{font-size:.8rem;line-height:1.6}

/* Article media previews use the same responsive frame on blog and library cards. */
.article-card-image { display:block; width:100%; height:auto; aspect-ratio:16/9; object-fit:cover; border-radius:var(--r-sm); margin:0 0 1rem; }

/* Header menu: plain text links, with Play Now as the only button, so the one action that matters stands out (Jay, 2026-11-20).
   Each link keeps its 48px height as a tap target; only the box around it is gone. */
.bar nav { gap: 4px 24px; }
.bar nav .btn:not(.primary) { min-width: 0; padding: 4px 2px; border-color: transparent; background: none; color: #d7e3ef; }
.bar nav .btn:not(.primary):hover, .bar nav .btn:not(.primary):focus-visible { background: none; color: #fff; text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 7px; }
.bar nav .btn.primary { min-height: 44px; }
/* Phones: the links sit in one row under the logo, spread edge to edge, with Play Now at the right. */
@media (max-width: 600px) {
  .bar nav { justify-content: space-between; gap: 4px 10px; }
  .bar nav .btn { flex: 0 0 auto; white-space: nowrap; }
  .bar nav .btn:not(.primary) { font-size: .92rem; }
  .bar nav .btn.primary { padding-inline: 14px; font-size: .98rem; }
}

/* Gameplay film: the first thing under the hero, so a visitor sees the game before reading about it. The shared .frame supplies the border, corners and caption bar. */
.city-film { background: var(--navy); }
.city-film .frame { margin-top: 22px; }
.city-film video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; }
.film-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 22px; }
.price-note { margin: 12px 0 0; font-size: .95rem; font-weight: 700; color: var(--ink); max-width: 40rem; }
.film-actions .price-note { margin: 0; }
.closing .price-note { margin-inline: auto; }
