/* =============================================================
   Wedding Invitation — Danil & Anna
   ============================================================= */

@font-face {
  font-family: "Marianna";
  src: url("fonts/marianna.ttf?v=20260424") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Yeseva One";
  src: url("fonts/yeseva-one.ttf?v=20260424") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Tamarin";
  src: url("fonts/tamarin.ttf?v=20260424") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Rosamunda One";
  src: url("fonts/rosamunda-one.ttf?v=20260424") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Rosa Marena";
  src: url("fonts/rosa-marena.ttf?v=20260424") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* ---- Palette ---- */
  --envelope-olive:       #6B7A4F;
  --envelope-olive-dark:  #4F5C3A;
  --envelope-olive-deep:  #3D4930;
  --envelope-olive-light: #8A9968;
  --envelope-olive-tint:  #9AA87C;

  --paper-cream:       #F4EDDC;
  --paper-cream-warm:  #EFE5CD;
  --paper-cream-edge:  #E6DBC2;

  --ink-brown:       #3D2B1F;
  --ink-brown-soft:  #5C4434;
  --ink-brown-faint: rgba(61, 43, 31, 0.55);

  --wax-rose:           #B87E6A;
  --wax-rose-highlight: #E0B29B;
  --wax-rose-shadow:    #7A4A3C;
  --wax-gold:           #A8794A;
  --wax-gold-light:     #D4A66E;

  --dress-1: #7E8E7C;
  --dress-2: #9CAE9F;
  --dress-3: #7A93A8;
  --dress-4: #B5C7D3;
  --dress-5: #EAE6DC;

  --rust-ink: #A05A4F;

  /* Editorial accents */
  --forest-deep: #1F2B1D;
  --gold-ink:    #8B6F3D;
  --gold-light:  #B8924E;
  --rose-ink:    #9B5A4D;

  --shadow-soft: rgba(61, 43, 31, 0.12);
  --shadow-mid:  rgba(61, 43, 31, 0.22);
  --shadow-deep: rgba(61, 43, 31, 0.38);

  /* ---- Motion ---- */
  --ease-paper: cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-pull:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft:  cubic-bezier(0.4, 0, 0.2, 1);
  --dur-slow:   900ms;
  --dur-mid:    600ms;
  --dur-fast:   300ms;

  /* ---- Fonts ---- */
  /* ---- Typography stack ----
     Fraunces: variable serif with optical size + SOFT + WONK axes
                — distinctive, not overused. Display + body duties.
     Italiana: elegant display serif for big statements (Latin only)
     Marianna: custom Cyrillic script (local .ttf) for headings
     PT Mono: utility / addresses / fine print (Cyrillic support) */
  --font-display: "Fraunces", "Italiana", Georgia, serif;
  --font-display-latin: "Italiana", "Fraunces", Georgia, serif;
  --font-body:    "Montserrat", "Helvetica Neue", -apple-system, sans-serif;
  --font-script:  "Marianna", "Marck Script", cursive;
  --font-mono:    "PT Mono", "Courier New", monospace;

  /* ---- Layout ---- */
  --col-max: 480px;
  --col-pad: 28px;
}

/* =============================================================
   Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper-cream);
  color: var(--ink-brown);
  font-family: var(--font-body);
  font-variation-settings: "opsz" 14, "SOFT" 50, "WONK" 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "liga", "onum" 1;
}
html { scroll-behavior: smooth; }

body {
  min-height: 100svh;
  overflow-x: hidden;
  position: relative;
  width: 100%;
}
.letter { max-width: min(var(--col-max), 100%); }

body.is-locked {
  overflow: hidden;
  height: 100svh;
  height: 100dvh;
}

img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: var(--ink-brown); }

/* Desktop warm paper backdrop */
@media (min-width: 1024px) {
  body {
    background:
      radial-gradient(1200px 900px at 50% 40%,
        var(--paper-cream) 0%,
        var(--paper-cream-warm) 60%,
        var(--paper-cream-edge) 100%);
  }
  body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/><feColorMatrix values='0 0 0 0 0.24  0 0 0 0 0.17  0 0 0 0 0.12  0 0 0 0.08 0'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.6'/></svg>");
    mix-blend-mode: multiply;
    opacity: 0.4;
  }
}

/* =============================================================
   SCENE 1 — closed envelope (the hero moment)
   ============================================================= */
.scene-envelope {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 16px;
}

.moss-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 120% 90% at 50% 40%,
      #4A5840 0%,
      #3A4531 45%,
      #262E1D 100%);
  z-index: 0;
}
.moss-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 40% 30% at 50% 50%,
      rgba(255, 255, 255, 0.04),
      transparent 70%);
  pointer-events: none;
}
.moss-grain {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='m'><feTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.1  0 0 0 0 0.12  0 0 0 0 0.08  0 0 0 0.75 0'/></filter><rect width='100%' height='100%' filter='url(%23m)'/></svg>");
  opacity: 0.09;
  mix-blend-mode: overlay;
  pointer-events: none;
}
.moss-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 55% at 50% 50%,
    transparent 0%,
    transparent 45%,
    rgba(0, 0, 0, 0.4) 100%);
  pointer-events: none;
}

.envelope-wrap {
  position: relative;
  z-index: 2;
  width: min(82vw, 400px);
  aspect-ratio: 380 / 551;
  max-height: calc(100svh - 48px);
  filter:
    drop-shadow(0 24px 48px rgba(0, 0, 0, 0.55))
    drop-shadow(0 6px 14px rgba(0, 0, 0, 0.38));
  animation: env-breath 7s ease-in-out infinite;
}
@media (min-width: 1024px) {
  .envelope-wrap { width: 420px; }
}
@keyframes env-breath {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-3px); }
}

