/* ==========================================================================
   Shell: header bar, Index overlay, 24:60 timecode, intro, cursor, footer,
   language controls, cross-document transitions.
   ========================================================================== */

/* --- Cross-document view transitions -------------------------------------
   The bar and the timecode persist; the page underneath is re-scanned. */
.bar {
  view-transition-name: bar;
}

.tc {
  view-transition-name: timecode;
}

::view-transition-old(root) {
  animation: vt-out 360ms var(--ease-in-out) both;
}

::view-transition-new(root) {
  animation: vt-in 620ms var(--ease-out) both;
}

@keyframes vt-out {
  to {
    opacity: 0;
    transform: translateY(-1.5vh);
    filter: blur(6px);
  }
}

@keyframes vt-in {
  from {
    clip-path: inset(0 0 100% 0);
  }
  to {
    clip-path: inset(0 0 0 0);
  }
}

html.is-locked,
html.is-locked body {
  overflow: hidden;
}

/* --- Header bar --------------------------------------------------------- */
.bar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 80;
  height: var(--bar-h);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 0 var(--gutter);
  padding-top: env(safe-area-inset-top);
  transition: transform 520ms var(--ease-tape), background-color var(--d-2), border-color var(--d-2);
  border-bottom: 1px solid transparent;
}

.bar::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid var(--line);
  opacity: 0;
  transition: opacity var(--d-3) var(--ease-out);
  pointer-events: none;
}

.bar.is-scrolled::before {
  opacity: 1;
}

.bar.is-hidden {
  transform: translate3d(0, calc(-100% - 2px), 0);
}

html.index-open .bar {
  transform: none;
}

.bar__brand {
  --brand-width: clamp(176px, 17vw, 244px);
  display: inline-flex;
  align-items: center;
  height: 44px;
  margin-right: 8px;
}

.bar__brand img {
  width: var(--brand-width);
  height: auto;
  transition: opacity var(--d-2);
}

.bar__brand:hover img {
  opacity: 0.72;
}

.nav {
  display: flex;
  justify-content: center;
  gap: clamp(14px, 2vw, 34px);
}

.nav__link {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 10px 0;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--fg-2);
  transition: color var(--d-1);
  white-space: nowrap;
}

.nav__tc {
  font-family: var(--f-mono);
  font-size: 0.625rem;
  color: var(--fg-4);
  transition: color var(--d-1);
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 420ms var(--ease-out);
}

.nav__link:hover,
.nav__link:focus-visible,
.nav__link[aria-current="page"] {
  color: var(--fg);
}

.nav__link:hover::after,
.nav__link:focus-visible::after,
.nav__link[aria-current="page"]::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav__link[aria-current="page"] .nav__tc,
.nav__link:hover .nav__tc {
  color: var(--signal);
}

.bar__end {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bar__demo {
  min-height: 38px;
  padding: 0 16px;
  font-size: 0.6875rem;
}

.index-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 4px 0 12px;
  font-family: var(--f-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg);
}

.index-toggle__icon {
  position: relative;
  width: 22px;
  height: 10px;
}

.index-toggle__icon::before,
.index-toggle__icon::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1.5px;
  background: currentColor;
  transition: transform 520ms var(--ease-tape), top 520ms var(--ease-tape);
}

.index-toggle__icon::before {
  top: 0;
}

.index-toggle__icon::after {
  top: 8.5px;
  transform: scaleX(0.6);
  transform-origin: right;
}

.index-toggle[aria-expanded="true"] .index-toggle__icon::before {
  top: 4.25px;
  transform: rotate(45deg);
}

.index-toggle[aria-expanded="true"] .index-toggle__icon::after {
  top: 4.25px;
  transform-origin: center;
  transform: rotate(-45deg);
}

.index-toggle .when-open {
  display: none;
}

.index-toggle[aria-expanded="true"] .when-open {
  display: inline;
}

.index-toggle[aria-expanded="true"] .when-closed {
  display: none;
}


@media (1100px < width <= 1280px) {
  .bar > nav .nav {
    gap: clamp(8px, calc(7vw - 69px), 22px);
  }
}

