/* ==========================================================================
   Osiris & Frank — Wedding Website
   Upscale tropical blend: deep green + linen from the invitation suite,
   pink / fuchsia / orange / yellow from the wedding palette.
   Fonts: Cormorant Garamond (serif) · Mrs Saint Delafield (script) · Jost (sans)
   ========================================================================== */

:root {
  --green: #17301a;
  --green-deep: #0f2112;
  --fuchsia-surface: #8f1050;
  --fuchsia: #d81e6e;
  --pink: #f06a93;
  --orange: #f4740c;
  --yellow: #e9a80c;
  --yellow-bright: #ffc42e;
  --linen: #e6d7c2;
  --linen-soft: #efe4d2;
  --paper: #f7f0e2;
  --cream: #ecdfc9;
  --cream-soft: rgba(236, 223, 201, 0.75);
  --ink: #2c241a;
  --ink-soft: #5b5142;

  --font-display: 'Cormorant Garamond', 'Times New Roman', serif;
  --font-script: 'Mrs Saint Delafield', cursive;
  --font-body: 'Jost', -apple-system, 'Helvetica Neue', sans-serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  font-family: var(--font-body);
  font-weight: 300;
  color: var(--ink);
  background: var(--linen);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

/* ---------- surfaces ---------- */

.surface-linen { background: var(--linen); }
.surface-green { background: var(--green); color: var(--cream); }
.surface-fuchsia { background: var(--fuchsia-surface); color: var(--cream); }

/* ---------- layout helpers ---------- */

.container { width: min(1120px, 92vw); margin: 0 auto; }
.container.narrow { width: min(780px, 92vw); }
.center { text-align: center; }

/* overflow stays visible so botanical clusters can straddle section edges */
section { padding: clamp(5rem, 12vh, 8.5rem) 0; position: relative; }

/* ---------- typography ---------- */

.eyebrow {
  font-family: var(--font-display);
  font-size: 0.82rem;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--orange);
  font-weight: 600;
  margin-bottom: 0.8rem;
  display: inline-block;
}
.eyebrow.light { color: var(--yellow-bright); }

.script-heading {
  font-family: var(--font-script);
  font-weight: 400;
  font-size: clamp(2.6rem, 6.4vw, 4.2rem);
  line-height: 1.15;
  color: var(--fuchsia);
  display: inline-block;
}
.script-heading.light { color: var(--cream); }

.script-note {
  font-family: var(--font-script);
  font-weight: 400;
  display: inline-block;
}

/* Diagonal lettering, kept only for the closing RSVP banner. Note these must
   be neutralised on the BASE selector, not just on `.visible` — headings that
   carry `tilt` without a `reveal` class never receive `.visible` at all. */
.tilt, .tilt-r { transform: none; }
#rsvp .tilt { transform: rotate(-3deg); }
#rsvp .tilt-r { transform: rotate(2deg); }

.lede {
  font-size: clamp(1rem, 1.5vw, 1.12rem);
  color: var(--ink-soft);
  max-width: 36em;
  margin: 1.3rem auto 0;
}
.surface-green .lede, .surface-fuchsia .lede { color: var(--cream-soft); }

.section-head { margin-bottom: clamp(2.6rem, 6vw, 4rem); }

/* ---------- scroll-reveal animations ---------- */

.reveal, .reveal-l, .reveal-r, .reveal-pop {
  opacity: 0;
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}
.reveal { transform: translateY(30px); }
.reveal-l { transform: translateX(-44px) rotate(-1.5deg); }
.reveal-r { transform: translateX(44px) rotate(1.5deg); }
.reveal-pop { transform: translateY(24px) scale(0.92); }
.reveal.visible, .reveal-l.visible, .reveal-r.visible, .reveal-pop.visible {
  opacity: 1;
  transform: none;
}
.tilt.visible, .reveal.visible.tilt, .tilt-r.visible { transform: none; }
#rsvp .tilt.visible, #rsvp .reveal.visible.tilt { transform: rotate(-3deg); }
#rsvp .tilt-r.visible { transform: rotate(2deg); }

/* On a narrow screen the sideways slide-ins (±44px) push content past the
   viewport edge and their rotation inflates each item's bounding box, so
   phones get a straight fade-and-rise instead. */
