/* Velnnoir — site styles
   Palette is sampled from the artwork in /assets by tools/process_images.py.
   Body text never drops below 20px; contrast targets WCAG AAA (7:1) for text. */

/* Instrument Serif: tall, narrow, high-contrast display face (free, OFL). */
@font-face {
  font-family: "Instrument Serif";
  src: url("/fonts/instrument-serif.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("/fonts/cormorant-garamond-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("/fonts/cormorant-garamond-500-italic.woff2") format("woff2");
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Bodoni Moda";
  src: url("/fonts/bodoni-moda-italic.woff2") format("woff2");
  font-weight: 400 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("/fonts/source-serif-4.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* PALETTE:START — replaced by tools/process_images.py */
  --ink: #0a090e; /* page background, from the medallion's black */
  --ink-raised: #13111a; /* panels */
  --rule: #2c2938; /* hairlines */
  --bone: #dfd8d0; /* body text, tinted to the medallion bronze #8e7255 */
  --bone-dim: #aea49b; /* secondary text */
  --slow-burn: #86a5ac; /* Slow Burn accent, from #161e20 in the cover */
  --smoke-velvet: #ba9984; /* Smoke & Velvet accent, from #4e392c in the cover */
  /* PALETTE:END */

  --focus: #fff4d6;
  --live-red: #a8001a; /* YouTube-style live red, darkened so white text passes 7:1 */
  --display: "Instrument Serif", "Cormorant Garamond", Garamond, "Times New Roman", serif;
  --title: "Bodoni Moda", Didot, "Bodoni 72", "Times New Roman", serif;
  --sub: "Cormorant Garamond", Garamond, "Times New Roman", serif;
  --body: "Source Serif 4", Georgia, "Times New Roman", serif;
  --measure: 34rem;
  --gutter: clamp(1rem, 4vw, 3rem);
  --gutter-m: 2.4rem; /* phones: keeps text clear of the side rail */
  --space: clamp(3rem, 7vw, 5.5rem);
  --slow: 1.1s cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html {
  font-size: 125%; /* 20px base */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.65;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }

:focus { outline: none; }
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
  border-radius: 2px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 1rem; top: -10rem;
  z-index: 10;
  padding: 0.75rem 1.25rem;
  background: var(--bone);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 1rem; }

/* Visible placeholder so nothing unfinished ships unnoticed. */
.todo {
  outline: 1px dashed currentColor;
  outline-offset: 3px;
  opacity: 0.8;
  font-style: normal;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 0.7em;
  letter-spacing: 0;
  text-transform: none;
}

.icon { width: 1.6rem; height: 1.6rem; flex: none; }
/* Deezer's mark is a bitmap; used as a mask so it takes the text colour like the SVG icons. */
.icon--deezer {
  display: inline-block;
  background: currentColor;
  -webkit-mask: url("/img/deezer-mask.png") center / contain no-repeat;
  mask: url("/img/deezer-mask.png") center / contain no-repeat;
}

/* ---------- Type ---------- */

.wordmark {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(3.2rem, 14vw, 6.5rem);
  line-height: 0.95;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
/* Wordmark image (assets/velnnoir-text-logo.png via tools/process_images.py), sized by height. */
.wordmark--image { line-height: 0; }
.wordmark--image img { height: clamp(3rem, 8vw, 5.5rem); width: auto; }
.wordmark--small img { height: 32px; width: auto; }
.wordmark--small {
  font-size: 1.6rem;
  letter-spacing: 0.08em;
}

.section-title {
  margin: 0 0 2rem;
  font-family: var(--title);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(2.1rem, 6vw, 3.2rem);
  line-height: 1.1;
  letter-spacing: 0.01em;
  text-align: center;
  text-wrap: balance;
}

.subtext {
  font-family: var(--sub);
  font-style: italic;
  font-weight: 500;
  font-size: 1.5rem;
  line-height: 1.35;
  text-wrap: balance;
}

/* ---------- Hero: the banner, full screen ---------- */

.hero {
  --hero-pad-b: clamp(2.5rem, 6vh, 4rem);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh; /* the visible area right now, toolbar shown or hidden */
  padding: 6rem var(--gutter) var(--hero-pad-b);
  text-align: center;
  isolation: isolate;
}
.hero__bg,
.hero__bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
}
.hero__bg img {
  object-fit: cover;
  object-position: 60% 30%;
}
/* Fade the painting into the page so text sits on near-solid colour. */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to bottom,
    rgb(10 9 14 / 0.25) 0%,
    rgb(10 9 14 / 0.05) 30%,
    rgb(10 9 14 / 0.7) 62%,
    rgb(10 9 14 / 0.94) 82%,
    var(--ink) 100%);
}
/* Phones: the painting fills the whole first screen, top of the image kept in view.
   The name sits at the top and the actions at the foot, each on a fade to black. */