@media (max-width: 1100px) {
  .bar > nav {
    display: none;
  }
  .bar {
    grid-template-columns: 1fr auto;
  }
}

@media (max-width: 560px) {
  .bar__brand {
    --brand-width: clamp(142px, 42vw, 172px);
  }

  .bar__demo {
    display: none;
  }
}

/* --- Index overlay ------------------------------------------------------ */
.index {
  position: fixed;
  inset: 0;
  z-index: 85;
  display: grid;
  grid-template-rows: calc(var(--bar-h) + env(safe-area-inset-top)) 1fr auto;
  background: var(--night);
  color: var(--fg);
  clip-path: inset(0 0 100% 0);
  transition: clip-path 620ms var(--ease-tape);
  overflow: hidden;
}

.index.is-open {
  clip-path: inset(0 0 0 0);
}

.index__bar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: env(safe-area-inset-top) var(--gutter) 0;
  border-bottom: 1px solid var(--line);
}

.index-toggle__icon.is-x::before,
.index-toggle__icon.is-x::after {
  top: 4.25px;
  transform-origin: center;
}

.index-toggle__icon.is-x::before {
  transform: rotate(45deg);
}

.index-toggle__icon.is-x::after {
  transform: rotate(-45deg);
}

.index__preview {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.index__art {
  position: absolute;
  right: var(--gutter);
  top: 50%;
  width: min(34vw, 520px);
  aspect-ratio: 1;
  object-fit: cover;
  transform: translate3d(0, -46%, 0) scale(0.96);
  opacity: 0;
  filter: grayscale(0.2);
  transition: opacity 520ms var(--ease-out), transform 900ms var(--ease-out);
}

.index__preview[data-active] .index__art {
  opacity: 0;
}

.index__preview[data-active="label"] .index__art[data-for="label"],
.index__preview[data-active="imprint"] .index__art[data-for="imprint"],
.index__preview[data-active="releases"] .index__art[data-for="releases"],
.index__preview[data-active="artists"] .index__art[data-for="artists"],
.index__preview[data-active="fanCreation"] .index__art[data-for="fanCreation"],
.index__preview[data-active="licensing"] .index__art[data-for="licensing"],
.index__preview[data-active="contact"] .index__art[data-for="contact"] {
  opacity: 0.9;
  transform: translate3d(0, -50%, 0) scale(1);
}

.index__body {
  position: relative;
  z-index: 1;
  align-self: center;
  overflow-y: auto;
  padding: 24px var(--gutter);
  max-height: 100%;
}

.index__list {
  display: flex;
  flex-direction: column;
}

.index__item {
  border-top: 1px solid var(--line);
  opacity: 0;
  transform: translate3d(0, 24px, 0);
  transition: opacity 420ms var(--ease-out), transform 720ms var(--ease-out);
  transition-delay: calc(120ms + var(--i) * 45ms);
}

.index__item:last-child {
  border-bottom: 1px solid var(--line);
}

.index.is-open .index__item {
  opacity: 1;
  transform: none;
}

.index__link {
  display: grid;
  grid-template-columns: 5.5rem 1fr auto;
  align-items: center;
  gap: 16px;
  padding: clamp(8px, 1.4vh, 16px) 0;
  color: var(--fg-2);
  transition: color var(--d-2);
}

.index__tc {
  font-size: 0.75rem;
  color: var(--fg-3);
}

.index__label {
  font-size: clamp(2rem, 6.4vh, 4.75rem);
  line-height: 1.05;
  --wdth: 100;
  transition: font-variation-settings 620ms var(--ease-out), letter-spacing 620ms var(--ease-out);
}

.index__arrow {
  font-family: var(--f-mono);
  font-size: 1.25rem;
  opacity: 0;
  transform: translate3d(-8px, 8px, 0);
  transition: opacity var(--d-2), transform var(--d-2) var(--ease-out);
}

.index__link:hover,
.index__link:focus-visible,
.index__link[aria-current="page"] {
  color: var(--fg);
}

.index__link:hover .index__label,
.index__link:focus-visible .index__label {
  --wdth: 125;
}

.index__link:hover .index__arrow,
.index__link:focus-visible .index__arrow {
  opacity: 1;
  transform: none;
}

.index__link[aria-current="page"] .index__tc,
.index__link:hover .index__tc {
  color: var(--signal);
}

.index__foot {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 20px var(--gutter) calc(20px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
}

@media (max-width: 700px) {
  .index__link {
    grid-template-columns: 3.6rem 1fr auto;
  }
  .index__art {
    display: none;
  }
}

/* --- 24:60 timecode HUD ---------------------------------------------------
   Desktop: a vertical strip in the left gutter, clear of the content column.
   Mobile: it rides in the thumb dock next to the Index button. */
.tc {
  position: fixed;
  left: calc(var(--gutter) / 2 - 6px);
  bottom: calc(24px + env(safe-area-inset-bottom));
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 12px;
  writing-mode: vertical-rl;
  /* Every glyph (CJK too) turns with the line, so the 180° flip reads bottom-to-top. */
  text-orientation: sideways;
  transform: rotate(180deg);
  font-family: var(--f-mono);
  font-size: 0.625rem;
  letter-spacing: 0.12em;
  color: var(--fg-2);
  pointer-events: none;
  transition: opacity var(--d-3) var(--ease-out);
}

.tc__rec {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--signal);
  animation: rec-blink 2.4s steps(1, end) infinite;
}

.tc__time {
  color: var(--fg);
  font-variant-numeric: tabular-nums;
}

.tc__time .colon {
  color: inherit;
  opacity: 0.5;
}

.tc__f {
  opacity: 0.45;
}

.tc__section {
  text-transform: uppercase;
  max-height: 40vh;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--fg-3);
}

