/* CKrsvp — Chiara Kate's dedication ceremony & first birthday invitation */

@font-face {
  font-family: "Pinyon Script";
  src: url("fonts/pinyon-script.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "Marcellus";
  src: url("fonts/marcellus.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "EB Garamond";
  src: url("fonts/eb-garamond.woff2") format("woff2");
  font-weight: 400 600;
  font-display: swap;
}
@font-face {
  font-family: "EB Garamond";
  src: url("fonts/eb-garamond-italic.woff2") format("woff2");
  font-style: italic;
  font-display: swap;
}

:root {
  --paper: #fffaf6;
  --blush: #f8e4e8;
  --blush-2: #f3d3db;
  --petal: #eab3c3;
  --rose: #b8476e;
  --rose-deep: #8c2c50;
  --rose-ink: #74213f;
  --ink: #4b3236;
  --ink-soft: #6c4e54;
  --gold: #b68a3e;
  --gold-ink: #85601f;
  --gold-line: #d7b878;

  --script: "Pinyon Script", "Snell Roundhand", "Apple Chancery", cursive;
  --caps: "Marcellus", "Trajan Pro", Georgia, serif;
  --serif: "EB Garamond", Garamond, Georgia, serif;

  --col: 34rem;
  --gutter: 1rem;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 1rem;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--serif);
  font-size: 1.1875rem;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--blush);
  background-image:
    radial-gradient(60rem 40rem at 10% -10%, #fdf2f4 0%, transparent 60%),
    radial-gradient(50rem 40rem at 110% 30%, #f6d6df 0%, transparent 55%),
    radial-gradient(40rem 30rem at -10% 85%, #f9e6d9 0%, transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .55 0 0 0 0 .3 0 0 0 0 .35 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-attachment: fixed, fixed, fixed, scroll;
}
/* Florals spill past the card edges by design; keep them from widening the page on phones. */
html, body { overflow-x: clip; }
@supports not (overflow: clip) { html, body { overflow-x: hidden; } }

img, svg { display: block; max-width: 100%; }
a { color: var(--rose-deep); text-underline-offset: .2em; }
a:hover { color: var(--rose-ink); }
:focus-visible { outline: 3px solid var(--rose); outline-offset: 3px; border-radius: 4px; }
main:focus { outline: none; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  padding: .75rem 1rem; background: var(--paper); color: var(--rose-deep);
  font-family: var(--caps); letter-spacing: .08em; border-radius: .5rem;
}
.skip:focus { top: 1rem; }

.script { font-family: var(--script); font-weight: 400; letter-spacing: 0; text-transform: none; }

main {
  width: min(100% - 2 * var(--gutter), var(--col));
  margin: 0 auto;
  padding-bottom: 6rem;
}

/* ---------- Shared bits ---------- */

.eyebrow {
  margin: 0;
  font-family: var(--caps);
  font-size: .8125rem;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.script-heading {
  margin: .25rem 0 1rem;
  font-family: var(--script);
  font-weight: 400;
  font-size: clamp(2.75rem, 11vw, 3.5rem);
  line-height: 1.1;
  color: var(--rose-deep);
}

.divider { width: 12rem; height: 1rem; margin: 0 auto 1rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  min-height: 3.25rem;
  padding: 0 1.75rem;
  font-family: var(--caps);
  font-size: 1rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: .375rem;
  transition: background-color .2s, color .2s, box-shadow .2s, transform .2s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(1px); }
.btn--primary {
  color: var(--paper);
  background: var(--rose-deep);
  box-shadow: 0 0 0 3px var(--paper), 0 0 0 4px var(--gold-line), 0 12px 24px -12px rgba(140, 44, 80, .6);
}
.btn--primary:hover { background: var(--rose-ink); color: var(--paper); }
.btn--quiet {
  color: var(--rose-deep);
  padding: 0 1rem;
}
.btn--quiet:hover { color: var(--rose-ink); text-decoration: underline; }
.btn--outline {
  color: var(--rose-deep);
  background: var(--paper);
  box-shadow: inset 0 0 0 1.5px var(--petal);
}
.btn--outline:hover { box-shadow: inset 0 0 0 1.5px var(--rose); color: var(--rose-ink); }
.btn__icon { width: 1.25rem; height: 1.25rem; flex: none; }

.todo {
  margin: .75rem auto;
  max-width: 26rem;
  padding: .5rem .75rem;
  font-family: system-ui, sans-serif;
  font-size: .8125rem;
  line-height: 1.4;
  color: #6b4a00;
  background: #fff3c4;
  border: 1.5px dashed #c79a1e;
  border-radius: .375rem;
  text-align: center;
}
.todo code { font-size: .875em; }

/* ---------- Butterflies ---------- */

.bfly {
  position: absolute;
  width: 2.75rem;
  pointer-events: none;
  z-index: 3;
  animation: flutter 5s ease-in-out infinite;
}
.bfly--a { top: 26%; right: -.5rem; width: 2.5rem; animation-delay: -1s; }
.bfly--b { top: 47%; left: -.75rem; width: 2rem; transform: rotate(-18deg); animation-delay: -2.6s; }
.bfly--c { bottom: 15%; right: 6%; width: 1.75rem; animation-delay: -4s; }

@keyframes flutter {
  0%, 100% { translate: 0 0; rotate: -6deg; scale: 1 1; }
  25% { scale: .82 1; }
  50% { translate: -6px -10px; rotate: 4deg; scale: 1 1; }
  75% { scale: .85 1; }
}

/* ---------- Hero: the arched invitation ---------- */

.hero { padding-top: clamp(2.5rem, 9vw, 4.5rem); }

.arch-wrap {
  position: relative;
  container-type: inline-size;
  width: min(100%, 30rem);
  margin: 0 auto;
}

.arch {
  position: relative;
  z-index: 1;
  padding: .625rem;
  background: var(--paper);
  border-radius: 50cqi 50cqi 1.25rem 1.25rem;
  box-shadow:
    0 0 0 1px rgba(182, 138, 62, .28),
    0 2px 0 rgba(255, 255, 255, .8) inset,
    0 40px 60px -36px rgba(140, 44, 80, .45),
    0 12px 24px -16px rgba(140, 44, 80, .25);
}

.arch__inner {
  position: relative;
  overflow: hidden;
  padding: clamp(4.25rem, 24cqi, 7.25rem) clamp(1rem, 6cqi, 2rem) clamp(4.5rem, 20cqi, 6rem);
  text-align: center;
  border: 1.5px solid var(--petal);
  border-radius: calc(50cqi - .625rem) calc(50cqi - .625rem) .75rem .75rem;
  background:
    radial-gradient(120% 60% at 50% 0%, #fde8ee 0%, transparent 70%),
    var(--paper);
}
.arch__inner::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(182, 138, 62, .45);
  border-radius: calc(50cqi - .625rem - 5px) calc(50cqi - .625rem - 5px) .5rem .5rem;
  pointer-events: none;
}
.arch__inner > * { position: relative; }

.arch__castle {
  position: absolute !important;
  left: 50%;
  bottom: 4.25rem;
  width: 92%;
  translate: -50% 0;
  color: var(--gold);
  opacity: .11;
  pointer-events: none;
}

.arch__cross {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  margin-bottom: 1rem;
}
.cross { width: 1.6rem; filter: drop-shadow(0 2px 2px rgba(133, 96, 31, .25)); }
.spark { width: .8rem; animation: twinkle 3.2s ease-in-out infinite; }
.spark--r { width: .6rem; animation-delay: -1.6s; margin-top: -1rem; }
.spark--l { margin-top: .75rem; }
@keyframes twinkle { 0%, 100% { opacity: .35; scale: .7; } 50% { opacity: 1; scale: 1; } }

.hero__title { margin: .25rem 0 .5rem; font-weight: 400; line-height: 1; }
.hero__dedication {
  display: block;
  font-size: clamp(3.25rem, 19cqi, 5rem);
  line-height: 1.05;
  color: var(--rose-deep);
}
.hero__and {
  display: block;
  margin-top: .6rem;
  font-family: var(--caps);
  font-size: clamp(1rem, 5.2cqi, 1.3rem);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold-ink);
}

.hero__name { margin: .5rem 0 1.25rem; line-height: 1; }
.hero__name .script {
  display: block;
  white-space: nowrap;
  font-size: clamp(2.9rem, 16cqi, 4.75rem);
  line-height: 1.15;
  color: var(--rose);
}
.hero__surname {
  display: block;
  margin-top: .1rem;
  font-family: var(--caps);
  font-size: .9375rem;
  letter-spacing: .5em;
  padding-left: .5em;
  text-transform: uppercase;
  color: var(--rose-deep);
}

.datebar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  max-width: 21rem;
  margin: 0 auto;
  padding: .65rem 0;
  border-block: 1px solid var(--gold-line);
}
.datebar__side {
  font-family: var(--caps);
  font-size: .875rem;
  line-height: 1.35;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink);
}
.datebar__day {
  padding: 0 1.25rem;
  font-family: var(--caps);
  font-size: 3.25rem;
  line-height: 1;
  color: var(--rose-deep);
  border-inline: 1px solid var(--gold-line);
}
.hero__weekday {
  margin: .6rem 0 0;
  font-family: var(--caps);
  font-size: .8125rem;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.hero__venue {
  margin: 1.25rem 0 0;
  font-family: var(--caps);
  font-size: .875rem;
  line-height: 1.6;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink);
}

.countdown {
  margin: 1rem auto 0;
  font-style: italic;
  font-size: 1.125rem;
  color: var(--rose-deep);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: .75rem 1rem;
  margin-top: 1.75rem;
}
.hero__actions .btn--primary { min-width: 11rem; }

/* Florals hugging the arch */
.floral { position: absolute; pointer-events: none; z-index: 2; }
.floral--tl { width: 64%; left: -15%; top: -5%; }
/* Sits below the card's last line so it never covers the buttons. */
.floral--br { width: 46%; right: -13%; bottom: -14%; }

/* ---------- Sections below the card ---------- */

.note, .portrait, .gallery, .details, .dresscode, .rsvp, .gifts {
  margin-top: 4.5rem;
  text-align: center;
}

.note p { max-width: 30rem; margin: 0 auto 1rem; }
.note__sign { margin-top: 1.5rem !important; font-style: italic; color: var(--ink-soft); }
.note__sign .script {
  display: block;
  font-style: normal;
  font-size: 2.5rem;
  line-height: 1.2;
  color: var(--rose-deep);
}

/* Link to the storybook (story.html) */
.story-cta {
  display: inline-flex;
  align-items: center;
  gap: .9rem;
  margin-top: 2rem;
  padding: .7rem 1.4rem .7rem .7rem;
  text-align: left;
  text-decoration: none;
  color: var(--rose-deep);
  background: var(--paper);
  border-radius: 999px;
  box-shadow: 0 0 0 1px var(--gold-line), 0 14px 26px -16px rgba(140, 44, 80, .55);
  transition: translate .2s var(--ease), box-shadow .2s;
}
.story-cta:hover { translate: 0 -2px; color: var(--rose-ink); }
.story-cta svg {
  flex: none;
  width: 2.75rem;
  height: 2.75rem;
  padding: .7rem .6rem .7rem .8rem;
  color: var(--paper);
  background: var(--rose-deep);
  border-radius: 50%;
}
.story-cta > span { font-family: var(--caps); font-size: 1rem; letter-spacing: .08em; line-height: 1.3; }
.story-cta__kicker { display: block; font: italic 1rem var(--serif); letter-spacing: 0; color: var(--ink-soft); }

/* Portrait */
.frame {
  position: relative;
  width: min(78%, 19rem);
  margin: 2.5rem auto 0;
}
.frame__oval {
  aspect-ratio: 4 / 5;
  padding: .5rem;
  border-radius: 50%;
  background:
    linear-gradient(135deg, #9a6b25, #e8cb84 30%, #b3853a 55%, #f3e0a6 80%, #a5762e);
  box-shadow: 0 24px 40px -22px rgba(140, 44, 80, .55);
}
.frame__oval img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 5px solid var(--paper);
  background: var(--blush-2);
}
.frame__crown {
  position: absolute;
  z-index: 2;
  top: -1.9rem;
  left: 50%;
  width: 4.25rem;
  translate: -50% 0;
  filter: drop-shadow(0 4px 4px rgba(133, 96, 31, .25));
}
.frame__flowers {
  position: relative;
  z-index: 2;
  width: 120%;
  margin: -3.25rem 0 0 -10%;
}

/* Gallery: keepsake prints, gently tilted */
.gallery__lede { max-width: 26rem; margin: 0 auto 2rem; color: var(--ink-soft); font-style: italic; }
.gallery__grid {
  columns: 2;
  column-gap: .9rem;
  margin: 0;
  padding: 0 .25rem;
  list-style: none;
}
.gallery__item { break-inside: avoid; margin-bottom: 1rem; }
.gallery__item:nth-child(4n + 1) { rotate: -1.2deg; }
.gallery__item:nth-child(4n + 2) { rotate: 1deg; }
.gallery__item:nth-child(4n + 3) { rotate: .6deg; }
.gallery__item:nth-child(4n + 4) { rotate: -.8deg; }
.gallery__btn {
  display: block;
  width: 100%;
  padding: .4rem .4rem 1.1rem;
  border: 0;
  cursor: zoom-in;
  background: var(--paper);
  border-radius: .2rem;
  box-shadow: 0 0 0 1px rgba(182, 138, 62, .3), 0 14px 22px -16px rgba(140, 44, 80, .55);
  transition: rotate .3s var(--ease), translate .3s var(--ease), box-shadow .3s;
}
.gallery__btn img { width: 100%; height: auto; background: var(--blush-2); border-radius: .1rem; }
.gallery__btn:hover { translate: 0 -3px; box-shadow: 0 0 0 1px rgba(182, 138, 62, .5), 0 20px 28px -16px rgba(140, 44, 80, .6); }

.lightbox {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(58, 30, 40, .94);
  color: var(--paper);
}
.lightbox::backdrop { background: rgba(58, 30, 40, .94); }
.lightbox[open] { display: grid; place-items: center; }
.lb-open body { overflow: hidden; }
.lightbox__figure { margin: 0; padding: 3.75rem .75rem 4.5rem; }
.lightbox__img {
  max-width: min(100%, 60rem);
  max-height: calc(100dvh - 8.5rem);
  width: auto;
  height: auto;
  margin: 0 auto;
  border: 6px solid var(--paper);
  border-radius: .25rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .4);
}
.lightbox__count {
  position: absolute;
  top: 1.1rem;
  left: 50%;
  translate: -50% 0;
  margin: 0;
  font-family: var(--caps);
  letter-spacing: .2em;
}
.lightbox__btn {
  position: absolute;
  width: 3.25rem;
  height: 3.25rem;
  padding: 0;
  font: 2rem/1 var(--serif);
  color: var(--paper);
  background: rgba(255, 250, 246, .12);
  border: 1px solid rgba(255, 250, 246, .35);
  border-radius: 50%;
  cursor: pointer;
}
.lightbox__btn:hover { background: rgba(255, 250, 246, .25); }
.lightbox__close { top: .6rem; right: .75rem; }
.lightbox__prev { bottom: .9rem; left: calc(50% - 4rem); }
.lightbox__next { bottom: .9rem; right: calc(50% - 4rem); }

