/* ═══════════════════════════════════════════════════════════════
   Henry & Florida · 1 Gusht 2026
   White paper, deep ink, embossed seal, olive leaves falling.
   ═══════════════════════════════════════════════════════════════ */

:root {
  /* PAPER · pure cool white + olive — NO yellow/sepia */
  --paper:        #f6fbf3;
  --paper-warm:   #ffffff;
  --paper-soft:   #eff5ea;
  --paper-deep:   #e2ecdb;
  --paper-edge:   #c8d6bf;

  /* INK · deep olive, cool */
  --ink:          #1f2e22;
  --ink-soft:     #354236;
  --ink-mute:     #6b806a;
  --ink-faded:    rgba(31, 46, 34, 0.55);

  --sage-deep:    #2e4530;
  --sage:         #5a7551;
  --sage-light:   #a5bb9a;
  --sage-mist:    #d3e0cc;
  --sage-pale:    #e4ecd9;

  --rust:         #973f2d;
  --rust-deep:    #5a1810;

  --gold:         #a98e5e;

  /* Type */
  --serif:   "Cormorant Garamond", "EB Garamond", Georgia, serif;
  --script:  "Pinyon Script", "Great Vibes", cursive;

  /* Motion */
  --ease:      cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-roll: cubic-bezier(0.7, 0, 0.2, 1);
}

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

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
body.is-sealed { overflow: hidden; height: 100dvh; }

img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }


/* ═══════════════════════════════════════════════════════════════
   ENVELOPE · V-flap with wax seal on the seam
   ═══════════════════════════════════════════════════════════════ */
.env {
  position: fixed;
  inset: 0;
  z-index: 100;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 22%, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0) 46%),
    radial-gradient(circle at 82% 84%, rgba(140, 180, 140, 0.10) 0%, rgba(140, 180, 140, 0) 48%),
    linear-gradient(168deg, #f8fcf5 0%, #f0f6ec 52%, #e3ecd9 100%);
  transition: opacity 0.9s var(--ease-out), visibility 0.9s var(--ease-out);
}
.env.is-leaving { opacity: 0; visibility: hidden; pointer-events: none; }
.env.is-gone    { display: none; }

.env-shell {
  position: absolute;
  left: 50%;
  top: 50%;
  width:  max(100vw, calc(100dvh * 1.55));
  height: max(100dvh, calc(100vw / 1.55));
  transform: translate(-50%, -50%);
  pointer-events: none;
  filter: drop-shadow(0 18px 40px rgba(40, 60, 40, 0.09));
}

.env-paper {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 65%, rgba(0,0,0,0) 45%, rgba(40, 65, 30, 0.06) 100%),
    repeating-linear-gradient(92deg,
      transparent 0, transparent 2px,
      rgba(60, 100, 60, 0.014) 2px, rgba(60, 100, 60, 0.014) 3px),
    repeating-linear-gradient(178deg,
      transparent 0, transparent 5px,
      rgba(60, 100, 60, 0.012) 5px, rgba(60, 100, 60, 0.012) 6px),
    linear-gradient(170deg, #ffffff 0%, #f8fcf5 52%, #e9f1de 100%);
  box-shadow: inset 0 0 100px rgba(80, 120, 80, 0.04);
}
.env-paper::after {
  content: "";
  position: absolute;
  inset: 18px;
  border: 0.5px solid rgba(120, 145, 115, 0.20);
  pointer-events: none;
}

