@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,500;0,600;1,500;1,600&family=Golos+Text:wght@400;500;600&display=swap');

:root {
  color-scheme: dark;
  --ground: #100a0f;
  --paper: #f8e9e4;
  --rose: #ef96a3;
  --muted: #c1acb7;
  --line: #3d252e;
  --display: "Cormorant Garamond", Georgia, serif;
  --text: "Golos Text", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 0; background: var(--ground); }
body {
  margin: 0;
  color: var(--paper);
  font: 1rem/1.6 var(--text);
  background:
    radial-gradient(ellipse at 78% 47%, #47142347, transparent 47%),
    radial-gradient(ellipse at 4% 82%, #260e1e88, transparent 54%),
    var(--ground);
}
a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--rose); outline-offset: 5px; }
[tabindex="-1"]:focus { outline: none; }

.site-shell {
  width: min(100% - 112px, 1280px);
  min-height: 100svh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}
.site-header, .site-footer {
  min-height: 85px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.site-header { border-bottom: 1px solid var(--line); }
.site-footer { border-top: 1px solid var(--line); }
.wordmark, .sound { display: inline-flex; align-items: center; gap: 12px; }
.wordmark { font-size: .875rem; font-weight: 500; letter-spacing: .05em; }
.monogram {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  border: 1px solid #7c4656;
  color: var(--rose);
  font: italic 600 1.45rem/1 var(--display);
}
.sound {
  padding: 8px 14px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 50px;
  color: var(--muted);
  font-size: .875rem;
  transition: color .25s, border-color .25s;
}
.sound:hover { color: var(--paper); border-color: var(--rose); }
.sound-bars { display: flex; gap: 2px; align-items: center; height: 14px; color: var(--rose); }
.sound-bars i { width: 1px; height: 6px; background: currentColor; }
.sound-bars i:nth-child(2) { height: 11px; }
.sound-bars i:nth-child(3) { height: 8px; }
.sound[aria-pressed="true"] i { animation: equalizer .55s ease-in-out infinite alternate; }
.sound[aria-pressed="true"] i:nth-child(even) { animation-delay: -.35s; }
@keyframes equalizer { to { transform: scaleY(.35); } }

#story { flex: 1; display: grid; }
.scene { min-width: 0; }
.scene-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.038fr) minmax(0, 1fr);
  align-items: center;
  padding: 34px clamp(0px, 2.3vw, 34px) 36px;
}
.intro-copy { position: relative; z-index: 1; padding-block: 24px; }
.eyebrow {
  display: flex;
  align-items: center;
  gap: 11px;
  color: #e4a7b0;
  font-size: .875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .23em;
  margin: 0 0 24px;
}
.eyebrow span { display: inline-block; width: 7px; height: 7px; background: var(--rose); transform: rotate(45deg); box-shadow: 0 0 12px #ef96a388; }
h1, h2 { font: 500 clamp(4rem, 9vw, 8.9rem)/.78 var(--display); letter-spacing: -.057em; margin: 0; }
h1 em, h2 em { display: inline-block; color: var(--rose); font-weight: 500; }
h1 em { margin-top: .12em; }
.intro-note { color: var(--muted); margin: 35px 0 28px; line-height: 1.75; }
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  min-height: 52px;
  border-radius: 50px;
  padding: 10px 23px;
  color: #2c1018;
  background: #f0a2ae;
  box-shadow: 0 5px 35px #f67e9028;
  font-size: .9375rem;
  font-weight: 600;
  transition: background .25s, box-shadow .25s, transform .25s;
}
.pill:hover { background: #ffc1c9; box-shadow: 0 5px 40px #f67e9055; transform: translateY(-3px); }
.pill:active { transform: translateY(0); }
.envelope { width: 17px; height: 13px; border: 1px solid currentColor; border-radius: 3px; position: relative; overflow: hidden; }
.envelope::after { content: ""; width: 11px; height: 11px; border-right: 1px solid; border-bottom: 1px solid; position: absolute; left: 2px; top: -6px; transform: rotate(45deg); }

.rose-art {
  position: relative;
  display: grid;
  place-items: center;
  isolation: isolate;
  width: 100%;
  max-width: 550px;
  height: clamp(340px, calc(100svh - 230px), 620px);
  justify-self: center;
}
.rose-art::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 5% -5%;
  background: radial-gradient(ellipse, #8e264550, transparent 64%);
}
.rose-frame {
  position: absolute;
  inset: 0 11%;
  padding: 10px;
  border: 1px solid #9b556573;
  border-radius: 50% 50% 48% 48% / 37% 37% 33% 33%;
  box-shadow: 0 18px 60px #0b05094d;
}
.rose-arch {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 1px solid #b16a783e;
  border-radius: inherit;
  background: #190a13;
}
.rose-arch img {
  width: 100%; height: 100%;
  display: block;
  object-fit: cover;
  object-position: 50% 45%;
  transform: scale(1.04);
  animation: rose-breathe 13s ease-in-out infinite alternate;
}
.rose-arch::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 36px 9px #12091088; pointer-events: none; }
@keyframes rose-breathe { to { transform: scale(1.13) translateY(-1%); } }

.rose-orbit {
  position: absolute;
  z-index: 1;
  width: 107%;
  height: 30%;
  border: 1px solid #d58a9b4d;
  border-top-color: #d58a9b20;
  border-radius: 50%;
  transform: rotate(-28deg);
  pointer-events: none;
}
.glint {
  position: absolute;
  z-index: 2;
  color: #ffbdbe;
  line-height: 1;
  text-shadow: 0 0 22px #ff8194b3;
  animation: twinkle 3.6s ease-in-out infinite alternate;
}
.glint-top { top: 15%; right: 10%; font-size: 2.1rem; }
.glint-mid { top: 25%; right: 3%; font-size: 1rem; animation-delay: -1s; }
.glint-bottom { bottom: 19%; left: 7%; font-size: 1.8rem; animation-delay: -2s; }
.glint-edge { bottom: 28%; right: 1%; font-size: .8rem; animation-delay: -2.7s; }
@keyframes twinkle { from { opacity: .55; transform: scale(.84); } to { opacity: 1; transform: scale(1.13); } }
.petal {
  position: absolute;
  border-radius: 80% 10% 80% 20%;
  background: linear-gradient(135deg, #ff9caa, #7b1e37 72%);
  width: 8px;
  height: 12px;
  opacity: .7;
  animation: drift 6s ease-in-out infinite alternate;
}
.petal-one { left: 6%; top: 24%; }
.petal-two { right: 6%; bottom: 13%; animation-delay: -2s; }
.petal-three { left: 13%; bottom: 8%; width: 5px; height: 8px; animation-delay: -4s; }
@keyframes drift { from { transform: translate(-5px, 4px) rotate(5deg); } to { transform: translate(8px, -15px) rotate(75deg); } }

.chapters { display: flex; flex-wrap: wrap; gap: 8px clamp(18px, 3vw, 43px); }
.chapters a { display: inline-flex; align-items: center; gap: 9px; padding-block: 9px; font-size: .875rem; color: var(--muted); transition: color .25s; }
.chapters a:hover, .chapters [aria-current] { color: var(--paper); }
.chapter-dot { width: 6px; height: 6px; border-radius: 50%; border: 1px solid #ad7382; }
.chapters [aria-current] .chapter-dot { background: var(--rose); border-color: var(--rose); box-shadow: 0 0 10px #ef96a399; }
.footer-heart { font: 1.6rem/1 Georgia, serif; color: var(--rose); }

.scene-letter, .scene-heart { place-items: center; padding: 40px 0; display: grid; }
.letter-paper {
  position: relative;
  width: min(100%, 690px);
  padding: clamp(24px, 5.5vw, 68px);
  border: 1px solid #754151;
  border-radius: 6px 64px 6px 6px;
  background: linear-gradient(140deg, #311620, #1b1018);
  box-shadow: 0 25px 70px #05010580, inset 0 0 0 7px #ef96a309;
}
.letter-paper h2, .heart-scene h2 { font-size: clamp(3.3rem, 7.6vw, 7rem); line-height: .91; }
.letter-paper h2 { margin-bottom: 25px; }
.letter-paper p:not(.eyebrow, .signature) { max-width: 49ch; margin: 0 0 14px; color: var(--muted); }
.signature { color: var(--rose); font: italic 600 clamp(1.65rem, 3vw, 2.3rem)/1.15 var(--display); margin: 19px 0 25px; }
.signature span { font-size: .66em; }
.heart-scene { width: 100%; text-align: center; }
.heart-scene .eyebrow { justify-content: center; }
.heart-stage {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  height: 216px;
  margin-top: 14px;
  overflow: clip;
}
.heart-button {
  display: grid;
  place-items: center;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  border: 1px solid #d4819668;
  background: radial-gradient(circle, #8b284c77, #321521);
  box-shadow: 0 0 70px #d34b7350, 0 0 0 13px #ef96a311;
  color: #ffaaba;
  transition: background .3s, transform .3s;
}
.heart-button:hover { transform: scale(1.05); background-color: #81284a; }
.heart-button span { display: block; font: 4.4rem/1 Georgia, serif; text-shadow: 0 0 25px #ff7298; animation: heartbeat 2.5s ease-in-out infinite; }
@keyframes heartbeat { 0%, 22%, 42%, 100% { transform: scale(1); } 12%, 32% { transform: scale(1.15); } }
.heart-message { color: var(--rose); margin: 0 0 14px; min-height: 1.7em; }
.back-link { font-size: .875rem; text-decoration: underline; text-underline-offset: 5px; color: var(--muted); }
.burst { position: absolute; inset: 0; pointer-events: none; }
.burst span { position: absolute; top: 50%; left: 50%; color: var(--rose); line-height: 1; animation: burst .9s ease-out both; }
@keyframes burst { from { opacity: 1; transform: translate(-50%, -50%) scale(.3); } to { opacity: 0; transform: translate(var(--x), var(--y)) rotate(var(--spin)) scale(1.4); } }

.scene.is-entering .intro-copy > *,
.scene.is-entering .rose-art,
.scene.is-entering .letter-paper,
.scene.is-entering .heart-scene { animation: enter .7s cubic-bezier(.2,.75,.25,1) both; }
.scene.is-entering .intro-copy > :nth-child(2) { animation-delay: .08s; }
.scene.is-entering .intro-copy > :nth-child(3) { animation-delay: .16s; }
.scene.is-entering .intro-copy > :nth-child(4) { animation-delay: .24s; }
@keyframes enter { from { opacity: 0; transform: translateY(17px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 820px) {
  .site-shell { width: calc(100% - 48px); }
  .site-header, .site-footer { min-height: 66px; }
  .scene-intro { padding-inline: 0; }
  .rose-frame { inset-inline: 8%; }
}
@media (max-width: 620px) {
  .site-shell { width: calc(100% - 36px); }
  .scene-intro { grid-template-columns: 1fr; padding: 30px 0 23px; }
  .intro-copy { padding: 0; }
  h1 { font-size: clamp(4rem, 14vw, 6.2rem); }
  .eyebrow { margin-bottom: 19px; font-size: .8125rem; }
  .intro-note { margin: 22px 0 19px; }
  .rose-art { height: clamp(252px, 78vw, 380px); max-width: 365px; margin-top: 25px; }
  .rose-frame { inset-inline: 17%; padding: 7px; }
  .rose-orbit { width: 91%; }
  .glint-top { right: 13%; }
  .glint-mid { right: 7%; }
  .glint-bottom { left: 11%; }
  .glint-edge { right: 7%; }
  .footer-heart { display: none; }
  .chapters { width: 100%; justify-content: space-between; gap: 0 10px; }
  .chapters a { gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .burst { display: none; }
}