/* Details */
.facts { margin: 0 auto; max-width: 26rem; }
.facts__row {
  padding: 1rem 0;
  border-bottom: 1px solid rgba(215, 184, 120, .6);
}
.facts__row:first-child { border-top: 1px solid rgba(215, 184, 120, .6); }
.facts dt {
  font-family: var(--caps);
  font-size: .8125rem;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--rose-deep);
}
.facts dd { margin: .25rem 0 0; font-size: 1.3125rem; line-height: 1.4; }
.facts__weekday::before { content: ", "; }

.map-actions {
  display: grid;
  gap: .75rem;
  max-width: 26rem;
  margin: 1.75rem auto 0;
}
.details__keep {
  max-width: 24rem;
  margin: 1.25rem auto 0;
  font-style: italic;
  font-size: 1.0625rem;
  color: var(--ink-soft);
}

/* Dress code: the colour palette as painted ribbons */
.dresscode__lede { margin: -.25rem 0 1.5rem; font-style: italic; font-size: 1.375rem; color: var(--gold-ink); }
.palette { display: grid; gap: .75rem; max-width: 26rem; margin: 0 auto; padding: 0; list-style: none; }
.palette__swatch {
  padding: 1rem;
  font-family: var(--caps);
  font-size: 1.25rem;
  letter-spacing: .04em;
  color: var(--rose-ink);
  background: #f3bfcc;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(255, 250, 246, .7) inset, 0 6px 14px -10px rgba(116, 33, 63, .6);
}

