@font-face {
  font-family: Playfair;
  src: url(playfair.ttf) format("truetype");
  font-display: swap;
}
:root {
  font-family: Playfair, Georgia, serif;
  color: #63243d;
  background: #f0e3cf;
  color-scheme: light;
  --program-seam: #f1e4cf;
}
* { box-sizing: border-box; }
body { margin: 0; }
html:has(.sound-choice[open]) { overflow: hidden; scrollbar-gutter: stable; }

.sound-choice {
  max-width: calc(100% - 2rem);
  padding: 1rem;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: center;
}
.sound-choice::backdrop { background: #f4e9d8e6; }
@supports (backdrop-filter: blur(1px)) {
  .sound-choice::backdrop {
    background: #f4e9d879;
    backdrop-filter: blur(26px);
  }
}
.sound-choice h2 {
  font-size: clamp(2.25rem, 5.1vw, 4.75rem);
  line-height: 1.02;
  text-wrap: balance;
}
.sound-choice-actions {
  display: flex;
  justify-content: center;
  gap: .85rem;
  margin-top: clamp(1.65rem, 4vw, 2.6rem);
}
.sound-choice-actions button {
  min-width: 5.7rem;
  min-height: 3rem;
  padding: .45rem 1.1rem;
  border: 1px solid #63243d;
  border-radius: 99px;
  background: #faf0dfa8;
  color: #63243d;
  font: 1.12rem Georgia, serif;
  cursor: pointer;
}
.sound-choice .with-sound { color: #fff5e8; background: #63243d; }
.sound-choice .with-sound:hover { background: #491b2d; }
.sound-choice .without-sound:hover { background: #faf0df; }
.journey { height: 512vh; height: 512svh; position: relative; }
.stage {
  --chapter: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  isolation: isolate;
  background:
    url("paper-grain.png?v=20261130-3") left bottom,
    linear-gradient(180deg, transparent 78%,
      color-mix(in srgb, var(--program-seam) calc(var(--chapter) * 100%), transparent) 99%),
    radial-gradient(ellipse at 59% 38%, #faf0df, #f3e6d2 63%, #e9d8bf);
}
.field { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.field.field-travels { position: fixed; z-index: 2; pointer-events: none; }
.opening-photo {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 30%, #901630, #590c23 58%, #260e17);
}
.opening-photo img {
  width: 100%; height: 100%; display: block;
  object-fit: cover; object-position: 50% 39%;
}
.opening-photo::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(0deg, #190910cc, transparent 38%, transparent 85%, #30081666);
}
.trio-navigation[data-portrait] .trio-mark::before { background: #fff1df; }
.trio-navigation[data-portrait] :is(.trio-mark, .scene-menu),
.stage[data-portrait] .chapter-link { color: #fff1df; }
.opening {
  position: absolute;
  z-index: 1;
  left: max(clamp(1.5rem, 5.2vw, 6rem), env(safe-area-inset-left));
  bottom: max(clamp(3.75rem, 9svh, 7rem), env(safe-area-inset-bottom));
  max-width: 90vw;
  color: #fff2df;
  pointer-events: none;
}
.trio-navigation {
  --nav-top: max(clamp(1rem, 4svh, 2.45rem), env(safe-area-inset-top));
}
.trio-mark {
  position: fixed;
  z-index: 6;
  top: var(--nav-top);
  left: max(clamp(1.1rem, 5.2vw, 6rem), env(safe-area-inset-left));
  width: clamp(5.15rem, 11vw, 10.1rem);
  aspect-ratio: 866 / 494;
  opacity: var(--mark-opacity, 1);
  pointer-events: none;
}
.scene-menu {
  position: fixed;
  z-index: 6;
  top: var(--nav-top);
  left: 50%;
  translate: -50% 0;
  color: #63243d;
  opacity: var(--mark-opacity, 1);
}
.scene-menu[data-dark] { color: #f8e5cb; }
.scene-menu[inert] { pointer-events: none; }
.scene-menu ul {
  display: flex;
  align-items: center;
  gap: clamp(.55rem, 1.65vw, 1.8rem);
  margin: 0;
  padding: 0;
  list-style: none;
}
.scene-menu a {
  display: flex;
  align-items: center;
  gap: .44rem;
  min-height: 2.5rem;
  color: inherit;
  font: clamp(.78rem, 1vw, 1.05rem)/1.1 Playfair, Georgia, serif;
  text-decoration: none;
  white-space: nowrap;
}
.scene-menu a::before {
  content: "";
  width: .32rem;
  height: .32rem;
  flex: none;
  border: 1px solid currentColor;
  border-radius: 50%;
  opacity: .60;
}
.scene-menu a[aria-current]::before {
  background: currentColor;
  opacity: 1;
  scale: 1.45;
}
.scene-menu a:hover::before { background: currentColor; opacity: 1; }
.scene-menu a:focus-visible { outline: 1px solid currentColor; outline-offset: 3px; border-radius: 3px; }
.scene-menu-current { display: none; }
.scene-menu[data-programs] { opacity: 1; color: #63243d; }
.scene-menu[data-programs]::before {
  content: ""; position: absolute; z-index: -1; inset: .15rem -.7rem;
  border-radius: 2rem; background: #faeedde8; pointer-events: none;
}
@media (min-width: 801px) {
  .scene-menu[data-programs] a[aria-current] { position: relative; }
  .scene-menu[data-programs] a[aria-current]::after {
    content: ""; position: absolute; inset: .28rem -.48rem;
    border: 1px solid currentColor; border-radius: 2rem; pointer-events: none;
  }
}
@media (max-width: 800px) {
  .scene-menu ul { gap: 0; }
  .scene-menu a { justify-content: center; width: clamp(1.7rem, 8vw, 2.4rem); min-height: 2rem; }
  .scene-menu a span {
    position: absolute;
    width: 1px;
    height: 1px;
    clip-path: inset(50%);
    overflow: hidden;
  }
  .scene-menu-current {
    display: block;
    margin: -.1rem 0 0;
    font: .85rem/1.1 Playfair, Georgia, serif;
    text-align: center;
  }
  .scene-menu[data-programs]::before { inset: .05rem -.45rem -.2rem; border-radius: .9rem; }
  .scene-menu[data-programs] .scene-menu-current {
    width: max-content; margin-inline: auto; padding: .2rem .55rem;
    border: 1px solid currentColor; border-radius: 2rem;
  }
}
@media (max-width: 560px) {
  .scene-menu { top: calc(var(--nav-top) + clamp(6.15rem, 25vw, 8rem) * .57 + .25rem); }
}
.trio-mark::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, #f8e5cb var(--mark-seam, 0px), #63243d var(--mark-seam, 0px));
  mask: url("media/trio-logo.jpg") center / contain no-repeat luminance;
}
h1, h2 { margin: 0; font-weight: 400; line-height: .94; letter-spacing: -.048em; }
h1 { font-size: clamp(2.6rem, 6.3vw, 7.5rem); }
h2 { font-size: clamp(2.4rem, 5.7vw, 6.6rem); }
.copy p {
  margin: .9rem 0 0;
  font: clamp(.94rem, 1.35vw, 1.3rem)/1.65 Georgia, serif;
  color: #fff0dc;
}
.sound {
  position: fixed;
  z-index: 10;
  right: max(1.5rem, env(safe-area-inset-right));
  bottom: max(1.5rem, env(safe-area-inset-bottom));
  width: clamp(3.25rem, 4.35vw, 4.35rem);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid currentColor;
  background: #f8efe7;
  color: #63243d;
  padding: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: color 170ms;
}
.sound[hidden] { display: none; }
.sound svg { position: relative; width: 38%; fill: currentColor; }
.sound:hover { color: #42172a; }
.sound-dust {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  animation: sound-orbit 12s linear infinite paused;
}
.sound[aria-pressed="true"] .sound-dust {
  animation-play-state: running;
}
@keyframes sound-orbit {
  to { transform: rotate(1turn); }
}
.sound.has-dust { border: 0; background: transparent; }
.sound.has-dust::before {
  position: absolute;
  inset: -15%;
  border-radius: inherit;
  background: radial-gradient(circle, #faf0df 18%, #faf0dfed 42%, #faf0df00 71%);
  content: "";
}
.sound[data-video-tone] { color: #f7e3c9; background: #422b34; border-color: #b2826e; }
.sound[data-video-tone]:hover { color: #fff3e1; }
.sound.has-dust[data-video-tone] { background: transparent; }
.sound.has-dust[data-video-tone]::before {
  inset: 0; background: #422b34; border: 1px solid #b2826e;
}
.sound[data-video-tone] .sound-dust { filter: brightness(0) invert(89%) sepia(25%) saturate(225%) hue-rotate(354deg); }
.pause, [aria-pressed="true"] .play { display: none; }
[aria-pressed="true"] .pause { display: inline; }
.sound:focus-visible, .chapter-link:focus-visible, .sound-choice button:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
.chapter-link {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: max(2rem, env(safe-area-inset-bottom));
  translate: -50% 0;
  width: 3rem;
  height: 3rem;
  color: inherit;
  display: grid;
  place-items: center;
  opacity: calc(1 - var(--chapter));
}
.chapter-link[hidden] { display: none; }
.chapter-link svg { width: 1.35rem; fill: none; stroke: currentColor; stroke-width: 1; }
.status {
  position: fixed;
  z-index: 9;
  left: 1.5rem;
  bottom: 1.5rem;
  margin: 0;
  font: .9rem Georgia, serif;
}
.status:not(:empty) { padding: .4rem .65rem; background: #f4e9d8; }
.scroll-stop { position: absolute; top: 100svh; }
@media (max-width: 700px) {
  .trio-mark {
    width: clamp(6.15rem, 25vw, 8rem);
    color: #63243d;
    filter: drop-shadow(.4px 0 currentColor) drop-shadow(-.4px 0 currentColor) drop-shadow(0 .35px currentColor);
  }
  .trio-mark[data-dark] { color: #f8e5cb; }
  h1 { font-size: clamp(2.4rem, 10vw, 4.3rem); }
  .copy p { margin-top: .8rem; }
  .chapter-link { bottom: max(1rem, env(safe-area-inset-bottom)); }
  .sound {
    right: max(1rem, env(safe-area-inset-right));
    bottom: max(1rem, env(safe-area-inset-bottom));
  }
}
@media (min-aspect-ratio: 1.85/1) {
  .opening-photo img { object-position: 50% 12%; }
}
@media (max-aspect-ratio: 1/1) {
  .opening-photo img { object-position: 50% 44%; }
  .opening { left: 6vw; right: 6vw; bottom: max(17svh, 6.75rem); text-align: center; }

}
@media (max-height: 500px) {
  .opening { bottom: max(5rem, env(safe-area-inset-bottom)); }
  .opening h1 { font-size: clamp(1.75rem, 8.3svh, 3.45rem); }
}
@media (prefers-reduced-motion: reduce) {
  .sound { transition: none; }
  .sound-dust { animation: none; }
}