.envelope {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

/* ---- SVG envelope internals ---- */
.env-top-flap {
  transform-origin: 190px 340px;
  transform-box: fill-box;
  /* JS sets transform-origin on the group element itself via attribute */
}
.env-inner-card { opacity: 0; }
.env-inner-peek path { transition: opacity 0.5s ease-out; }

.inner-card-title-svg {
  font-family: "Italiana", "Fraunces", serif;
  font-size: 38px;
  fill: var(--ink-brown);
  letter-spacing: 2px;
}
.inner-card-sub-svg {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 300;
  font-size: 16px;
  fill: var(--gold-ink);
  letter-spacing: 8px;
}

.flap-script-line {
  font-family: var(--font-script);
  font-size: 26px;
  fill: #F2EBDA;
  letter-spacing: 0.8px;
}
.flap-script-small { font-size: 22px; opacity: 0.9; }

/* Gold-foil flap typography */
.flap-title {
  font-family: "Italiana", "Fraunces", serif;
  font-size: 28px;
  fill: url(#goldFoil);
  letter-spacing: 3px;
  text-transform: uppercase;
}
.flap-amp {
  font-family: "Fraunces", serif;
  font-style: italic;
  font-size: 14px;
  fill: rgba(235,225,190,0.7);
  letter-spacing: 3px;
}
.flap-subtitle {
  font-family: var(--font-script);
  font-size: 30px;
  fill: rgba(245,238,215,0.88);
  letter-spacing: 0.5px;
}

/* Wax seal styling */
.wax-click-area { overflow: visible; }
.wax-btn {
  width: 120px;
  height: 120px;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  border-radius: 50%;
  outline: none;
}
.wax-btn:focus-visible {
  outline: 2px solid rgba(255, 245, 220, 0.7);
  outline-offset: 4px;
}
.wax-visual { transition: transform 0.3s var(--ease-paper); pointer-events: none; }
.wax-btn:hover ~ .wax-visual,
.envelope:has(.wax-btn:hover) .wax-visual {
  transform: scale(1.04);
}

.wax-letters {
  font-family: "Italiana", "Fraunces", Georgia, serif;
  font-weight: 400;
  font-size: 24px;
  fill: #E8C590;
  letter-spacing: 3px;
  text-transform: uppercase;
}
.wax-letters-shadow {
  fill: rgba(40, 15, 8, 0.55);
}
.wax-letters-highlight {
  fill: rgba(255, 235, 200, 0.4);
}

/* ---- OPENING CHOREOGRAPHY (animations on SVG groups) ---- */
.envelope .wax-left-half,
.envelope .wax-right-half {
  transform-origin: 190px 312px;
  transform-box: view-box;
  transition: transform 0.5s var(--ease-paper), opacity 0.3s ease-out;
}
.envelope.is-broken .wax-left-half  { transform: translate(-16px, 28px) rotate(-24deg); opacity: 0; }
.envelope.is-broken .wax-right-half { transform: translate(18px, 32px) rotate(20deg); opacity: 0; }
.envelope.is-broken .wax-monogram   { opacity: 0; transition: opacity 0.3s ease-out; }
.envelope.is-broken .wax-btn        { pointer-events: none; cursor: default; }

.envelope.is-opening .env-top-flap {
  animation: flap-open 1s var(--ease-paper) forwards;
}
@keyframes flap-open {
  from { transform: scaleY(1); }
  to   { transform: scaleY(-1) translateY(-400px); }
}
.envelope.is-opening .env-script { opacity: 0; transition: opacity 0.25s ease-out 0.05s; }
.envelope.is-opening .env-inner-peek path { opacity: 1; }
.envelope.is-opening .env-inner-card {
  opacity: 1;
  animation: card-slide 1s var(--ease-pull) 0.2s forwards;
}
@keyframes card-slide {
  from { transform: translateY(0); }
  to   { transform: translateY(-480px); }
}

.envelope.is-done {
  transition: opacity 0.6s ease-out;
  opacity: 0;
}

.scene-envelope.is-closing { opacity: 0; transition: opacity 0.6s ease-out 0.1s; pointer-events: none; }
.scene-envelope.is-hidden  { display: none; }

/* =============================================================
   Letter shell
   ============================================================= */
.letter {
  position: relative;
  max-width: var(--col-max);
  margin: 0 auto;
  background: var(--paper-cream);
  box-shadow:
    inset 10px 0 30px -20px var(--shadow-mid),
    inset -10px 0 30px -20px var(--shadow-mid);
  opacity: 0;
  transition: opacity 0.6s ease-out;
  z-index: 2;
}
.letter.is-revealed { opacity: 1; }

@media (min-width: 768px) and (max-width: 1023px) {
  .letter { max-width: 560px; }
}
@media (min-width: 1024px) {
  .letter {
    box-shadow:
      0 2px 40px rgba(0, 0, 0, 0.08),
      inset 10px 0 30px -20px var(--shadow-mid),
      inset -10px 0 30px -20px var(--shadow-mid);
  }
}

.paper-grain {
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='p'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.24  0 0 0 0 0.17  0 0 0 0 0.12  0 0 0 0.55 0'/></filter><rect width='100%' height='100%' filter='url(%23p)'/></svg>");
  opacity: 0.05;
  pointer-events: none;
  z-index: 1;
  mix-blend-mode: multiply;
}

/* Progress rail — hidden for now, caused overflow */
.progress-rail { display: none; }

/* shared scene frame */
.scene {
  position: relative;
  padding: 80px var(--col-pad);
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

/* =============================================================
   Typographic system — editorial botanical
   ============================================================= */

/* Display headings — flowing Marck Script (matches ref aesthetic) */
.display-h1 {
  font-family: "Rosamunda One", "Yeseva One", "Fraunces", Georgia, serif;
  font-weight: 400;
  color: var(--ink-brown);
  font-size: clamp(2.8rem, 10vw, 4.4rem);
  line-height: 1.05;
  letter-spacing: 0.005em;
  margin: 0 0 24px;
}
.display-h2 {
  font-family: "Rosamunda One", "Yeseva One", "Fraunces", Georgia, serif;
  font-weight: 400;
  color: var(--ink-brown);
  font-size: clamp(2.4rem, 8vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: 0.005em;
  margin: 0 0 20px;
}
.display-h2 em,
.display-h1 em {
  font-family: inherit;
  font-style: normal;
  color: var(--ink-brown);
}

/* Script heading — now uses Rosamunda One as well */
.script-h1 {
  font-family: "Rosamunda One", "Yeseva One", "Fraunces", Georgia, serif;
  font-weight: 400;
  color: var(--ink-brown);
  font-size: clamp(2.6rem, 8.5vw, 4rem);
  letter-spacing: 0.005em;
  line-height: 1.05;
  margin: 0 0 28px;
}
.script-h1.center { text-align: center; }
.script-h1 .bang { display: inline-block; font-size: 1.25em; transform: translate(2px, 6px); }

/* Eyebrow labels — mono, spaced */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  padding-left: 0.28em;
  color: var(--ink-brown-soft);
  font-weight: 400;
  display: inline-block;
  margin-bottom: 18px;
}
.eyebrow .dot {
  display: inline-block;
  width: 4px; height: 4px;
  background: var(--gold-ink);
  border-radius: 50%;
  margin: 0 10px;
  vertical-align: middle;
  transform: translateY(-1px);
}

/* Body — clean Montserrat, modern sans */
.body-copy {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(0.95rem, 2.4vw, 1.05rem);
  line-height: 1.7;
  color: var(--ink-brown-soft);
  letter-spacing: 0.005em;
  max-width: 36ch;
  margin: 0 auto 24px;
}
.body-copy.center { text-align: center; }
.body-copy em {
  font-style: italic;
  color: var(--ink-brown);
  font-variation-settings: "opsz" 22, "SOFT" 30;
}

/* Drop cap */
.body-copy.drop-cap::first-letter {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 3.8em;
  line-height: 0.9;
  float: left;
  margin: 0.08em 0.1em -0.1em 0;
  color: var(--gold-ink);
  font-variation-settings: "opsz" 144, "SOFT" 0, "WONK" 0;
}

/* Gold-foil text treatment */
.gold-foil {
  background: linear-gradient(135deg,
    #8B6F3D 0%,
    #D4A96A 30%,
    #E4C488 45%,
    #8B6F3D 60%,
    #C89A5A 80%,
    #6E5530 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* Big numerals — tall, editorial */
.numeral {
  font-family: var(--font-display);
  font-weight: 300;
  font-variation-settings: "opsz" 144, "SOFT" 0, "WONK" 0;
  font-feature-settings: "tnum" 1, "lnum" 1;
  letter-spacing: -0.02em;
  display: inline-block;
  line-height: 1;
}

/* =============================================================
   SCENE 2 — couple hero (full-bleed photo + script overlay)
   ============================================================= */
.scene-hero {
  padding: 0;
  min-height: 100svh;
  display: block;
  position: relative;
}

.hero-photo {
  margin: 0;
  width: 100%;
  height: 100svh;
  overflow: hidden;
  position: relative;
  background: #2b2a26;
}
.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.88) contrast(1.03);
  display: block;
}
/* Gradient overlay at bottom so script text reads on any photo */
.hero-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg,
      rgba(0, 0, 0, 0) 40%,
      rgba(0, 0, 0, 0.35) 75%,
      rgba(0, 0, 0, 0.65) 100%);
  pointer-events: none;
}

.hero-overlay {
  position: absolute;
  left: 0; right: 0;
  bottom: 12%;
  padding: 0 10px;
  text-align: center;
  color: #fff;
  z-index: 2;
}
/* Couple names — flowing script overlaid on photo */
.hero-names {
  font-family: var(--font-script);
  font-weight: 400;
  font-size: clamp(3.2rem, 16vw, 5.6rem);
  line-height: 0.95;
  letter-spacing: -0.005em;
  color: #fff;
  margin: 0 0 18px;
  white-space: nowrap;
  text-shadow:
    0 2px 18px rgba(0, 0, 0, 0.55),
    0 1px 4px rgba(0, 0, 0, 0.4);
}
.name-first,
.name-second {
  display: inline-block;
}
.name-amp {
  font-size: 0.95em;
  margin: 0 0.1em;
  opacity: 0.9;
  font-family: var(--font-script);
}

/* Date under the script names — same script font */
.hero-date {
  font-family: var(--font-script);
  font-weight: 400;
  font-size: clamp(4.6rem, 20vw, 7rem);
  line-height: 1;
  letter-spacing: 0.01em;
  color: #fff;
  opacity: 0.95;
  text-shadow:
    0 2px 18px rgba(0, 0, 0, 0.55),
    0 1px 4px rgba(0, 0, 0, 0.4);
}

/* Scroll hint — floating over hero photo */
.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  z-index: 3;
}
.scroll-line {
  width: 1px;
  height: 30px;
  background: rgba(255, 255, 255, 0.7);
  animation: hint-line 2.5s ease-in-out infinite;
  transform-origin: top;
}
.scroll-dot {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  animation: hint-dot 2.5s ease-in-out infinite;
}
@keyframes hint-line {
  0%, 100% { transform: scaleY(0.7); opacity: 0.5; }
  50%      { transform: scaleY(1);   opacity: 1; }
}
@keyframes hint-dot {
  0%, 100% { transform: translateY(0); opacity: 0.7; }
  50%      { transform: translateY(4px); opacity: 1; }
}

