/* Committees listing (SPEC 9.2, reference/12 and 13) and committee pages (SPEC 9.3,
   reference/14 and 15). */

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

/* Clipped at the sides only: the glow fades out on its own below the header, behind the
   search bar and the cards (6 October; clipping it there left a hard edge at the search bar). */
.listing-head {
  position: relative;
  overflow-x: clip;
  padding: calc(var(--section-pad) + 40px) 0 56px;
  text-align: center;
}

/* The search and cards sit above the glow. */
.listing-head + [data-filters] {
  position: relative;
  z-index: 1;
}

/* The faint grid, fading out at the bottom by a mask (no navy overlay), so the header runs
   into the page without an edge. */
.listing-head::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgb(var(--teal-rgb) / 0.04) 1px, transparent 1px) 0 0 / 36px 36px,
    linear-gradient(90deg, rgb(var(--teal-rgb) / 0.04) 1px, transparent 1px) 0 0 / 36px 36px;
  -webkit-mask-image: linear-gradient(rgb(var(--shadow-rgb)) calc(100% - 80px), transparent);
  mask-image: linear-gradient(rgb(var(--shadow-rgb)) calc(100% - 80px), transparent);
  pointer-events: none;
}

.listing-head__orb {
  top: -40%;
  left: 50%;
  width: 900px;
  aspect-ratio: 1;
  background: radial-gradient(circle, rgb(var(--teal-dark-rgb) / 0.22) 0%, transparent 62%);
  transform: translateX(-50%);
}

.listing-head .container {
  position: relative;
  z-index: 1;
}

.listing-head__text {
  max-width: 560px;
  margin: 20px auto 0;
  color: var(--ink-75);
}

/* ---------- Tile grid (SPEC 8.6) ---------- */

.tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 52px 36px;
  padding-bottom: var(--section-pad);
}

.tile {
  display: block;
  color: inherit;
}

.tile[hidden] {
  display: none;
}

.tile__visual {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  overflow: hidden;
  aspect-ratio: 1;
  border-radius: var(--radius-tile);
  background: linear-gradient(160deg, var(--blue-650) 0%, var(--blue-800) 100%);
  box-shadow: 0 18px 46px rgb(var(--navy-rgb) / 0.09);
  transform-origin: 50% 60%;
  transition: transform 0.25s var(--ease-out-expo);
}

.tile__visual img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.25s var(--ease-out-expo);
}

/* Navy wash, darker at the bottom (OakMUN's tile overlay) */
.tile__visual::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    to top,
    rgb(var(--wash-rgb) / 0.85) 0%,
    rgb(var(--wash-rgb) / 0.5) 40%,
    rgb(var(--wash-rgb) / 0.25) 100%
  );
}

/* Hover ring and lift shadow on a layer that fades in, so box-shadow never animates */
.tile__visual::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow:
    inset 0 0 0 1.5px rgb(var(--teal-rgb) / 0.45),
    inset 0 0 28px rgb(var(--teal-rgb) / 0.18);
  opacity: 0;
  transition: opacity 0.4s var(--ease-standard);
  pointer-events: none;
}


.tile__code {
  padding-inline: 16px;
  font-size: clamp(2rem, 3.4vw, 3.4rem);
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 0.95;
  text-align: center;
  text-transform: uppercase;
  text-shadow: 0 2px 16px rgb(var(--shadow-rgb) / 0.55);
  color: var(--white);
  transition: transform 0.25s var(--ease-out-expo);
}

/* Long codes step down a size */
.tile__code--med {
  font-size: clamp(1.7rem, 2.8vw, 2.8rem);
}

.tile__code--long {
  font-size: clamp(1.4rem, 2.3vw, 2.3rem);
}

.tile__tbc {
  position: absolute;
  bottom: 18px;
  left: 0;
  right: 0;
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-align: center;
  text-transform: uppercase;
  color: var(--ink-60);
}

.tile__name {
  display: block;
  margin-top: 14px;
  padding-inline: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  color: var(--ink-75);
  transition:
    color var(--dur-hover) var(--ease-standard),
    transform 0.25s var(--ease-out-expo);
}

