/* =========================================================================
   Postmark Digital: game product pages (/airline-architect/, …)
   Shared by every generated page. Each page sets its own color tokens in an
   inline :root block from _product-pages/games/<slug>.json → "theme":
     --bg --bg-alt --surface --border --ink --ink-soft --accent
     --cta --cta-ink --cta-hover
   ========================================================================= */
:root {
  --font: "Karla", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --maxw: 1120px;
  --pad: clamp(16px, 5vw, 48px);
  --radius: 16px;
  --device-bezel: linear-gradient(160deg, #2b3254 0%, #0a0f22 60%);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); }
h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.65rem, 3.6vw, 2.4rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0; }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); }

/* ------------------------------- Buttons ------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .05s ease;
}
.btn:active { transform: translateY(1px); }
.btn--cta { background: var(--cta); color: var(--cta-ink); }
.btn--cta:hover { background: var(--cta-hover); }
.btn--ghost {
  color: var(--ink);
  border: 1.5px solid var(--border);
  background: color-mix(in srgb, var(--bg) 50%, transparent);
}
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn--small { min-height: 38px; padding: 7px 16px; font-size: .92rem; border-radius: 10px; }
.badge-link { display: inline-block; vertical-align: middle; }  /* centres in text-align:center boxes; img is display:block */
.badge-link img { height: 54px; width: auto; }
.badges { display: inline-flex; flex-wrap: wrap; gap: 12px; vertical-align: middle; }  /* App Store + Google Play */
.final .badges { justify-content: center; }
.hero__actions .badges { flex-basis: 100%; }  /* "See how it plays" goes on its own line below the two badges */

/* ------------------------------- Top bar ------------------------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px var(--pad);
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}
.topbar__brand img { height: 52px; width: auto; }
.topbar__nav { display: flex; align-items: center; gap: clamp(14px, 3vw, 28px); font-weight: 500; }
.topbar__nav a:not(.btn) { color: var(--ink-soft); text-decoration: none; }
.topbar__nav a:not(.btn):hover { color: var(--ink); }

/* Decorative glows (e.g. .row__media::before) extend past the content box; clip them at the page edge so
   a 375px phone never scrolls sideways. clip (not hidden) keeps main from becoming a scroll container. */
main { overflow-x: hidden; overflow-x: clip; }

/* ------------------------------- Reviews -------------------------------- */
/* Selected App Store reviews in a horizontal, snap-scrolling row. The first card lines up with the page's
   content column; on phones the next card peeks in so the row reads as swipeable. */
.reviews { --edge: max(var(--pad), calc((100% - var(--maxw)) / 2 + var(--pad))); padding-block: clamp(48px, 7vw, 88px); }
.reviews [hidden] { display: none !important; }
.reviews__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 32px; margin-bottom: 22px; }
.reviews__head h2 { font-size: clamp(1.8rem, 3.6vw, 2.5rem); margin-bottom: 12px; }
.rating { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.rating__value { font-size: clamp(2.4rem, 5vw, 3.1rem); font-weight: 800; line-height: 1; letter-spacing: -0.03em; }
.rating__outof { margin-left: -6px; color: var(--ink-soft); font-size: 1rem; font-weight: 600; }
.rating .stars { font-size: 1.6rem; }
.rating__meta { flex-basis: 100%; color: var(--ink-soft); font-size: .92rem; }
.reviews__note { flex-basis: 100%; margin: 0; color: var(--ink-soft); font-size: .9rem; }
.reviews__note a { color: var(--accent); }

/* Stars: a hollow outline for every slot (visible against the page, 3:1+) with solid gold drawn over the earned
   part. Filled vs empty differ by SHAPE, not just colour. */
.stars {
  --star: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.6l2.8 6 6.6.8-4.9 4.5 1.3 6.5L12 17.2l-5.8 3.2 1.3-6.5-4.9-4.5 6.6-.8z'/%3E%3C/svg%3E");
  --star-outline: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.6l2.8 6 6.6.8-4.9 4.5 1.3 6.5L12 17.2l-5.8 3.2 1.3-6.5-4.9-4.5 6.6-.8z' fill='none' stroke='black' stroke-width='1.6' stroke-linejoin='round'/%3E%3C/svg%3E");
  position: relative; display: inline-block; width: 5em; height: 1em; vertical-align: middle;
}
.stars::before {
  content: ""; position: absolute; inset: 0;
  background: rgba(200, 200, 200, .7); background: color-mix(in srgb, var(--ink) 60%, transparent);
  -webkit-mask: var(--star-outline) left / 1em 1em repeat-x; mask: var(--star-outline) left / 1em 1em repeat-x;
}
.stars__fill {
  position: absolute; inset: 0 auto 0 0; background: #F5B301;
  -webkit-mask: var(--star) left / 1em 1em repeat-x; mask: var(--star) left / 1em 1em repeat-x;
}
.stars--sm { font-size: 1.05rem; }
.review__stars { order: -1; }   /* drawn above the title, read after it */
@media (forced-colors: active) {
  .stars::before, .stars__fill { forced-color-adjust: none; }
  .stars::before { background: CanvasText; }
  .stars__fill { background: Highlight; }
}

.reviews__nav { display: flex; gap: 8px; }
.reviews__nav button {
  width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--border); background: transparent;
  color: var(--ink); font-size: 1.15rem; cursor: pointer;
}
.reviews__nav button:hover { border-color: var(--accent); color: var(--accent); }
@media (hover: none) and (pointer: coarse) { .reviews__nav { display: none; } }   /* touch: swipe instead */

