/* ==========================================================================
   For Bibi. Palette: paper, wine ink, valentine red, pinks, butter, tangerine.
   ========================================================================== */

:root {
  --paper: #FFF4E8;
  --paper-2: #FFEADB;
  --white: #FFFDF9;
  --ink: #3B0A1F;
  --ink-soft: #7A3B52;
  --red: #E63946;
  --red-deep: #B5172A;
  --pink: #FF8FAB;
  --blush: #FFD3DE;
  --butter: #FFD449;
  --tangerine: #FF8A50;
  --sky: #9DD0FF;
  --mint: #A6E8C9;

  --display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --body: 'Bricolage Grotesque', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --hand: 'Gochi Hand', 'Comic Sans MS', cursive;

  --heart-red: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-1 -1 26 26'%3E%3Cpath fill='%23E63946' stroke='%233B0A1F' stroke-width='1.4' d='M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

/* paper grain over everything */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  opacity: .16;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.23 0 0 0 0 0.04 0 0 0 0 0.12 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* iOS Safari only stops sideways wobble when both html and body clip */
html, body { overflow-x: hidden; }
@supports (overflow-x: clip) { html, body { overflow-x: clip; } }

img, video { display: block; max-width: 100%; }
button, a, label, input, textarea {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation; /* no double-tap zoom when tapping fast */
}
button { font: inherit; color: inherit; cursor: pointer; }
::selection { background: var(--pink); color: var(--ink); }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; }

.wrap { width: min(1120px, 100%); margin-inline: auto; padding-inline: 16px; }
.hand { font-family: var(--hand); }

/* ---------- shared bits ---------- */

.section { position: relative; padding: clamp(72px, 12vw, 140px) 0; }

.section-head { text-align: center; max-width: 760px; margin: 0 auto clamp(36px, 6vw, 64px); }

.eyebrow {
  display: inline-block;
  padding: .35em .85em;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  font-weight: 800;
  font-size: .78rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  box-shadow: 3px 3px 0 var(--ink);
  transform: rotate(-2deg);
}

h2 {
  margin: .45em 0 .25em;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.5rem, 8vw, 5rem);
  line-height: .95;
  letter-spacing: -.02em;
  font-variation-settings: "SOFT" 100, "WONK" 1;
  text-wrap: balance;
}
h2 em { font-style: italic; font-weight: 600; color: var(--red); }

.note {
  margin: 0;
  font-family: var(--hand);
  font-size: 1.35rem;
  color: var(--ink-soft);
  transform: rotate(-1.5deg);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  padding: .85em 1.6em;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--red);
  color: var(--white);
  font-weight: 800;
  font-size: 1.05rem;
  line-height: 1.1;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform .15s ease, box-shadow .15s ease, background .2s;
  -webkit-tap-highlight-color: transparent;
}
@media (hover: hover) {
  .btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
}
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: 4px 4px 0 var(--ink); }
.btn-ghost { background: var(--white); color: var(--ink); }
.btn-big { font-size: 1.2rem; padding: 1em 2.2em; }

/* scroll reveal (only when JS is running) */
/* uses `translate` (not `transform`) so tilted cards keep their rotation */
.js [data-reveal] {
  opacity: 0;
  translate: 0 28px;
  transition: opacity .7s ease, translate .7s cubic-bezier(.2, .8, .2, 1), transform .35s cubic-bezier(.3, 1.6, .5, 1);
}
.js [data-reveal].in { opacity: 1; translate: 0 0; }

/* ---------- hero ---------- */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 110px 16px 130px;
  background:
    radial-gradient(circle at 15% 20%, rgba(255, 212, 73, .45), transparent 32%),
    radial-gradient(circle at 85% 80%, rgba(255, 143, 171, .55), transparent 38%),
    var(--blush);
  text-align: center;
}