/* The hover from reference/13: lift 13 px, tilt -1.8°, grow 5.5%, teal ring, photo zoom */
@media (hover: hover) and (pointer: fine) {
  .tile:hover .tile__visual {
    transform: translate3d(0, -13px, 0) rotate(-1.8deg) scale(1.055);
  }

  .tile:hover .tile__visual::after {
    opacity: 1;
  }

  .tile:hover .tile__visual img {
    transform: scale(1.08);
  }

  .tile:hover .tile__code {
    transform: translateY(-4px) scale(1.03);
  }

  .tile:hover .tile__name {
    color: var(--ink-100);
    transform: translateY(-2px);
  }
}

.tile:focus-visible {
  outline: none;
}

.tile:focus-visible .tile__visual {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

@media (max-width: 980px) {
  .tiles {
    gap: 44px 24px;
  }
}

@media (max-width: 768px) {
  .tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px 16px;
  }

  .tile__visual {
    border-radius: 18px;
  }


  .tile__name {
    margin-top: 10px;
    font-size: 1rem; /* 16 px minimum for running text on phones */
  }
}

@media (max-width: 400px) {
  .tiles {
    grid-template-columns: minmax(0, 1fr);
    max-width: 320px;
    margin-inline: auto;
  }
}

/* ---------- Committee page: hero card (reference/14) ---------- */

.c-hero {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: min(80vh, 760px);
  margin: 12px;
  padding: 140px clamp(24px, 5vw, 64px) clamp(40px, 6vw, 72px);
  overflow: hidden;
  border-radius: var(--radius-tile);
  background: linear-gradient(160deg, var(--blue-650) 0%, var(--blue-900) 100%);
}

.c-hero__img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}

.c-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to top, rgb(var(--wash-rgb) / 0.95) 0%, rgb(var(--wash-rgb) / 0.6) 45%, rgb(var(--wash-rgb) / 0.22) 100%),
    linear-gradient(100deg, rgb(var(--navy-rgb) / 0.65) 0%, transparent 55%);
}

.back-pill {
  position: absolute;
  top: calc(var(--nav-top) + 92px);
  left: clamp(24px, 5vw, 64px);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px 9px 12px;
  border-radius: var(--radius-pill);
  background: var(--grad-primary);
  box-shadow:
    inset 0 2px 0 rgb(var(--white-rgb) / 0.18),
    inset 0 -2px 0 rgb(var(--shadow-rgb) / 0.28);
  font-size: var(--fs-label);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--navy);
  transition: transform var(--dur-snap) var(--ease-snap);
}

.back-pill:hover {
  transform: translateX(-2px);
}

.c-hero__rule {
  width: 48px;
  height: 2px;
  margin-bottom: 18px;
  border-radius: 2px;
  background: var(--grad-bar);
}

.c-hero__code {
  font-size: clamp(3.6rem, 9vw, 8.5rem);
  font-weight: 900;
  letter-spacing: -0.06em;
  line-height: 0.88;
  text-transform: uppercase;
  margin-top: 10px;
}

.c-hero__name {
  max-width: 34ch;
  margin-top: 18px;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  color: var(--ink-85);
}

.c-hero__tbc {
  position: absolute;
  top: 50%;
  right: clamp(24px, 5vw, 64px);
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-50);
}

@media (max-width: 768px) {
  .c-hero {
    min-height: 64vh;
    margin: 8px;
    border-radius: 18px;
  }

  .c-hero__tbc {
    top: auto;
    bottom: 24px;
  }
}

/* ---------- Committee page: body ---------- */

.c-body {
  display: grid;
  gap: 24px;
  padding-block: 72px var(--section-pad);
}

.c-overview {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 24px 64px;
  align-items: start;
  padding-bottom: 48px;
  border-bottom: 1px solid rgb(var(--ink-rgb) / 0.08);
}

.c-overview p {
  font-size: 1.05rem;
  color: var(--ink-75);
}

/* Agenda card (reference/15): teal border, label, number, agenda text */
.agenda {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 280px) minmax(0, 1fr);
  gap: 24px 48px;
  margin-top: 24px;
  padding: clamp(28px, 4vw, 44px);
  border: 1px solid rgb(var(--teal-rgb) / 0.55);
  border-radius: var(--radius-tile);
  background: linear-gradient(135deg, rgb(var(--teal-rgb) / 0.09) 0%, rgb(var(--navy-rgb) / 0.04) 60%, transparent);
  box-shadow: 0 0 60px rgb(var(--teal-rgb) / 0.08);
}