@media (max-width: 47.99rem) {
  .hero { align-items: stretch; padding: 1.5rem var(--gutter-m) var(--hero-pad-b); }
  .hero__content { flex: 1; justify-content: space-between; }
  .hero__title { display: flex; flex-direction: column; align-items: center; }
  .hero__bg img { object-position: 50% 0%; }
  .hero::after {
    background: linear-gradient(to bottom,
      rgb(10 9 14 / 0.9) 0%,
      rgb(10 9 14 / 0.6) 16%,
      rgb(10 9 14 / 0) 34%,
      rgb(10 9 14 / 0) 52%,
      rgb(10 9 14 / 0.8) 72%,
      var(--ink) 100%);
  }
  .wordmark--image img { height: clamp(2.4rem, 13vw, 3.4rem); }
}
.hero__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}
.hero__line {
  margin: 1rem 0 0;
  max-width: 30rem;
  font-family: var(--display);
  font-size: clamp(1.3rem, 4.5vw, 1.9rem);
  line-height: 1.2;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-wrap: balance;
}

/* Desktop: the words sit in the left third, clear of his face, over a fade from the left. */
@media (min-width: 48rem) {
  .hero { --hero-pad-b: clamp(3rem, 11vh, 7rem); align-items: flex-start; text-align: left; }
  .hero__content { align-items: flex-start; max-width: 36rem; padding-left: clamp(1rem, 5vw, 5rem); }
  .hero__bg img { object-position: 70% 30%; }
  .hero::after {
    background:
      linear-gradient(to right,
        rgb(10 9 14 / 0.92) 0%,
        rgb(10 9 14 / 0.7) 30%,
        rgb(10 9 14 / 0) 58%),
      linear-gradient(to bottom,
        rgb(10 9 14 / 0) 70%,
        var(--ink) 100%);
  }
}

/* Under the hero line: a link to the live streams, then the "Listen on" marks (after Lofi Girl's banner). */
.hero__actions {
  margin-top: 2.25rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-end;
  gap: 1.5rem 2.5rem;
}
@media (min-width: 48rem) {
  .hero__actions { justify-content: flex-start; }
}
.live-link {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  min-height: 3.25rem;
  padding: 0.4rem 1.1rem 0.4rem 0.5rem;
  border: 1px solid rgb(223 216 208 / 0.35);
  background: rgb(10 9 14 / 0.5);
  color: var(--bone);
  text-decoration: none;
  letter-spacing: 0.06em;
  transition: border-color 0.4s ease;
}
.live-link:hover { border-color: var(--bone); }
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.55rem;
  border-radius: 3px;
  background: var(--live-red);
  color: #fff;
  font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.live-badge::before {
  content: "";
  width: 0.45rem; height: 0.45rem;
  border-radius: 50%;
  background: #fff;
}
.platform-strip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}
@media (min-width: 48rem) {
  .platform-strip { align-items: flex-start; }
}
.platform-strip__text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 3.25rem;
  padding: 0 0.4rem;
  color: var(--bone);
  opacity: 0.85;
  font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  text-decoration: none;
}
.platform-strip__label {
  margin: 0;
  font-size: 0.9rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--bone-dim);
}
.platform-strip ul {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 1rem;
}
.platform-strip a:not(.platform-strip__text) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem; height: 3.25rem; /* 65px targets */
  color: var(--bone);
  opacity: 0.85;
  transition: opacity 0.4s ease;
}
.platform-strip a:hover { opacity: 1; }
.platform-strip .icon { width: 1.8rem; height: 1.8rem; }
/* Phones: six services as two even rows of three. */
@media (max-width: 47.99rem) {
  .platform-strip ul {
    display: grid;
    grid-template-columns: repeat(3, auto);
    justify-content: center;
    justify-items: center;
    gap: 0.25rem 1.5rem;
  }
}

