@font-face {
  font-family: "JetBrains Mono";
  src: url("assets/JetBrainsMono-Thin.woff2") format("woff2");
  font-weight: 100;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("assets/JetBrainsMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("assets/JetBrainsMono-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --chalk: #f3efe5;
  --chalk-muted: rgba(243, 239, 229, 0.62);
  --rule: rgba(243, 239, 229, 0.29);
  --blue: #06398f;
  --deep-blue: #061c4d;
  --charcoal: #303030;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100svh;
  overflow-x: hidden;
  background: var(--deep-blue);
  color: var(--chalk);
  font-family: "JetBrains Mono", "Courier New", monospace;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

.art,
.wash,
.grain {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
}

.art {
  z-index: -4;
  object-fit: cover;
  filter: saturate(0.96) contrast(1.05);
}

.wash {
  z-index: -3;
  background:
    linear-gradient(90deg, rgba(2, 17, 52, 0.89) 0%, rgba(2, 25, 71, 0.71) 48%, rgba(2, 32, 91, 0.42) 100%),
    linear-gradient(0deg, rgba(0, 16, 53, 0.74) 0%, transparent 45%, rgba(0, 18, 57, 0.28) 100%);
}

.grain {
  z-index: -2;
  pointer-events: none;
  opacity: 0.13;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.83' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.48'/%3E%3C/svg%3E");
}

body.is-choosing {
  overflow: hidden;
}

.choice-modal {
  position: fixed;
  z-index: 20;
  inset: 0;
  padding: clamp(10px, 2.4vw, 28px);
  overflow: auto;
  background: rgba(1, 16, 49, 0.76);
  backdrop-filter: blur(13px);
}

.choice-frame {
  width: min(100%, 1180px);
  min-height: calc(100svh - clamp(20px, 4.8vw, 56px));
  margin: 0 auto;
  border: 1px solid var(--rule);
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: rgba(3, 30, 83, 0.68);
  box-shadow: 0 28px 100px rgba(0, 7, 29, 0.28);
}

.choice-masthead,
.choice-footer {
  min-height: 72px;
  padding: 0 clamp(22px, 4vw, 52px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--chalk-muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.13em;
}

.choice-masthead {
  border-bottom: 1px solid var(--rule);
}

.choice-masthead img {
  display: block;
  width: 102px;
  height: auto;
}

.choice-back {
  min-height: 44px;
  padding: 0;
  border: 0;
  color: var(--chalk-muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  background: transparent;
  cursor: pointer;
}

.choice-back:hover,
.choice-back:focus-visible {
  color: var(--chalk);
}

.choice-back:focus-visible {
  outline: 1px solid var(--chalk);
  outline-offset: 5px;
}

.choice-footer {
  border-top: 1px solid var(--rule);
}

.choice-panel {
  width: min(100%, 980px);
  margin: auto;
  padding: clamp(42px, 6.5vh, 76px) clamp(24px, 5vw, 62px);
}

.choice-eyebrow {
  margin: 0;
  color: var(--chalk-muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
}

.choice-panel h2 {
  max-width: 850px;
  margin: 28px 0 24px;
  font-size: clamp(42px, 6.6vw, 88px);
  font-weight: 100;
  line-height: 0.98;
  letter-spacing: -0.055em;
  text-transform: uppercase;
}

.choice-intro {
  max-width: 650px;
  margin: 0;
  color: rgba(243, 239, 229, 0.82);
  font-size: 13px;
  line-height: 1.9;
}

.season-grid {
  margin-top: clamp(34px, 6vh, 68px);
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.season {
  min-height: 116px;
  padding: 24px 26px;
  border: 0;
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 8px;
  color: var(--chalk-muted);
  text-align: left;
  background: transparent;
  cursor: pointer;
  transition: color 180ms ease, background 180ms ease;
}

.season:nth-child(odd) {
  border-right: 1px solid var(--rule);
}

.season:hover,
.season:focus-visible {
  color: var(--chalk);
  background: rgba(243, 239, 229, 0.07);
}

.season:focus-visible {
  outline: 1px solid var(--chalk);
  outline-offset: -5px;
}

.season-number,
.season-duration {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.09em;
}

.season-name {
  font-size: clamp(16px, 2vw, 24px);
  font-weight: 100;
  letter-spacing: -0.025em;
  text-transform: uppercase;
}

.choice-law {
  max-width: 700px;
  margin: 30px 0 0;
  color: var(--chalk-muted);
  font-size: 11px;
  line-height: 1.9;
}

.choice-confirm {
  width: min(100%, 780px);
}

.confirm-actions {
  margin-top: 48px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.confirm-primary,
.confirm-secondary {
  min-height: 48px;
  padding: 0 28px;
  border: 1px solid rgba(243, 239, 229, 0.62);
  color: var(--chalk);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  background: transparent;
  cursor: pointer;
}

.confirm-primary:hover,
.confirm-primary:focus-visible {
  color: var(--deep-blue);
  background: var(--chalk);
}

.confirm-secondary {
  border-color: transparent;
  color: var(--chalk-muted);
}

.confirm-secondary:hover,
.confirm-secondary:focus-visible {
  color: var(--chalk);
}

.choice-status {
  min-height: 1.8em;
  margin: 24px 0 0;
  color: var(--chalk-muted);
  font-size: 11px;
  line-height: 1.8;
}

.room {
  width: min(100% - 32px, 1440px);
  min-height: 100svh;
  margin: 0 auto;
  border-inline: 1px solid var(--rule);
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.masthead {
  min-height: 90px;
  padding: 0 clamp(22px, 4vw, 58px);
  border-block: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.masthead a,
.masthead img {
  display: block;
}

.masthead img {
  width: clamp(92px, 8vw, 116px);
  height: auto;
}

.edition,
.eyebrow,
.maker,
.label,
.time,
.chapter,
.ritual {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.13em;
}

.edition {
  color: var(--chalk-muted);
}

.release {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(390px, 0.92fr);
  min-height: calc(100svh - 154px);
}

.release-copy,
.player {
  padding: clamp(48px, 7vw, 112px) clamp(28px, 6vw, 88px);
}

.release-copy {
  border-right: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.eyebrow,
.maker,
.label {
  margin: 0;
  color: var(--chalk-muted);
}

.release-intro {
  max-width: 520px;
  margin: 30px 0 0;
  color: rgba(243, 239, 229, 0.76);
  font-size: 12px;
  line-height: 1.9;
}

h1 {
  margin: clamp(34px, 6vh, 78px) 0 clamp(36px, 7vh, 82px);
  font-size: clamp(56px, 8.5vw, 138px);
  font-weight: 100;
  line-height: 0.88;
  letter-spacing: -0.07em;
}

.player {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto auto auto;
  align-content: center;
  gap: 42px 34px;
  background: rgba(3, 24, 70, 0.26);
  backdrop-filter: blur(4px);
}

.now-playing {
  grid-column: 1 / -1;
}

.track-title {
  margin: 18px 0 8px;
  font-size: clamp(25px, 3vw, 42px);
  font-weight: 100;
  line-height: 1.06;
  text-transform: uppercase;
}

.track-note {
  margin: 0;
  color: var(--chalk-muted);
  font-size: 13px;
  line-height: 1.7;
}

.play {
  position: relative;
  width: 76px;
  height: 76px;
  padding: 0;
  border: 1px solid rgba(243, 239, 229, 0.72);
  border-radius: 50%;
  background: rgba(3, 28, 82, 0.2);
  color: var(--chalk);
  cursor: pointer;
  transition: background 220ms ease, color 220ms ease, transform 220ms ease;
}

.play:hover {
  background: var(--chalk);
  color: var(--deep-blue);
  transform: scale(1.03);
}

.play:focus-visible,
.chapter:focus-visible,
#seek:focus-visible {
  outline: 2px solid var(--chalk);
  outline-offset: 4px;
}

.play svg {
  position: absolute;
  inset: 19px;
  width: 36px;
  height: 36px;
  fill: currentColor;
}

.pause-icon,
.play.is-playing .play-icon {
  display: none;
}

.play.is-playing .pause-icon {
  display: block;
}

.timeline {
  min-width: 0;
  align-self: center;
}

#seek {
  width: 100%;
  height: 18px;
  margin: 0;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

#seek::-webkit-slider-runnable-track {
  height: 1px;
  background: linear-gradient(90deg, var(--chalk) var(--played, 0%), var(--rule) var(--played, 0%));
}

#seek::-moz-range-track {
  height: 1px;
  background: var(--rule);
}

#seek::-moz-range-progress {
  height: 1px;
  background: var(--chalk);
}

#seek::-webkit-slider-thumb {
  width: 9px;
  height: 9px;
  margin-top: -4px;
  appearance: none;
  border: 0;
  border-radius: 50%;
  background: var(--chalk);
}

#seek::-moz-range-thumb {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 50%;
  background: var(--chalk);
}

.time {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  color: var(--chalk-muted);
  letter-spacing: 0.07em;
}

.status {
  grid-column: 1 / -1;
  min-height: 1.7em;
  margin: -20px 0 0;
  color: var(--chalk-muted);
  font-size: 12px;
  line-height: 1.7;
}

.chapters {
  grid-column: 1 / -1;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
  list-style: none;
}

.chapter {
  width: 100%;
  min-height: 66px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  color: var(--chalk-muted);
  text-align: left;
  text-transform: uppercase;
  background: transparent;
  cursor: pointer;
  transition: color 180ms ease, padding 180ms ease;
}

.chapter:hover,
.chapter.is-current {
  color: var(--chalk);
}

.chapter.is-current {
  padding-left: 12px;
}

.chapter-name {
  letter-spacing: 0.09em;
}

.chapter-time {
  letter-spacing: 0.05em;
}

.ritual {
  min-height: 64px;
  padding: 0 clamp(22px, 4vw, 58px);
  border-block: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--chalk-muted);
}

.ritual-notes {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.art-credit {
  margin-left: clamp(28px, 5vw, 72px);
  padding-left: clamp(28px, 5vw, 72px);
  border-left: 1px solid var(--rule);
  color: var(--chalk-muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color 180ms ease;
}

.art-credit:hover,
.art-credit:focus-visible {
  color: var(--chalk);
}

@media (max-width: 820px) {
  .choice-modal {
    padding: 10px;
  }

  .choice-frame {
    min-height: calc(100svh - 20px);
  }

  .choice-masthead,
  .choice-footer {
    min-height: 62px;
    padding-inline: 20px;
    font-size: 8px;
  }

  .choice-panel {
    padding: 38px 20px;
  }

  .choice-panel h2 {
    font-size: clamp(40px, 13vw, 62px);
  }

  .season-grid {
    grid-template-columns: 1fr;
    margin-top: 36px;
  }

  .season {
    min-height: 75px;
    padding: 15px 12px;
  }

  .season:nth-child(odd) {
    border-right: 0;
  }

  .season-name {
    font-size: 17px;
  }

  .confirm-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .confirm-primary,
  .confirm-secondary {
    width: 100%;
  }

  .room {
    width: calc(100% - 20px);
  }

  .masthead {
    min-height: 76px;
  }

  .edition {
    font-size: 9px;
  }

  .release {
    display: block;
    min-height: auto;
  }

  .release-copy {
    min-height: 44svh;
    border-right: 0;
    border-bottom: 1px solid var(--rule);
    justify-content: flex-end;
  }

  .release-copy,
  .player {
    padding: 44px 26px;
  }

  h1 {
    margin: 34px 0 40px;
    font-size: clamp(59px, 20vw, 94px);
  }

  .player {
    min-height: 52svh;
    gap: 32px 22px;
  }

  .ritual {
    min-height: 74px;
    gap: 10px;
    font-size: 8px;
    letter-spacing: 0.08em;
  }

  .ritual-notes {
    display: none;
  }

  .art-credit {
    margin-left: 0;
    padding-left: 0;
    border-left: 0;
  }
}

@media (max-width: 600px) {
  .choice-modal {
    padding: 8px;
    overscroll-behavior: contain;
  }

  .choice-frame {
    min-height: calc(100dvh - 16px);
  }

  .choice-masthead,
  .choice-footer {
    min-height: 44px;
    padding-inline: 16px;
  }

  .choice-masthead img {
    width: 82px;
  }

  .choice-back {
    font-size: 9px;
    letter-spacing: 0.03em;
  }

  .choice-panel {
    padding: 20px 16px;
  }

  .choice-panel h2 {
    margin: 16px 0 14px;
    font-size: clamp(30px, 8.5vw, 39px);
    line-height: 1.04;
  }

  .choice-intro {
    font-size: 11px;
    line-height: 1.6;
  }

  .season-grid {
    margin-top: 20px;
  }

  .season {
    min-height: 56px;
    padding: 10px 8px;
    grid-template-columns: 32px 1fr auto;
  }

  .season-name {
    font-size: 15px;
  }

  .choice-law {
    margin-top: 16px;
    font-size: 10px;
    line-height: 1.5;
  }

  .masthead {
    min-height: 56px;
  }

  .release-copy,
  .player {
    padding: 16px 24px;
  }

  .release-copy {
    min-height: 0;
  }

  h1 {
    margin: 14px 0 14px;
    font-size: clamp(46px, 12vw, 58px);
  }

  .release-intro {
    margin-top: 10px;
    line-height: 1.65;
  }

  .player {
    min-height: 0;
    gap: 16px 18px;
  }

  .play {
    width: 64px;
    height: 64px;
  }

  .play svg {
    inset: 14px;
  }

  .chapter {
    min-height: 52px;
  }

  .ritual {
    min-height: 38px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .art {
    display: none;
  }

  body {
    background: var(--deep-blue) url("assets/rose-open-still.jpg") center / cover fixed no-repeat;
  }

  .play,
  .chapter {
    transition: none;
  }
}