.agenda__title {
  margin-top: 8px;
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--teal);
}

.agenda__list {
  display: grid;
}

.agenda__item {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 8px;
  padding-block: 20px;
  border-top: 1px solid rgb(var(--ink-rgb) / 0.08);
}

.agenda__item:last-child {
  border-bottom: 1px solid rgb(var(--ink-rgb) / 0.08);
}

.agenda__num {
  padding-top: 0.55em;
  font-size: var(--fs-label);
  font-weight: 900;
  letter-spacing: 0.1em;
  color: var(--teal);
}

.agenda__text {
  font-size: clamp(1.25rem, 2.4vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.4;
  color: var(--ink-100);
}

.agenda__text.is-tbc {
  color: var(--ink-60);
}

.c-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  margin-top: 24px;
}

/* Executive board (SPEC 8.6) */
.eb {
  margin-top: 72px;
}

.eb__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 32px;
}

.eb-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: var(--border-card);
  border-radius: var(--radius-card);
  background: rgb(var(--card-rgb) / 0.65);
}

.eb-card__photo {
  aspect-ratio: 1;
  overflow: hidden;
  background: linear-gradient(160deg, var(--blue-700), var(--blue-650));
}

.eb-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.eb-card__body {
  display: grid;
  gap: 6px;
  padding: 20px 22px 24px;
}

.eb-card__role {
  font-size: var(--fs-label);
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gilt);
}

.eb-card__name {
  font-size: var(--fs-card);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink-100);
}

.eb-card__name.is-tbc {
  color: var(--ink-60);
}

.eb-card__bio {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  font-size: 0.95rem;
  color: var(--ink-75);
}

@media (max-width: 768px) {
  .eb-card__bio {
    font-size: 1rem; /* 16 px minimum for running text on phones */
  }
}

.eb-card.is-open .eb-card__bio {
  display: block;
}

.eb-card__more {
  justify-self: start;
  margin-top: 4px;
  font-size: var(--fs-label);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
}