.palette__swatch--rose { background: #e497b0; }
.palette__swatch--lavender { background: #d6c0e6; }
.palette__swatch--blue { background: #bcd9ef; }
.palette__swatch--gold { background: #e3ba60; }

/* Gift ideas */
.gifts__lede { max-width: 28rem; margin: 0 auto 1.25rem; color: var(--ink-soft); }
.gifts__list { display: inline-grid; gap: .6rem; margin: 0 auto; padding: 0; list-style: none; text-align: left; }
.gifts__list li { position: relative; padding-left: 1.75rem; font-size: 1.3125rem; color: var(--rose-deep); }
.gifts__list li::before { content: "✦"; position: absolute; left: 0; color: var(--gold); }
.gifts__qr {
  width: max-content;
  margin: 1.5rem auto 0;
  padding: .25rem;
  background: #fff;
  border: 1px solid var(--gold-line);
  box-shadow: 0 0 0 4px var(--paper), 0 0 0 5px rgba(215, 184, 120, .6);
}
.gifts__qr img { display: block; width: 4rem; height: auto; margin: 0 auto; }
.gifts__qr figcaption { margin-top: .25rem; font-size: .75rem; line-height: 1.2; font-style: italic; color: var(--ink-soft); }
.gifts__how { max-width: 24rem; margin: 1rem auto 0; font-size: 1rem; font-style: italic; color: var(--ink-soft); }

/* RSVP */
.rsvp__lede { margin: 0 auto; max-width: 26rem; }
.rsvp__by {
  display: inline-block;
  margin: 1rem auto 0;
  padding: .35rem 1rem;
  font-family: var(--caps);
  font-size: .875rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--rose-deep);
  border-block: 1px solid var(--gold-line);
}
.rsvp__card {
  margin-top: 1.75rem;
  padding: .5rem;
  background: var(--paper);
  border-radius: 1rem;
  box-shadow: 0 0 0 1px rgba(182, 138, 62, .28), 0 30px 50px -34px rgba(140, 44, 80, .5);
}
.rsvp__pending {
  padding: 2.25rem 1.25rem 2rem;
  border: 1px dashed var(--gold-line);
  border-radius: .75rem;
}
.rsvp__pending p { margin: 0 auto; max-width: 22rem; }
.rsvp__crown { width: 3.25rem; margin: 0 auto .75rem; }
.rsvp__pending-title {
  margin-bottom: .5rem !important;
  font-family: var(--caps);
  font-size: 1.0625rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--rose-deep);
}
.rsvp__frame {
  display: block;
  width: 100%;
  min-height: 40rem;
  border: 0;
  border-radius: .75rem;
  background: var(--paper);
}
.rsvp__help, .rsvp__note {
  margin: 1rem auto 0;
  max-width: 26rem;
  font-size: 1.0625rem;
  color: var(--ink-soft);
}
.rsvp__note { font-style: italic; }

/* Footer */
.foot { margin-top: 5rem; text-align: center; color: var(--ink-soft); }
.foot__crown { width: 2.5rem; margin: 0 auto .5rem; }
.foot__made { margin: 0; }
.foot__made .script { font-size: 1.9rem; color: var(--rose-deep); margin-left: .2rem; }
.foot__private { margin: .5rem auto 0; max-width: 22rem; font-size: .9375rem; }

/* Floating RSVP button */
.rsvp-fab {
  position: fixed;
  z-index: 20;
  right: 1rem;
  bottom: calc(1rem + env(safe-area-inset-bottom));
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-height: 3.25rem;
  padding: 0 1.35rem 0 1.1rem;
  font-family: var(--caps);
  letter-spacing: .16em;
  text-decoration: none;
  color: var(--paper);
  background: var(--rose-deep);
  border-radius: 999px;
  box-shadow: 0 0 0 3px var(--paper), 0 0 0 4px var(--gold-line), 0 14px 28px -12px rgba(116, 33, 63, .7);
  opacity: 0;
  translate: 0 1.5rem;
  pointer-events: none;
  transition: opacity .3s, translate .3s var(--ease);
}
.rsvp-fab svg { width: 1.5rem; }
.rsvp-fab.is-visible { opacity: 1; translate: 0 0; pointer-events: auto; }
.rsvp-fab:hover { color: var(--paper); background: var(--rose-ink); }

/* Music toggle: a small gold-rimmed button, top right */
.music {
  position: fixed;
  z-index: 60;
  top: calc(.75rem + env(safe-area-inset-top));
  right: .75rem;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  padding: 0;
  color: var(--rose-deep);
  background: rgba(255, 250, 246, .92);
  border: 1px solid var(--gold-line);
  border-radius: 50%;
  box-shadow: 0 6px 16px -8px rgba(140, 44, 80, .5);
  cursor: pointer;
}
.music svg { width: 1.35rem; height: 1.35rem; }
.music__bars { display: none; gap: 3px; align-items: end; height: 1.1rem; }
.music__bars i { width: 3px; height: 40%; background: currentColor; border-radius: 2px; animation: eq 1s ease-in-out infinite; }
.music__bars i:nth-child(2) { animation-delay: -.35s; }
.music__bars i:nth-child(3) { animation-delay: -.7s; }
@keyframes eq { 0%, 100% { height: 30%; } 50% { height: 100%; } }
.music[aria-pressed="true"] .music__on { display: none; }
.music[aria-pressed="true"] .music__bars { display: flex; }
.music:hover { background: var(--paper); }
.lb-open .music { display: none; }

/* Preview-only setup checklist */
.setup {
  position: fixed;
  z-index: 30;
  left: .75rem;
  bottom: .75rem;
  max-width: min(22rem, calc(100% - 7.5rem));
  font: 13px/1.4 system-ui, sans-serif;
  color: #fff;
  background: rgba(50, 30, 36, .92);
  border-radius: .5rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
}
.setup summary { padding: .6rem .8rem; cursor: pointer; font-weight: 600; }
.setup__note { margin: 0 .8rem .4rem; opacity: .75; }
.setup ul { margin: 0; padding: 0 .8rem .8rem 1.8rem; }
.setup li { margin: .25rem 0; }
.setup li.ok::marker { content: "✓  "; color: #9be3b0; }
.setup li.todo-item::marker { content: "○  "; color: #ffd27a; }
.setup code { color: #ffd9e4; }

/* ---------- Opening envelope ---------- */

.intro { display: none; }
.show-intro .intro[hidden], .intro.is-open { display: grid !important; }

.intro {
  position: fixed;
  inset: 0;
  z-index: 50;
  place-items: center;
  padding: 1.5rem var(--gutter);
  overflow: hidden;
  background:
    radial-gradient(40rem 30rem at 50% 40%, #fff5f6 0%, transparent 70%),
    var(--blush);
  transition: opacity .6s ease, visibility 0s linear .6s;
}
.intro.is-leaving { opacity: 0; visibility: hidden; }
.show-intro body { overflow: hidden; }

.intro__inner { position: relative; z-index: 2; text-align: center; }
.intro__title {
  margin: 0 0 1.5rem;
  font-size: clamp(3rem, 14vw, 4.25rem);
  line-height: 1;
  color: var(--rose-deep);
}
.intro__hint {
  margin: 2.25rem 0 .25rem;
  font-family: var(--caps);
  font-size: .875rem;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.intro__skip {
  min-height: 3rem;
  padding: 0 1rem;
  font: italic 1.0625rem var(--serif);
  color: var(--rose-deep);
  background: none;
  border: 0;
  text-decoration: underline;
  text-underline-offset: .2em;
  cursor: pointer;
}

.intro__floral { position: absolute; width: min(70vw, 22rem); pointer-events: none; }
.intro__floral--tl { left: -12%; top: -4%; }
.intro__floral--br { right: -12%; bottom: -4%; }
.bfly--intro1 { top: 18%; right: 14%; }
.bfly--intro2 { bottom: 22%; left: 10%; width: 2rem; animation-delay: -2s; }

.envelope {
  position: relative;
  width: min(84vw, 22rem);
  aspect-ratio: 7 / 5;
  margin: 0 auto;
  perspective: 1200px;
}
.envelope__back,
.envelope__pocket,
.envelope__flap {
  position: absolute;
  inset: 0;
  border-radius: .5rem;
}
.envelope__back { background: #ecb3c3; }
.envelope__letter {
  position: absolute;
  z-index: 1;
  left: 7%;
  right: 7%;
  top: 6%;
  height: 88%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 9%;
  background: var(--paper);
  border-radius: .375rem;
  box-shadow: inset 0 0 0 1px rgba(182, 138, 62, .35);
  transition: translate .8s var(--ease) .55s;
}
.envelope__letter .script { font-size: 2.25rem; line-height: 1.2; color: var(--rose); }
.envelope__crown { width: 2.5rem; }
.envelope__date {
  font-family: var(--caps);
  font-size: .75rem;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.envelope__pocket {
  z-index: 2;
  background: linear-gradient(160deg, #f7d3dc, #f0c0cd);
  clip-path: polygon(0 0, 50% 54%, 100% 0, 100% 100%, 0 100%);
  box-shadow: 0 30px 50px -30px rgba(140, 44, 80, .55);
}
.envelope__flap {
  z-index: 3;
  bottom: auto;
  height: 62%;
  background: linear-gradient(180deg, #f3c3d0, #e9a9bb);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: 50% 0;
  transition: transform .6s ease, z-index 0s linear .3s;
}

.seal {
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 62%;
  width: 5.5rem;
  height: 5.5rem;
  translate: -50% -50%;
  display: grid;
  place-items: center;
  align-content: center;
  padding: 0;
  border: 0;
  cursor: pointer;
  color: #ffe6ee;
  border-radius: 48% 52% 50% 50% / 53% 47% 53% 47%;
  background: radial-gradient(circle at 35% 30%, #d9668d 0%, #a8325a 55%, #7d1f42 100%);
  box-shadow:
    inset 0 0 0 5px rgba(125, 31, 66, .35),
    inset 0 -6px 10px rgba(0, 0, 0, .18),
    0 10px 18px -6px rgba(116, 33, 63, .6);
  transition: scale .3s var(--ease), opacity .3s ease;
  animation: seal-pulse 2.4s ease-in-out infinite;
}
.seal::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 214, 226, .55);
}
.seal:hover { scale: 1.05; }
.seal__crown { width: 1.75rem; margin-bottom: -.1rem; opacity: .95; }
.seal__mono {
  font-family: var(--script);
  font-size: 2rem;
  line-height: 1;
  text-shadow: 0 1px 0 rgba(0, 0, 0, .25);
}
@keyframes seal-pulse {
  0%, 100% { box-shadow: inset 0 0 0 5px rgba(125, 31, 66, .35), inset 0 -6px 10px rgba(0, 0, 0, .18), 0 10px 18px -6px rgba(116, 33, 63, .6), 0 0 0 0 rgba(184, 71, 110, .35); }
  50% { box-shadow: inset 0 0 0 5px rgba(125, 31, 66, .35), inset 0 -6px 10px rgba(0, 0, 0, .18), 0 10px 18px -6px rgba(116, 33, 63, .6), 0 0 0 14px rgba(184, 71, 110, 0); }
}

.intro__title, .intro__hint, .intro__skip { transition: opacity .35s ease; }
.intro.is-open .intro__title,
.intro.is-open .intro__hint,
.intro.is-open .intro__skip { opacity: 0; }
.intro.is-open .seal { scale: .4; opacity: 0; animation: none; pointer-events: none; }
.intro.is-open .envelope__flap { transform: rotateX(180deg); z-index: 0; }
.intro.is-open .envelope__letter { translate: 0 -42%; }

/* ---------- Motion ---------- */

/* Sections fade up as they scroll in (only once app.js has set up the observer). */
.io .reveal { opacity: 0; translate: 0 1.5rem; transition: opacity .8s ease, translate .8s var(--ease); }
.io .reveal.is-in { opacity: 1; translate: 0 0; }

/* The card's lines rise in turn; held while the envelope is still closed. */
.rise { animation: rise .9s var(--ease) both; }
.show-intro .rise { animation-play-state: paused; }
.hero__title { animation-delay: .12s; }
.rise.eyebrow + .hero__title + .eyebrow { animation-delay: .22s; }
.hero__name { animation-delay: .32s; }
.datebar { animation-delay: .44s; }
.hero__weekday, .hero__venue { animation-delay: .54s; }
.countdown { animation-delay: .62s; }
.hero__actions { animation-delay: .7s; }
@keyframes rise { from { opacity: 0; translate: 0 .75rem; } to { opacity: 1; translate: 0 0; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .io .reveal { opacity: 1; translate: none; }
}

/* ---------- Larger screens ---------- */

@media (min-width: 30rem) {
  .map-actions { grid-template-columns: 1fr 1fr; }
}

.page-florals { display: none; }
@media (min-width: 64rem) {
  .page-florals { display: block; }
  .page-florals svg { position: absolute; width: 26rem; opacity: .9; pointer-events: none; }
  .page-florals__l { left: -6rem; top: 34rem; }
  .page-florals__r { right: -6rem; top: 80rem; }
}

@media (min-width: 48rem) {
  :root { --gutter: 2rem; }
  .hero { padding-top: 5rem; }
  .bfly--a { right: -2.5rem; }
  .bfly--b { left: -3rem; }
  .note, .portrait, .gallery, .details, .dresscode, .rsvp, .gifts { margin-top: 6rem; }
  .gallery__grid { columns: 3; }
}