.hero-hearts { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.fh {
  position: absolute;
  bottom: -70px;
  left: var(--x);
  width: var(--s);
  height: var(--s);
  fill: var(--c);
  stroke: var(--ink);
  stroke-width: 1;
  opacity: .9;
  animation: rise var(--d) linear var(--delay) infinite;
}
@keyframes rise {
  0%   { transform: translate(0, 0) rotate(-12deg); }
  50%  { transform: translate(24px, -58vh) rotate(10deg); }
  100% { transform: translate(-8px, -120vh) rotate(-6deg); }
}

.badge {
  position: absolute;
  top: 18px;
  right: 14px;
  width: clamp(96px, 17vw, 148px);
  animation: spin 24s linear infinite;
}
.badge-bg { fill: var(--butter); stroke: var(--ink); stroke-width: 2; }
.badge text { font-family: var(--body); font-weight: 800; font-size: 10.5px; fill: var(--ink); }
.badge-heart { fill: var(--red); stroke: var(--ink); stroke-width: 1.2; }
@keyframes spin { to { transform: rotate(360deg); } }

.hero-inner { max-width: 980px; }

.hero-kicker {
  display: inline-block;
  margin: 0;
  padding: .15em .7em;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: var(--butter);
  font-family: var(--hand);
  font-size: clamp(1.25rem, 3.5vw, 1.7rem);
  box-shadow: 3px 3px 0 var(--ink);
  transform: rotate(-3deg);
}

.hero-title {
  margin: .25em 0 .3em;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(3.6rem, 15vw, 10rem);
  line-height: .86;
  letter-spacing: -.035em;
  font-variation-settings: "SOFT" 100, "WONK" 1;
}
.hero-title .line { display: block; }
.hero-title em {
  position: relative;
  display: inline-block;
  font-style: italic;
  font-weight: 600;
  color: var(--red);
  padding: 0 .08em;
}
.squiggle {
  position: absolute;
  left: 0;
  bottom: -.02em;
  width: 100%;
  height: .2em;
  fill: none;
  stroke: var(--tangerine);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 260;
  stroke-dashoffset: 260;
  animation: draw 1.2s ease .6s forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }

.hero-sub {
  max-width: 34ch;
  margin: 0 auto;
  font-size: clamp(1.05rem, 2.6vw, 1.3rem);
  font-weight: 500;
  color: var(--ink-soft);
  text-wrap: balance;
}

.counter-label { margin: 34px 0 12px; font-family: var(--hand); font-size: 1.35rem; }

.counter { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.counter div {
  min-width: 78px;
  padding: 12px 12px 8px;
  border: 2px solid var(--ink);
  border-radius: 16px;
  background: var(--white);
  box-shadow: 4px 4px 0 var(--ink);
}
.counter div:nth-child(1) { background: var(--red); color: var(--white); transform: rotate(-3deg); }
.counter div:nth-child(2) { background: var(--butter); transform: rotate(2deg); }
.counter div:nth-child(3) { background: var(--sky); transform: rotate(-1deg); }
.counter div:nth-child(4) { background: var(--mint); transform: rotate(3deg); }
.counter b {
  display: block;
  font-family: var(--display);
  font-size: clamp(1.8rem, 6vw, 2.4rem);
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.counter span { font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }

.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 26px;
  translate: -50% 0;
  color: var(--ink);
  font-family: var(--hand);
  font-size: 1.25rem;
  text-decoration: none;
  animation: bob 2s ease-in-out infinite;
}
@keyframes bob { 50% { transform: translateY(8px); } }

/* ---------- marquee ---------- */

.marquee {
  position: relative;
  z-index: 2;
  margin: -30px -6vw 0;
  overflow: hidden;
  border-block: 2px solid var(--ink);
  background: var(--red);
  color: var(--white);
  transform: rotate(-2deg);
}
.marquee-track { display: flex; width: max-content; animation: marquee 30s linear infinite; }
.marquee-track span {
  display: flex;
  align-items: center;
  gap: .55em;
  padding: .32em .55em;
  white-space: nowrap;
  font-family: var(--display);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(1.6rem, 4.5vw, 2.6rem);
}
.marquee-track svg { width: .7em; height: .7em; fill: var(--butter); stroke: var(--ink); stroke-width: 1.4; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- letter ---------- */

.letter { background: var(--paper); }

.envelope {
  position: relative;
  display: block;
  width: min(440px, 100%);
  aspect-ratio: 3 / 2;
  margin: 90px auto 0;
  padding: 0;
  border: 0;
  background: none;
  perspective: 900px;
  -webkit-tap-highlight-color: transparent;
}
@media (hover: hover) {
  .envelope:not([aria-expanded="true"]):hover { animation: wiggle .5s ease; }
}
@media (hover: none) {
  /* no hover on a phone, so nudge her to tap it */
  .envelope:not([aria-expanded="true"]) { animation: wiggle .6s ease 1.2s 3; }
}
@keyframes wiggle { 25% { rotate: -2deg; } 75% { rotate: 2deg; } }

.env-back {
  position: absolute;
  inset: 0;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: #F2708F;
  box-shadow: 7px 7px 0 var(--ink);
}
.env-flap {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 60%;
  z-index: 3;
  fill: #F57C9A;
  stroke: var(--ink);
  stroke-width: 2;
  stroke-linejoin: round;
  transform-origin: top center;
  transition: transform .6s ease;
  overflow: visible;
}
.env-letter {
  position: absolute;
  left: 7%;
  right: 7%;
  top: 7%;
  height: 86%;
  z-index: 1;
  display: grid;
  place-items: start center;
  padding-top: 8%;
  border: 2px solid var(--ink);
  border-radius: 6px;
  background:
    repeating-linear-gradient(transparent 0 22px, rgba(230, 57, 70, .18) 22px 23px) 0 46px / 100% 100% no-repeat,
    var(--white);
  font-family: var(--hand);
  font-size: clamp(1.3rem, 5vw, 1.7rem);
  color: var(--red);
  transition: transform .8s cubic-bezier(.2, .9, .25, 1.15) .35s;
}
.env-front {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.env-front .pocket { fill: var(--pink); stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; }
.env-front .fold { fill: none; stroke: var(--ink); stroke-width: 1.5; opacity: .5; }
.env-seal {
  position: absolute;
  left: 50%;
  top: 56%;
  z-index: 4;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--red);
  translate: -50% -50%;
  transition: transform .35s ease, opacity .35s ease;
}
.env-seal svg { width: 26px; height: 26px; fill: var(--butter); }
.env-hint {
  position: absolute;
  left: 50%;
  bottom: -46px;
  translate: -50% 0;
  white-space: nowrap;
  font-family: var(--hand);
  font-size: 1.3rem;
  color: var(--ink-soft);
  transition: opacity .3s;
}

.is-open .env-seal { transform: scale(0) rotate(90deg); opacity: 0; }
.is-open .env-flap { transform: rotateX(180deg); z-index: 0; }
.is-open .env-letter { transform: translateY(-58%); }
.is-open .env-hint { opacity: 0; }
.is-open .envelope { cursor: default; }

.letter-paper {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 1.1s cubic-bezier(.2, .8, .2, 1) .7s;
}
.is-open .letter-paper { grid-template-rows: 1fr; }
.letter-paper > div { min-height: 0; overflow: hidden; padding: 0 14px 18px; }

.letter-sheet {
  max-width: 660px;
  margin: 56px auto 0;
  padding: 32px clamp(20px, 5vw, 48px) 32px clamp(36px, 8vw, 72px);
  border: 2px solid var(--ink);
  border-radius: 6px;
  background:
    linear-gradient(90deg, transparent calc(clamp(36px, 8vw, 72px) - 14px), rgba(230, 57, 70, .45) 0 calc(clamp(36px, 8vw, 72px) - 12px), transparent 0),
    repeating-linear-gradient(transparent 0 31px, rgba(157, 208, 255, .55) 31px 32px),
    var(--white);
  background-position: 0 0, 0 32px;
  box-shadow: 8px 8px 0 var(--pink), 8px 8px 0 2px var(--ink);
  transform: rotate(-.8deg);
  font-family: var(--display);
  font-size: 1.12rem;
  line-height: 32px;
  font-variation-settings: "SOFT" 100;
}
.letter-sheet p { margin: 0 0 32px; }
.letter-sheet .letter-greeting,
.letter-sheet .letter-name { font-family: var(--hand); font-size: 1.7rem; color: var(--red); }
.letter-sheet .letter-sign { margin-bottom: 0; font-style: italic; }
.letter-sheet .letter-name { margin: 0; }

/* ---------- gallery ---------- */

.gallery {
  background:
    radial-gradient(var(--blush) 2.2px, transparent 2.8px) 0 0 / 24px 24px,
    var(--paper-2);
  border-block: 2px solid var(--ink);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr));
  gap: clamp(22px, 3.5vw, 40px) clamp(16px, 3vw, 34px);
}
@media (min-width: 720px) {
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
}

.polaroid {
  position: relative;
  margin: 0;
  padding: 10px 10px 0;
  border: 2px solid var(--ink);
  border-radius: 4px;
  background: var(--white);
  box-shadow: 5px 5px 0 var(--ink);
  transform: rotate(var(--r));
  transition: transform .35s cubic-bezier(.3, 1.6, .5, 1);
}
@media (hover: hover) {
  .polaroid:hover { transform: rotate(0) scale(1.04); z-index: 2; }
}
.polaroid:active { transform: rotate(0) scale(.98); }
.tape {
  position: absolute;
  top: -13px;
  left: 50%;
  width: 72px;
  height: 24px;
  background: var(--tape);
  opacity: .82;
  translate: -50% 0;
  rotate: calc(var(--r) * -1.8);
  clip-path: polygon(3% 0, 97% 6%, 100% 50%, 96% 100%, 2% 94%, 0 45%);
}
.polaroid-frame {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  padding: 0;
  overflow: hidden;
  border: 1.5px solid var(--ink);
  background: var(--blush);
  cursor: zoom-in;
}
.polaroid-frame img { width: 100%; height: 100%; object-fit: cover; }
.polaroid figcaption {
  padding: 10px 4px 12px;
  font-family: var(--hand);
  font-size: clamp(1rem, 3.4vw, 1.25rem);
  line-height: 1.2;
  text-align: center;
}

/* placeholder for missing photos / videos */
.ph {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 18px;
  text-align: center;
  color: var(--ink);
  background: var(--ph);
}
.ph::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 2px dashed rgba(59, 10, 31, .35);
  border-radius: 8px;
}
.ph-0 { --ph: linear-gradient(145deg, var(--pink), var(--butter)); }
.ph-1 { --ph: linear-gradient(145deg, var(--sky), var(--blush)); }
.ph-2 { --ph: linear-gradient(145deg, var(--butter), var(--tangerine)); }
.ph-3 { --ph: linear-gradient(145deg, var(--mint), var(--sky)); }
.ph-4 { --ph: linear-gradient(145deg, var(--blush), var(--pink)); }
.ph-heart { width: 40px; height: 40px; fill: var(--white); stroke: var(--ink); stroke-width: 1.3; }
.ph-label { font-family: var(--display); font-weight: 800; font-size: 1.15rem; text-transform: capitalize; }
.ph-hint { font-size: .78rem; font-weight: 600; opacity: .7; }

