:root {
  --ink: #352315;
  --muted: #806955;
  --cream: #fff4dc;
  --paper: #ffe8bd;
  --rose: #c94f5d;
  --rose-dark: #7f2633;
  --marigold: #e9a83b;
  --leaf: #526f48;
  --sky: #9ec6c0;
  --shadow: 0 24px 70px rgba(66, 42, 22, 0.22);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Plus Jakarta Sans", sans-serif;
  overflow-x: hidden;
  cursor: url("assets/flower-cursor.svg") 12 12, auto;
  background:
    radial-gradient(circle at 12% 14%, rgba(255, 255, 255, 0.82) 0 8%, transparent 22%),
    radial-gradient(circle at 86% 8%, rgba(233, 168, 59, 0.28) 0 9%, transparent 23%),
    linear-gradient(135deg, #ffe7b8 0%, #fff7e8 38%, #f3c3b0 100%);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.42;
  background-image: url("assets/paper-grain.svg");
  mix-blend-mode: multiply;
  z-index: 1;
}
body.loading { overflow: hidden; }
body.gated main { filter: blur(12px) saturate(.8); transform: scale(.985); }
button, a, input, .letter-trigger, .memory-card { cursor: url("assets/flower-cursor.svg") 12 12, pointer; }

main { position: relative; z-index: 2; transition: filter .7s ease, transform .7s ease; }
a { color: inherit; }
img { display: block; max-width: 100%; }

.petal-loader {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #44281d;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}
.petal-loader.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-copy {
  z-index: 3;
  width: min(86vw, 640px);
  text-align: center;
  color: #fff4dc;
  animation: loaderFloat 2.5s ease-in-out infinite;
}
.loader-copy span {
  font-family: "Caveat", cursive;
  font-size: clamp(1.6rem, 5vw, 3rem);
  color: #ffd77b;
}
.loader-copy h1 {
  margin: 0.3rem 0 0;
  font-family: "DM Serif Display", serif;
  font-size: clamp(2.5rem, 8vw, 6.8rem);
  line-height: 0.9;
  font-weight: 400;
}
.flower-curtain,
.flower-curtain::before,
.flower-curtain::after {
  position: absolute;
  inset: -15%;
  content: "";
  background-image: url("assets/curtain-flower.svg");
  background-size: 170px 170px;
  animation: curtainBloom 3.2s ease forwards;
}
.flower-curtain::before { transform: rotate(17deg) scale(1.08); opacity: 0.76; animation-delay: 0.25s; }
.flower-curtain::after { transform: rotate(-12deg) scale(0.93); opacity: 0.65; animation-delay: 0.45s; }

#petalCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
}

.music-bloom {
  position: fixed;
  inset: 0;
  z-index: 25;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 58%, rgba(201,79,93,.18), transparent 28%),
    #020202;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .75s ease, visibility .75s ease;
}
.music-bloom.is-active { opacity: 1; visibility: visible; pointer-events: auto; }
.music-bloom::before {
  content: "";
  position: absolute;
  inset: -10%;
  background-image: url("assets/curtain-flower.svg");
  background-size: 180px;
  opacity: .1;
  animation: bloomDrift 18s linear infinite;
}
.bloom-close {
  position: absolute;
  right: 22px;
  top: 22px;
  z-index: 8;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 999px;
  padding: 12px 18px;
  background: rgba(255,255,255,.08);
  color: #fff4dc;
  font-weight: 900;
}
.bloom-copy {
  position: absolute;
  left: clamp(18px, 5vw, 70px);
  bottom: clamp(24px, 7vw, 80px);
  z-index: 7;
  max-width: 620px;
  color: #fff4dc;
}
.bloom-copy span { color: #ffd77b; text-transform: uppercase; letter-spacing: .18em; font-weight: 900; font-size: .78rem; }
.bloom-copy h2 { margin: 8px 0 12px; font-size: clamp(4rem, 13vw, 10rem); color: #fff4dc; }
.bloom-copy p { margin: 0; color: rgba(255,244,220,.72); line-height: 1.7; }
.bloom-stage { position: absolute; inset: 0; z-index: 3; }
.bloom-photo {
  position: absolute;
  width: clamp(150px, 22vw, 300px);
  height: clamp(210px, 30vw, 410px);
  padding: 10px 10px 46px;
  border-radius: 16px;
  background: #fffaf0;
  box-shadow: 0 30px 70px rgba(0,0,0,.52);
  opacity: 0;
  transform: translate(-50%, -50%) scale(.7) rotate(var(--r));
  animation: photoBloom 6.4s ease forwards;
}
.bloom-photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }
.bloom-photo figcaption { margin-top: 9px; color: var(--ink); font-size: 1.25rem; }
.bloom-petal {
  position: absolute;
  top: -40px;
  font-size: 1.7rem;
  color: var(--c);
  opacity: .9;
  animation: bloomFall var(--d) linear forwards;
}

.pass-gate {
  position: fixed;
  inset: 0;
  z-index: 15;
  display: grid;
  place-items: center;
  padding: 18px;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 215, 123, .34), transparent 26%),
    radial-gradient(circle at 80% 70%, rgba(201, 79, 93, .26), transparent 26%),
    rgba(53, 35, 21, .42);
  backdrop-filter: blur(12px);
  transition: opacity .7s ease, visibility .7s ease;
}
.pass-gate.is-opened { opacity: 0; visibility: hidden; pointer-events: none; }
.gate-card {
  width: min(680px, 100%);
  padding: clamp(28px, 5vw, 56px);
  border: 1px solid rgba(255, 244, 220, .42);
  border-radius: 34px;
  text-align: center;
  background:
    url("assets/vine-corner.svg") left -55px top -55px / 230px no-repeat,
    linear-gradient(145deg, rgba(255,250,240,.96), rgba(255,226,184,.94));
  box-shadow: 0 34px 100px rgba(27, 15, 9, .42);
  transform: rotate(-1deg);
}
.gate-card h2 { font-size: clamp(2.5rem, 7vw, 5.8rem); }
.gate-card p { color: var(--muted); line-height: 1.7; }
.gate-card form { display: flex; gap: 10px; margin: 26px auto 14px; max-width: 520px; }
.gate-card input {
  min-width: 0;
  flex: 1;
  border: 1px solid rgba(127, 38, 51, .22);
  border-radius: 999px;
  padding: 14px 18px;
  background: #fffaf0;
  color: var(--ink);
  font: 800 1rem "Plus Jakarta Sans", sans-serif;
  outline: none;
}
.gate-card input:focus { box-shadow: 0 0 0 5px rgba(201,79,93,.14); }
.gate-card small { display: block; color: var(--rose-dark); font-weight: 800; }
.gate-card.is-wrong { animation: nope .34s ease; }

