/* NEW REPUBLIC scroll site — night, police red/blue, chrome */
:root {
  --ink: #04060c;
  --night: #0a1226;
  --blue: #2e6bff;
  --blue-soft: #8fb0ff;
  --red: #e5202e;
  --text: #f2f4f9;
  --muted: #a3acc2;
  --display: "Anton", "Impact", "Arial Narrow", sans-serif;
  --body: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --pad: clamp(20px, 4vw, 64px);
}

* { box-sizing: border-box; }
html { background: var(--ink); color-scheme: dark; }
body {
  margin: 0;
  background: linear-gradient(223deg, #0b1124, var(--ink) 40%);
  color: var(--text);
  font: 500 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
figure { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.display {
  font-family: var(--display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 0.92;
  margin: 0;
  text-wrap: balance;
}
.eyebrow {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--blue-soft);
}
/* flag / police-light gradient lettering */
.gradient-title {
  background: linear-gradient(100deg, #6f9bff 0%, #ffffff 48%, #ff4a57 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- progress + nav ---------- */
.progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 60; pointer-events: none; }
.progress span {
  display: block; height: 100%; width: 100%;
  transform-origin: 0 50%; transform: scaleX(0);
  background: linear-gradient(90deg, var(--blue), #fff 50%, var(--red));
}
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; gap: 28px;
  padding: 12px var(--pad);
  background: linear-gradient(to bottom, rgba(4, 6, 12, 0.65), rgba(4, 6, 12, 0));
  transition: transform 0.45s cubic-bezier(.2, .7, .2, 1), opacity 0.45s;
}
.nav.hide { transform: translateY(-110%); opacity: 0; }
.nav-logo img { height: 54px; width: auto; filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.6)); }
.nav-links { display: flex; gap: 26px; margin-left: auto; }
.nav-links a {
  text-decoration: none; font-size: 14px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: rgba(242, 244, 249, 0.78); transition: color 0.2s;
}
.nav-links a:hover, .nav-links a:focus-visible { color: #fff; }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 18px; border-radius: 999px;
  background: var(--text); color: #081022; text-decoration: none;
  font-weight: 800; font-size: 14px; letter-spacing: 0.02em;
  transition: background 0.2s, color 0.2s, box-shadow 0.3s;
}
.pill span { color: var(--red); transition: color 0.2s; }
.pill:hover, .pill:focus-visible { background: var(--blue); color: #fff; box-shadow: 0 0 28px 2px rgba(46, 107, 255, 0.55); }
.pill:hover span, .pill:focus-visible span { color: #fff; }
.pill.big { padding: 15px 28px; font-size: 16px; margin-top: 14px; }
/* not a link yet: donations open later */
.pill-soon, .pill-soon:hover { background: transparent; color: var(--text); border: 1px solid rgba(143, 176, 255, 0.4); box-shadow: none; cursor: default; margin-bottom: 0; }

/* ---------- pinned sections ---------- */
.pin { position: relative; height: var(--len, 300vh); }
.pin .stage { position: sticky; top: 0; height: 100vh; height: 100lvh; overflow: hidden; }

/* 1. hero */
.hero .stage { background: var(--ink); }
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-top { position: absolute; left: 50%; top: clamp(70px, 11vh, 120px); transform: translateX(-50%); width: clamp(150px, 15vw, 240px); }
.hero-top img { width: 100%; height: auto; filter: drop-shadow(0 8px 30px rgba(0, 0, 0, 0.7)); }
.hero-hint {
  position: absolute; left: 50%; bottom: 34px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.3em; text-transform: uppercase; color: #dfe4ef;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
}
.hero-hint i { width: 1px; height: 38px; background: linear-gradient(#dfe4ef, transparent); animation: hint 1.8s ease-in-out infinite; transform-origin: top; }
@keyframes hint { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

.entrance {
  position: absolute; inset: 0; z-index: 3;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: 0 var(--pad);
  background:
    radial-gradient(70% 55% at 15% 100%, rgba(229, 32, 46, 0.22), transparent 70%),
    radial-gradient(70% 55% at 85% 100%, rgba(46, 107, 255, 0.26), transparent 70%),
    linear-gradient(223deg, #0d1530, #05070e 70%);
  -webkit-mask-image: radial-gradient(circle at 50% 100vh, #000 0%, transparent 0%);
  mask-image: radial-gradient(circle at 50% 100vh, #000 0%, transparent 0%);
  visibility: hidden;
}
.entrance-logo { width: clamp(180px, 20vw, 300px); height: auto; margin-bottom: 8px; }
.entrance .gradient-title { font-size: clamp(64px, 10vw, 168px); }
.entrance-sub { margin: 18px 0 0; max-width: 560px; color: #cfd6e6; font-size: clamp(16px, 1.3vw, 20px); }

/* 2/4. pinned shots (the first one slides under the hero's last screen so they crossfade) */
.shot .stage { background: transparent; }
.shot.overlap { margin-top: -170vh; } /* starts pinning 70vh before the hero lets go */
.shot-media, .shot-media img, .shot-media video { position: absolute; inset: 0; width: 100%; height: 100%; }
.shot-media img, .shot-media video { object-fit: cover; transform: scale(var(--s, 1.15)); will-change: transform; }
.shot-media { opacity: var(--o, 0); }

/* 3/5. chapters (text + rising images) */
.chapter {
  position: relative; z-index: 3;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); align-items: start;
  padding: 10vh var(--pad) 20vh;
  margin-top: -120vh; /* rides up over the pinned shot before it lets go */
}
.chapter-col { display: flex; flex-direction: column; gap: clamp(24px, 4vw, 56px); }
.chapter-col.text { padding-top: 40vh; }
.chapter-col.text > p { margin: 0; color: #d3d9e6; max-width: 520px; font-size: clamp(16px, 1.2vw, 19px); }
.chapter-col.text > p.eyebrow { margin-bottom: -30px; }
.chapter-title { font-size: clamp(64px, 8.6vw, 156px); }
.chapter-lead { font-weight: 700; color: var(--text) !important; font-size: clamp(20px, 1.9vw, 30px) !important; line-height: 1.3; }
.img-box { padding-top: 70vh; will-change: transform; transform: translateY(var(--y, 0px)); }
.chapter.flip .img-box { padding-top: 55vh; }
.ph { overflow: hidden; border-radius: 6px; background: #0b1225; box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.95); }
.ph img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s cubic-bezier(.2, .7, .2, 1); }
.ph:hover img { transform: scale(1.03); }
.ph-xtall { height: 90vh; }
.ph-tall { height: 80vh; }
.ph-mid { height: 50vh; }
.ph-wide { aspect-ratio: 16 / 9; }

/* 6. grow */
.grow .stage { background: var(--ink); }
.grow-kicker {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center;
  font-size: clamp(70px, 15vw, 260px); color: transparent; -webkit-text-stroke: 1px rgba(143, 176, 255, 0.35);
  transform: scale(var(--ks, 1)); opacity: var(--ko, 1);
}
.grow-frame { position: absolute; inset: 0; clip-path: inset(var(--ciy, 18%) var(--cix, 34%) round var(--cr, 22px)); }
.grow-frame picture, .grow-frame img { width: 100%; height: 100%; }
.grow-frame img { object-fit: cover; object-position: 50% 45%; transform: scale(var(--gs, 1.25)); }
.grow-frame::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to right, rgba(0, 0, 0, 0.75), transparent 60%), linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent 45%); opacity: var(--go, 0); }
.grow-copy {
  position: absolute; left: var(--pad); bottom: clamp(44px, 10vh, 120px); max-width: min(620px, 88vw);
  opacity: var(--go, 0); transform: translateY(calc((1 - var(--go, 0)) * 40px));
}
.grow-copy .display { font-size: clamp(48px, 7vw, 120px); margin-bottom: 16px; }
.grow-copy p:last-child { margin: 0; color: #dfe4ef; }

/* World captures continue directly after the Santiago section. */
.world-scenes {
  padding: 0 var(--pad) clamp(72px, 12vh, 140px);
  background: var(--ink);
}
.world-scenes-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.957fr) minmax(0, 1fr); /* the 3:2 lead is as tall as the two 16:9 scenes beside it */
  gap: clamp(14px, 2vw, 28px);
  max-width: 1320px;
  margin: 0 auto;
}
/* Pictures only: not clickable, draggable or selectable. */
.world-scene {
  overflow: hidden;
  background: #070a12;
  border: 1px solid rgba(143, 176, 255, 0.16);
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.world-scene img {
  display: block;
  width: 100%;
  height: auto !important;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  object-position: center;
  -webkit-user-drag: none;
}
.world-scene.lead { grid-row: span 2; }
.world-scene.lead img { aspect-ratio: 3 / 2; }
.world-scene figcaption {
  padding: 13px 16px 15px;
  color: #dfe4ef;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* 7. edition */
.edition { padding: clamp(90px, 16vh, 200px) var(--pad); perspective: 1600px; }
.edition-card {
  max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(30px, 5vw, 80px); align-items: center;
  padding: clamp(24px, 4vw, 56px); border-radius: 28px;
  background:
    radial-gradient(60% 80% at 0% 100%, rgba(229, 32, 46, 0.28), transparent 70%),
    radial-gradient(70% 90% at 100% 0%, rgba(46, 107, 255, 0.32), transparent 70%),
    linear-gradient(160deg, #101a38, #070b18);
  border: 1px solid rgba(143, 176, 255, 0.16);
}
.edition-art { border-radius: 14px; overflow: hidden; transform: rotateY(var(--ry, -16deg)) rotateX(var(--rx, 4deg)) translateY(var(--ty, 40px)); box-shadow: 0 50px 90px -30px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(255, 255, 255, 0.06); will-change: transform; }
.edition-art img { width: 100%; height: auto; }
.edition-copy .display { font-size: clamp(48px, 6vw, 100px); margin-bottom: 18px; }
.edition-copy p:not(.eyebrow) { color: #d5dbe8; margin: 0 0 10px; max-width: 520px; }

/* 8. final */
.final .stage { background: #000; }
.final-media, .final-media img { position: absolute; inset: 0; width: 100%; height: 100%; }
.final-media { opacity: var(--fo, 0); }
.final-media img { object-fit: cover; transform: scale(var(--fs, 1.1)); }
.final-message {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  background: radial-gradient(ellipse at center, rgba(5, 8, 18, 0.72), rgba(5, 8, 18, 0.94) 70%);
  opacity: var(--mo, 0); visibility: hidden;
}
.final-message img { width: clamp(200px, 22vw, 340px); height: auto; }
.final-message .gradient-title { font-size: clamp(64px, 10vw, 168px); margin-top: 6px; }

/* footer */
.footer { padding: 70px var(--pad) 60px; text-align: center; display: grid; justify-items: center; gap: 10px; background: var(--ink); border-top: 1px solid rgba(143, 176, 255, 0.1); }
.footer-qg { width: 130px; height: auto; margin-bottom: 8px; }
.footer-tag { margin: 0; font-weight: 700; }
.footer-rating span { display: inline-grid; place-items: center; width: 54px; height: 54px; border: 2px solid var(--red); border-radius: 8px; font: 400 24px/1 var(--display); color: var(--red); margin: 10px 0; }
.footer-note, .footer-copy { margin: 0; color: var(--muted); font-size: 14px; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav { justify-content: space-between; }
  .nav-logo img { height: 44px; }
  .chapter { grid-template-columns: 1fr; margin-top: -40vh; padding-bottom: 10vh; }
  .chapter-col.text { padding-top: 30vh; }
  .img-box, .chapter.flip .img-box { padding-top: 0; }
  .chapter.flip .img-box { order: 2; }
  .ph-xtall { height: 70vh; }
  .ph-tall { height: 62vh; }
  .ph-mid { height: 42vh; }
  .edition-card { grid-template-columns: 1fr; }
  .edition-art { max-width: 420px; margin: 0 auto; }
  .world-scenes-grid { grid-template-columns: 1fr; }
  .world-scene.lead { grid-row: auto; }
}

/* reduced motion: pins collapse and everything sits in its final state */
@media (prefers-reduced-motion: reduce) {
  .pin { height: auto !important; }
  .pin .stage { position: relative; height: 100vh; }
  .shot-media { opacity: 1; }
  .shot-media img, .grow-frame img, .final-media img { transform: none; }
  .chapter { margin-top: 0; }
  .img-box { transform: none; }
  .grow-frame { clip-path: none; }
  .grow-frame::after, .grow-copy { opacity: 1; transform: none; }
  .grow-kicker { display: none; }
  .final-media { opacity: 1; }
  .final-message { opacity: 1; visibility: visible; }
  .entrance { position: relative; height: 100vh; visibility: visible; -webkit-mask-image: none; mask-image: none; }
  .hero .stage { height: auto; }
  .hero-canvas { position: relative; display: block; height: 100vh; }
  .hero-hint { display: none; }
  .shot.overlap { margin-top: 0; }
  .edition-art { transform: none; }
}