/* ---------- videos ---------- */

.videos { background: var(--ink); color: var(--white); }
.videos h2 em { color: var(--pink); }
.videos .note { color: var(--blush); }

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 300px));
  justify-content: center;
  gap: clamp(28px, 4vw, 44px);
}

.tv {
  margin: 0;
  padding: 12px 12px 14px;
  border: 2px solid var(--ink);
  border-radius: 22px;
  background: var(--white);
  color: var(--ink);
  box-shadow: 7px 7px 0 var(--tv-shadow, var(--pink));
  transform: rotate(var(--r));
}
.tv-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 4px 10px;
  font-weight: 800;
  font-size: .72rem;
  letter-spacing: .16em;
}
.rec::before {
  content: "";
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--red);
  vertical-align: 0;
  animation: blink 1.2s steps(2, jump-none) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.tv-screen {
  aspect-ratio: var(--ratio, 9 / 16);
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 14px;
  background: #1C0410;
}
.tv-screen video { width: 100%; height: 100%; object-fit: cover; background: #000; }
.tv figcaption { margin-top: 10px; font-family: var(--hand); font-size: 1.3rem; text-align: center; line-height: 1.2; }

/* ---------- reasons ---------- */

.reasons { background: var(--butter); border-block: 2px solid var(--ink); }
.reasons .eyebrow { background: var(--pink); }

.deck { position: relative; width: min(340px, 86vw); aspect-ratio: 4 / 5; margin: 0 auto; }
.deck-under,
.reason-card {
  position: absolute;
  inset: 0;
  border: 2px solid var(--ink);
  border-radius: 24px;
}
.deck-under:nth-child(1) { background: var(--pink); transform: rotate(-7deg) translate(-10px, 8px); }
.deck-under:nth-child(2) { background: var(--sky); transform: rotate(5deg) translate(8px, 4px); }
.reason-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(22px, 6vw, 32px);
  background: var(--card, var(--white));
  box-shadow: 6px 6px 0 var(--ink);
  transform: rotate(var(--r, -1deg));
}
.reason-card.is-dealt { animation: deal .6s cubic-bezier(.2, 1.3, .4, 1); }
@keyframes deal {
  from { transform: translate(60px, -40px) rotate(18deg) scale(.9); opacity: 0; }
  to   { transform: rotate(var(--r, 0deg)); opacity: 1; }
}
.reason-num { font-weight: 800; font-size: .85rem; letter-spacing: .16em; text-transform: uppercase; }
.reason-text {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.35rem, 5.4vw, 1.85rem);
  line-height: 1.15;
  font-variation-settings: "SOFT" 100, "WONK" 1;
  text-wrap: pretty;
}
.reason-foot { display: flex; justify-content: space-between; align-items: end; font-size: 1.25rem; }
.reason-foot svg { width: 34px; height: 34px; fill: var(--red); stroke: var(--ink); stroke-width: 1.2; }

