/* ==========================================================
   Design tokens. Every component CSS file uses these.
   ========================================================== */
:root {
  --burgundy: #800020;
  --burgundy-deep: #4a0e1c;
  --burgundy-ink: #2b0710;
  --wine: #a3243b;
  --rose: #c94f6d;
  --blush: #f2c4ce;
  --blush-soft: #f8e1e6;
  --cream: #fbf3ee;
  --paper: #fffaf6;
  --gold: #c9a24b;
  --gold-soft: #e6cf96;
  --bridge: #b4402c; /* Golden Gate red, pulled toward the palette */

  --text: #2b0710;
  --text-soft: #6b3a46;
  --text-on-dark: #fbf3ee;
  --text-on-dark-soft: #e8c9cf;

  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-hand: "Caveat", "Segoe Print", "Bradley Hand", cursive;
  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;
  --shadow-sm: 0 4px 12px rgba(74, 14, 28, 0.12);
  --shadow: 0 10px 30px rgba(74, 14, 28, 0.18);
  --shadow-lg: 0 20px 50px rgba(43, 7, 16, 0.28);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

  --gutter: 20px;
  --content-max: 680px;
  --tap: 48px; /* minimum tap target */
}

/* Base reset. main.js's owner extends everything below this line. */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

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

button {
  font: inherit;
  color: inherit;
}

[hidden] {
  display: none !important;
}

/* ==========================================================
   Site shell. Everything below belongs to main.js.
   ========================================================== */

@media (max-width: 359px) {
  :root { --gutter: 16px; }
}

html { background: var(--cream); }

body.is-locked,
body.is-lightbox {
  overflow: hidden;
}

:where(a, button, input, [tabindex]):focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.pre { white-space: pre-line; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* ---------- layout ---------- */
.site {
  position: relative;
  overflow-x: clip;
}

.section {
  position: relative;
  padding:
    clamp(84px, 16vw, 132px)
    max(var(--gutter), env(safe-area-inset-right))
    clamp(84px, 16vw, 132px)
    max(var(--gutter), env(safe-area-inset-left));
}

.wrap,
.section > .section__head,
.section > .component-root {
  max-width: var(--content-max);
  margin-left: auto;
  margin-right: auto;
}

.section__head {
  text-align: center;
  margin-bottom: clamp(34px, 8vw, 52px);
}

.kicker {
  display: inline-block;
  margin: 0 0 6px;
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: clamp(1.4rem, 5.4vw, 1.7rem);
  line-height: 1.1;
  color: var(--wine);
  rotate: -2.5deg;
}

.section-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.15rem, 8vw, 3.2rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--burgundy);
  text-wrap: balance;
}

.section-intro {
  margin: 14px auto 0;
  max-width: 36ch;
  color: var(--text-soft);
  font-size: 1.02rem;
  text-wrap: pretty;
}

.ornament {
  width: 180px;
  height: auto;
  margin: 0 auto;
  color: var(--gold);
}

/* gold hairline ornament sitting on every section seam */
.site > .section + .section::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: 0;
  left: 50%;
  width: 170px;
  height: 22px;
  margin: -11px 0 0 -85px;
  pointer-events: none;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 220 24'%3E%3Cg fill='none' stroke='%23c9a24b' stroke-width='1' stroke-linecap='round'%3E%3Cpath d='M2 12H84'/%3E%3Cpath d='M136 12H218'/%3E%3C/g%3E%3Cg fill='%23c9a24b'%3E%3Cpath d='M90 12l4-4 4 4-4 4z'/%3E%3Cpath d='M122 12l4-4 4 4-4 4z'/%3E%3Cpath transform='translate(101 3) scale(.75)' d='M12 21s-7.5-4.6-9.6-9.2C.9 8 3.2 4 7 4c2.1 0 3.6 1.1 5 3 1.4-1.9 2.9-3 5-3 3.8 0 6.1 4 4.6 7.8C19.5 16.4 12 21 12 21z'/%3E%3C/g%3E%3C/svg%3E");
}

/* ---------- section backgrounds (rhythm) ---------- */
#songs,
#runaway,
#scratch {
  background-color: var(--blush-soft);
  background-image:
    radial-gradient(ellipse 90% 60% at 50% 0%, rgba(255, 250, 246, 0.7), transparent 70%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Cg fill='%23800020' fill-opacity='.055'%3E%3Cpath transform='translate(6 8) scale(.55)' d='M12 21s-7.5-4.6-9.6-9.2C.9 8 3.2 4 7 4c2.1 0 3.6 1.1 5 3 1.4-1.9 2.9-3 5-3 3.8 0 6.1 4 4.6 7.8C19.5 16.4 12 21 12 21z'/%3E%3Cpath transform='translate(38 40) scale(.4)' d='M12 21s-7.5-4.6-9.6-9.2C.9 8 3.2 4 7 4c2.1 0 3.6 1.1 5 3 1.4-1.9 2.9-3 5-3 3.8 0 6.1 4 4.6 7.8C19.5 16.4 12 21 12 21z'/%3E%3C/g%3E%3C/svg%3E");
}

#memories,
#game {
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(242, 196, 206, 0.35), transparent 70%),
    radial-gradient(ellipse 70% 50% at 100% 100%, rgba(230, 207, 150, 0.18), transparent 70%),
    var(--cream);
}

#gallery,
#california,
#bouquet {
  background-color: var(--paper);
  background-image: radial-gradient(rgba(128, 0, 32, 0.055) 1px, transparent 1.3px);
  background-size: 22px 22px;
}

#california {
  background-image:
    linear-gradient(180deg, rgba(242, 196, 206, 0) 35%, rgba(242, 196, 206, 0.12) 62%, rgba(242, 196, 206, 0.36) 100%),
    radial-gradient(rgba(128, 0, 32, 0.05) 1px, transparent 1.3px);
  background-size: auto, 22px 22px;
}

#nose,
.section--closing {
  color: var(--text-on-dark);
  background:
    radial-gradient(ellipse 85% 55% at 50% 0%, rgba(163, 36, 59, 0.55), transparent 72%),
    radial-gradient(ellipse 70% 45% at 50% 100%, rgba(201, 162, 75, 0.14), transparent 70%),
    radial-gradient(rgba(230, 207, 150, 0.07) 1px, transparent 1.4px) 0 0 / 26px 26px,
    var(--burgundy-deep);
}

