:root {
  --burgundy: #360b0b;
  --wine: #661716;
  --gold: #d4b06a;
  --pale-gold: #ead6a8;
  --ivory: #f4ead3;
  --ink: #170705;
  --safe-top: max(18px, env(safe-area-inset-top));
  --safe-right: max(18px, env(safe-area-inset-right));
  --safe-bottom: max(18px, env(safe-area-inset-bottom));
  --safe-left: max(18px, env(safe-area-inset-left));
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  background: var(--ink);
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  color: var(--ivory);
  font-family: "Bodoni 72", Didot, "Times New Roman", "Songti SC", SimSun, serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

button {
  font: inherit;
}

.experience {
  position: relative;
  isolation: isolate;
  width: 100%;
  height: 100vh;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  background: #1b0806;
}

.backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.backdrop--ambient {
  z-index: -5;
  object-fit: cover;
  object-position: 57% 50%;
  opacity: 0.72;
  filter: blur(18px) saturate(0.74) contrast(1.08) brightness(0.42) sepia(0.12);
  transform: scale(1.13);
  animation: breathe 18s ease-in-out infinite alternate;
}

.picture-stage {
  position: absolute;
  z-index: -4;
  top: 36%;
  left: 50%;
  width: 100vw;
  overflow: hidden;
  transform: translate(-50%, -50%) scale(1.01);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 5%, #000 95%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 5%, #000 95%, transparent 100%);
}

.picture-stage__image {
  display: block;
  width: 100%;
  height: auto;
  filter: saturate(0.88) contrast(1.03) brightness(0.83) sepia(0.04);
}

.wash {
  position: absolute;
  z-index: -3;
  inset: 0;
  background:
    radial-gradient(circle at 55% 32%, rgba(212, 176, 106, 0.08), transparent 32%),
    linear-gradient(180deg, rgba(21, 5, 4, 0.6) 0%, rgba(24, 6, 4, 0.04) 26%, rgba(26, 5, 4, 0.2) 52%, rgba(20, 4, 4, 0.96) 100%),
    linear-gradient(90deg, rgba(23, 4, 3, 0.5), transparent 36%, rgba(29, 5, 4, 0.28));
}

.film-grain {
  position: absolute;
  z-index: -2;
  inset: -40%;
  pointer-events: none;
  opacity: 0.14;
  mix-blend-mode: soft-light;
  background-image:
    repeating-radial-gradient(circle at 18% 23%, rgba(255, 255, 255, 0.32) 0 0.45px, transparent 0.7px 3px),
    repeating-radial-gradient(circle at 76% 68%, rgba(255, 255, 255, 0.22) 0 0.35px, transparent 0.65px 4px);
  animation: grain 0.34s steps(2) infinite;
}

.ornamental-frame {
  position: absolute;
  z-index: 4;
  inset: calc(var(--safe-top) + 8px) calc(var(--safe-right) + 2px) calc(var(--safe-bottom) + 8px) calc(var(--safe-left) + 2px);
  border: 1px solid rgba(226, 194, 126, 0.42);
  box-shadow: inset 0 0 0 4px rgba(83, 28, 20, 0.18);
  pointer-events: none;
}

.ornamental-frame::before,
.ornamental-frame::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 42px;
  height: 7px;
  border-block: 1px solid rgba(226, 194, 126, 0.46);
  transform: translateX(-50%);
}

.ornamental-frame::before {
  top: -4px;
}

.ornamental-frame::after {
  bottom: -4px;
}

.corner {
  position: absolute;
  width: 19px;
  height: 19px;
  border-color: rgba(234, 211, 157, 0.7);
}

.corner--tl {
  top: 5px;
  left: 5px;
  border-top: 1px solid;
  border-left: 1px solid;
}

.corner--tr {
  top: 5px;
  right: 5px;
  border-top: 1px solid;
  border-right: 1px solid;
}

.corner--bl {
  bottom: 5px;
  left: 5px;
  border-bottom: 1px solid;
  border-left: 1px solid;
}

.corner--br {
  right: 5px;
  bottom: 5px;
  border-right: 1px solid;
  border-bottom: 1px solid;
}

.masthead {
  position: absolute;
  z-index: 2;
  top: calc(var(--safe-top) + 27px);
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  width: min(82vw, 420px);
  transform: translateX(-50%);
  text-align: center;
}