.reviews__scroller {
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--edge); overscroll-behavior-x: contain;
  padding: 4px 0 20px; scrollbar-width: thin; scrollbar-color: var(--ink-soft) transparent;
}
.reviews__scroller:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.reviews__list { list-style: none; margin: 0; padding: 0 var(--edge); width: max-content; display: flex; align-items: stretch; gap: 16px; }
.review {
  flex: 0 0 min(340px, 82vw); scroll-snap-align: start; display: flex; flex-direction: column; gap: 10px;
  padding: 22px 22px 18px; border: 1px solid var(--border); border-radius: 18px; background: var(--surface);
}
.review__title { margin: 0; font-size: 1.08rem; font-weight: 700; line-height: 1.3; }
.review__body { margin: 0; color: var(--ink-soft); font-size: .98rem; line-height: 1.55; white-space: pre-line; }
.review__body.is-clamped { display: -webkit-box; -webkit-line-clamp: 7; -webkit-box-orient: vertical; overflow: hidden; }
.review__more, .review__orig-toggle {
  align-self: flex-start; padding: 0; border: 0; background: none; color: var(--accent);
  font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer;
}
.review__translated { margin: 0; color: var(--ink-soft); font-size: .82rem; font-style: italic; }
.review__original { padding-left: 10px; border-left: 2px solid var(--border); color: var(--ink-soft); font-size: .9rem; white-space: pre-line; }
.review__original p { margin: 0 0 4px; }
.review__title-orig { font-weight: 700; }
.review__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: auto 0 0; padding-top: 4px; color: var(--ink-soft); font-size: .85rem; }
.review__store { text-decoration: none; }
/* 4-5 star reviews that are mainly asks: stars and the reviewer's name only, as compact chips under the cards. */
.reviews__also { margin-top: 10px; }
.also__h { margin: 0 0 10px; color: var(--ink-soft); font-size: .9rem; font-weight: 600; }
.also__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.also__item {
  display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 6px 12px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--ink-soft); font-size: .85rem;
}
.also__item > span:not(.stars) { overflow-wrap: anywhere; }

/* Long compound words (German) must wrap inside narrow cards: hyphenate translated pages, and let any
   word that still can't fit break rather than overflow. A no-op for text that already fits. */
p, li, h1, h2, h3 { overflow-wrap: break-word; }
:lang(de) p, :lang(de) li, :lang(de) h2, :lang(de) h3,
:lang(nl) p, :lang(nl) li, :lang(nl) h2, :lang(nl) h3 { hyphens: auto; -webkit-hyphens: auto; }