/* =============================================================
   SCENE 3 — greeting & feature date
   ============================================================= */
.scene-greeting {
  text-align: center;
  padding: 80px 28px 96px;
  gap: 0;
}
.corner-botanical {
  position: absolute;
  width: 120px;
  height: 80px;
  color: var(--envelope-olive-dark);
  opacity: 0.1;
  pointer-events: none;
}
.corner-tl { top: 40px; left: -20px; transform: rotate(0deg); }
.corner-br { bottom: 40px; right: -20px; transform: rotate(180deg); width: 120px; height: 80px; top: auto; left: auto; }

.greeting-eyebrow { margin: 0 auto 28px; }

/* Feature date — big centered "12" */
/* Calendar-style feature date: 3-column table with hand-drawn circle around the wedding day.
   Matches the printed wedding-stationery reference. */
.feature-date {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: stretch;
  margin: 8px 0 52px;
  width: 100%;
  position: relative;
  border-top: 1px solid rgba(61, 43, 31, 0.3);
  border-bottom: 1px solid rgba(61, 43, 31, 0.3);
  padding: 22px 0 28px;
  overflow: visible;
}
/* vertical dividers between cells */
.feature-date > * + *::before {
  content: "";
  position: absolute;
  top: 18px; bottom: 18px;
  left: 0;
  width: 1px;
  background: rgba(61, 43, 31, 0.25);
}
.date-neighbor,
.date-center {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 6px;
}
.date-neighbor { opacity: 0.42; }

.neighbor-wd,
.date-wd {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  padding-left: 0.22em;
  color: var(--ink-brown-soft);
  margin-bottom: 8px;
}
.date-wd {
  color: var(--gold-ink);
  font-weight: 600;
}

.neighbor-day,
.date-hero-num {
  font-family: "Tamarin", "Yeseva One", "Fraunces", Georgia, serif;
  font-weight: 400;
  color: var(--ink-brown);
  line-height: 1;
  font-feature-settings: "lnum" 1, "tnum" 1;
}
.neighbor-day {
  font-size: clamp(2.6rem, 9vw, 3.4rem);
  margin-top: 4px;
}
.date-hero-num {
  font-size: clamp(5rem, 18vw, 7rem);
  position: relative;
  z-index: 1;
  margin: 2px 0 4px;
}

/* Hand-drawn ink oval around the chosen day — tight around "25" only */
.date-hero-num {
  /* re-declared so it becomes the oval's positioning parent */
  position: relative;
  display: inline-block;
}
.date-circle {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 130%;
  height: 130%;
  transform: translate(-50%, -50%) rotate(-3deg);
  color: var(--envelope-olive);
  opacity: 0.9;
  pointer-events: none;
  z-index: 2;
}
.date-circle path {
  stroke-dasharray: 540;
  stroke-dashoffset: 540;
  transition: stroke-dashoffset 1s ease-in-out;
}
.feature-date.is-in .date-circle path { stroke-dashoffset: 0; }

