:root {
  color-scheme: dark;
  --bg: #0b0f0d;
  --bg-soft: #101612;
  --panel: #151c18;
  --panel-warm: #1c1a15;
  --text: #f1e8db;
  --muted: #aaa497;
  --sand: #d3b98f;
  --sage: #91aa91;
  --cyan: #77b9c0;
  --line: rgba(241, 232, 219, 0.13);
  --line-strong: rgba(241, 232, 219, 0.24);
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 85% 12%, rgba(79, 112, 87, 0.13), transparent 30rem),
    radial-gradient(circle at 7% 58%, rgba(119, 185, 192, 0.07), transparent 28rem),
    var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

body::selection {
  background: var(--sand);
  color: var(--bg);
}

img {
  max-width: 100%;
}

button,
a {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  color: inherit;
}

.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px clamp(18px, 4vw, 56px) 10px;
  border-bottom: 1px solid rgba(241, 232, 219, 0.08);
  background: linear-gradient(180deg, rgba(5, 8, 6, 0.9), rgba(5, 8, 6, 0.52));
  backdrop-filter: blur(18px);
}

.topbar__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
}

/* The cast strip: every character's own site is one tap away from the
   world page, without scrolling to find a link. */
.cast-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

.cast-strip::-webkit-scrollbar { display: none; }

.cast-strip a {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.cast-strip a:hover,
.cast-strip a:focus-visible {
  color: var(--text);
  border-color: var(--line-strong);
}

.cast-strip__staff {
  border-color: rgba(119, 185, 192, 0.45);
  color: var(--cyan);
}

.cast-strip__key {
  margin-left: auto;
  border-color: rgba(211, 185, 143, 0.56);
  color: var(--text);
  background: rgba(211, 185, 143, 0.1);
}

/* Anchor jumps land below the fixed two-row header, not under it. */
main section[id] {
  scroll-margin-top: 132px;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.brand__mark {
  color: var(--cyan);
  letter-spacing: 0.04em;
}

.topbar__nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2.4vw, 28px);
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.topbar__nav a {
  transition: color 160ms ease;
}

.topbar__nav a:hover,
.topbar__nav a:focus-visible {
  color: var(--text);
}

.topbar__portal {
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
}

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: end;
  overflow: hidden;
  isolation: isolate;
}

.hero__image,
.hero__veil {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero__image {
  z-index: -3;
  object-fit: cover;
  object-position: 50% 37%;
  filter: saturate(0.83) contrast(1.03);
  transform: scale(1.015);
}

.hero__veil {
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(7, 10, 8, 0.93) 0%, rgba(7, 10, 8, 0.67) 43%, rgba(7, 10, 8, 0.12) 74%),
    linear-gradient(0deg, var(--bg) 0%, transparent 35%, rgba(0, 0, 0, 0.18) 100%);
}

.hero__content {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 132px 0 clamp(72px, 9vh, 112px);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--cyan);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero h1,
.section h2,
.scene-dialog h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: -0.045em;
}

.hero h1 {
  margin: 0;
  max-width: 780px;
  font-size: clamp(5rem, 14vw, 11rem);
  line-height: 0.72;
  text-wrap: balance;
}

.hero__copy {
  max-width: 570px;
  margin: 34px 0 20px;
  color: #ddd4c7;
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  line-height: 1.45;
}

.hero__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 30px;
}

.hero__tags span,
.filter-button {
  border: 1px solid var(--line-strong);
  border-radius: 999px;
}

.hero__tags span {
  padding: 7px 11px;
  color: #d3cec5;
  background: rgba(8, 11, 9, 0.45);
  font-size: 0.76rem;
  font-weight: 750;
  backdrop-filter: blur(8px);
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 17px;
  border: 1px solid rgba(211, 185, 143, 0.56);
  border-radius: 999px;
  background: rgba(211, 185, 143, 0.1);
  color: var(--text);
  font-weight: 800;
  transition: transform 160ms ease, background 160ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
  background: rgba(211, 185, 143, 0.18);
}

.section {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: clamp(76px, 10vw, 136px) 0;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: clamp(46px, 8vw, 120px);
  align-items: end;
}

.intro__copy h2,
.section-heading h2,
.woods__copy h2 {
  margin: 0;
  font-size: clamp(3.2rem, 7vw, 6.8rem);
  line-height: 0.88;
}

.intro__copy > p:not(.eyebrow) {
  max-width: 690px;
  color: var(--muted);
  font-size: 1.06rem;
}

