/* ЭОН: Пробуждённый. Palette and type come from the game's own style bible:
   ice over grey stone, brass machinery, orange emergency lamps, azure Spark.
   Philosopher and PT Sans are the game's UI faces; Caveat is Kael's handwriting. */

:root {
  --void: #0E1A24;
  --base: #1B2B3A;
  --ice: #6FA8C0;
  --glint: #BFE6F2;
  --frost: #E8F4F8;
  --brass: #B08D57;
  --brass-hi: #E6CB94;
  --amber: #FFB45C;
  --azure: #3FA9FF;
  --ghost: #7FE0FF;
  --ink: #2E2216;
  --text: #DCE9F0;
  --muted: #A3B9C7;
  --display: 'Philosopher', Georgia, 'Times New Roman', serif;
  --body: 'PT Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --hand: 'Caveat', 'Segoe Print', cursive;
  --gutter: clamp(20px, 4vw, 56px);
  --section: clamp(84px, 11vw, 160px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  background: var(--void);
}

body {
  margin: 0;
  background: var(--void);
  color: var(--text);
  font: 400 1.125rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img,
canvas,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: var(--glint);
  text-underline-offset: 3px;
}

button {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--ghost);
  outline-offset: 3px;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  color: var(--frost);
  text-wrap: balance;
}

h2 {
  font-size: clamp(2.25rem, 5vw, 4rem);
  line-height: 1.08;
}

p {
  margin: 0;
  text-wrap: pretty;
}

.wrap {
  width: min(1320px, 100%);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--frost);
  color: var(--void);
  border-radius: 6px;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

[id] {
  scroll-margin-top: 72px;
}

/* Top bar ------------------------------------------------------------- */

.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  background: rgba(14, 26, 36, 0.74);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(176, 141, 87, 0.28);
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 60px;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.9375rem;
}

/* The round brass button from the game's HUD */
.back-btn i {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--void);
  box-shadow: inset 0 0 0 1.5px var(--brass), 0 0 0 1px rgba(0, 0, 0, 0.5);
  transition: box-shadow 0.2s;
}

.back-btn:hover i {
  box-shadow: inset 0 0 0 1.5px var(--brass-hi), 0 0 14px rgba(255, 180, 92, 0.35);
}

.back-btn img {
  width: 22px;
  height: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: 6px;
  padding-left: 18px;
  border-left: 1px solid rgba(176, 141, 87, 0.3);
  color: var(--frost);
  font: 700 1.0625rem var(--display);
  text-decoration: none;
  white-space: nowrap;
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.topnav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 26px);
  margin-left: auto;
  font-size: 0.9375rem;
}

.topnav a {
  color: var(--muted);
  text-decoration: none;
}

.topnav a:hover {
  color: var(--frost);
}

.topnav .lang {
  padding: 5px 12px;
  border: 1px solid rgba(176, 141, 87, 0.55);
  border-radius: 6px;
  color: var(--brass-hi);
}

.topnav .lang:hover {
  border-color: var(--brass-hi);
  color: var(--frost);
}

@media (max-width: 860px) {
  .topnav a:not(.lang),
  .brand {
    display: none;
  }
}

/* Hero: the capsule glass thaws once, on load ------------------------- */

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: max(100vh, 640px);
  min-height: max(100svh, 640px);
  padding: 84px var(--gutter) clamp(28px, 4vw, 56px);
  overflow: hidden;
}

.hero-art,
.hero-art img,
.hero-frost,
.hero-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-art {
  z-index: -3;
}

.hero-art img {
  max-width: none;
  object-fit: cover;
  object-position: 30% 50%;
}

@property --thaw {
  syntax: '<percentage>';
  inherits: false;
  initial-value: 100%;
}