/* V-flap */
.env-flap {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 57%;
  transform-origin: 50% 0%;
  transform-style: preserve-3d;
  transition: transform 1.4s var(--ease-roll);
  z-index: 5;
  pointer-events: none;
  /* Cast a soft shadow on the envelope body below so the closed flap
     visually reads as sitting on top of the front, not folded behind. */
  filter:
    drop-shadow(0 2px 2px rgba(40, 60, 40, 0.09))
    drop-shadow(0 6px 14px rgba(40, 60, 40, 0.06));
}
.env-flap-outer,
.env-flap-inner,
.env-flap-shadow {
  position: absolute;
  inset: 0;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  -webkit-clip-path: polygon(0 0, 100% 0, 50% 100%);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.env-flap-outer {
  background:
    /* faint highlight on the FOLD edge (top) so the flap reads as raised */
    linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0) 6%),
    repeating-linear-gradient(92deg,
      transparent 0, transparent 2px,
      rgba(60, 100, 60, 0.018) 2px, rgba(60, 100, 60, 0.018) 3px),
    linear-gradient(180deg, #f0f6e9 0%, #f6faee 60%, #fcfef7 100%);
}
.env-flap-shadow {
  /* No more inward darkening — that read as "flap folded back" */
  background: none;
  pointer-events: none;
}
.env-flap-inner {
  background: linear-gradient(180deg, var(--paper-warm) 0%, var(--paper) 60%, #e6ecd8 100%);
  transform: rotateX(180deg);
  border: 0.5px solid rgba(120, 145, 115, 0.22);
}

/* Recipient block */
.env-recipient {
  position: absolute;
  top: 76%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(86vw, 520px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  z-index: 3;
}
.env-eyebrow {
  font-family: var(--serif);
  font-style: italic;
  font-size: 12px;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.env-name {
  font-family: var(--script);
  font-size: clamp(46px, 9vw, 78px);
  line-height: 1.05;
  padding: 0.02em 0.2em 0.14em;
  color: var(--ink);
  letter-spacing: 0.005em;
}
.env-plus {
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--ink-mute);
  margin-top: -4px;
}
.env-rule {
  width: 56%;
  height: 0.5px;
  background: linear-gradient(90deg, transparent, rgba(120, 145, 115, 0.5) 25%, rgba(120, 145, 115, 0.5) 75%, transparent);
  margin: 6px 0 2px;
}
.env-date {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 14px;
  letter-spacing: 0.28em;
  text-transform: lowercase;
  color: var(--ink-soft);
}

/* ═════ TWIN BOUQUETS — flanking the wax seal ═════ */
.seal-bouquet {
  position: absolute;
  top: 55%;
  width: clamp(150px, 17vw, 210px);
  height: clamp(150px, 17vw, 210px);
  z-index: 11;                 /* below .env-seal (z 12), above paper */
  pointer-events: none;
  opacity: 0.96;
  filter: drop-shadow(0 12px 18px rgba(46, 69, 48, 0.18))
          drop-shadow(0 4px 8px rgba(122, 65, 55, 0.12));
  will-change: transform;
}
.seal-bouquet--left {
  left: 50%;
  /* the bouquet's visual weight is in its upper-left → mirror so the ribbon
     hangs out to the left and the flowers crowd the right side of the image
     (closest to the seal) */
  transform: translate(calc(-100% + 14%), -50%) rotate(-6deg) scaleX(-1);
  animation: bouquetSwayL 11s ease-in-out infinite alternate;
}
.seal-bouquet--right {
  left: 50%;
  transform: translate(calc(0% - 14%), -50%) rotate(6deg);
  animation: bouquetSwayR 11s ease-in-out infinite alternate;
}
@keyframes bouquetSwayL {
  from { transform: translate(calc(-100% + 14%), -50%) rotate(-7deg) scaleX(-1); }
  to   { transform: translate(calc(-100% + 14%), -50%) rotate(-4deg) scaleX(-1); }
}
@keyframes bouquetSwayR {
  from { transform: translate(calc(0% - 14%), -50%) rotate(5deg); }
  to   { transform: translate(calc(0% - 14%), -50%) rotate(8deg); }
}
.env.is-opening .seal-bouquet {
  animation: bouquetFade 1.1s 0.1s var(--ease-out) forwards;
}
@keyframes bouquetFade {
  to { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .seal-bouquet { animation: none; }
}

/* ═════ WAX SEAL — inline SVG, perfectly contained ═════ */
.env-seal {
  position: absolute;
  top: 55%;
  left: 50%;
  width: clamp(124px, 14vw, 168px);
  height: clamp(124px, 14vw, 168px);
  transform: translate(-50%, -50%);
  z-index: 12;
  display: block;
  outline: none;
  transition: transform 0.7s var(--ease-out);
  -webkit-tap-highlight-color: transparent;
  filter: drop-shadow(0 6px 10px rgba(74, 19, 32, 0.28));
}
.env-seal:hover  { transform: translate(-50%, -50%) scale(1.025); }
.env-seal:active { transform: translate(-50%, -50%) scale(0.98); }

.wax-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;                    /* PNG is 525×350; cover crops sides */
  display: block;
  pointer-events: none;
  animation: sealWobble 8s ease-in-out infinite;
  filter: drop-shadow(0 8px 14px rgba(122, 19, 28, 0.32));
}


/* Subtle rose glow behind the seal */
.env-seal::before {
  content: "";
  position: absolute;
  inset: -12%;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(188, 86, 106, 0.22) 0%, rgba(188, 86, 106, 0.06) 50%, transparent 78%);
  z-index: -1;
  pointer-events: none;
  animation: sealBreath 4s ease-in-out infinite;
  filter: blur(4px);
}

@keyframes sealWobble { 0%,100%{transform:rotate(-0.5deg);} 50%{transform:rotate(0.6deg);} }
@keyframes sealBreath { 0%,100%{transform:scale(0.95);opacity:0.42;} 50%{transform:scale(1.05);opacity:0.7;} }

.env-cue {
  position: absolute;
  bottom: max(36px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  letter-spacing: 0.3em;
  text-transform: lowercase;
  color: var(--ink-mute);
  opacity: 0;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  animation: ctaIn 0.9s 0.6s var(--ease-out) forwards, ctaBob 2.4s 1.6s ease-in-out infinite;
}
.env-cue svg { width: 14px; height: 14px; }
@keyframes ctaIn  { from { opacity: 0; transform: translate(-50%, 6px); } to { opacity: 0.78; transform: translate(-50%, 0); } }
@keyframes ctaBob { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 4px); } }