@media (max-width: 720px) {
  .reveal-l, .reveal-r { transform: translateY(26px); }
  .reveal-l.visible, .reveal-r.visible { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal-l, .reveal-r, .reveal-pop { opacity: 1; transform: none; transition: none; }
  .sway-slow, .hero-palm, .gv-sway-a, .gv-sway-b, .gv-drift { animation: none !important; }
}

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 400;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  padding: 1rem 2.8rem;
  border-radius: 3px;
  border: none;
  background: linear-gradient(100deg, var(--fuchsia), var(--orange));
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 12px 28px rgba(216, 30, 110, 0.3);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), filter 0.35s;
}
.btn:hover {
  transform: translateY(-2px);
  filter: saturate(1.15) brightness(1.05);
  box-shadow: 0 16px 36px rgba(216, 30, 110, 0.4);
}
.btn-outline {
  background: transparent;
  color: var(--fuchsia);
  border: 1px solid var(--fuchsia);
  box-shadow: none;
}
.btn-outline:hover { background: var(--fuchsia); color: #fff; }
.btn-full { width: 100%; }

/* ---------- idle sway ---------- */

.sway-slow { animation: sway-slow 5.5s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes sway-slow {
  0%, 100% { transform: rotate(-2deg); }
  50% { transform: rotate(2.5deg); }
}

/* ==========================================================================
   BOTANICALS
   --------------------------------------------------------------------------
   Individual stems and leaves — not bouquets — pinned to the page edges and
   alternating side to side so the eye travels down. Monstera leaves stand on
   their own; the amaranthus is the connective tissue, its tassels spilling
   over a section boundary and cascading well into the section below.
   Everything here is static; only the scroll parallax moves it.
   ========================================================================== */

.bot {
  position: absolute;
  width: var(--w, clamp(120px, 15vw, 210px));
  top: var(--y, -60px);
  rotate: var(--r, 0deg);
  opacity: var(--o, 1);
  pointer-events: none;
  z-index: var(--z, 6);
  filter: var(--tint, hue-rotate(0deg)) saturate(0.94)
          drop-shadow(0 16px 30px rgba(20, 18, 12, 0.28));
}
.bot-l { left: var(--x, -46px); }
.bot-r { right: var(--x, -46px); }
/* mirrored, so a stem that exits bottom-left can exit bottom-right instead */
.bot-flip { scale: -1 1; }

/* palm fronds double as the page's greenery — knocked back so they read as
   foliage behind the blooms rather than competing with them */
.bot-frond {
  --tint: brightness(0.8) saturate(0.82);
  --o: 0.86;
  --z: 5;
}

/* --- Nayara-style motion: layered stacks where the back leaf holds still and
       the front layers breathe on independent, very slow cycles.
       Rotation pivots at the stem (bottom centre), never the box centre. --- */
.gv-sway-a { animation: gv-arc-a var(--dur, 7s) ease-in-out var(--delay, 0s) infinite; transform-origin: 50% 100%; }
.gv-sway-b { animation: gv-arc-b var(--dur, 5.2s) ease-in-out var(--delay, 0s) infinite; transform-origin: 50% 100%; }
.gv-drift  { animation: gv-float var(--dur, 4.6s) ease-in-out var(--delay, 0s) infinite; }

@keyframes gv-arc-a { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(0.4deg); } }
@keyframes gv-arc-b { 0%, 100% { transform: rotate(1.8deg); } 50% { transform: rotate(-0.4deg); } }
@keyframes gv-float { 0%, 100% { transform: translateY(-5px); } 50% { transform: translateY(1px); } }

/* depth tints for stacked leaves */
.gv-back { --tint: brightness(0.55) saturate(0.7); --o: 0.9; --z: 4; }
.gv-mid  { --tint: brightness(0.78) saturate(0.88); --o: 0.92; --z: 5; }
.gv-front{ --tint: brightness(1) saturate(1); --z: 6; }
.gv-flip { scale: -1 1; }

/* blooms sit only just off the edge — a leaf can run half off-page and still
   read, but a flower needs to be mostly visible */
.bot-bloom { --x: -44px; }

@media (max-width: 640px) {
  /* set `width` rather than --w: each placement sets --w inline, and an inline
     custom property would beat anything we declared for it here */
  /* NB: every placement sets --x/--y/--w inline, and an inline custom property
     beats any value we declare for it here — so override the real properties. */
  .bot {
    width: clamp(120px, 33vw, 175px) !important;
    top: -40px !important;      /* hug the section seam */
    opacity: 1 !important;      /* fully opaque — no washed-out edges */
    rotate: 0deg !important;    /* rotation only inflates the box at this size */
  }
  .bot-l { left: -22px !important; }
  .bot-r { right: -22px !important; }
  .bot[src*="palm-photo"] { width: clamp(150px, 42vw, 225px) !important; top: -52px !important; }
  /* a narrow screen can't afford full grove stacks: keep the mid leaf of each
     cluster, drop the back/front layers, and tuck blooms tighter to the edge */
  .gv-back, .gv-front { display: none; }
  .bot-bloom { --x: -38px; }
  .bot-hide-sm { display: none; }
}

/* ==========================================================================
   NAV
   ========================================================================== */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem clamp(1.2rem, 4vw, 3rem);
  transition: background 0.45s var(--ease), backdrop-filter 0.45s, padding 0.45s var(--ease), box-shadow 0.45s;
  color: var(--cream);
}
.nav.scrolled {
  background: rgba(15, 33, 18, 0.86);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding-top: 0.7rem;
  padding-bottom: 0.7rem;
  box-shadow: 0 1px 0 rgba(236, 223, 201, 0.1);
}

/* same script treatment as the hero "Osiris & Frank" */
.nav-monogram {
  font-family: var(--font-script);
  font-size: 1.7rem;
  color: inherit;
  text-decoration: none;
  line-height: 1;
}
.nav-monogram .amp { font-size: 0.8em; padding: 0 0.06em; }


.nav-links { display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2.1rem); }
.nav-links a {
  font-family: var(--font-display);
  color: inherit;
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.85;
  transition: opacity 0.3s;
}
.nav-links a:hover { opacity: 1; }
.nav-links .nav-rsvp {
  background: linear-gradient(100deg, var(--fuchsia), var(--orange));
  padding: 0.55rem 1.5rem;
  border-radius: 3px;
  opacity: 1;
  color: #fff;
  transition: filter 0.35s;
}
.nav-links .nav-rsvp:hover { filter: saturate(1.15) brightness(1.08); }

.nav-toggle { display: none; }