/* -------------------------------- Hero --------------------------------- */
.hero { position: relative; isolation: isolate; overflow: hidden; }
.hero__media {                    /* starts 120px before the copy column ends, so the fade overlaps it */
  position: absolute;
  inset: 0;
  left: calc(max(0px, (100% - var(--maxw)) / 2) + var(--pad) + 440px);
  z-index: -1;
}
.hero__bg { width: 100%; height: 100%; object-fit: cover; }
.hero__media::after {               /* melt the art into the page on the left and bottom */
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 55%, transparent) 20%, transparent 46%),
    linear-gradient(0deg, var(--bg) 0%, transparent 28%);
}
.hero__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  min-height: min(760px, 88vh);
  padding: clamp(48px, 8vw, 104px) var(--pad);
  display: flex;
  align-items: center;
}
.hero__copy { max-width: 560px; }
.hero__icon { width: 88px; height: 88px; margin-bottom: 24px; filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .5)); }
.hero__title { font-size: clamp(2.7rem, 6vw, 4.4rem); font-weight: 800; letter-spacing: -0.035em; line-height: 1.02; }
.hero__title span {
  display: block;
  margin-top: 14px;
  font-size: clamp(1.15rem, 2.1vw, 1.45rem);
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.3;
  color: var(--accent);
}
.hero__lede { margin: 22px 0 30px; font-size: clamp(1.05rem, 1.7vw, 1.18rem); color: var(--ink-soft); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.chips { list-style: none; margin: 26px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
  padding: 5px 12px;
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 500;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 75%, transparent);
}

/* ------------------------------- Devices ------------------------------- */
.phone {
  margin: 0;
  padding: 3.2%;
  border-radius: 15% / 7%;
  background: var(--device-bezel);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .09), 0 0 0 1px #000, 0 34px 70px -24px rgba(0, 0, 0, .75);
}
.phone img { width: 100%; border-radius: 12.5% / 5.8%; }
.tablet {
  margin: 0;
  padding: 2.4%;
  border-radius: 5.5% / 4.2%;
  background: var(--device-bezel);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .09), 0 0 0 1px #000, 0 34px 70px -24px rgba(0, 0, 0, .75);
}
.tablet img { width: 100%; border-radius: 3.6% / 2.7%; }

/* -------------------------------- Stats -------------------------------- */
.stats { background: var(--bg-alt); border-block: 1px solid var(--border); }
.stats ul {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 28px var(--pad);
  list-style: none;
  display: grid;
  grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr));  /* --cols set by build.py when a page has more or fewer than 4 */
  gap: 20px;
}
.stats li { text-align: center; }
.stats strong { display: block; font-size: clamp(1.9rem, 3.4vw, 2.6rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.stats span { display: block; margin-top: 6px; color: var(--ink-soft); font-size: .92rem; line-height: 1.35; }

/* ------------------------------ Sections ------------------------------- */
.intro { max-width: 820px; text-align: center; padding-block: clamp(64px, 10vw, 120px) clamp(24px, 4vw, 48px); }
.intro h2 { margin-bottom: 22px; }
.intro p { color: var(--ink-soft); font-size: 1.1rem; }
.intro p + p { margin-top: 16px; }

.eyebrow {
  margin-bottom: 12px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
}

.rows { display: grid; gap: clamp(64px, 10vw, 128px); padding-block: clamp(40px, 6vw, 80px); }
.row { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 6vw, 88px); align-items: center; }
.row--flip .row__media { order: 2; }
.row__media { position: relative; isolation: isolate; justify-self: center; width: min(290px, 100%); }
.row__media::before {               /* soft glow behind each device */
  content: "";
  position: absolute;
  inset: 8% -35%;
  z-index: -1;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 20%, transparent), transparent);
}
.row__copy h2 { margin-bottom: 18px; }
.row__copy p:not(.eyebrow) { max-width: 56ch; color: var(--ink-soft); font-size: 1.08rem; }

.details, .world, .related { padding-block: clamp(56px, 8vw, 96px); }
.details > h2, .world > h2, .related > h2 { text-align: center; margin-bottom: clamp(28px, 4vw, 48px); }
.grid { display: grid; gap: 20px; }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card { padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--ink-soft); font-size: .98rem; }
.card--shot { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 26px; align-items: center; }
.card--shot .phone { width: 100%; }
.world { border-top: 1px solid var(--border); }

