/* =========================================================================
   PITCH — Welcome page (#561)
   Loaded after /style.css. The hero reuses the album
   and invitation form from style.css unchanged; everything below it is a
   run of album pages on the same cream paper (Art Bible: "think in pages"):
   painted scenes glued in like photos, real kit stickers in their rarity
   finishes, a timeline to launch and the socials.
   Linked from the home page only (build/pages.js renderHome). No inline
   styles anywhere: _headers sets style-src 'self'.
   ========================================================================= */

:root {
  --silver: #A9AFB5;
  --bronze: #B0723A;
  --platinum: #7FA7B5;
  --emerald: #2E9E72;
  --gold-deep: #C98F12;
  --epic: #7B4BA8;
  --section-gap: clamp(36px, 6vw, 72px);
}

/* ---------- Language flags, top right ---------- */
.lang-switch {
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 20;
  display: flex;
  padding: 4px;
  border-radius: 999px;
  background: var(--paper-white);
  box-shadow: var(--shadow-lift);
}
.lang-switch > * + * { margin-left: 4px; }
.lang-flag {
  display: flex;
  align-items: center;
  padding: 4px 8px 4px 4px;
  border-radius: 999px;
  text-decoration: none;
  font-family: var(--display);
  font-size: .78rem;
  color: var(--ink-muted);
  transition: background-color .15s ease, color .15s ease;
}
.lang-flag svg {
  width: 26px;
  height: 18px;
  border-radius: 4px;
  box-shadow: 0 0 0 1px rgba(43, 33, 22, .2);
  margin-right: 5px;
}
.lang-flag:hover { background: var(--page); color: var(--ink); }
.lang-flag[aria-current="page"] { background: var(--page-deep); color: var(--ink); }
.lang-flag:not([aria-current]) svg { opacity: .75; }
.lang-flag:focus-visible { outline: 3px solid var(--gold); outline-offset: 1px; }
/* Six flags with their codes don't fit a phone's width: flags only there. */
@media (max-width: 479px) {
  .lang-switch { top: 8px; right: 8px; }
  .lang-switch > * + * { margin-left: 2px; }
  .lang-flag { padding: 4px; }
  .lang-flag svg { margin-right: 0; }
  .lang-code { display: none; }
}

/* ---------- Hero additions ---------- */
.gem-inline { width: 26px; height: auto; vertical-align: -4px; margin-right: 3px; }

.scroll-cue {
  display: inline-block;
  font-family: var(--display);
  color: var(--paper-white);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(20, 14, 8, .35);
  transition: transform .15s ease, background-color .15s ease;
}
.scroll-cue:hover { background: rgba(20, 14, 8, .55); transform: translateY(2px); }
.scroll-cue:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.scroll-cue-arrow { display: inline-block; animation: cue-bob 1.8s ease-in-out infinite; }
@keyframes cue-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(3px); }
}
@media (min-width: 760px) and (hover: hover) and (pointer: fine) {
  .page-fit .scroll-cue { flex: 0 0 auto; margin-top: 10px; font-size: .9rem; }
}

/* ---------- Album-page sections ---------- */
.w-section {
  max-width: 760px;
  margin: var(--section-gap) auto 0;
  padding: clamp(28px, 5vw, 52px) clamp(18px, 4vw, 48px);
  background: var(--page) var(--paper-grain);
  color: var(--ink);
  border-radius: 6px 14px 14px 6px;
  box-shadow: 0 22px 40px rgba(0, 0, 0, .4), 0 3px 0 rgba(0, 0, 0, .2), inset 14px 0 20px -14px rgba(0, 0, 0, .3);
  text-align: center;
}
.w-section-wide { max-width: 1040px; }
@media (max-width: 1071px) {
  .w-section { margin-left: 16px; margin-right: 16px; }
}

