/* The Discovery page (src/discovery/index.njk): ZEROS ADVENTURES: Scoperta, coming soon. Paced like a trailer: a
   full-bleed hero, the copy on the night's dark with short lines given room, the mission over a full-bleed picture (the
   turn), the "Become" lines as a crescendo, the city in a full-bleed picture, then the early list and the door, a small
   glimpse of the city today, and the closing line. The three full-bleed pictures are key-art slots ([data-key-art]).
   Theme tokens only; #fff-like ink only over pictures. */

.disc-hero,
.disc-reel,
.disc-slot {
  --bleed: 48px;
}

/* ─── The hero ─── */
.disc-hero {
  position: relative;
  display: grid;
  align-content: end;
  margin: -40px calc(-1 * var(--bleed)) 0;
  padding: 0 var(--bleed) 72px;
  min-height: min(92vh, 900px);
  overflow: hidden;
  isolation: isolate;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 110px);
  mask-image: linear-gradient(180deg, transparent, #000 110px);
}

.disc-hero__art,
.disc-slot__art {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}

.disc-hero__art { object-position: 88% 40%; }

/* The words sit in the dark of the mountain and fall into the page's night below. */
.disc-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--bg-sunken) 55%, transparent) 0%, color-mix(in srgb, var(--bg-sunken) 20%, transparent) 45%, transparent 70%),
    linear-gradient(180deg, transparent 40%, color-mix(in srgb, var(--bg-sunken) 70%, transparent) 75%, var(--bg-sunken) 100%);
}

.disc-hero__inner {
  max-width: 46rem;
}

.disc-hero__eyebrow {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brand-text);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

.disc-hero__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6.2vw, 4.8rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: 0.02em;
  color: #f3f6f9;
  text-wrap: balance;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.5), 0 6px 34px rgba(0, 0, 0, 0.75);
}

.disc-hero__ways {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 30px 0 0;
}

/* ─── The reel: the copy on the night's dark, centered, each line given room ─── */
.disc-reel {
  display: grid;
  justify-items: center;
  gap: clamp(56px, 9vh, 96px);
  margin: 0 calc(-1 * var(--bleed));
  padding: clamp(72px, 12vh, 128px) var(--bleed);
  background: var(--bg-sunken);
  text-align: center;
}

.disc-reel p {
  margin: 0;
}

.disc-say {
  max-width: 38rem;
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  line-height: 1.7;
  color: var(--ink);
  text-wrap: pretty;
}

.disc-mother {
  font-style: italic;
  color: var(--brand-text);
}

.disc-say--risk {
  padding: 26px 0;
  border-block: 1px solid color-mix(in srgb, var(--accent-red) 45%, transparent);
}

.disc-lines {
  display: grid;
  gap: 18px;
  max-width: 40rem;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.4vw, 1.55rem);
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
  text-wrap: balance;
}

.disc-lines__lead {
  margin-bottom: 18px !important;
  font-size: 0.8em;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand-text);
}

.disc-lines__last {
  margin-top: 22px !important;
  color: var(--ink-soft);
  font-style: italic;
}

.disc-warn {
  max-width: 34rem;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.8vw, 1.8rem);
  font-weight: 700;
  line-height: 1.3;
  color: var(--accent-red);
  text-wrap: balance;
  text-shadow: 0 0 28px color-mix(in srgb, var(--accent-red) 35%, transparent);
}

/* The arrival: a full-bleed still in the reel, rising out of the night and sinking back into it. No words over it: the
   traveler's face is the line. */
.disc-still {
  justify-self: stretch;
  margin: 0 calc(-1 * var(--bleed));
}

.disc-still__art {
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
  max-height: 94vh;
  object-fit: cover;
  object-position: 30% 50%;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 14%, #000 86%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 14%, #000 86%, transparent);
}

/* ─── The full-bleed slots: the mission and the city ─── */
.disc-slot {
  position: relative;
  display: grid;
  place-items: center;
  margin: 0 calc(-1 * var(--bleed));
  padding: 120px var(--bleed);
  min-height: min(100vh, 980px);
  overflow: hidden;
  isolation: isolate;
  background: var(--bg-sunken);
  text-align: center;
}

/* The picture rises out of the night and sinks back into it. */
.disc-slot::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, var(--bg-sunken) 0%, color-mix(in srgb, var(--bg-sunken) 35%, transparent) 22%, color-mix(in srgb, var(--bg-sunken) 35%, transparent) 70%, var(--slot-end, var(--bg-sunken)) 100%),
    radial-gradient(ellipse at 50% 50%, color-mix(in srgb, var(--bg-sunken) 55%, transparent), transparent 70%);
}