#nose .kicker,
.section--closing .kicker { color: var(--gold-soft); }
#nose .section-title { color: var(--paper); }
#nose .section-intro,
.nose__body { color: var(--text-on-dark-soft); }

/* ---------- motion helpers ---------- */
.has-motion .reveal {
  opacity: 0;
  translate: 0 26px;
  transition:
    opacity 0.9s var(--ease),
    translate 1s var(--ease),
    rotate 0.6s var(--ease-bounce),
    scale 0.6s var(--ease-bounce);
  transition-delay: calc(var(--i, 0) * 110ms);
}
.has-motion .reveal.is-in {
  opacity: 1;
  translate: 0 0;
}

/* ==========================================================
   GATE
   ========================================================== */
.gate {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  color: var(--text-on-dark);
  padding:
    max(20px, env(safe-area-inset-top))
    max(var(--gutter), env(safe-area-inset-right))
    max(20px, env(safe-area-inset-bottom))
    max(var(--gutter), env(safe-area-inset-left));
  background:
    radial-gradient(ellipse 80% 55% at 50% 32%, rgba(163, 36, 59, 0.6), transparent 70%),
    radial-gradient(ellipse 70% 40% at 50% 105%, rgba(201, 162, 75, 0.2), transparent 70%),
    radial-gradient(rgba(230, 207, 150, 0.08) 1px, transparent 1.4px) 0 0 / 24px 24px,
    var(--burgundy-deep);
  transition: opacity 0.8s var(--ease), visibility 0s linear 0.8s;
}

.gate::before {
  content: "";
  position: fixed;
  inset:
    max(12px, env(safe-area-inset-top))
    max(12px, env(safe-area-inset-right))
    max(12px, env(safe-area-inset-bottom))
    max(12px, env(safe-area-inset-left));
  border: 1px solid rgba(230, 207, 150, 0.3);
  border-radius: 20px;
  box-shadow: inset 0 0 0 5px rgba(74, 14, 28, 0), inset 0 0 0 6px rgba(230, 207, 150, 0.12);
  pointer-events: none;
}

.gate.is-leaving {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.gate--skip .gate__inner { display: none; }

.gate__inner {
  position: relative;
  margin: auto;
  width: 100%;
  max-width: 380px;
  padding: 64px 0 28px;
  text-align: center;
  transition: transform 0.9s var(--ease), opacity 0.6s var(--ease);
}
.gate.is-leaving .gate__inner {
  transform: scale(1.05) translateY(-8px);
  opacity: 0;
}

.gate__title {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.9rem, 8.4vw, 2.5rem);
  line-height: 1.12;
  color: var(--paper);
  text-wrap: balance;
}

.gate__form { margin-top: 14px; }

.gate__prompt {
  display: block;
  font-family: var(--font-hand);
  font-weight: 500;
  font-size: 1.55rem;
  line-height: 1.2;
  color: var(--blush);
  margin-bottom: 16px;
}

.gate__row {
  display: flex;
  gap: 10px;
  max-width: 340px;
  margin: 0 auto;
}
.gate__row.is-shaking { animation: gate-shake 0.5s var(--ease); }

@keyframes gate-shake {
  0%, 100% { transform: translateX(0); }
  15% { transform: translateX(-11px); }
  30% { transform: translateX(10px); }
  45% { transform: translateX(-8px); }
  60% { transform: translateX(6px); }
  75% { transform: translateX(-3px); }
}

.gate__input {
  flex: 1 1 auto;
  min-width: 0;
  height: 52px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid rgba(230, 207, 150, 0.45);
  background: rgba(251, 243, 238, 0.07);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 17px;
  letter-spacing: 0.04em;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  -webkit-appearance: none;
  appearance: none;
}
.gate__input::placeholder { color: rgba(251, 243, 238, 0.45); letter-spacing: 0.02em; }
.gate__input:focus,
.gate__input:focus-visible {
  border-color: var(--gold);
  background: rgba(251, 243, 238, 0.11);
  box-shadow: 0 0 0 3px rgba(201, 162, 75, 0.35);
  outline: none;
}

.gate__btn {
  flex: 0 0 auto;
  min-width: 88px;
  height: 52px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.06em;
  color: var(--burgundy-ink);
  background: linear-gradient(135deg, #f3e2b0 0%, var(--gold) 45%, #b48a35 100%);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transition: transform 0.2s var(--ease-bounce), filter 0.2s;
}
.gate__btn:hover { filter: brightness(1.06); }
.gate__btn:active { transform: scale(0.96); }
.gate__btn:focus-visible { outline: 3px solid var(--paper); outline-offset: 3px; }
.gate__btn:disabled { cursor: default; }

.gate__hint {
  margin: 14px 0 0;
  font-size: 0.86rem;
  letter-spacing: 0.04em;
  color: rgba(232, 201, 207, 0.75);
}

.gate__msg {
  min-height: 1.6em;
  margin: 8px 0 0;
  font-family: var(--font-hand);
  font-weight: 500;
  font-size: 1.45rem;
  line-height: 1.2;
  color: var(--gold-soft);
}

/* ---------- envelope ---------- */
.envelope {
  --ew: min(296px, 72vw);
  position: relative;
  width: var(--ew);
  height: calc(var(--ew) * 0.64);
  margin: 0 auto 30px;
  perspective: 900px;
  animation: env-float 5s ease-in-out infinite;
}

@keyframes env-float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -6px; }
}

.envelope__back {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: 10px;
  background: linear-gradient(180deg, #5e1226 0%, #460c1b 100%);
  box-shadow: 0 26px 50px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(230, 207, 150, 0.16);
}

.envelope__letter {
  position: absolute;
  left: 7%;
  right: 7%;
  top: 6%;
  height: 88%;
  z-index: 2;
  padding-top: 8%;
  border-radius: 6px;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(201, 162, 75, 0.12), transparent 30%),
    var(--paper);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18), inset 0 0 0 1px rgba(201, 162, 75, 0.3);
  transition: translate 0.95s var(--ease) 0.62s;
}