.devices {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(28px, 6vw, 80px);
  align-items: center;
  padding-block: clamp(56px, 8vw, 96px);
  border-top: 1px solid var(--border);
}
.devices p { margin: 18px 0 22px; color: var(--ink-soft); font-size: 1.08rem; }
.devices .tablet { justify-self: center; width: min(500px, 100%); }

.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 32px; text-align: left; }
.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .2em;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--cta) 20%, transparent);
  border: 1px solid color-mix(in srgb, var(--cta) 55%, transparent);
}
.ticks li::after {                  /* check mark */
  content: "";
  position: absolute;
  left: 8px;
  top: calc(.2em + 5px);
  width: 6px;
  height: 10px;
  border: solid var(--cta);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.pricing { padding-block: clamp(32px, 6vw, 72px); }
.pricing__card {
  max-width: 780px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 56px);
  text-align: center;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: radial-gradient(120% 140% at 50% 0%, color-mix(in srgb, var(--accent) 14%, var(--surface)) 0%, var(--surface) 62%);
}
.pricing__card p { max-width: 58ch; margin: 16px auto 24px; color: var(--ink-soft); font-size: 1.08rem; }
.pricing .ticks { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 28px; margin-bottom: 30px; }

.faq { max-width: 860px; padding-block: clamp(56px, 8vw, 96px); }
.faq > h2 { text-align: center; margin-bottom: 32px; }
.faq details { border-bottom: 1px solid var(--border); }
.faq details:first-of-type { border-top: 1px solid var(--border); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 4px;
  list-style: none;
  cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary h3 { font-size: 1.08rem; }
.faq summary::after { content: "+"; flex: none; font-size: 1.6rem; line-height: 1; color: var(--accent); transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { max-width: 70ch; padding: 0 4px 22px; color: var(--ink-soft); }

.final {
  text-align: center;
  padding-block: clamp(64px, 10vw, 128px);
  background: radial-gradient(70% 120% at 50% 100%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 70%), var(--bg-alt);
  border-block: 1px solid var(--border);
}
.final h2 { font-size: clamp(1.9rem, 4.4vw, 3rem); }
.final p { margin: 14px auto 28px; color: var(--ink-soft); font-size: 1.1rem; }

.related__card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink-soft);
  text-decoration: none;
  transition: border-color .15s ease, transform .15s ease;
}
.related__card:hover { border-color: var(--accent); transform: translateY(-2px); }
.related__card img { flex: none; width: 64px; height: 64px; }
.related__card strong { display: block; color: var(--ink); font-size: 1.05rem; }

.foot { padding-block: 32px 48px; color: var(--ink-soft); font-size: .88rem; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-bottom: 14px; font-size: .95rem; }
.foot a { color: var(--ink); text-decoration: none; }
.foot a:hover { color: var(--accent); }

/* ----------------------------- Responsive ------------------------------ */
@media (max-width: 1180px) {
  .hero__copy { max-width: 500px; }
}
@media (max-width: 960px) {
  .hero__media { position: relative; inset: auto; left: auto; aspect-ratio: 16 / 10; }
  .hero__media::after { background: linear-gradient(0deg, var(--bg) 0%, transparent 45%); }
  .hero__inner { min-height: 0; margin-top: -72px; padding-top: 0; }
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .devices { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .row { grid-template-columns: 1fr; }
  .row .row__media { order: 2; width: min(260px, 70vw); }
  .stats ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats li:last-child:nth-child(odd) { grid-column: 1 / -1; }  /* an odd count: the last stat spans both columns */
  .grid--2 { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .card--shot { grid-template-columns: 110px minmax(0, 1fr); gap: 18px; }
  .topbar__nav a:not(.btn) { display: none; }
  .grid--4 { grid-template-columns: 1fr; }
  .intro { text-align: left; }
  .hero__actions .btn { flex: 1 1 auto; }
  .badges .badge-link img { height: 44px; }  /* two store badges fit side by side on a phone (Apple's minimum is 40px) */
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