.deck-actions { margin-top: 44px; text-align: center; }
.deck-count { min-height: 1.6em; margin: 14px 0 0; font-family: var(--hand); font-size: 1.2rem; }

/* ---------- timeline ---------- */

.story { background: var(--paper); }

.timeline { position: relative; max-width: 860px; margin: 0 auto; padding: 0; list-style: none; }
.timeline::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 19px;
  border-left: 3px dashed var(--pink);
}
.tl-item { position: relative; padding-left: 58px; margin-bottom: 30px; }
.tl-dot {
  position: absolute;
  top: 16px;
  left: 4px;
  width: 34px;
  height: 34px;
  fill: var(--red);
  stroke: var(--ink);
  stroke-width: 1.3;
}
.tl-card {
  padding: 18px 22px 20px;
  border: 2px solid var(--ink);
  border-radius: 20px;
  background: var(--card);
  box-shadow: 5px 5px 0 var(--ink);
  transform: rotate(var(--r));
}
.tl-when { font-family: var(--hand); font-size: 1.2rem; color: var(--ink-soft); }
.tl-title {
  margin: 2px 0 6px;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.35rem, 4vw, 1.7rem);
  line-height: 1.1;
}
.tl-text { margin: 0; }

@media (min-width: 760px) {
  .timeline::before { left: 50%; margin-left: -1.5px; }
  .tl-item { width: 50%; padding: 0 52px 0 0; }
  .tl-item:nth-child(even) { margin-left: 50%; padding: 0 0 0 52px; }
  .tl-dot { left: auto; right: -17px; }
  .tl-item:nth-child(even) .tl-dot { right: auto; left: -17px; }
  .tl-item:nth-child(odd) .tl-card { text-align: right; }
}

