@font-face {
  font-family: "Cinzel";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/cinzel-latin.woff2") format("woff2");
}

:root {
  color-scheme: dark;
  --bg: #05070a;
  --ink: #f4f2ed;
  --muted: #b4b5b7;
  --faint: #80858b;
  --line: rgba(240, 244, 248, 0.22);
  --line-strong: rgba(240, 244, 248, 0.52);
  --steel: #e2ebf2;
  --cinzel: "Cinzel", Georgia, serif;
  --player-height: 112px;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--bg);
}

body {
  min-width: 320px;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
.swipe-region:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
}

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

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 300;
  padding: 10px 14px;
  background: #fff;
  color: #05070a;
  transform: translateY(-160%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.backdrop,
.backdrop-scrim,
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.backdrop {
  z-index: 0;
  background-color: #0b1118;
  background-image: var(--backdrop-image, linear-gradient(150deg, #17232f, #030508 68%));
  background-position: var(--backdrop-x, 62%) center;
  background-size: cover;
  filter: saturate(0.76) contrast(1.1) brightness(0.64);
  transform: scale(1.035);
  transition: background-position 680ms cubic-bezier(0.22, 0.72, 0.16, 1), filter 680ms ease;
}

.backdrop-scrim {
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(2, 4, 7, 0.9) 0%, rgba(2, 4, 7, 0.53) 45%, rgba(2, 4, 7, 0.16) 76%, rgba(2, 4, 7, 0.38) 100%),
    linear-gradient(0deg, rgba(3, 5, 8, 0.92) 0%, rgba(3, 5, 8, 0.22) 56%, rgba(3, 5, 8, 0.5) 100%);
}

.grain {
  z-index: 2;
  opacity: 0.09;
  background-image: repeating-linear-gradient(0deg, transparent 0 2px, rgba(255, 255, 255, 0.06) 2px 3px);
  mix-blend-mode: soft-light;
}

.disc-chrome {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 86px;
  padding: max(18px, env(safe-area-inset-top)) 34px 12px;
  pointer-events: none;
}

.heat-logo {
  display: block;
  width: clamp(142px, 15vw, 210px);
  height: auto;
  min-height: 30px;
  object-fit: contain;
  filter: drop-shadow(0 3px 18px rgba(0, 0, 0, 0.8));
  pointer-events: none;
}

.chrome-actions {
  display: flex;
  gap: 6px;
  justify-self: end;
  pointer-events: auto;
}

.chrome-button,
.chapter-arrow,
.feature-play,
.icon-button,
.player-play,
.speed-button,
.dialog-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.chrome-button {
  width: 42px;
  height: 42px;
  color: rgba(232, 238, 243, 0.72);
}

.home-button {
  justify-self: start;
  pointer-events: auto;
}

.chrome-button:hover,
.chapter-arrow:hover,
.icon-button:hover {
  color: #fff;
}

.chrome-button svg,
.chapter-arrow svg,
.feature-play svg,
.icon-button svg,
.volume-control svg,
.dialog-close svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
}

button:disabled {
  cursor: wait;
  opacity: 0.34;
}

.disc-menu,
.swipe-region,
.feature-track,
.feature-slide {
  width: 100%;
  height: 100%;
}

.disc-menu {
  position: fixed;
  inset: 0;
  z-index: 10;
}

.swipe-region {
  overflow: hidden;
  touch-action: pan-y;
  cursor: grab;
}

.swipe-region.is-dragging {
  cursor: grabbing;
}

.feature-track {
  display: flex;
  will-change: transform;
}

.feature-track.is-animating {
  transition: transform 540ms cubic-bezier(0.22, 0.72, 0.16, 1);
}

.feature-slide {
  position: relative;
  flex: 0 0 100%;
  display: flex;
  align-items: center;
  padding: 96px clamp(96px, 14vw, 220px) 90px;
}

.feature-copy {
  width: min(720px, 72vw);
  margin-top: 10vh;
  opacity: 0.18;
  transform: translateX(28px);
  transition: opacity 360ms ease 80ms, transform 540ms cubic-bezier(0.22, 0.72, 0.16, 1) 40ms;
}

.feature-slide.is-active .feature-copy {
  opacity: 1;
  transform: translateX(0);
}

.feature-title {
  max-width: 760px;
  margin: 0;
  color: #fff;
  font-family: var(--cinzel);
  font-size: clamp(38px, 5.2vw, 76px);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.01;
  text-transform: uppercase;
  text-wrap: balance;
  text-shadow: 0 6px 38px rgba(0, 0, 0, 0.86);
}

.feature-subtitle {
  max-width: 600px;
  margin: 22px 0 0;
  color: rgba(242, 240, 235, 0.78);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(16px, 1.55vw, 21px);
  line-height: 1.48;
  text-shadow: 0 3px 20px rgba(0, 0, 0, 0.9);
}

.feature-play {
  width: 58px;
  height: 58px;
  margin-top: 32px;
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: 50%;
  background: rgba(5, 8, 12, 0.24);
  color: #fff;
  backdrop-filter: blur(8px);
  transition: background-color 160ms ease, color 160ms ease, opacity 160ms ease, transform 160ms ease;
}

.feature-play:hover {
  background: #fff;
  color: #06080b;
  transform: scale(1.05);
}

.feature-play svg {
  width: 18px;
  height: 18px;
  margin-left: 2px;
  fill: currentColor;
  stroke: none;
}

.feature-play.is-playing svg {
  margin-left: 0;
}

.chapter-arrow {
  position: fixed;
  top: 50%;
  z-index: 32;
  width: 52px;
  height: 72px;
  color: rgba(232, 238, 243, 0.62);
  transform: translateY(-50%);
}

.chapter-arrow:disabled {
  cursor: default;
  opacity: 0.16;
}

.chapter-arrow svg {
  width: 26px;
  height: 26px;
}

.chapter-previous {
  left: 24px;
}

.chapter-next {
  right: 24px;
}

.feature-dots {
  position: fixed;
  bottom: max(28px, env(safe-area-inset-bottom));
  left: 50%;
  z-index: 34;
  display: flex;
  gap: 12px;
  align-items: center;
  transform: translateX(-50%);
  transition: bottom 220ms ease, opacity 160ms ease;
}

.feature-dot {
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.feature-dot::before {
  display: block;
  width: 5px;
  height: 5px;
  margin: auto;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.38);
  content: "";
  transition: width 180ms ease, border-radius 180ms ease, background-color 180ms ease;
}

.feature-dot[aria-current="true"]::before {
  width: 22px;
  border-radius: 4px;
  background: #fff;
}

.player {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  display: none;
  min-height: var(--player-height);
  padding: 10px 28px max(12px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(4, 6, 9, 0.96);
  box-shadow: 0 -20px 70px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(22px);
}

.player.is-open {
  display: block;
  animation: player-in 220ms ease both;
}

@keyframes player-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}

body.player-open .feature-dots,
body.player-open .feature-play {
  opacity: 0;
  pointer-events: none;
}

body.player-open .feature-play {
  transform: scale(0.86);
}

.player-progress-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 48px;
  gap: 10px;
  align-items: center;
  width: min(100%, 920px);
  margin: 0 auto;
  color: var(--faint);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}

