:root {
  --ground: #0b0c0e;
  --ink: #f6f3ec;
  --ink2: rgba(246,243,236,.72);
  --ink3: rgba(246,243,236,.5);
  --on-ink: #0b0c0e;
  --gold: #e8c66a;
  --glass: rgba(255,255,255,.09);
  --glass-line: rgba(255,255,255,.16);
  --shadow-raised: 0 12px 32px rgba(0,0,0,.45);
  --motion-fast: 150ms;
  --motion-enter: 300ms;
  --allies-deep: #14130c;
  --allies-kicker: #e8c66a;
  --allies-line: rgba(232,198,106,.85);
  --allies-wash: rgba(107,125,58,.7);
  --allies-glow-soft: rgba(150,118,52,.16);
  --axis-deep: #150d0d;
  --axis-kicker: #ff5a4f;
  --axis-line: rgba(196,40,36,.9);
  --axis-wash: rgba(179,22,27,.7);
  --scene-light: linear-gradient(to bottom, rgba(255,240,210,.16), rgba(255,240,210,0) 45%);
  --scene-opacity: 0.85;
  --scene-scale: 1.15;
  --reel-ground: #0d0b08;
  --reel-grain: 0.22;
  --reel-sepia: rgba(120,92,52,.28);
  --reel-veil: linear-gradient(to bottom, rgba(13,11,8,.8) 0%, rgba(13,11,8,.72) 35%, rgba(13,11,8,.94) 85%);
  --reel-shot: 5000ms;
  --reel-life: 7400ms;
  --r-xxs: 4px;
  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-xl: 28px;
  --r-full: 999px;
  --tier-common: #a39e93;
  --tier-uncommon: #c08a5b;
  --tier-rare: #cfd3d6;
  --tier-super_rare: #e8c66a;
  --tier-ultra_rare: #ec9a72;
  --tier-legendary: #f6ead0;
}
@keyframes reel {
  0% { transform: translate(var(--x0), var(--y0)) scale(var(--s0)); }
  16.216% { opacity: 1; }
  83.784% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--x1), var(--y1)) scale(var(--s1)); }
}
/* The landing page's styles (docs/landing.md), inlined in the page by build.mjs. Colours, radii,
   durations and the archive film's grade are not written here: build.mjs writes them as custom
   properties from the app's own sources (apps/app/lib/design.ts, lib/archive-reel.ts,
   packages/shared/src/tier-accent.ts). Mobile first: a phone of 360 px, then wider. */

@font-face {
  font-family: 'Barlow Condensed';
  font-weight: 800;
  font-display: swap;
  src: url('/landing/fonts/BarlowCondensed_800ExtraBold.woff2') format('woff2');
}
@font-face {
  font-family: 'Figtree';
  font-weight: 400;
  font-display: swap;
  src: url('/landing/fonts/Figtree_400Regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Figtree';
  font-weight: 600;
  font-display: swap;
  src: url('/landing/fonts/Figtree_600SemiBold.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-weight: 500;
  font-display: swap;
  src: url('/landing/fonts/IBMPlexMono_500Medium.woff2') format('woff2');
}

:root {
  --condensed: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --body: 'Figtree', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  /* the type scale of the page: titles grow with the screen, the text does not */
  --t-hero: clamp(3.25rem, 11vw, 6.5rem);
  --t-title: clamp(2.25rem, 7vw, 3.75rem);
  --t-stat: clamp(2rem, 6vw, 3rem);
  --t-lead: 1.125rem;
  --t-body: 1rem;
  --t-small: 0.875rem;
  --t-kicker: 0.75rem;
  --gutter: 16px;
  --section: clamp(64px, 12vw, 128px);
  --max: 1120px;
  --phone-ratio: 390 / 844;
  color-scheme: dark;
}

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

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

/* The battlefield behind the page, as behind the app's screens (components/ui/Scene.tsx): the
   page's scene (build.mjs, `--scene`), blurred already, under its camp's grade and a light from
   the top. Fixed: the page scrolls over it. */
body::before,
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
body::before {
  background: var(--scene) center / cover no-repeat;
  opacity: var(--scene-opacity);
  transform: scale(var(--scene-scale));
}
body::after {
  background: var(--scene-light), var(--scene-grade);
}

body {
  margin: 0;
  background: var(--scene-ground);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--t-body);
  line-height: 1.55;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
}
[hidden] {
  display: none !important;
}

a {
  color: inherit;
}

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

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 50;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--on-ink);
  border-radius: var(--r-full);
  font-weight: 600;
}
.skip:focus {
  top: 12px;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- words ---------- */

.kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  color: var(--gold);
  font-size: var(--t-kicker);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.kicker::before {
  content: '';
  width: 18px;
  height: 2px;
  background: currentColor;
}

.title {
  margin: 0 0 16px;
  font-family: var(--condensed);
  font-size: var(--t-title);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  text-wrap: balance;
}

.text {
  margin: 0 0 20px;
  max-width: 36em;
  color: var(--ink2);
  font-size: var(--t-lead);
}

.points {
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}
.points li {
  position: relative;
  padding-left: 22px;
  color: var(--ink2);
}
.points li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 10px;
  height: 2px;
  background: var(--gold);
}

/* ---------- buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 28px;
  border-radius: var(--r-full);
  background: var(--gold);
  color: var(--on-ink);
  font-family: var(--condensed);
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
  box-shadow: var(--shadow-raised);
  transition:
    transform var(--motion-fast) ease,
    filter var(--motion-fast) ease;
}
.button:hover {
  filter: brightness(1.08);
}
.button:active {
  transform: scale(0.97);
}
.button svg {
  width: 18px;
  height: 18px;
}
.button--small {
  min-height: 40px;
  padding: 0 18px;
  font-size: 1.0625rem;
  box-shadow: none;
}
.button--large {
  min-height: 60px;
  padding: 0 36px;
  font-size: 1.625rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
}

.reassure {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  color: var(--ink2);
  font-size: var(--t-small);
}
.reassure li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.reassure li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
}

.link {
  color: var(--gold);
  font-weight: 600;
  text-underline-offset: 3px;
}

/* ---------- header ---------- */