.tc__section:empty {
  display: none;
}

.tc.is-sixty .tc__time {
  color: var(--signal);
}

.tc.is-zero {
  opacity: 0;
}

html.index-open .tc {
  opacity: 0;
}

@media (max-width: 1100px) {
  .tc {
    left: var(--gutter);
    bottom: calc(14px + env(safe-area-inset-bottom));
    height: 48px;
    padding: 0 16px;
    writing-mode: horizontal-tb;
    transform: none;
    border-radius: 999px;
    background: color-mix(in srgb, var(--bg) 74%, transparent);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid var(--line);
    z-index: 74;
  }
  .tc__section {
    display: none;
  }
}

/* Mobile: thumb dock — timecode on the left, Index on the right */
.dock {
  display: none;
}

@media (max-width: 1100px) {
  .dock {
    position: fixed;
    right: var(--gutter);
    bottom: calc(12px + env(safe-area-inset-bottom));
    z-index: 75;
    display: block;
  }
  .dock .index-toggle {
    min-height: 48px;
    padding: 0 18px;
    border-radius: 999px;
    background: var(--bone);
    color: var(--night);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  }
  .dock .index-toggle:focus-visible {
    box-shadow: var(--focus), 0 10px 30px rgba(0, 0, 0, 0.35);
  }
  .bar .index-toggle {
    display: none;
  }
}

/* --- Intro: "Unwound" ------------------------------------------------------
   A studio clock counts the last minute, lights a 61st lamp it has no room
   for (24:60), tears at twelve and snaps into the hero's resonance line;
   Rev3rie Records rises out of that line (js/core/intro.js, intro-ring.js).
   Stack, bottom → top: night · standby · brand (hero clone / lockup) ·
   line (the hero's own wave renderer) · ring (lamps, face, playhead) | skip.
   Geometry shared with intro-ring.js: R = min(.42H, .56W). */
html {
  scrollbar-gutter: stable; /* unlocking scroll never changes the stage width */
}

.intro {
  position: fixed;
  inset: 0;
  z-index: 200;
  container-type: size;
  contain: strict;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  --R: min(42vh, 56vw);
  /* Only if the module never runs: the overlay never traps the page. */
  animation: intro-failsafe 0s linear 10s forwards;
}

@supports (width: 1cqw) {
  .intro {
    --R: min(42cqh, 56cqw);
  }
}