.envelope__name {
  display: block;
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: calc(var(--ew) * 0.15);
  line-height: 1;
  color: var(--burgundy);
}

.envelope__heart {
  width: calc(var(--ew) * 0.07);
  height: auto;
  margin: 4px auto 0;
  fill: var(--wine);
}

.envelope__lines {
  display: block;
  margin: 10px 14% 0;
  height: 26px;
  background: repeating-linear-gradient(180deg, rgba(163, 36, 59, 0.18) 0 1px, transparent 1px 9px);
}

.envelope__front {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}
.envelope__front::before,
.envelope__front::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 0 0 10px 10px;
}
.envelope__front::before {
  clip-path: polygon(0 0, 50% 54%, 100% 0, 100% 100%, 0 100%);
  background: linear-gradient(90deg, #8a1931 0%, #74142a 50%, #8a1931 100%);
}
.envelope__front::after {
  clip-path: polygon(0 100%, 50% 47%, 100% 100%);
  background: linear-gradient(180deg, #97203a 0%, #7c162d 100%);
}

.envelope__flap {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 56%;
  z-index: 4;
  transform-origin: 50% 0;
  filter: drop-shadow(0 5px 6px rgba(0, 0, 0, 0.32));
  transition: transform 0.8s var(--ease) 0.18s, z-index 0s linear 0.56s;
}
.envelope__flap-shape {
  position: absolute;
  inset: 0;
  border-radius: 10px 10px 0 0;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  background: linear-gradient(180deg, #a1223f 0%, #7c162d 100%);
}

.envelope__seal {
  position: absolute;
  left: 50%;
  top: 56%;
  width: 58px;
  height: 58px;
  margin: -31px 0 0 -29px;
  z-index: 5;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.4));
  transition: transform 0.4s var(--ease), opacity 0.35s var(--ease);
}
.envelope__seal svg { width: 100%; height: 100%; }

.gate.is-opening .envelope { animation: none; }
.gate.is-opening .envelope__seal { transform: scale(1.3) rotate(-14deg); opacity: 0; }
.gate.is-opening .envelope__flap { transform: rotateX(180deg); z-index: 1; }
.gate.is-opening .envelope__letter { translate: 0 -56%; }

/* ==========================================================
   PETALS
   ========================================================== */
.petals {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 45;
  pointer-events: none;
  transition: opacity 0.7s var(--ease);
}
body.is-busy .petals,
body.is-lightbox .petals { opacity: 0; }
.petals.is-off { display: none; }

/* ==========================================================
   HERO
   ========================================================== */
.section--hero {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  text-align: center;
  overflow: hidden;
  padding-top: max(84px, calc(env(safe-area-inset-top) + 64px));
  padding-bottom: calc(118px + env(safe-area-inset-bottom));
  background:
    radial-gradient(ellipse 70% 50% at 50% 44%, rgba(242, 196, 206, 0.95), rgba(248, 225, 230, 0.45) 55%, transparent 78%),
    radial-gradient(ellipse 130% 55% at 50% 118%, rgba(128, 0, 32, 0.3), transparent 62%),
    radial-gradient(ellipse 80% 40% at 50% -8%, rgba(201, 162, 75, 0.22), transparent 70%),
    var(--cream);
}

.hero__frame {
  position: absolute;
  inset:
    max(14px, env(safe-area-inset-top))
    max(14px, env(safe-area-inset-right))
    max(14px, env(safe-area-inset-bottom))
    max(14px, env(safe-area-inset-left));
  border: 1px solid rgba(201, 162, 75, 0.6);
  border-radius: 24px;
  pointer-events: none;
}
.hero__frame::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(201, 162, 75, 0.28);
  border-radius: 19px;
}

.hero__inner {
  position: relative;
  max-width: var(--content-max);
}

.hero__eyebrow {
  margin: 0 0 6px;
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: clamp(1.8rem, 7vw, 2.4rem);
  line-height: 1;
  color: var(--wine);
  rotate: -4deg;
}

.hero__orn { width: clamp(150px, 46vw, 220px); }
.hero__orn--low { margin-top: 2px; }

.hero__title {
  margin: 0.04em 0 0.06em;
  padding: 0 0.12em 0.08em;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(5.2rem, 27vw, 11rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--burgundy);
  background: linear-gradient(172deg, var(--rose) 0%, var(--wine) 28%, var(--burgundy) 60%, var(--burgundy-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 8px 22px rgba(128, 0, 32, 0.2));
  outline: none;
}

.hero__subtitle {
  margin: 18px auto 0;
  max-width: 28ch;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.1rem, 4.4vw, 1.3rem);
  line-height: 1.55;
  color: var(--text-soft);
}

.hero__cue {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(34px + env(safe-area-inset-bottom));
  width: fit-content;
  min-width: 64px;
  min-height: 56px;
  margin: 0 auto;
  padding: 4px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 0;
  background: none;
  cursor: pointer;
  color: var(--wine);
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 1.35rem;
  line-height: 1;
  border-radius: 14px;
}
.hero__chev {
  display: block;
  width: 26px;
  height: 26px;
  margin-top: 2px;
  animation: cue-bob 1.8s ease-in-out infinite;
}
.hero__chev svg { width: 100%; height: 100%; }

@keyframes cue-bob {
  0%, 100% { transform: translateY(0); opacity: 0.6; }
  50% { transform: translateY(7px); opacity: 1; }
}

.has-motion .hero-anim {
  opacity: 0;
  translate: 0 22px;
  transition: opacity 1s var(--ease), translate 1.1s var(--ease);
  transition-delay: calc(0.15s + var(--i, 0) * 0.13s);
}
.has-motion .hero__title.hero-anim {
  translate: 0 0;
  scale: 0.92;
  transition: opacity 1.2s var(--ease), scale 1.4s var(--ease);
  transition-delay: calc(0.15s + var(--i, 0) * 0.13s);
}
.has-motion body.is-open .hero-anim,
.has-motion body.is-open .hero__title.hero-anim {
  opacity: 1;
  translate: 0 0;
  scale: 1;
}

/* ==========================================================
   SONGS (mixtape)
   ========================================================== */