@media (max-width: 920px) {
  .nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 7px;
    background: none;
    border: none;
    cursor: pointer;
    /* a comfortable 44px tap target, per touch guidelines */
    width: 44px;
    height: 44px;
    margin: -8px -8px -8px 0;
    padding: 0;
    z-index: 102;
  }
  .nav-toggle span {
    width: 26px; height: 1.4px;
    background: currentColor;
    transition: transform 0.35s var(--ease);
  }
  .nav.open .nav-toggle span:first-child { transform: translateY(4.2px) rotate(45deg); }
  .nav.open .nav-toggle span:last-child { transform: translateY(-4.2px) rotate(-45deg); }

  .nav-links a {
    padding: 0.55rem 1rem; /* roomier tap targets in the overlay menu */
  }
  .nav-links {
    position: fixed;
    inset: 0;
    flex-direction: column;
    justify-content: center;
    gap: 1.4rem;
    background: rgba(15, 33, 18, 0.96);
    backdrop-filter: blur(20px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s var(--ease);
  }
  .nav.open .nav-links { opacity: 1; pointer-events: auto; }
  .nav-links a { font-size: 1.05rem; }
}

/* ==========================================================================
   HERO — FLIP POSTCARD
   ========================================================================== */

.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6.5rem 1.2rem 4.5rem;
  position: relative;
  overflow: hidden;
}

/* single hibiscus at the left edge, just above the postcard */
.hero-hibiscus {
  position: absolute;
  left: clamp(-40px, -2vw, -12px);
  top: 19%;
  width: clamp(110px, 14vw, 190px);
  rotate: -8deg;
  z-index: 6;
  pointer-events: none;
  filter: saturate(0.95) drop-shadow(0 12px 24px rgba(0, 0, 0, 0.4));
}
/* its mirrored partner at the right edge, level with the postcard's bottom */
.hero-hibiscus-r {
  left: auto;
  right: clamp(-40px, -2vw, -12px);
  top: 68%;
  scale: -1 1;
  rotate: 8deg;
}
@media (max-width: 640px) {
  .hero-hibiscus { width: clamp(80px, 20vw, 120px); top: 16%; }
  .hero-hibiscus-r { top: 64%; }
}

/* tropical border across the hero's bottom edge */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("../images/art/footer-flora.webp") bottom center / 100% auto no-repeat;
  pointer-events: none;
  z-index: 1;
}

/* ---------- palm fronds framing the hero edges ----------
   Each frond pivots from its own stem base, so --bx/--by place that base
   and the box is offset back from it by the base's position in the artwork
   (1.4% across, 21.6% down — and height is 0.951x width). */
.hero-palm {
  position: absolute;
  z-index: 0;
  width: var(--w);
  left: calc(var(--bx) - 0.014 * var(--w));
  top: calc(var(--by) - 0.2054 * var(--w) - 150px); /* lifted toward the top edge */
  rotate: var(--rot, 0deg);
  transform-origin: 1.4% 21.6%;
  pointer-events: none;
  filter: blur(var(--blur, 2px)) saturate(0.88) brightness(var(--br, 0.75));
  opacity: var(--op, 0.45);
  animation: palm-wind var(--dur, 12s) ease-in-out var(--delay, 0s) infinite;
  will-change: transform;
}

/* left cluster */
.hero-palm-l1 { --w: clamp(420px, 48vw, 780px); --bx: -46px; --by: -60px; --rot: 4deg;  --blur: 1.5px; --br: 0.82; --op: 0.52; --dur: 13s; }
.hero-palm-l2 { --w: clamp(330px, 38vw, 610px); --bx: -20px; --by: -6px;  --rot: 30deg; --blur: 3px;   --br: 0.68; --op: 0.42; --dur: 10.5s; --delay: -4s; }
.hero-palm-l3 { --w: clamp(300px, 34vw, 540px); --bx: -68px; --by: -24px; --rot: 60deg; --blur: 4.5px; --br: 0.56; --op: 0.32; --dur: 12s;   --delay: -7s; }

/* right cluster — mirrored, so the rotations are negated to match */
.hero-palm-r1 { --w: clamp(420px, 48vw, 780px); --bx: calc(100% + 46px); --by: -54px; --rot: -6deg;  --blur: 1.5px; --br: 0.82; --op: 0.52; --dur: 12.5s; --delay: -2s; scale: -1 1; }
.hero-palm-r2 { --w: clamp(330px, 38vw, 610px); --bx: calc(100% + 18px); --by: -10px; --rot: -32deg; --blur: 3px;   --br: 0.68; --op: 0.42; --dur: 11s;   --delay: -6s; scale: -1 1; }
.hero-palm-r3 { --w: clamp(300px, 34vw, 540px); --bx: calc(100% + 66px); --by: -20px; --rot: -58deg; --blur: 4.5px; --br: 0.56; --op: 0.32; --dur: 9.5s;  --delay: -3s; scale: -1 1; }

/* a slow, uneven breeze — pivots from the stem base */
@keyframes palm-wind {
  0%, 100% { transform: rotate(-1.8deg); }
  30%      { transform: rotate(0.9deg); }
  55%      { transform: rotate(2.6deg); }
  78%      { transform: rotate(0.2deg); }
}

/* layered lifelike florals */
.hero-flower {
  position: absolute;
  pointer-events: none;
  filter: var(--tint, hue-rotate(0deg)) saturate(0.9)
          drop-shadow(0 14px 26px rgba(0, 0, 0, 0.38));
}
.hero-flower-bop {
  width: clamp(120px, 17vw, 250px);
  right: clamp(-16px, 2vw, 74px);
  top: 15%;
  rotate: 8deg;
  --dur: 8.5s;
}
.hero-leaf-r {
  width: clamp(130px, 18vw, 270px);
  right: clamp(-50px, -1vw, 30px);
  top: 9%;
  rotate: 30deg;
  opacity: 0.95;
  --dur: 10s;
}
.hero-flower-orchid {
  width: clamp(110px, 15vw, 230px);
  left: clamp(-24px, 1vw, 50px);
  bottom: 7%;
  rotate: -10deg;
  --dur: 9.5s;
}
.hero-leaf-l {
  width: clamp(120px, 17vw, 250px);
  left: clamp(-60px, -2vw, 20px);
  bottom: 3%;
  rotate: -34deg;
  scale: -1 1;
  opacity: 0.95;
  --dur: 11s;
}