.monogram {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--pale-gold);
  border: 1px solid rgba(231, 207, 153, 0.75);
  border-radius: 50%;
  font-size: 18px;
  font-style: italic;
  line-height: 1;
  box-shadow: 0 0 0 3px rgba(217, 177, 101, 0.08);
}

.eyebrow,
.kicker,
.subtitle,
.player__prompt,
.player__status,
.footer,
.sound-toggle {
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.eyebrow {
  margin: 0;
  color: rgba(244, 233, 209, 0.75);
  font-size: 8px;
  font-weight: 500;
}

.hero {
  position: absolute;
  z-index: 2;
  top: 62%;
  left: 50%;
  width: min(88vw, 560px);
  transform: translate(-50%, -50%);
  text-align: center;
  text-shadow: 0 3px 24px rgba(18, 3, 2, 0.9);
}

.kicker {
  margin: 0 0 10px;
  color: var(--pale-gold);
  font-size: clamp(8px, 2.2vw, 11px);
}

h1 {
  margin: 0;
  color: var(--ivory);
  font-family: "Songti SC", STSong, SimSun, serif;
  font-size: clamp(40px, 12vw, 66px);
  font-weight: 400;
  letter-spacing: 0.18em;
  line-height: 1.02;
  text-indent: 0.18em;
}

.subtitle {
  margin: 8px 0 0;
  color: var(--pale-gold);
  font-size: clamp(15px, 4.2vw, 22px);
  font-weight: 400;
  letter-spacing: 0.32em;
  text-indent: 0.32em;
}

.flourish {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 96px;
  margin: 17px auto 13px;
}

.flourish::before,
.flourish::after {
  content: "";
  width: 36px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}

.flourish::after {
  transform: rotate(180deg);
}

.flourish i {
  display: block;
  width: 6px;
  height: 6px;
  border: 1px solid var(--gold);
  transform: rotate(45deg);
}

.invitation {
  margin: 0;
  color: rgba(246, 235, 211, 0.88);
  font-family: "Songti SC", STSong, SimSun, serif;
  font-size: clamp(12px, 3.4vw, 16px);
  font-weight: 400;
  letter-spacing: 0.12em;
}

.player {
  position: absolute;
  z-index: 5;
  bottom: calc(var(--safe-bottom) + 72px);
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(88vw, 380px);
  transform: translateX(-50%);
  text-align: center;
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.record-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  padding: 0;
  color: inherit;
  border: 1px solid rgba(231, 204, 145, 0.72);
  border-radius: 50%;
  outline: none;
  background: rgba(33, 8, 7, 0.44);
  box-shadow: 0 12px 48px rgba(13, 2, 2, 0.52), inset 0 0 0 4px rgba(225, 190, 119, 0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
  touch-action: manipulation;
}

.record-button::after {
  content: "";
  position: absolute;
  width: 106px;
  height: 106px;
  border: 1px solid rgba(224, 187, 113, 0.15);
  border-radius: 50%;
  animation: pulse 2.2s ease-out infinite;
}

.record-button:focus-visible {
  box-shadow: 0 0 0 3px var(--ivory), 0 0 0 6px var(--wine);
}

.record {
  position: relative;
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle at center, transparent 0 3px, rgba(212, 176, 106, 0.13) 3.5px 4px),
    radial-gradient(circle, #21100e 0 12%, #0b0706 13% 100%);
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.9);
}

.record__groove {
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(226, 194, 126, 0.2);
  border-radius: 50%;
}

.record__label {
  position: relative;
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border: 1px solid rgba(255, 233, 190, 0.48);
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #9e4937, #5b1515 70%);
  box-shadow: 0 0 14px rgba(194, 105, 71, 0.38);
}

.play-icon {
  width: 0;
  height: 0;
  margin-left: 2px;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 6px solid var(--ivory);
}

.pause-icon {
  display: none;
  gap: 3px;
}

.pause-icon i {
  width: 2px;
  height: 9px;
  background: var(--ivory);
}

.player__prompt {
  margin: 14px 0 0;
  color: var(--ivory);
  font-family: "Songti SC", STSong, SimSun, serif;
  font-size: 11px;
  letter-spacing: 0.16em;
}

.player__status {
  margin: 7px 0 0;
  color: rgba(229, 207, 160, 0.6);
  font-size: 7px;
}

.experience.is-playing .record {
  animation: spin 7s linear infinite;
}

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

.experience.is-playing .pause-icon {
  display: flex;
}

.experience.is-playing .record-button::after {
  animation: none;
  opacity: 0;
}

.experience.is-playing .player__prompt {
  color: var(--pale-gold);
}

.sound-toggle {
  position: absolute;
  z-index: 6;
  right: calc(var(--safe-right) + 14px);
  bottom: calc(var(--safe-bottom) + 27px);
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  color: rgba(244, 234, 214, 0.78);
  border: 1px solid rgba(226, 194, 126, 0.3);
  border-radius: 99px;
  background: rgba(21, 5, 4, 0.42);
  font-size: 7px;
  cursor: pointer;
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}

.equalizer {
  display: flex;
  align-items: end;
  gap: 2px;
  height: 11px;
}

.equalizer i {
  display: block;
  width: 1px;
  height: 4px;
  background: var(--pale-gold);
  animation: equalize 0.8s ease-in-out infinite alternate;
}

.equalizer i:nth-child(2) {
  height: 10px;
  animation-delay: -0.5s;
}

.equalizer i:nth-child(3) {
  height: 7px;
  animation-delay: -0.28s;
}

.equalizer i:nth-child(4) {
  height: 3px;
  animation-delay: -0.67s;
}

.footer {
  position: absolute;
  z-index: 2;
  bottom: calc(var(--safe-bottom) + 31px);
  left: calc(var(--safe-left) + 15px);
  display: flex;
  align-items: center;
  gap: 7px;
  color: rgba(236, 218, 177, 0.5);
  font-size: 6px;
}

.footer__gem {
  color: rgba(221, 183, 111, 0.65);
  font-size: 4px;
}

.noscript {
  position: fixed;
  z-index: 99;
  inset: auto 20px 20px;
  padding: 14px;
  color: var(--ivory);
  background: #2b0a09;
  text-align: center;
}

@keyframes breathe {
  from { transform: scale(1.13); }
  to { transform: scale(1.16); }
}

@keyframes grain {
  0% { transform: translate3d(0, 0, 0); }
  25% { transform: translate3d(3%, -2%, 0); }
  50% { transform: translate3d(-2%, 3%, 0); }
  75% { transform: translate3d(2%, 2%, 0); }
  100% { transform: translate3d(-3%, -3%, 0); }
}

@keyframes pulse {
  0% { transform: scale(0.82); opacity: 0; }
  25% { opacity: 0.72; }
  100% { transform: scale(1.18); opacity: 0; }
}

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

@keyframes equalize {
  to { height: 10px; }
}

@media (max-height: 680px) {
  .masthead { top: calc(var(--safe-top) + 20px); }
  .hero { top: 61%; }
  .flourish,
  .invitation { display: none; }
  .player { bottom: calc(var(--safe-bottom) + 42px); }
  .record-button { width: 76px; height: 76px; }
  .record { width: 60px; height: 60px; }
  .player__prompt { margin-top: 10px; }
  .sound-toggle,
  .footer { bottom: calc(var(--safe-bottom) + 20px); }
}

@media (min-width: 720px) {
  .backdrop--ambient { object-position: center; }
  .picture-stage { top: 50%; }
  .hero { top: 58%; }
  .player { bottom: calc(var(--safe-bottom) + 75px); }
}

@media (orientation: landscape) and (max-height: 520px) {
  .masthead { top: calc(var(--safe-top) + 13px); left: calc(var(--safe-left) + 33px); align-items: flex-start; transform: none; text-align: left; }
  .hero { top: 47%; left: 42%; width: 54vw; }
  .hero h1 { font-size: clamp(38px, 10vw, 58px); }
  .flourish,
  .invitation { display: none; }
  .player { right: calc(var(--safe-right) + 55px); bottom: 50%; left: auto; width: 150px; transform: translateY(50%); }
  .footer { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .backdrop,
  .film-grain,
  .record-button::after,
  .experience.is-playing .record,
  .equalizer i {
    animation: none !important;
  }
}