.hero-frost {
  z-index: -2;
  background: url('../media/aeon-the-awakened/frost-1280.webp') center / cover;
  mix-blend-mode: screen;
  --thaw: 100%;
  -webkit-mask-image: radial-gradient(ellipse 74% 82% at 46% 50%, transparent calc(var(--thaw) * 0.68), #000 var(--thaw));
  mask-image: radial-gradient(ellipse 74% 82% at 46% 50%, transparent calc(var(--thaw) * 0.68), #000 var(--thaw));
  animation: thaw 2.8s cubic-bezier(0.22, 0.7, 0.25, 1) both;
}

@keyframes thaw {
  from { --thaw: 0%; }
  to { --thaw: 100%; }
}

.hero-shade {
  z-index: -1;
  background:
    linear-gradient(to top, var(--void) 0, rgba(14, 26, 36, 0.86) 16%, rgba(14, 26, 36, 0) 52%),
    linear-gradient(to bottom, rgba(14, 26, 36, 0.62), rgba(14, 26, 36, 0) 34%);
}

.hero h1 {
  font-size: clamp(3rem, 8.6vw, 10.5rem);
  line-height: 1;
  letter-spacing: 0.002em;
  white-space: nowrap;
  color: #EEF8FC;
  text-shadow:
    0 0 0.05em rgba(191, 230, 242, 0.9),
    0 0 0.24em rgba(63, 169, 255, 0.72),
    0 0 0.7em rgba(63, 169, 255, 0.4),
    0 0.03em 0.12em rgba(0, 0, 0, 0.55);
  animation: emerge 1.5s 0.8s both;
}

.hero-foot {
  position: relative;
  grid-row: 3;
  justify-self: end;
  width: min(33rem, 100%);
  animation: emerge 1.3s 1.5s both;
}

/* Keeps the text readable over the lit capsules behind it */
.hero-foot::before {
  content: '';
  position: absolute;
  inset: -22% -14% -14% -16%;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(14, 26, 36, 0.86) 45%, rgba(14, 26, 36, 0));
  pointer-events: none;
}

@keyframes emerge {
  from { opacity: 0; filter: blur(9px); }
  to { opacity: 1; filter: blur(0); }
}

.hero-line {
  font: 400 clamp(1.5rem, 2.4vw, 2rem)/1.2 var(--display);
  color: var(--frost);
  text-wrap: balance;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
}

.hero-desc {
  margin-top: 12px;
  color: var(--text);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 20px;
  border-radius: 8px;
  border: 0;
  background: linear-gradient(180deg, #F0D8A6 0%, var(--brass) 62%, #8C6C3C 100%);
  box-shadow: inset 0 1px 0 rgba(255, 244, 214, 0.65), 0 6px 18px rgba(0, 0, 0, 0.45);
  color: #1D1408;
  font: 700 1rem var(--body);
  text-decoration: none;
  cursor: pointer;
  transition: filter 0.2s, box-shadow 0.2s;
}

.btn:hover {
  filter: brightness(1.1);
  box-shadow: inset 0 1px 0 rgba(255, 244, 214, 0.65), 0 6px 26px rgba(255, 180, 92, 0.34);
}

.btn-ghost {
  background: rgba(14, 26, 36, 0.6);
  box-shadow: inset 0 0 0 1.5px rgba(127, 224, 255, 0.55);
  color: var(--frost);
}

.btn-ghost:hover {
  box-shadow: inset 0 0 0 1.5px var(--ghost), 0 0 22px rgba(127, 224, 255, 0.28);
}

/* The stores are brass plates from the game, not buttons: nothing to press yet */
.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.plate {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 204px;
  height: 68px;
  padding: 0 22px;
  background: url('../media/aeon-the-awakened/plaque.webp') center / 100% 100% no-repeat;
  color: #1E1407;
  line-height: 1.15;
  text-shadow: 0 1px 0 rgba(255, 238, 200, 0.4);
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.45));
}