@keyframes intro-failsafe {
  to {
    visibility: hidden;
  }
}

.intro.is-armed {
  animation: none;
}

html.no-js .intro,
html[data-site-intro="skip"] .intro,
.intro[hidden] {
  display: none;
}

.intro__frame,
.intro__night,
.intro__brand {
  position: absolute;
  inset: 0;
}

.intro__night {
  background: var(--night);
}

/* Gate: the standby lamp sits exactly where lamp 00 is drawn on the first
   frame (tilt 84°, scale .92, centre 56%: y = 56% − .068R, Ø = .0312R). */
.intro__standby {
  position: absolute;
  left: 50%;
  top: calc(56vh - 0.068 * var(--R));
  width: calc(0.0312 * var(--R));
  aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 calc(0.06 * var(--R)) rgba(255, 79, 43, 0.75);
  animation: rec-blink 1.2s steps(1, end) infinite;
}

@supports (width: 1cqw) {
  .intro__standby {
    top: calc(56cqh - 0.068 * var(--R));
  }
}

.intro.is-live .intro__standby {
  visibility: hidden;
  animation: none;
}

.intro__brand,
.intro__line,
.intro__ring {
  pointer-events: none;
}

/* Pixel rects are written by intro.js. */
.intro__line,
.intro__ring {
  position: absolute;
  left: 0;
  top: 0;
}

/* The wordmark clone: home.css lays it out exactly like the hero; only its
   rise is the intro's. The clip edge is the resonance line itself. */
.intro__stagebox {
  position: absolute;
}

.intro__stagebox .hero__line--a {
  overflow: visible;
}

.intro__stagebox .hero__brand .hero__line .hero__word {
  translate: none;
  transition: none;
}

.intro__stagebox .hero__line--a .hero__word {
  text-align: center; /* fixed width: opens from its centre, lands left-aligned */
}

.intro__brand.is-prewarm {
  opacity: 0.002;
}

.intro__lockwrap {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  overflow: hidden;
}

.intro__lockup {
  position: absolute;
  max-width: none;
  height: auto;
}

.intro__skip {
  position: absolute;
  right: var(--gutter);
  bottom: calc(22px + env(safe-area-inset-bottom));
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--f-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-2);
  background: rgba(9, 9, 11, 0.4);
  transition: color var(--d-1), border-color var(--d-1);
}

.intro__skip:hover,
.intro__skip:focus-visible {
  color: var(--fg);
  border-color: var(--line-strong);
}

.intro__skip:focus-visible {
  box-shadow: var(--focus);
}

.intro.is-opening {
  pointer-events: none;
  cursor: auto;
}

.intro.is-opening .intro__skip {
  opacity: 0;
  visibility: hidden;
  transition: opacity 200ms ease, visibility 0s linear 200ms;
}

body.site-intro-lock {
  overflow: hidden;
}

/* --- Cursor ---------------------------------------------------------------- */
.cursor {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 300;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--d-2);
  mix-blend-mode: difference;
}

.cursor.is-visible {
  opacity: 1;
}

.cursor__dot {
  position: absolute;
  left: -4px;
  top: -4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  transition: transform 420ms var(--ease-out);
}

.cursor.is-link .cursor__dot {
  transform: scale(4.5);
  background: transparent;
  box-shadow: inset 0 0 0 0.3px #fff;
}

.cursor__label {
  position: absolute;
  left: 22px;
  top: 14px;
  font-family: var(--f-mono);
  font-size: 0.625rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  white-space: nowrap;
  opacity: 0;
  transform: translate3d(-6px, 0, 0);
  transition: opacity var(--d-1), transform var(--d-2) var(--ease-out);
}

.cursor.has-label .cursor__label {
  opacity: 1;
  transform: none;
}

/* --- Language selector ----------------------------------------------------- */
.lang {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}

.lang__option {
  min-width: 40px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  color: var(--fg-2);
  transition: color var(--d-1), background-color var(--d-2) var(--ease-out);
}

.lang__option:hover {
  color: var(--fg);
}

.lang__option.is-active {
  background: var(--fg);
  color: var(--bg);
}