.player-progress-row span:last-child {
  text-align: right;
}

input[type="range"] {
  height: 20px;
  margin: 0;
  accent-color: var(--steel);
  cursor: pointer;
}

#scrubber {
  width: 100%;
}

.player-controls {
  display: flex;
  gap: 30px;
  align-items: center;
  justify-content: center;
  margin: 2px auto 0;
}

.transport,
.player-tools,
.volume-control {
  display: flex;
  align-items: center;
}

.transport {
  gap: 8px;
}

.player-tools {
  gap: 10px;
}

.icon-button {
  width: 36px;
  height: 36px;
  color: #b8c0c8;
}

.player-play {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #f0f3f5;
  color: #05070a;
  font-size: 12px;
}

.speed-button {
  width: 40px;
  height: 30px;
  border: 1px solid var(--line);
  color: #d4d9de;
  font-size: 10px;
  font-weight: 700;
}

.volume-control {
  gap: 6px;
  color: var(--faint);
}

.volume-control svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
}

.volume-control input {
  width: 72px;
}

.about-dialog {
  width: min(470px, calc(100vw - 32px));
  padding: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  background: rgba(7, 10, 14, 0.98);
  color: var(--ink);
  box-shadow: 0 30px 120px rgba(0, 0, 0, 0.78);
}

.about-dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
}

.dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  color: var(--muted);
}

.dialog-label {
  margin: 0 0 11px;
  color: var(--faint);
  font-family: var(--cinzel);
  font-size: 8px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.about-dialog h2 {
  margin: 0;
  font-family: var(--cinzel);
  font-size: clamp(25px, 5vw, 38px);
  line-height: 1.1;
  text-transform: uppercase;
}

#about-source {
  margin: 18px 0;
  color: #c6c7c8;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  line-height: 1.55;
}

.source-link {
  display: inline-block;
  padding: 9px 0;
  color: var(--steel);
  font-size: 11px;
  font-weight: 650;
  text-underline-offset: 4px;
}