.hero-content { position: relative; text-align: center; width: min(1060px, 100%); }

/* "A special note from / Osiris & Frank" — matches the invitation hero */
/* lift the name lockup toward the top of the page, leaving the postcard put */
.hero-head { margin-top: -1.6rem; margin-bottom: 3.2rem; position: relative; z-index: 6; }

.hero-eyebrow {
  font-family: var(--font-display);
  font-weight: 500;
  font-style: normal;
  font-size: clamp(1.3rem, 2.9vw, 1.95rem);
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--cream);
  margin-top: 0;
  margin-bottom: 0.2rem;
}

.hero-names {
  font-family: var(--font-script);
  font-weight: 400;
  font-size: clamp(3.4rem, 9.6vw, 6.6rem);
  line-height: 1.02;
  padding: 0.22em 0.5em 0.3em; /* swash room — background-clip:text only paints inside the box */
  /* liquid gold, matching the footer sign-off */
  background: linear-gradient(105deg,
      #a87a08 0%, #e9a80c 26%, #ffd977 44%, #f6e3a5 50%, #ffd977 56%,
      #e9a80c 74%, #a87a08 100%);
  background-size: 240% 100%;
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: gold-shine 11s ease-in-out infinite;
  filter: drop-shadow(0 4px 22px rgba(0, 0, 0, 0.45))
          drop-shadow(0 0 26px rgba(255, 196, 46, 0.18));
}
.hero-amp { font-family: var(--font-script); text-transform: none; color: inherit; font-size: 0.8em; letter-spacing: 0; padding: 0 0.06em; }
@media (prefers-reduced-motion: reduce) {
  .hero-names { animation: none; }
}

/* --- the postcard --- */

.postcard-scene { position: relative; z-index: 2; margin-top: 1.1rem; }

.postcard-flower {
  position: absolute;
  width: clamp(96px, 14vw, 178px);
  top: -13%;
  left: -9%;
  z-index: 5;
  rotate: -14deg;
  pointer-events: none;
  filter: var(--tint, hue-rotate(0deg)) saturate(0.9)
          drop-shadow(0 12px 22px rgba(0, 0, 0, 0.35));
}

.postcard {
  display: block;
  width: min(980px, 94vw);
  margin: 0 auto;
  aspect-ratio: 3 / 2;
  background: none;
  border: none;
  cursor: pointer;
  perspective: 1800px;
  rotate: -3deg; /* match the tilt of the header lettering */
  -webkit-tap-highlight-color: transparent;
}
/* keep the bigger card fully on screen for shorter viewports */
@media (max-height: 860px) and (min-width: 641px) {
  .postcard { width: min(760px, 94vw); }
}

.postcard-flip {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 1s var(--ease);
}
.postcard.flipped .postcard-flip { transform: rotateY(180deg); }
.postcard:hover .postcard-flip { }

.postcard-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  /* card stock: paper color with a fine speckled grain */
  background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='table' tableValues='0 0.07'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  border-radius: 8px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  padding: 10px;
}
.postcard-back { transform: rotateY(180deg); }

/* classic airmail striped border */
.postcard-airmail {
  position: absolute;
  inset: 0;
  border-radius: 8px;
  padding: 10px;
  background:
    repeating-linear-gradient(45deg,
      var(--fuchsia) 0 14px, var(--paper) 14px 28px,
      var(--green) 28px 42px, var(--paper) 42px 56px);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
          mask-composite: exclude;
  opacity: 0.9;
  pointer-events: none;
  z-index: 3;
}

/* "Meet us in Puerto Rico" postcard artwork fills the card edge to edge */
.postcard-front { padding: 0; }
.postcard-front-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

/* postcard back — a single designed image, edge to edge */
.postcard-back { padding: 0; }
.postcard-back-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

/* postcard back */
.postcard-back-grid {
  position: relative;
  height: 100%;
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  border-radius: 4px;
  padding: clamp(1.2rem, 4vw, 2.4rem) clamp(1rem, 3.4vw, 2rem);
}
.postcard-back-grid::before {
  content: '';
  position: absolute;
  top: 12%;
  bottom: 12%;
  left: 55.5%;
  width: 1px;
  background: rgba(44, 36, 26, 0.25);
}

.postcard-msg {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  text-align: left;
  gap: 0.3rem;
  padding-right: 6%;
}
.postcard-save {
  font-size: clamp(1.6rem, 5vw, 3.2rem);
  color: var(--fuchsia);
  rotate: -4deg;
  margin-left: 0.4rem;
}
.postcard-datebig {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.5rem, 4.8vw, 3.4rem);
  line-height: 1.1;
  color: var(--green);
}
.postcard-comma { color: var(--orange); }
.postcard-names {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(0.95rem, 2.7vw, 1.6rem);
  color: var(--ink);
}
.postcard-loc {
  font-family: var(--font-body);
  font-size: clamp(0.62rem, 1.8vw, 0.94rem);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 0.4rem;
}