.intro__copy .lede,
.woods__copy .lede {
  color: var(--text);
  font-size: clamp(1.35rem, 2.6vw, 2rem);
  line-height: 1.28;
}

.identity-card {
  padding: 24px;
  border: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(145, 170, 145, 0.1), transparent 45%),
    var(--panel);
  box-shadow: var(--shadow);
}

.identity-card dl {
  margin: 0;
}

.identity-card dl div {
  padding: 15px 0;
  border-top: 1px solid var(--line);
}

.identity-card dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.identity-card dd {
  margin: 5px 0 0;
  font-weight: 750;
}

.worlds {
  border-top: 1px solid var(--line);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 36px;
  margin-bottom: 28px;
}

.section-heading > p {
  max-width: 340px;
  margin: 0 0 6px;
  color: var(--muted);
  line-height: 1.55;
}

.world-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px;
}

.world-card {
  grid-column: span 5;
  min-height: 500px;
  margin: 0;
  position: relative;
  overflow: hidden;
  background: var(--panel);
}

.world-card--wide {
  grid-column: span 7;
}

.world-card img {
  width: 100%;
  height: 100%;
  min-height: 500px;
  display: block;
  object-fit: cover;
  object-position: 50% 34%;
  filter: saturate(0.88);
  transition: transform 500ms ease, filter 500ms ease;
}

.world-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(5, 8, 6, 0.84), transparent 52%);
  pointer-events: none;
}

.world-card:hover img {
  transform: scale(1.025);
  filter: saturate(1);
}

.world-card figcaption {
  position: absolute;
  z-index: 2;
  left: 20px;
  right: 20px;
  bottom: 18px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 13px;
  align-items: baseline;
}

.world-card figcaption span {
  grid-row: 1 / span 2;
  color: var(--cyan);
  font-size: 0.72rem;
  font-weight: 900;
}

.world-card figcaption strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.8rem;
  font-weight: 500;
}

.world-card figcaption small {
  color: #c1bbb0;
}

.world-card--portal img {
  filter: saturate(0.5) brightness(0.72);
}

.motion {
  border-top: 1px solid var(--line);
}

.motion-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.motion-card {
  margin: 0;
  position: relative;
  overflow: hidden;
  background: var(--panel);
}

.motion-card video {
  width: 100%;
  height: 100%;
  min-height: 480px;
  display: block;
  object-fit: cover;
  filter: saturate(0.9);
}

.motion-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(5, 8, 6, 0.84), transparent 52%);
  pointer-events: none;
}

.motion-card figcaption {
  position: absolute;
  z-index: 2;
  left: 20px;
  right: 20px;
  bottom: 18px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 13px;
  align-items: baseline;
}

.motion-card figcaption span {
  grid-row: 1 / span 2;
  color: var(--cyan);
  font-size: 0.72rem;
  font-weight: 900;
}

.motion-card figcaption strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.8rem;
  font-weight: 500;
}

.motion-card figcaption small {
  color: #c1bbb0;
}

.living {
  border-top: 1px solid var(--line);
}

.living-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.living-card {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel);
}

.living-card video {
  width: 100%;
  height: 100%;
  min-height: 320px;
  display: block;
  object-fit: cover;
  filter: saturate(0.9);
}

.living-card::after {
  content: "";
  position: absolute;
  inset: 45% 0 0;
  background: linear-gradient(0deg, rgba(4, 7, 5, 0.9), transparent);
  pointer-events: none;
}

.living-card__caption {
  position: absolute;
  z-index: 2;
  left: 16px;
  right: 16px;
  bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.living-card__caption span {
  color: var(--cyan);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.living-card__caption strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.45rem;
  font-weight: 500;
}

.carousel-section {
  border-top: 1px solid var(--line);
}

.carousel {
  position: relative;
}

.carousel__stage {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--panel);
}

.carousel__slide {
  margin: 0;
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 700ms ease;
  pointer-events: none;
}

.carousel__slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.carousel__slide img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: 50% 30%;
  filter: saturate(0.9);
}

.carousel__slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(5, 8, 6, 0.82), transparent 48%);
  pointer-events: none;
}

.carousel__slide figcaption {
  position: absolute;
  z-index: 2;
  left: 20px;
  bottom: 18px;
  display: flex;
  align-items: baseline;
  gap: 13px;
}

.carousel__slide figcaption span {
  color: var(--cyan);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.carousel__slide figcaption strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.8rem;
  font-weight: 500;
}