/* Month label under the number */
.date-month {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 2px;
  gap: 0;
}
.month-ru {
  font-family: "Yeseva One", "Fraunces", Georgia, serif;
  font-size: clamp(1.6rem, 5.5vw, 2.2rem);
  color: var(--ink-brown);
  line-height: 1;
  margin-top: 8px;
  letter-spacing: 0.01em;
}

/* Greeting block — centered */
.greeting-block {
  text-align: center;
  margin: 0 auto;
}
.greeting-block .display-h2 {
  margin: 0 calc(-1 * var(--col-pad)) 20px;
  line-height: 1.05;
  text-align: center;
  font-family: "Rosamunda One", "Yeseva One", "Fraunces", Georgia, serif;
  font-weight: 400;
  font-size: clamp(4rem, 18vw, 6.4rem);
  color: var(--ink-brown);
  white-space: nowrap;
  max-width: none;
}
.greeting-block .display-h2 em {
  font-family: inherit;
  font-style: normal;
  color: var(--ink-brown);
}
.greeting-block .display-h2 .bang {
  font-family: inherit;
  color: var(--ink-brown);
  font-size: 1em;
  display: inline-block;
}
.greeting-block .body-copy { text-align: center; margin: 0 auto 20px; max-width: 34ch; }

.signature {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: 10px;
}
.sig-line { width: 44px; height: 1px; background: var(--gold-ink); opacity: 0.65; }
.sig-text {
  font-family: var(--font-script);
  font-size: 1.6rem;
  letter-spacing: 0.02em;
}

/* Heart-on-string — smaller, centred */
.heart-string {
  margin: 40px auto 0;
  width: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--envelope-olive);
  transform-origin: top center;
  animation: swing 4s ease-in-out infinite;
}
@keyframes swing {
  0%, 100% { transform: rotate(-3deg); }
  50%      { transform: rotate(3deg); }
}
.heart-string-line {
  width: 1px;
  height: 92px;
  background: var(--ink-brown);
  opacity: 0.4;
}
.heart-string-heart {
  width: 26px;
  height: 24px;
  margin-top: 0;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.12));
}

/* =============================================================
   SCENE 4 — timeline
   ============================================================= */
.scene-timeline {
  min-height: auto;
  padding: 96px var(--col-pad) 120px;
  overflow: hidden;
}
.tl-eyebrow { align-self: center; margin: 0 auto 14px; }
.tl-heading {
  text-align: center;
  margin: 0 calc(-1 * var(--col-pad)) 22px;
  font-family: "Rosamunda One", "Yeseva One", "Fraunces", Georgia, serif;
  font-weight: 400;
  font-size: clamp(4rem, 18vw, 6.4rem);
  white-space: nowrap;
  letter-spacing: 0.005em;
}
.tl-heading em {
  font-style: normal;
  color: var(--ink-brown);
}
.tl-ornament {
  display: block;
  width: 120px;
  height: 16px;
  margin: 0 auto 56px;
}

.timeline {
  position: relative;
  width: 100%;
  height: 160vh;
  min-height: 960px;
  max-height: 1500px;
}
.timeline-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.timeline-svg path {
  stroke-dasharray: var(--path-length, 3000);
  stroke-dashoffset: var(--path-length, 3000);
}

.timeline-events {
  position: absolute;
  inset: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}
.tl-event {
  position: absolute;
  top: var(--top);
  display: flex;
  align-items: center;
  gap: 14px;
  opacity: 1;
  max-width: 68%;
}
.tl-event.tl-right { right: 6%; flex-direction: row-reverse; text-align: right; }
.tl-event.tl-left  { left: 6%; text-align: left; }
.tl-event.tl-right.is-in { animation: slide-in-right 0.7s var(--ease-paper); }
.tl-event.tl-left.is-in  { animation: slide-in-left  0.7s var(--ease-paper); }
@keyframes slide-in-right {
  from { transform: translateX(22px); }
  to   { transform: translateX(0); }
}
@keyframes slide-in-left {
  from { transform: translateX(-22px); }
  to   { transform: translateX(0); }
}

.tl-heart {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 24px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.15));
  flex-shrink: 0;
}

/* Make the timeline line visually weave around the text.
   A soft paper-cream blob sits behind every text block; the line
   still physically passes through, but is masked by the blob. */
.tl-event { z-index: 2; }
.tl-event .tl-text {
  position: relative;
  isolation: isolate;
}
.tl-event .tl-text::before {
  content: "";
  position: absolute;
  inset: -10px -18px;
  background:
    radial-gradient(
      ellipse at center,
      var(--paper-cream) 0%,
      var(--paper-cream) 55%,
      rgba(244, 237, 220, 0.85) 75%,
      rgba(244, 237, 220, 0) 100%
    );
  z-index: -1;
  border-radius: 14px;
  pointer-events: none;
}
.tl-heart svg { width: 100%; height: 100%; fill: currentColor; }
.tl-event.is-in .tl-heart { animation: pop-in 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s; }
@keyframes pop-in {
  from { transform: scale(0); }
  to   { transform: scale(1); }
}

.tl-eyebrow {
  font-family: "Rosamunda One", "Yeseva One", "Fraunces", Georgia, serif;
  font-weight: 400;
  font-size: clamp(3.4rem, 12vw, 4.6rem);
  color: var(--ink-brown);
  line-height: 1;
  letter-spacing: 0.01em;
  margin-bottom: 6px;
}
.tl-label {
  font-family: "Rosamunda One", "Yeseva One", "Fraunces", Georgia, serif;
  font-weight: 400;
  font-size: clamp(2.8rem, 9.5vw, 4rem);
  color: var(--ink-brown);
  line-height: 1.05;
  letter-spacing: 0.005em;
  margin-bottom: 6px;
}
.tl-label--welcome {
  font-family: "Rosa Marena", "Rosamunda One", "Fraunces", Georgia, serif;
  font-weight: 400;
  font-size: clamp(1.9rem, 6.5vw, 2.6rem);
  letter-spacing: 0.01em;
}
.tl-time {
  font-family: "Rosamunda One", "Fraunces", Georgia, serif;
  font-weight: 400;
  font-size: clamp(2rem, 6vw, 2.6rem);
  letter-spacing: 0.02em;
  color: var(--gold-ink);
  font-feature-settings: "lnum" 1, "tnum" 1;
  line-height: 1;
}

/* =============================================================
   SCENE 5 — location (editorial card)
   ============================================================= */
.scene-location,
.scene-dress {
  padding: 64px var(--col-pad) 88px;
  min-height: auto;
  display: block;
}