.postcard-addr { position: relative; }
.postcard-stamp {
  position: absolute;
  top: 2%;
  right: 2%;
  width: clamp(54px, 10vw, 112px);
  rotate: 3deg;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.2));
}
.postcard-postmark {
  position: absolute;
  top: 14%;
  right: 26%;
  width: clamp(56px, 10vw, 108px);
  aspect-ratio: 1;
  border: 1.5px solid rgba(44, 36, 26, 0.35);
  border-radius: 50%;
  rotate: -12deg;
  display: grid;
  place-items: center;
  opacity: 0.7;
}
.postcard-postmark span {
  font-family: var(--font-body);
  font-size: 0.4rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-align: center;
  padding: 0 8px;
  line-height: 1.8;
}
.addr-lines {
  position: absolute;
  left: 8%;
  right: 4%;
  bottom: 14%;
  display: grid;
  gap: clamp(0.9rem, 2.6vw, 1.4rem);
}
.addr-lines span {
  display: block;
  border-bottom: 1px solid rgba(44, 36, 26, 0.3);
  font-family: var(--font-script);
  font-size: clamp(0.95rem, 2.7vw, 1.7rem);
  color: var(--ink-soft);
  text-align: left;
  padding: 0 0.2rem 0.1rem;
  white-space: nowrap;
  overflow: hidden;
}

.postcard-hint {
  margin-top: 1.3rem;
  font-family: var(--font-display);
  font-size: 0.74rem;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--cream-soft);
  animation: hint-pulse 2.6s ease-in-out infinite;
}
@keyframes hint-pulse {
  0%, 100% { opacity: 0.65; }
  50% { opacity: 1; }
}

.scroll-cue {
  position: absolute;
  bottom: 1.6rem;
  left: 50%;
  transform: translateX(-50%);
}
.scroll-cue-line {
  display: block;
  width: 1px;
  height: 52px;
  background: linear-gradient(to bottom, transparent, rgba(236, 223, 201, 0.7));
  animation: cue 2.2s var(--ease) infinite;
}
@keyframes cue {
  0% { transform: scaleY(0); transform-origin: top; }
  45% { transform: scaleY(1); transform-origin: top; }
  55% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

@media (max-width: 640px) {
  /* the amapola is portrait and far denser than the wide cutouts these sizes
     were originally set for, so it needs pulling in hard on a narrow screen */
  /* the card is rotated -3deg, which inflates its bounding box — size it so
     the rotated box still clears the hero's side padding */
  .postcard { width: min(330px, 88vw); }
  .hero-flower-bop    { width: clamp(84px, 22vw, 132px); top: 4%; }
  .hero-flower-orchid { width: clamp(80px, 21vw, 126px); }
  .hero-leaf-r        { width: clamp(92px, 24vw, 140px); top: 5%; }
  .hero-leaf-l        { width: clamp(92px, 24vw, 140px); }
  .postcard-flower    { width: clamp(70px, 18vw, 106px); }
  /* fewer, smaller, fainter fronds so they stay at the edges on a narrow screen */
  /* the fronds are lifted 150px on desktop, which pushes them off the top of a
     phone screen — pull them back down and brighten so the sway is visible */
  /* fronds anchored to the very top edge of the screen */
  /* phones get the centre-cropped variant so the plants read larger */
  /* mirrored art, scaled past the viewport so both arrangements bleed off
     the left and right edges */
  .hero::after { background-image: url("../images/art/footer-flora-tight.webp"); background-size: 124% auto; }
  .hero-palm { --op: 0.5; top: calc(var(--by) - 0.2054 * var(--w)); }
  .hero-palm-l3, .hero-palm-r3 { display: none; }
  .hero-palm-l1, .hero-palm-r1 { --w: 330px; --by: -6px; }
  .hero-palm-l2, .hero-palm-r2 { --w: 260px; --by: 28px; }
  .hero-palm-l1 { --rot: 16deg; }
  .hero-palm-r1 { --rot: -18deg; }
  .hero-palm-l2 { --rot: 46deg; }
  .hero-palm-r2 { --rot: -48deg; }
  /* keep the card at the artwork's own 3:2 so nothing is cropped */
  .postcard { aspect-ratio: 3 / 2; }
  .postcard-flower { top: -8%; left: -6%; }
}

/* ==========================================================================
   COUNTDOWN
   ========================================================================== */

.count-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(0.7rem, 2.4vw, 1.4rem);
  margin-top: 2.6rem;
}
@media (max-width: 560px) { .count-grid { grid-template-columns: repeat(2, 1fr); } }

.count-cell {
  background: var(--paper);
  border: 1px solid rgba(44, 36, 26, 0.1);
  border-radius: 6px;
  padding: 1.6rem 0.6rem 1.2rem;
  box-shadow: 0 12px 30px rgba(44, 36, 26, 0.1);
}
.count-cell:nth-child(1) .count-num { color: var(--green); }
.count-cell:nth-child(2) .count-num { color: var(--fuchsia); }
.count-cell:nth-child(3) .count-num { color: var(--orange); }
.count-cell:nth-child(4) .count-num { color: var(--yellow); }
.count-cell:nth-child(2) { transition-delay: 0.08s; rotate: 1deg; }
.count-cell:nth-child(3) { transition-delay: 0.16s; rotate: -1deg; }
.count-cell:nth-child(4) { transition-delay: 0.24s; }
.count-cell:nth-child(1) { rotate: -1.2deg; }