/* Opening choreography */
.env.is-opening .env-cue { animation: none; opacity: 0; transition: opacity .25s ease; }
.env.is-opening .env-seal::before { animation: sealFlare 0.55s var(--ease-out) forwards; }
@keyframes sealFlare {
  0%   { transform: scale(1);   opacity: 0.95; }
  100% { transform: scale(2.4); opacity: 0;    }
}
.env.is-opening .env-seal {
  animation: sealBreak 1s 0.1s var(--ease-roll) forwards;
}
@keyframes sealBreak {
  0%   { transform: translate(-50%, -50%) scale(1)    rotate(0); }
  25%  { transform: translate(-50%, -50%) scale(1.08) rotate(-3deg); }
  100% { transform: translate(-50%, 80%)  scale(0.6)  rotate(-26deg); opacity: 0; }
}
.env.is-opening .env-flap {
  transform: rotateX(-176deg);
  transition-delay: 0.45s;
}
.env.is-opening .env-shell {
  animation: envLift 1.3s 1.05s var(--ease-out) forwards;
}
.env.is-opening .env-recipient,
.env.is-opening .env-paper {
  animation: envFade 1.2s 1s var(--ease-out) forwards;
}
@keyframes envLift {
  0%   { transform: translate(-50%, -50%) scale(1);    opacity: 1; }
  60%  { transform: translate(-50%, -52%) scale(1.05); opacity: 0.7; }
  100% { transform: translate(-50%, -56%) scale(1.12); opacity: 0; }
}
@keyframes envFade { to { opacity: 0; } }


/* ═══════════════════════════════════════════════════════════════
   THE LETTER · one piece of paper
   ═══════════════════════════════════════════════════════════════ */