.carousel__button {
  position: absolute;
  z-index: 3;
  top: 50%;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  transform: translateY(-50%);
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: rgba(7, 10, 8, 0.66);
  color: var(--text);
  cursor: pointer;
  font-size: 1.7rem;
  line-height: 1;
  backdrop-filter: blur(8px);
}

.carousel__button--prev {
  left: 14px;
}

.carousel__button--next {
  right: 14px;
}

.carousel__dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}

.carousel__dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.carousel__dot.is-active {
  background: var(--cyan);
  border-color: var(--cyan);
}

.woods {
  width: min(1320px, calc(100% - 24px));
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 0;
  align-items: stretch;
  padding-top: 40px;
}

.woods__media {
  min-height: 720px;
  overflow: hidden;
  background: #121713;
}

.woods__media img {
  width: 100%;
  height: 100%;
  min-height: 720px;
  display: block;
  object-fit: cover;
}

.woods__copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(32px, 6vw, 86px);
  background:
    radial-gradient(circle at 92% 7%, rgba(145, 170, 145, 0.14), transparent 25rem),
    var(--panel);
}

.woods__copy > p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.68;
}

.woods__copy .lede {
  color: var(--text);
  line-height: 1.28;
}

.character-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 22px 0 12px;
}

.character-pair div {
  padding: 14px;
  border: 1px solid var(--line);
  background: rgba(8, 12, 9, 0.34);
}

.character-pair span {
  display: block;
  color: var(--sand);
  font-weight: 850;
}

.character-pair small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.4;
}

.woods__copy .woods__ending {
  margin-top: 24px;
  color: var(--text);
  font-weight: 850;
}

.woods__characters {
  align-self: flex-start;
  margin-top: 8px;
  color: var(--sand);
  font-weight: 850;
}

.archive {
  border-top: 1px solid var(--line);
}

.archive__heading {
  margin-bottom: 18px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 24px;
}

.filter-button {
  min-height: 38px;
  padding: 0 13px;
  cursor: pointer;
  background: transparent;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.filter-button:hover,
.filter-button:focus-visible,
.filter-button.is-active {
  border-color: rgba(119, 185, 192, 0.62);
  background: rgba(119, 185, 192, 0.09);
  color: var(--text);
}

.archive-grid {
  columns: 4 230px;
  column-gap: 12px;
}

.archive-card {
  width: 100%;
  margin: 0 0 12px;
  padding: 0;
  position: relative;
  display: block;
  overflow: hidden;
  break-inside: avoid;
  border: 1px solid var(--line);
  background: var(--panel);
  cursor: zoom-in;
  text-align: left;
}

.archive-card[hidden] {
  display: none;
}

/* Golden hour shelf: the clips sit in the archive masonry as living
   cards, so they take the masonry rhythm (full column width, same
   gaps, no breaking across columns) instead of the living grid's. */
.golden-hour .living-card {
  width: 100%;
  margin: 0 0 12px;
  break-inside: avoid;
}

.golden-hour .living-card[hidden] {
  display: none;
}

.golden-hour .living-card video {
  min-height: 240px;
}

.dance-videos-heading {
  margin-top: 48px;
}

.dance-videos-heading h2 {
  font-size: clamp(2.2rem, 5vw, 4rem);
}

.archive-card img {
  width: 100%;
  height: auto;
  display: block;
  filter: saturate(0.83) brightness(0.92);
  transition: transform 320ms ease, filter 320ms ease;
}

.archive-card::after {
  content: "";
  position: absolute;
  inset: 45% 0 0;
  background: linear-gradient(0deg, rgba(4, 7, 5, 0.9), transparent);
  pointer-events: none;
}

.archive-card__caption {
  position: absolute;
  z-index: 2;
  left: 14px;
  right: 14px;
  bottom: 12px;
}

.archive-card__caption span {
  display: block;
  color: var(--cyan);
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.archive-card__caption strong {
  display: block;
  margin-top: 3px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
  font-weight: 500;
}

.archive-card:hover img,
.archive-card:focus-visible img {
  transform: scale(1.018);
  filter: saturate(1) brightness(1);
}

.archive-card:focus-visible,
.filter-button:focus-visible,
.button:focus-visible,
.topbar a:focus-visible,
.scene-dialog__close:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.scene-dialog {
  width: min(1050px, calc(100% - 24px));
  max-height: calc(100svh - 24px);
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 38px 120px rgba(0, 0, 0, 0.72);
}

.scene-dialog[open] {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
}

.scene-dialog::backdrop {
  background: rgba(3, 5, 4, 0.88);
  backdrop-filter: blur(8px);
}

.scene-dialog__media {
  min-height: min(78svh, 760px);
  background: #050706;
}

.scene-dialog__media img {
  width: 100%;
  height: 100%;
  max-height: 86svh;
  display: block;
  object-fit: contain;
}

.scene-dialog__copy {
  align-self: end;
  padding: 30px;
}

.scene-dialog__copy h2 {
  margin: 0;
  font-size: clamp(2.4rem, 5vw, 4.8rem);
  line-height: 0.9;
}

.scene-dialog__copy > p:last-child {
  color: var(--muted);
  line-height: 1.55;
}

.scene-dialog__close {
  position: absolute;
  z-index: 3;
  top: 12px;
  right: 12px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: rgba(7, 10, 8, 0.78);
  color: var(--text);
  cursor: pointer;
  font-size: 1.6rem;
  line-height: 1;
}

/* Martha, the assistant: staff card at the foot of the world page.
   She is crew, not cast, so the card borrows the identity-card shell
   and gives her the cyan the brand mark uses. */
.staff-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: clamp(20px, 4vw, 44px);
  align-items: center;
  padding: clamp(20px, 3.4vw, 36px);
  border: 1px solid rgba(119, 185, 192, 0.32);
  border-radius: 28px;
  background: linear-gradient(165deg, var(--panel) 0%, var(--bg-soft) 100%);
  box-shadow: var(--shadow);
}

.staff-card__image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
}