.count-num {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.count-label {
  display: block;
  margin-top: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.68rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ==========================================================================
   OUR STORY (fuchsia)
   ========================================================================== */

.story-grid { display: grid; gap: clamp(3rem, 7vw, 5rem); }

.story-item {
  display: grid;
  grid-template-columns: minmax(250px, 410px) 1fr;
  gap: clamp(1.6rem, 4.5vw, 3.5rem);
  align-items: center;
}
.story-item-flip { grid-template-columns: 1fr minmax(250px, 410px); }
.story-item-flip .story-photo { order: 2; }
@media (max-width: 720px) {
  .story-item, .story-item-flip { grid-template-columns: 1fr; }
  .story-item-flip .story-photo { order: 0; }
  .story-text { text-align: center; }
}

.story-photo {
  position: relative;
  background: var(--paper);
  padding: 10px 10px 12px;
  border-radius: 3px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  transform: rotate(var(--tilt, -2deg));
  transition: transform 0.5s var(--ease);
}
.story-photo:hover { transform: rotate(0) scale(1.03); }
.story-photo > img:last-child { border-radius: 2px; }
/* the proposal shot has sky to spare — bias its crop downward */
.story-item:nth-child(4) .story-photo > img:last-child {
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 88%;
}
.story-tape {
  position: absolute;
  top: -13px;
  left: 50%;
  width: 90px;
  transform: translateX(-50%) rotate(-4deg);
  opacity: 0.85;
  z-index: 2;
}

.story-kicker {
  font-family: var(--font-display);
  font-size: 0.88rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--yellow-bright);
  font-weight: 600;
  margin-bottom: 0.4rem;
}
.story-text h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.9rem, 4.2vw, 2.7rem);
  color: var(--cream);
  margin-bottom: 0.5rem;
}
.story-text p { color: var(--cream-soft); max-width: 44em; font-size: clamp(1.08rem, 1.7vw, 1.3rem); }
.story-text em { opacity: 0.6; }

/* ==========================================================================
   ABOUT THE WEDDING (linen)
   ========================================================================== */

.details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: clamp(1.6rem, 4vw, 3.5rem);
  text-align: center;
}
.details-card:nth-child(2) { transition-delay: 0.1s; }
.details-card:nth-child(3) { transition-delay: 0.2s; }

.details-flower {
  width: clamp(72px, 9vw, 96px);
  margin: 0 auto 1.3rem;
  filter: drop-shadow(0 6px 14px rgba(44, 36, 26, 0.25));
}
.details-card h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--fuchsia);
  margin-bottom: 0.7rem;
}
.details-card p { color: var(--ink-soft); font-size: 0.98rem; max-width: 30em; margin: 0 auto; }

.details-note {
  margin-top: 3rem;
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  color: var(--ink-soft);
  font-style: italic;
}

/* ==========================================================================
   GALLERY (green) — taped polaroids
   ========================================================================== */

.polaroid-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.6rem, 3.4vw, 2.8rem);
  align-items: start;
}
@media (max-width: 900px) {
  .polaroid-grid { grid-template-columns: repeat(2, 1fr); }
}

.polaroid {
  position: relative;
  background: var(--paper);
  padding: 12px 12px 14px;
  border-radius: 2px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  transform: rotate(var(--tilt, -2deg));
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease), opacity 1s var(--ease);
}
.polaroid.reveal-pop { transform: rotate(var(--tilt, -2deg)) translateY(24px) scale(0.94); }
.polaroid.reveal-pop.visible { transform: rotate(var(--tilt, -2deg)); }
.polaroid:hover {
  transform: rotate(0deg) scale(1.05) !important;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5);
  z-index: 2;
}


/* dark rabbet line where the mat meets the picture, so the gilt reads as a
   real moulding rather than a coloured border */
.polaroid-tape {
  position: absolute;
  top: -13px;
  left: 50%;
  width: 96px;
  transform: translateX(-50%) rotate(var(--tape-tilt, -3deg));
  opacity: 0.85;
  z-index: 2;
}

.polaroid-photo {
  /* frames share the photos' own 2:3 ratio, so every shot fills its frame
     completely with zero cropping */
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #e5dbc7;
  display: grid;
  place-items: center;
}
.polaroid-photo img { width: 100%; height: 100%; object-fit: cover; }
.polaroid-photo .placeholder-flower { width: 40%; opacity: 0.35; }

.polaroid-caption {
  font-family: var(--font-script);
  font-size: 1.6rem;
  text-align: center;
  color: var(--ink);
  padding: 0.5rem 0.4rem 0.7rem;
  line-height: 1.2;
}

.gallery-hint {
  text-align: center;
  margin-top: 2.6rem;
  font-size: 0.85rem;
  color: var(--cream-soft);
}
.gallery-hint code {
  background: rgba(236, 223, 201, 0.12);
  padding: 0.15em 0.5em;
  border-radius: 4px;
  font-size: 0.82em;
}

/* ==========================================================================
   TRAVEL (linen)
   ========================================================================== */

.travel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.4rem;
}
.travel-card {
  background: var(--paper);
  border: 1px solid rgba(44, 36, 26, 0.1);
  border-radius: 6px;
  padding: 2.2rem 2rem;
  box-shadow: 0 12px 30px rgba(44, 36, 26, 0.08);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease),
              opacity 1s var(--ease);
}
.travel-card:hover { transform: translateY(-6px); box-shadow: 0 22px 44px rgba(44, 36, 26, 0.14); }
.travel-card:nth-child(2) { transition-delay: 0.1s; }
.travel-card:nth-child(3) { transition-delay: 0.2s; }
.travel-card h3 {
  font-size: 2rem;
  color: var(--orange);
  margin-bottom: 0.5rem;
}
.travel-card p { color: var(--ink-soft); font-size: 0.98rem; }

.travel-icon {
  width: clamp(56px, 6.5vw, 72px);
  margin-bottom: 0.9rem;
  filter: drop-shadow(0 4px 10px rgba(44, 36, 26, 0.18));
}