/* ---------- Doors: two full-height panels ---------- */

.doors { padding-top: var(--space); }
.doors .section-title { padding: 0 var(--gutter); }

.doors__split {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.door {
  --accent: var(--bone);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 75vh;
  min-height: 75svh;
  overflow: hidden;
  color: var(--bone);
  text-decoration: none;
  isolation: isolate;
}
.door--slow-burn { --accent: var(--slow-burn); }
.door--smoke-velvet { --accent: var(--smoke-velvet); }
.door:focus-visible { outline-offset: -6px; }

.door picture,
.door__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
}
.door__img { object-fit: cover; }
.door--slow-burn .door__img { object-position: 45% 30%; }
.door--smoke-velvet .door__img { object-position: 58% 40%; }
.door::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to bottom,
    rgb(10 9 14 / 0) 35%,
    rgb(10 9 14 / 0.75) 65%,
    rgb(10 9 14 / 0.95) 100%);
}
.door__body {
  padding: 2rem var(--gutter) 2.5rem;
  max-width: 34rem;
}
.door__name {
  margin: 0;
  padding-top: 1rem;
  border-top: 2px solid var(--accent);
  display: block;
  width: fit-content; /* the accent rule stays as long as the title */
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.2rem, 7vw, 3.4rem);
  line-height: 1;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.door__genre {
  margin: 0 0 0.6rem;
  font-size: 0.9rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}
.door__voice { margin: 0.9rem 0 1.5rem; }
.door__action,
.platforms a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 3.25rem; /* 65px */
  padding: 0.6rem 2.25rem;
  border: 1px solid var(--accent, var(--bone));
  background: rgb(10 9 14 / 0.55);
  color: var(--bone);
  font-size: 1.05rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color 0.5s ease, color 0.5s ease;
}
.door:hover .door__action,
.door:focus-visible .door__action,
.platforms a:hover {
  background: var(--accent, var(--bone));
  color: var(--ink);
}

/* Desktop: side by side; the panel under the pointer widens slowly. */
@media (min-width: 48rem) {
  .doors__split {
    flex-direction: row;
    height: min(88vh, 56rem);
    height: min(88svh, 56rem);
    min-height: 32rem;
  }
  .door {
    flex: 1 1 0;
    min-height: 0;
    transition: flex-grow var(--slow);
  }
  /* Fixed width (the narrow state's width) so the words never re-wrap while the panel slides. */
  .door__body {
    width: 37vw;
    max-width: none;
    padding: 2.5rem clamp(2rem, 4vw, 3.5rem) 3rem;
  }
  .door__name { font-size: clamp(2.2rem, 3.4vw, 3.4rem); }
  /* Desktop: a little smaller and wider so both door sentences settle on three lines. */
  .door__voice { font-size: 1.3rem; }
  .door__body { padding-left: clamp(1.5rem, 3vw, 3rem); padding-right: clamp(1.5rem, 2.5vw, 2.5rem); }
}
@media (min-width: 48rem) and (hover: hover) {
  .door:hover { flex-grow: 1.7; }
}