.disc-slot__text {
  position: relative;
  max-width: 48rem;
}

.disc-slot__text p {
  margin: 0;
  color: #e6edf3;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.85);
}

.disc-slot--mission .disc-slot__art { object-position: 88% 50%; }
.disc-slot--city { --slot-end: var(--bg-raised); }
.disc-slot--city .disc-slot__art { object-position: 85% 50%; }

.disc-mission {
  display: grid;
  gap: 26px;
}

.disc-mission__setup {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  font-style: italic;
}

.disc-mission__goal {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5.4vw, 4rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: 0.01em;
  text-wrap: balance;
  color: #f3f6f9 !important;
}

.disc-mission__record {
  margin-top: 28px !important;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
}

.disc-mission__doubt {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4.6vw, 3.2rem);
  font-weight: 700;
  color: var(--brand-text) !important;
}

.disc-mission__deeper {
  max-width: 30rem;
  justify-self: center;
  font-size: clamp(1.05rem, 1.8vw, 1.2rem);
  color: #cfd9e2 !important;
}

/* ─── The crescendo ─── */
.disc-become {
  display: grid;
  gap: 14px;
  padding-top: 24px;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  text-wrap: balance;
}

.disc-become__1 { font-size: clamp(1.3rem, 2.6vw, 1.8rem); color: var(--ink-soft); }
.disc-become__2 { font-size: clamp(1.8rem, 3.8vw, 2.7rem); color: var(--ink); }
.disc-become__3 {
  font-size: clamp(2.5rem, 6.6vw, 4.8rem);
  letter-spacing: 0.03em;
  color: var(--brand-text);
  text-shadow: 0 0 40px color-mix(in srgb, var(--brand) 35%, transparent);
}

.disc-become__or {
  max-width: 30rem;
  justify-self: center;
  margin-top: 40px !important;
  font-family: var(--font-body);
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1.5;
  color: var(--ink-soft);
}

.disc-waiting {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 6vw, 4.4rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #f3f6f9 !important;
}

/* The lines rise one after another as they scroll in (discovery.js arms them; never with reduced motion). */
.disc-rise.is-armed {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 1.1s ease, transform 1.1s ease;
}

.disc-rise.is-armed.is-in {
  opacity: 1;
  transform: none;
}

/* The gate: the early list and the door, side by side on wide screens. */
.disc-gate {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 28px;
  margin: 0 0 24px;
  padding-top: 56px;
}

.disc-gate__title {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.15;
  text-wrap: balance;
}

.disc-early > p,
.disc-key__text > p {
  line-height: 1.6;
}

.disc-early .follow--one {
  grid-template-columns: minmax(0, 1fr);
  margin-top: 20px;
}

.disc-early,
.disc-key {
  scroll-margin-top: 24px;
}

/* Have a key: a door, not a login screen. A stone arch, two leaves with pulls, the teal light line down the seam (the
   city's doors: docs/canon/city/how-it-looks.md), the Crown's gold sigil above. The leaves part a little on hover. */
.disc-key {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  padding: var(--card-pad);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    radial-gradient(ellipse at 22% 70%, color-mix(in srgb, var(--accent-teal) 16%, transparent), transparent 60%),
    var(--bg-sunken);
}

.disc-door {
  position: relative;
  display: grid;
  justify-items: center;
  width: 150px;
  padding-top: 4px;
  text-decoration: none;
}

.disc-door__sigil {
  width: 44px;
  height: 44px;
  margin-bottom: 8px;
  filter: drop-shadow(0 0 10px color-mix(in srgb, var(--brand) 50%, transparent));
}