/* --- hand-drawn maps: the island, and the Isla Verde strip --- */
.travel-maps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.4rem;
  margin-top: 1.4rem;
}
@media (max-width: 820px) {
  .travel-maps { grid-template-columns: 1fr; }
}
.tmap {
  background: var(--paper);
  border: 1px solid rgba(44, 36, 26, 0.1);
  border-radius: 6px;
  padding: 1.4rem 1.4rem 1.1rem;
  box-shadow: 0 12px 30px rgba(44, 36, 26, 0.08);
}
/* padded ratio box: Safari doesn't reliably honour aspect-ratio on iframes,
   so the box carries the ratio and the iframe just fills it */
.tmap-frame {
  position: relative;
  width: 100%;
  padding-top: 62.5%; /* 16:10 */
  border-radius: 4px;
  overflow: hidden;
}
.tmap-frame iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  /* no filter here: Safari miscomposites filtered iframes */
}
.tmap-title {
  font-family: var(--font-script);
  font-size: 1.9rem;
  color: var(--fuchsia);
  text-align: center;
  margin-bottom: 0.7rem;
  line-height: 1.1;
}
.tmap figcaption {
  font-size: 0.9rem;
  color: var(--ink-soft);
  text-align: center;
  margin-top: 0.7rem;
}
.tmap-label {
  font-family: var(--font-body);
  font-size: 13px;
  fill: var(--ink);
}
.tmap-strong { font-weight: 500; }
.tmap-quiet { fill: var(--ink-soft); letter-spacing: 0.14em; text-transform: uppercase; font-size: 12px; }
.travel-card strong { color: var(--ink); font-weight: 500; }

/* ==========================================================================
   EXPLORE (fuchsia)
   ========================================================================== */

.explore-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.3rem;
}
.explore-card {
  background: var(--paper);
  border-radius: 6px;
  padding: 1.9rem 1.8rem;
  rotate: var(--card-tilt, 0deg);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
  transition: rotate 0.4s var(--ease), transform 0.5s var(--ease),
              box-shadow 0.5s var(--ease), opacity 1s var(--ease);
}
.explore-card:hover {
  rotate: 0deg;
  transform: translateY(-5px);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.3);
}
.explore-card:nth-child(2) { transition-delay: 0.06s; }
.explore-card:nth-child(3) { transition-delay: 0.12s; }
.explore-card:nth-child(4) { transition-delay: 0.06s; }
.explore-card:nth-child(5) { transition-delay: 0.12s; }
.explore-card:nth-child(6) { transition-delay: 0.18s; }
.explore-card h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fuchsia);
  margin-bottom: 0.5rem;
}
.explore-card p { color: var(--ink-soft); font-size: 0.95rem; }

/* ==========================================================================
   FAQ (green)
   ========================================================================== */

.faq-list { display: grid; }
.faq-item {
  border-bottom: 1px solid rgba(236, 223, 201, 0.2);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}
.faq-item:first-child { border-top: 1px solid rgba(236, 223, 201, 0.2); }
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 1.4rem 3.2rem 1.4rem 0.2rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.02rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cream);
  position: relative;
  user-select: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  position: absolute;
  right: 0.4rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 1.5rem;
  color: var(--yellow-bright);
  transition: transform 0.35s var(--ease);
}
.faq-item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq-item p {
  padding: 0 0.2rem 1.5rem;
  color: var(--cream-soft);
  font-size: 0.97rem;
  max-width: 60em;
}

/* ==========================================================================
   RSVP BANNER + FOOTER
   ========================================================================== */

.rsvp-banner .btn { margin-top: 2rem; }
.rsvp-envelope {
  width: clamp(190px, 24vw, 280px);
  margin: 0 auto 1.4rem;
  filter: drop-shadow(0 14px 28px rgba(44, 36, 26, 0.28));
}

.footer {
  text-align: center;
  padding: 2.4rem 1rem 4.6rem;
  position: relative;
  /* the flora is allowed to rise past the top edge into the section above */
}
/* tropical arrangement anchored to the page's bottom edge; its box extends
   above the footer so the tall leaves flow up across the section boundary */
.footer::after {
  content: '';
  position: absolute;
  top: -46vw;   /* taller than the art ever renders, so nothing is clipped */
  bottom: 0;
  left: 0;
  right: 0;
  background: url("../images/art/landing-border3.webp") bottom center / 100% auto no-repeat;
  pointer-events: none;
}
.footer-coming, .footer-sub { position: relative; z-index: 1; }


.footer-script {
  font-family: var(--font-script);
  font-size: 2.6rem;
  color: var(--cream);
}
.footer-script .amp {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.55em;
  opacity: 0.7;
}
.footer-sub {
  font-family: var(--font-display);
  font-size: 1.45rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--cream-soft);
  margin-top: 0.6rem;
}
.footer-tiny {
  font-size: 0.72rem;
  color: rgba(236, 223, 201, 0.4);
  margin-top: 1.5rem;
}