.top {
  position: absolute;
  inset: 0 0 auto;
  z-index: 10;
  padding-top: max(12px, env(safe-area-inset-top));
}
.top .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.lang {
  color: var(--ink2);
  font-size: var(--t-small);
  font-weight: 600;
  text-decoration: none;
  padding: 8px 4px;
}
.lang:hover {
  color: var(--ink);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  text-decoration: none;
}
.logo svg {
  width: 46px;
  height: 31px;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.85));
}
.logo-rule {
  width: 2px;
  height: 27px;
  background: var(--gold);
}
.logo-name {
  display: grid;
  font-family: var(--condensed);
  font-size: 1.1875rem;
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: 0.06em;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9);
}
.logo-name span:last-child {
  color: var(--gold);
}

/* ---------- hero and its archive film ---------- */

.hero {
  position: relative;
  isolation: isolate;
}
/* what stays on screen while the title's pack opens (pack-opening.js): the section grows by the
   scroll it takes, and a title taller than the screen pins once its bottom shows (--pin-top) */
.hero-pin {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: calc(88px + env(safe-area-inset-top)) 0 56px;
  overflow: hidden;
}
/* the scroll it takes: content, not padding, as a pinned box never moves into its parent's padding */
.hero.is-scrubbing::after {
  content: '';
  display: block;
  height: 150svh;
}
.hero.is-scrubbing .hero-pin {
  position: sticky;
  top: var(--pin-top, 0px);
}

.reel {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: var(--reel-ground);
}
/* Each photograph is on screen only for its time in the film, two at most at once (landing.js),
   as in the app: a phone holds them in its graphics memory while they show, and nine layers of
   photographs bigger than the screen per film overflowed it (the page shook on scroll). */
.shot {
  position: absolute;
  inset: 0;
  background-image: var(--img-s, none);
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: translate(var(--x0), var(--y0)) scale(var(--s0));
}
@media (min-width: 700px) {
  .shot {
    background-image: var(--img-l, none);
  }
}
/* the still, until the film rolls (always without JavaScript or with less motion): its first
   photograph, and the photograph the film opens on */
.reel:not(.is-rolling) .shot:first-child,
.shot.is-lead {
  opacity: 1;
}
.shot.is-on {
  animation: reel var(--reel-life) linear both;
}
.reel.is-paused .shot {
  animation-play-state: paused;
}
.reel-grain {
  position: absolute;
  inset: 0;
  background: url('/landing/img/grain.png') repeat;
  opacity: var(--reel-grain);
}
.reel-sepia {
  position: absolute;
  inset: 0;
  background: var(--reel-sepia);
}
.reel-veil {
  position: absolute;
  inset: 0;
  background: var(--reel-veil);
}
/* the film dissolves into the page's scene: below it, and above it for the last call */
.reel {
  --fade: 120px;
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - var(--fade)), transparent);
  mask-image: linear-gradient(to bottom, #000 calc(100% - var(--fade)), transparent);
}
.reel--final {
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent,
    #000 var(--fade),
    #000 calc(100% - var(--fade)),
    transparent
  );
  mask-image: linear-gradient(
    to bottom,
    transparent,
    #000 var(--fade),
    #000 calc(100% - var(--fade)),
    transparent
  );
}

.hero-grid {
  display: grid;
  gap: 48px;
  align-items: center;
}
.hero-title {
  margin: 0 0 18px;
  font-family: var(--condensed);
  font-size: var(--t-hero);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  white-space: pre-line;
}
.hero-lead {
  margin: 0 0 28px;
  max-width: 34em;
  color: var(--ink2);
  font-size: var(--t-lead);
}
.hero-media {
  display: flex;
  justify-content: center;
}

@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  }
}

/* ---------- a phone and its screen ---------- */