.disc-door__frame {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 132px;
  height: 196px;
  padding: 8px 8px 0;
  border-radius: 66px 66px 4px 4px;
  background: linear-gradient(180deg, #3a3f46, #23272d);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 35%, transparent), 0 14px 30px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

/* The light behind the leaves: what waits inside, seen only through the seam. */
.disc-door__frame::before {
  content: "";
  position: absolute;
  inset: 8px 8px 0;
  border-radius: 58px 58px 0 0;
  background: radial-gradient(ellipse at 50% 70%, color-mix(in srgb, var(--accent-teal) 80%, #e8ffff), var(--accent-teal) 40%, transparent 80%);
}

.disc-door__leaf {
  position: relative;
  z-index: 1;
  background: linear-gradient(180deg, #1b2430, #10161e);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  transition: transform 0.6s ease;
}

.disc-door__leaf--l {
  border-radius: 58px 0 0 0;
  border-right: 1px solid var(--accent-teal);
}

.disc-door__leaf--r {
  border-radius: 0 58px 0 0;
  border-left: 1px solid var(--accent-teal);
}

.disc-door__pull {
  position: absolute;
  top: 48%;
  width: 4px;
  height: 38px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--brand-text), var(--brand));
}

.disc-door__leaf--l .disc-door__pull { right: 8px; }
.disc-door__leaf--r .disc-door__pull { left: 8px; }

.disc-door__step {
  width: 150px;
  height: 8px;
  border-radius: 2px;
  background: linear-gradient(180deg, #4a4f57, #2a2e34);
}

.disc-door:hover .disc-door__leaf--l,
.disc-door:focus-visible .disc-door__leaf--l { transform: translateX(-10px); }
.disc-door:hover .disc-door__leaf--r,
.disc-door:focus-visible .disc-door__leaf--r { transform: translateX(10px); }

.disc-door:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 6px;
  border-radius: 8px;
}

@media (prefers-reduced-motion: reduce) {
  .disc-door__leaf { transition: none; }
}


.disc-note {
  margin-top: 12px;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

/* ─── A glimpse of the city: four key-art stills, small, with the live hour ─── */
.disc-glimpse {
  margin: 8px 0 0;
  padding: 28px 0 0;
  border-top: 1px solid var(--border);
}

.disc-glimpse__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  margin-bottom: 16px;
}

.disc-glimpse__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand-text);
}

.disc-glimpse__row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.disc-glimpse__row img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

/* The city's own hour and weather, live: a small lamp that breathes. */
.disc-live {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 6px 14px;
  border: 1px solid color-mix(in srgb, var(--accent-teal) 55%, transparent);
  border-radius: var(--radius-pill);
  background: var(--bg-sunken);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink);
}

.disc-live[hidden] { display: none; }

.disc-live__dot {
  width: 9px;
  height: 9px;
  flex: none;
  border-radius: 50%;
  background: var(--accent-teal);
  box-shadow: 0 0 10px var(--accent-teal);
}

@media (prefers-reduced-motion: no-preference) {
  .disc-live__dot { animation: discBreathe 2.6s ease-in-out infinite; }
}

@keyframes discBreathe {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* ─── The closing line ─── */
.disc-close {
  margin: 0 calc(-1 * 48px) -40px;
  padding: 96px 48px 104px;
  background: linear-gradient(180deg, var(--bg-raised), var(--bg-sunken));
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.6vw, 2.4rem);
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-wrap: balance;
  color: var(--ink);
}

@media (max-width: 1000px) {
  .disc-gate { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 700px) {
  .disc-hero, .disc-reel, .disc-slot { --bleed: 20px; }
  .disc-hero {
    margin-top: -24px;
    padding-bottom: 40px;
    min-height: 92svh;
  }
  .disc-hero__art { object-position: 50% 50%; }
  .disc-still__art { max-height: none; }
  .disc-hero::after {
    background: linear-gradient(180deg, transparent 30%, color-mix(in srgb, var(--bg-sunken) 60%, transparent) 58%, color-mix(in srgb, var(--bg-sunken) 92%, transparent) 82%, var(--bg-sunken) 100%);
  }
  .disc-slot { min-height: 100svh; padding-block: 96px; }
  /* On a phone the watcher's face would sit under the mission's words: the picture stands above them instead. */
  .disc-slot--mission { place-items: stretch; min-height: 0; padding-top: 0; }
  .disc-slot--mission::after { display: none; }
  .disc-slot--mission picture { display: block; margin: 0 calc(-1 * var(--bleed)); }
  .disc-slot--mission .disc-slot__art {
    position: static;
    height: auto;
    aspect-ratio: 4 / 5;
    -webkit-mask-image: linear-gradient(180deg, transparent, #000 12%, #000 72%, transparent);
    mask-image: linear-gradient(180deg, transparent, #000 12%, #000 72%, transparent);
  }
  .disc-slot--mission .disc-slot__text { margin-top: -64px; }
  .disc-slot--city .disc-slot__art { object-position: 50% 50%; }
  .disc-slot::after {
    background: linear-gradient(180deg, var(--bg-sunken) 0%, color-mix(in srgb, var(--bg-sunken) 55%, transparent) 18%, color-mix(in srgb, var(--bg-sunken) 55%, transparent) 78%, var(--slot-end, var(--bg-sunken)) 100%);
  }
  .disc-gate { padding-top: 40px; }
  .disc-key { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; }
  .disc-key .page__more { justify-content: center; }
  .disc-glimpse__row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .disc-glimpse__row img { aspect-ratio: 4 / 5; }
  .disc-live { font-size: 12px; padding: 6px 12px; }
  .disc-close { margin: 0 -20px -24px; padding: 72px 20px 80px; }
}