.lang--segmented .lang__full {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.lang--list {
  display: flex;
  flex-direction: column;
  border: 0;
  padding: 0;
  gap: 0;
  border-radius: 0;
}

.lang--list .lang__option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 44px;
  padding: 0;
  border-radius: 0;
  border-top: 1px solid var(--line);
  font-size: 0.9375rem;
  text-align: left;
}

.lang--list .lang__option:last-child {
  border-bottom: 1px solid var(--line);
}

.lang--list .lang__short {
  order: 2;
  font-family: var(--f-mono);
  font-size: 0.6875rem;
  color: var(--fg-3);
}

.lang--list .lang__option.is-active {
  background: none;
  color: var(--fg);
}

.lang--list .lang__option.is-active .lang__short {
  color: var(--signal);
}

.lang--list .lang__option.is-active .lang__short::before {
  content: "● ";
}

/* --- Language suggestion -------------------------------------------------- */
html.is-locked:has(.language-suggestion.is-open) {
  scrollbar-gutter: auto; /* the backdrop needs the full viewport while scrolling is locked */
}

.language-suggestion {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  place-items: end start;
  padding: max(var(--gutter), env(safe-area-inset-top))
    max(var(--gutter), env(safe-area-inset-right))
    max(var(--gutter), env(safe-area-inset-bottom))
    max(var(--gutter), env(safe-area-inset-left));
}

.language-suggestion:not(.is-open) {
  pointer-events: none;
}

.language-suggestion:not(.is-open) .language-suggestion__backdrop {
  transition-duration: 0s; /* clear the scrim as the scrollbar gutter returns */
}

.language-suggestion:not(.is-open) .language-suggestion__panel {
  transition-duration: var(--d-2);
}

.language-suggestion__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 9, 11, 0.5);
  opacity: 0;
  transition: opacity var(--d-3);
}

.language-suggestion__panel {
  --bg: var(--night-2);
  --fg: var(--bone);
  --fg-2: color-mix(in srgb, var(--fg) 75%, var(--bg));
  --fg-3: color-mix(in srgb, var(--fg) 65%, var(--bg));
  --line: color-mix(in srgb, var(--fg) 18%, var(--bg));
  --line-strong: color-mix(in srgb, var(--fg) 40%, var(--bg));
  --focus: 0 0 0 2px var(--bg), 0 0 0 4px var(--signal);
  position: relative;
  width: min(440px, 100%);
  max-height: 100%;
  padding: clamp(16px, 4vw, 28px);
  overflow: auto;
  overscroll-behavior: contain;
  color-scheme: dark;
  color: var(--fg);
  background: var(--bg);
  border: 1px solid var(--line);
  display: grid;
  gap: 16px;
  transform: translate3d(0, 24px, 0);
  opacity: 0;
  transition: transform 620ms var(--ease-out), opacity 420ms var(--ease-out);
}

.language-suggestion.is-open .language-suggestion__backdrop {
  opacity: 1;
}

.language-suggestion.is-open .language-suggestion__panel {
  transform: none;
  opacity: 1;
}

.language-suggestion__title {
  font-size: var(--t-4);
  font-weight: 600;
  line-height: 1.35;
}

.language-suggestion__title:focus {
  box-shadow: none;
}

.language-suggestion__body,
.language-suggestion__error {
  color: var(--fg-2);
  font-size: var(--t-small);
}

.language-suggestion__error:empty {
  position: absolute;
}

.language-suggestion__choices {
  display: none;
}

.language-suggestion.is-choosing .language-suggestion__choices {
  display: block;
}

.language-suggestion__check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--t-small);
  color: var(--fg-2);
  cursor: pointer;
}

.language-suggestion__check input {
  width: 16px;
  height: 16px;
  accent-color: var(--signal);
}

.language-suggestion__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.language-suggestion__actions .btn {
  max-width: 100%;
  padding-block: 10px;
  line-height: 1.3;
  white-space: normal;
  text-wrap: balance;
}