.panel {
  width: min(1120px, calc(100% - 32px));
  margin: 32px auto;
  border: 1px solid rgba(78, 51, 29, 0.16);
  border-radius: 34px;
  box-shadow: var(--shadow);
}
.hero {
  min-height: calc(100vh - 64px);
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 34px;
  align-items: center;
  padding: clamp(28px, 5vw, 72px);
  background:
    url("assets/vine-corner.svg") top left / 260px no-repeat,
    linear-gradient(115deg, rgba(255, 248, 230, 0.92), rgba(255, 226, 184, 0.86));
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "love archive";
  position: absolute;
  right: -38px;
  bottom: 36px;
  font-family: "Fraunces", serif;
  font-size: clamp(4rem, 11vw, 10rem);
  line-height: 1;
  color: rgba(127, 38, 51, 0.08);
  transform: rotate(-8deg);
}
.eyebrow, .chapter {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 800;
  color: var(--rose-dark);
  font-size: 0.78rem;
}
h1, h2 {
  font-family: "Fraunces", serif;
  line-height: 0.92;
  margin: 10px 0 18px;
}
h1 { font-size: clamp(4rem, 12vw, 10rem); max-width: 780px; }
h2 { font-size: clamp(2.8rem, 7vw, 6.2rem); }
.lead, .finale p, .page-copy p, .quote-card p { font-size: clamp(1rem, 1.7vw, 1.25rem); line-height: 1.8; color: var(--muted); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.button {
  border: 0;
  border-radius: 999px;
  padding: 14px 22px;
  background: var(--ink);
  color: var(--cream);
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(53, 35, 21, 0.22);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.button:hover { transform: translateY(-3px) rotate(-1deg); box-shadow: 0 18px 34px rgba(53, 35, 21, 0.28); }
.button--ghost { background: #fff8e9; color: var(--rose-dark); border: 1px solid rgba(127, 38, 51, 0.18); }

.hero__collage { position: relative; min-height: 620px; }
.photo-card, .scrap, .polaroid-row figure {
  background: #fffaf0;
  padding: 14px 14px 54px;
  border-radius: 12px;
  box-shadow: 0 24px 54px rgba(58, 36, 16, 0.28);
  position: absolute;
}
.photo-card img, .scrap img, .polaroid-row img { width: 100%; height: 100%; object-fit: cover; border-radius: 7px; filter: saturate(0.96) contrast(1.04); }
.photo-card--big { width: min(78%, 430px); height: 550px; left: 10%; top: 12px; }
.photo-card--small { width: 230px; height: 310px; right: 2%; bottom: 38px; z-index: 2; }
.tilt-left { transform: rotate(-5deg); }
.tilt-right { transform: rotate(8deg); }
.stamp {
  position: absolute;
  right: 12%;
  top: 8%;
  z-index: 4;
  border: 2px dashed var(--rose-dark);
  border-radius: 50%;
  padding: 24px 17px;
  color: var(--rose-dark);
  font-family: "Caveat", cursive;
  font-size: 1.8rem;
  transform: rotate(14deg);
  background: rgba(255, 248, 233, 0.74);
}
.pressed-flower { position: absolute; width: 155px; z-index: 5; filter: drop-shadow(0 15px 13px rgba(66,42,22,.22)); }
.flower-one { left: 0; bottom: 40px; transform: rotate(-18deg); }
.flower-two { right: 3%; top: 37%; transform: rotate(32deg) scale(.78); }

.love-note {
  max-width: 900px;
  padding: clamp(28px, 5vw, 60px);
  background: #fff9ed;
  transform: rotate(-1deg);
  position: relative;
}
.love-note p { font-family: "Caveat", cursive; font-size: clamp(2rem, 5vw, 4rem); line-height: 1.08; margin: 0; }
.note-pin { position: absolute; top: -18px; left: 50%; width: 38px; height: 38px; border-radius: 50%; background: var(--rose); box-shadow: inset -8px -8px 0 rgba(0,0,0,.12), 0 12px 20px rgba(0,0,0,.15); }

.scrapbook { width: min(1180px, calc(100% - 24px)); margin: 56px auto; display: grid; gap: 38px; }
.spread {
  min-height: 760px;
  border-radius: 38px;
  padding: clamp(24px, 4vw, 58px);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: linear-gradient(100deg, #ffecc8, #fff9eb);
}
.spread::before {
  content: "";
  position: absolute;
  inset: 20px;
  border: 1px dashed rgba(80, 53, 28, 0.2);
  border-radius: 28px;
  pointer-events: none;
}
.spread--two { background: linear-gradient(130deg, #f6c6ac, #ffe8bd 48%, #c8d9bf); }
.spread--three { background: linear-gradient(135deg, #3e2a1f, #7f2633 52%, #e9a83b); color: #fff7e7; }
.page-copy { max-width: 490px; position: relative; z-index: 2; }
.page-copy--dark p, .page-copy--dark li { color: rgba(255,247,231,.82); }
.page-copy ul { padding-left: 1.15rem; line-height: 2; font-size: 1.1rem; }
.scrap { width: 310px; height: 420px; }
.scrap figcaption, .polaroid-row figcaption {
  margin-top: 12px;
  text-align: center;
  font-family: "Caveat", cursive;
  font-size: 1.55rem;
  color: var(--ink);
}
.scrap--a { right: 10%; top: 90px; transform: rotate(7deg); }
.scrap--b { left: 13%; bottom: 52px; transform: rotate(-9deg); }
.scrap--c { left: 6%; top: 70px; transform: rotate(-6deg); }
.scrap--d { right: 8%; bottom: 56px; transform: rotate(8deg); }
.scrap--e { right: 10%; top: 68px; transform: rotate(5deg); }
.scrap--f { left: 10%; bottom: 58px; transform: rotate(-7deg); }
.quote-card {
  position: absolute;
  left: 36%;
  top: 32%;
  width: min(390px, 54vw);
  padding: 34px;
  border-radius: 28px;
  background: rgba(255, 250, 240, 0.88);
  box-shadow: 0 20px 45px rgba(72, 44, 24, 0.2);
  transform: rotate(2deg);
}
.postage { position: absolute; width: 78px; right: 22px; top: -24px; }

.polaroid-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 3vw, 34px);
  padding: clamp(16px, 3vw, 34px);
}
.polaroid-row figure { position: relative; height: 450px; margin: 0; transform: rotate(var(--r)); }
.polaroid-row figure:nth-child(1) { --r: -4deg; }
.polaroid-row figure:nth-child(2) { --r: 3deg; margin-top: 30px; }
.polaroid-row figure:nth-child(3) { --r: -2deg; }
.letter-trigger { cursor: pointer; }
.letter-trigger::after {
  content: "klik buat surat";
  position: absolute;
  left: 18px;
  top: 18px;
  padding: 8px 11px;
  border-radius: 999px;
  background: rgba(53, 35, 21, 0.78);
  color: #fff4dc;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  opacity: 0;
  transform: translateY(8px) rotate(-2deg);
  transition: opacity .25s ease, transform .25s ease;
  pointer-events: none;
  z-index: 6;
}
.letter-trigger:hover::after { opacity: 1; transform: translateY(0) rotate(-2deg); }

.timeline {
  padding: clamp(30px, 5vw, 68px);
  background:
    radial-gradient(circle at 15% 18%, rgba(255,255,255,.7) 0 8%, transparent 20%),
    linear-gradient(135deg, rgba(255,249,237,.95), rgba(200,217,191,.86));
  position: relative;
  overflow: hidden;
}
.timeline::after {
  content: "";
  position: absolute;
  right: -80px;
  bottom: -90px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: rgba(201,79,93,.16);
}
.timeline__intro { max-width: 820px; position: relative; z-index: 2; }
.timeline__intro h2 { max-width: 900px; }
.type-line {
  min-height: 74px;
  max-width: 720px;
  color: var(--muted);
  font-family: "Caveat", cursive;
  font-size: clamp(1.8rem, 4vw, 3.3rem);
  line-height: 1.05;
}
.type-line::after, .caret::after {
  content: "";
  display: inline-block;
  width: .55em;
  height: 1em;
  margin-left: 4px;
  border-right: 3px solid var(--rose-dark);
  transform: translateY(4px);
  animation: blink .75s steps(1) infinite;
}
.timeline__track {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 34px;
  position: relative;
  z-index: 2;
}
.timeline__track::before {
  content: "";
  position: absolute;
  left: 7%;
  right: 7%;
  top: 42px;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--rose), var(--marigold), transparent);
  opacity: .42;
}
.timeline__track--short {
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  max-width: 760px;
}
.timeline__track--short::before { right: 18%; }
.memory-card {
  min-height: 230px;
  padding: 24px;
  border: 1px solid rgba(80, 53, 28, 0.15);
  border-radius: 28px;
  background: rgba(255, 250, 240, 0.78);
  box-shadow: 0 18px 40px rgba(58, 36, 16, 0.14);
  cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
}
.memory-card:hover { transform: translateY(-8px) rotate(-1deg); background: #fffaf0; box-shadow: 0 26px 54px rgba(58, 36, 16, 0.2); }
.memory-card span {
  display: inline-grid;
  place-items: center;
  min-width: 78px;
  height: 78px;
  padding: 0 10px;
  border-radius: 50%;
  background: var(--rose-dark);
  color: var(--cream);
  font-family: "Caveat", cursive;
  font-size: 1.4rem;
  box-shadow: inset -9px -9px 0 rgba(0,0,0,.12);
}
.memory-card h3 {
  margin: 18px 0 10px;
  font-family: "Fraunces", serif;
  font-size: 1.7rem;
  line-height: 1;
}
.memory-card p { margin: 0; color: var(--muted); line-height: 1.6; }

.letter-modal {
  width: min(760px, calc(100% - 28px));
  border: 0;
  padding: 0;
  overflow: visible;
  color: var(--ink);
  background: transparent;
}
.letter-modal::backdrop {
  background: rgba(39, 24, 15, 0.52);
  backdrop-filter: blur(8px);
}
.letter-paper {
  min-height: 390px;
  padding: clamp(28px, 5vw, 58px);
  border: 1px solid rgba(80, 53, 28, 0.18);
  border-radius: 30px;
  background:
    url("assets/vine-corner.svg") right -70px bottom -80px / 260px no-repeat,
    linear-gradient(145deg, #fffaf0, #ffe5bb);
  box-shadow: 0 34px 100px rgba(20, 12, 8, 0.42);
  transform: rotate(-1.2deg);
}
.letter-paper h2 { font-size: clamp(2.4rem, 6vw, 5rem); }
.letter-paper p {
  min-height: 150px;
  font-family: "Caveat", cursive;
  font-size: clamp(1.8rem, 4vw, 3.1rem);
  line-height: 1.12;
  margin: 0;
}
.letter-modal__close {
  position: absolute;
  right: -12px;
  top: -12px;
  z-index: 3;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  color: var(--cream);
  font-size: 1.4rem;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(0,0,0,.24);
}

.wrapped {
  padding: clamp(30px, 5vw, 68px);
  background:
    radial-gradient(circle at 16% 18%, rgba(255,255,255,.72) 0 8%, transparent 22%),
    linear-gradient(135deg, #254539, #9f3542 48%, #f1c37d);
  color: #fff7e7;
  overflow: hidden;
}
.wrapped .eyebrow { color: #ffd77b; }
.wrapped__intro {
  display: grid;
  grid-template-columns: minmax(260px, 620px) 1fr;
  gap: 24px;
  align-items: end;
  margin-bottom: 28px;
}
.wrapped__intro h2 { margin: 8px 0 0; font-size: clamp(2.8rem, 7vw, 6.6rem); }
.wrapped__intro p:last-child { color: rgba(255,247,231,.82); line-height: 1.75; }
.music-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 24px;
  align-items: center;
  width: min(720px, 100%);
  padding: 18px;
  border-radius: 34px;
  background: rgba(255,250,240,.14);
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.05), 0 22px 55px rgba(30,18,10,.18);
}
.album-art { position: relative; width: 180px; height: 180px; }
.album-art img { width: 100%; height: 100%; object-fit: cover; border-radius: 24px; position: relative; z-index: 2; box-shadow: 0 18px 34px rgba(20,12,8,.25); }
.vinyl {
  position: absolute;
  right: -52px;
  top: 18px;
  width: 144px;
  height: 144px;
  border-radius: 50%;
  background:
    radial-gradient(circle, #ffd77b 0 10%, #2c1d16 11% 22%, #111 23% 100%);
  box-shadow: 0 16px 34px rgba(20,12,8,.28);
  animation: spinRecord 7s linear infinite;
}
.track-copy { position: relative; z-index: 3; }
.track-copy span { text-transform: uppercase; letter-spacing: .18em; font-weight: 900; color: #ffd77b; font-size: .76rem; }
.track-copy h3 { margin: 8px 0 0; font-family: "Fraunces", serif; font-size: clamp(2.4rem, 5vw, 4.6rem); line-height: .9; }
.track-copy p { margin: 8px 0 20px; color: rgba(255,247,231,.78); }
.play-button {
  border: 0;
  border-radius: 999px;
  padding: 13px 20px;
  background: #fff7e7;
  color: #254539;
  font-weight: 900;
  box-shadow: 0 14px 30px rgba(20,12,8,.2);
}
.wrapped-slider { display: none; grid-template-columns: 54px 1fr 54px; gap: 12px; align-items: center; margin-top: 28px; }
.slide-window { position: relative; min-height: 500px; }
.wrapped-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(240px, 390px) 1fr;
  gap: clamp(18px, 4vw, 48px);
  align-items: center;
  opacity: 0;
  transform: translateX(34px) scale(.98);
  pointer-events: none;
  transition: opacity .55s ease, transform .55s ease;
}
.wrapped-slide.is-active { opacity: 1; transform: none; pointer-events: auto; }
.wrapped-slide figure {
  margin: 0;
  height: 470px;
  padding: 13px 13px 58px;
  border-radius: 18px;
  background: #fffaf0;
  color: var(--ink);
  box-shadow: 0 28px 64px rgba(20,12,8,.28);
  transform: rotate(-3deg);
}
.wrapped-slide:nth-child(2n) figure { transform: rotate(3deg); }
.wrapped-slide img { width: 100%; height: 100%; object-fit: cover; border-radius: 11px; }
.wrapped-slide p {
  margin: 0;
  max-width: 560px;
  font-family: "Caveat", cursive;
  font-size: clamp(2.2rem, 5vw, 4.3rem);
  line-height: 1.02;
  color: #fff7e7;
}
.slide-arrow {
  width: 54px;
  height: 54px;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 50%;
  background: rgba(255,250,240,.18);
  color: #fff7e7;
  font-size: 2.2rem;
  line-height: 1;
}
.slide-dots { display: none; justify-content: center; gap: 8px; margin-top: 16px; }
.slide-dots button {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.35);
}
.slide-dots button.is-active { width: 34px; border-radius: 999px; background: #ffd77b; }

.keepsake {
  display: grid;
  grid-template-columns: .95fr 1.05fr;
  gap: 24px;
  align-items: center;
  padding: clamp(30px, 5vw, 70px);
  background:
    radial-gradient(circle at 78% 22%, rgba(255,255,255,.72) 0 8%, transparent 22%),
    linear-gradient(135deg, rgba(255,249,237,.94), rgba(246,198,172,.88));
  overflow: hidden;
  position: relative;
}
.keepsake::before {
  content: "";
  position: absolute;
  inset: auto -40px -70px auto;
  width: 330px;
  height: 330px;
  background: url("assets/bouquet.svg") center / contain no-repeat;
  opacity: .18;
  transform: rotate(-15deg);
}
.reason-output {
  min-height: 130px;
  margin-top: 24px;
  padding: 24px;
  border-radius: 26px;
  background: rgba(255, 250, 240, .78);
  color: var(--rose-dark);
  font-family: "Caveat", cursive;
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  line-height: 1.05;
  box-shadow: inset 0 0 0 1px rgba(127,38,51,.12);
}
.jar-scene { min-height: 560px; position: relative; }
.glass-jar {
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: min(430px, 86vw);
  height: 530px;
  transform: translateX(-50%);
  background: url("assets/reason-jar.svg") center bottom / contain no-repeat;
  filter: drop-shadow(0 28px 42px rgba(58,36,16,.18));
}
.glass-jar span { display: none; }
.reason-slip {
  position: absolute;
  z-index: 4;
  border: 1px solid rgba(127,38,51,.12);
  border-radius: 12px;
  padding: 13px 19px;
  background: linear-gradient(145deg, #fffaf0, #ffe8bd);
  color: var(--rose-dark);
  font-family: "Caveat", cursive;
  font-size: 1.65rem;
  font-weight: 700;
  box-shadow: 0 16px 34px rgba(58,36,16,.16);
  transition: transform .25s ease, box-shadow .25s ease;
}
.reason-slip:hover { transform: translateY(-8px) rotate(var(--r)); box-shadow: 0 24px 45px rgba(58,36,16,.2); }
.slip-one { --r: -7deg; left: 4%; top: 9%; transform: rotate(-7deg); }
.slip-two { --r: 6deg; right: 3%; top: 17%; transform: rotate(6deg); }
.slip-three { --r: -3deg; left: 7%; bottom: 16%; transform: rotate(-3deg); }
.slip-four { --r: 8deg; right: 6%; bottom: 20%; transform: rotate(8deg); }

.secret-pocket {
  width: min(1120px, calc(100% - 28px));
  margin: 42px auto;
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 24px;
  align-items: stretch;
}
.pocket-card, .hidden-strip {
  border-radius: 34px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(78,51,29,.16);
  background: linear-gradient(145deg, #fff9ed, #ffdca9);
  padding: clamp(28px, 4vw, 52px);
}
.pocket-card h2 { font-size: clamp(2.7rem, 6vw, 5.8rem); }
.ribbon-pull {
  border: 0;
  width: min(360px, 100%);
  height: 96px;
  padding: 0;
  color: transparent;
  background: url("assets/ribbon-pull.svg") left center / contain no-repeat;
  filter: drop-shadow(0 18px 24px rgba(127,38,51,.22));
  transition: transform .25s ease, filter .25s ease;
}
.ribbon-pull:hover { transform: translateX(10px) rotate(-1deg); filter: drop-shadow(0 24px 30px rgba(127,38,51,.28)); }
.hidden-strip {
  display: grid;
  grid-template-columns: minmax(190px, 260px) minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  transform: translateX(-22px) rotate(-1deg);
  opacity: .42;
  max-height: 250px;
  overflow: hidden;
  transition: opacity .7s ease, transform .7s ease, max-height .7s ease;
}
.hidden-strip.is-open { opacity: 1; transform: none; max-height: 430px; }
.hidden-strip figure {
  width: 100%;
  max-width: 260px;
  margin: 0;
  height: 330px;
  padding: 12px 12px 50px;
  border-radius: 14px;
  background: #fffaf0;
  box-shadow: 0 20px 46px rgba(58,36,16,.2);
}
.hidden-strip p {
  margin: 0;
  max-width: 520px;
  font-family: "Caveat", cursive;
  font-size: clamp(1.9rem, 3.4vw, 3.25rem);
  line-height: 1.02;
  color: var(--rose-dark);
}

.torn-gallery {
  width: min(1240px, calc(100% - 22px));
  margin: 48px auto;
  padding: clamp(22px, 4vw, 40px);
  border-radius: 34px;
  border: 1px solid rgba(78,51,29,.16);
  box-shadow: var(--shadow);
  background:
    url("assets/paper-grain.svg"),
    radial-gradient(circle at 8% 12%, rgba(255,255,255,.68) 0 7%, transparent 20%),
    linear-gradient(145deg, #fff3dc, #f5c6a9 48%, #c8d9bf);
  overflow: hidden;
}
.torn-heading {
  display: grid;
  grid-template-columns: minmax(240px, 560px) 1fr;
  gap: 24px;
  align-items: end;
  margin-bottom: 24px;
}
.torn-heading h2 { margin: 8px 0 0; font-size: clamp(2.7rem, 6vw, 5.8rem); }
.torn-heading p:last-child { color: var(--muted); line-height: 1.7; }
.torn-board {
  position: relative;
  min-height: 930px;
  border-radius: 28px;
  background:
    linear-gradient(90deg, rgba(127,38,51,.08) 1px, transparent 1px) 0 0 / 34px 34px,
    linear-gradient(rgba(127,38,51,.08) 1px, transparent 1px) 0 0 / 34px 34px,
    rgba(255,250,240,.68);
  box-shadow: inset 0 0 0 1px rgba(78,51,29,.12);
  overflow: hidden;
}
.torn-piece {
  position: absolute;
  width: 230px;
  min-height: 300px;
  margin: 0;
  padding: 10px 10px 42px;
  background: #fffaf0;
  color: var(--ink);
  box-shadow: 0 18px 38px rgba(58,36,16,.2);
  clip-path: polygon(2% 4%, 15% 0, 32% 3%, 50% 0, 70% 4%, 91% 1%, 98% 8%, 96% 30%, 100% 50%, 96% 70%, 99% 92%, 87% 100%, 64% 97%, 45% 100%, 25% 96%, 7% 100%, 0 88%, 4% 68%, 0 48%, 4% 26%);
  transform: rotate(var(--r));
}
.torn-piece::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -10px;
  width: 82px;
  height: 28px;
  transform: translateX(-50%) rotate(var(--t, -4deg));
  background: rgba(255,255,255,.52);
  box-shadow: 0 8px 18px rgba(58,36,16,.1);
}
.torn-piece img { width: 100%; height: 235px; object-fit: cover; border-radius: 8px; }
.torn-piece figcaption { font-size: 1.28rem; }
.piece-one { --r: -7deg; --t: 4deg; left: 5%; top: 7%; }
.piece-two { --r: 5deg; --t: -7deg; left: 32%; top: 4%; }
.piece-three { --r: -3deg; --t: 6deg; right: 9%; top: 9%; }
.piece-four { --r: 6deg; --t: -4deg; left: 12%; top: 36%; }
.piece-five { --r: -5deg; --t: 3deg; left: 43%; top: 33%; }
.piece-six { --r: 4deg; --t: -6deg; right: 4%; top: 40%; }
.piece-seven { --r: -4deg; --t: 5deg; left: 4%; bottom: 6%; }
.piece-eight { --r: 7deg; --t: -5deg; left: 36%; bottom: 5%; }
.piece-nine { --r: -6deg; --t: 4deg; right: 11%; bottom: 4%; }
.torn-note {
  position: absolute;
  left: 50%;
  top: 53%;
  width: min(300px, 70vw);
  padding: 22px;
  transform: translate(-50%, -50%) rotate(-2deg);
  background: #ffe38d;
  box-shadow: 0 16px 34px rgba(58,36,16,.18);
  font-family: "Caveat", cursive;
  font-size: 2.15rem;
  line-height: 1.02;
  color: var(--ink);
}

.finale {
  text-align: center;
  padding: clamp(36px, 6vw, 74px);
  background: linear-gradient(145deg, rgba(255,250,239,.94), rgba(255,222,174,.9));
  margin-bottom: 70px;
}
.bouquet { width: min(320px, 70vw); margin: 0 auto 14px; animation: breathe 4s ease-in-out infinite; }
.finale .button { margin: 8px 7px; }
.final-letter {
  width: min(760px, 100%);
  min-height: 0;
  margin: 24px auto 10px;
  padding: 0 26px;
  border-radius: 28px;
  background: rgba(255, 250, 240, .72);
  font-family: "Caveat", cursive;
  font-size: clamp(1.7rem, 3vw, 2.7rem);
  line-height: 1.12;
  text-align: left;
  color: var(--rose-dark);
  max-height: 0;
  overflow: hidden;
  transition: max-height .8s ease, padding .8s ease, box-shadow .8s ease;
}
.final-letter.is-writing {
  max-height: 520px;
  padding: 26px;
  box-shadow: inset 0 0 0 1px rgba(127,38,51,.14), 0 20px 44px rgba(58,36,16,.14);
}

.reveal { opacity: 0; transform: translateY(34px) scale(.98); transition: opacity .9s ease, transform .9s cubic-bezier(.2,.8,.2,1); }
.reveal.is-visible { opacity: 1; transform: none; }

@keyframes loaderFloat { 50% { transform: translateY(-12px); } }
@keyframes curtainBloom {
  0% { transform: scale(1.35) rotate(0deg); filter: blur(0); }
  65% { transform: scale(1) rotate(8deg); }
  100% { transform: scale(2.6) rotate(22deg); filter: blur(4px); opacity: 0; }
}
@keyframes breathe { 50% { transform: translateY(-10px) rotate(2deg) scale(1.03); } }
@keyframes spinRecord { to { transform: rotate(360deg); } }
@keyframes bloomDrift { to { transform: translateY(180px) rotate(12deg); } }
@keyframes photoBloom {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.62) rotate(calc(var(--r) - 12deg)); filter: blur(8px); }
  18%, 72% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(var(--r)); filter: blur(0); }
  100% { opacity: 0; transform: translate(-50%, -58%) scale(.94) rotate(calc(var(--r) + 7deg)); filter: blur(6px); }
}
@keyframes bloomFall {
  to { transform: translate3d(var(--x), 110vh, 0) rotate(420deg); opacity: 0; }
}
@keyframes blink { 50% { opacity: 0; } }
@keyframes nope { 25% { transform: translateX(-10px) rotate(-2deg); } 75% { transform: translateX(10px) rotate(1deg); } }

.tap-bloom {
  position: fixed;
  z-index: 30;
  pointer-events: none;
  font-size: 1.7rem;
  animation: tapBloom 1.1s ease forwards;
}
@keyframes tapBloom {
  0% { transform: translate(-50%, -50%) scale(.3) rotate(0deg); opacity: 0; }
  18% { opacity: 1; }
  100% { transform: translate(var(--tx), var(--ty)) scale(1.4) rotate(28deg); opacity: 0; }
}

@media (max-width: 900px) {
  body { scroll-snap-type: y proximity; }
  .hero, .love-note, .spread, .timeline, .finale, .polaroid-row { scroll-snap-align: start; }
  .hero { grid-template-columns: 1fr; padding-top: 70px; }
  .hero__collage { min-height: 570px; }
  .photo-card--big { left: 3%; width: 76%; }
  .photo-card--small { right: 0; }
  .spread { min-height: auto; display: grid; gap: 22px; }
  .scrap, .quote-card { position: relative; inset: auto; width: 100%; max-width: 390px; height: 470px; justify-self: center; }
  .quote-card { height: auto; transform: rotate(1deg); }
  .wrapped__intro, .wrapped-slide { grid-template-columns: 1fr; }
  .slide-window { min-height: 760px; }
  .music-card { grid-template-columns: 150px 1fr; }
  .album-art { width: 150px; height: 150px; }
  .vinyl { width: 118px; height: 118px; right: -42px; }
  .timeline__track { grid-template-columns: 1fr 1fr; }
  .timeline__track::before { display: none; }
  .keepsake, .secret-pocket { grid-template-columns: 1fr; }
  .hidden-strip { grid-template-columns: 1fr; transform: none; }
  .torn-heading { grid-template-columns: 1fr; }
  .torn-board { min-height: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 18px; }
  .torn-piece { position: relative; inset: auto !important; width: 100%; transform: rotate(var(--r)); }
  .torn-note { position: relative; grid-column: 1 / -1; inset: auto; transform: rotate(-1deg); width: 100%; }
  .polaroid-row { grid-template-columns: 1fr; }
  .polaroid-row figure { height: 520px; }
}
@media (max-width: 560px) {
  body { background: linear-gradient(180deg, #3e2a1f 0%, #ffe7b8 16%, #fff7e8 100%); }
  .gate-card form { flex-direction: column; }
  .panel { width: min(100% - 18px, 1120px); border-radius: 24px; }
  .hero { min-height: auto; }
  .hero__collage { min-height: 465px; }
  .photo-card--big { height: 420px; }
  .photo-card--small { width: 160px; height: 230px; }
  .pressed-flower { width: 110px; }
  .spread { border-radius: 26px; padding: 24px 16px; }
  .scrap { height: 420px; }
  .timeline__track { grid-template-columns: 1fr; }
  .memory-card { min-height: 190px; }
  .music-card { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .slide-window { min-height: 700px; }
  .wrapped-slider { grid-template-columns: 42px 1fr 42px; }
  .slide-arrow { width: 42px; height: 42px; font-size: 1.8rem; }
  .wrapped-slide figure { height: 390px; }
  .jar-scene { min-height: 430px; }
  .glass-jar { height: 330px; }
  .reason-slip { font-size: 1.35rem; }
  .hidden-strip { max-height: 230px; }
  .hidden-strip.is-open { max-height: 620px; }
  .hidden-strip figure { height: 330px; }
  .torn-board { grid-template-columns: 1fr; }
  .torn-piece { min-height: 340px; }
  .torn-piece img { height: 265px; }
  .polaroid-row figure { height: 430px; }
  .letter-modal__close { right: 4px; top: -18px; }
}