.mixtape {
  position: relative;
  margin-top: 8px;
  padding: 30px 18px 14px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(ellipse 90% 50% at 50% 0%, rgba(255, 255, 255, 0.9), transparent 70%),
    linear-gradient(160deg, #fff 0%, var(--paper) 50%, #fcefee 100%);
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(201, 162, 75, 0.4);
}
.mixtape::after {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: calc(var(--radius-lg) - 6px);
  border: 1px dashed rgba(201, 162, 75, 0.28);
  pointer-events: none;
}

.mixtape__tape {
  position: absolute;
  z-index: 2;
  top: -17px;
  left: 50%;
  translate: -50% 0;
  max-width: calc(100% - 40px);
  margin: 0;
  padding: 5px 22px 7px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 1.35rem;
  line-height: 1.1;
  color: var(--burgundy-deep);
  rotate: -2deg;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.3) 70%, rgba(255, 255, 255, 0.05)),
    rgba(230, 207, 150, 0.78);
  clip-path: polygon(2% 0, 98% 6%, 100% 40%, 98% 100%, 1% 94%, 0 50%);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.mixtape__player { position: relative; }

.mixtape__deck {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.vinyl-wrap {
  position: relative;
  width: 96px;
  height: 96px;
  margin-right: 8px;
  border-radius: 50%;
}
.vinyl-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  background: conic-gradient(from 20deg,
    transparent 0 8%, rgba(255, 255, 255, 0.2) 13%, transparent 19% 52%,
    rgba(255, 255, 255, 0.13) 58%, transparent 65% 100%);
}
.vinyl-wrap.is-swapping .vinyl { animation: vinyl-swap 0.6s var(--ease), vinyl-spin 6s linear 0.6s infinite; }

.vinyl {
  --label-a: var(--wine);
  --label-b: var(--burgundy);
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle at center, #1d1013 0 1px, #2c1a1f 1.6px 2.6px),
    #170b0e;
  box-shadow: 0 8px 18px rgba(43, 7, 16, 0.35), inset 0 0 0 2px #0f0709;
  animation: vinyl-spin 6s linear infinite;
}
.vinyl::after {
  content: "";
  position: absolute;
  inset: 31%;
  border-radius: 50%;
  background:
    radial-gradient(circle, var(--paper) 0 11%, rgba(0, 0, 0, 0.25) 12%, transparent 15%),
    conic-gradient(var(--label-a) 0 25%, var(--label-b) 0 50%, var(--label-a) 0 75%, var(--label-b) 0);
  box-shadow: inset 0 0 0 1.5px rgba(230, 207, 150, 0.85), inset 0 0 0 4px rgba(0, 0, 0, 0.15);
  transition: background 0.4s;
}

.tonearm {
  position: absolute;
  z-index: 2;
  top: -8px;
  right: -14px;
  width: 30px;
  height: 60px;
  filter: drop-shadow(0 2px 2px rgba(43, 7, 16, 0.3));
  transform-origin: 75% 12%;
  rotate: 4deg;
}
.vinyl-wrap.is-swapping .tonearm { animation: arm-lift 0.6s var(--ease); }

@keyframes vinyl-spin {
  to { transform: rotate(360deg); }
}
@keyframes vinyl-swap {
  0% { transform: rotate(0deg) scale(1); }
  45% { transform: rotate(-200deg) scale(0.86); opacity: 0.7; }
  100% { transform: rotate(-360deg) scale(1); opacity: 1; }
}
@keyframes arm-lift {
  0%, 100% { rotate: 4deg; }
  40% { rotate: -22deg; }
}

.mixtape__now { min-width: 0; }

.mixtape__np {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 6px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--rose);
}

.mixtape__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.35rem, 5.4vw, 1.6rem);
  line-height: 1.12;
  color: var(--burgundy);
  overflow-wrap: anywhere;
}
.mixtape__artist {
  margin: 5px 0 0;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.mixtape__note {
  margin: 16px 0;
  padding-left: 14px;
  border-left: 2px solid var(--gold-soft);
  font-family: var(--font-hand);
  font-weight: 500;
  font-size: 1.42rem;
  line-height: 1.2;
  color: var(--wine);
}
.mixtape__note[hidden] + .song__embed { margin-top: 16px; }

.eq {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  width: 13px;
  height: 12px;
  flex: none;
}
.eq i {
  display: block;
  flex: 1;
  height: 100%;
  border-radius: 1px;
  background: currentColor;
  transform-origin: 50% 100%;
  animation: eq 0.9s ease-in-out infinite;
}
.eq i:nth-child(2) { animation-delay: -0.3s; animation-duration: 0.7s; }
.eq i:nth-child(3) { animation-delay: -0.55s; animation-duration: 1.1s; }
@keyframes eq {
  0%, 100% { transform: scaleY(0.3); }
  50% { transform: scaleY(1); }
}

.song__embed {
  position: relative;
  min-height: 152px;
  border-radius: 12px;
  overflow: hidden;
  background:
    no-repeat center / 34px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a3243b' stroke-opacity='.45' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18V5l11-2v13'/%3E%3Ccircle cx='6' cy='18' r='3'/%3E%3Ccircle cx='17' cy='16' r='3'/%3E%3C/svg%3E"),
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.55), transparent 50%),
    linear-gradient(135deg, var(--blush-soft), var(--blush));
}
.song__iframe {
  display: block;
  width: 100%;
  height: 152px;
  border: 0;
  border-radius: 12px;
}

.song__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 48px;
  color: var(--wine);
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: rgba(163, 36, 59, 0.35);
  text-underline-offset: 4px;
  border-radius: 8px;
}
.song__link-icon { display: inline-flex; width: 14px; height: 14px; }
.song__link-icon svg { width: 100%; height: 100%; }

/* tracklist */
.tracklist {
  list-style: none;
  margin: 6px 0 0;
  padding: 10px 0 0;
  border-top: 1px solid rgba(201, 162, 75, 0.4);
}
.tracklist__item + .tracklist__item { border-top: 1px solid rgba(163, 36, 59, 0.08); }

