/* Text pages (e.g. /conquer/): base.css's type, colours, header and footer,
   with a readable column and no motion or scripts. Lines are borders and
   solid fills, not backgrounds, so Samsung Internet's dark mode leaves them
   alone. */

.page-header {
  position: sticky;
  top: 0;
  background: rgb(5 8 31 / 0.9);
  border-bottom-color: var(--line);
  padding-block: 12px;
}
nav a[aria-current="page"] { color: var(--white); border: 1px solid var(--line-strong); padding-block: 8px; }

.article {
  max-width: 980px;
  margin: 0 auto;
  padding: clamp(28px, 6vw, 72px) var(--gutter) clamp(40px, 7vw, 80px);
}
.article section { padding-block: clamp(32px, 6vw, 56px); border-top: 1px solid var(--line); }

/* The h1 is the game's name, set by .game-name in base.css so it matches the
   home page's Games card. */
.article h2 { font-size: clamp(1.3rem, 3.4vw, 1.9rem); line-height: 1.15; margin-bottom: 22px; }
.article h3 { font-size: 0.95rem; letter-spacing: 0.05em; line-height: 1.3; color: #CFE0FF; margin: 0 0 6px; }
.article p, .article li { color: var(--dim); line-height: 1.65; }
.article strong { color: var(--white); font-weight: 600; }

/* --- The first screen: the pitch beside the game ------------------------ */

.intro { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 56px); align-items: center; padding-bottom: clamp(32px, 6vw, 56px); }
/* .subtitle and .lead are styled in base.css, shared with the home card. */
.hero-shot { margin: 0; justify-self: center; width: min(100%, 280px); }
/* The frame itself is .phone-frame in base.css, shared with the home card. */
@media (max-width: 720px) {
  .intro { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  /* On a phone the whole screen under the badge, never a crop (owner,
     2026-12-02), at the same width as on the home card. */
  .hero-shot { width: min(62vw, 240px); }
}

/* --- How to play: four picture cards ------------------------------------ */

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; counter-reset: step; }
.step { counter-increment: step; border: 1px solid var(--line-strong); border-radius: 16px; padding: 16px; margin: 0 !important; }
.step .board { display: block; width: 100%; max-width: 150px; height: auto; margin: 0 auto 14px; }
.step h3::before { content: counter(step) '. '; color: var(--red-on-dark); }
.step p { font-size: 0.95rem; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .steps { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .step { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px; align-items: center; padding: 12px; }
  .step .board { width: 96px; margin: 0; }
}

.board .grid { stroke: #2E3C62; stroke-width: 1; fill: none; }
.board .red { fill: var(--red-on-dark); }
.board .blue { fill: var(--ultramarine); stroke: #8FB4FF; stroke-width: 1.5; }
.board .ring { fill: none; stroke: #FFFFFF; stroke-width: 1.5; }
/* The boards are the app's own How to Play positions, drawn the app's way: a
   captured dot keeps its colour with a dark rim, an arrow marks the move. */
.board .dead { stroke: #05081F; stroke-width: 2.5; }
.board .target { fill: none; stroke: var(--red-on-dark); stroke-width: 1.5; stroke-dasharray: 2.5 2.5; }
.board .danger { fill: none; stroke: #FFFFFF; stroke-width: 1.5; stroke-dasharray: 3 3; }
.board .pointer { fill: none; stroke: #FFFFFF; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.board .captured { fill: #4A1F35; stroke: var(--red-on-dark); stroke-width: 2.5; stroke-linejoin: round; }
.board .captured-blue { fill: #14306B; stroke: var(--ultramarine); stroke-width: 2.5; stroke-linejoin: round; }

.good-to-know { margin-top: 22px; border-left: 3px solid var(--ultramarine); padding-left: 18px; }
.good-to-know ul { margin: 0; padding-left: 1.1em; }
.good-to-know li + li { margin-top: 6px; }

/* --- What's in Conquer --------------------------------------------------- */

.features { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 28px; }
@media (max-width: 640px) { .features { grid-template-columns: minmax(0, 1fr); } }
.features li { border-top: 1px solid var(--line); padding-top: 12px; }
.features strong { display: block; font-family: var(--tech); font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 2px; }

/* The screenshot carousel, in CSS alone (the page runs no script). Everywhere
   it is a strip that snaps one phone at a time. Where the browser has
   scroll-driven animations the phone in the middle stands forward and its
   neighbours lean back; where it has CSS carousels (Chrome 135+) arrows and
   dots appear and the scrollbar goes. Every screen, the first and last
   included, can come to the middle (owner, 2026-12-01: on a desktop the end
   screens were out of reach). The strip bleeds a gutter past the column on
   each side, and percentage padding is measured on the column, so the side
   padding adds that gutter back to make half the strip exactly. */
.gallery {
  --slide: min(62vw, 250px);
  --gap: clamp(10px, 3vw, 30px);
  anchor-name: --gallery;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: var(--slide);
  gap: var(--gap);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  padding: 26px calc(50% + var(--gutter) - var(--slide) / 2) 14px;
  margin: 24px calc(var(--gutter) * -1) 0;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
  scroll-marker-group: after;
  /* The strip fades out at both sides rather than stopping at a hard edge. */
  mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
}
/* Arrows and dots glide the strip rather than jump it (owner, 2026-12-01).
   The tilt follows the scroll, so it eases along with it. */
@media (prefers-reduced-motion: no-preference) { .gallery { scroll-behavior: smooth; } }
.gallery:focus-visible { outline: 2px solid #8FB4FF; outline-offset: -2px; }
.slide { margin: 0; scroll-snap-align: center; text-align: center; }
/* An arrow press scrolls most of a strip's width, which flew past several
   phones and landed wherever it snapped. Stopping at every phone makes each
   press, and each flick, move exactly one (owner, 2026-12-01). */
.slide { scroll-snap-stop: always; }
.slide img {
  display: block;
  width: 100%;
  height: auto;
  border: 7px solid #0D1435;
  border-radius: 28px;
  outline: 1px solid var(--line-strong);
  box-shadow: 0 22px 50px rgb(0 0 0 / 0.55), 0 0 60px rgb(31 107 255 / 0.25);
}
.slide figcaption {
  margin-top: 14px;
  font-family: var(--tech);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #CFE0FF;
}

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .slide {
      animation: stage linear both;
      animation-timeline: view(inline);
    }
    @keyframes stage {
      0% { transform: perspective(1200px) rotateY(-16deg) scale(0.86); opacity: 0.55; }
      50% { transform: perspective(1200px) rotateY(0deg) scale(1); opacity: 1; }
      100% { transform: perspective(1200px) rotateY(16deg) scale(0.86); opacity: 0.55; }
    }
  }
}

@supports (scroll-marker-group: after) {
  .gallery { scrollbar-width: none; }
  .gallery::scroll-marker-group {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
  }
  .slide::scroll-marker {
    content: '';
    width: 10px;
    height: 10px;
    border: 1px solid #8FB4FF;
    border-radius: 6px;
    transition: width 0.25s;
  }
  .slide::scroll-marker:target-current { width: 28px; background: #8FB4FF; }
  .slide::scroll-marker:focus-visible { outline: 2px solid #FFFFFF; outline-offset: 3px; }
  /* On a phone the arrows sit in the gutters, clear of the middle screen. */
  @media (max-width: 640px) {
    .gallery::scroll-button(*) { width: 38px; height: 38px; font-size: 1.3rem; }
    .gallery::scroll-button(left) { left: calc(anchor(left) + 6px); }
    .gallery::scroll-button(right) { right: calc(anchor(right) + 6px); }
  }
  .gallery::scroll-button(*) {
    position: absolute;
    position-anchor: --gallery;
    top: anchor(center);
    translate: 0 -50%;
    z-index: 2;
    width: 46px;
    height: 46px;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    background: rgb(5 8 31 / 0.85);
    color: #FFFFFF;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
  }
  .gallery::scroll-button(*):hover { border-color: #8FB4FF; }
  .gallery::scroll-button(*):focus-visible { outline: 2px solid #8FB4FF; outline-offset: 2px; }
  .gallery::scroll-button(*):disabled { opacity: 0.25; cursor: default; }
  .gallery::scroll-button(left) { content: '‹' / 'Previous screenshot'; left: calc(anchor(left) + max(10px, 6vw)); }
  .gallery::scroll-button(right) { content: '›' / 'Next screenshot'; right: calc(anchor(right) + max(10px, 6vw)); }
}
#in-the-app { position: relative; }

/* Tap a phone to see it bigger (owner, 2026-12-01): a lightbox on the HTML
   popover attribute, so still no script. Each phone is a button that opens
   its own popover; the X, Escape or a tap outside closes it. Sized from the
   screen's height, since the screenshots are tall: on a 900px desktop the
   image is about 740px tall. */
.enlarge {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 28px;
  background: none;
  color: inherit;
  cursor: zoom-in;
}
.enlarge:focus-visible { outline: 2px solid #8FB4FF; outline-offset: 4px; }
.enlarge img { transition: box-shadow 0.25s; }
.enlarge:hover img { box-shadow: 0 22px 50px rgb(0 0 0 / 0.55), 0 0 80px rgb(31 107 255 / 0.5); }
.zoom-hint {
  position: absolute;
  right: 16px;
  bottom: 16px;
  width: 38px;
  height: 38px;
  padding: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: rgb(5 8 31 / 0.82);
  fill: none;
  stroke: #FFFFFF;
  stroke-width: 2.2;
  stroke-linecap: round;
  transition: transform 0.2s, border-color 0.2s;
}
.enlarge:hover .zoom-hint { transform: scale(1.12); border-color: #8FB4FF; }

.lightbox {
  margin: auto;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
  color: var(--white);
  text-align: center;
}
.lightbox img {
  display: block;
  width: min(90vw, 42dvh, 480px);
  height: auto;
  border: 8px solid #0D1435;
  border-radius: 32px;
  outline: 1px solid var(--line-strong);
  box-shadow: 0 30px 80px rgb(0 0 0 / 0.7), 0 0 90px rgb(31 107 255 / 0.35);
}
.lightbox::backdrop { background: rgb(2 4 16 / 0.88); backdrop-filter: blur(6px); }
.lightbox-caption {
  margin: 14px 0 0;
  font-family: var(--tech);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #CFE0FF;
}
.lightbox-close {
  position: absolute;
  top: -16px;
  right: -16px;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: rgb(5 8 31 / 0.95);
  color: #FFFFFF;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}
.lightbox-close:hover { border-color: #8FB4FF; }
.lightbox-close:focus-visible { outline: 2px solid #8FB4FF; outline-offset: 2px; }
@media (max-width: 420px) { .lightbox-close { top: -12px; right: -8px; } }

/* It grows out of the page and fades back, rather than blinking on and off. */
@media (prefers-reduced-motion: no-preference) {
  .lightbox, .lightbox::backdrop {
    transition: opacity 0.28s ease, transform 0.28s ease, overlay 0.28s allow-discrete, display 0.28s allow-discrete;
  }
  .lightbox:not(:popover-open) { opacity: 0; transform: scale(0.92); }
  .lightbox:not(:popover-open)::backdrop { opacity: 0; }
  @starting-style {
    .lightbox:popover-open { opacity: 0; transform: scale(0.92); }
    .lightbox:popover-open::backdrop { opacity: 0; }
  }
}

.cta { margin-top: 28px; }
.cta-note { font-family: var(--tech); font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase; color: #CFE0FF !important; margin-top: 4px; }
.article .stores { margin: 0; }

/* --- Names --------------------------------------------------------------- */

.names { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.names li { border: 1px solid var(--line-strong); border-radius: 12px; padding: 10px 14px; display: flex; flex-direction: column; line-height: 1.3; }
.names .name { font-family: var(--tech); font-weight: 700; color: var(--white); letter-spacing: 0.04em; }
.names .where { font-size: 0.8rem; color: var(--dim); }

/* --- Questions and the close ---------------------------------------------- */

.faq h3 { margin-top: 22px; }
.faq h3:first-child { margin-top: 0; }
.outro p { margin-bottom: 18px; }
