@font-face {
  font-family: Allison;
  src: url('allison.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'Cormorant Garamond';
  src: url('cormorant-garamond.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #fdfcf7;
  --ink: #343732;
  --muted: #595f53;
  --gold: #826632;
  --sage: #405842;
  --line: #d9d3bd;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --script: Allison, 'Brush Script MT', cursive;
  --sans: system-ui, sans-serif;
  --foil-specks:
    radial-gradient(circle at 12% 7%, #b99b5b85 0 1.1px, transparent 1.7px),
    radial-gradient(circle at 23% 18%, #c9a85d8c 0 1.5px, transparent 2px),
    radial-gradient(circle at 33% 11%, #a6854494 0 1px, transparent 1.6px),
    radial-gradient(circle at 41% 28%, #d9c2909e 0 1.9px, transparent 2.5px),
    radial-gradient(circle at 50% 17%, #b9985485 0 1px, transparent 1.7px),
    radial-gradient(circle at 56% 8%, #b796538c 0 1.7px, transparent 2.2px),
    radial-gradient(circle at 67% 36%, #c4a77592 0 1.4px, transparent 2px),
    radial-gradient(circle at 75% 14%, transparent 0 1.2px, #bea06387 1.4px 2px, transparent 2.6px),
    radial-gradient(circle at 82% 48%, #b89a5a95 0 1.5px, transparent 2.2px),
    radial-gradient(circle at 88% 27%, #d9bb858e 0 2px, transparent 2.7px),
    radial-gradient(circle at 94% 67%, #b99b5b85 0 1px, transparent 1.7px),
    radial-gradient(circle at 87% 80%, #d4bc8a8c 0 1.3px, transparent 1.9px);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: #e9e9df; color: var(--ink); font-family: var(--serif); }
body.intro-visible { overflow: hidden; }
h1, h2, h3, p { margin: 0; }
button, textarea { font: inherit; }
button { color: inherit; }
:focus-visible { outline: 2px solid var(--sage); outline-offset: 4px; }
#cover-title:focus, #rsvp:focus { outline: none; }

.eyebrow {
  font-size: .875rem;
  font-weight: 700;
  letter-spacing: .13em;
  line-height: 1.35;
  text-transform: uppercase;
}

.cross {
  --cross-fill: linear-gradient(120deg, #8c6c32, #dbc58a 43%, #b59750 67%, #896c33);
  position: relative;
  display: inline-block;
  width: 2.35rem;
  height: 3.25rem;
}

.cross::before, .cross::after { content: ''; position: absolute; background: var(--cross-fill); }
.cross::before { inset: 0 41% 0; }
.cross::after { inset: 25% 4% 60%; }

.language-switch {
  position: fixed;
  z-index: 11;
  inset-block-start: max(.65rem, env(safe-area-inset-top));
  inset-inline-end: max(.65rem, calc((100% - 31rem) / 2 + .65rem), env(safe-area-inset-right));
  display: flex;
  gap: .1rem;
  padding: .15rem;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: var(--paper);
  box-shadow: 0 .15rem .65rem #34373216;
}

.language-switch button {
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0;
  border: 0;
  border-radius: 99px;
  background: transparent;
  color: var(--sage);
  font: 700 .75rem/1 var(--sans);
  cursor: pointer;
}

.language-switch button[aria-pressed='true'] { background: var(--sage); color: white; }

/* Both moving paper layers share the same image so the closed envelope aligns. */
.intro {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  align-items: center;
  justify-items: center;
  overflow: auto;
  padding: max(2rem, env(safe-area-inset-top)) 1rem max(2rem, env(safe-area-inset-bottom));
  background:
    radial-gradient(ellipse at 50% 45%, #fffdf6 15%, #fffdf6bd 46%, transparent 75%),
    radial-gradient(ellipse at 96% 0%, #e0bd788a, transparent 53%),
    linear-gradient(150deg, #e3e9d9, #f9f1dc 55%, #e6d4aa);
  transition: opacity 320ms ease 620ms;
}

.intro::before, .intro::after {
  content: '';
  position: absolute;
  z-index: -1;
  width: min(67%, 26rem);
  aspect-ratio: 1;
  background: url('eucalyptus.png') left top / 85% auto no-repeat, var(--foil-specks);
  opacity: .78;
  pointer-events: none;
}

.intro::before { top: 0; left: 0; }
.intro::after { bottom: 0; right: 0; transform: rotate(180deg); }
.intro-inner { width: min(100%, 25rem); text-align: center; }
.intro-kicker { color: var(--sage); letter-spacing: .19em; }
.intro-name {
  margin: .3rem 0 1.8rem;
  color: var(--ink);
  font-family: var(--script);
  font-size: clamp(3.6rem, 15vw, 5.2rem);
  font-weight: 400;
  line-height: 1;
}

.envelope-button {
  display: block;
  width: min(100%, 21rem);
  margin-inline: auto;
  padding: 0;
  border: 0;
  border-radius: .5rem;
  background: none;
  cursor: pointer;
}

.envelope {
  --envelope-art: url('envelope-ivory.png');
  position: relative;
  display: block;
  aspect-ratio: 680 / 412;
  isolation: isolate;
  perspective: 800px;
  border-radius: .4rem;
  box-shadow: 0 1.6rem 2rem -1.5rem #43391a8c, 0 .2rem .6rem #6d634226;
}

.envelope-back, .envelope-pocket, .envelope-flap {
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.envelope-back { background: #e4d9c3; }
.envelope-letter {
  position: absolute;
  z-index: 1;
  inset: .75rem 8% .75rem;
  display: grid;
  place-items: center;
  border: 1px solid #ddd2b3;
  border-radius: .1rem;
  background:
    url('eucalyptus.png') top left / 46% auto no-repeat,
    #fffdf5;
  transition: transform 450ms cubic-bezier(.2,.7,.2,1) 190ms;
}

.envelope-letter .cross { margin-top: -1.5rem; scale: .7; }
.envelope-pocket, .envelope-flap { background: var(--envelope-art) center / 100% 100% no-repeat, #f2e8d7; }

.envelope-pocket {
  z-index: 2;
  clip-path: polygon(0 8%, 1.2% 10.4%, 50% 70.5%, 98.8% 10.2%, 100% 8%, 100% 100%, 0 100%);
}

.envelope-flap {
  z-index: 3;
  clip-path: polygon(0 0, 100% 0, 100% 8.5%, 98.8% 11%, 50% 72%, 1.2% 11.3%, 0 8.8%);
  transform-origin: top;
  transition: transform 490ms ease;
}

.wax-seal {
  position: absolute;
  z-index: 4;
  inset: 70.5% auto auto 50%;
  translate: -50% -50%;
  display: grid;
  place-items: center;
  width: 3.6rem;
  aspect-ratio: 1;
  border: 1px solid #876536;
  border-radius: 46% 50% 44% 48% / 51% 44% 51% 44%;
  background: radial-gradient(circle at 41% 33%, #ddca8a 0%, #b49253 56%, #876436 90%);
  box-shadow: inset 0 0 0 3px #dbc18575, inset 0 0 0 5px #8b6a3b66, 0 .24rem .45rem #58412054;
  transition: opacity 220ms ease, scale 220ms ease;
}

.wax-seal .cross { --cross-fill: #765925; width: 1rem; height: 1.45rem; filter: drop-shadow(0 1px 0 #e7d398); }
.intro-action { margin: 1.35rem auto 0; }
.is-opening { opacity: 0; pointer-events: none; }
.is-opening .wax-seal { opacity: 0; scale: 1.18; }
.is-opening .envelope-flap { z-index: 0; transform: rotateX(172deg); }
.is-opening .envelope-letter { transform: translateY(-44%); }

.invitation { width: min(100%, 31rem); margin-inline: auto; background: var(--paper); box-shadow: 0 0 3rem #333a2716; }
.cover {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-height: min(100svh, 58rem);
  overflow: clip;
  padding: clamp(4.6rem, 9.4svh, 6.1rem) 1rem clamp(3.15rem, 6svh, 5rem);
  background:
    radial-gradient(ellipse at 95% 4%, #e5c57c45, transparent 32%),
    radial-gradient(ellipse at 4% 98%, #edd59c66, transparent 34%),
    radial-gradient(ellipse at 50% 50%, #fffefa 36%, #f8f3e6 100%);
  text-align: center;
}

.foliage { position: absolute; z-index: -1; width: 59%; height: auto; pointer-events: none; }
.foliage-top { top: 0; left: 0; }
.foliage-bottom { right: 0; bottom: 0; transform: rotate(180deg); }
.cover::before, .cover::after {
  content: '';
  position: absolute;
  z-index: -1;
  width: 62%;
  height: 10rem;
  pointer-events: none;
  background: var(--foil-specks);
}
.cover::before { top: 0; right: 0; }
.cover::after { bottom: 0; left: 0; transform: rotate(180deg); }
.cover-copy { width: 100%; }
.cover-cross { display: block; width: 2.7rem; height: 3.75rem; margin: 0 auto clamp(1rem, 2.3svh, 1.4rem); }
.cover-invitation { color: var(--muted); }
.cover-title {
  margin: .22rem auto .15rem;
  font-family: var(--script);
  font-size: clamp(5.3rem, 27vw, 8.4rem);
  font-weight: 400;
  line-height: 1.03;
}

.cover-relation { margin-top: .35rem; color: var(--muted); }
:lang(es) .cover-relation { margin-top: 1rem; }
.cover-name {
  margin: clamp(1.05rem, 3svh, 1.65rem) auto clamp(1.05rem, 3svh, 1.65rem);
  color: var(--gold);
  font-size: clamp(1.55rem, 6.5vw, 2.15rem);
  font-weight: 600;
  letter-spacing: .09em;
  line-height: 1.12;
  text-transform: uppercase;
}

.event-date {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: end;
  width: min(91%, 18rem);
  margin-inline: auto;
  gap: .5rem;
  font-weight: 700;
  text-transform: uppercase;
}

.date-center { display: grid; justify-items: center; }
.date-month, .date-side { font-size: clamp(.83rem, 3.9vw, 1.05rem); letter-spacing: .085em; }
.date-day { color: var(--gold); font-size: clamp(2.8rem, 12vw, 3.45rem); line-height: .92; font-weight: 600; }
.date-side { padding: .2rem 0; border-block: 1px solid var(--line); white-space: nowrap; }
.event-places { display: grid; gap: clamp(.85rem, 1.8svh, 1.15rem); margin-top: clamp(1.05rem, 2.5svh, 1.45rem); letter-spacing: .075em; }
.event-place { display: grid; justify-items: center; gap: .35rem; }
.event-place p { font-size: .78rem; letter-spacing: .06em; }
.cover-response { display: grid; justify-items: center; gap: .5rem; margin-top: clamp(1.1rem, 2.7svh, 1.55rem); }
.cover-response .eyebrow { color: var(--muted); }
.stationery-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  min-height: 2.75rem;
  padding: .38rem .85rem;
  border: 1px solid #af985f;
  border-radius: .72rem;
  background: linear-gradient(160deg, #fffcf4, #f3e8ce);
  box-shadow: inset 0 0 0 2px #fffdf2bb, 0 .2rem .55rem #74582e22;
  color: #4e412b;
  font: 700 .85rem/1.1 var(--sans);
  letter-spacing: .01em;
  text-decoration: none;
  text-transform: none;
}

.button-icon { flex: 0 0 auto; width: 1.55rem; height: 1.55rem; padding: .15rem; border: 1px solid #b49a635e; border-radius: 50%; }
.stationery-button:hover, .envelope-button:hover .intro-action { background: #f5e7c8; }
.cover-action, .music-control {
  border-color: #a99159;
  background: #3b513c;
  box-shadow: inset 0 0 0 2px #d7bb793b;
  color: #fffdf4;
}
.cover-action:hover, .music-control:hover { background: #405840; }
.cover-action .button-icon { border-color: #dbc78e85; }
.map-link {
  display: inline-flex;
  align-items: center;
  gap: .2rem;
  min-height: 1.5rem;
  border-bottom: 1px solid currentColor;
  color: var(--sage);
  font: 600 .78rem/1.1 var(--sans);
  letter-spacing: normal;
  text-decoration: none;
  text-transform: none;
}
.map-link svg { width: 1rem; height: 1rem; }
.map-link:hover { color: var(--ink); }

.music-control {
  position: fixed;
  z-index: 9;
  inset-inline-end: max(.65rem, calc((100% - 31rem) / 2 + .65rem), env(safe-area-inset-right));
  inset-block-end: calc(.75rem + env(safe-area-inset-bottom));
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid #a99159;
  border-radius: 50%;
  cursor: pointer;
}
.music-control svg { width: 1.25rem; height: 1.25rem; }
.music-control .music-pause, .music-control[data-playing='true'] .music-play, .intro-visible .music-control { display: none; }
.music-control[data-playing='true'] .music-pause { display: block; }

.vf-submit-btn.confirm, .vf-download-btn {
  border-color: #a99159;
  background: linear-gradient(155deg, #4d634b, #314733);
  box-shadow: inset 0 0 0 2px #d7bb793b, 0 .26rem .7rem #35472c2e;
  color: #fffdf4;
}
.vf-submit-btn.confirm:hover, .vf-download-btn:hover { background: #405840; }
.rsvp {
  position: relative;
  isolation: isolate;
  padding: clamp(2.75rem, 9svh, 5rem) clamp(.85rem, 4.5vw, 2rem) calc(4rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background:
    radial-gradient(ellipse at 50% 22%, #fffdf4 5%, #fffdf4b5 44%, transparent 80%),
    radial-gradient(ellipse at 95% 4%, #ebd7a0, transparent 47%),
    linear-gradient(155deg, #e5ebdd, #f7efdb 65%, #e4e9db);
}

.rsvp::before, .rsvp::after {
  content: '';
  position: absolute;
  z-index: -1;
  width: 49%;
  aspect-ratio: 1;
  background: url('eucalyptus.png') top left / 100% auto no-repeat;
  opacity: .56;
  pointer-events: none;
}

.rsvp::before { top: 0; left: 0; }
.rsvp::after { right: 0; bottom: 0; transform: rotate(180deg); }

.rsvp-heading { margin-bottom: 1.2rem; text-align: center; }
.rsvp-ornament { display: block; margin-bottom: .65rem; color: var(--gold); font-size: 1.4rem; }
.rsvp-heading .eyebrow { color: var(--sage); }
.rsvp-heading h2 { font-family: var(--script); font-weight: 400; font-size: clamp(3.5rem, 14vw, 5rem); line-height: 1.02; }
.rsvp-date { margin-top: .3rem; color: var(--muted); font-size: 1.16rem; font-weight: 600; }
.demo-note { margin-bottom: .65rem; color: var(--muted); font: .78rem/1.4 var(--sans); text-align: center; }

/* Theme the existing VibeFly RSVP markup for this stationery. */
#vibefly-demo-rsvp { color: var(--ink); font: .9rem/1.5 var(--sans); }
.vf-container { padding: clamp(.95rem, 4.5vw, 1.55rem); border: 1px solid var(--line); background: var(--paper); box-shadow: 0 1rem 2rem -1.6rem #37473280; }
.vf-title, .vf-success-title { color: var(--sage); font: 700 1.65rem/1.05 var(--serif); text-align: center; }
.vf-guest-info, .vf-counter, .vf-success-summary, .vf-qr-section { border: 1px solid #dde1d5; background: #f3f5ed; }
.vf-guest-info { margin: 1rem 0 .85rem; padding: .65rem .8rem; }
.vf-guest-passes { color: var(--muted); }
.vf-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; margin-bottom: .85rem; }
.vf-option { min-height: 4.2rem; padding: .5rem .25rem; border: 1px solid #d1c4a3; background: linear-gradient(160deg, #fffefa, #f7f0df); box-shadow: inset 0 0 0 2px #fffdf2; font-size: .85rem; font-weight: 600; cursor: pointer; }
.vf-option-icon { display: block; width: 1.25rem; height: 1.25rem; margin: 0 auto .18rem; stroke: #687666; }
.vf-option.selected-yes, .vf-option.selected-no { border-color: #657b61; background: #edf2e7; box-shadow: inset 0 0 0 1px #657b61; }
.vf-option.selected-yes .vf-option-icon, .vf-option.selected-no .vf-option-icon { stroke: var(--sage); }
.vf-counter { display: flex; align-items: center; justify-content: space-between; gap: .25rem; padding: .27rem .55rem; margin-bottom: .45rem; }
.vf-counter-label { display: flex; align-items: center; gap: .35rem; font-weight: 600; }
.vf-counter-icon { flex: 0 0 1rem; width: 1rem; height: 1rem; color: var(--sage); }
.vf-counter-controls { display: flex; align-items: center; gap: .35rem; }
.vf-counter-value { min-width: 2.3rem; text-align: center; font-variant-numeric: tabular-nums; }
.vf-counter-btn { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; padding: 0; border: 0; border-radius: 50%; background: #e2e9dc; color: var(--sage); font-size: 1.15rem; font-weight: 600; cursor: pointer; }
.vf-message-section { margin: .85rem 0; }
.vf-message-label { display: block; margin-bottom: .28rem; font-weight: 600; }
.vf-message-input { display: block; width: 100%; padding: .65rem .75rem; border: 1px solid #bec7b7; border-radius: 0; background: #fffefa; color: var(--ink); font-size: 1rem; resize: vertical; }
.vf-submit-btn, .vf-download-btn { min-height: 2.75rem; padding: .55rem 1rem; border: 1px solid #a99159; font-weight: 650; cursor: pointer; }
.vf-submit-btn { width: 100%; margin-top: .3rem; }
.vf-submit-btn.decline { background: linear-gradient(155deg, #626b5c, #475245); box-shadow: inset 0 0 0 2px #d7bb793b; color: #fffdf4; }
.vf-submit-btn:disabled { opacity: .65; cursor: default; }
.vf-footer { margin-top: .8rem; color: var(--muted); text-align: center; font-size: .75rem; }
.vf-success { text-align: center; }
.vf-success-icon, .vf-declined-icon { display: grid; place-items: center; width: 3.5rem; aspect-ratio: 1; margin: 0 auto .65rem; border-radius: 50%; background: #edf2e7; color: var(--sage); }
.vf-success-icon svg, .vf-declined-icon svg { width: 1.75rem; height: 1.75rem; }
.vf-success-message { margin: .5rem 0 .85rem; }
.vf-success-summary, .vf-qr-section { padding: .65rem; margin: .65rem auto; }
.vf-success-summary-value, .vf-qr-title { font-weight: 700; }
.vf-qr-container { display: inline-block; max-width: 100%; margin-top: .5rem; padding: .55rem; background: #fff; }
#vf-qr-code :is(canvas, img) { max-width: 100%; height: auto; }
.vf-qr-hint, .vf-qr-code-text, .vf-screenshot-tip { margin-top: .4rem; color: var(--muted); font-size: .78rem; }
.vf-download-btn { display: inline-flex; align-items: center; gap: .35rem; margin-top: .55rem; text-decoration: none; }
.vf-download-btn svg { width: 1rem; height: 1rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .intro, .intro * { transition: none !important; }
}