/* ---------- date ---------- */

.date {
  background:
    radial-gradient(circle at 10% 10%, rgba(255, 143, 171, .5), transparent 35%),
    radial-gradient(circle at 90% 90%, rgba(255, 138, 80, .45), transparent 35%),
    var(--red);
  color: var(--white);
}
.date h2 em { color: var(--butter); }
.date .note { color: var(--blush); }

.date-card {
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(22px, 5vw, 44px);
  border: 2px solid var(--ink);
  border-radius: 30px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 9px 9px 0 var(--ink);
}

.gate-q {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.8rem, 6vw, 2.8rem);
  line-height: 1.05;
  text-align: center;
  font-variation-settings: "SOFT" 100, "WONK" 1;
  text-wrap: balance;
}
.gate-arena {
  position: relative;
  min-height: 260px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 18px;
}
.btn-yes { scale: var(--grow, 1); transition: transform .15s ease, box-shadow .15s ease, scale .35s cubic-bezier(.3, 1.6, .5, 1); z-index: 1; }
.btn-no.is-loose { position: absolute; z-index: 2; transition: left .25s ease, top .25s ease, transform .15s, box-shadow .15s; }

.picker-intro {
  margin: 0 0 26px;
  font-family: var(--hand);
  font-size: clamp(1.4rem, 4.5vw, 1.8rem);
  text-align: center;
  color: var(--red);
}
.picker-grid { display: grid; gap: 30px; }
@media (min-width: 780px) { .picker-grid { grid-template-columns: 1.1fr .9fr; } }