.w-kicker {
  margin: 0 0 4px;
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.w-heading {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  line-height: 1.05;
  color: var(--red);
  -webkit-text-stroke: 1px rgba(43, 33, 22, .25);
}
.w-lead {
  margin: 10px auto 0;
  max-width: 48ch;
  font-size: clamp(.98rem, 2vw, 1.12rem);
  color: var(--ink-muted);
}

/* ---------- Feature spreads: a painted scene glued in like a photo, with
   the text written over the middle of it. Image and text share one grid
   cell, so the photo grows to fit the text on a narrow phone. ---------- */
.spread {
  --c: var(--red);
  --c-light: #F7A08F;
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  margin-top: clamp(32px, 5vw, 56px);
  padding: 8px 8px 22px;
  background: var(--paper-white);
  box-shadow: var(--shadow-lift);
  transform: rotate(-.8deg);
}
.spread-flip { transform: rotate(.7deg); }
.spread-red { --c: var(--red); --c-light: #F7A08F; }
.spread-gold { --c: var(--gold-deep); --c-light: var(--gold); }
.spread-green { --c: var(--green); --c-light: #8FD6A8; }
.spread-wood { --c: var(--wood); --c-light: #E8B98C; }

/* Two strips of tape holding the photo to the page. */
.spread::before,
.spread::after {
  content: '';
  position: absolute;
  z-index: 2;
  top: -10px;
  width: 74px;
  height: 22px;
  background: rgba(240, 225, 190, .82);
  box-shadow: 0 1px 2px rgba(60, 38, 16, .2);
}
.spread::before { left: 18px; transform: rotate(-8deg); }
.spread::after { right: 18px; transform: rotate(7deg); }

.spread-photo,
.spread-text { grid-row: 1; grid-column: 1; }
.spread-photo { margin: 0; min-height: 100%; }
.spread-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 760px) {
  .spread-photo { min-height: 540px; }
}

.spread-text {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(28px, 6vw, 56px) clamp(18px, 5vw, 64px);
  text-align: center;
  color: var(--paper-white);
  /* The wash is darkest behind the text, in the middle of the painting. */
  background:
    radial-gradient(ellipse 70% 75% at 50% 50%, rgba(20, 14, 8, .72), rgba(20, 14, 8, .45) 65%, rgba(20, 14, 8, .22) 100%);
  text-shadow: 0 1px 3px rgba(0, 0, 0, .55);
}

.spread-tab {
  display: inline-block;
  margin: 0 0 10px;
  padding: 3px 14px;
  border-radius: 999px;
  background: var(--c);
  color: var(--paper-white);
  font-family: var(--display);
  font-size: .82rem;
  letter-spacing: .05em;
  text-shadow: none;
  box-shadow: 0 2px 0 rgba(0, 0, 0, .25);
}
.spread h3 {
  margin: 0;
  max-width: 22ch;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.7rem, 4.4vw, 2.6rem);
  line-height: 1.05;
  color: var(--c-light);
  -webkit-text-stroke: 1px rgba(20, 14, 8, .35);
  text-shadow: 0 2px 6px rgba(0, 0, 0, .6);
}
.spread-lead { margin: 8px 0 16px; max-width: 46ch; font-weight: 800; font-size: 1.05rem; }
.spread ul { margin: 0; padding: 0; list-style: none; max-width: 560px; text-align: left; }
.spread li {
  position: relative;
  padding-left: 22px;
  font-size: .98rem;
  line-height: 1.5;
}
.spread li + li { margin-top: 7px; }
/* Phones show only the label and the title over the painting: the intro,
   the bullets and the league chips are for wider screens. */
@media (max-width: 759px) {
  .spread .spread-lead,
  .spread ul,
  .spread .tier-chips { display: none; }
  .spread-photo { min-height: 240px; }
  .spread-text { padding: 24px 18px; }
}
/* A small printed ball in the section's colour as the bullet. */
.spread ul li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: .5em;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--c-light);
  box-shadow: inset -2px -2px 0 rgba(0, 0, 0, .25);
}