.plate svg {
  flex: none;
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.plate b {
  display: block;
  font: 700 1.0625rem/1.15 var(--display);
}

.plate span {
  display: block;
  font-size: 0.8125rem;
  font-weight: 700;
}

/* Tall screens use the portrait painting: the title sits in its empty vault */
@media (max-aspect-ratio: 4 / 5) {
  .hero h1 {
    font-size: 14.6vw;
    white-space: normal;
  }

  .hero h1 span {
    display: block;
  }

  .hero h1 .t1 {
    font-size: 1.6em;
    line-height: 0.98;
  }

  /* The long second line has to fit the screen's width in both languages */
  .hero h1 .t2 {
    font-size: 0.82em;
  }

  .hero-art img {
    object-position: 50% 50%;
  }

  .hero-foot {
    justify-self: stretch;
    width: 100%;
  }

  .hero-shade {
    background:
      linear-gradient(to top, var(--void) 0, rgba(14, 26, 36, 0.92) 26%, rgba(14, 26, 36, 0) 56%),
      linear-gradient(to bottom, rgba(14, 26, 36, 0.5), rgba(14, 26, 36, 0) 30%);
  }
}

@media (max-aspect-ratio: 4 / 5) and (max-width: 600px) {
  .hero {
    display: block;
    min-height: 0;
    padding-bottom: 8px;
  }

  .hero-art,
  .hero-frost,
  .hero-shade {
    height: 175vw;
  }

  .hero-shade {
    background:
      linear-gradient(to top, var(--void) 0, rgba(14, 26, 36, 0.82) 9%, rgba(14, 26, 36, 0) 30%),
      linear-gradient(to bottom, rgba(14, 26, 36, 0.5), rgba(14, 26, 36, 0) 24%);
  }

  /* 175vw of painting, minus the bar, the title, and the part of the floor the text may cover */
  .hero-foot {
    margin-top: calc(107vw - 84px);
  }

  .hero-foot::before {
    display: none;
  }
}

@media (max-width: 460px) {
  .plate {
    flex: 1 1 140px;
    width: auto;
    height: 58px;
    padding: 0 14px;
    gap: 8px;
  }

  .plate svg {
    width: 20px;
    height: 20px;
  }

  .plate b {
    font-size: 0.9375rem;
  }

  .plate span {
    font-size: 0.75rem;
  }
}

/* Memory: the lens from the game, running in the browser -------------- */

.memory {
  padding-top: var(--section);
}

.mem-head {
  display: grid;
  gap: 14px 56px;
  align-items: end;
  margin-bottom: clamp(26px, 3.5vw, 44px);
}

.mem-head p {
  max-width: 44rem;
  color: var(--muted);
}

@media (min-width: 900px) {
  .mem-head {
    grid-template-columns: auto minmax(0, 1fr);
  }
}

.stage {
  position: relative;
  aspect-ratio: 2340 / 1080;
  max-height: 84vh;
  width: 100%;
  overflow: hidden;
  background: var(--base);
  touch-action: pan-y;
  cursor: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

@media (max-width: 760px) {
  .stage {
    aspect-ratio: 1 / 1;
    cursor: default;
  }
}

.stage:focus-visible {
  outline-offset: -4px;
}

.stage-now,
.stage-then,
.stage-ghost {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  pointer-events: none;
}

.stage-now,
.stage-then {
  object-fit: cover;
}

/* Only without WebGL: a plain masked picture instead of the shader */
.stage-then {
  display: none;
  filter: saturate(0.75) brightness(1.15);
  -webkit-mask-image: radial-gradient(circle var(--lens-r, 160px) at var(--lens-x, 50%) var(--lens-y, 50%), #000 68%, transparent 100%);
  mask-image: radial-gradient(circle var(--lens-r, 160px) at var(--lens-x, 50%) var(--lens-y, 50%), #000 68%, transparent 100%);
  opacity: var(--lens-a, 0);
}

.no-gl .stage-then {
  display: block;
}

.no-gl .stage-ghost {
  display: none;
}

/* The scene melts into the page above and below */
.stage::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to bottom, var(--void), transparent 7%, transparent 93%, var(--void));
}

.lens-ring {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  width: 100px;
  height: 100px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  will-change: transform;
}

.lens-ring svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  transform: rotate(-90deg);
}

.lens-ring circle {
  fill: none;
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}

.ring-base {
  stroke: rgba(127, 224, 255, 0.55);
}

.ring-fill {
  stroke: #F2FCFF;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: calc(1 - var(--found, 0));
  filter: drop-shadow(0 0 5px var(--ghost));
}

.stage.is-silent .ring-base {
  stroke: rgba(163, 185, 199, 0.5);
  stroke-dasharray: 4 7;
}

.stage-hint {
  position: absolute;
  z-index: 3;
  top: 9%;
  left: 50%;
  width: max-content;
  max-width: calc(100% - 32px);
  padding: 9px 18px;
  transform: translateX(-50%);
  border-radius: 8px;
  background: rgba(14, 26, 36, 0.82);
  box-shadow: inset 0 0 0 1px rgba(127, 224, 255, 0.38);
  color: var(--frost);
  font-size: 1rem;
  text-align: center;
  pointer-events: none;
  transition: opacity 0.4s;
}

.stage.was-used .stage-hint {
  opacity: 0;
}

/* Kael's line, the game's bark bar */
.bark {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 9%;
  width: max-content;
  max-width: min(46rem, calc(100% - 32px));
  padding: 10px 20px;
  transform: translate(-50%, 8px);
  border-radius: 8px;
  background: rgba(14, 26, 36, 0.86);
  box-shadow: inset 0 0 0 1px rgba(176, 141, 87, 0.6);
  color: var(--frost);
  font-size: clamp(1rem, 1.6vw, 1.1875rem);
  line-height: 1.35;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
}

.bark.on {
  opacity: 1;
  transform: translate(-50%, 0);
}

.bark:empty {
  display: none;
}

.mem-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 28px;
  margin-top: 14px;
}