.field { margin: 0 0 24px; padding: 0; border: 0; min-width: 0; }
.field-label {
  display: block;
  margin: 0 0 10px;
  padding: 0;
  font-weight: 800;
  font-size: .8rem;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.cal {
  padding: 14px;
  border: 2px solid var(--ink);
  border-radius: 22px;
  background: var(--white);
  box-shadow: 5px 5px 0 var(--pink), 5px 5px 0 2px var(--ink);
}
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-title {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.35rem;
  font-variation-settings: "SOFT" 100, "WONK" 1;
}
.cal-nav {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--blush);
  font-weight: 800;
  transition: transform .15s;
}
@media (hover: hover) {
  .cal-nav:hover:not(:disabled) { transform: scale(1.08); }
  .cal-day:hover:not(:disabled) { background: var(--blush); transform: scale(1.08); }
  .chip span:hover, .idea-chip:hover { background: var(--blush); }
}
.cal-nav:disabled { opacity: .25; cursor: default; }
.cal-dow, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; text-align: center; }
.cal-dow span { padding: 4px 0; font-size: .7rem; font-weight: 800; letter-spacing: .08em; opacity: .55; }
.cal-day {
  position: relative;
  isolation: isolate;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  font-weight: 700;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
  transition: background .15s, transform .15s;
  -webkit-tap-highlight-color: transparent;
}
.cal-day:active:not(:disabled) { background: var(--blush); }
.cal-day:disabled { opacity: .22; cursor: default; }
.cal-day.is-weekend:not(:disabled) { color: var(--red); }
.cal-day.is-today::after {
  content: "";
  position: absolute;
  bottom: 12%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}
.cal-day.is-selected,
.cal-day.is-selected:hover,
.cal-day.is-selected:active { color: var(--white); background: transparent; padding-bottom: 3px; }
.cal-day.is-selected::before {
  content: "";
  position: absolute;
  inset: -3px;
  z-index: -1;
  background: var(--heart-red) center / contain no-repeat;
  animation: pop .4s cubic-bezier(.3, 1.8, .5, 1);
}
.cal-day.is-selected::after { display: none; }
@keyframes pop { from { transform: scale(.3); } }

.chips, .idea-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-block;
  padding: .5em 1em;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--white);
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, transform .15s, box-shadow .15s;
}
.chip input:checked + span { background: var(--butter); box-shadow: 3px 3px 0 var(--ink); transform: translate(-1px, -1px); }
.chip input:focus-visible + span { outline: 3px solid var(--sky); outline-offset: 2px; }

.idea-chips { margin-bottom: 10px; }
.idea-chip {
  padding: .35em .85em;
  border: 1.5px dashed var(--ink);
  border-radius: 999px;
  background: transparent;
  font-size: .9rem;
  font-weight: 600;
  transition: background .15s;
}
.idea-chip.is-on { border-style: solid; background: var(--pink); }
.idea-chip.is-on::before { content: "+ "; font-weight: 800; }
.idea-chip-custom { border-style: solid; background: var(--butter); }
.idea-chip-custom::before { content: "✎ "; }

textarea {
  display: block;
  width: 100%;
  min-height: 120px;
  padding: 14px 16px;
  border: 2px solid var(--ink);
  border-radius: 16px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  line-height: 1.45;
  resize: vertical;
}
textarea::placeholder { color: var(--ink-soft); opacity: .7; }

.picker-summary {
  margin: 12px 0 18px;
  font-family: var(--hand);
  font-size: clamp(1.3rem, 4vw, 1.6rem);
  text-align: center;
  text-wrap: balance;
}
.form-actions { text-align: center; }
.form-error { min-height: 1.5em; margin: 14px 0 0; color: var(--red-deep); font-weight: 700; }

/* ---------- ticket ---------- */

.ticket {
  display: grid;
  max-width: 660px;
  margin: 0 auto;
  animation: ticket-in .8s cubic-bezier(.2, 1.3, .4, 1);
}
@keyframes ticket-in { from { transform: translateY(40px) rotate(-4deg) scale(.9); opacity: 0; } }

.ticket-main {
  padding: clamp(22px, 5vw, 34px);
  border: 2px solid var(--ink);
  border-radius: 24px 24px 0 0;
  background: var(--butter);
  box-shadow: 6px 6px 0 var(--ink);
}
.ticket-eyebrow { font-weight: 800; font-size: .75rem; letter-spacing: .16em; text-transform: uppercase; }
.ticket-title {
  margin: .15em 0 .4em;
  font-family: var(--display);
  font-style: italic;
  font-weight: 800;
  font-size: clamp(2.6rem, 10vw, 4rem);
  line-height: .95;
  color: var(--red);
  font-variation-settings: "SOFT" 100, "WONK" 1;
}
.ticket-rows { margin: 0; display: grid; gap: 12px; }
.ticket-rows div { display: grid; gap: 2px; padding-bottom: 12px; border-bottom: 2px dotted rgba(59, 10, 31, .35); }
.ticket-rows dt { font-weight: 800; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; opacity: .7; }
.ticket-rows dd { margin: 0; font-family: var(--display); font-weight: 600; font-size: 1.3rem; line-height: 1.25; white-space: pre-line; }
.ticket-fine { margin: 16px 0 0; font-size: .82rem; font-weight: 600; opacity: .75; }