.letter {
  position: relative;
  min-height: 100dvh;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 50%),
    radial-gradient(ellipse at 50% 100%, rgba(150, 190, 140, 0.07) 0%, rgba(150, 190, 140, 0) 60%),
    linear-gradient(170deg, #ffffff 0%, #f4faef 45%, #e6efd9 100%);
  overflow: hidden;
}

.paper-grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background:
    repeating-linear-gradient(92deg,
      transparent 0, transparent 2px,
      rgba(60, 100, 60, 0.013) 2px, rgba(60, 100, 60, 0.013) 3px),
    repeating-linear-gradient(178deg,
      transparent 0, transparent 5px,
      rgba(60, 100, 60, 0.010) 5px, rgba(60, 100, 60, 0.010) 6px);
  mix-blend-mode: multiply;
  opacity: 0.6;
}

.paper-watermark {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.paper-watermark img {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 42vh;                        /* horizontal strip at the bottom */
  object-fit: cover;
  object-position: center 8%;
  opacity: 0.18;
  filter:
    grayscale(1)
    brightness(1.12)
    contrast(1.08)
    hue-rotate(70deg);                /* nudges any residual warmth toward green */
  mix-blend-mode: multiply;
  -webkit-mask-image: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.15) 14%,
    rgba(0, 0, 0, 0.55) 28%,
    rgba(0, 0, 0, 0.9) 44%,
    rgba(0, 0, 0, 1) 60%
  );
          mask-image: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.15) 14%,
    rgba(0, 0, 0, 0.55) 28%,
    rgba(0, 0, 0, 0.9) 44%,
    rgba(0, 0, 0, 1) 60%
  );
}
.paper-watermark::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(246, 251, 243, 1) 0%, rgba(246, 251, 243, 1) 42%, rgba(246, 251, 243, 0.92) 54%, rgba(246, 251, 243, 0.6) 66%, rgba(246, 251, 243, 0.25) 80%, rgba(246, 251, 243, 0) 92%, rgba(246, 251, 243, 0.5) 100%);
}

.paper-vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(0,0,0,0) 55%, rgba(40, 70, 40, 0.06) 100%);
}

/* ── Letter content ─────────────────────────────────────── */
.letter-inner {
  position: relative;
  z-index: 3;
  width: min(620px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(72px, 14vw, 140px) clamp(12px, 4vw, 32px) clamp(80px, 12vw, 120px);
  color: var(--ink);
  text-align: center;
}

.l-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-bottom: clamp(40px, 7vw, 64px);
}
.l-monogram {
  font-family: var(--script);
  font-size: clamp(58px, 8vw, 76px);
  line-height: 1;
  color: var(--ink);
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: baseline;
}
.l-monogram .amp {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.4em;
  margin: 0 0.08em 0 0.06em;
  color: var(--gold);
  position: relative;
  top: -0.5em;
}
.l-date {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  letter-spacing: 0.34em;
  text-transform: lowercase;
  color: var(--ink-mute);
  padding-top: 8px;
  border-top: 0.5px solid rgba(107, 128, 106, 0.42);
}

.l-opening {
  margin: 0 0 18px;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(22px, 2.8vw, 26px);
  color: var(--ink-soft);
  text-align: center;
}

/* Prose paragraphs */
.l-prose {
  margin: 0 0 clamp(18px, 3vw, 26px);
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(18px, 2.2vw, 21px);
  line-height: 1.7;
  color: var(--ink-soft);
  text-align: center;
  max-width: 46ch;
  margin-left: auto;
  margin-right: auto;
}
.l-prose em {
  font-style: italic;
  color: var(--ink);
}
.l-prose strong {
  font-weight: 600;
  font-style: italic;
  color: var(--ink);
}
.l-prose-lead {
  font-size: clamp(19px, 2.4vw, 22.5px);
}