/* The door not chosen: softened, dimmed, and veiled in slowly rising cigar smoke. */
.door__img { transition: filter var(--slow); }
.door__smoke { display: none; }
@media (min-width: 48rem) and (hover: hover) {
  .door__smoke {
    display: block;
    position: absolute;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    opacity: 0;
    transition: opacity var(--slow);
    pointer-events: none;
  }
  .door__smoke::before,
  .door__smoke::after {
    content: "";
    position: absolute;
    left: 0; top: 0;
    width: 100%;
    height: 200%;
    background: url("/img/smoke.webp") repeat-y center top / 100% 50%;
    animation: smoke-rise 38s linear infinite;
    animation-play-state: paused;
  }
  .door__smoke::after {
    left: -15%;
    width: 130%;
    opacity: 0.6;
    transform: scaleX(-1);
    animation-duration: 60s;
  }
  .doors__split:hover .door:not(:hover) .door__img,
  .doors__split:has(.door:focus-visible) .door:not(:focus-visible) .door__img {
    filter: blur(3px) brightness(0.55);
  }
  .doors__split:hover .door:not(:hover) .door__smoke,
  .doors__split:has(.door:focus-visible) .door:not(:focus-visible) .door__smoke {
    opacity: 1;
  }
  .doors__split:hover .door:not(:hover) .door__smoke::before,
  .doors__split:hover .door:not(:hover) .door__smoke::after,
  .doors__split:has(.door:focus-visible) .door:not(:focus-visible) .door__smoke::before,
  .doors__split:has(.door:focus-visible) .door:not(:focus-visible) .door__smoke::after {
    animation-play-state: running;
  }
}
@keyframes smoke-rise {
  from { transform: translateY(0); }
  to { transform: translateY(-50%); }
}
.door__smoke::after { animation-name: smoke-rise-mirrored; }
@keyframes smoke-rise-mirrored {
  from { transform: scaleX(-1) translateY(0); }
  to { transform: scaleX(-1) translateY(-50%); }
}
@media (min-width: 48rem) {
  .door:focus-visible { flex-grow: 1.7; }
}

/* ---------- Live ---------- */

.live { padding: var(--space) var(--gutter); }
.live__grid {
  display: grid;
  gap: 3rem;
  max-width: 84rem;
  margin: 0 auto;
}
@media (min-width: 48rem) {
  .live__grid { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
}
.live__intro {
  max-width: var(--measure);
  margin: -0.75rem auto 2.25rem;
  text-align: center;
  color: var(--bone-dim);
}
.stream--slow-burn { --accent: var(--slow-burn); }
.stream--smoke-velvet { --accent: var(--smoke-velvet); }

.stream__poster,
.stream__frame {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--ink-raised);
  overflow: hidden;
}
.stream__poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.stream__poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgb(10 9 14 / 0) 55%, rgb(10 9 14 / 0.7) 100%);
}
.stream__play {
  position: absolute;
  z-index: 1;
  /* bottom-centre, clear of the title lettering in the upper half of the thumbnails */
  left: 50%; bottom: 1.25rem;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 3.25rem;
  padding: 0.6rem 1.75rem;
  background: rgb(10 9 14 / 0.75);
  border: 1px solid var(--accent);
  color: var(--bone);
  font-size: 1.05rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: background-color 0.5s ease, color 0.5s ease;
}
.stream__poster:hover .stream__play,
.stream__poster:focus-visible .stream__play {
  background: var(--accent);
  color: var(--ink);
}
/* Phones only: a Play button below the thumbnail (the overlaid one is hidden there). */
.stream__play-alt { display: none; }
@media (max-width: 47.99rem) {
  .stream__poster .stream__play { display: none; }
  .stream__poster::after { display: none; }
  .stream__play-alt {
    display: inline-flex;
    align-self: center;
    align-items: center;
    gap: 0.75rem;
    min-height: 3.25rem;
    margin-top: 1rem;
    padding: 0.6rem 2rem;
    border: 1px solid var(--accent);
    color: var(--bone);
    font-size: 1.05rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background-color 0.5s ease, color 0.5s ease;
  }
  .stream__play-alt:hover { background: var(--accent); color: var(--ink); }
  /* While the stream plays: a solid filled Stop button with a square icon. */
  .stream__play-alt.is-playing { background: var(--accent); color: var(--ink); }
  .stream__play-alt.is-playing .stream__icon {
    width: 0.7em; height: 0.7em;
    border: 0;
    background: currentColor;
  }
}
.stream__icon {
  width: 0; height: 0;
  border-left: 0.8em solid currentColor;
  border-top: 0.5em solid transparent;
  border-bottom: 0.5em solid transparent;
}
.stream__frame iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
}
.stream__name {
  margin: 1.5rem 0 0;
  padding-top: 0.9rem;
  border-top: 2px solid var(--accent);
  display: inline-block;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  line-height: 1;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.stream__desc { margin: 1rem 0 0; max-width: var(--measure); color: var(--bone-dim); }
.stream__signoff { margin: 0.6rem 0 0; color: var(--bone); }

/* ---------- Listen page ---------- */

.masthead {
  padding: 1.5rem var(--gutter);
  display: flex;
  justify-content: center;
}
.masthead__home {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  min-height: 3.25rem;
  text-decoration: none;
}
.masthead__home > img { width: 56px; height: 56px; }

.listen {
  max-width: 36rem;
  margin: 0 auto;
  padding: calc(var(--space) * 0.5) var(--gutter) var(--space);
}
.listen__group { scroll-margin-top: 2rem; }
.listen__group + .listen__group { margin-top: 3.5rem; }
.listen__name {
  margin: 0 0 1.5rem;
  padding-top: 1rem;
  border-top: 2px solid var(--accent);
  display: inline-block;
  font-family: var(--display);
  font-weight: 400;
  font-size: 2.2rem;
  line-height: 1;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.platforms {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  gap: 1rem;
}
.platforms a {
  display: flex;
  width: 100%;
  justify-content: flex-start;
  text-transform: none;
  letter-spacing: 0.04em;
  font-size: 1.1rem;
  background: transparent;
}

.platforms__session--slow-burn { --accent: var(--slow-burn); }
.platforms__session--smoke-velvet { --accent: var(--smoke-velvet); }

/* ---------- The last screen: closing words and footer over Tokyo ---------- */

.finale {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh; /* the visible area right now, toolbar shown or hidden */
  overflow: hidden;
}
/* Tokyo at night behind everything on this screen: dimmed, faded into the page at the top. */
.finale__bg,
.finale__bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}
.finale__bg img {
  object-fit: cover;
  opacity: 0.38;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 20%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 20%);
}
.about-section {
  position: relative;
  isolation: isolate;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--space) * 1.2) var(--gutter) 2rem;
  text-align: center;
}
.about-section__inner {
  max-width: 40rem;
  margin: 0 auto;
}
/* A soft pool of shadow behind the words keeps them crisp over the lit skyline. */
.about-section::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(ellipse 48rem 26rem at 50% 50%, rgb(10 9 14 / 0.62), rgb(10 9 14 / 0) 70%);
}
.about-section .section-title { margin-bottom: 1.5rem; }
.about-section p { margin: 0 0 1.25rem; }
.about-section__signoff { margin-top: 1.75rem !important; }
/* Support line: one boxed link, quiet like the door buttons; the whole box is the target. */
.about-section__support { margin-top: 2rem !important; }
.support-link {
  display: inline-block;
  min-height: 3.25rem;
  padding: 0.75rem 1.75rem;
  border: 1px solid rgb(255 255 255 / 0.5);
  background: rgb(255 255 255 / 0.12); /* a faint white wash so it stands out from the page */
  color: #fff;
  text-decoration: none;
  transition: border-color 0.4s ease, background-color 0.4s ease;
}
.support-link:hover {
  border-color: #fff;
  background: rgb(255 255 255 / 0.2);
}