.phone {
  --phone-w: 280px;
  position: relative;
  width: var(--phone-w);
  aspect-ratio: var(--phone-ratio);
  padding: calc(var(--phone-w) * 0.028);
  border-radius: calc(var(--phone-w) * 0.13);
  background: linear-gradient(145deg, #2a2a2e, #0e0e10 60%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08) inset,
    0 30px 80px rgba(0, 0, 0, 0.6),
    0 0 60px var(--allies-glow-soft);
  flex: none;
}
.screen {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: calc(var(--phone-w) * 0.105);
  /* what shows while the stills load, or if one is missing: the app's own ground */
  background:
    radial-gradient(ellipse at 50% 35%, var(--allies-glow-soft), transparent 70%),
    var(--allies-deep);
}
.screen > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- figures ---------- */

.stats {
  position: relative;
  margin-top: -24px;
}
.stats ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--glass);
  border: 1px solid var(--glass-line);
}
/* a hairline between figures: on each one's top and left, the outer ones cut by the frame */
.stats li {
  display: grid;
  gap: 4px;
  padding: 20px 18px;
  box-shadow: -1px -1px 0 var(--glass-line);
}
.stats strong {
  font-family: var(--mono);
  font-size: var(--t-stat);
  font-weight: 500;
  line-height: 1;
  color: var(--ink);
}
.stats span {
  color: var(--ink2);
  font-size: var(--t-small);
}
@media (min-width: 760px) {
  .stats ul {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* ---------- sections ---------- */

.section {
  padding: var(--section) 0 0;
}
.section-head {
  max-width: 44em;
  margin-bottom: 32px;
}

.feature {
  display: grid;
  gap: 40px;
  align-items: center;
}
.feature-media {
  display: flex;
  justify-content: center;
  gap: 16px;
}
@media (min-width: 900px) {
  .feature {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 64px;
  }
  .feature--flip .feature-media {
    order: -1;
  }
}

/* two phones side by side, centred on the column, the second a step lower */
.pair {
  align-items: flex-start;
  padding-bottom: 40px;
}
.pair .phone {
  --phone-w: min(250px, calc((100vw - 2 * var(--gutter) - 16px) / 2));
}
.pair .phone:last-child {
  transform: translateY(40px);
}
.pair--one {
  padding-bottom: 0;
}
.pair--one .phone {
  --phone-w: clamp(220px, 62vw, 280px);
}
@media (min-width: 900px) {
  .pair .phone {
    --phone-w: clamp(200px, 19vw, 250px);
  }
}

/* ---------- boosters ---------- */

.packs {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px 0;
}
.packs img {
  width: clamp(120px, 30vw, 200px);
  height: auto;
  filter: drop-shadow(0 24px 40px rgba(0, 0, 0, 0.6));
}
.packs img:nth-child(1) {
  transform: translate(26%, 6%) rotate(-12deg);
}
.packs img:nth-child(2) {
  position: relative;
  z-index: 1;
  transform: translateY(-4%);
}
.packs img:nth-child(3) {
  transform: translate(-26%, 6%) rotate(12deg);
}

.tiers {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}
.tiers li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 6px;
  border: 1px solid var(--glass-line);
  border-radius: var(--r-full);
  background: var(--glass);
  font-size: var(--t-small);
  font-weight: 600;
}
.gem {
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  height: 22px;
  padding: 0 6px;
  border: 1px solid currentColor;
  border-radius: var(--r-full);
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
}
.tiers li:nth-child(1) .gem {
  color: var(--tier-common);
}
.tiers li:nth-child(2) .gem {
  color: var(--tier-uncommon);
}
.tiers li:nth-child(3) .gem {
  color: var(--tier-rare);
}
.tiers li:nth-child(4) .gem {
  color: var(--tier-super_rare);
}
.tiers li:nth-child(5) .gem {
  color: var(--tier-ultra_rare);
}
.tiers li:nth-child(6) .gem {
  color: var(--tier-legendary);
}

/* a link to go further (the albums), under a section's text */
.more-link {
  margin: 20px 0 0;
}
.more-link a {
  color: var(--gold);
  font-weight: 600;
}

/* ---------- remembrance ---------- */

.panels {
  display: grid;
  gap: 16px;
}
@media (min-width: 760px) {
  .panels {
    grid-template-columns: 1fr 1fr;
  }
}
.panel {
  padding: 24px;
  border-radius: var(--r-lg);
  border: 1px solid var(--glass-line);
  background: var(--glass);
}
.panel h3 {
  margin: 0 0 8px;
  font-family: var(--condensed);
  font-size: 1.625rem;
  font-weight: 800;
  line-height: 1.05;
  text-transform: uppercase;
}
.panel p {
  margin: 0;
  color: var(--ink2);
}

/* ---------- questions ---------- */

.faq {
  display: grid;
  gap: 10px;
  max-width: 820px;
}
.faq details {
  border-radius: var(--r-md);
  border: 1px solid var(--glass-line);
  background: var(--glass);
}
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  font-weight: 600;
  font-size: 1.0625rem;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: '+';
  flex: none;
  color: var(--gold);
  font-family: var(--mono);
  font-size: 1.25rem;
  line-height: 1;
  transition: transform var(--motion-fast) ease;
}
.faq details[open] summary::after {
  transform: rotate(45deg);
}
.faq details p {
  margin: 0;
  padding: 0 20px 20px;
  color: var(--ink2);
}

/* ---------- the last call ---------- */

.final {
  position: relative;
  isolation: isolate;
  margin-top: var(--section);
  padding: clamp(72px, 14vw, 140px) 0;
  text-align: center;
  overflow: hidden;
}
.final .title {
  font-size: var(--t-hero);
}
.final .text {
  margin: 0 auto 28px;
}
.final .cta-row,
.final .reassure {
  justify-content: center;
}

/* the dressed Allies pack between the title and the button: a link to the sign-up, floating
   like the app's packs (2.4 s up, 2.4 s down, a sheen every 4.2 s), with the dotted line it tears
   along and the arrow running on it (docs/landing.md, « Le booster du dernier appel ») */
.final-pack {
  display: block;
  width: clamp(160px, 42vw, 210px);
  margin: 8px auto 6px;
  color: inherit;
  text-decoration: none;
  touch-action: pan-y;
  -webkit-tap-highlight-color: transparent;
  transition: transform var(--motion-fast) ease;
}
.final-pack:hover,
.final-pack:focus-visible,
.final-pack:active {
  transform: scale(1.05);
}
.final-pack:focus-visible {
  border-radius: var(--r-sm);
}
.final-pack-float {
  position: relative;
  display: block;
  aspect-ratio: var(--pack-ratio);
  /* the app's: 2.4 s up, 2.4 s down, a sine */
  animation: pack-float 2.4s cubic-bezier(0.37, 0, 0.63, 1) infinite alternate;
}
.final-pack-art {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.65)) drop-shadow(0 0 36px var(--allies-wash));
}
.pack-sheen {
  position: absolute;
  inset: 0;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  background: linear-gradient(
      105deg,
      transparent 42%,
      rgba(255, 248, 232, 0.45) 50%,
      transparent 58%
    )
    no-repeat;
  background-size: 300% 100%;
  background-position: 120% 0;
  animation: pack-sheen 4.2s ease-in-out infinite;
  pointer-events: none;
}
.tear-line {
  position: absolute;
  top: var(--tear-y);
  left: var(--tear-left);
  right: var(--tear-right);
  border-top: var(--tear-width) dashed var(--tear-line);
}
.tear-hint {
  position: absolute;
  top: calc(var(--tear-y) - 11px);
  left: var(--hint-from);
  color: var(--hint-color);
  font-size: 18px;
  line-height: 22px;
  text-shadow: 0 0 10px var(--hint-glow);
  animation: tear-hint var(--hint-time) var(--hint-ease) infinite;
}
.final-pack-hint {
  margin: 0 0 20px;
  color: var(--ink2);
  font-size: var(--t-small);
}
.final-pack.is-torn .tear-hint {
  display: none;
}
/* a pack floating as in the app (OpeningModal, `packStyle`): 5 px up and down, leaning 1 deg */
@keyframes pack-float {
  from {
    transform: translateY(5px) rotate(-1deg);
  }
  to {
    transform: translateY(-5px) rotate(1deg);
  }
}
@keyframes pack-sheen {
  0% {
    background-position: 120% 0;
  }
  25%,
  100% {
    background-position: -20% 0;
  }
}
@keyframes tear-hint {
  0% {
    left: var(--hint-from);
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  80% {
    opacity: 1;
  }
  100% {
    left: var(--hint-to);
    opacity: 0;
  }
}

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

.foot {
  padding: 40px 0 calc(40px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--glass-line);
  color: var(--ink3);
  font-size: var(--t-small);
}
.foot nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}
.foot nav a {
  color: var(--ink2);
  text-underline-offset: 3px;
}
.foot p {
  margin: 0 0 8px;
}
.foot details {
  margin-top: 12px;
}
.foot summary {
  cursor: pointer;
  color: var(--ink2);
}
.foot ol {
  margin: 12px 0 0;
  padding-left: 20px;
}
.foot ol a {
  color: var(--ink2);
}