.scene-tabs {
  display: flex;
  gap: 4px;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}

.scene-tabs::-webkit-scrollbar {
  display: none;
}

.scene-tab {
  flex: none;
  padding: 9px 14px 8px;
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font: 400 1.0625rem var(--display);
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.scene-tab:hover {
  color: var(--frost);
}

.scene-tab[aria-selected='true'] {
  color: var(--frost);
  border-bottom-color: var(--amber);
}

/* One pip per thing Kael can remember in this scene */
.pips {
  display: flex;
  justify-content: center;
  gap: 5px;
  min-height: 7px;
  margin-top: 5px;
}

.pips i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(127, 224, 255, 0.6);
  transition: background 0.3s, box-shadow 0.3s;
}

.pips i.found {
  background: var(--ghost);
  box-shadow: 0 0 8px var(--ghost);
}

.sound-toggle {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 6px 14px;
  background: none;
  border: 1px solid rgba(176, 141, 87, 0.5);
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.9375rem;
  cursor: pointer;
}

.sound-toggle:hover {
  border-color: var(--brass-hi);
  color: var(--frost);
}

.sound-toggle[aria-pressed='true'] {
  border-color: var(--amber);
  color: var(--amber);
}

.sound-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sound-toggle[aria-pressed='false'] .waves {
  display: none;
}

.sound-toggle[aria-pressed='true'] .mute {
  display: none;
}

/* Prequel video ------------------------------------------------------- */

.video {
  padding-top: var(--section);
}

.video-grid {
  display: grid;
  gap: clamp(22px, 3vw, 44px);
  align-items: center;
}

@media (min-width: 1000px) {
  .video-grid {
    grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr);
  }

  .video-text {
    order: 2;
  }
}

.video-text p {
  margin-top: 16px;
  color: var(--muted);
}

.video-text .more {
  display: inline-block;
  margin-top: 14px;
}

/* A machined bezel, like the screens in the game */
.player {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
  box-shadow:
    0 0 0 1px #000,
    0 0 0 3px var(--brass),
    0 0 0 8px var(--base),
    0 0 0 9px rgba(176, 141, 87, 0.55),
    0 30px 70px rgba(0, 0, 0, 0.55);
}

.player iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.yt {
  position: absolute;
  inset: 0;
  display: block;
  color: var(--frost);
  text-decoration: none;
}

.yt img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s, filter 0.3s;
}

.yt:hover img {
  transform: scale(1.015);
  filter: brightness(1.08);
}

.yt-title {
  position: absolute;
  inset: auto 0 0;
  padding: 64px clamp(16px, 3vw, 32px) clamp(14px, 2.4vw, 26px);
  background: linear-gradient(to top, rgba(10, 8, 6, 0.9), transparent);
  font: 700 clamp(1.125rem, 2.5vw, 2rem)/1.15 var(--display);
  text-wrap: balance;
}