/* THE NAMES — animated like handwriting */
.l-names {
  margin: clamp(22px, 4vw, 36px) auto clamp(14px, 2vw, 22px);
  font-family: var(--script);
  font-weight: 400;
  font-size: clamp(64px, 12vw, 124px);
  line-height: 0.95;
  color: var(--ink);
  letter-spacing: 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(-4px, -0.6vw, 4px);
}
.l-name {
  display: block;
  line-height: 1.05;
  padding: 0 0.06em 0.12em;
  position: relative;
}
.l-letter {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.18em) rotate(-3deg);
  filter: blur(2px);
  will-change: opacity, transform, filter;
}
body.is-revealed .l-letter {
  animation: letterIn 0.55s cubic-bezier(0.2, 0.7, 0.25, 1) forwards;
  animation-delay: var(--d, 0s);
}
@keyframes letterIn {
  0%   { opacity: 0; transform: translateY(0.18em) rotate(-3deg); filter: blur(2px); }
  60%  { opacity: 1; filter: blur(0); }
  100% { opacity: 1; transform: translateY(0) rotate(0); filter: blur(0); }
}
.l-name:nth-child(1) {
  align-self: flex-start;
  margin-left: clamp(0px, 4vw, 30px);
}
.l-name:nth-child(3) {
  align-self: flex-end;
  margin-right: clamp(0px, 4vw, 30px);
}
.l-amp {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 0.4em;
  line-height: 1;
  color: var(--gold);
  margin: -0.16em 0;
  align-self: center;
  opacity: 0;
}

/* The H/F letter animation handles names; amp fades in between */
body.is-revealed .l-amp {
  animation: ampIn 0.5s 2.4s var(--ease-out) forwards;
}
@keyframes ampIn {
  from { opacity: 0; transform: translateY(4px) rotate(-6deg); }
  to   { opacity: 1; transform: translateY(0)    rotate(0); }
}

/* Flourish */
.l-flourish {
  display: block;
  width: 100%;
  height: 26px;
  margin: clamp(28px, 5vw, 48px) auto;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 24' fill='none' stroke='%236b806a' stroke-width='0.7' stroke-linecap='round'><path d='M0 12 L78 12'/><path d='M122 12 L200 12'/><path d='M90 12 Q94 6 100 6 Q106 6 110 12 Q106 18 100 18 Q94 18 90 12 Z'/><circle cx='100' cy='12' r='1.4' fill='%236b806a'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: 0.7;
}

/* ── Section labels ───────────────────────────────────────── */
.l-block { margin: 0; text-align: center; }

.l-label {
  margin: 0 0 clamp(16px, 2.4vw, 22px);
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(22px, 3vw, 28px);
  color: var(--ink);
  letter-spacing: 0.005em;
}
.l-label::after {
  content: "";
  display: block;
  width: 36px;
  height: 0.5px;
  background: var(--ink-mute);
  margin: 10px auto 0;
  opacity: 0.5;
}

/* Programme */
.l-program {
  margin: 0 auto;
  max-width: 480px;
  display: grid;
  gap: clamp(10px, 1.6vw, 14px);
  text-align: left;
}
.l-program > div {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: clamp(14px, 2.4vw, 22px);
  align-items: baseline;
  padding: 10px 4px;
  border-bottom: 0.5px dotted rgba(107, 128, 106, 0.45);
}
.l-program > div:last-child { border-bottom: none; }
.l-program dt {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(20px, 2.6vw, 24px);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.l-program dd {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(17px, 2.1vw, 19.5px);
  color: var(--ink-soft);
  line-height: 1.4;
}
.l-program dd em {
  display: block;
  font-style: italic;
  font-size: 0.84em;
  color: var(--ink-mute);
  margin-top: 2px;
}

/* Palette */
.l-palette {
  margin: clamp(16px, 2.6vw, 22px) auto 0;
  display: flex;
  gap: clamp(14px, 2.4vw, 18px);
  justify-content: center;
}
.l-palette span {
  display: block;
  width: clamp(40px, 7vw, 54px);
  height: clamp(40px, 7vw, 54px);
  border-radius: 50%;
  background: var(--c);
  border: 0.5px solid rgba(40, 60, 30, 0.14);
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.55),
    0 5px 12px rgba(60, 80, 50, 0.10);
}