/* ---------- the bar at the bottom of a phone ---------- */

.sticky {
  position: fixed;
  inset: auto 0 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
  background: rgba(11, 12, 14, 0.92);
  border-top: 1px solid var(--glass-line);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transform: translateY(110%);
  transition: transform var(--motion-enter) ease;
}
.sticky.is-shown {
  transform: none;
}
.sticky p {
  margin: 0;
  color: var(--ink2);
  font-size: var(--t-small);
}
@media (min-width: 900px) {
  .sticky {
    display: none;
  }
}
/* room for the bar under the footer, so it never hides the last links */
@media (max-width: 899px) {
  .foot {
    padding-bottom: calc(96px + env(safe-area-inset-bottom));
  }
}

/* ---------- less motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .shot {
    transform: none;
  }
  .final-pack-float,
  .tear-hint {
    animation: none;
  }
  .pack-sheen {
    display: none;
  }
  .final-pack {
    transition: none;
  }
  .sticky,
  .button,
  .faq summary::after {
    transition: none;
  }
}

/* @keyframes reel: written by build.mjs, its steps being shares of a photograph's time on screen */

/* The pack the title opens (pack-opening.js has the template, and draws the motion). The dotted
   line, the arrow running on it, the float and the sheen are the page's own (.tear-line,
   .tear-hint, pack-float, .pack-sheen in landing.css), as on the last call's pack; colours from the
   page's custom properties (build.mjs). Everything that moves as the pack tears and its cards come
   out is placed here and moved by the script, frame by frame, as the app moves it
   (apps/app/lib/card-reveal.ts). */

.pack-opening {
  --stage-w: clamp(180px, 50vw, 250px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.pack-opening__stage {
  position: relative;
  width: var(--stage-w);
  aspect-ratio: var(--pack-ratio);
}
/* beside the title on a computer (renders.mjs serves the pack and the cards up to this width) */
@media (min-width: 900px) {
  .pack-opening {
    --stage-w: 300px;
  }
}

/* ---------- the pack ---------- */

.pack-opening__pack {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
  /* a finger can still scroll the page across the pack; a sideways swipe tears it */
  touch-action: pan-y;
  -webkit-tap-highlight-color: transparent;
  animation: pack-float 2.4s cubic-bezier(0.37, 0, 0.63, 1) infinite alternate;
}
.pack-opening__pack:focus-visible {
  border-radius: var(--r-sm);
  outline-offset: 6px;
}
.pack-opening__body,
.pack-opening__flap {
  position: absolute;
  inset: 0;
  display: block;
}
.pack-opening__body img,
.pack-opening__flap img {
  display: block;
  width: 100%;
  height: 100%;
  /* its shadow on the page only: no camp glow around the gold of an exceptional pack */
  filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.65));
  -webkit-user-drag: none;
  user-select: none;
}
/* the one image cut along the dotted line (the margins let its shadow out) */
.pack-opening__body {
  clip-path: inset(var(--tear-y) -60px -80px -60px);
  /* it shrinks about its own middle, under the line */
  transform-origin: 50% calc((100% + var(--tear-y)) / 2);
}
.pack-opening__flap {
  clip-path: inset(-60px -60px calc(100% - var(--tear-y)) -60px);
}
/* the line and its arrow leave as soon as the tear starts, as in the app (the arrow's own
   animation sets its opacity: it is hidden instead) */
.pack-opening.is-tearing .tear-line {
  opacity: 0;
}
.pack-opening.is-tearing .tear-hint {
  visibility: hidden;
}
.pack-opening__pack .pack-sheen {
  transition: opacity var(--motion-fast) ease;
}
.pack-opening.is-tearing .pack-sheen {
  opacity: 0;
}
/* the rip: the app's white line of 3 px, round ends and a warm halo, the whole width of the pack,
   sliding in from the side the tear starts on */
.pack-opening__rip-strip {
  position: absolute;
  top: calc(var(--tear-y) - 12px);
  left: var(--tear-left);
  right: var(--tear-right);
  height: 24px;
  overflow: hidden;
  pointer-events: none;
}
.pack-opening__rip {
  position: absolute;
  top: 10.5px;
  left: 0;
  width: 100%;
  height: 3px;
  border-radius: var(--r-full);
  background: #fff;
  box-shadow: 0 0 12px 4px rgba(255, 236, 190, 0.9);
  opacity: 0;
}
.pack-opening.is-open .pack-opening__pack {
  pointer-events: none;
  animation-play-state: paused;
}

/* the flash over the whole screen as the pack tears (the script adds it to the page) */
/* the small viewport's height, read by the script to pin the title (100vh where svh is unknown) */
.pack-opening__viewport {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 100vh;
  height: 100svh;
  visibility: hidden;
  pointer-events: none;
}
.pack-opening__flash {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  opacity: 0;
}

/* ---------- sparks, embers, gold: drawn by the script ---------- */

.pack-opening__sparks {
  position: absolute;
  width: 0;
  height: 0;
  pointer-events: none;
}
.pack-opening__sparks > span {
  position: absolute;
  opacity: 0;
}

/* ---------- the light the cards come out of (CardReveal.tsx) ---------- */

/* the room of the card itself, inside its render's margins: behind the card (its glow, its gold
   outline, the embers) and in front of it (the lines of light, the gold falling) */