.venue-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.venue-eyebrow {
  font-family: "Rosamunda One", "Yeseva One", "Fraunces", Georgia, serif;
  font-weight: 400;
  font-size: clamp(4.8rem, 18vw, 6.8rem);
  color: var(--ink-brown);
  line-height: 1;
  letter-spacing: 0.005em;
  text-align: center;
  margin: 0 calc(-1 * var(--col-pad)) 18px;
  white-space: nowrap;
}

.venue-photo {
  margin: 0 0 56px;
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 4 / 3;
  box-shadow:
    0 18px 32px -16px rgba(61, 43, 31, 0.32),
    0 4px 10px -2px rgba(61, 43, 31, 0.18);
}
.venue-photo::before {
  /* paper border */
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(255, 248, 225, 0.55);
  pointer-events: none;
  z-index: 2;
}
.venue-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: sepia(0.15) saturate(0.85) contrast(1.02);
}
.venue-photo-caption {
  position: absolute;
  bottom: 18px;
  right: 20px;
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  padding: 4px 10px;
  color: var(--paper-cream);
  background: rgba(30, 40, 20, 0.45);
  backdrop-filter: blur(4px);
  z-index: 3;
}

.venue-info {
  text-align: center;
  width: 100%;
}
.venue-heading {
  margin: 0 calc(-1 * var(--col-pad)) 18px;
  line-height: 0.96;
  font-family: "Rosa Marena", "Rosamunda One", "Fraunces", Georgia, serif;
  font-weight: 400;
  font-size: clamp(2.4rem, 10vw, 3.6rem);
  color: var(--ink-brown);
  white-space: nowrap;
}
.venue-heading em {
  font-family: inherit;
  font-style: normal;
  color: var(--ink-brown);
}
.venue-ornament {
  display: block;
  width: 120px;
  height: 16px;
  margin: 0 auto 28px;
}
.venue-address {
  font-family: var(--font-display);
  font-weight: 400;
  font-style: italic;
  font-size: 15px;
  color: var(--ink-brown-soft);
  line-height: 1.7;
  text-align: center;
  margin: 24px 0 24px;
  font-variation-settings: "opsz" 18, "SOFT" 100;
}

/* Stylised mini-map */
.venue-map {
  display: block;
  width: 100%;
  max-width: 280px;
  margin: 0 auto 28px;
  border: 1px solid var(--ink-brown-faint);
  background: var(--paper-cream-warm);
}

/* Embedded Yandex Map */
.venue-map-embed {
  position: relative;
  width: 100%;
  max-width: 420px;
  margin: 0 auto 28px;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--ink-brown-faint);
  box-shadow:
    0 4px 14px rgba(61, 43, 31, 0.18),
    inset 0 0 0 4px var(--paper-cream);
  background: var(--paper-cream-warm);
  overflow: hidden;
}
.venue-map-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  /* Tint map toward the sepia/olive aesthetic of the site */
  filter: sepia(0.22) saturate(0.85) hue-rotate(-8deg);
}

.venue-map-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--ink-brown);
  text-decoration: none;
  border-bottom: 1px solid var(--gold-ink);
  padding-bottom: 4px;
  letter-spacing: 0.01em;
  font-variation-settings: "opsz" 24, "SOFT" 50;
  transition: color var(--dur-fast) var(--ease-paper), transform var(--dur-fast) var(--ease-paper);
}
.venue-map-link:hover {
  color: var(--gold-ink);
  transform: translateY(-1px);
}
.venue-map-link svg { color: var(--gold-ink); }

/* ---- Venue photo gallery (carousel) ---- */
.venue-gallery {
  position: relative;
  margin: 28px 0 0;
  width: 100%;
  overflow: hidden;
  border-radius: 6px;
  background: rgba(61, 43, 31, 0.06);
  box-shadow: 0 6px 20px -10px rgba(61, 43, 31, 0.35);
}
.vg-track {
  display: flex;
  transition: transform 0.45s var(--ease-paper);
  touch-action: pan-y;
  cursor: grab;
}
.vg-track.is-dragging { transition: none; cursor: grabbing; }
.vg-slide {
  flex: 0 0 100%;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}
.vg-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(244, 237, 220, 0.85);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  color: var(--ink-brown);
  display: grid;
  place-items: center;
  padding: 0;
  z-index: 3;
  box-shadow: 0 2px 8px rgba(61, 43, 31, 0.25);
  transition: background var(--dur-fast) var(--ease-paper), transform 120ms var(--ease-paper);
}
.vg-arrow:hover { background: rgba(244, 237, 220, 1); }
.vg-arrow:active { transform: translateY(-50%) scale(0.94); }
.vg-prev { left: 10px; }
.vg-next { right: 10px; }
.vg-arrow svg { width: 12px; height: 18px; }
.vg-dots {
  position: absolute;
  left: 0; right: 0;
  bottom: 10px;
  display: flex;
  justify-content: center;
  gap: 6px;
  z-index: 3;
}
.vg-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(244, 237, 220, 0.65);
  padding: 0;
  transition: background var(--dur-fast), transform var(--dur-fast);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}
.vg-dot.is-active {
  background: var(--paper-cream);
  transform: scale(1.25);
}

/* =============================================================
   SCENE 6 — dress code
   ============================================================= */
.scene-dress { text-align: center; }
.dress-eyebrow { margin: 0 auto 22px; }
.dress-eyebrow {
  font-family: "Rosamunda One", "Yeseva One", "Fraunces", Georgia, serif;
  font-weight: 400;
  font-size: clamp(5.4rem, 20vw, 7.4rem);
  color: var(--ink-brown);
  line-height: 1;
  letter-spacing: 0.005em;
  text-align: center;
  margin: 0 calc(-1 * var(--col-pad)) 14px;
  white-space: nowrap;
}
.dress-heading {
  margin: 0 calc(-1 * var(--col-pad)) 14px;
  font-family: "Rosamunda One", "Yeseva One", "Fraunces", Georgia, serif;
  font-weight: 400;
  font-size: clamp(3.6rem, 16vw, 5.6rem);
  color: var(--ink-brown);
  white-space: nowrap;
}
.dress-heading em {
  font-family: inherit;
  font-style: normal;
  color: var(--ink-brown);
}
.dress-ornament {
  display: block;
  width: 32px;
  height: 24px;
  margin: 0 auto 26px;
}
.dress-intro { max-width: 34ch; margin-bottom: 40px; }

/* Palette in pairs — 4 groups laid out on one row (or 2×2 on narrow) */
.palette.palette-groups {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  max-width: 340px;
  margin: 0 auto 40px;
  padding: 0;
}
@media (max-width: 360px) {
  .palette.palette-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 240px;
  }
}

.color-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: transform 0.25s var(--ease-paper);
  position: relative;
}
.color-group:hover { transform: translateY(-3px); }
.color-group.is-active { transform: translateY(-3px); }
.color-group.is-active::after {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: -10px;
  height: 1px;
  background: var(--gold-ink);
  opacity: 0.8;
}