/* ═════ RSVP — real, weighted buttons ═════ */
.l-rsvp {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.l-rsvp-q {
  margin: 0 auto;
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(28px, 4vw, 36px);
  color: var(--ink);
  line-height: 1.25;
  letter-spacing: -0.005em;
}
.l-rsvp-q em {
  color: var(--rust);
  font-style: italic;
}
/* Clear, prominent invite-capacity card so the guest sees at a glance
   exactly how many people the invitation is for. */
.l-capacity {
  margin: 14px auto clamp(20px, 3vw, 28px);
  max-width: 460px;
  padding: 16px 22px 14px;
  border: 1px solid rgba(120, 145, 115, 0.35);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.45);
  text-align: center;
}
.l-capacity-head {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(18px, 2.4vw, 21px);
  color: var(--ink);
  letter-spacing: 0.005em;
  line-height: 1.3;
}
.l-capacity-break {
  margin: 6px 0 0;
  font-family: var(--serif);
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: lowercase;
  color: var(--ink-mute);
}

.l-rsvp-allowance {
  margin: 8px 0 clamp(22px, 3.4vw, 32px);
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  letter-spacing: 0.14em;
  text-transform: lowercase;
  color: var(--ink-mute);
}
.l-rsvp-allowance::before,
.l-rsvp-allowance::after {
  content: "·";
  margin: 0 10px;
  color: var(--ink-mute);
  opacity: 0.5;
}
/* When allowance is hidden, restore the spacing on the question */
.l-rsvp-q:has(+ [hidden]) {
  margin-bottom: clamp(22px, 3.4vw, 32px);
}

.l-rsvp-choice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 2.4vw, 18px);
  margin: 0 auto;
}

/* The buttons themselves — proper, visible, hit-the-eye */
.l-rsvp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 188px;
  padding: 15px 28px;
  border-radius: 999px;
  border: 1.5px solid;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(18px, 2.4vw, 21px);
  letter-spacing: 0.01em;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform .25s var(--ease-out),
    box-shadow .25s var(--ease-out),
    background .25s var(--ease-out),
    border-color .25s var(--ease-out),
    color .25s var(--ease-out);
}
.l-rsvp-mark {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  flex-shrink: 0;
}
.l-rsvp-mark svg { width: 14px; height: 14px; }