.pack-opening__behind,
.pack-opening__front {
  position: absolute;
  top: 50%;
  left: 50%;
  pointer-events: none;
}
.pack-opening__behind {
  z-index: 0;
}
.pack-opening__front {
  z-index: 3;
}
/* the app's glow (assets/fx/glow.png) in the colour of the rarity */
.pack-opening__aura {
  position: absolute;
  left: 50%;
  top: 50%;
  -webkit-mask: url('/landing/img/glow.png') center / 100% 100% no-repeat;
  mask: url('/landing/img/glow.png') center / 100% 100% no-repeat;
  opacity: 0;
}
.pack-opening__ring {
  position: absolute;
  inset: 0;
  border: 1.5px solid;
  opacity: 0;
}
.pack-opening__line {
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: var(--r-xxs);
  opacity: 0;
}

/* ---------- the cards ---------- */

.pack-opening__deck {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
  touch-action: pan-y;
  -webkit-tap-highlight-color: transparent;
}
.pack-opening__deck:disabled {
  cursor: default;
}
.pack-opening__deck:focus-visible {
  border-radius: var(--r-md);
  outline-offset: 6px;
}
.pack-opening__card {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  width: 100%;
  aspect-ratio: var(--card-ratio);
  transform: translate(-50%, -50%);
  visibility: hidden;
}
.pack-opening__card.is-current {
  visibility: visible;
}
/* the card on show: sliding, rising, fading (its slot), settling out of its light (emerge), turned
   over (inner), all set by the script */
.pack-opening__slot,
.pack-opening__emerge,
.pack-opening__inner {
  position: absolute;
  inset: 0;
  display: block;
}
.pack-opening__slot {
  /* it leans about the bottom of the card, as in the app */
  transform-origin: 50% calc(100% - var(--card-inset-y));
}
.pack-opening__inner {
  transform-style: preserve-3d;
}
.pack-opening__face {
  position: absolute;
  inset: 0;
  display: block;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
.pack-opening__face--back {
  transform: rotateY(180deg);
}
.pack-opening__face img {
  display: block;
  width: 100%;
  height: 100%;
  -webkit-user-drag: none;
  user-select: none;
}
/* each face darkens as it turns away from the light, edge on at mid course (WarCard) */
.pack-opening__shade {
  position: absolute;
  inset: var(--card-inset-y) var(--card-inset-x);
  background: #000;
  opacity: 0;
  pointer-events: none;
}

/* the whole pack, side by side: the legendary in the middle (--fan, from the page), each card
   zooming in after the one on its left, as the app's summary (ZoomIn, 90 ms apart) */
.pack-opening.is-all .pack-opening__card {
  visibility: visible;
  z-index: var(--fan-z);
  /* five cards stay inside a phone's width: the outer ones end at the stage's width from its middle */
  transform: translate(calc(-50% + var(--fan) * 34%), calc(-50% + var(--fan-y) * 4%))
    rotate(calc(var(--fan) * 6deg)) scale(0.48);
  animation: pack-zoom 300ms linear var(--zoom-delay, 0ms) both;
}
@keyframes pack-zoom {
  from {
    scale: 0;
  }
}

/* ---------- its words ---------- */

/* the rarity under the card on show, as the app writes it (TierLabel, `tag`): its name, between
   two bars that open with the light for an ultra rare and a legendary */
.pack-opening__tier {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 1.5em;
  margin: 4px 0 0;
  color: var(--tier-color);
  font-family: var(--body);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 3px;
  line-height: 1.5;
  text-transform: uppercase;
  visibility: hidden;
}
.pack-opening__tier.is-on {
  visibility: visible;
}
.pack-opening__tier-bar {
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}
.pack-opening__say {
  min-height: 1.5em;
  margin: 0;
  color: var(--ink2);
  font-size: var(--t-small);
  text-align: center;
}

/* without JavaScript: the sealed pack, still */
.pack-opening:not(.is-ready) .pack-opening__deck,
.pack-opening:not(.is-ready) .pack-opening__tier,
.pack-opening:not(.is-ready) .pack-opening__say,
.pack-opening:not(.is-ready) .tear-hint {
  display: none;
}

/* Reduced motion: nothing floats nor turns (the script moves nothing either: the pack gives way to
   the cards and the cards to each other with a short fade); the legendary's back in place of its
   front. */
@media (prefers-reduced-motion: reduce) {
  .pack-opening__pack,
  .pack-opening__pack .tear-hint {
    animation: none;
  }
  .pack-opening__pack .pack-sheen {
    display: none;
  }
  .pack-opening.is-all .pack-opening__card {
    animation: none;
  }
  .pack-opening__face--back {
    transform: none;
  }
  .pack-opening__face {
    transition: opacity var(--motion-fast) linear;
  }
  .pack-opening__face--back,
  .pack-opening.is-flipped .is-current .pack-opening__face:not(.pack-opening__face--back) {
    opacity: 0;
  }
  .pack-opening.is-flipped .is-current .pack-opening__face--back {
    opacity: 1;
  }
}

/* The card you can flip (flip-card.js has the template). Colours from the page's custom
   properties (build.mjs); the legendary halo is the design system's `legendary-halo`
   (design-system/tokens.json), the only colour the page does not carry yet. */

.flip-card {
  --flip-w: clamp(220px, 64vw, 320px);
  --flip-halo: rgba(255, 200, 90, 0.55);
  --flip-light-x: 50%;
  --flip-light-y: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.flip-card__button {
  position: relative;
  display: block;
  width: var(--flip-w);
  aspect-ratio: 63 / 88;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
  perspective: 1100px;
  -webkit-tap-highlight-color: transparent;
  /* a finger can still scroll the page across the card */
  touch-action: pan-y;
  border-radius: var(--r-md);
}

/* the halo under a legendary card, and a soft shadow on the table: flat layers behind the 3D one
   (a filter on it would flatten the flip) */
.flip-card__button::before,
.flip-card__button::after {
  content: '';
  position: absolute;
  pointer-events: none;
}
.flip-card__button::after {
  left: 8%;
  right: 8%;
  bottom: -6%;
  height: 14%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.55), transparent);
}
.flip-card[data-holo] .flip-card__button::before {
  inset: -14%;
  background: radial-gradient(closest-side, var(--flip-halo), transparent 72%);
  opacity: 0.8;
}