.tier-chips {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  text-shadow: none;
}
.tier-chips li {
  --t: var(--ink-muted);
  margin: 0 6px 6px 0;
  padding: 3px 10px;
  border-radius: 6px;
  background: var(--t);
  color: var(--paper-white);
  font-family: var(--display);
  font-size: .82rem;
  text-shadow: 0 1px 0 rgba(0, 0, 0, .3);
}
.tier-chips li + li { margin-top: 0; }
.tier-chips li::before { content: none; }
.tier-chips li { padding-left: 10px; }
.tier-chips .tier-rookie { --t: var(--green); }
.tier-chips .tier-bronze { --t: var(--bronze); }
.tier-chips .tier-silver { --t: var(--silver); }
.tier-chips .tier-gold { --t: var(--gold-deep); }
.tier-chips .tier-platinum { --t: var(--platinum); }
.tier-chips .tier-emerald { --t: var(--emerald); }
.tier-chips .tier-elite { --t: var(--red); }

/* ---------- Kit: real stickers from the game ---------- */
.cromo-grid {
  list-style: none;
  margin: clamp(26px, 4vw, 40px) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 26px 16px;
}
@media (min-width: 760px) {
  .cromo-grid { grid-template-columns: repeat(3, 1fr); grid-gap: 36px 28px; }
}
.cromo {
  --r: var(--ink-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.cromo img {
  width: 100%;
  max-width: 220px;
  height: auto;
  border-radius: 10px;
  box-shadow: var(--shadow-lift);
  transform: rotate(var(--tilt, 0deg));
  transition: transform .2s ease, box-shadow .2s ease;
}
.cromo:nth-child(3n + 1) { --tilt: -2deg; }
.cromo:nth-child(3n + 2) { --tilt: 1.4deg; }
.cromo:nth-child(3n) { --tilt: -.8deg; }
.cromo:hover img { transform: rotate(0deg) translateY(-4px) scale(1.02); box-shadow: 0 8px 14px rgba(60, 38, 16, .25), 0 18px 30px rgba(60, 38, 16, .2); }

.cromo-common { --r: #8C7D66; }
.cromo-rare { --r: #5B7F9A; }
.cromo-epic { --r: var(--epic); }
.cromo-legendary { --r: var(--gold-deep); }
.cromo-mythic { --r: var(--red); }
.cromo-rarity {
  margin: 14px 0 4px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--r);
  color: var(--paper-white);
  font-family: var(--display);
  font-size: .78rem;
  letter-spacing: .05em;
}
/* Real Legend is the top of the ladder: the only holographic ribbon. */
.cromo-real-legend .cromo-rarity {
  background: linear-gradient(100deg, #D6402E, #F0B429 25%, #2E9E72 50%, #3E7CC0 75%, #7B4BA8);
  text-shadow: 0 1px 1px rgba(0, 0, 0, .45);
}
.cromo h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.12rem;
  line-height: 1.15;
  color: var(--ink);
}
.cromo-meta { margin: 3px 0 0; font-size: .8rem; font-weight: 800; color: var(--ink-muted); }
.cromo-story { margin: 6px 0 0; max-width: 30ch; font-size: .86rem; font-style: italic; color: var(--ink-muted); }
.kit-note { margin: 30px auto 0; max-width: 50ch; font-weight: 800; color: var(--ink); }

/* ---------- Road to kick-off: a timeline ----------
   Phones: stops run down the page, a dashed line linking the numbered dots
   on the left. From 760px: the four stops sit side by side with the line
   running across behind the dots. The first stop is "now". */
.timeline {
  position: relative;
  list-style: none;
  margin: 34px 0 0;
  padding: 0;
  text-align: left;
}
.timeline-step {
  position: relative;
  padding: 0 0 28px 58px;
}
.timeline-step:last-child { padding-bottom: 0; }
/* The line down to the next stop. */
.timeline-step::before {
  content: '';
  position: absolute;
  left: 19px;
  top: 44px;
  bottom: 0;
  border-left: 3px dashed var(--rule);
}
.timeline-step:last-child::before { content: none; }

.timeline-dot {
  position: absolute;
  z-index: 1;
  left: 0;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--paper-white);
  border: 3px solid var(--rule);
  color: var(--ink-muted);
  font-family: var(--display);
  font-size: 1.1rem;
  box-shadow: var(--shadow-soft);
}
.timeline-now .timeline-dot {
  background: var(--red);
  border-color: var(--paper-white);
  color: var(--paper-white);
  box-shadow: 0 0 0 5px rgba(214, 64, 46, .22), var(--shadow-soft);
}

.timeline-here {
  display: inline-block;
  margin-bottom: 4px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--ink);
  font-family: var(--display);
  font-size: .76rem;
  letter-spacing: .03em;
  box-shadow: 0 2px 0 rgba(0, 0, 0, .15);
}
.timeline-when {
  margin: 8px 0 2px;
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.timeline-here + .timeline-when { margin-top: 2px; }
.timeline-now .timeline-when { color: var(--red); }
.timeline-step h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.2rem;
  line-height: 1.15;
  color: var(--ink);
}
.timeline-text { margin: 4px 0 0; font-size: .95rem; color: var(--ink-muted); }

@media (min-width: 760px) {
  .timeline {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-gap: 24px;
    text-align: center;
  }
  /* One line across, from the first dot's centre to the last one's. */
  .timeline::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 12.5%;
    right: 12.5%;
    border-top: 3px dashed var(--rule);
  }
  .timeline-step { padding: 60px 4px 0; }
  .timeline-step::before { content: none; }
  .timeline-dot { left: 50%; transform: translateX(-50%); }
  .timeline-when { margin-top: 0; }
  /* The marker sits just above the "now" stop's label, without pushing
     that stop's text lower than the others. */
  .timeline-here {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    white-space: nowrap;
  }
  .timeline { margin-top: 56px; }
}