.yt-title small {
  display: block;
  margin-top: 6px;
  font: 400 clamp(0.875rem, 1.3vw, 1rem) var(--body);
  color: var(--text);
}

.yt-play {
  position: absolute;
  top: 44%;
  left: 50%;
  display: grid;
  place-items: center;
  width: clamp(66px, 9vw, 104px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(14, 26, 36, 0.82);
  box-shadow: inset 0 0 0 3px var(--brass-hi), 0 0 34px rgba(255, 180, 92, 0.34);
  transition: box-shadow 0.25s, background 0.25s;
}

.yt:hover .yt-play {
  background: rgba(14, 26, 36, 0.92);
  box-shadow: inset 0 0 0 3px #FFE6B0, 0 0 54px rgba(255, 180, 92, 0.6);
}

.yt-play svg {
  width: 40%;
  height: 40%;
  margin-left: 6%;
  fill: var(--brass-hi);
}

/* The ark ------------------------------------------------------------- */

.world {
  position: relative;
  margin-top: var(--section);
  overflow: hidden;
}

.world-grid {
  display: grid;
  gap: 8px;
}

.world-text > p {
  margin-top: 16px;
  max-width: 34rem;
}

.world-text .questions {
  margin: 22px 0 0;
  padding: 0;
  max-width: 34rem;
  list-style: none;
  font: 400 clamp(1.25rem, 2vw, 1.5rem)/1.25 var(--display);
  color: var(--amber);
}

.world-text .questions li + li {
  margin-top: 10px;
}

.world-art {
  margin: 0;
}

.world-art img {
  width: 100%;
  height: auto;
  -webkit-mask-image: radial-gradient(ellipse 62% 64% at 50% 50%, #000 62%, transparent 100%);
  mask-image: radial-gradient(ellipse 62% 64% at 50% 50%, #000 62%, transparent 100%);
}

@media (min-width: 1000px) {
  .world-grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 8fr);
    align-items: center;
  }

  /* The comet runs off the right edge of the page */
  .world-art img {
    width: 128%;
    max-width: none;
  }
}

/* Kael's notebook: warm paper after all that ice ---------------------- */

.journal {
  padding-top: var(--section);
}

.journal-head p {
  margin-top: 12px;
  max-width: 44rem;
  color: var(--muted);
}

.notebook {
  margin-top: clamp(20px, 3vw, 38px);
  color: var(--ink);
  font-family: var(--hand);
}

.note-page {
  background: url('../media/aeon-the-awakened/notebook-page.webp') center / 100% 100% no-repeat;
  padding: 11% 11% 13% 15%;
}

.note-page + .note-page {
  margin-top: 10px;
}

.note-page h3 {
  width: fit-content;
  padding-bottom: 6px;
  background: url('../media/aeon-the-awakened/ink-underline.webp') left bottom / 100% 8px no-repeat;
  color: var(--ink);
  font: 700 clamp(1.875rem, 3.2cqw, 2.75rem)/1.1 var(--hand);
}

.note-list {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  font-size: clamp(1.3125rem, 2.15cqw, 1.8125rem);
  font-weight: 500;
  line-height: 1.16;
}

.note-list li {
  position: relative;
  padding-left: 0.9em;
}

.note-list li + li {
  margin-top: 0.42em;
}

.note-list li::before {
  content: '';
  position: absolute;
  left: 0.1em;
  top: 0.48em;
  width: 0.34em;
  height: 0.34em;
  border-radius: 50%;
  background: var(--ink);
  opacity: 0.75;
}

.clues {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  font-size: clamp(1.25rem, 2.05cqw, 1.75rem);
  font-weight: 500;
  line-height: 1.14;
}

.clues li {
  display: grid;
  grid-template-columns: clamp(58px, 7.4cqw, 96px) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.clues li + li {
  margin-top: 0.4em;
}

.suspects {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 0.6em 0 0;
  padding: 0;
  list-style: none;
  font-size: clamp(1.1875rem, 1.9cqw, 1.625rem);
  font-weight: 700;
  line-height: 1.05;
  text-align: center;
}

.suspects img {
  width: clamp(56px, 7cqw, 92px);
  aspect-ratio: 1;
  margin: 0 auto 3px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 12%;
  background: rgba(46, 34, 22, 0.14);
  box-shadow: inset 0 0 0 1px rgba(46, 34, 22, 0.35), 0 0 0 1px rgba(46, 34, 22, 0.35);
}

.too-early {
  margin-top: 0.45em;
  font-size: clamp(1.25rem, 2.05cqw, 1.75rem);
  font-weight: 700;
  text-align: center;
}

/* Wide screens: the real open spread, pages laid over its paper */
@media (min-width: 880px) {
  .notebook {
    position: relative;
    container-type: inline-size;
    aspect-ratio: 1518 / 905;
    width: min(100%, 1240px);
    margin-inline: auto;
    background: url('../media/aeon-the-awakened/notebook-spread.webp') center / 100% 100% no-repeat;
    filter: drop-shadow(0 26px 44px rgba(0, 0, 0, 0.55));
  }

  .note-page {
    position: absolute;
    top: 8%;
    bottom: 18%;
    padding: 0;
    background: none;
  }

  .note-page + .note-page {
    margin-top: 0;
  }

  .note-left {
    left: 12.5%;
    width: 31.5%;
  }

  .note-right {
    left: 55%;
    width: 33%;
  }
}

/* Screenshots: a strip of frames, the lightbox comes from gallery.js --- */

.frames {
  padding-top: var(--section);
}

.strip {
  display: flex;
  gap: clamp(12px, 1.6vw, 20px);
  margin-top: clamp(20px, 3vw, 34px);
  padding: 4px var(--gutter) 16px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-padding-inline: var(--gutter);
  scrollbar-color: var(--brass) transparent;
  scrollbar-width: thin;
}

.shot {
  flex: none;
  width: min(80vw, 860px);
  padding: 0;
  background: none;
  border: 0;
  color: inherit;
  text-align: left;
  scroll-snap-align: start;
  cursor: zoom-in;
}

.shot img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 0 0 1px rgba(176, 141, 87, 0.5), 0 14px 34px rgba(0, 0, 0, 0.45);
  transition: box-shadow 0.25s;
}

.shot:hover img {
  box-shadow: 0 0 0 1px var(--brass-hi), 0 14px 40px rgba(127, 224, 255, 0.16);
}

.shot-cap {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.35;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  background: rgba(9, 16, 23, 0.96);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.lightbox[hidden] {
  display: none;
}

.no-scroll {
  overflow: hidden;
}

.lb-stage {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 64px 16px 8px;
}

.lb-stage picture {
  display: contents;
}

.lb-stage img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 0 0 1px rgba(176, 141, 87, 0.5), 0 30px 80px rgba(0, 0, 0, 0.5);
}

.lb-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  width: min(760px, 100% - 32px);
  margin: 0 auto;
  padding: 12px 0 calc(16px + env(safe-area-inset-bottom));
}