.flip-card__tilt {
  position: absolute;
  inset: 0;
  display: block;
  transform-style: preserve-3d;
}

.flip-card__inner {
  position: absolute;
  inset: 0;
  display: block;
  transform-style: preserve-3d;
  transition: transform 520ms cubic-bezier(0.4, 0, 0.2, 1);
}
.flip-card.is-flipped .flip-card__inner {
  transform: rotateY(180deg);
}

.flip-card__face {
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
  border-radius: var(--r-md);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
.flip-card__face--back {
  transform: rotateY(180deg);
}
.flip-card__face img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  -webkit-user-drag: none;
  user-select: none;
}

/* the legendary foil: a rainbow sheen that slides with the tilt, on the front only (the app's
   back has none) */
.flip-card__holo {
  display: none;
}
.flip-card[data-holo] .flip-card__holo {
  position: absolute;
  inset: 0;
  display: block;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(
      115deg,
      transparent 20%,
      rgba(255, 120, 160, 0.55) 34%,
      rgba(255, 220, 120, 0.55) 42%,
      rgba(120, 255, 200, 0.55) 50%,
      rgba(120, 180, 255, 0.55) 58%,
      rgba(200, 140, 255, 0.55) 66%,
      transparent 80%
    );
  background-size: 260% 260%;
  background-position: var(--flip-light-x) var(--flip-light-y);
  mix-blend-mode: color-dodge;
  opacity: 0.32;
  /* clipped to the card's shape (flip-card.js sets the front image as the mask) */
  -webkit-mask: var(--flip-mask) center / contain no-repeat;
  mask: var(--flip-mask) center / contain no-repeat;
}

.flip-card__button:focus-visible {
  outline-offset: 6px;
}

.flip-card__hint {
  margin: 0;
  color: var(--ink2);
  font-size: var(--t-small);
  text-align: center;
  transition: opacity var(--motion-enter) ease;
}
.flip-card.was-flipped .flip-card__hint {
  opacity: 0;
  visibility: hidden;
  transition:
    opacity var(--motion-enter) ease,
    visibility 0s linear var(--motion-enter);
}

/* Reduced motion: no tilt (flip-card.js does not move it), and the faces swap with a short fade
   rather than turning. */
@media (prefers-reduced-motion: reduce) {
  .flip-card__inner,
  .flip-card.is-flipped .flip-card__inner {
    transform: none;
    transition: none;
  }
  .flip-card__face--back {
    transform: none;
  }
  .flip-card__face {
    transition: opacity var(--motion-fast) linear;
  }
  .flip-card__face--back,
  .flip-card.is-flipped .flip-card__face--front {
    opacity: 0;
  }
  .flip-card.is-flipped .flip-card__face--back {
    opacity: 1;
  }
  .flip-card__hint {
    transition: none;
  }
}

/* The album that fills itself (album-fill.js has the template). Colours and radii from the page's
   custom properties (build.mjs). Without JavaScript the album shows full: only `.is-ready` (set by
   the script) hides the cards still to come. */

.album-fill {
  --album-ratio: 260 / 363;
  --album-track: var(--track, rgba(255, 255, 255, 0.18));
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding: 16px;
  border: 1px solid var(--glass-line);
  border-radius: var(--r-lg);
  background: var(--glass);
}

.album-fill__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.album-fill__name {
  margin: 0;
  font-family: var(--condensed);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ink);
}
.album-fill__count {
  margin: 0;
  font-family: var(--mono);
  font-size: var(--t-small);
  font-weight: 500;
  color: var(--ink2);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* the app's ProgressBar: a rounded track, its fill slid from the left (a transform) */
.album-fill__bar {
  position: relative;
  height: 6px;
  margin: 10px 0 16px;
  overflow: hidden;
  border-radius: var(--r-full);
  background: var(--album-track);
}
.album-fill__fill {
  position: absolute;
  inset: 0;
  border-radius: var(--r-full);
  background: var(--gold);
  transition: transform 650ms cubic-bezier(0.33, 1, 0.68, 1);
}
/* the bar's flash once the album is complete */
.album-fill__fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.85), transparent);
  transform: translateX(-100%);
}
.album-fill.is-complete .album-fill__fill::after {
  animation: album-fill-flash 900ms ease-out 1;
}
@keyframes album-fill-flash {
  to {
    transform: translateX(100%);
  }
}

.album-fill__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 600px) {
  .album-fill {
    padding: 22px;
  }
  .album-fill__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
  }
}
@media (min-width: 900px) {
  .album-fill__grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

.album-fill__slot {
  position: relative;
  aspect-ratio: var(--album-ratio);
  perspective: 700px;
}
.album-fill__slot img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  -webkit-user-drag: none;
  user-select: none;
}
.album-fill.is-ready .album-fill__card {
  opacity: 0;
}
.album-fill.is-ready .album-fill__slot.is-filled .album-fill__card {
  opacity: 1;
}

.album-fill__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 40px;
  margin-top: 14px;
}
.album-fill__done {
  margin: 0;
  font-family: var(--condensed);
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0;
  transition: opacity var(--motion-enter) ease;
}
.album-fill.is-complete .album-fill__done {
  opacity: 1;
}
.album-fill__replay {
  min-height: 36px;
  padding: 0 16px;
  border: 1px solid var(--glass-line);
  border-radius: var(--r-full);
  background: transparent;
  color: var(--ink2);
  font-family: var(--body);
  font-size: var(--t-small);
  font-weight: 600;
  cursor: pointer;
}
.album-fill__replay:hover {
  color: var(--ink);
}
.album-fill__replay[hidden] {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .album-fill__fill,
  .album-fill__done {
    transition: none;
  }
  .album-fill.is-complete .album-fill__fill::after {
    animation: none;
  }
}

/*
 * The trade between two friends (trade.js, its template at the head of the file), in a phone over
 * the Friends tab. Every place comes from the app's 390 × 844 screen as percentages (--x, --y,
 * --w, --h, written by the page); a size in points is `calc(var(--pt) * n)`. As written, the scene
 * is the reveal once played; `.is-live` hands the cards to the script, which moves them.
 */