.swatch {
  display: block;
  aspect-ratio: 1 / 1.25;
  width: 100%;
  border: 0;
  padding: 0;
  border-radius: 2px;
  position: relative;
  opacity: 1;
  overflow: hidden;
  transition: transform 0.25s var(--ease-paper), box-shadow 0.25s var(--ease-paper);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.08),
    0 2px 6px rgba(61, 43, 31, 0.14);
}
.color-group:hover .swatch {
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.12),
    0 4px 10px rgba(61, 43, 31, 0.2);
}

/* Tiny Pantone-style label in the lower-left of each swatch */
.swatch-label {
  position: absolute;
  left: 6px;
  bottom: 4px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 8px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(61, 43, 31, 0.7);
  pointer-events: none;
  line-height: 1;
}
.swatch-label.light {
  /* darker swatches need a light label */
  color: rgba(255, 248, 225, 0.75);
}

.palette.is-in .color-group { animation: swatch-in 0.55s var(--ease-paper); }
@keyframes swatch-in {
  from { transform: translateY(12px); }
  to   { transform: translateY(0); }
}
.palette.is-in .color-group:nth-child(1) { animation-delay: 0ms; }
.palette.is-in .color-group:nth-child(2) { animation-delay: 120ms; }
.palette.is-in .color-group:nth-child(3) { animation-delay: 240ms; }
.palette.is-in .color-group:nth-child(4) { animation-delay: 360ms; }

/* Color-name tooltip removed per request */
.swatch::after { content: none; }

/* Palette example carousel — opens when a group is clicked */
.palette-example {
  position: relative;
  max-width: 360px;
  margin: 0 auto 48px;
  padding: 22px 22px 20px;
  background: var(--paper-cream-warm);
  border: 1px solid rgba(61, 43, 31, 0.12);
  border-radius: 4px;
  box-shadow: 0 4px 14px rgba(61, 43, 31, 0.1);
  animation: panel-in 0.35s var(--ease-paper);
}
@keyframes panel-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.palette-example[hidden] { display: none; }
.palette-example-close {
  position: absolute;
  top: 6px;
  right: 10px;
  width: 28px;
  height: 28px;
  font-size: 22px;
  line-height: 1;
  color: var(--ink-brown-soft);
  background: transparent;
  border: 0;
  cursor: pointer;
  z-index: 3;
  transition: color 0.2s;
}
.palette-example-close:hover { color: var(--ink-brown); }

.palette-example-names {
  font-family: var(--font-script);
  font-size: 1.3rem;
  color: var(--ink-brown);
  text-align: center;
  margin-bottom: 14px;
}

.palette-carousel {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  background: var(--paper-cream);
  border: 1px solid rgba(61, 43, 31, 0.12);
  border-radius: 3px;
  overflow: hidden;
}
.pc-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
  touch-action: pan-y;
}
.pc-track img {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}
.pc-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 248, 225, 0.82);
  border: 1px solid rgba(61, 43, 31, 0.15);
  color: var(--ink-brown);
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 2;
  transition: background 0.2s, transform 0.2s;
  padding: 0;
}
.pc-arrow svg { width: 10px; height: 16px; }
.pc-arrow:hover { background: rgba(255, 248, 225, 0.95); }
.pc-arrow:active { transform: translateY(-50%) scale(0.95); }
.pc-arrow[disabled] { opacity: 0.35; cursor: default; }
.pc-prev { left: 8px; }
.pc-next { right: 8px; }

.pc-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
}
.pc-dots button {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(61, 43, 31, 0.25);
  border: 0;
  padding: 0;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.pc-dots button.is-active {
  background: var(--gold-ink);
  transform: scale(1.3);
}

.dress-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 20px;
}
.dress-footer-line {
  flex: 0 1 48px;
  height: 1px;
  background: var(--ink-brown-faint);
}
.dress-footer-text {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 12px;
  color: var(--ink-brown-soft);
  letter-spacing: 0.08em;
  font-variation-settings: "opsz" 18, "SOFT" 100;
}

/* =============================================================
   SCENE 7 — wishes (3-note editorial)
   ============================================================= */
.scene-wishes {
  text-align: center;
  padding-top: 80px;
  padding-bottom: 96px;
  gap: 0;
}
.wish-eyebrow { margin: 0 auto 20px; }
.wish-heading {
  margin: 0 calc(-1 * var(--col-pad)) 44px;
  font-family: "Rosamunda One", "Yeseva One", "Fraunces", Georgia, serif;
  font-weight: 400;
  font-size: clamp(4.6rem, 20vw, 7rem);
  color: var(--ink-brown);
  white-space: nowrap;
}
.wish-heading em {
  font-family: inherit;
  font-style: normal;
  color: var(--ink-brown);
}

/* Couple photo — polaroid-style card between heading and wish notes */
.wish-photo {
  display: block;
  width: 72%;
  max-width: 260px;
  margin: 0 auto 44px;
  padding: 10px 10px 36px;
  background: var(--paper-cream-warm);
  box-shadow:
    0 14px 28px -14px rgba(61, 43, 31, 0.38),
    0 4px 8px -2px rgba(61, 43, 31, 0.18),
    inset 0 0 0 0.5px rgba(61, 43, 31, 0.08);
  transform: rotate(-2deg);
  transition: transform 0.6s var(--ease-paper);
  position: relative;
}
.wish-photo:hover { transform: rotate(0deg); }
.wish-photo::before {
  /* masking-tape at the top */
  content: "";
  position: absolute;
  top: -10px;
  left: 22%;
  width: 62px;
  height: 18px;
  background: rgba(234, 226, 200, 0.85);
  border-left: 1px solid rgba(61, 43, 31, 0.08);
  border-right: 1px solid rgba(61, 43, 31, 0.08);
  transform: rotate(-4deg);
  box-shadow: 0 2px 4px rgba(61, 43, 31, 0.1);
  pointer-events: none;
}
.wish-photo img {
  width: 100%;
  aspect-ratio: 1 / 1.05;
  object-fit: cover;
  display: block;
  filter: sepia(0.08) saturate(0.95) contrast(1.02);
}
.wish-photo figcaption {
  font-family: var(--font-script);
  font-size: 1.2rem;
  color: var(--ink-brown);
  text-align: center;
  margin-top: 10px;
  line-height: 1;
}

.wish-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}
.wish-block {
  position: relative;
  display: grid;
  justify-items: center;
  padding-top: 0;
  opacity: 1;
  width: 100%;
}
.wish-sep {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--envelope-olive);
  opacity: 1;
  margin: 0;
  flex-shrink: 0;
}
.wish-block.is-in {
  animation: gentle-up 0.8s var(--ease-paper);
}
@keyframes gentle-up {
  from { transform: translateY(12px); }
  to   { transform: translateY(0); }
}
@keyframes fade-up {
  from { transform: translateY(10px); }
  to   { transform: translateY(0); }
}

