:root {
  color-scheme: light;
  --ink: #241f21;
  --muted: #695d63;
  --paper: #fffaf6;
  --white: #ffffff;
  --rose: #e85d75;
  --rose-dark: #b93c57;
  --peach: #ffb084;
  --sage: #8fb49c;
  --sky: #7eb8d8;
  --lilac: #b58ac8;
  --line: rgba(36, 31, 33, 0.14);
  --shadow: 0 18px 50px rgba(50, 31, 38, 0.18);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    linear-gradient(135deg, rgba(255, 176, 132, 0.28), rgba(126, 184, 216, 0.24) 45%, rgba(143, 180, 156, 0.26)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.34) 0 1px, transparent 1px 22px),
    var(--paper);
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.42) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.42) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
}

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

a {
  color: inherit;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.page-petals {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.page-petals span {
  position: absolute;
  top: -48px;
  left: calc(var(--left, 10) * 1%);
  width: 18px;
  height: 24px;
  border-radius: 60% 40% 65% 35%;
  background: rgba(232, 93, 117, 0.24);
  animation: petalFall var(--speed, 16s) linear infinite;
  transform: rotate(var(--tilt, 15deg));
}

.page-petals span:nth-child(1) { --left: 8; --speed: 18s; --tilt: 12deg; animation-delay: -3s; }
.page-petals span:nth-child(2) { --left: 18; --speed: 22s; --tilt: -24deg; animation-delay: -12s; background: rgba(126, 184, 216, 0.22); }
.page-petals span:nth-child(3) { --left: 28; --speed: 17s; --tilt: 35deg; animation-delay: -7s; }
.page-petals span:nth-child(4) { --left: 42; --speed: 24s; --tilt: -8deg; animation-delay: -16s; background: rgba(143, 180, 156, 0.25); }
.page-petals span:nth-child(5) { --left: 53; --speed: 20s; --tilt: 18deg; animation-delay: -4s; }
.page-petals span:nth-child(6) { --left: 64; --speed: 26s; --tilt: -30deg; animation-delay: -19s; background: rgba(181, 138, 200, 0.22); }
.page-petals span:nth-child(7) { --left: 74; --speed: 19s; --tilt: 25deg; animation-delay: -10s; }
.page-petals span:nth-child(8) { --left: 84; --speed: 23s; --tilt: -18deg; animation-delay: -6s; background: rgba(255, 176, 132, 0.24); }
.page-petals span:nth-child(9) { --left: 92; --speed: 21s; --tilt: 40deg; animation-delay: -14s; }
.page-petals span:nth-child(10) { --left: 36; --speed: 25s; --tilt: -36deg; animation-delay: -21s; background: rgba(126, 184, 216, 0.2); }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 12px 22px;
  background: rgba(255, 250, 246, 0.82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand,
.topbar__nav {
  display: flex;
  align-items: center;
}

.brand {
  gap: 9px;
  font-weight: 800;
  text-decoration: none;
}

.brand__mark {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: var(--white);
  background: var(--rose);
  border-radius: var(--radius);
  box-shadow: 0 8px 18px rgba(232, 93, 117, 0.28);
}

.topbar__nav {
  justify-content: center;
  gap: 6px;
}

.topbar__nav a {
  padding: 8px 10px;
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.95rem;
  text-decoration: none;
  transition: color 180ms ease, background 180ms ease;
}

.topbar__nav a:hover,
.topbar__nav a:focus-visible {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  outline: none;
}

.icon-button,
.button,
.file-button {
  min-height: 44px;
  border: 0;
  border-radius: var(--radius);
  color: var(--white);
  background: var(--ink);
  box-shadow: 0 12px 28px rgba(36, 31, 33, 0.16);
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.icon-button:hover,
.button:hover,
.file-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(36, 31, 33, 0.2);
}

.icon-button:focus-visible,
.button:focus-visible,
.file-button:focus-within {
  outline: 3px solid rgba(126, 184, 216, 0.55);
  outline-offset: 3px;
}

.music-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  background: var(--rose);
}

.music-button__glyph {
  position: relative;
  width: 14px;
  height: 16px;
  border-left: 5px solid var(--white);
  border-right: 5px solid var(--white);
}

.music-button[aria-pressed="false"] .music-button__glyph {
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 13px solid var(--white);
  border-right: 0;
}

.hero {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 92svh;
  grid-template-columns: minmax(280px, 0.92fr) minmax(320px, 1fr);
  align-items: center;
  gap: 48px;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 54px 0 40px;
}

.hero__image {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero__image::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(to top, rgba(36, 31, 33, 0.3), transparent 48%);
}

.hero__image img {
  width: 100%;
  height: 100%;
  min-height: 620px;
  object-fit: cover;
}

.hero__content {
  position: relative;
  padding: 16px 0;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--rose-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  max-width: 760px;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.04;
  letter-spacing: 0;
}

h1 {
  font-size: 4rem;
}

h2 {
  font-size: 2.25rem;
}

.hero__lead {
  max-width: 620px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 1.14rem;
  line-height: 1.72;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 154px;
  padding: 0 18px;
  font-weight: 800;
  text-decoration: none;
  background: linear-gradient(135deg, var(--rose), var(--peach));
}

.button--quiet {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
}

.hero__stamp {
  position: absolute;
  right: 20px;
  bottom: 22px;
  width: 210px;
  margin: 0;
  padding: 10px 10px 14px;
  background: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: var(--radius);
  box-shadow: 0 16px 42px rgba(36, 31, 33, 0.18);
  transform: rotate(3deg);
  animation: photoFloat 5.4s ease-in-out infinite;
}

.hero__stamp img {
  aspect-ratio: 4 / 5;
  width: 100%;
  object-fit: contain;
  background:
    linear-gradient(135deg, rgba(255, 176, 132, 0.2), rgba(126, 184, 216, 0.16)),
    var(--paper);
  border-radius: 6px;
}

.hero__stamp figcaption {
  margin-top: 9px;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

.section-band,
.song-section {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto 28px;
  padding: 70px 0;
}

.section-heading {
  display: grid;
  gap: 6px;
  margin-bottom: 28px;
}

.section-heading time,
.section-heading > p:not(.eyebrow) {
  color: var(--muted);
}

.timer-section {
  padding-top: 36px;
}

.timer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.timer-tile {
  display: grid;
  min-height: 132px;
  place-items: center;
  padding: 18px;
  color: var(--white);
  background: var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.timer-tile:nth-child(2) {
  background: var(--rose-dark);
}

.timer-tile:nth-child(3) {
  background: #3f7f95;
}

.timer-tile:nth-child(4) {
  background: #52705c;
}

.timer-tile strong {
  font-size: 3rem;
  line-height: 1;
}

.timer-tile span {
  font-weight: 800;
}

.song-section {
  display: grid;
  grid-template-columns: minmax(260px, 0.82fr) minmax(300px, 1fr);
  align-items: center;
  gap: 28px;
  padding: 44px 0 66px;
}

.song-copy p:not(.eyebrow) {
  max-width: 540px;
  color: var(--muted);
  line-height: 1.68;
}

.player-panel {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  min-height: 160px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.record {
  display: grid;
  width: 112px;
  height: 112px;
  place-items: center;
  background:
    radial-gradient(circle, var(--paper) 0 12px, var(--rose) 13px 18px, transparent 19px),
    repeating-radial-gradient(circle, #262022 0 7px, #3a3033 8px 10px);
  border-radius: 50%;
  box-shadow: inset 0 0 0 8px rgba(255, 255, 255, 0.08);
}

.record span {
  width: 18px;
  height: 18px;
  background: var(--paper);
  border-radius: 50%;
}

body.is-music-playing .record {
  animation: spin 4s linear infinite;
}

.player-panel__body {
  display: grid;
  gap: 7px;
}

.player-panel__body strong {
  font-size: 1.18rem;
}

.player-panel__body span {
  color: var(--muted);
}

.visualizer {
  display: flex;
  align-items: end;
  gap: 5px;
  height: 28px;
}

.visualizer i {
  width: 7px;
  height: 9px;
  background: var(--rose);
  border-radius: 3px 3px 0 0;
  transform-origin: bottom;
}

body.is-music-playing .visualizer i {
  animation: barDance 900ms ease-in-out infinite;
}

.visualizer i:nth-child(2) { animation-delay: 100ms; background: var(--sky); }
.visualizer i:nth-child(3) { animation-delay: 200ms; background: var(--sage); }
.visualizer i:nth-child(4) { animation-delay: 300ms; background: var(--peach); }
.visualizer i:nth-child(5) { animation-delay: 400ms; background: var(--lilac); }

.file-button {
  position: relative;
  display: grid;
  min-width: 58px;
  padding: 0 13px;
  place-items: center;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  font-weight: 800;
}

.file-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.gallery-grid {
  columns: 4 220px;
  column-gap: 14px;
}

.photo-card {
  position: relative;
  display: block;
  width: 100%;
  margin: 0 0 14px;
  padding: 0;
  border: 0;
  overflow: hidden;
  break-inside: avoid;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}

.photo-card img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 520ms ease;
}

.photo-card::after {
  position: absolute;
  inset: auto 0 0;
  min-height: 46%;
  content: "";
  background: linear-gradient(to top, rgba(36, 31, 33, 0.72), transparent);
  opacity: 0;
  transition: opacity 220ms ease;
}

.photo-card span {
  position: absolute;
  right: 14px;
  bottom: 14px;
  left: 14px;
  z-index: 1;
  color: var(--white);
  font-weight: 800;
  text-align: left;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 220ms ease, transform 220ms ease;
}

.photo-card:hover img,
.photo-card:focus-visible img {
  transform: scale(1.045);
}

.photo-card:hover::after,
.photo-card:hover span,
.photo-card:focus-visible::after,
.photo-card:focus-visible span {
  opacity: 1;
  transform: translateY(0);
}

.photo-card:focus-visible {
  outline: 3px solid rgba(232, 93, 117, 0.42);
  outline-offset: 3px;
}

.letter-section {
  padding-bottom: 100px;
}

.letter-frame {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.letter-sheet {
  max-width: 860px;
  margin: 0 auto;
  padding: 54px;
  background:
    linear-gradient(90deg, rgba(232, 93, 117, 0.12) 0 4px, transparent 4px),
    linear-gradient(var(--white), var(--white));
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.curtain {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  touch-action: none;
  cursor: grab;
}

.curtain-fabric {
  flex: 1;
  width: 100%;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.14) 0 18px, rgba(0, 0, 0, 0.05) 18px 36px),
    linear-gradient(160deg, var(--peach), var(--rose) 55%, var(--rose-dark));
  box-shadow: inset 0 -30px 40px -20px rgba(0, 0, 0, 0.25);
}

.curtain-handle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 18px 0 24px;
  color: var(--white);
  background: var(--rose-dark);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.8rem;
}

.handle-arrow {
  font-size: 1.4rem;
  animation: handleBounce 1.6s ease-in-out infinite;
}

.curtain.is-opened {
  transform: translateY(-100%);
  pointer-events: none;
}

.curtain.is-animated {
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.curtain.is-dragging {
  transition: none;
}

@keyframes handleBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

.letter-kicker,
.signature {
  margin: 0;
  color: var(--rose-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.6rem;
}

.letter-text {
  margin: 24px 0;
  color: #342b2e;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.18rem;
  line-height: 1.9;
}

.letter-text:focus {
  outline: 3px solid rgba(126, 184, 216, 0.28);
  outline-offset: 8px;
}

.letter-text p {
  margin: 0 0 18px;
}

.signature {
  text-align: right;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 64px 1fr 64px;
  align-items: center;
  gap: 10px;
  padding: 34px;
  background: rgba(24, 19, 21, 0.88);
}

.lightbox[hidden] {
  display: none;
}

.lightbox__figure {
  display: grid;
  max-width: min(980px, 100%);
  max-height: calc(100svh - 80px);
  justify-self: center;
  gap: 14px;
  margin: 0;
}

.lightbox__figure img {
  max-height: calc(100svh - 138px);
  width: auto;
  justify-self: center;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
}

.lightbox__figure figcaption {
  color: var(--white);
  font-weight: 800;
  text-align: center;
}

.lightbox__close,
.lightbox__nav {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: var(--radius);
  font-size: 2rem;
}

.lightbox__close {
  position: absolute;
  top: 18px;
  right: 18px;
}

.lightbox__nav {
  justify-self: center;
}

.lightbox__close:hover,
.lightbox__nav:hover {
  background: rgba(255, 255, 255, 0.24);
}

.burst-heart {
  position: fixed;
  z-index: 60;
  color: var(--rose);
  font-size: 1.6rem;
  pointer-events: none;
  animation: burst 900ms ease forwards;
}

@keyframes petalFall {
  from {
    transform: translate3d(0, -80px, 0) rotate(var(--tilt));
  }
  to {
    transform: translate3d(80px, calc(100svh + 100px), 0) rotate(330deg);
  }
}

@keyframes photoFloat {
  0%, 100% { transform: translateY(0) rotate(3deg); }
  50% { transform: translateY(-12px) rotate(-2deg); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes barDance {
  0%, 100% { transform: scaleY(0.42); }
  50% { transform: scaleY(1.8); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

@keyframes burst {
  0% {
    opacity: 0;
    transform: translate(-50%, 8px) scale(0.6);
  }
  20% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -70px) scale(1.4);
  }
}

@media (max-width: 980px) {
  .topbar {
    grid-template-columns: 1fr auto;
  }

  .topbar__nav {
    display: none;
  }

  .hero,
  .song-section {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 28px;
  }

  .hero__image,
  .hero__image img {
    min-height: 520px;
  }

  .hero__stamp {
    position: relative;
    right: auto;
    bottom: auto;
    width: min(260px, 72vw);
    margin: -80px 24px 0 auto;
  }

  h1 {
    font-size: 3rem;
  }

  .gallery-grid {
    columns: 2 200px;
  }
}

@media (max-width: 680px) {
  .topbar {
    padding: 10px 14px;
  }

  .brand span:last-child,
  .music-button span:last-child {
    display: none;
  }

  .music-button {
    width: 44px;
    padding: 0;
  }

  .hero,
  .section-band,
  .song-section {
    width: min(100% - 24px, 1180px);
  }

  .hero__image,
  .hero__image img {
    min-height: 420px;
  }

  h1 {
    font-size: 2.35rem;
  }

  h2 {
    font-size: 1.78rem;
  }

  .hero__lead,
  .song-copy p:not(.eyebrow) {
    font-size: 1rem;
    line-height: 1.62;
  }

  .timer-grid,
  .player-panel {
    grid-template-columns: 1fr;
  }

  .timer-tile {
    min-height: 104px;
  }

  .timer-tile strong {
    font-size: 2.2rem;
  }

  .gallery-grid {
    columns: 1;
  }

  .letter-sheet {
    padding: 30px 22px;
  }

  .letter-text {
    font-size: 1.05rem;
  }

  .lightbox {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .lightbox__nav {
    position: fixed;
    bottom: 18px;
  }

  .lightbox__nav--prev {
    left: 18px;
  }

  .lightbox__nav--next {
    right: 18px;
  }
}

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