/* Primary · filled deep ink */
.l-rsvp-yes {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
  box-shadow:
    0 6px 16px rgba(31, 46, 34, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.l-rsvp-yes .l-rsvp-mark {
  background: rgba(255, 255, 255, 0.16);
  color: var(--paper);
}
.l-rsvp-yes:hover {
  background: var(--sage-deep);
  border-color: var(--sage-deep);
  transform: translateY(-2px);
  box-shadow:
    0 12px 26px rgba(31, 46, 34, 0.30),
    inset 0 1px 0 rgba(255, 255, 255, 0.10);
}
.l-rsvp-yes:active { transform: translateY(0); }

/* Secondary · outlined */
.l-rsvp-no {
  background: transparent;
  color: var(--ink-soft);
  border-color: rgba(107, 128, 106, 0.55);
}
.l-rsvp-no .l-rsvp-mark {
  background: transparent;
  border: 1px solid currentColor;
  color: var(--ink-mute);
}
.l-rsvp-no:hover {
  background: rgba(31, 46, 34, 0.04);
  border-color: var(--ink);
  color: var(--ink);
  transform: translateY(-1px);
}

/* Thanks state */
.l-rsvp-thanks {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  animation: fadeUp 0.65s var(--ease-out);
}
/* Thanks message — serif italic, NOT script. Only the names use the script font. */
.l-thanks-h {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(26px, 3.6vw, 34px);
  line-height: 1.2;
  color: var(--sage-deep);
  letter-spacing: -0.005em;
}
.l-thanks-h::before,
.l-thanks-h::after {
  content: "·";
  margin: 0 12px;
  color: var(--ink-mute);
  opacity: 0.5;
  font-style: normal;
}
.l-thanks-sub {
  margin: 6px 0 0;
  font-family: var(--serif);
  font-size: 15px;
  color: var(--ink-mute);
}
.l-rsvp-edit {
  margin-top: 8px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 12.5px;
  letter-spacing: 0.18em;
  text-transform: lowercase;
  color: var(--ink-mute);
  border-bottom: 0.5px solid rgba(107, 128, 106, 0.42);
  padding: 4px 0;
}
.l-rsvp-edit:hover { color: var(--rust); border-bottom-color: var(--rust); }

/* Foot · signature */
.l-foot {
  margin-top: clamp(24px, 4vw, 40px);
  text-align: center;
}
.l-closing {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(18px, 2.4vw, 22px);
  color: var(--ink-soft);
}
.l-sig {
  margin: clamp(6px, 1.2vw, 10px) 0 0;
  font-family: var(--script);
  font-weight: 400;
  font-size: clamp(46px, 8vw, 78px);
  line-height: 1;
  color: var(--ink);
  display: inline-flex;
  align-items: baseline;
  gap: 14px;
}
.l-sig .amp {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.4em;
  color: var(--gold);
}

/* Toast */
.toast {
  position: fixed;
  left: 50%; bottom: 36px;
  transform: translate(-50%, 80px);
  z-index: 300;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  padding: 10px 18px;
  border-radius: 999px;
  opacity: 0;
  transition: transform .45s var(--ease-out), opacity .45s var(--ease-out);
  pointer-events: none;
  white-space: nowrap;
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }

/* Reveal */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .9s var(--ease-out), transform .9s var(--ease-out);
}
.reveal.is-in { opacity: 1; transform: translateY(0); }

@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }


/* ═════ FALLING OLIVE LEAVES ═════ */
.leaf-field {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 6;
  overflow: hidden;
}
.leaf {
  position: absolute;
  top: -8%;
  width: 18px;
  height: 26px;
  color: var(--sage);
  animation: leafFall linear infinite, leafSway 4.5s ease-in-out infinite;
  will-change: transform;
}
.leaf svg {
  width: 100%;
  height: 100%;
  display: block;
  transform-origin: center center;
}
@keyframes leafFall {
  0%   { top: -10%;  }
  100% { top: 115%;  }
}
@keyframes leafSway {
  0%, 100% { transform: translateX(-14px) rotate(-22deg); }
  50%      { transform: translateX( 14px) rotate( 28deg); }
}


/* ── Mobile ───────────────────────────────────────────────── */
@media (max-width: 700px) {
  .letter-inner {
    padding-top: clamp(56px, 14vw, 90px);
    width: min(540px, calc(100% - 32px));
  }
  .l-names {
    font-size: clamp(60px, 17vw, 96px);
  }
  .l-name:nth-child(1) { margin-left: 14px; }
  .l-name:nth-child(3) { margin-right: 14px; }

  .l-program > div {
    grid-template-columns: 72px 1fr;
    gap: 14px;
  }
  .l-program dt { font-size: 19px; }
  .l-program dd { font-size: 16.5px; }

  .l-prose { font-size: 17px; }

  .l-rsvp-choice {
    flex-direction: column;
    width: 100%;
    gap: 12px;
  }
  .l-rsvp-btn {
    width: 100%;
    max-width: 320px;
    min-width: 0;
    padding: 16px 24px;
  }
}

@media (max-width: 420px) {
  .l-names { font-size: clamp(54px, 18vw, 80px); }
  .l-name:nth-child(1) { margin-left: 4px; }
  .l-name:nth-child(3) { margin-right: 4px; }
  .l-monogram { font-size: 52px; }
  .l-date { font-size: 12px; letter-spacing: 0.28em; }
  .env-name { font-size: 42px; }
  .env-date { font-size: 13px; }
  .l-rsvp-q { font-size: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