.dialog-note {
  margin: 24px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 10px;
  line-height: 1.5;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 160;
  max-width: min(330px, calc(100vw - 36px));
  padding: 11px 14px;
  border: 1px solid var(--line-strong);
  background: #11151b;
  color: #eef0f2;
  font-size: 11px;
  line-height: 1.4;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 160ms ease, transform 160ms ease;
}

body.player-open .toast {
  bottom: calc(var(--player-height) + 14px);
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.noscript {
  position: fixed;
  right: 20px;
  bottom: 20px;
  left: 20px;
  z-index: 300;
  padding: 16px;
  background: #11151b;
  color: #fff;
}

@media (max-width: 720px) {
  :root {
    --player-height: 148px;
  }

  .backdrop {
    background-position: var(--backdrop-x, 68%) center;
    filter: saturate(0.74) contrast(1.1) brightness(0.56);
  }

  .backdrop-scrim {
    background:
      linear-gradient(0deg, rgba(3, 5, 8, 0.96) 0%, rgba(3, 5, 8, 0.44) 56%, rgba(3, 5, 8, 0.58) 100%),
      linear-gradient(90deg, rgba(3, 5, 8, 0.52), rgba(3, 5, 8, 0.1));
  }

  .disc-chrome {
    min-height: 72px;
    padding: max(12px, env(safe-area-inset-top)) 12px 8px;
  }

  .heat-logo {
    width: min(42vw, 156px);
    min-height: 25px;
  }

  .chrome-button {
    width: 40px;
    height: 40px;
  }

  .chrome-actions {
    gap: 0;
  }

  .feature-slide {
    justify-content: center;
    padding: 84px 56px 88px;
  }

  .feature-copy {
    width: 100%;
    margin-top: 10vh;
    text-align: center;
  }

  .feature-title {
    font-size: clamp(28px, 9.7vw, 42px);
    line-height: 1.02;
  }

  .feature-subtitle {
    margin: 17px auto 0;
    font-size: 15px;
    line-height: 1.43;
  }

  .feature-play {
    width: 52px;
    height: 52px;
    margin-top: 26px;
  }

  .chapter-arrow {
    top: 56%;
    width: 42px;
    height: 58px;
  }

  .chapter-arrow svg {
    width: 22px;
    height: 22px;
  }

  .chapter-previous {
    left: 4px;
  }

  .chapter-next {
    right: 4px;
  }

  .feature-dots {
    bottom: max(20px, env(safe-area-inset-bottom));
    gap: 7px;
  }

  .player {
    padding: 8px 12px max(9px, env(safe-area-inset-bottom));
  }

  .player-progress-row {
    grid-template-columns: 36px minmax(0, 1fr) 42px;
    gap: 6px;
  }

  .player-controls {
    display: grid;
    grid-template-columns: auto auto;
    gap: 4px 18px;
    justify-content: center;
    margin-top: 2px;
  }

  .transport {
    gap: 5px;
  }

  .player-tools {
    gap: 6px;
  }

  .icon-button {
    width: 32px;
    height: 36px;
  }

  .player-play {
    width: 42px;
    height: 42px;
  }

  .volume-control {
    gap: 4px;
  }

  .volume-control input {
    width: 46px;
  }

  .about-dialog {
    padding: 34px 28px 30px;
  }

  .toast {
    right: 12px;
    bottom: 12px;
    left: 12px;
    max-width: none;
  }

  body.player-open .toast {
    bottom: calc(var(--player-height) + 10px);
  }
}

@media (max-width: 350px) {
  .feature-slide {
    padding-right: 48px;
    padding-left: 48px;
  }

  .feature-title {
    font-size: clamp(26px, 9vw, 32px);
  }

  .feature-subtitle {
    font-size: 14px;
  }

  .player-controls {
    gap: 2px 10px;
  }

  .transport {
    gap: 2px;
  }

  .player-tools {
    gap: 3px;
  }

  .volume-control input {
    width: 34px;
  }
}

@media (max-height: 620px) {
  .disc-chrome {
    min-height: 62px;
  }

  .heat-logo {
    width: 128px;
  }

  .feature-copy {
    margin-top: 6vh;
  }

  .feature-title {
    font-size: clamp(25px, 8.5vw, 34px);
  }

  .feature-subtitle {
    margin-top: 13px;
    font-size: 13px;
  }

  .feature-play {
    width: 46px;
    height: 46px;
    margin-top: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

@media (prefers-contrast: more) {
  :root {
    --line: rgba(255, 255, 255, 0.42);
    --line-strong: rgba(255, 255, 255, 0.76);
    --muted: #d4d6d9;
    --faint: #b8bcc1;
  }

  .backdrop {
    filter: saturate(0.68) contrast(1.18) brightness(0.44);
  }
}