.lb-text {
  flex: 1;
  min-width: 0;
  text-align: center;
}

.lb-text b {
  display: block;
  font: 700 1.125rem/1.3 var(--display);
  color: var(--frost);
}

.lb-text span {
  display: block;
  font-size: 0.9375rem;
  color: var(--muted);
}

.lb-count {
  position: absolute;
  top: 22px;
  left: 20px;
  font-size: 0.9375rem;
  color: var(--muted);
}

.lb-btn {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: none;
  border: 0;
  border-radius: 50%;
  background: var(--void);
  box-shadow: inset 0 0 0 1.5px var(--brass);
  color: var(--brass-hi);
  font-size: 1.125rem;
  cursor: pointer;
}

.lb-btn:hover {
  box-shadow: inset 0 0 0 1.5px var(--brass-hi), 0 0 16px rgba(255, 180, 92, 0.35);
}

.lb-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.lb-close {
  position: absolute;
  top: 12px;
  right: 12px;
}

/* The people, with their real voices ---------------------------------- */

.cast {
  padding-top: var(--section);
}

.cast-head p {
  margin-top: 12px;
  max-width: 44rem;
  color: var(--muted);
}

.cast-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: clamp(30px, 4vw, 52px) clamp(24px, 3vw, 44px);
  margin: clamp(26px, 3.5vw, 44px) 0 0;
  padding: 0;
  list-style: none;
}