.wish-num {
  font-size: 2.6rem;
  color: var(--gold-ink);
  font-style: italic;
  font-variation-settings: "opsz" 144, "SOFT" 50, "WONK" 0;
  line-height: 1;
  margin-bottom: 12px;
  opacity: 0.85;
}
.wish-icon {
  width: 46px;
  height: 46px;
  margin-bottom: 14px;
}
.wish-title {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.25rem, 3.6vw, 1.6rem);
  color: var(--ink-brown);
  font-variation-settings: "opsz" 100, "SOFT" 80;
  letter-spacing: 0.01em;
  margin: 0 0 14px;
}
.wish-block .body-copy { max-width: 38ch; }

/* Featured wish block — special emphasis card (flower subscription note) */
.wish-block--featured {
  position: relative;
  margin-top: 20px;
  padding: 28px 22px 26px;
  background: linear-gradient(180deg, rgba(107, 122, 79, 0.08) 0%, rgba(107, 122, 79, 0.04) 100%);
  border: 1px solid rgba(107, 122, 79, 0.3);
  border-radius: 8px;
  box-shadow:
    0 2px 10px rgba(61, 43, 31, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.wish-block--featured::before,
.wish-block--featured::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 36px;
  height: 1px;
  background: var(--envelope-olive);
  opacity: 0.45;
  transform: translateX(-50%);
}
.wish-block--featured::before { top: -1px; }
.wish-block--featured::after  { bottom: -1px; }

.wish-feature-icon {
  width: 62px;
  height: 62px;
  margin-bottom: 14px;
}
.wish-block--featured .body-copy {
  text-align: center;
  max-width: 38ch;
  line-height: 1.6;
}
.wish-block--featured .body-copy em {
  font-style: italic;
  color: var(--ink-brown);
  font-weight: 500;
}

/* =============================================================
   SCENE 8 — RSVP (card)
   ============================================================= */
.scene-rsvp {
  padding-top: 40px;
  padding-bottom: 32px;
  position: relative;
}

/* Dashed cut line at top */
.cut-line {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 -8px 44px;
  position: relative;
  color: var(--ink-brown-soft);
}
.cut-line::before,
.cut-line::after {
  content: "";
  flex: 1;
  height: 1px;
  background-image: linear-gradient(90deg,
    currentColor 0%, currentColor 50%, transparent 50%, transparent 100%);
  background-size: 8px 1px;
  background-repeat: repeat-x;
  opacity: 0.5;
}
.cut-scissors {
  font-size: 14px;
  opacity: 0.6;
  transform: translateY(-1px);
}

.rsvp-eyebrow { display: block; text-align: center; margin: 0 auto 18px; }
.rsvp-heading {
  text-align: center;
  margin: 0 calc(-1 * var(--col-pad)) 20px;
  line-height: 1.05;
  font-family: "Rosamunda One", "Yeseva One", "Fraunces", Georgia, serif;
  font-weight: 400;
  font-size: clamp(4rem, 16vw, 5.8rem);
  color: var(--ink-brown);
}
.rsvp-heading em {
  font-family: inherit;
  font-style: normal;
  color: var(--ink-brown);
}
.rsvp-ornament {
  display: block;
  width: 120px;
  height: 16px;
  margin: 0 auto 24px;
}
.rsvp-intro {
  max-width: 34ch;
  margin-bottom: 48px;
  text-align: center;
}

.rsvp-form {
  max-width: 420px;
  width: 100%;
  margin: 0 auto;
}
.field {
  margin-bottom: 40px;
  position: relative;
}
.field > label:not(.checkbox-row),
.label-row {
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  padding-left: 0.22em;
  color: var(--ink-brown-soft);
  margin-bottom: 12px;
}

.field input[type="text"],
.field textarea {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1.5px solid rgba(61, 43, 31, 0.5);
  padding: 8px 0 12px;
  font-family: var(--font-script);
  font-size: 1.7rem;
  color: var(--ink-brown);
  outline: none;
  resize: none;
  line-height: 1.3;
  letter-spacing: 0.01em;
  transition: border-color var(--dur-fast) var(--ease-paper);
}
.field textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  font-style: italic;
}
.field input::placeholder,
.field textarea::placeholder {
  font-family: var(--font-body);
  font-style: italic;
  color: var(--ink-brown-soft);
  opacity: 0.5;
}
.field input:focus,
.field textarea:focus {
  border-color: var(--ink-brown);
}

.field-error {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 12px;
  color: var(--rust-ink);
  margin-top: 6px;
  opacity: 0;
  transition: opacity var(--dur-fast) ease-out;
}
.field.is-error .field-error { opacity: 1; }
.field.is-error input,
.field.is-error textarea { border-color: var(--rust-ink); }

/* ---- attend toggle — two clear cards ---- */
.attend-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 10px;
  align-items: stretch;
  min-height: unset;
  padding: 0;
}
.attend-opt--maybe {
  grid-column: 1 / -1;
  justify-self: center;
  width: min(100%, calc(50% + 5px));
}
.attend-opt {
  position: relative;
  font-family: var(--font-script);
  font-size: clamp(2.4rem, 8vw, 3.4rem);
  color: var(--ink-brown);
  padding: 18px 14px;
  background: var(--paper-cream-warm);
  border: 1.5px solid rgba(61, 43, 31, 0.22);
  border-radius: 4px;
  line-height: 1;
  cursor: pointer;
  transition:
    background var(--dur-fast) var(--ease-paper),
    border-color var(--dur-fast) var(--ease-paper),
    color var(--dur-fast) var(--ease-paper),
    box-shadow var(--dur-fast) var(--ease-paper),
    transform var(--dur-fast) var(--ease-paper);
}
.attend-opt:hover {
  border-color: rgba(61, 43, 31, 0.4);
  background: var(--paper-cream);
}
.attend-opt.is-selected {
  background: var(--envelope-olive);
  border-color: var(--envelope-olive-dark);
  color: var(--paper-cream);
  box-shadow: 0 3px 10px rgba(75, 90, 50, 0.3);
  transform: translateY(-1px);
}
.attend-sep { display: none; }

.attend-underline {
  position: absolute;
  left: 15%;
  right: 15%;
  bottom: 6px;
  width: 70%;
  height: 8px;
  color: var(--paper-cream);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease-out;
}
.attend-opt.is-selected .attend-underline { opacity: 0.7; }
.attend-underline path {
  stroke-dasharray: 160;
  stroke-dashoffset: 160;
  transition: stroke-dashoffset 0.5s ease-in-out 0.1s;
}
.attend-opt.is-selected .attend-underline path { stroke-dashoffset: 0; }

