:root {
  color-scheme: dark;
  --ink: #fff5ed;
  --muted: #f0cfc5;
  --accent: #ffb8a3;
  --lyric-highlight: #ffdd70;
  font-family: system-ui, sans-serif;
  color: var(--ink);
  background: #210e10;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
.hero {
  min-height: 100svh;
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  padding: 6rem 1rem 3rem;
  background: #5f1018;
}
.hero::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background:
    linear-gradient(180deg, #210206ee 0%, #6f061a35 38%, #4a060a26 63%, #21060de8 100%),
    radial-gradient(ellipse at 50% 42%, #ff392800, #b51c24a6 85%),
    url("assets/KiutCover4.png") center 36% / cover no-repeat;
}
.brand {
  position: absolute;
  top: 1.6rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: .82rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  font-weight: 700;
  white-space: nowrap;
}
.brand span { color: var(--accent); margin-right: .35rem; }
.card {
  width: min(100%, 37rem);
  padding: clamp(1rem, 5vw, 2.25rem);
  border: 1px solid #ffe9df65;
  border-radius: clamp(1.5rem, 6vw, 2.6rem);
  background: linear-gradient(145deg, #491719de, #200d10e6 60%, #771f25dc);
  box-shadow: 0 1.5rem 4rem #17020780, inset 0 1px 1px #fff3e6a0, inset 0 0 1.4rem #ffe0d51c;
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .card {
    background:
      radial-gradient(ellipse at top left, #ffe8dc3d, transparent 63%),
      linear-gradient(140deg, #5c3a443b, #20121966 66%, #59313f38);
    -webkit-backdrop-filter: blur(12px) saturate(125%);
    backdrop-filter: blur(12px) saturate(125%);
  }
}
.track {
  display: grid;
  grid-template-columns: clamp(4.25rem, 23vw, 8rem) minmax(0, 1fr);
  align-items: center;
  gap: clamp(.8rem, 4vw, 1.6rem);
}
.sleeve { display: block; width: 100%; border-radius: 19%; box-shadow: 0 .5rem 1rem #16050977; }
.recipient {
  margin: 0 0 .4rem;
  color: var(--accent);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .085em;
  text-transform: uppercase;
}
h1 { margin: 0; font: 400 clamp(1.55rem, 5.2vw, 2.8rem)/1.02 Georgia, serif; text-wrap: balance; }
.artist { margin: .4rem 0 0; color: var(--muted); font-size: .875rem; }
.player { margin-top: 1.25rem; }
audio { display: block; width: 100%; }
/* The trace is decorative. The native slider handles touch and keyboard input. */
.seek-wrap {
  position: relative;
  --seek-thumb-size: 26px;
}
.heartbeat {
  position: absolute;
  inset: 0 calc(var(--seek-thumb-size) / 2);
  background: linear-gradient(90deg, var(--accent) var(--progress, 0%), #fff0e96b var(--progress, 0%));
  pointer-events: none;
  clip-path: polygon(
    0 47%, 9% 47%, 12% 38%, 15% 47%, 19% 47%, 22% 62%, 26% 13%,
    30% 79%, 33% 47%, 40% 47%, 44% 36%, 48% 47%, 57% 47%,
    60% 38%, 63% 47%, 67% 47%, 70% 62%, 74% 13%, 78% 79%,
    81% 47%, 88% 47%, 92% 36%, 96% 47%, 100% 47%,
    100% 53%, 96% 53%, 92% 42%, 88% 53%, 81.6% 53%, 77.9% 89%,
    74% 24%, 70.2% 72%, 66.7% 53%, 62.7% 53%, 60% 44%, 57.3% 53%,
    47.7% 53%, 44% 42%, 40.3% 53%, 33.6% 53%, 29.9% 89%,
    26% 24%, 22.2% 72%, 18.7% 53%, 14.7% 53%, 12% 44%, 9.3% 53%, 0 53%
  );
}
.heart-marker-rail {
  position: absolute;
  inset: 0 calc(var(--seek-thumb-size) / 2);
  pointer-events: none;
  filter: drop-shadow(0 0 3px #ffbaabbd) drop-shadow(0 0 7px #fc73866b);
}
.heart-marker {
  position: absolute;
  top: 50%;
  left: var(--progress, 0%);
  width: var(--seek-thumb-size);
  height: var(--seek-thumb-size);
  background: var(--accent);
  clip-path: path("M13 23 C10 20 2 15 2 8 C2 2 10 0 13 6 C16 0 24 2 24 8 C24 15 16 20 13 23 Z");
  transform: translate(-50%, -50%);
}
@media (prefers-reduced-motion: no-preference) {
  .seek-wrap[data-pulsing] .heart-marker-rail {
    animation: heart-glow 1.15s ease-in-out infinite;
  }
  .seek-wrap[data-pulsing] .heart-marker {
    animation: heart-pulse 1.15s ease-in-out infinite;
  }
}
@keyframes heart-glow {
  0%, 24%, 51%, 100% {
    filter: drop-shadow(0 0 3px #ffbaabbd) drop-shadow(0 0 7px #fc73866b);
  }
  14% {
    filter: drop-shadow(0 0 5px #ffcfb8f0) drop-shadow(0 0 12px #ff738bbb);
  }
  36% {
    filter: drop-shadow(0 0 4px #ffc1abe0) drop-shadow(0 0 9px #ff738b96);
  }
}
@keyframes heart-pulse {
  0%, 24%, 51%, 100% { transform: translate(-50%, -50%) scale(1); }
  14% { transform: translate(-50%, -50%) scale(1.24); }
  36% { transform: translate(-50%, -50%) scale(1.13); }
}
#seek {
  position: relative;
  appearance: none;
  -webkit-appearance: none;
  display: block;
  width: 100%;
  height: 2.75rem;
  margin: 0;
  background: transparent;
  cursor: pointer;
}
#seek:disabled { cursor: default; opacity: .6; }
#seek::-webkit-slider-runnable-track {
  height: .33rem;
  border-radius: 1rem;
  background: transparent;
}
#seek::-moz-range-track {
  height: .33rem;
  border-radius: 1rem;
  background: transparent;
}
#seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: var(--seek-thumb-size);
  height: var(--seek-thumb-size);
  margin-top: calc(.165rem - 13px);
  border: 0;
  background: transparent;
}
#seek::-moz-range-thumb {
  width: var(--seek-thumb-size);
  height: var(--seek-thumb-size);
  border: 0;
  background: transparent;
}
.times { display: flex; justify-content: space-between; color: var(--muted); font-size: .8rem; font-variant-numeric: tabular-nums; }
.controls { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; margin-top: .85rem; }
.round, .download {
  display: inline-grid;
  place-items: center;
  min-height: 2.75rem;
  color: var(--ink);
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}
.round { width: 2.75rem; border: 1px solid #ffe1d42e; border-radius: 50%; background: #ffddd72b; font-size: 1.2rem; }
.round.primary { border-color: transparent; background: var(--accent); color: #30090f; }
.round:disabled { opacity: .5; cursor: default; }
.round:not(:disabled):hover, .download:hover { filter: brightness(1.18); }
.play-icon { border-block: .43rem solid transparent; border-left: .68rem solid currentColor; margin-left: .15rem; }
.play-icon.playing { width: .73rem; height: .86rem; margin: 0; border: 0; border-inline: .22rem solid currentColor; }
.download {
  margin-left: auto;
  width: 2.75rem;
  border: 1px solid #ffe1d42e;
  border-radius: 2rem;
  background: #26090de8;
}
.download-icon {
  position: relative;
  width: 1.1rem;
  height: 1.1rem;
  border-bottom: 2px solid currentColor;
}
.download-icon::before {
  content: "";
  position: absolute;
  top: 0;
  left: calc(50% - 1px);
  height: .68rem;
  border-left: 2px solid currentColor;
}
.download-icon::after {
  content: "";
  position: absolute;
  top: .33rem;
  left: 50%;
  width: .42rem;
  height: .42rem;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  transform: translateX(-50%) rotate(45deg);
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
blockquote { margin: 1.25rem 0 0; padding-top: 1rem; border-top: 1px solid #ffe1d433; }
blockquote p { margin: 0 0 .35rem; font-size: .875rem; line-height: 1.45; }
blockquote footer, .status, .hint { color: var(--muted); font-size: .875rem; line-height: 1.45; }
/* Align both copies of the artwork so the figure can sit in front of the words. */
.hero {
  --scene-art: url("assets/KiutCover4.png");
  place-items: end center;
  padding-top: clamp(21rem, 56svh, 40rem);
}
.hero::before {
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(180deg, #20070988, transparent 18%, transparent 66%, #21090e60 100%);
}
.lyric-scene {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: -1;
  background: #391618;
}
/* Keep a soft continuation of the artwork underneath the player on tall screens. */
.lyric-scene::before {
  content: "";
  position: absolute;
  inset: 27% 0 0;
  background: var(--scene-art) center 75% / cover no-repeat;
  opacity: .52;
  filter: brightness(.68) saturate(.78);
  mask-image: linear-gradient(transparent, #000 62%);
}
.scene-photo, .scene-subject {
  position: absolute;
  top: clamp(2.75rem, 8svh, 5rem);
  left: 50%;
  width: clamp(29rem, 116vw, 51rem);
  aspect-ratio: 1;
  transform: translateX(-50%);
  background: var(--scene-art) center / 100% no-repeat;
}
.scene-photo {
  opacity: .72;
  filter: saturate(.82) brightness(.68);
  mask-image: linear-gradient(transparent 1%, #000 19%, #000 69%, transparent 100%);
}
.scene-subject {
  clip-path: polygon(
    45.4% 27%, 48.4% 27%, 48.4% 24.4%, 49.2% 22.7%, 51% 21%,
    53.5% 20%, 56.1% 20.8%, 58.1% 22.7%, 59% 24.8%, 59% 27%,
    60.8% 27%, 60.8% 37.4%, 62.4% 38.2%, 64.1% 40.2%, 66.5% 44%,
    68.3% 48.6%, 68% 52%, 67.2% 54.3%, 69.2% 57%, 70.2% 60%,
    70.2% 68%, 69.7% 78%, 69.8% 81%, 68.6% 83.5%, 68% 86.2%,
    68.2% 88.1%, 66% 89.4%, 62% 89.8%, 60% 88.5%, 59% 85%,
    58.1% 81%, 57.8% 77%, 58.8% 71.2%, 60.2% 64.2%, 57% 65%,
    49% 65.7%, 46.9% 65.2%, 46.5% 69%, 47% 75.5%, 48% 81%,
    47.5% 86.4%, 47.2% 88.7%, 44.1% 90.3%, 39.4% 90.4%, 37.2% 89.6%,
    37.4% 86%, 36.4% 83.7%, 35.8% 80.8%, 34% 83.7%, 31% 85%,
    25.7% 85.2%, 21.3% 83.8%, 18.8% 80.6%, 17.8% 77%, 18.4% 73.9%,
    20% 70.5%, 22% 66.6%, 22.5% 62%, 23.8% 59%, 26.3% 57.5%,
    29.2% 57.1%, 31% 45.1%, 30% 43.8%, 30% 41.8%, 31.2% 39%,
    31.9% 36%, 32% 32.5%, 33% 31.2%, 36.7% 31.8%, 37.2% 33.4%,
    36.8% 36.2%, 35.5% 39.3%, 35.1% 43.9%, 37.4% 45.8%,
    39.4% 42.3%, 41.2% 38.2%, 43.5% 36.8%, 45.4% 36%
  );
  filter: saturate(.9) contrast(1.05);
}
.scene-words {
  position: absolute;
  inset: clamp(4.6rem, 12svh, 8rem) 0 auto;
  width: min(100% - 2.5rem, 44rem);
  margin-inline: auto;
  color: #fff;
  text-shadow: 0 .15em .65em #1a0009cc;
  font-size: clamp(2.2rem, 7.8vw, 5rem);
  font-weight: 950;
  line-height: .91;
  letter-spacing: -.045em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
.scene-words span { display: block; text-wrap: balance; }
.scene-words span + span { margin-top: .17em; }
.scene-words[data-singing][data-first-line] span:first-child,
.scene-words[data-singing]:not([data-first-line]) span:last-child {
  color: var(--lyric-highlight);
}
.brand, .card { z-index: 1; }
@media (min-width: 46rem) {
  .hero { padding-bottom: 2rem; }
  .scene-words { transform: rotate(-3deg); }
}