/* ---------- Socials: four stickers ---------- */
.socials {
  list-style: none;
  margin: 26px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 12px;
}
@media (min-width: 640px) {
  .socials { grid-template-columns: repeat(4, 1fr); }
}
.social {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 8px 14px;
  border-radius: 12px;
  background: var(--paper-white);
  color: var(--ink);
  text-decoration: none;
  box-shadow: var(--shadow-soft);
  transition: transform .15s ease, box-shadow .15s ease, color .15s ease;
}
.socials li:nth-child(odd) .social { transform: rotate(-1.2deg); }
.socials li:nth-child(even) .social { transform: rotate(1deg); }
.socials li .social:hover { transform: translateY(-3px) rotate(0deg); box-shadow: var(--shadow-lift); color: var(--red); }
.socials li .social:active { transform: translateY(1px) scale(.98); }
.social:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.social svg { width: 34px; height: 34px; fill: currentColor; }
.social .social-stroke { fill: none; stroke: currentColor; stroke-width: 2; }
.social-name { margin-top: 8px; font-family: var(--display); font-size: 1.05rem; }
.social-handle { font-size: .8rem; color: var(--ink-muted); word-break: break-all; }

/* ---------- Last call: the tunnel scene with a card on top ---------- */
.last-call {
  position: relative;
  max-width: 1040px;
  margin: var(--section-gap) auto;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 22px 40px rgba(0, 0, 0, .45);
}
@media (max-width: 1071px) {
  .last-call { margin-left: 16px; margin-right: 16px; }
}
.last-call-scene { display: block; width: 100%; height: auto; min-height: 340px; object-fit: cover; }
.last-call-card {
  position: absolute;
  left: 50%;
  bottom: clamp(16px, 4vw, 40px);
  transform: translateX(-50%);
  width: min(460px, calc(100% - 32px));
  padding: 22px 20px 24px;
  text-align: center;
  color: var(--ink);
  background: var(--page) var(--paper-grain);
  border-radius: 10px;
  box-shadow: var(--shadow-lift);
}
.last-call-crest { display: block; width: 64px; height: 64px; margin: -54px auto 6px; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .3)); }
.last-call-btn { display: inline-block; margin-top: 16px; padding-left: 28px; padding-right: 28px; text-decoration: none; }

@media (prefers-reduced-motion: reduce) {
  .scroll-cue-arrow { animation: none; }
  .cromo img, .cromo:hover img, .socials li .social, .socials li .social:hover { transition: none; }
  .cromo:hover img { transform: rotate(var(--tilt, 0deg)); }
}
