/* ==========================================================================
   Inkvow — wedding invitation website
   Version 1.0.0

   TABLE OF CONTENTS
   1.  Fonts
   2.  Colour tokens (light + dark)
   3.  Base & typography
   4.  Utilities (container, buttons, focus, skip link)
   5.  Header & navigation
   6.  Hero: the envelope
   7.  Invitation card & countdown
   8.  Our story
   9.  The day (schedule)
   10. Travel & stays (map)
   11. Dress code
   12. Gallery & lightbox
   13. Registry
   14. FAQ
   15. RSVP reply card
   16. Footer
   17. Reduced motion & print
   ========================================================================== */

/* 1. FONTS ----------------------------------------------------------------
   Bodoni Moda (display) and Instrument Sans (text), both SIL OFL 1.1.
   Files live in assets/fonts. */
@font-face { font-family: "Bodoni Moda"; src: url("../fonts/bodoni-moda-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Bodoni Moda"; src: url("../fonts/bodoni-moda-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Bodoni Moda"; src: url("../fonts/bodoni-moda-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("../fonts/instrument-sans-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("../fonts/instrument-sans-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("../fonts/instrument-sans-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }

/* 2. COLOUR TOKENS --------------------------------------------------------
   Change the palette here. --ink is the brand colour (cobalt), --lemon the
   highlight, --leaf the secondary accent. */
:root {
  --ink:        #1E2F6B;  /* cobalt ink: hero, headings */
  --ink-deep:   #142152;
  --sky:        #8FA9E0;  /* majolica blue: tile pattern, lines */
  --lemon:      #F3C641;  /* lemon peel: highlights, buttons on ink */
  --leaf:       #4F6B3A;  /* lemon leaf: seal, success */
  --paper:      #F5F7FC;  /* cool tile white: page */
  --card:       #FFFFFF;
  --text:       #1B2140;
  --muted:      #555E80;
  --line:       #D5DCEE;
  --error:      #B42318;
  --on-ink:     #F5F7FC;

  --font-display: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --font-text:    "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius-s: 6px;
  --radius-l: 18px;
  --shadow-card: 0 1px 0 rgba(20,33,82,.06), 0 18px 40px -22px rgba(20,33,82,.45);
  --measure: 38rem;
  --header-h: 60px;
  color-scheme: light;
}

/* Dark mode: follows the device unless the visitor picks with the toggle */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #9DB3EE; --ink-deep: #0C1430; --sky: #3F5596; --lemon: #F3C641; --leaf: #8DB06E;
    --paper: #10183A; --card: #18224A; --text: #E9EDF8; --muted: #A6B0D2; --line: #2D3A6B;
    --error: #FF8A7A; --on-ink: #F5F7FC;
    --shadow-card: 0 18px 40px -24px rgba(0,0,0,.7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #9DB3EE; --ink-deep: #0C1430; --sky: #3F5596; --lemon: #F3C641; --leaf: #8DB06E;
  --paper: #10183A; --card: #18224A; --text: #E9EDF8; --muted: #A6B0D2; --line: #2D3A6B;
  --error: #FF8A7A; --on-ink: #F5F7FC;
  --shadow-card: 0 18px 40px -24px rgba(0,0,0,.7);
  color-scheme: dark;
}

/* 3. BASE & TYPOGRAPHY ---------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--text);
  font: 400 1.0625rem/1.65 var(--font-text);
  overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.1; margin: 0 0 .5em; color: var(--ink); letter-spacing: -.01em; }
h2 { font-size: clamp(2.1rem, 1.4rem + 3vw, 3.4rem); }
h3 { font-size: 1.45rem; }
p { margin: 0 0 1em; max-width: var(--measure); }
a { color: inherit; text-decoration-color: var(--sky); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: currentColor; }
.lede { font-size: 1.2rem; color: var(--muted); }
.serif-it { font-family: var(--font-display); font-style: italic; }

/* 4. UTILITIES ------------------------------------------------------------ */
.wrap { width: min(100% - 2.5rem, 68rem); margin-inline: auto; }
.section { padding-block: clamp(4rem, 9vw, 7.5rem); }
.section + .section { border-top: 1px solid var(--line); }
.section-head { margin-bottom: 2.5rem; }
.section-head p { color: var(--muted); }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

:focus-visible { outline: 3px solid var(--lemon); outline-offset: 3px; border-radius: 4px; }
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--lemon); color: #1B2140; padding: .6rem 1rem; border-radius: var(--radius-s); font-weight: 600; }
.skip-link:focus { top: 1rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 46px; padding: .7rem 1.4rem; border-radius: 999px; border: 1.5px solid var(--ink);
  background: var(--ink); color: var(--paper); font: 600 1rem/1 var(--font-text);
  text-decoration: none; cursor: pointer; transition: background-color .2s, color .2s, transform .2s;
}
.btn:hover { background: transparent; color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-lemon { background: var(--lemon); border-color: var(--lemon); color: #1B2140; }
.btn-lemon:hover { background: transparent; color: var(--lemon); }
.btn svg { width: 18px; height: 18px; flex: none; }

/* 5. HEADER & NAVIGATION -------------------------------------------------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--header-h);
  display: flex; align-items: center;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  transform: translateY(-100%); transition: transform .35s ease;
}
.site-header.is-visible { transform: none; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.monogram { font-family: var(--font-display); font-style: italic; font-size: 1.5rem; color: var(--ink); text-decoration: none; }
.nav-list { display: flex; gap: 1.4rem; list-style: none; margin: 0; padding: 0; }
.nav-list a { text-decoration: none; font-weight: 500; font-size: .95rem; padding-block: .3rem; border-bottom: 1.5px solid transparent; }
.nav-list a:hover, .nav-list a[aria-current="true"] { border-color: var(--lemon); }
.header-tools { display: flex; align-items: center; gap: .5rem; }
.icon-btn {
  width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer;
}
.icon-btn svg { width: 20px; height: 20px; }
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }
.nav-toggle { display: none; }

@media (max-width: 860px) {
  .nav-toggle { display: grid; }
  .site-nav {
    position: fixed; inset: var(--header-h) 0 auto; background: var(--paper);
    border-bottom: 1px solid var(--line); padding: 1rem 1.25rem 1.5rem;
    display: none;
  }
  .site-nav.is-open { display: block; }
  .nav-list { flex-direction: column; gap: .25rem; }
  .nav-list a { display: block; padding: .7rem 0; font-size: 1.1rem; }
}

/* 6. HERO: THE ENVELOPE ---------------------------------------------------
   The signature moment. A cobalt field edged with a majolica tile band;
   the envelope opens on click and the invitation card rises out. */
.hero {
  position: relative; min-height: 100svh; display: grid; place-items: center;
  background: var(--ink-deep); color: var(--on-ink); padding: 5rem 1.25rem 4rem; overflow: hidden;
  isolation: isolate;
}
:root:not([data-theme="dark"]) .hero { background: #1E2F6B; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hero { background: var(--ink-deep); } }
/* Tile band: an inline SVG pattern repeated along the top and bottom edges */
.hero::before, .hero::after {
  content: ""; position: absolute; left: 0; right: 0; height: 56px; z-index: -1; opacity: .9;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cg fill='none' stroke='%238FA9E0' stroke-width='1.4'%3E%3Cpath d='M28 4 L52 28 L28 52 L4 28Z'/%3E%3Ccircle cx='28' cy='28' r='9'/%3E%3Cpath d='M28 19 Q34 28 28 37 Q22 28 28 19Z' fill='%23F3C641' stroke='none'/%3E%3Cpath d='M0 0 Q14 14 0 28 M56 0 Q42 14 56 28 M0 56 Q14 42 0 28 M56 56 Q42 42 56 28'/%3E%3C/g%3E%3C/svg%3E") repeat-x;
}
.hero::before { top: 0; }
.hero::after { bottom: 0; transform: scaleY(-1); }

.hero-inner { display: grid; justify-items: center; gap: 2rem; text-align: center; width: 100%; }
.hero-kicker { font-family: var(--font-display); font-style: italic; font-size: clamp(1.1rem, 1rem + .6vw, 1.4rem); color: var(--sky); margin: 0; max-width: none; }
:root[data-theme="dark"] .hero-kicker { color: #B9C8F0; }

.envelope {
  --w: min(86vw, 460px);
  position: relative; width: var(--w); aspect-ratio: 1.45; perspective: 1400px;
  margin-top: calc(var(--w) * .34); /* room for the card to rise */
  transform: translateY(calc(var(--w) * -.17)); /* sits centred while closed */
  transition: transform .9s cubic-bezier(.2,.8,.2,1) .4s;
}
.envelope.is-open { transform: none; }
.env-back, .env-front, .env-flap { position: absolute; inset: 0; border-radius: 6px; }
.env-back { background: #E6ECF8; }
/* The invitation card that slides up */
.env-card {
  position: absolute; left: 6%; right: 6%; top: 6%; bottom: 6%;
  background: #FFFFFF; color: #1B2140; border-radius: 4px; padding: 7% 8%;
  display: grid; align-content: center; justify-items: center; gap: .3rem;
  box-shadow: 0 10px 30px -12px rgba(0,0,0,.35);
  transform: translateY(0); transition: transform 1s cubic-bezier(.2,.8,.2,1) .55s;
  z-index: 1;
}
.env-card::before { /* thin cobalt border inset, like a printed card */
  content: ""; position: absolute; inset: 8px; border: 1px solid #8FA9E0; border-radius: 2px; pointer-events: none;
}
.env-card .names { font-family: var(--font-display); font-style: italic; font-size: clamp(1.7rem, 1.1rem + 3vw, 2.7rem); line-height: 1; color: #1E2F6B; margin: 0; }
.env-card .amp { display: block; font-size: .55em; color: #4F6B3A; margin: .15em 0; }
.env-card .date { font-size: .82rem; letter-spacing: .04em; color: #555E80; margin: .5rem 0 0; }
.env-front {
  z-index: 2; background: #DCE4F5;
  clip-path: polygon(0 0, 50% 54%, 100% 0, 100% 100%, 0 100%);
  box-shadow: inset 0 -1px 0 rgba(0,0,0,.05);
}
.env-front::after { /* side folds */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top right, #D2DBF0 49.6%, transparent 50%) left / 50% 100% no-repeat,
              linear-gradient(to top left,  #D2DBF0 49.6%, transparent 50%) right / 50% 100% no-repeat;
}
.env-flap {
  z-index: 3; height: 60%; background: #C9D4EE; transform-origin: top center;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transition: transform .7s cubic-bezier(.5,0,.3,1), z-index 0s .35s;
}
.seal {
  position: absolute; z-index: 4; left: 50%; top: 60%; width: 76px; height: 76px; transform: translate(-50%, -50%);
  border: 0; padding: 0; border-radius: 50%; cursor: pointer; background: var(--leaf);
  background: radial-gradient(circle at 35% 30%, #6F8F55, #3E5A2C 70%);
  color: #F5F7FC; font: italic 1.45rem/1 var(--font-display);
  box-shadow: 0 0 0 5px rgba(79,107,58,.35), 0 8px 18px -6px rgba(0,0,0,.6);
  transition: transform .35s ease, opacity .35s ease;
}
.seal:hover { transform: translate(-50%, -50%) scale(1.06); }
.seal span { display: block; }

/* Opened state */
.envelope.is-open .seal { opacity: 0; transform: translate(-50%, -50%) scale(.6); pointer-events: none; }
.envelope.is-open .env-flap { transform: rotateX(180deg); z-index: 0; }
.envelope.is-open .env-card { transform: translateY(-58%); }

.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; min-height: 46px; }
.hero .btn-ghost { color: var(--on-ink); border-color: rgba(245,247,252,.5); }
.hero .btn-ghost:hover { background: var(--on-ink); color: #1E2F6B; }
.open-hint { color: #C8D3F2; font-size: .95rem; margin: 0; max-width: none; }
.hero[data-state="open"] .open-hint { visibility: hidden; }

/* 7. INVITATION CARD & COUNTDOWN ----------------------------------------- */
.invite { text-align: center; }
.invite .wrap { display: grid; justify-items: center; }
.invite-to { font-family: var(--font-display); font-style: italic; font-size: 1.25rem; color: var(--muted); margin: 0 0 1.5rem; max-width: none; }
.invite-text { font-size: 1.15rem; max-width: 32rem; margin-inline: auto; }
.invite-names { font-family: var(--font-display); font-weight: 400; font-size: clamp(2.8rem, 1.6rem + 6vw, 6rem); line-height: .95; color: var(--ink); margin: .6rem 0 1.4rem; }
.invite-names em { display: block; font-size: .42em; font-style: italic; color: var(--leaf); margin: .3em 0; }
.invite-when { display: grid; gap: .2rem; margin: 1rem 0 2rem; }
.invite-when strong { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.2rem); color: var(--ink); }
.invite-when span { color: var(--muted); }

.countdown { display: flex; justify-content: center; gap: clamp(.75rem, 3vw, 2.5rem); margin: 0 0 2rem; padding: 0; list-style: none; }
.countdown li { display: grid; min-width: 4.2rem; }
.countdown b { font-family: var(--font-display); font-weight: 400; font-size: clamp(2.2rem, 1.6rem + 3vw, 3.6rem); line-height: 1; color: var(--ink); font-variant-numeric: lining-nums tabular-nums; }
.countdown small { color: var(--muted); font-size: .9rem; }
.countdown-done { font-family: var(--font-display); font-style: italic; font-size: 1.6rem; color: var(--leaf); }
.invite-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; }

/* 8. OUR STORY ------------------------------------------------------------ */
.story-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.story-art { position: sticky; top: calc(var(--header-h) + 2rem); }
.story-art svg { width: 100%; height: auto; }
.moments { list-style: none; margin: 0; padding: 0; border-left: 1.5px solid var(--sky); }
.moments li { position: relative; padding: 0 0 2.4rem 2rem; }
.moments li:last-child { padding-bottom: 0; }
.moments li::before { content: ""; position: absolute; left: -7px; top: .55rem; width: 12px; height: 12px; border-radius: 50%; background: var(--lemon); box-shadow: 0 0 0 4px var(--paper); }
.moments time { font-family: var(--font-display); font-style: italic; font-size: 1.15rem; color: var(--leaf); }
.moments h3 { margin: .1rem 0 .4rem; }
.moments p { color: var(--muted); }
@media (max-width: 760px) { .story-grid { grid-template-columns: 1fr; } .story-art { position: static; max-width: 340px; } }

/* 9. THE DAY (SCHEDULE) ---------------------------------------------------
   A real sequence, so times are set large as the structure. */
.schedule { list-style: none; margin: 0; padding: 0; display: grid; }
.schedule li { display: grid; grid-template-columns: 10rem 1fr; gap: 1.5rem; padding: 1.4rem 0; border-top: 1px solid var(--line); align-items: baseline; }
.schedule li:last-child { border-bottom: 1px solid var(--line); }
/* time: "3:30 <small>pm</small>" */
.schedule time { white-space: nowrap; font-family: var(--font-display); font-size: clamp(1.8rem, 1.4rem + 1.6vw, 2.6rem); line-height: 1; color: var(--ink); font-variant-numeric: lining-nums; }
.schedule time small { font-size: .5em; margin-left: .15em; color: var(--muted); }
.schedule h3 { margin: 0 0 .2rem; font-size: 1.35rem; }
.schedule p { margin: 0; color: var(--muted); }
.schedule .where { display: inline-block; margin-top: .4rem; font-size: .92rem; color: var(--leaf); font-weight: 500; }
@media (max-width: 560px) { .schedule li { grid-template-columns: 1fr; gap: .4rem; } }

/* 10. TRAVEL & STAYS ------------------------------------------------------ */
.travel-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.map-card { margin: 0; background: var(--card); border-radius: var(--radius-l); padding: 1rem; box-shadow: var(--shadow-card); }
.map-card svg { width: 100%; height: auto; border-radius: 10px; }
.map-card figcaption { padding: .8rem .4rem .2rem; font-size: .95rem; color: var(--muted); }
.map-legend { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; list-style: none; margin: .4rem 0 0; padding: 0 .4rem; font-size: .9rem; }
.map-legend li { display: flex; align-items: center; gap: .45rem; }
.map-legend i { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.address { font-style: normal; margin: 0 0 1.5rem; }
.address strong { font-family: var(--font-display); font-weight: 400; font-size: 1.5rem; color: var(--ink); display: block; }
.travel-block { margin-bottom: 2rem; }
.travel-block h3 { margin-bottom: .6rem; }
.stays { list-style: none; margin: 0; padding: 0; }
.stays li { padding: .9rem 0; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.stays li:last-child { border-bottom: 1px solid var(--line); }
.stays b { font-weight: 600; }
.stays span { color: var(--muted); font-size: .95rem; }
@media (max-width: 820px) { .travel-grid { grid-template-columns: 1fr; } }

/* 11. DRESS CODE ---------------------------------------------------------- */
.dress { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.swatches { display: flex; flex-wrap: wrap; gap: 1rem; list-style: none; margin: 1.5rem 0 0; padding: 0; }
.swatches li { display: grid; justify-items: center; gap: .4rem; font-size: .88rem; color: var(--muted); }
.swatches i { width: 64px; height: 64px; border-radius: 50%; display: block; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.dress-art svg { width: 100%; max-width: 380px; margin-inline: auto; height: auto; }
@media (max-width: 760px) { .dress { grid-template-columns: 1fr; } }

/* 12. GALLERY & LIGHTBOX -------------------------------------------------- */
.gallery { display: grid; grid-template-columns: repeat(6, 1fr); gap: .9rem; list-style: none; margin: 0; padding: 0; }
.gallery li:nth-child(1) { grid-column: span 3; grid-row: span 2; }
.gallery li:nth-child(2), .gallery li:nth-child(3) { grid-column: span 3; }
.gallery li:nth-child(n+4) { grid-column: span 2; }
.gallery button { display: block; width: 100%; height: 100%; padding: 0; border: 0; border-radius: var(--radius-s); overflow: hidden; cursor: zoom-in; background: var(--card); }
.gallery svg, .gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.gallery button:hover svg, .gallery button:hover img { transform: scale(1.03); }
@media (max-width: 640px) {
  .gallery { grid-template-columns: 1fr 1fr; }
  .gallery li:nth-child(n) { grid-column: span 1; grid-row: auto; }
  .gallery li:nth-child(1), .gallery li:last-child { grid-column: span 2; }
}
.lightbox { border: 0; padding: 0; background: transparent; max-width: min(92vw, 1000px); width: 100%; color: var(--on-ink); }
.lightbox::backdrop { background: rgba(10,16,40,.88); }
.lightbox figure { margin: 0; }
.lightbox-media svg, .lightbox-media img { width: 100%; height: auto; max-height: 76vh; object-fit: contain; border-radius: 8px; background: #fff; }
.lightbox figcaption { text-align: center; margin-top: .8rem; font-family: var(--font-display); font-style: italic; font-size: 1.2rem; }
.lightbox-bar { display: flex; justify-content: space-between; align-items: center; margin-top: .8rem; }
.lightbox .icon-btn { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.3); }

/* 13. REGISTRY ------------------------------------------------------------ */
.registry { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2rem 4rem; align-items: end; }
.registry-links { display: flex; flex-wrap: wrap; gap: .75rem; }
@media (max-width: 760px) { .registry { grid-template-columns: 1fr; } }

/* 14. FAQ ----------------------------------------------------------------- */
.faq { max-width: 46rem; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 1.2rem 2.5rem 1.2rem 0; position: relative;
  font-family: var(--font-display); font-size: 1.3rem; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: .3rem; top: 50%; transform: translateY(-50%); font: 400 1.6rem/1 var(--font-text); color: var(--leaf); transition: transform .25s; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { color: var(--muted); padding-bottom: 1rem; }

/* 15. RSVP REPLY CARD -----------------------------------------------------
   Styled as the small reply card from a printed suite, with a perforated
   stamp in the corner. */
.rsvp { background: var(--ink-deep); color: var(--on-ink); }
:root:not([data-theme="dark"]) .rsvp { background: #1E2F6B; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .rsvp { background: var(--ink-deep); } }
.rsvp .section-head h2 { color: var(--on-ink); }
.rsvp .section-head p { color: #C8D3F2; }
.rsvp-layout { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (max-width: 860px) { .rsvp-layout { grid-template-columns: 1fr; } }

.reply-card {
  position: relative; background: var(--card); color: var(--text); border-radius: 4px;
  padding: clamp(1.5rem, 4vw, 2.75rem); box-shadow: 0 30px 60px -30px rgba(0,0,0,.6);
}
.reply-card::before { content: ""; position: absolute; inset: 10px; border: 1px solid var(--line); pointer-events: none; }
.stamp {
  position: absolute; top: -18px; right: 22px; width: 70px; height: 90px; padding: 6px;
  background: #DCE4F5;
  /* Perforated edge: solid centre + a grid of holes that only shows in the padding */
  -webkit-mask: linear-gradient(#000 0 0) content-box, radial-gradient(circle 3.5px at 5px 5px, transparent 95%, #000) -5px -5px / 10px 10px;
          mask: linear-gradient(#000 0 0) content-box, radial-gradient(circle 3.5px at 5px 5px, transparent 95%, #000) -5px -5px / 10px 10px;
  transform: rotate(4deg); filter: drop-shadow(0 4px 6px rgba(0,0,0,.25));
}
.stamp svg { width: 100%; height: 100%; }
.reply-card h3 { font-size: 1.9rem; margin-bottom: .3rem; padding-right: 80px; }
.reply-card .by { color: var(--muted); margin-bottom: 1.6rem; }

.field { display: grid; gap: .35rem; margin-bottom: 1.1rem; }
.field label, .field legend { font-weight: 600; font-size: .95rem; }
.field .hint { font-size: .85rem; color: var(--muted); font-weight: 400; }
.field input[type="text"], .field input[type="email"], .field select, .field textarea {
  width: 100%; min-height: 46px; padding: .7rem .85rem; border-radius: var(--radius-s);
  border: 1.5px solid var(--line); background: var(--paper); color: var(--text); font: inherit; font-size: 1rem;
}
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--lemon) 70%, transparent); }
.field [aria-invalid="true"] { border-color: var(--error); }
.field .error { color: var(--error); font-size: .88rem; min-height: 0; margin: 0; }
.field .error:empty { display: none; }
fieldset.field { border: 0; padding: 0; margin: 0 0 1.1rem; min-width: 0; }
.choice-row { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-top: .35rem; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.choice span {
  display: flex; align-items: center; justify-content: center; text-align: center; min-height: 52px; padding: .6rem;
  border: 1.5px solid var(--line); border-radius: var(--radius-s); font-family: var(--font-display); font-style: italic; font-size: 1.1rem;
}
.choice input:checked + span { border-color: var(--ink); background: color-mix(in srgb, var(--lemon) 35%, var(--card)); }
.choice input:focus-visible + span { outline: 3px solid var(--lemon); outline-offset: 2px; }

.party-size { display: flex; align-items: center; gap: .6rem; }
.party-size output { min-width: 2ch; text-align: center; font: 400 1.6rem/1 var(--font-display); }
.party-size .icon-btn { background: var(--paper); }
.party-size .icon-btn:disabled { opacity: .4; cursor: not-allowed; }
.guest-row { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; padding: .8rem 0; border-top: 1px dashed var(--line); }
.guest-row .field { margin: 0; }
@media (max-width: 480px) { .guest-row, .choice-row { grid-template-columns: 1fr; } }
[hidden] { display: none !important; }

.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-top: 1.4rem; }
.form-note { font-size: .88rem; color: var(--muted); margin: 0; }
.form-status { margin-top: 1rem; padding: .9rem 1rem; border-radius: var(--radius-s); font-weight: 500; }
.form-status:empty { display: none; }
.form-status.is-error { background: color-mix(in srgb, var(--error) 12%, var(--card)); color: var(--error); }

.reply-done { text-align: center; padding: 1rem 0; }
.reply-done svg { width: 72px; height: 72px; margin: 0 auto 1rem; color: var(--leaf); }
.reply-done h3 { padding: 0; }
.rsvp-aside p { color: #C8D3F2; }
.rsvp-aside .deadline { font-family: var(--font-display); font-style: italic; font-size: 1.6rem; color: var(--lemon); margin-bottom: .5rem; }

/* 16. FOOTER -------------------------------------------------------------- */
.site-footer { padding: 3.5rem 0; text-align: center; color: var(--muted); }
.site-footer .monogram { font-size: 2.2rem; display: inline-block; margin-bottom: .6rem; }
.site-footer p { margin-inline: auto; }

/* 17. REDUCED MOTION & PRINT --------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; transition-delay: 0s !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
@media print {
  .site-header, .hero, .rsvp, .gallery, .lightbox { display: none !important; }
  body { background: #fff; color: #000; }
}

/* Small phones (320px): keep the invitation block inside the screen */
.invite .wrap > * { max-width: 100%; }
.invite-names { overflow-wrap: break-word; }
@media (max-width: 380px) {
  .countdown { gap: .5rem; }
  .countdown li { min-width: 3.4rem; }
}