.ticket-stub {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px clamp(22px, 5vw, 34px);
  border: 2px solid var(--ink);
  border-top: 2px dashed var(--ink);
  border-radius: 0 0 24px 24px;
  background: var(--pink);
  box-shadow: 6px 6px 0 var(--ink);
}
.stub-no { font-family: var(--display); font-weight: 800; font-size: 1.4rem; }
.ticket-stub svg { width: 36px; height: 36px; fill: var(--red); stroke: var(--ink); stroke-width: 1.2; animation: beat 1.4s ease-in-out infinite; }
.stub-note { font-family: var(--hand); font-size: 1.15rem; text-align: right; line-height: 1.1; }
@keyframes beat { 15% { transform: scale(1.18); } 30% { transform: scale(1); } 45% { transform: scale(1.12); } 60% { transform: scale(1); } }

@media (min-width: 640px) {
  .ticket { grid-template-columns: 1fr 150px; }
  .ticket-main { border-radius: 24px 0 0 24px; }
  .ticket-stub {
    flex-direction: column;
    justify-content: center;
    text-align: center;
    border-top: 2px solid var(--ink);
    border-left: 2px dashed var(--ink);
    border-radius: 0 24px 24px 0;
  }
  .stub-note { text-align: center; }
}

.ticket-actions { margin-top: 34px; text-align: center; }
.ticket-actions[hidden] { display: none; }
.ticket-actions .btn svg { width: 1.2em; height: 1.2em; }
.ticket-save-note { margin: 12px 0 0; font-family: var(--hand); font-size: 1.2rem; color: var(--ink-soft); }

/* ---------- footer ---------- */

.footer { padding: 72px 16px 56px; background: var(--ink); color: var(--white); text-align: center; }
.footer-big {
  margin: 0 0 10px;
  font-family: var(--display);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(2rem, 7vw, 3.6rem);
  line-height: 1.05;
  color: var(--pink);
}
.footer-small { margin: 0; font-size: .95rem; opacity: .75; }

/* ---------- lightbox ---------- */

.lightbox {
  width: 100vw;
  max-width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--white);
}
.lightbox::backdrop { background: rgba(35, 6, 18, .9); }
.lb-inner { height: 100%; display: grid; grid-template-rows: auto 1fr auto; gap: 12px; padding: 16px; }
.lb-top, .lb-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.lb-count { font-weight: 800; letter-spacing: .14em; font-size: .85rem; }
.lb-stage { min-height: 0; display: grid; place-items: center; overflow: hidden; touch-action: pan-y; }
.lb-stage img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border: 8px solid var(--white);
  border-radius: 4px;
  animation: pop .35s ease;
}
.lb-stage .ph { width: min(80vw, 420px); height: auto; aspect-ratio: 4 / 5; border: 8px solid var(--white); border-radius: 4px; }
.lb-caption { flex: 1; margin: 0; font-family: var(--hand); font-size: 1.5rem; text-align: center; }
.lb-btn {
  flex: none;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--pink);
  color: var(--ink);
  font-size: 1.4rem;
  font-weight: 800;
  box-shadow: 3px 3px 0 var(--ink);
}

/* ---------- cover + music ---------- */

html.cover-open { overflow: hidden; }

.cover {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: max(24px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom));
  background:
    radial-gradient(circle at 20% 15%, rgba(255, 143, 171, .55), transparent 40%),
    radial-gradient(circle at 80% 85%, rgba(255, 138, 80, .5), transparent 40%),
    var(--red);
  color: var(--white);
  text-align: center;
  transition: transform .9s cubic-bezier(.7, 0, .2, 1);
}
.cover[hidden] { display: none; }
.cover.is-leaving { transform: translateY(-100%); }
.cover-kicker {
  margin: 0;
  font-family: var(--hand);
  font-size: 1.6rem;
  color: var(--blush);
  transform: rotate(-3deg);
}
.cover-title {
  margin: .15em 0 .55em;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.8rem, 12vw, 5.5rem);
  line-height: .92;
  letter-spacing: -.02em;
  font-variation-settings: "SOFT" 100, "WONK" 1;
  text-wrap: balance;
}
.cover-title em { font-style: italic; font-weight: 600; color: var(--butter); }
.cover-btn {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 160px;
  height: 160px;
  padding: 0;
  border: 0;
  background: none;
  animation: beat 1.6s ease-in-out infinite;
}
.cover-btn svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: var(--butter);
  stroke: var(--ink);
  stroke-width: .9;
  filter: drop-shadow(5px 5px 0 var(--ink));
}
.cover-btn span { position: relative; margin-top: -14px; color: var(--ink); font-weight: 800; font-size: 1.15rem; }
.cover-btn:active { scale: .94; }
.cover-hint { margin: 1.4em 0 0; font-family: var(--hand); font-size: 1.3rem; color: var(--blush); }