/* ---------- Footer ---------- */

.site-footer {
  padding: 2.5rem var(--gutter) 3rem;
  border-top: 1px solid var(--rule);
}

.social {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  justify-content: center;
  gap: 0.5rem clamp(0.75rem, 4vw, 2rem); /* one row, icons only */
}
.social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem; height: 3.25rem; /* 65px targets */
  color: var(--bone-dim);
  transition: color 0.4s ease;
}
.social .icon { width: 1.75rem; height: 1.75rem; }
.social a:hover { color: #fff; }

/* On the landing page the footer sits on the Tokyo image, over a darkening at the foot. */
.site-footer--finale {
  border-top: none;
  padding-top: 1.5rem;
  padding-bottom: 1.75rem;
  background: linear-gradient(to bottom, rgb(10 9 14 / 0), rgb(10 9 14 / 0.8));
}
.site-footer--finale .social a { color: var(--bone); }

.site-footer__legal {
  margin: 0.75rem 0 0;
  text-align: center;
  font-size: 0.7rem; /* 14px: the smallest size kept readable */
  letter-spacing: 0.06em;
  color: var(--bone-dim);
}

/* ---------- Section by section: snap scrolling and the side dots ---------- */

/* One screen per stop, and a swipe or scroll moves to the next.
   Desktop: four screens (.snap). Phones: six, because each door and each stream gets its own (.snap-mobile). */
html:has(.snap) { scroll-snap-type: y mandatory; }
.snap,
.snap-mobile { scroll-snap-align: start; scroll-snap-stop: always; }
@media (max-width: 47.99rem) {
  .doors.snap, .live.snap { scroll-snap-align: none; }
}
@media (min-width: 48rem) {
  .snap-mobile { scroll-snap-align: none; }

  .doors {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100svh;
    height: 100dvh; /* the visible area right now, toolbar shown or hidden */
    padding-top: clamp(1.5rem, 5vh, 3rem);
  }
  .doors .section-title { margin-bottom: clamp(1rem, 3vh, 2rem); }
  .doors__split { flex: 1; height: auto; min-height: 0; }

  .live {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100vh;
    min-height: 100svh;
    min-height: 100dvh; /* the visible area right now, toolbar shown or hidden */
    padding-block: clamp(1.5rem, 5vh, 3rem);
  }
  /* Cap poster size by screen height so the whole section fits on short laptop screens. */
  .live__grid { width: 100%; max-width: min(84rem, 140vh); }

}

/* Side rail: the monogram (first stop, the landing screen) and one dot per screen after it.
   The stop in view is white; the others are light grey. Phones: compact, top right; desktop: centred right. */
.side-rail {
  position: fixed;
  z-index: 5;
  top: 0.5rem;
  right: 0.15rem;
  filter: drop-shadow(0 0 3px rgb(0 0 0 / 0.8));
}
.section-dots ul {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.section-dots .only-desktop { display: none; }
.section-dots a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem; height: 2.25rem; /* 45px targets on phones */
  color: #a8a29b; /* light grey, solid */
  transition: color 0.4s ease;
}
.section-dots__home { height: 2.5rem; }
.section-dots__mark {
  width: 24px; height: 29px; /* phones: 70% of the desktop size */
  background: currentColor;
  -webkit-mask: url("/img/logo-240.png") center / contain no-repeat;
  mask: url("/img/logo-240.png") center / contain no-repeat;
}
.section-dots li:not(:first-child) a::before {
  content: "";
  width: 0.45rem; height: 0.45rem;
  border-radius: 50%;
  background: currentColor;
  transition: transform 0.4s ease;
}
.section-dots li:not(:first-child) a[aria-current]::before { transform: scale(1.35); }
.section-dots a:hover { color: #d2ccc5; }
.section-dots a[aria-current] { color: #fff; }

@media (min-width: 48rem) {
  .side-rail {
    top: 50%;
    right: clamp(0.5rem, 1.5vw, 1.5rem);
    transform: translateY(-50%);
  }
  .section-dots .only-desktop { display: block; }
  .section-dots .only-mobile { display: none; }
  .section-dots a { width: 2.75rem; height: 2.75rem; } /* 55px targets */
  .section-dots__home { height: 3.5rem; margin-bottom: 0.5rem; }
  .section-dots__mark { width: 34px; height: 41px; }
  .section-dots li:not(:first-child) a::before { width: 0.6rem; height: 0.6rem; }
}

/* ---------- Phones: six screens ---------- */

/* Section headings repeated on each phone screen (hidden from screen readers; the real heading is kept). */
.panel-heading { display: none; }

@media (max-width: 47.99rem) {
  .panel-heading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
    text-align: center;
  }
  .panel-heading__title {
    font-family: var(--title);
    font-style: italic;
    font-weight: 500;
    font-size: 2rem;
    line-height: 1.1;
  }
  .panel-heading__intro { font-size: 1.15rem; color: var(--bone-dim); }

  /* Screens 2 and 3: one door each, full screen, heading on a fade at the top. */
  .doors { padding-top: 0; }
  .doors > .section-title {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
  }
  .doors__split { gap: 0; }
  .door { min-height: 0; height: 100vh; height: 100svh; height: 100dvh; }
  .door .panel-heading {
    position: absolute;
    top: 0; left: 0; right: 0;
    padding: 1.5rem var(--gutter-m) 0;
    text-shadow: 0 1px 12px rgb(10 9 14 / 0.9);
  }
  .door::after {
    background: linear-gradient(to bottom,
      rgb(10 9 14 / 0.95) 0%,
      rgb(10 9 14 / 0.75) 14%,
      rgb(10 9 14 / 0) 30%,
      rgb(10 9 14 / 0) 40%,
      rgb(10 9 14 / 0.78) 65%,
      rgb(10 9 14 / 0.95) 100%);
  }
  .door__body { padding: 2rem var(--gutter-m) 2.25rem var(--gutter); }
  /* Same line length on both doors so the two sentences wrap alike (site.js also evens their heights). */
  .door__voice { max-width: 12em; }

  /* Screens 4 and 5: one stream each, heading and intro repeated above the poster. */
  .live { padding: 0; }
  .live > .section-title,
  .live > .live__intro {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
  }
  .live__grid { gap: 0; }
  .stream {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100vh;
    min-height: 100svh;
    min-height: 100dvh; /* the visible area right now, toolbar shown or hidden */
    padding: 1.5rem var(--gutter-m);
  }
  .stream .panel-heading { margin-bottom: 1.25rem; }
  .stream__name { margin-top: 1.25rem; font-size: 1.7rem; }

  /* Screen 6: closing words and footer, sized to fit one screen. */
  .about-section { padding: 1.75rem var(--gutter-m) 0.5rem; }
  .about-section .section-title { font-size: 1.9rem; margin-bottom: 1rem; }
  .about-section p { margin-bottom: 0.9rem; line-height: 1.55; }
  .about-section__signoff { margin-top: 1rem !important; }
  .about-section__support { margin-top: 1.25rem !important; }
  .support-link { padding: 0.6rem 1.25rem; }
  .support-link__cta { display: block; } /* phones: "Raise one with us." always starts the second line */
  /* The button sits well below the side rail, so it may use the full width between the normal gutters. */
  .about-section .about-section__support { margin-inline: calc(var(--gutter) - var(--gutter-m)); }
  .support-link { padding-inline: 1rem; }
  .site-footer--finale { padding-top: 0.75rem; padding-bottom: 1rem; }

  /* Bodoni Moda's display cut has hairlines under a pixel wide at phone sizes, which vanish over
     the artwork. Its small-size cut (optical size 11) is the same design with sturdier hairlines. */
  .section-title,
  .panel-heading__title { font-variation-settings: "opsz" 11; }
  .about-section .section-title,
  .panel-heading__title { text-shadow: 0 1px 10px rgb(10 9 14 / 0.9); }

  /* Short or narrow phones (e.g. iPhone SE, small Androids): tighter spacing and headings so each screen still fits. */
  @media (max-height: 740px), (max-width: 23rem) {
    .panel-heading__title { font-size: 1.7rem; }
    .panel-heading__intro { font-size: 1rem; }
    .stream { padding-block: 0.75rem; }
    .stream .panel-heading { margin-bottom: 0.75rem; }
    .stream__name { margin-top: 0.5rem; font-size: 1.5rem; }
    .stream__play-alt { margin-top: 0.5rem; min-height: 3rem; padding-block: 0.4rem; }
    .stream__desc { line-height: 1.45; }
    .stream__signoff { margin-top: 0.35rem; }
    .about-section { padding-top: 1rem; }
    .about-section .section-title { font-size: 1.6rem; margin-bottom: 0.6rem; }
    .about-section p { line-height: 1.45; margin-bottom: 0.6rem; }
    .about-section__signoff { margin-top: 0.6rem !important; }
    .about-section__support { margin-top: 0.75rem !important; }
    .site-footer--finale { padding-top: 0.25rem; padding-bottom: 0.6rem; }
    .site-footer--finale .social a { height: 2.75rem; }
    .site-footer__legal { margin-top: 0.25rem; }
    .support-link { font-size: 0.9rem; } /* 18px, the brief's minimum */
  }

  /* Smaller reading text on phones: 18px descriptions (the brief's minimum), smaller italic lines. */
  .stream__desc,
  .about-section p:not(.about-section__signoff) { font-size: 0.9rem; }
  .subtext { font-size: 1.25rem; }
  .door__voice { margin-bottom: 1.25rem; }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* ---------- Motion: slow fades and the door widening, nothing else ---------- */

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.fade { animation: fade-in 1.6s ease-out both; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* Windows High Contrast / forced colours: keep borders and focus visible. */
@media (forced-colors: active) {
  .door__action, .platforms a, .stream__play { border-color: CanvasText; }
}