.track {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 60px;
  padding: 8px 10px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background 0.25s var(--ease), transform 0.2s var(--ease-bounce);
}
@media (hover: hover) {
  .track:hover { background: rgba(242, 196, 206, 0.35); }
}
.track:active { transform: scale(0.985); }

.track__num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--gold);
  text-align: center;
}
.track__text { display: flex; flex-direction: column; min-width: 0; }
.track__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.06rem;
  line-height: 1.2;
  color: var(--text);
  overflow-wrap: anywhere;
}
.track__artist {
  margin-top: 2px;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--text-soft);
}
.track__end {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--wine);
}
.track .eq { display: none; }
.track__heart { width: 16px; height: 16px; fill: var(--gold); }

.track--featured .track__title { font-size: 1.2rem; font-style: italic; color: var(--burgundy); }

.track.is-current {
  background: linear-gradient(90deg, rgba(242, 196, 206, 0.65), rgba(248, 225, 230, 0.35));
  box-shadow: inset 0 0 0 1px rgba(201, 162, 75, 0.45);
}
.track.is-current .track__title { color: var(--burgundy); }
.track.is-current .eq { display: inline-flex; }

@media (min-width: 720px) {
  .mixtape {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 0 28px;
    padding: 34px 26px 22px;
  }
  .tracklist {
    margin: 0;
    padding: 0 0 0 22px;
    border-top: 0;
    border-left: 1px solid rgba(201, 162, 75, 0.4);
    align-self: start;
  }
}

/* ==========================================================
   MEMORIES (polaroids)
   ========================================================== */
.memories-list {
  display: grid;
  gap: 52px;
  padding-top: 14px;
}
@media (min-width: 640px) {
  .memories-list { grid-template-columns: 1fr 1fr; gap: 40px 34px; }
}

.polaroid {
  position: relative;
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
  padding: 12px 12px 22px;
  border-radius: 4px;
  background: linear-gradient(180deg, #fff, #fdfaf7);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 16px 34px rgba(74, 14, 28, 0.18);
  rotate: var(--tilt, -2deg);
  transition: rotate 0.6s var(--ease-bounce), scale 0.6s var(--ease-bounce), opacity 0.9s var(--ease), translate 1s var(--ease);
}
.polaroid::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: -15px;
  left: 50%;
  width: 112px;
  height: 30px;
  margin-left: -56px;
  rotate: -4deg;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.3) 70%, rgba(255, 255, 255, 0.05)),
    rgba(230, 207, 150, 0.68);
  clip-path: polygon(3% 0, 97% 5%, 100% 30%, 98% 60%, 100% 100%, 2% 96%, 0 70%, 2% 40%);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}
@media (hover: hover) {
  .polaroid:hover { rotate: 0deg; scale: 1.02; }
}

.polaroid__media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 2px;
  background:
    radial-gradient(circle at 28% 24%, rgba(255, 255, 255, 0.85), transparent 45%),
    linear-gradient(145deg, var(--blush-soft), var(--blush) 60%, #e9a6b6);
  box-shadow: inset 0 0 0 1px rgba(74, 14, 28, 0.06);
}
.polaroid__media--empty::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 44 44'%3E%3Cpath transform='translate(4 4) scale(.5)' fill='%23ffffff' fill-opacity='.45' d='M12 21s-7.5-4.6-9.6-9.2C.9 8 3.2 4 7 4c2.1 0 3.6 1.1 5 3 1.4-1.9 2.9-3 5-3 3.8 0 6.1 4 4.6 7.8C19.5 16.4 12 21 12 21z'/%3E%3C/svg%3E");
}
.polaroid__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.polaroid__emoji {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: clamp(4rem, 21vw, 5.6rem);
  line-height: 1;
  filter: drop-shadow(0 10px 14px rgba(74, 14, 28, 0.25));
}

.memory__tag {
  position: absolute;
  z-index: 3;
  top: 24px;
  right: -6px;
  padding: 6px 14px 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--wine), var(--burgundy));
  color: var(--paper);
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 1.2rem;
  line-height: 1;
  rotate: 5deg;
  box-shadow: 0 6px 14px rgba(74, 14, 28, 0.3), inset 0 0 0 1.5px rgba(230, 207, 150, 0.6);
}

.polaroid__body { padding: 16px 6px 0; }

.memory__title {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 1.55rem;
  line-height: 1.15;
  color: var(--burgundy);
}
.memory__text {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--text-soft);
}

/* ==========================================================
   GALLERY
   ========================================================== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 14px;
}
@media (min-width: 620px) {
  .gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px 22px; }
}

.gframe {
  display: block;
  width: 100%;
  margin: 0;
  padding: 8px 8px 10px;
  border: 0;
  border-radius: 3px;
  background: #fff;
  text-align: center;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 10px 24px rgba(74, 14, 28, 0.14);
  rotate: var(--tilt, 0deg);
  transition: rotate 0.5s var(--ease-bounce), scale 0.5s var(--ease-bounce), opacity 0.9s var(--ease), translate 1s var(--ease);
}
.gframe--photo {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-self: start;
  cursor: zoom-in;
}
@media (hover: hover) {
  .gframe--photo:hover { rotate: 0deg; scale: 1.03; }
}
.gframe--photo:active { scale: 0.98; }

.gframe__media {
  position: relative;
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 2px;
  background: var(--blush-soft);
}
.gframe__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gframe--empty .gframe__media {
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.8), transparent 50%),
    var(--blush-soft);
}
.gframe--empty .gframe__media::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 2px dashed rgba(163, 36, 59, 0.3);
  border-radius: 3px;
}
.gframe__icon {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--rose);
}
.gframe__icon svg { width: 34%; max-width: 46px; height: auto; opacity: 0.85; }

.gframe__caption {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.3em;
  margin: 8px 2px 0;
  font-family: var(--font-hand);
  font-weight: 500;
  font-size: 1.18rem;
  line-height: 1.1;
  color: var(--text);
}

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding:
    max(72px, calc(env(safe-area-inset-top) + 64px))
    max(16px, env(safe-area-inset-right))
    max(40px, env(safe-area-inset-bottom))
    max(16px, env(safe-area-inset-left));
  background: rgba(43, 7, 16, 0.94);
  opacity: 0;
  transition: opacity 0.25s var(--ease);
}
.lightbox.is-open { opacity: 1; }

.lightbox__figure {
  margin: 0;
  max-width: min(100%, 900px);
  text-align: center;
  touch-action: pan-y pinch-zoom;
  scale: 0.96;
  transition: scale 0.35s var(--ease);
}
.lightbox.is-open .lightbox__figure { scale: 1; }

.lightbox__img {
  width: auto;
  max-width: 100%;
  max-height: 72vh;
  max-height: 72svh;
  margin: 0 auto;
  border: 8px solid #fff;
  border-radius: 3px;
  background: #fff;
  box-shadow: var(--shadow-lg);
}
.lightbox__caption {
  min-height: 1.4em;
  margin-top: 12px;
  font-family: var(--font-hand);
  font-size: 1.55rem;
  line-height: 1.2;
  color: var(--paper);
}

.lb-btn {
  position: absolute;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(230, 207, 150, 0.5);
  background: rgba(74, 14, 28, 0.7);
  color: var(--paper);
  cursor: pointer;
}
.lb-btn svg { width: 22px; height: 22px; }
.lightbox__close {
  top: max(14px, env(safe-area-inset-top));
  right: max(14px, env(safe-area-inset-right));
}
.lightbox__nav { top: 50%; margin-top: -24px; }
.lightbox__prev { left: max(8px, env(safe-area-inset-left)); }
.lightbox__next { right: max(8px, env(safe-area-inset-right)); }

/* ==========================================================
   NOSE + CERTIFICATE
   ========================================================== */