.footer-coming {
  /* shrink to the text so the writing wipe ends exactly at the last dot,
     with no dead stroke across empty space */
  width: fit-content;
  margin-inline: auto;
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  /* solid gold with a faint, slow glint drifting through */
  background: linear-gradient(100deg,
      #d99d0b 0%, #e9a80c 30%, #f4c14f 48%, #e9a80c 66%, #d99d0b 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: gold-shine 9s ease-in-out infinite;
  /* hidden until scrolled into view, then "written" left to right */
  clip-path: inset(-160px 102% -160px -2%);
}
.footer-coming.visible {
  /* slow enough to watch it write itself */
  animation: write-in 10s cubic-bezier(0.35, 0, 0.35, 1) forwards,
             gold-shine 9s ease-in-out 10.3s infinite;
}
@keyframes write-in {
  from { clip-path: inset(-160px 102% -160px -2%); }
  to   { clip-path: inset(-160px -2% -160px -2%); }
}
/* the dots land one by one after the phrase finishes writing */
.footer-dots i {
  font-style: normal;
  opacity: 0;
  margin-left: 0.12em;
}
.footer-coming.visible .footer-dots i { animation: dot-in 0.22s ease forwards; }
.footer-coming.visible .footer-dots i:nth-child(1) { animation-delay: 4.1s; }
.footer-coming.visible .footer-dots i:nth-child(2) { animation-delay: 4.32s; }
.footer-coming.visible .footer-dots i:nth-child(3) { animation-delay: 4.54s; }
@keyframes dot-in { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .footer-coming, .footer-coming.visible { clip-path: none; animation: none; }
  .footer-dots i { opacity: 1; animation: none !important; }
}
/* one line on wide screens; stacked on phones (see the mobile block) */
.footer-coming-script { display: inline; }
.footer-coming-sub { display: inline; margin-left: 0.7rem; }
.footer-coming-script {
  font-family: var(--font-script);
  font-size: 3.6rem;
  letter-spacing: 0;
  text-transform: none;
  margin-bottom: 0.15rem;
}
@keyframes gold-shine {
  0%, 100% { background-position: 115% 0; }
  50% { background-position: -15% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .footer-coming { animation: none; }
}

/* ==========================================================================
   RSVP MODAL
   ========================================================================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(15, 33, 18, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: grid;
  place-items: center;
  padding: 1.2rem;
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}
.modal-overlay.showing { opacity: 1; }
.modal-overlay[hidden] { display: none; }

.modal {
  background: var(--linen-soft);
  border-radius: 6px;
  width: min(520px, 100%);
  max-height: 88svh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 50px 120px rgba(0, 0, 0, 0.5);
  transform: translateY(24px) scale(0.98);
  transition: transform 0.4s var(--ease);
}
.modal-overlay.showing .modal { transform: none; }

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1.1rem;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: rgba(44, 36, 26, 0.08);
  color: var(--ink);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.3s;
  z-index: 1;
}
.modal-close:hover { background: rgba(44, 36, 26, 0.16); }

.modal-body { padding: 2.8rem 2.4rem 2.4rem; }
.modal-logo {
  width: clamp(96px, 15vw, 132px);
  margin: 0 auto 0.9rem;
  display: block;
}
.modal-title { font-size: 2.6rem; margin-bottom: 1.4rem; }

.field { margin-bottom: 1.25rem; text-align: left; }
.field > label {
  display: block;
  font-family: var(--font-display);
  font-size: 0.74rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 0.45rem;
}
.field input[type="text"],
.field input[type="email"],
.field select {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 300;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid rgba(44, 36, 26, 0.22);
  border-radius: 3px;
  padding: 0.85rem 1rem;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.field input:focus, .field select:focus {
  outline: none;
  border-color: var(--fuchsia);
  box-shadow: 0 0 0 3px rgba(216, 30, 110, 0.16);
}

.pill-group { display: flex; gap: 0.7rem; flex-wrap: wrap; }
.pill input { position: absolute; opacity: 0; pointer-events: none; }
.pill span {
  display: inline-block;
  padding: 0.6rem 1.3rem;
  border-radius: 3px;
  border: 1px solid rgba(44, 36, 26, 0.28);
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.3s var(--ease);
}
.pill input:checked + span {
  background: var(--green);
  border-color: var(--green);
  color: var(--cream);
}
.pill input:focus-visible + span { box-shadow: 0 0 0 3px rgba(216, 30, 110, 0.3); }

.form-note {
  margin-top: 1rem;
  font-size: 0.8rem;
  text-align: center;
  color: var(--ink-soft);
  opacity: 0.85;
}

.rsvp-success { text-align: center; padding: 1.2rem 0 0.4rem; }
.rsvp-success[hidden] { display: none; }
.success-flower { width: 62px; margin: 0 auto 1rem; }
.rsvp-success h3 { font-size: 2.4rem; margin-bottom: 0.5rem; }
.rsvp-success p { color: var(--ink-soft); margin-bottom: 1.6rem; }

body.modal-open { overflow: hidden; }

/* ---------- small screens ---------- */

@media (max-width: 560px) {
  .modal-body { padding: 2.4rem 1.5rem 1.8rem; }
}

/* ---- mobile footer sign-off (kept last so it wins over the base rules) ---- */
@media (max-width: 640px) {
  /* the sign-off sits in the clear channel between the corner arrangements,
     so it needs side room, not just top/bottom */
  .footer { padding: 1.8rem 3.2rem 1.6rem; }
  .footer::after { top: -140vw; background-image: url("../images/art/mobile-flora.webp"); background-size: 168% auto; }
  /* allowed to wrap — nowrap was pushing it past the screen edge */
  .footer-coming { font-size: 0.62rem; letter-spacing: 0.16em; line-height: 1; }
  .footer-coming-script { display: block; font-size: 2rem; line-height: 1.45; margin-top: -0.2rem; margin-bottom: -0.6rem; }
  .footer-coming-sub { display: block; margin-left: 0; }
  .footer-sub { font-size: 0.82rem; letter-spacing: 0.2em; margin-top: 0.25rem; }
}

/* ---- mobile gallery (kept last so it wins over the base .polaroid rules) ---- */
@media (max-width: 560px) {
  /* keep two across even on the narrowest phones */
  .polaroid-grid { grid-template-columns: repeat(2, 1fr); gap: 1.6rem 1.3rem; }
  .polaroid { padding: 4px 4px 5px; }
  /* 9 photos over 2 columns leaves a lone one on the last row — centre it */
  .polaroid-grid > :last-child:nth-child(odd) { grid-column: 1 / -1; justify-self: center; width: 50%; }
}