/* --- Footer ------------------------------------------------------------- */
.footer {
  position: relative;
  padding-top: clamp(80px, 10vw, 160px);
  padding-bottom: calc(80px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  overflow: hidden;
}

.footer__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  margin-bottom: clamp(56px, 7vw, 112px);
}

.footer__slogan {
  font-family: var(--f-serif);
  font-size: clamp(1.5rem, 3.2vw, 3rem);
  line-height: 1.35;
  letter-spacing: 0.06em;
  max-width: 18em;
}

:root[lang="ja-JP"] .footer__slogan {
  word-break: auto-phrase;
}

:root[lang="en"] .footer__slogan {
  letter-spacing: 0;
}

.footer__clock {
  font-size: clamp(2.5rem, 6vw, 5.5rem);
  line-height: 1;
  color: var(--fg-3);
  flex: none;
}

.footer__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
  row-gap: 48px;
  margin-bottom: clamp(64px, 8vw, 128px);
}

.footer__col {
  grid-column: span 4;
}

.footer__head {
  font-size: var(--t-micro);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin-bottom: 18px;
}

.footer__nav {
  display: grid;
  gap: 8px;
  font-size: 0.9375rem;
}

.footer__nav a,
.footer__social {
  color: var(--fg-2);
  transition: color var(--d-1);
}

.footer__nav a:hover,
.footer__social:hover {
  color: var(--fg);
}

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

.footer__social {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 32px;
  font-size: 0.9375rem;
}

.footer__social img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  filter: grayscale(1) brightness(1.25);
  opacity: 0.8;
  transition: filter var(--d-2), opacity var(--d-2);
}

/* Red marks go dark in greyscale; lift them so they read like the others. */
.footer__social img[src*="youtube"],
.footer__social img[src*="netease"] {
  filter: grayscale(1) brightness(2.2);
}

.footer__social img[src*="tiktok"],
.footer__social img[src*="bilibili"] {
  filter: invert(1) grayscale(1) brightness(0.95);
}

.footer__social:hover img {
  opacity: 1;
}

.footer__ext {
  font-family: var(--f-mono);
  font-size: 0.6875rem;
  color: var(--fg-4);
}

.footer__wordmark {
  width: 100%;
  height: auto;
  opacity: 0.94;
  margin-bottom: 40px;
}

.footer__legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px 40px;
  font-size: 0.75rem;
  color: var(--fg-3);
}

.footer__line a {
  color: var(--fg-2);
}

.footer__top-link {
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  color: var(--fg-2);
}

.footer__top-link:hover {
  color: var(--signal);
}

@media (max-width: 900px) {
  .footer__col {
    grid-column: 1 / -1;
  }
  .footer__top {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* --- Page shell ------------------------------------------------------------ */
.page-shell {
  position: relative;
  min-height: 100vh;
}

main {
  display: block;
  overflow-x: clip;
}

.page-top {
  padding-top: calc(var(--bar-h) + clamp(48px, 9vw, 140px));
}

/* Ambient glow tinted by the artwork in focus. The glow is drawn inside a
   viewport-sized clip so it can never widen the layout viewport on mobile. */
.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.ambient::before {
  content: "";
  position: absolute;
  top: -20vh;
  right: -20vw;
  width: 70vw;
  height: 70vw;
  background: radial-gradient(closest-side, rgb(var(--art) / 0.16), rgb(var(--art) / 0) 70%);
  transition: background 1600ms var(--ease-out);
}

/* Film grain for depth — a static SVG, no animation cost */
.grain {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0.06;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  mix-blend-mode: overlay;
}

@media (prefers-reduced-motion: reduce) {
  .tc__rec {
    animation: none;
  }
  .index {
    transition: none;
  }
  .index__item {
    opacity: 1;
    transform: none;
  }
}

/* Touch: comfortable targets in the footer. */
@media (pointer: coarse) {
  .footer__nav {
    gap: 0;
  }
  .footer__nav a {
    display: block;
    padding-block: 12px;
  }
  .footer__social {
    min-height: 44px;
  }
  .footer__top-link,
  .footer__line a {
    display: inline-block;
    padding-block: 12px;
  }
}