.music-btn {
  position: fixed;
  right: max(14px, env(safe-area-inset-right));
  bottom: calc(14px + env(safe-area-inset-bottom));
  z-index: 45;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--butter);
  box-shadow: 3px 3px 0 var(--ink);
}
.music-btn[hidden] { display: none; }
.music-btn:active { translate: 2px 2px; box-shadow: 1px 1px 0 var(--ink); }
.eq { display: flex; align-items: flex-end; gap: 3px; height: 18px; }
.eq i { width: 4px; height: 25%; border-radius: 2px; background: var(--ink); }
.music-btn.is-playing .eq i { animation: eq .9s ease-in-out infinite alternate; }
.music-btn.is-playing .eq i:nth-child(2) { animation-delay: -.3s; }
.music-btn.is-playing .eq i:nth-child(3) { animation-delay: -.6s; }
.music-btn.is-playing .eq i:nth-child(4) { animation-delay: -.15s; }
.music-btn:not(.is-playing)::after {
  content: "";
  position: absolute;
  width: 30px;
  height: 2.5px;
  border-radius: 2px;
  background: var(--red-deep);
  rotate: -45deg;
}
@keyframes eq { from { height: 20%; } to { height: 100%; } }

/* ---------- heart particles ---------- */

.fx { position: fixed; inset: 0; z-index: 60; width: 100%; height: 100%; pointer-events: none; }

/* ---------- iPhone: notch, home bar, small screens ---------- */

.hero { padding-top: max(110px, calc(env(safe-area-inset-top) + 96px)); }
.scroll-hint { bottom: calc(22px + env(safe-area-inset-bottom)); }
.footer { padding-bottom: calc(56px + env(safe-area-inset-bottom)); }
.lb-inner {
  padding:
    max(16px, env(safe-area-inset-top))
    max(16px, env(safe-area-inset-right))
    max(16px, env(safe-area-inset-bottom))
    max(16px, env(safe-area-inset-left));
}
html.lb-open { overflow: hidden; } /* stop the page scrolling behind the photo viewer */

@media (max-width: 520px) {
  body { font-size: 16px; }

  .badge { top: max(12px, env(safe-area-inset-top)); right: 10px; width: 82px; }
  .hero-title { font-size: clamp(3.2rem, 15.5vw, 5rem); }
  .counter { gap: 10px; }
  .counter div { min-width: 0; flex: 1 1 0; max-width: 92px; padding: 10px 6px 7px; }
  .counter span { font-size: .64rem; letter-spacing: .1em; }

  .marquee { margin-top: -22px; }

  .envelope { margin-top: 70px; }
  .letter-sheet { font-size: 1.05rem; }

  .gallery-grid { gap: 26px 14px; }
  .polaroid { padding: 7px 7px 0; box-shadow: 4px 4px 0 var(--ink); }
  .polaroid figcaption { padding: 8px 2px 10px; }
  .tape { width: 56px; height: 20px; top: -11px; }

  .tv-screen { max-height: 70svh; }

  .date-card { padding: 22px 14px 26px; border-radius: 24px; box-shadow: 6px 6px 0 var(--ink); }
  .gate-arena { min-height: 300px; }
  .cal { padding: 10px 8px 12px; }
  .cal-grid { gap: 2px; }
  .cal-day { font-size: 1.05rem; min-height: 40px; }
  .chip span { padding: .55em .95em; }
  .idea-chip { padding: .45em .85em; }
  .btn-big { width: 100%; }

  .ticket-stub { flex-wrap: wrap; }

  .lb-caption { font-size: 1.25rem; }
}

/* ---------- motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }
  .fh { display: none; }
  .squiggle { stroke-dashoffset: 0; }
}