.nose__body {
  margin: 18px auto 0;
  max-width: 40ch;
  font-size: 1.04rem;
  line-height: 1.7;
}

.cert-frame {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
  padding: 10px;
  border-radius: 4px;
  background: linear-gradient(135deg, #f6e6b6 0%, var(--gold) 22%, #8c6a22 48%, var(--gold-soft) 70%, #a88330 100%);
  box-shadow:
    0 34px 70px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(0, 0, 0, 0.35),
    inset 0 0 0 1px rgba(255, 245, 210, 0.6);
  rotate: -0.8deg;
}
.cert-frame::before {
  /* a hanging wire, because it's framed */
  content: "";
  position: absolute;
  top: -34px;
  left: 50%;
  width: 120px;
  height: 40px;
  margin-left: -60px;
  border: 1.5px solid rgba(230, 207, 150, 0.55);
  border-bottom: 0;
  border-radius: 60px 60px 0 0 / 40px 40px 0 0;
  clip-path: polygon(0 0, 100% 0, 100% 80%, 0 80%);
}
.cert-frame::after {
  content: "";
  position: absolute;
  top: -40px;
  left: 50%;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fbeec7, var(--gold) 55%, #7d5c1c);
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.4);
}

.cert {
  position: relative;
  padding: 46px 30px 30px;
  color: var(--text);
  text-align: center;
  background:
    radial-gradient(ellipse at center, rgba(255, 255, 255, 0.7), transparent 70%),
    radial-gradient(ellipse at center, transparent 60%, rgba(201, 162, 75, 0.16) 100%),
    var(--cream);
  outline: 4px double var(--gold);
  outline-offset: -14px;
  box-shadow: inset 0 0 0 1px rgba(140, 106, 34, 0.5), inset 0 0 30px rgba(140, 106, 34, 0.12);
}
.cert::before {
  content: "";
  position: absolute;
  inset: 22px;
  border: 1px solid rgba(201, 162, 75, 0.5);
  pointer-events: none;
}

.cert__corner {
  position: absolute;
  width: 48px;
  height: 48px;
  color: var(--gold);
}
.cert__corner--tl { top: 7px; left: 7px; }
.cert__corner--tr { top: 7px; right: 7px; transform: scaleX(-1); }
.cert__corner--bl { bottom: 7px; left: 7px; transform: scaleY(-1); }
.cert__corner--br { bottom: 7px; right: 7px; transform: scale(-1, -1); }

.cert__inner { position: relative; }

.cert__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(0.92rem, 3.6vw, 1.1rem);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--burgundy);
}
.cert__subtitle {
  margin: 4px 0 6px;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.75rem, 7.4vw, 2.4rem);
  line-height: 1.1;
  color: var(--burgundy-deep);
}
.cert__orn { width: 150px; }
.cert__line {
  margin: 14px auto 0;
  max-width: 30ch;
  font-family: var(--font-display);
  font-size: clamp(1.02rem, 4vw, 1.15rem);
  line-height: 1.5;
  color: var(--text);
}

.cert__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: center;
  gap: 14px 24px;
  margin-top: 22px;
}

.cert-seal {
  width: 96px;
  flex: none;
  rotate: -8deg;
  filter: drop-shadow(0 6px 8px rgba(74, 14, 28, 0.3));
}
.cert-seal__svg { width: 100%; height: auto; }
.cert-seal__ribbon { fill: var(--burgundy); }
.cert-seal__ribbon--b { fill: var(--wine); }
.cert-seal__text {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 7.4px;
  letter-spacing: 0.06em;
  fill: #6b4e14;
}