.trade {
  /* one point of the app's screen: the screen is the phone less its frame (0.028 of it each side) */
  --pt: calc(var(--phone-w) * 0.944 / 390);
}
.trade__after {
  opacity: 1;
}
.trade.is-live .trade__after {
  opacity: 0;
}

/* a place on the screen, from the page's percentages */
.trade [style*='--x'] {
  position: absolute;
  left: var(--x);
  top: var(--y);
}

.trade__veil {
  position: absolute;
  inset: 0;
  background: rgba(5, 6, 8, 0.78);
}

.trade__heading,
.trade__texts {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.trade__avatar {
  width: var(--w);
  height: auto;
}
.trade__pseudo,
.trade__title,
.trade__tally,
.trade__hint {
  position: absolute;
  left: 0;
  right: 0;
  top: var(--y);
  margin: 0;
  text-align: center;
  white-space: nowrap;
}
.trade__pseudo {
  color: var(--ink2);
  font-family: var(--body);
  font-weight: 600;
  font-size: calc(var(--pt) * 12);
  line-height: calc(var(--pt) * 14);
}
.trade__title {
  color: var(--ink);
  font-family: var(--body);
  font-weight: 600;
  font-size: calc(var(--pt) * 15.5);
  line-height: calc(var(--pt) * 21);
}
.trade__tally {
  color: var(--ink3);
  font-family: var(--mono);
  font-size: calc(var(--pt) * 10.5);
  line-height: calc(var(--pt) * 14);
  letter-spacing: calc(var(--pt) * 1.2);
  text-transform: uppercase;
}
.trade__line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(var(--pt) * 8);
  width: var(--w);
  height: var(--h);
  padding: 0 calc(var(--pt) * 12);
  border-radius: calc(var(--pt) * 10);
  background: var(--glass);
  color: var(--ink2);
  font-family: var(--body);
  font-size: calc(var(--pt) * 13);
  line-height: calc(var(--pt) * 15);
  white-space: nowrap;
}
.trade__line b {
  color: var(--ink);
  font-weight: 600;
}
.trade__line > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
}
.trade__hint {
  color: var(--ink3);
  font-family: var(--body);
  font-size: calc(var(--pt) * 12.5);
  line-height: calc(var(--pt) * 15);
}
.trade__button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--w);
  height: var(--h);
  border-radius: 999px;
  background: var(--ink);
  color: var(--ground);
  font-family: var(--body);
  font-weight: 600;
  font-size: calc(var(--pt) * 15);
}

/* a finger on a button: a soft disc, only while the script plays */
.trade__touch {
  width: calc(var(--pt) * 46);
  height: calc(var(--pt) * 46);
  margin: calc(var(--pt) * -23) 0 0 calc(var(--pt) * -23);
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
  box-shadow: 0 0 calc(var(--pt) * 14) rgba(255, 255, 255, 0.35);
  opacity: 0;
  pointer-events: none;
}

/* the cards: as written, the friend's in the middle; live, at the screen's corner, moved */
/* (over the screen's own rule for its images, which fills it) */
.trade .screen > .trade__card {
  position: absolute;
  inset: auto;
  left: var(--x);
  top: var(--y);
  width: var(--w);
  height: auto;
  max-width: none;
  object-fit: contain;
  pointer-events: none;
  will-change: transform, opacity;
}
.trade__card--given {
  opacity: 0;
}
.trade.is-live .screen > .trade__card {
  left: 0;
  top: 0;
}

/* the album tab's icon, cut from the screen under it, springing as the card lands */
.trade__bump {
  width: var(--w);
  height: var(--h);
  background-repeat: no-repeat;
  opacity: 0;
  pointer-events: none;
}

/* the phone and the button to play it again, one column */
.trade-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.trade__replay {
  min-height: 36px;
  padding: 0 16px;
  border: 1px solid var(--glass-line);
  border-radius: var(--r-full);
  background: transparent;
  color: var(--ink2);
  font-family: var(--body);
  font-size: var(--t-small);
  font-weight: 600;
  cursor: pointer;
}
.trade__replay:hover {
  color: var(--ink);
}
.trade__replay[hidden] {
  visibility: hidden;
}

/* The album pages' and their hub's own styles (albums-page.mjs), after the landing page's
   (landing.css), whose custom properties they read: colours, radii, the rarities' colours and the
   type scale all come from the app through build.mjs. Mobile first. */

/* ---------- the title of a page ---------- */

.page-hero {
  padding: calc(max(12px, env(safe-area-inset-top)) + 96px) 0 0;
  background: radial-gradient(120% 70% at 85% 0%, var(--allies-glow-soft), transparent 65%);
}
.page-title {
  margin: 0 0 18px;
  font-family: var(--condensed);
  font-size: var(--t-hero);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  text-wrap: balance;
}
.page-lead {
  margin: 0 0 28px;
  max-width: 40em;
  color: var(--ink2);
  font-size: var(--t-lead);
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
  color: var(--ink3);
  font-size: var(--t-small);
}
.crumbs li + li::before {
  content: '›';
  margin-right: 6px;
}
.crumbs a {
  color: var(--ink2);
  text-decoration: none;
}
.crumbs a:hover {
  color: var(--gold);
}

/* ---------- the rarities of an album ---------- */

.ladder {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}
.ladder li {
  padding: 6px 12px;
  border-radius: var(--r-full);
  border: 1px solid var(--glass-line);
  background: var(--glass);
  font-size: var(--t-small);
}
.ladder strong {
  color: var(--accent);
}

/* ---------- the cards of an album ---------- */

.tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 600px) {
  .tiles {
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 16px;
  }
}
.tile {
  overflow: hidden;
  border-radius: var(--r-md);
  border: 1px solid var(--glass-line);
  background: var(--glass);
  transition: border-color var(--motion-fast);
}
/* a card's tile opens its page (cards.mjs) */
.tile:hover,
.tile:focus-within {
  border-color: var(--gold);
}
.tile-link {
  display: block;
  color: inherit;
  text-decoration: none;
}
.tile img,
.tile-photo {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-bottom: 3px solid var(--accent);
  background: var(--ground);
}
/* a card without its photo */
.tile-photo--none {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  color: var(--ink3);
  font-size: var(--t-small);
  text-align: center;
}
.tile-body {
  padding: 10px 12px 12px;
}
.tile-number {
  color: var(--ink3);
  font-family: var(--mono);
  font-size: var(--t-kicker);
}
.tile h3 {
  margin: 4px 0 2px;
  font-family: var(--condensed);
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.05;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
.tile p {
  margin: 0 0 8px;
  color: var(--ink2);
  font-size: var(--t-small);
  line-height: 1.35;
}
.tile-tier {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--r-full);
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---------- albums in a list ---------- */

.album-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 760px) {
  .album-links {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
  }
}
.album-links--one {
  grid-template-columns: minmax(0, 320px);
  margin-bottom: 48px;
}
.album-link a {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border-radius: var(--r-md);
  border: 1px solid var(--glass-line);
  background: var(--glass);
  text-decoration: none;
  transition: border-color var(--motion-fast);
}
.album-link a:hover {
  border-color: var(--gold);
}
.album-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* the name over the photo, on a veil that keeps it readable */
.album-link-body {
  position: absolute;
  inset: auto 0 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 32px 12px 10px;
  background: linear-gradient(to bottom, transparent, var(--ground) 80%);
}
.album-link--allies .album-link-body {
  border-bottom: 3px solid var(--allies-line);
}
.album-link--axis .album-link-body {
  border-bottom: 3px solid var(--axis-line);
}
.album-link-name {
  font-family: var(--condensed);
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.05;
  text-transform: uppercase;
}
.album-link-count {
  color: var(--ink2);
  font-size: var(--t-small);
}

/* A card's page (card-page.mjs), after the album pages' styles (albums.css), whose custom
   properties and pieces it reuses: the rarity's colour (--accent), the tiles, the rarity tag, the
   crumbs. Mobile first. */

/* ---------- the card: its photo beside its name ---------- */

.card-hero-grid {
  display: grid;
  gap: 24px;
}
@media (min-width: 760px) {
  .card-hero-grid {
    grid-template-columns: minmax(0, 440px) minmax(0, 1fr);
    align-items: start;
    gap: 40px;
  }
}
.card-hero .page-title {
  font-size: clamp(2.5rem, 9vw, 4.5rem);
  overflow-wrap: anywhere;
}
.card-hero .page-lead {
  margin-bottom: 8px;
}
.card-meta {
  margin: 0 0 28px;
  color: var(--ink3);
  font-size: var(--t-small);
}

.card-figure {
  margin: 0;
  overflow: hidden;
  border-radius: var(--r-md);
  border: 1px solid var(--glass-line);
  background: var(--glass);
}
.card-photo {
  display: block;
  width: 100%;
  height: auto;
  max-height: 70vh;
  object-fit: contain;
  border-bottom: 3px solid var(--accent);
  background: var(--ground);
}
/* a card without its photo */
.card-photo--none {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
  padding: 12px;
  color: var(--ink3);
  font-size: var(--t-small);
}
.card-figure figcaption {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px 12px;
}
.card-plate {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-credit {
  color: var(--ink3);
  font-size: 0.75rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.card-credit a,
.card-text-credit a {
  color: var(--ink2);
}

/* ---------- the back: its summary, its facts ---------- */

.card-back,
.card-game {
  max-width: 44em;
}
.card-summary {
  margin: 0 0 24px;
  font-size: var(--t-lead);
  line-height: 1.55;
}
.facts {
  display: grid;
  margin: 0 0 24px;
  border-radius: var(--r-md);
  border: 1px solid var(--glass-line);
  background: var(--glass);
}
.facts > div {
  display: grid;
  gap: 2px;
  padding: 12px 14px;
}
.facts > div + div {
  border-top: 1px solid var(--glass-line);
}
@media (min-width: 600px) {
  .facts > div {
    grid-template-columns: 11em minmax(0, 1fr);
    gap: 16px;
  }
}
.facts dt {
  color: var(--ink3);
  font-size: var(--t-kicker);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.facts dd {
  margin: 0;
}
.card-game a {
  color: var(--ink);
}
.card-text-credit {
  margin: 0;
  color: var(--ink3);
  font-size: var(--t-small);
}

/* a battle: each side, then its outcome */
.sides {
  display: grid;
  gap: 12px;
  margin: 0 0 12px;
}
@media (min-width: 600px) {
  .sides {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.side {
  padding: 12px 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--glass-line);
  border-top: 3px solid var(--side);
  background: var(--glass);
}
.side--allies {
  --side: var(--allies-kicker);
}
.side--axis {
  --side: var(--axis-kicker);
}
.side h3 {
  margin: 0 0 6px;
  color: var(--side);
  font-size: var(--t-kicker);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.side p {
  margin: 0;
}
.side .side-commanders {
  margin-top: 6px;
}
.side-commanders,
.outcome {
  color: var(--ink2);
  font-size: var(--t-small);
}
.side-commanders span,
.outcome span {
  display: block;
  color: var(--ink3);
  font-size: var(--t-kicker);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.outcome {
  margin: 0 0 24px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--glass-line);
  background: var(--glass);
}

/* ---------- the cards around it ---------- */

/* six cards (card-page.mjs, AROUND): rows of two, three, then six, never one left alone */
@media (min-width: 600px) {
  .tiles--around {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (min-width: 1000px) {
  .tiles--around {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

.card-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 16px;
}
.card-steps a {
  display: block;
  padding: 12px 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--glass-line);
  background: var(--glass);
  color: var(--ink);
  font-family: var(--condensed);
  font-size: 1.125rem;
  font-weight: 800;
  line-height: 1.1;
  text-decoration: none;
  text-transform: uppercase;
  overflow-wrap: anywhere;
  transition: border-color var(--motion-fast);
}
.card-steps a:hover {
  border-color: var(--gold);
}
.card-steps a[rel='next'] {
  text-align: right;
}
.card-steps span {
  display: block;
  margin-bottom: 4px;
  color: var(--ink3);
  font-family: var(--body);
  font-size: var(--t-kicker);
  font-weight: 600;
  letter-spacing: 0.08em;
}
.twin--after {
  margin-top: 40px;
}
.twin--after .album-links--one {
  margin-bottom: 0;
}