/* IP team (6 October): two wide cards a row, photo on the left, as on OakMUN's IP page. */
.eb__grid--team {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.eb-card--wide {
  flex-direction: row;
}

.eb-card--wide .eb-card__photo {
  flex: 0 0 38%;
  aspect-ratio: auto;
  min-height: 240px;
}

.eb-card--wide .eb-card__body {
  flex: 1;
  align-content: start;
  padding: 28px 26px;
}

.eb-card--wide .eb-card__bio {
  margin-top: 8px;
  -webkit-line-clamp: 4;
  line-clamp: 4;
}

@media (max-width: 980px) {
  .eb__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .eb__grid--team {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .c-overview,
  .agenda,
  .c-grid {
    grid-template-columns: 1fr;
  }

  .agenda__item {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .eb__grid {
    grid-template-columns: 1fr;
  }

  .eb-card {
    flex-direction: row;
  }

  .eb-card__photo,
  .eb-card--wide .eb-card__photo {
    flex: 0 0 36%;
    aspect-ratio: auto;
    min-height: 150px;
  }

  .eb-card--wide .eb-card__body {
    padding: 20px 18px;
  }
}

/* ---------- Opening a committee (PLAN.md F26) ---------- */

/* The committee's tile grows into its page's header, and back again when you return; the
   other tiles fade away. Both carry the same view-transition-name (committee-<slug>, set in
   the templates); Doomsday has none, as it's getting an animation of its own. The default
   crossfade covers browsers without view transitions classes, and reduced motion turns page
   transitions off altogether (base.css). */
.tile__visual,
.c-hero {
  view-transition-class: committee;
}

::view-transition-group(*.committee) {
  animation-duration: 0.7s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* The photo fills the box all the way through, whatever its shape, instead of stretching */
::view-transition-old(*.committee),
::view-transition-new(*.committee) {
  height: 100%;
  object-fit: cover;
  animation-duration: 0.5s;
  animation-timing-function: var(--ease-standard);
}

/* The tile's own picture gives way to the header's quickly; the header settles in after */
::view-transition-new(*.committee) {
  animation-delay: 0.12s;
}

/* Tiles that aren't opening just fade away */
::view-transition-old(*.committee):only-child {
  animation-duration: 0.22s;
  animation-delay: 0s;
}

::view-transition-new(*.committee):only-child {
  animation-duration: 0.35s;
  animation-delay: 0.15s;
}

/* ---------- Doomsday's opening (PLAN.md F28, partials/doomsday.njk) ---------- */

@font-face {
  font-family: "Anton";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/anton-latin-400-normal.d0fa07ff.woff2") format("woff2");
}

/* The Marvel Studios intro, full-screen on black, then DOOMSDAY. At rest (no script, or
   reduced motion) the logo's last frame sits dimmed behind the title. */
.dd-opening {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-height: max(480px, 100svh);
  overflow: hidden;
  background: var(--blue-950);
}

.dd-opening__video {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--blue-950);
  opacity: 0.35;
  transition: opacity 0.9s var(--ease-standard);
}

.dd-opening .back-pill {
  z-index: 2;
}

.dd-title {
  display: grid;
  justify-items: center;
  gap: clamp(10px, 2vw, 18px);
  padding-inline: var(--gutter);
  text-align: center;
}

.dd-title__pre,
.dd-title__name {
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--ink-75);
}

.dd-title__main {
  font-family: "Anton", "Impact", "Arial Narrow", sans-serif;
  font-size: clamp(3.6rem, 15vw, 11rem);
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 0.86;
  text-transform: uppercase;
  color: var(--doom);
  text-shadow:
    0 0 22px rgb(var(--doom-rgb) / 0.55),
    0 0 70px rgb(var(--doom-rgb) / 0.25);
}

.dd-cue {
  position: absolute;
  bottom: 28px;
  left: 50%;
  display: grid;
  justify-items: center;
  gap: 10px;
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-60);
  transform: translateX(-50%);
}

.dd-cue::after {
  content: "";
  width: 1px;
  height: 34px;
  background: linear-gradient(var(--doom), transparent);
  transform-origin: top;
  animation: dd-cue 1.8s ease-in-out infinite;
}

@keyframes dd-cue {
  0% { transform: scaleY(0); }
  50% { transform: scaleY(1); }
  100% { transform: scaleY(1); opacity: 0; }
}

.dd-skip {
  position: absolute;
  right: var(--gutter);
  bottom: 22px;
  padding: 10px 16px;
  border: 1px solid rgb(var(--ink-rgb) / 0.22);
  border-radius: var(--radius-pill);
  background: rgb(var(--shadow-rgb) / 0.4);
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-75);
  cursor: pointer;
  visibility: hidden; /* out of the tab order too, unless the intro is playing */
  opacity: 0;
  transition:
    opacity 0.3s var(--ease-standard),
    visibility 0s linear 0.3s;
}

/* Playing: the intro at full strength, the title waiting */
.dd-opening.is-intro .dd-opening__video {
  opacity: 1;
}

.dd-opening.is-intro .dd-title > *,
.dd-opening.is-intro .dd-cue {
  opacity: 0;
}

.dd-opening.is-intro .dd-skip {
  visibility: visible;
  opacity: 1;
  transition-delay: 0s;
}

/* Then the intro fades and the title comes up: the line above, DOOMSDAY flickering on like a
   bad bulb, the committee's name below */
.dd-opening.is-titled .dd-opening__video {
  opacity: 0;
}

.dd-opening.is-titled .dd-title__pre {
  animation: dd-rise 0.8s 0.5s var(--ease-standard) forwards;
}

.dd-opening.is-titled .dd-title__main {
  animation: dd-flicker 1s 1.1s steps(1, end) forwards;
}

.dd-opening.is-titled .dd-title__name {
  animation: dd-rise 0.8s 1.9s var(--ease-standard) forwards;
}

.dd-opening.is-titled .dd-cue {
  opacity: 1;
  transition: opacity 0.6s var(--ease-standard) 2.4s;
}