.cert__sign {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 150px;
}
.cert__signature {
  margin: 0;
  padding: 0 4px;
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: clamp(1.45rem, 6.4vw, 1.7rem);
  line-height: 1.05;
  color: var(--burgundy);
  rotate: -3deg;
}
.cert__sigline {
  display: block;
  width: 100%;
  height: 1px;
  margin-top: 4px;
  background: linear-gradient(90deg, transparent, var(--text-soft) 12%, var(--text-soft) 88%, transparent);
}
.cert__siglabel {
  margin-top: 4px;
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.cert__fine {
  margin: 22px auto 0;
  max-width: 34ch;
  font-size: 0.76rem;
  font-style: italic;
  line-height: 1.5;
  color: var(--text-soft);
}

/* ==========================================================
   CALIFORNIA (postcard + Golden Gate)
   ========================================================== */
.cal__intro {
  margin: 8px 0 0;
  font-family: var(--font-hand);
  font-weight: 500;
  font-size: clamp(1.5rem, 6vw, 1.85rem);
  line-height: 1.15;
  color: var(--wine);
}
.cal__body { margin-top: 16px; max-width: 38ch; }

.postcard {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
}

.postcard__front {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 10px;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 18px 38px rgba(74, 14, 28, 0.2);
  rotate: -1.6deg;
}
.postcard__front .gg {
  width: 100%;
  height: auto;
  aspect-ratio: 600 / 340;
  border-radius: 3px;
}

.gg-steel,
.gg-deck { fill: var(--bridge); }
.gg-truss { fill: #8e2f20; }
.gg-pier { fill: #6b2a33; }
.gg-cable { fill: none; stroke: var(--bridge); stroke-width: 2.6; stroke-linecap: round; }
.gg-cable--thin { stroke-width: 0.8; opacity: 0.85; }
.gg-brace { fill: none; stroke: #9a3524; stroke-width: 2.2; }
.gg-flute { fill: none; stroke: #fff; stroke-opacity: 0.2; stroke-width: 1; }
.gg-shade { fill: none; stroke: #5a1a12; stroke-opacity: 0.28; stroke-width: 2; }
.gg-reflect { opacity: 0.6; }
.gg-hill-far { fill: #c98593; opacity: 0.75; }
.gg-hill-near { fill: #6e1a30; }
.gg-glint { fill: none; stroke: #f8dca0; stroke-opacity: 0.6; stroke-width: 1.4; stroke-linecap: round; }
.gg-bird { fill: none; stroke: var(--burgundy-deep); stroke-opacity: 0.55; stroke-width: 1.4; stroke-linecap: round; }
.gg-fog { fill: #fff; }
.gg-fog--back { opacity: 0.55; animation: fog-drift 22s ease-in-out infinite alternate; }
.gg-fog--low { opacity: 0.7; animation: fog-drift-b 17s ease-in-out infinite alternate; }

@keyframes fog-drift {
  from { transform: translateX(-40px); }
  to { transform: translateX(46px); }
}
@keyframes fog-drift-b {
  from { transform: translateX(36px); }
  to { transform: translateX(-52px); }
}
.gg--still .gg-fog { animation: none; }

.postcard__back {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "marks" "line" "addr";
  gap: 14px;
  margin-top: -16px;
  padding: 24px 20px 22px;
  border: 7px solid transparent;
  border-image: repeating-linear-gradient(135deg,
    var(--wine) 0 9px, var(--paper) 9px 15px, var(--rose) 15px 24px, var(--paper) 24px 30px) 7;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(255, 255, 255, 0.9), transparent 60%),
    linear-gradient(180deg, #fffdf9, #fbf2e8);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 18px 38px rgba(74, 14, 28, 0.18);
  rotate: 1.1deg;
}

.postcard__line {
  grid-area: line;
  margin: 0;
  font-family: var(--font-hand);
  font-weight: 500;
  font-size: clamp(1.45rem, 5.6vw, 1.75rem);
  line-height: 38px;
  color: var(--burgundy-deep);
  background-image: repeating-linear-gradient(180deg, transparent 0 37px, rgba(163, 36, 59, 0.18) 37px 38px);
  padding-bottom: 1px;
}

.postcard__marks {
  grid-area: marks;
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
}

.postmark {
  position: relative;
  z-index: 2;
  width: 132px;
  height: auto;
  margin: 26px -46px 0 0;
  color: rgba(74, 14, 28, 0.5);
  rotate: -9deg;
}
.postmark__text {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 7px;
  letter-spacing: 0.05em;
  fill: currentColor;
}

.stamp {
  flex: none;
  width: 90px;
  height: 110px;
  padding: 6px;
  background: radial-gradient(circle, transparent 3px, #fff 3.5px) -5px -5px / 10px 10px;
  filter: drop-shadow(0 2px 3px rgba(43, 7, 16, 0.22));
  rotate: 3deg;
}
.stamp__inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 4px;
  background: #fff;
  border: 1px solid rgba(128, 0, 32, 0.25);
}
.stamp__art { width: 100%; height: auto; flex: none; }
.stamp__text {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 2px;
  font-size: 8px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  color: var(--burgundy);
}

.postcard__address { grid-area: addr; }
.postcard__address span {
  display: block;
  height: 36px;
  border-bottom: 1px solid rgba(43, 7, 16, 0.25);
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 1.6rem;
  line-height: 44px;
  color: var(--burgundy);
  padding-left: 6px;
}

@media (min-width: 560px) {
  .postcard__back {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    grid-template-areas: "line marks" "line addr";
    gap: 10px 0;
    padding: 40px 26px 26px;
  }
  .postcard__line {
    padding-right: 20px;
    margin-right: 20px;
    border-right: 1px solid rgba(43, 7, 16, 0.16);
    align-self: stretch;
  }
  .postcard__address { align-self: end; }
}

/* ==========================================================
   CLOSING
   ========================================================== */
.section--closing {
  text-align: center;
  padding-bottom: calc(clamp(96px, 18vw, 140px) + env(safe-area-inset-bottom));
}
.closing__kicker { margin-bottom: 14px; }

.big-heart {
  position: relative;
  z-index: 2;
  width: clamp(108px, 30vw, 136px);
  margin: 0 auto -50px;
}
.big-heart__svg {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.4));
  animation: heartbeat 2.6s ease-in-out infinite;
  transform-origin: 50% 60%;
}
@keyframes heartbeat {
  0%, 60%, 100% { transform: scale(1); }
  10% { transform: scale(1.08); }
  20% { transform: scale(0.98); }
  30% { transform: scale(1.06); }
}

.sparkle {
  position: absolute;
  color: var(--gold-soft);
  animation: twinkle 2.4s ease-in-out infinite;
}
.sparkle--a { width: 18px; top: 4%; left: -16%; }
.sparkle--b { width: 12px; top: 52%; right: -14%; animation-delay: 0.8s; }
.sparkle--c { width: 10px; top: -6%; right: 4%; animation-delay: 1.5s; }
@keyframes twinkle {
  0%, 100% { opacity: 0.25; transform: scale(0.7) rotate(0deg); }
  50% { opacity: 1; transform: scale(1.1) rotate(20deg); }
}

.letter {
  position: relative;
  padding: 72px 26px 32px;
  border-radius: 6px;
  color: var(--text);
  text-align: left;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, 0.95), transparent 60%),
    radial-gradient(ellipse at center, transparent 55%, rgba(201, 162, 75, 0.14) 100%),
    var(--paper);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(201, 162, 75, 0.35);
  rotate: -0.6deg;
}
.letter::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(201, 162, 75, 0.45);
  border-radius: 3px;
  pointer-events: none;
}

.letter__title {
  margin: 0 0 18px;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.9rem, 7.4vw, 2.6rem);
  line-height: 1.12;
  text-align: center;
  color: var(--burgundy);
  text-wrap: balance;
}
.letter__body {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text);
}
.letter__signoff {
  margin: 24px 0 0;
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: clamp(1.45rem, 7.4vw, 2rem);
  line-height: 1.1;
  text-align: right;
  text-wrap: balance;
  color: var(--wine);
  rotate: -2deg;
}

.to-top {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  margin-top: 44px;
  padding: 0 26px;
  border-radius: 999px;
  border: 1px solid rgba(230, 207, 150, 0.6);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-on-dark);
  font-weight: 500;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s var(--ease-bounce);
}
.to-top:hover { background: rgba(255, 255, 255, 0.12); }
.to-top:active { transform: scale(0.97); }
.to-top__icon { display: inline-flex; width: 18px; height: 18px; color: var(--gold-soft); }
.to-top__icon svg { width: 100%; height: 100%; }

/* ==========================================================
   TROLL
   ========================================================== */
.troll {
  position: fixed;
  z-index: 60;
  left: max(14px, env(safe-area-inset-left));
  bottom: max(14px, calc(8px + env(safe-area-inset-bottom)));
  transition: opacity 0.35s var(--ease), translate 0.45s var(--ease), visibility 0s;
}
body.is-busy .troll,
body.is-lightbox .troll {
  opacity: 0;
  translate: 0 26px;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s var(--ease), translate 0.3s var(--ease), visibility 0s linear 0.3s;
}

.troll__btn {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  background: radial-gradient(circle at 35% 30%, #fff, var(--blush-soft) 70%, var(--blush));
  box-shadow: 0 8px 20px rgba(74, 14, 28, 0.28), inset 0 -2px 0 rgba(128, 0, 32, 0.08);
  cursor: pointer;
  animation: troll-in 0.7s var(--ease-bounce) 0.9s both;
  transition: translate 0.45s var(--ease-bounce), rotate 0.45s var(--ease-bounce);
}
/* Over words or cards: slide against the screen edge and peek (main.js).
   --troll-peek is how much stays on screen; it stays inside the page gutter. */
.troll { --troll-peek: 20px; }
@media (max-width: 359px) {
  .troll { --troll-peek: 16px; }
}
.troll.is-tucked .troll__btn {
  translate: calc(var(--troll-peek) - 52px - max(14px, env(safe-area-inset-left)) + env(safe-area-inset-left, 0px)) 0;
  rotate: 14deg;
  transition: translate 0.35s var(--ease), rotate 0.35s var(--ease);
}
.troll__face { transition: translate 0.35s var(--ease); }
.troll.is-tucked .troll__face { translate: 12px 0; }
.troll.is-tucked .troll__btn:focus-visible,
.troll.is-tucked .troll__btn:focus-visible .troll__face {
  translate: none;
  rotate: none;
}
.troll__face {
  display: block;
  font-size: 28px;
  line-height: 1;
  animation: troll-bob 3.4s ease-in-out 1.6s infinite;
}
.troll__btn.is-poked .troll__face { animation: troll-poke 0.45s var(--ease-bounce); }

@keyframes troll-in {
  from { opacity: 0; transform: scale(0.3) translateY(30px); }
  to { opacity: 1; transform: none; }
}
@keyframes troll-bob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  30% { transform: translateY(-3px) rotate(-6deg); }
  60% { transform: translateY(1px) rotate(5deg); }
}
@keyframes troll-poke {
  0% { transform: scale(1); }
  40% { transform: scale(1.3) rotate(-12deg); }
  100% { transform: scale(1); }
}

.troll__bubble {
  position: absolute;
  left: 2px;
  bottom: 64px;
  width: max-content;
  max-width: min(230px, calc(100vw - 40px));
  margin: 0;
  padding: 9px 15px 11px;
  border-radius: 18px 18px 18px 5px;
  background: linear-gradient(135deg, var(--wine), var(--burgundy));
  color: var(--paper);
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 1.3rem;
  line-height: 1.15;
  box-shadow: 0 10px 24px rgba(43, 7, 16, 0.3), inset 0 0 0 1px rgba(230, 207, 150, 0.4);
  opacity: 0;
  scale: 0.5;
  transform-origin: 12% 100%;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s var(--ease), scale 0.3s var(--ease), visibility 0s linear 0.3s;
}
.troll__bubble::after {
  content: "";
  position: absolute;
  left: 16px;
  bottom: -7px;
  border: 8px solid transparent;
  border-bottom: 0;
  border-top-color: var(--burgundy);
}
.troll__bubble.is-show {
  opacity: 1;
  scale: 1;
  visibility: visible;
  transition: opacity 0.2s var(--ease), scale 0.4s var(--ease-bounce), visibility 0s;
}

/* ==========================================================
   Reduced motion: keep it calm
   ========================================================== */
@media (prefers-reduced-motion: reduce) {
  .reveal,
  .hero-anim {
    opacity: 1 !important;
    translate: none !important;
    scale: none !important;
    transition: none !important;
  }
  .vinyl,
  .vinyl-wrap.is-swapping .vinyl,
  .vinyl-wrap.is-swapping .tonearm,
  .eq i,
  .hero__chev,
  .envelope,
  .big-heart__svg,
  .sparkle,
  .troll__face,
  .troll__btn,
  .gg-fog {
    animation: none !important;
  }
  .troll__face,
  .troll__btn {
    transition-duration: 0.01s !important;
  }
  .gate,
  .gate__inner,
  .envelope__flap,
  .envelope__letter,
  .envelope__seal {
    transition-duration: 0.01s !important;
    transition-delay: 0s !important;
  }
  .petals { display: none; }
}