.staff-card__copy h2 {
  margin: 0 0 10px;
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.staff-card__copy p:not(.eyebrow) {
  max-width: 36rem;
  margin: 0 0 20px;
  color: var(--muted);
}

@media (max-width: 640px) {
  .staff-card {
    grid-template-columns: 1fr;
  }

  .staff-card__image {
    max-width: 240px;
  }
}

.footer {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 30px 0 54px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.84rem;
}

.footer p {
  margin: 0;
}

.footer a {
  color: var(--sand);
  font-weight: 800;
}

@media (max-width: 900px) {
  .intro,
  .woods {
    grid-template-columns: 1fr;
  }

  .identity-card {
    max-width: 620px;
  }

  .world-card,
  .world-card--wide {
    grid-column: span 6;
  }

  .woods {
    width: min(1180px, calc(100% - 24px));
  }

  .woods__media,
  .woods__media img {
    min-height: 620px;
  }

  .scene-dialog[open] {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }

  .scene-dialog__media {
    min-height: 58svh;
  }
}

@media (max-width: 640px) {
  .topbar {
    min-height: 60px;
    padding: 10px 14px;
  }

  /* Phone: the brand keeps its corner and the nav becomes one
     sideways-scrolling line, the same pattern the cast strip below
     it (and the character pages) already use. Nothing wraps
     mid-phrase, and no destination is hidden or cut off. */
  .topbar__row {
    gap: 14px;
  }

  .brand {
    flex: none;
  }

  .topbar__nav {
    flex: 1 1 auto;
    min-width: 0;
    gap: 11px;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 2px 0;
    font-size: 0.76rem;
    white-space: nowrap;
  }

  .topbar__nav::-webkit-scrollbar { display: none; }

  .topbar__nav a {
    flex: none;
  }

  .topbar__portal {
    padding: 6px 9px;
  }

  /* In the scrolling cast strip the key link rides at the end of the
     row: the auto margin that right-aligns it on wide screens can
     push the strip's start out of reach in some phone browsers. */
  .cast-strip__key {
    margin-left: 0;
  }

  .hero__content,
  .section,
  .footer {
    width: calc(100% - 24px);
  }

  .hero__content {
    padding-bottom: 64px;
  }

  .hero__image {
    object-position: 52% 38%;
  }

  .hero__veil {
    background:
      linear-gradient(0deg, rgba(7, 10, 8, 0.97) 0%, rgba(7, 10, 8, 0.62) 52%, rgba(7, 10, 8, 0.18) 100%),
      linear-gradient(90deg, rgba(7, 10, 8, 0.6), transparent);
  }

  .hero h1 {
    font-size: clamp(4.9rem, 25vw, 7rem);
  }

  .hero__copy {
    margin-top: 24px;
  }

  .section {
    padding: 74px 0;
  }

  .intro__copy h2,
  .section-heading h2,
  .woods__copy h2 {
    font-size: clamp(3rem, 15vw, 4.6rem);
  }

  .section-heading {
    display: block;
  }

  .section-heading > p {
    margin-top: 16px;
  }

  .world-grid {
    display: block;
  }

  .motion-grid,
  .living-grid {
    grid-template-columns: 1fr;
  }

  .living-card video {
    min-height: 240px;
  }

  .motion-card video {
    min-height: 380px;
  }

  .carousel__stage {
    aspect-ratio: 3 / 4;
  }

  .world-card,
  .world-card--wide {
    min-height: 440px;
    margin-bottom: 12px;
  }

  .world-card img {
    min-height: 440px;
  }

  .woods {
    width: calc(100% - 12px);
    padding-top: 20px;
  }

  .woods__media,
  .woods__media img {
    min-height: 520px;
  }

  .woods__copy {
    padding: 28px 18px 36px;
  }

  .character-pair {
    grid-template-columns: 1fr;
  }

  .archive-grid {
    columns: 2 145px;
    column-gap: 8px;
  }

  .archive-card {
    margin-bottom: 8px;
  }

  .archive-card__caption {
    left: 10px;
    right: 10px;
    bottom: 9px;
  }

  .archive-card__caption strong {
    font-size: 1rem;
  }

  .scene-dialog {
    width: calc(100% - 12px);
    max-height: calc(100svh - 12px);
  }

  .scene-dialog__copy {
    padding: 22px;
  }

  .footer {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* After dark: private, sign-in-gated gallery. */
.after-dark__lock {
  padding: 24px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  max-width: 620px;
}

.after-dark__lock p {
  margin: 0 0 10px;
}

.after-dark__lock .button {
  margin-top: 8px;
}

.private-card {
  margin: 0 0 12px;
  break-inside: avoid;
}

.private-card img {
  width: 100%;
  height: auto;
  display: block;
}

.private-card figcaption {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 2px 0;
}

.private-card figcaption span {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  opacity: 0.7;
}

/* After dark full-screen viewer: swipe, arrows, or keyboard through the set. */
.gallery-dialog {
  width: 100%;
  max-width: 100%;
  height: 100svh;
  max-height: 100svh;
  margin: 0;
  padding: 0;
  border: none;
  background: rgba(3, 5, 4, 0.97);
  color: var(--text);
}

.gallery-dialog::backdrop {
  background: rgba(3, 5, 4, 0.97);
}

.gallery-dialog[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-dialog__figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  max-width: 100%;
}

.gallery-dialog__figure img {
  max-width: 100vw;
  max-height: calc(100svh - 96px);
  object-fit: contain;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

.gallery-dialog__caption {
  display: flex;
  gap: 12px;
  align-items: baseline;
  font-size: 0.95rem;
}

.gallery-dialog__caption span {
  opacity: 0.65;
  font-variant-numeric: tabular-nums;
}

.gallery-dialog__close {
  position: absolute;
  top: 10px;
  right: 14px;
  z-index: 2;
  width: 48px;
  height: 48px;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.gallery-dialog__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 56px;
  height: 72px;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 2.6rem;
  cursor: pointer;
  opacity: 0.75;
}

.gallery-dialog__nav--prev { left: 2px; }
.gallery-dialog__nav--next { right: 2px; }

/* Gallery v2: After Dark filters, zoomable viewer, item copy. */
.after-dark__filters {
  margin: 0 0 18px;
}
.after-dark__filters[hidden],
.private-card[hidden] {
  display: none;
}
.gallery-dialog__copy {
  margin: 2px auto 0;
  max-width: 56ch;
  text-align: center;
  font-size: 0.92rem;
  line-height: 1.45;
  opacity: 0.85;
}
.gallery-dialog__copy[hidden] {
  display: none;
}
.gallery-dialog__figure img {
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.gallery-dialog.is-zoomed .gallery-dialog__figure img {
  cursor: grab;
}
.gallery-dialog.is-zoomed .gallery-dialog__figure img:active {
  cursor: grabbing;
}

/* Scroll sentinels under the auto-revealing grids (scene archive,
   Golden Hour, After Dark): invisible markers the scripts watch so
   the next chunk renders as the bottom of the grid approaches. */
.scroll-sentinel {
  height: 1px;
}

.scroll-sentinel[hidden] {
  display: none;
}

/* Back to top, bottom-right; on phones it lifts clear of the
   portal-wide issue pill that spans the bottom center. */
.back-to-top {
  position: fixed;
  right: 16px;
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 40;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(8, 11, 9, 0.82);
  color: var(--text);
  font-weight: 800;
  font-size: 0.85rem;
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.back-to-top[hidden] {
  display: none;
}

@media (max-width: 640px) {
  .back-to-top { bottom: 96px; right: 12px; }
}