.dd-opening.is-done .dd-title > * {
  opacity: 1;
  animation: none;
}

@keyframes dd-rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@keyframes dd-flicker {
  0% { opacity: 0; }
  10% { opacity: 1; }
  20% { opacity: 0.1; }
  32% { opacity: 0.9; }
  42% { opacity: 0.2; }
  60%, 100% { opacity: 1; }
}

/* The lair: Doom's clip, his line typed over the end of it. At rest, his last frame and the
   line. */
.dd-lair {
  position: relative;
  height: 230svh;
}

.dd-lair__stage {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
  isolation: isolate;
  background: var(--blue-950);
}

.dd-lair__video {
  position: absolute;
  inset: 0;
  z-index: -3;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition:
    opacity 1.2s var(--ease-standard),
    transform 8s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.dd-lair.is-motion .dd-lair__video {
  opacity: 0;
  transform: scale(1.06);
}

.dd-lair.is-playing .dd-lair__video {
  opacity: 1;
  transform: none;
}

/* Darker round the edges and under the words; greener lower down, then the page's own blue */
.dd-lair__shade {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 80% 70% at 50% 45%, transparent 50%, rgb(var(--shadow-rgb) / 0.75) 100%),
    linear-gradient(180deg, transparent 50%, rgb(var(--shadow-rgb) / 0.7) 86%, var(--doom-deep) 100%);
  pointer-events: none;
}

.dd-lair__motes {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  mix-blend-mode: screen;
}

.dd-line {
  position: absolute;
  bottom: 11svh;
  left: 50%;
  width: min(92vw, 1100px);
  font-family: "Anton", "Impact", "Arial Narrow", sans-serif;
  font-size: clamp(2.4rem, 8.4vw, 6.6rem);
  font-weight: 400;
  letter-spacing: 0.03em;
  line-height: 0.95;
  text-align: center;
  text-transform: uppercase;
  text-wrap: balance;
  color: var(--doom-soft);
  text-shadow:
    0 0 14px rgb(var(--doom-rgb) / 0.75),
    0 0 44px rgb(var(--doom-rgb) / 0.4),
    0 2px 18px rgb(var(--shadow-rgb) / 0.8);
  transform: translateX(-50%);
}

/* Typed: letters in word groups, so a line only ever breaks between words */
.dd-line__word {
  display: inline-block;
  white-space: nowrap;
}

.dd-line__word span {
  display: inline-block;
  white-space: pre;
  opacity: 0;
  transform: translateY(0.18em);
  transition:
    opacity 0.12s linear,
    transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.dd-line__word span.is-on {
  opacity: 1;
  transform: none;
}

.dd-line__caret {
  display: inline-block;
  width: 0.08em;
  height: 0.8em;
  margin-left: 0.06em;
  vertical-align: -0.04em;
  background: var(--doom);
  box-shadow: 0 0 12px var(--doom);
  opacity: 0;
}

.dd-line.is-typing .dd-line__caret {
  animation: dd-blink 0.9s steps(1, end) infinite;
}

@keyframes dd-blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* ---------- Doomsday: the page body in Doom's green (8 October) ----------
   Under the lair, the overview, agenda, background guide and EB take the footage's colours:
   green-black, green accents with a soft glow, faint scanlines, a slow band of light passing
   down the page and a gently pulsing glow round the agenda. Motion is transform and opacity
   only, and stops with reduced motion. */

.c-page--doom {
  background:
    radial-gradient(ellipse 70% 30% at 50% 0%, rgb(var(--doom-rgb) / 0.12), transparent 70%),
    radial-gradient(ellipse 50% 40% at 90% 65%, rgb(var(--doom-rgb) / 0.06), transparent 70%),
    var(--doom-deep);
}

/* Scanlines, like the footage */
.c-page--doom::before,
.c-page--doom::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.c-page--doom::before {
  background: repeating-linear-gradient(to bottom, rgb(var(--doom-rgb) / 0.035) 0 1px, transparent 1px 4px);
}

/* The band of light: drawn across the middle of a layer the page's height, which slides from
   the top of the page to the bottom. */
.c-page--doom::after {
  background: linear-gradient(to bottom, transparent 44%, rgb(var(--doom-rgb) / 0.06) 50%, transparent 56%);
  transform: translateY(-50%);
  opacity: 0;
}

.c-page--doom .gilt-cuts {
  stroke: rgb(var(--doom-rgb) / 0.5);
}

.c-page--doom .t-section {
  color: var(--doom-soft);
  text-shadow: 0 0 28px rgb(var(--doom-rgb) / 0.35);
}

.c-page--doom .t-section--bar::after {
  background: linear-gradient(90deg, var(--doom), rgb(var(--doom-rgb) / 0.2));
  box-shadow: 0 0 10px rgb(var(--doom-rgb) / 0.6);
}

.c-page--doom .c-overview {
  border-bottom-color: rgb(var(--doom-rgb) / 0.16);
}

.c-page--doom .agenda {
  border-color: rgb(var(--doom-rgb) / 0.5);
  background: linear-gradient(135deg, rgb(var(--doom-rgb) / 0.1) 0%, rgb(var(--doom-deep-rgb) / 0.4) 60%, transparent);
  box-shadow: 0 0 60px rgb(var(--doom-rgb) / 0.1);
}

/* The agenda's glow, which breathes slowly */
.c-page--doom .agenda::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  box-shadow:
    0 0 36px rgb(var(--doom-rgb) / 0.3),
    inset 0 0 28px rgb(var(--doom-rgb) / 0.08);
  opacity: 0.35;
  pointer-events: none;
}