.person {
  position: relative;
}

/* All busts stand on one brass line */
.person-art {
  position: relative;
  border-bottom: 1px solid rgba(176, 141, 87, 0.65);
}

.person-art::before {
  content: '';
  position: absolute;
  inset: 12% 6% 0;
  background: radial-gradient(ellipse at 50% 100%, rgba(63, 169, 255, 0.2), transparent 68%);
  transition: opacity 0.4s;
}

.person.is-speaking .person-art::before {
  background: radial-gradient(ellipse at 50% 100%, rgba(127, 224, 255, 0.5), transparent 70%);
}

.person-art img {
  position: relative;
  width: min(78%, 300px);
  height: auto;
  margin-inline: auto;
}

.person h3 {
  margin-top: 16px;
  font-size: 1.625rem;
  line-height: 1.15;
}

.person-role {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.4;
}

.person blockquote {
  margin: 12px 0 0;
  font-style: italic;
  color: var(--text);
  line-height: 1.4;
}

.listen {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  margin-top: 8px;
  padding: 4px 0;
  background: none;
  border: 0;
  color: var(--brass-hi);
  font-size: 1rem;
  cursor: pointer;
}

.listen:hover {
  color: #FFE6B0;
}

.listen svg {
  width: 26px;
  height: 26px;
  padding: 7px 6px 7px 8px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px currentColor;
  fill: currentColor;
}

.person.is-speaking .listen {
  color: var(--ghost);
}

@media (max-width: 600px) {
  .cast-list {
    gap: 26px;
  }

  .person {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    column-gap: 16px;
  }

  .person-art {
    grid-row: 1 / span 4;
    align-self: start;
  }

  .person-art img {
    width: 100%;
  }

  .person h3 {
    margin-top: 0;
    font-size: 1.375rem;
  }
}

/* Coming soon: the comet again, the way it began ---------------------- */

.soon {
  position: relative;
  isolation: isolate;
  margin-top: var(--section);
  padding-block: clamp(70px, 9vw, 130px) clamp(44px, 6vw, 70px);
  overflow: hidden;
}

.soon-art {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: 62% 40%;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 22%, #000 45%, rgba(0, 0, 0, 0.3) 90%);
  mask-image: linear-gradient(to bottom, transparent, #000 22%, #000 45%, rgba(0, 0, 0, 0.3) 90%);
}

.soon h2 {
  max-width: 13em;
  text-shadow: 0 2px 22px rgba(0, 0, 0, 0.85);
}

.soon .stores {
  margin-top: 26px;
}

.soon .more {
  margin-top: 20px;
}

.spec {
  display: grid;
  gap: 2px 28px;
  margin: clamp(42px, 6vw, 80px) 0 0;
  padding: clamp(20px, 3vw, 30px) clamp(20px, 3vw, 34px);
  max-width: 62rem;
  background: rgba(14, 26, 36, 0.8);
  box-shadow: inset 0 0 0 1px rgba(176, 141, 87, 0.42);
  border-radius: 8px;
}

.spec dt {
  color: var(--muted);
  font-size: 1rem;
}

.spec dd {
  margin: 0 0 12px;
}

@media (min-width: 640px) {
  .spec {
    grid-template-columns: 8.5rem minmax(0, 1fr);
  }

  .spec dd {
    margin-bottom: 8px;
  }
}

.spec dd:last-child {
  margin-bottom: 0;
}

.footer {
  padding-block: 30px 40px;
  color: var(--muted);
  font-size: 1rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 32px;
}

.footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

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

  .hero-frost,
  .hero h1,
  .hero-foot {
    animation: none;
  }

  .yt:hover img {
    transform: none;
  }
}