/* ---- checkboxes ---- */
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: 12px 14px;
  color: var(--ink-brown-soft);
  background: var(--paper-cream-warm);
  border: 1.5px solid rgba(61, 43, 31, 0.22);
  border-radius: 4px;
  width: 100%;
  transition:
    background var(--dur-fast) var(--ease-paper),
    border-color var(--dur-fast) var(--ease-paper),
    color var(--dur-fast) var(--ease-paper),
    box-shadow var(--dur-fast) var(--ease-paper);
}
.checkbox-row:hover {
  border-color: rgba(61, 43, 31, 0.4);
  background: var(--paper-cream);
}
.checkbox-row:has(input:checked) {
  background: var(--envelope-olive);
  border-color: var(--envelope-olive-dark);
  color: var(--paper-cream);
  box-shadow: 0 2px 8px rgba(75, 90, 50, 0.25);
}
.checkbox-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
}
.checkbox-row .cb-box {
  width: 20px;
  height: 20px;
  border: 2px solid var(--ink-brown);
  border-radius: 3px;
  background: var(--paper-cream);
  position: relative;
  transition:
    background var(--dur-fast) var(--ease-paper),
    border-color var(--dur-fast) var(--ease-paper);
  flex-shrink: 0;
  order: 2;
  margin-left: auto;
}
.checkbox-row .cb-text { order: 1; flex: 1; min-width: 0; }
.checkbox-row input:checked + .cb-box {
  background: var(--paper-cream);
  border-color: var(--paper-cream);
}
/* Checkmark positioned precisely inside the box, never overlaps the label */
.checkbox-row input:checked + .cb-box::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 6px;
  height: 11px;
  border: solid var(--envelope-olive-dark);
  border-width: 0 2.2px 2.2px 0;
  transform: rotate(45deg);
}
.checkbox-row input:focus-visible + .cb-box {
  box-shadow: 0 0 0 2px var(--gold-ink);
}
.cb-text { flex: 1; min-width: 0; }

.plus-one-name {
  margin-top: 22px;
  overflow: hidden;
  max-height: 100px;
  transition: max-height 0.35s var(--ease-paper), opacity 0.35s ease-out;
}
.plus-one-name[hidden] {
  display: block !important;
  max-height: 0;
  opacity: 0;
  margin-top: 0;
}
.plus-one-name label {
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  padding-left: 0.22em;
  color: var(--ink-brown-soft);
  margin-bottom: 12px;
}

.rsvp-form.is-not-attending [data-hide-if-not-attending] {
  max-height: 0;
  opacity: 0;
  margin: 0;
  overflow: hidden;
  transition: max-height 0.4s var(--ease-paper), opacity 0.4s ease-out, margin 0.4s var(--ease-paper);
  pointer-events: none;
}
[data-hide-if-not-attending] {
  max-height: 300px;
  overflow: visible;
  transition: max-height 0.4s var(--ease-paper), opacity 0.4s ease-out, margin 0.4s var(--ease-paper);
}

/* ---- submit (real wax seal image) ---- */
.rsvp-submit {
  display: grid;
  place-items: center;
  margin: 56px auto 0;
  width: 120px;
  height: 120px;
  position: relative;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-paper), filter var(--dur-fast) var(--ease-paper);
  filter: drop-shadow(0 4px 10px rgba(80, 40, 20, 0.35));
}
.rsvp-submit-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}
.rsvp-submit-text {
  position: relative;
  font-family: var(--font-script);
  font-size: 1.25rem;
  color: #F2E4C8;
  z-index: 2;
  letter-spacing: 0.02em;
  line-height: 1;
  text-shadow:
    0 1px 2px rgba(70, 30, 15, 0.6),
    0 0 4px rgba(255, 225, 180, 0.15);
  pointer-events: none;
}
.rsvp-submit:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 6px 16px rgba(168, 95, 55, 0.55));
}
.rsvp-submit:active { transform: translateY(1px) scale(0.99); }
.rsvp-submit:focus-visible {
  outline: none;
  filter:
    drop-shadow(0 0 0 2px rgba(139, 111, 61, 0.55))
    drop-shadow(0 4px 10px rgba(80, 40, 20, 0.35));
}

/* ---- thanks ---- */
.rsvp-thanks {
  text-align: center;
  padding-top: 24px;
}
.rsvp-thanks .thanks-heart {
  width: 48px;
  height: 44px;
  margin: 0 auto 20px;
  color: var(--envelope-olive);
  fill: currentColor;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.15));
}
.thanks-script {
  font-family: "Rosamunda One", "Yeseva One", "Fraunces", Georgia, serif;
  font-weight: 400;
  font-size: clamp(2.4rem, 8vw, 3.2rem);
  color: var(--ink-brown);
  margin-bottom: 24px;
  letter-spacing: 0.005em;
}
.delivered-envelope {
  margin: 56px auto 0;
  width: 128px;
  height: 84px;
  position: relative;
  background: linear-gradient(180deg, var(--envelope-olive) 0%, var(--envelope-olive-dark) 100%);
  border-radius: 2px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}
.de-flap {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 60%;
  background: linear-gradient(180deg, var(--envelope-olive-tint) 0%, var(--envelope-olive-dark) 100%);
  clip-path: polygon(0 0, 50% 100%, 100% 0);
}
.de-stamp {
  position: absolute;
  top: 12px;
  right: 10px;
  transform: rotate(-8deg);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 8px;
  letter-spacing: 0.14em;
  color: var(--envelope-olive-deep);
  opacity: 0.8;
  border: 1px solid currentColor;
  padding: 3px 6px;
  border-radius: 1px;
  background: rgba(244, 237, 220, 0.35);
}

/* ---- footer ---- */
.letter-footer {
  text-align: center;
  padding: 20px 28px 48px;
  font-family: var(--font-body);
  font-style: italic;
  font-weight: 300;
  font-size: 13px;
  color: var(--ink-brown-soft);
  opacity: 0.55;
  letter-spacing: 0.05em;
}

/* =============================================================
   Accessibility
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .envelope, .envelope::after { animation: none !important; }
  .hero-photo img { transform: none !important; }
  .hero-names {
    clip-path: none !important;
    -webkit-clip-path: none !important;
  }
  .scroll-hint, .heart-string { animation: none !important; }
}

/* Remove harsh default focus rings — each interactive element handles its own focus style. */
a:focus-visible { outline: 2px solid var(--gold-ink); outline-offset: 3px; border-radius: 2px; }
button:focus-visible,
input:focus-visible,
textarea:focus-visible { outline: none; }