.c-page--doom .agenda__title,
.c-page--doom .agenda__num {
  color: var(--doom);
  text-shadow: 0 0 18px rgb(var(--doom-rgb) / 0.45);
}

.c-page--doom .agenda__item,
.c-page--doom .agenda__item:last-child {
  border-color: rgb(var(--doom-rgb) / 0.14);
}

.c-page--doom .guide {
  border-color: rgb(var(--doom-rgb) / 0.3);
  background: linear-gradient(160deg, rgb(var(--doom-rgb) / 0.12), var(--doom-deep));
  box-shadow: 0 6px 32px rgb(var(--shadow-rgb) / 0.5), 0 0 28px rgb(var(--doom-rgb) / 0.08);
}

.c-page--doom .guide::before {
  background: linear-gradient(
    to top,
    rgb(var(--doom-deep-rgb) / 0.96) 0%,
    rgb(var(--doom-deep-rgb) / 0.8) 30%,
    rgb(var(--doom-deep-rgb) / 0.35) 60%,
    rgb(var(--doom-deep-rgb) / 0.15) 100%
  );
}

.c-page--doom .guide__tag {
  border: 1px solid rgb(var(--doom-rgb) / 0.35);
  background: rgb(var(--doom-deep-rgb) / 0.85);
  color: var(--doom);
}

.c-page--doom .guide__status.is-ready,
.c-page--doom .guide__link,
.c-page--doom .eb-card__role,
.c-page--doom .eb-card__more {
  color: var(--doom);
}

.c-page--doom .eb-card {
  border-color: rgb(var(--doom-rgb) / 0.2);
  background: rgb(var(--doom-deep-rgb) / 0.75);
  box-shadow: 0 0 24px rgb(var(--doom-rgb) / 0.06);
}

.c-page--doom .eb-card__photo,
.c-page--doom .photo-tbc {
  background: linear-gradient(160deg, rgb(var(--doom-rgb) / 0.12), var(--doom-deep));
}

.c-page--doom .photo-tbc {
  color: rgb(var(--doom-rgb) / 0.75);
}

@media (prefers-reduced-motion: no-preference) {
  .c-page--doom::after {
    animation: dd-sweep 9s linear infinite;
  }

  .c-page--doom .agenda::after {
    animation: dd-breathe 3.6s ease-in-out infinite alternate;
  }
}

@keyframes dd-sweep {
  0% { opacity: 0; transform: translateY(-50%); }
  10%, 90% { opacity: 1; }
  100% { opacity: 0; transform: translateY(50%); }
}

@keyframes dd-breathe {
  from { opacity: 0.25; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .dd-lair {
    height: auto;
  }

  .dd-lair__stage {
    position: relative;
  }

  .dd-cue::after {
    animation: none;
  }
}
