/* ============================================================
   Hannah & Covie — implemented from Wedding.dc.html (claude.ai/design)
   Ink-dark editorial layout · Bodoni Moda + Archivo
   Palette: ink #0a0a0a · ivory #f4f2ee · paper #f2f0ec · coral #F15C61
   ============================================================ */

:root {
  --edge: 24px;                      /* viewport edge → panel */
  --pad: clamp(32px, 5vw, 84px);     /* panel edge → its content */
}

html { background: #0a0a0a; scroll-behavior: smooth; }
body {
  margin: 0; background: #0a0a0a; color: #f4f2ee;
  font-family: 'Archivo', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
* { box-sizing: border-box; }
a { color: inherit; text-decoration: none; border-bottom: 1px solid currentColor; transition: opacity .3s ease; }
a:hover { opacity: .55; }
::selection { background: #f4f2ee; color: #0a0a0a; }
input, textarea, select, button { font-family: inherit; font-size: inherit; color: inherit; }
input::placeholder, textarea::placeholder { color: rgba(10, 10, 10, .32); }
input:focus, textarea:focus, select:focus { outline: none; border-bottom-color: #0a0a0a !important; }
.it { font-style: italic; }

/* ——— Keyframes ——— */
@keyframes introUp { from { transform: translateY(0); } to { transform: translateY(-101%); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: translateY(0); } }
@keyframes tailWag { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(-16deg); } }
@keyframes tailFlick { 0%, 100% { transform: rotate(0deg); } 25% { transform: rotate(-30deg); } 60% { transform: rotate(10deg); } }
@keyframes headTilt { 0%, 24%, 100% { transform: rotate(0deg); } 30%, 38% { transform: rotate(-13deg); } 46% { transform: rotate(0deg); } 68%, 76% { transform: rotate(10deg); } 84% { transform: rotate(0deg); } }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.1); } }
@keyframes catHop { 0%, 100% { transform: translateY(0); } 35% { transform: translateY(-7px); } 70% { transform: translateY(0); } }
@keyframes pawTap { 0% { transform: rotate(-14deg) scale(1); } 40% { transform: rotate(-8deg) scale(.72); } 100% { transform: rotate(-14deg) scale(1); } }
@keyframes pawStamp { 0% { opacity: .85; transform: scale(.86); } 100% { opacity: 0; transform: scale(1.1); } }
@keyframes shakeField { 0%, 100% { transform: translateX(0); } 15% { transform: translateX(-7px); } 35% { transform: translateX(6px); } 55% { transform: translateX(-4px); } 75% { transform: translateX(3px); } }
@keyframes faqOpen { from { opacity: 0; transform: translateY(-8px); clip-path: inset(0 0 100% 0); } to { opacity: 1; transform: translateY(0); clip-path: inset(0 0 0 0); } }
@keyframes inkTick { 0% { clip-path: inset(0 100% 0 0); } 100% { clip-path: inset(0 0 0 0); } }
@keyframes boxPress { 0% { transform: scale(1); } 35% { transform: scale(.82) rotate(-4deg); } 70% { transform: scale(1.12) rotate(2deg); } 100% { transform: scale(1); } }
@keyframes boxRipple { 0% { opacity: .5; transform: scale(1); } 100% { opacity: 0; transform: scale(2.4); } }
@keyframes drive { 0% { transform: translateX(0) skewX(0); } 30% { transform: translateX(26px) skewX(-14deg); opacity: .25; } 31% { transform: translateX(-26px) skewX(-14deg); opacity: 0; } 60% { opacity: 1; } 100% { transform: translateX(0) skewX(0); } }
@keyframes carpool { 0%, 100% { transform: translateY(0) rotate(0); } 20% { transform: translateY(-4px) rotate(-1.5deg); } 45% { transform: translateY(1px) rotate(1deg); } 70% { transform: translateY(-2px) rotate(-.6deg); } }
@keyframes wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-2.5deg); } 60% { transform: rotate(2deg); } }
@keyframes cheers { 0%, 100% { transform: rotate(0) translateY(0); } 30% { transform: rotate(-7deg) translateY(-3px); } 55% { transform: rotate(6deg) translateY(-3px); } 80% { transform: rotate(-2deg) translateY(0); } }
@keyframes feast { 0%, 100% { transform: scale(1); } 35% { transform: scale(1.09); } 65% { transform: scale(.98); } }
/* two beats, like the heart beside it */
@keyframes vow { 0%, 100% { transform: scale(1); } 18% { transform: scale(1.09); } 38% { transform: scale(1); } 56% { transform: scale(1.05); } 76% { transform: scale(1); } }
@keyframes sunrise { 0% { transform: translateY(7px); opacity: .35; } 100% { transform: translateY(0); opacity: 1; } }
@keyframes nod { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-5px); } 70% { transform: translateY(1px); } }
@keyframes rowSlide { 0% { transform: translateX(0); } 40% { transform: translateX(5px); } 100% { transform: translateX(0); } }
@keyframes dotDrop { 0% { transform: scale(0) translateY(-6px); } 55% { transform: scale(1.35) translateY(0); } 100% { transform: scale(1); } }
@keyframes heartPop { 0% { opacity: 0; transform: translateY(0) scale(.4); } 22% { opacity: 1; transform: translateY(-14px) scale(1.08); } 100% { opacity: 0; transform: translateY(-52px) scale(.92); } }
/* The rehearsal dinner being unlocked: the row brushes in from the left… */
@keyframes unlockRow {
  0% { opacity: 0; transform: translateY(-7px); clip-path: inset(0 100% 0 0); }
  55% { opacity: 1; clip-path: inset(0 0 0 0); }
  100% { opacity: 1; transform: translateY(0); clip-path: inset(0 0 0 0); }
}
/* …and its box springs open a beat later. */
@keyframes unlockBox {
  0%, 22% { transform: scale(.35) rotate(-24deg); border-color: #F15C61; }
  55% { transform: scale(1.22) rotate(5deg); border-color: #F15C61; }
  75% { transform: scale(.96) rotate(-1deg); }
  100% { transform: scale(1) rotate(0); }
}

/* ——— Fixed background layers ——— */
#bg-splash {
  position: fixed; inset: 0;
  background-image: url('../img/splash.png');
  background-size: cover; background-position: center 42%;
  z-index: 0; will-change: transform;
}
#bg-story {
  position: fixed; inset: 0;
  /* Web-sized from story-color.png (4320px, 10.7MB) — see README. */
  background-image: url('../img/story-color.jpg');
  background-size: cover; background-position: center;
  z-index: 1; opacity: 0;
  transition: opacity 1.1s cubic-bezier(.4, 0, .2, 1);
}
/* The same photograph, held permanently grey, fading in over the colour one as
   the writing scrolls up. Animating a grayscale() on the layer itself meant a
   full-screen filter re-rendering on every scroll frame, which the glass
   panel's backdrop-filter then had to re-blur — that was the shimmer. This
   surface is painted once; only its opacity moves, which the compositor
   handles on its own. */
#bg-story-grey {
  position: absolute; inset: 0;
  background-image: url('../img/story-color.jpg');
  background-size: cover; background-position: center;
  filter: grayscale(1); opacity: 0;
  /* eases, so scrolling quickly past still reads as a fade */
  transition: opacity .55s ease-out;
}
#bg-dim { position: fixed; inset: 0; background: #000; opacity: .1; z-index: 2; pointer-events: none; }

/* ——— Progressive blur bands ——— */
/* Its own compositing layer: without one, Chromium re-samples the band's
   backdrop against a surface that is still being painted, which shimmers. */
.warp {
  position: fixed; left: 0; right: 0; z-index: 40; pointer-events: none;
  transition: opacity .25s ease; transform: translateZ(0);
}
.warp--top { top: 0; height: 120px; }
.warp--bottom { bottom: 0; height: 140px; }
.warp > div { position: absolute; inset: 0; }
/* Two passes rather than three. Each one re-reads the backdrop every frame the
   page moves under it, and the third bought very little for its cost. */
.warp__soft { backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.warp__mid { backdrop-filter: none; -webkit-backdrop-filter: none; }
.warp__deep { backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.warp--top .warp__soft { mask-image: linear-gradient(to top, transparent 0%, #000 55%); -webkit-mask-image: linear-gradient(to top, transparent 0%, #000 55%); }
.warp--top .warp__mid { mask-image: linear-gradient(to top, transparent 30%, #000 78%); -webkit-mask-image: linear-gradient(to top, transparent 30%, #000 78%); }
.warp--top .warp__deep { mask-image: linear-gradient(to top, transparent 58%, #000 100%); -webkit-mask-image: linear-gradient(to top, transparent 58%, #000 100%); }
.warp--top .warp__tint { background: linear-gradient(to bottom, rgba(8, 8, 8, .4), transparent); }
.warp--bottom .warp__soft { mask-image: linear-gradient(to bottom, transparent 0%, #000 55%); -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 55%); }
.warp--bottom .warp__mid { mask-image: linear-gradient(to bottom, transparent 30%, #000 78%); -webkit-mask-image: linear-gradient(to bottom, transparent 30%, #000 78%); }
.warp--bottom .warp__deep { mask-image: linear-gradient(to bottom, transparent 58%, #000 100%); -webkit-mask-image: linear-gradient(to bottom, transparent 58%, #000 100%); }
.warp--bottom .warp__tint { background: linear-gradient(to top, rgba(8, 8, 8, .45), transparent); }
/* Each blur re-reads the backdrop every frame the page moves under it —
   affordable on a laptop, the difference between smooth and stuttery on a
   phone. Touch devices keep the tint and a single pass. */
@media (hover: none), (max-width: 899px) {
  .warp__deep { backdrop-filter: none; -webkit-backdrop-filter: none; }
  .warp__soft { backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
}

/* ——— Side navigation ——— */
#sidenav {
  position: fixed; left: 40px; top: 50%; transform: translateY(-50%);
  z-index: 50; opacity: 0; transition: opacity .7s ease; pointer-events: none;
}
.sidenav__row { display: flex; align-items: stretch; gap: 18px; }
#nav-track { position: relative; width: 1px; background: rgba(244, 242, 238, .22); }
#nav-progress { position: absolute; top: 0; left: 0; width: 1px; height: 0%; background: #f4f2ee; }
#nav-marker {
  position: absolute; left: -1px; top: 0; width: 3px; height: 22px; background: #f4f2ee;
  transition: transform .45s cubic-bezier(.4, 0, .2, 1), height .45s ease;
}
.sidenav__links { display: flex; flex-direction: column; gap: 14px; }
.sidenav__links a {
  border: none; font-size: 11px; letter-spacing: .22em; text-transform: uppercase;
  opacity: .45; transition: opacity .35s ease; line-height: 22px; display: block;
}
.sidenav__links a:hover { opacity: 1; }

/* ——— Hero ——— */
#hero { position: relative; z-index: 3; height: 100vh; display: flex; flex-direction: column; padding: 0 40px; }
.hero__frame {
  flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center;
  padding: clamp(52px, 11vh, 90px) 0;
}
#hero-inner {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0; max-height: 100%; min-height: 0;
}
#hero-seal { position: relative; z-index: 1; width: 54px; height: 54px; flex: none; display: block; margin-bottom: clamp(14px, 4vh, 46px); }
.hero__name-wrap { position: relative; width: clamp(260px, 40vw, 560px); flex: 0 1 auto; min-height: clamp(104px, 26vh, 210px); display: flex; }
#hero-name { width: 100%; height: auto; object-fit: contain; display: block; }
#hero-name-front { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: contain; display: block; }
/* The ampersand rides on its own layer, centred where it was drawn but with no
   z-index — so it paints in tree order, ahead of #bg-cutout and therefore
   *behind* the couple. They stand in front of it; it never crosses a face.
   (COVIE keeps z-index 1 and stays in front of them.) */
#hero-amp {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; display: block;
}
#hero-date {
  position: relative; z-index: 1; margin-top: clamp(18px, 3.4vh, 40px); flex: none;
  font-size: 11px; letter-spacing: .34em; line-height: 2.1; text-transform: uppercase;
  opacity: .72; text-align: center;
}
#hero-rsvp {
  position: relative; z-index: 1; margin-top: clamp(20px, 3.6vh, 44px); flex: none;
  border: none; font-family: 'Bodoni Moda', serif; font-size: 20px; letter-spacing: .5em;
  text-transform: uppercase; padding: 0 0 10px 10px;
  border-bottom: 1px solid rgba(244, 242, 238, .9);
  transition: letter-spacing .4s cubic-bezier(.3, 0, .3, 1), border-color .3s ease, opacity .3s ease;
}
#hero-rsvp:hover { opacity: 1; letter-spacing: .68em; border-bottom-color: #F15C61; }
#bg-cutout {
  display: none; position: fixed; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center 42%; pointer-events: none;
  opacity: 0; will-change: transform, opacity;
}

main { position: relative; z-index: 3; }

/* ——— Paper panels ——— */
#day, #rsvp, #stay { padding: 0 var(--edge) 160px; display: flex; justify-content: center; }
#faq { padding: 0 var(--edge) 40px; display: flex; justify-content: center; }
.paper {
  width: 100%; max-width: 1120px; background: #f2f0ec; color: #0a0a0a;
  padding: var(--pad); box-shadow: 0 40px 120px rgba(0, 0, 0, .45);
}
.paper__head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 24px;
  padding-bottom: 18px; border-bottom: 1px solid rgba(10, 10, 10, .85);
}
.paper__kicker { font-size: 11px; letter-spacing: .26em; text-transform: uppercase; white-space: nowrap; }
.paper__meta { font-size: 11px; letter-spacing: .26em; text-transform: uppercase; opacity: .55; text-align: right; }

/* ——— 01 The Day ——— */
.day__grid {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px); padding-top: clamp(28px, 4vw, 56px);
}
.day__date {
  display: flex; flex-direction: column; flex-wrap: nowrap; white-space: nowrap;
  align-items: baseline; gap: 0; font-family: 'Bodoni Moda', serif;
  font-size: clamp(56px, 8.5vw, 128px); line-height: .84; letter-spacing: -.02em; text-transform: uppercase;
}
.day__date-month { font-style: italic; font-weight: 400; }
.day__date-num { display: flex; align-items: baseline; gap: 14px; }
.day__date-year { display: inline; font-size: .3em; letter-spacing: .1em; font-family: 'Archivo', sans-serif; }
.mapbox { border: 1px solid rgba(10, 10, 10, .22); background: #f2f0ec; }
.mapbox iframe { width: 100%; height: 250px; border: none; display: block; }
.mapbox--day { margin-top: 40px; }
.day__facts { margin-top: 18px; display: flex; flex-direction: column; gap: 13px; font-size: 11px; letter-spacing: .24em; text-transform: uppercase; }
.day__fact { display: flex; align-items: flex-start; gap: 12px; }
.day__fact--center { align-items: center; }
.day__fact-icon { flex: none; }
.day__fact-icon--pin { margin-top: 3px; }
.day__fact-lines { line-height: 1.9; }
.day__fact-strong, .day__facts strong { font-weight: 600; }
.day__addr {
  border: none; text-decoration: underline; text-underline-offset: 4px;
  text-decoration-thickness: 1px; text-decoration-color: rgba(10, 10, 10, .35);
}
.day__right { display: flex; flex-direction: column; }
.day__rule { width: 100%; height: 9px; display: block; margin: 10px 0 4px; }
.day__lede { margin: 18px 0 40px; max-width: 42ch; font-size: 15px; line-height: 1.65; font-weight: 300; }
#timeline-rail { position: relative; padding-top: 8px; display: flex; flex-direction: column; justify-content: space-between; flex: 1; }
#timeline-brush {
  position: absolute; left: 7px; top: 24px; width: 10px; height: calc(100% - 48px);
  display: block; opacity: .85; transform-origin: 50% 0; transform: scaleY(0);
  transition: transform 1.15s cubic-bezier(.4, 0, .2, 1);
}
#timeline-rail.in #timeline-brush { transform: scaleY(1); }
/* enso ── time ── detail, kept tight so the eye reads across in one move.
   The brush rail above is centred on the enso (left 7px + half of 10px). */
.tl-row { position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 4px 0; }
.tl-enso { width: 24px; display: flex; justify-content: center; flex: none; transform-origin: 50% 50%; will-change: transform, opacity; backface-visibility: hidden; }
.tl-enso svg { display: block; }
.tl-time { font-size: 13px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; line-height: 21px; flex: none; min-width: 70px; }
.tl-lead { font-size: 15px; font-weight: 300; line-height: 1.4; flex: 1; min-width: 0; text-wrap: pretty; }
.tl-place { font-weight: 500; color: #F15C61; }

/* ——— Shared two-column panel layout ——— */
.two-col {
  display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.2fr);
  gap: clamp(32px, 5vw, 72px); padding-top: clamp(28px, 4vw, 56px);
}
.display-title { font-family: 'Bodoni Moda', serif; font-size: clamp(56px, 8vw, 118px); line-height: .9; text-transform: uppercase; letter-spacing: -.01em; }
.display-title--serifmix { font-size: clamp(48px, 6.5vw, 96px); letter-spacing: 0; }
.col-lede { margin: 32px 0 0; max-width: 30ch; font-size: 15px; line-height: 1.7; font-weight: 300; }

/* ——— 02 RSVP ——— */
.rsvp__deadline { margin-top: 18px; font-size: 11px; letter-spacing: .26em; text-transform: uppercase; opacity: .55; }
#rsvp-form { display: flex; flex-direction: column; gap: 34px; }
#rsvp-form[hidden], .party-list[hidden] { display: none; }
.form-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.field { display: flex; flex-direction: column; gap: 9px; }
.field__label { font-size: 10px; letter-spacing: .24em; text-transform: uppercase; opacity: .6; }
.field__label.err { color: #F15C61; }
/* "(see the menu)" sits inline, right after the label */
.field__label--split { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; }
#menu-open {
  border: none; background: transparent; padding: 0; cursor: pointer;
  font-size: 10px; letter-spacing: .24em; text-transform: uppercase; color: #F15C61;
}
#menu-open:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ——— The dinner menu, opened from the dietary field ——— */
#menu-dialog {
  width: min(560px, calc(100vw - 2 * var(--edge)));
  max-height: min(82vh, 900px);
  overflow-y: auto;
  padding: clamp(28px, 4vw, 52px);
  background: #f2f0ec; color: #0a0a0a;
  border: none; box-shadow: 0 40px 120px rgba(0, 0, 0, .55);
}
#menu-dialog::backdrop { background: rgba(8, 8, 8, .72); backdrop-filter: blur(3px); }
/* The dialog only fades; the slide is on .menu__inner. Keeping the dialog free
   of a transform leaves the viewport as the containing block for the custom
   cursor, which sits inside it while the menu is open (top-layer elements paint
   above every z-index, so the cursor has to be in there to be seen at all). */
#menu-dialog[open] { animation: menuFade .3s ease both; }
@keyframes menuFade { from { opacity: 0; } to { opacity: 1; } }
.menu__inner { animation: menuIn .45s cubic-bezier(.3, .9, .3, 1) both; }
@keyframes menuIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
#menu-close {
  position: absolute; top: 14px; right: 16px;
  border: none; background: transparent; padding: 6px 8px;
  font-size: 22px; line-height: 1; opacity: .45; cursor: pointer; transition: opacity .25s ease;
}
#menu-close:hover { opacity: 1; }
.menu__head { padding-bottom: 20px; border-bottom: 1px solid rgba(10, 10, 10, .85); }
.menu__title { font-family: 'Bodoni Moda', serif; font-size: clamp(38px, 6vw, 60px); line-height: .95; text-transform: uppercase; margin-top: 10px; }
.menu__sub { margin-top: 12px; font-size: 11px; letter-spacing: .26em; text-transform: uppercase; opacity: .55; line-height: 1.75; }
.menu__list { list-style: none; margin: 0; padding: 0; counter-reset: course; }
.menu__list li { counter-increment: course; padding: 22px 0 22px 38px; position: relative; border-bottom: 1px solid rgba(10, 10, 10, .12); }
.menu__list li::before {
  content: counter(course, decimal-leading-zero);
  position: absolute; left: 0; top: 25px;
  font-size: 10px; letter-spacing: .18em; opacity: .4;
}
.menu__list li:last-child { border-bottom: none; }
.menu__dish { font-size: 13px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; line-height: 1.5; }
.menu__list p { margin: 7px 0 0; font-size: 14px; line-height: 1.65; font-weight: 300; opacity: .8; }
.menu__or { margin: 14px 0 10px; font-family: 'Bodoni Moda', serif; font-style: italic; font-size: 15px; color: #F15C61; }
.menu__note {
  margin: 24px 0 0; padding-top: 20px; border-top: 1px solid rgba(10, 10, 10, .85);
  font-size: 12px; line-height: 1.7; font-weight: 300; opacity: .7;
}
.field input, .field textarea {
  background: transparent; border: none; border-bottom: 1px solid rgba(10, 10, 10, .3);
  padding: 8px 0; font-size: 17px;
}
.field textarea { resize: vertical; }
.field-group { display: flex; flex-direction: column; gap: 12px; }
/* .field sets display:flex, which outranks the hidden attribute's UA rule —
   without this, hiding a .field (the dietary question, when someone declines)
   does nothing at all. */
.field-group[hidden], .field[hidden] { display: none; }
.field-hint { font-size: 11px; line-height: 1.5; font-weight: 300; opacity: .5; }
/* The way out of the form for anyone who can't come — quiet enough that it
   doesn't compete with saying yes, findable enough that nobody has to guess. */
.decline-link {
  padding: 0; border: none; background: none; white-space: nowrap;
  font: inherit; font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  text-align: left; color: inherit; opacity: .45; cursor: pointer;
  text-decoration: underline; text-underline-offset: 4px; transition: opacity .25s ease;
}
.decline-link:hover, .decline-link:focus-visible { opacity: .9; }
.decline-note { margin: 14px 0 0; max-width: 46ch; font-size: 13px; line-height: 1.7; opacity: .8; }

/* Shown only if one of the couple types their own name into the RSVP. */
.rsvp-egg {
  position: relative; margin: -18px 0 -6px;
  /* the body face, upright — the display italic read as a script here */
  font-size: clamp(15px, 1.2vw, 17px); line-height: 1.6; font-weight: 400; color: #F15C61;
  animation: fadeUp .55s cubic-bezier(.3, .9, .3, 1) both;
}
.rsvp-egg[hidden] { display: none; }
/* "Check my invitation" — pulls the guest's party and events from the list. */
/* The status sits beside the button and wraps within its own column rather
   than dropping below it. */
.lookup-row { display: flex; align-items: center; gap: 18px; margin-top: -14px; }
#lookup-btn {
  border: 1px solid rgba(10, 10, 10, .3); background: transparent; padding: 10px 20px;
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase; cursor: pointer;
  transition: all .25s ease; white-space: nowrap;
}
#lookup-btn:hover { background: #0a0a0a; color: #f2f0ec; border-color: #0a0a0a; }
#lookup-btn:disabled { opacity: .4; cursor: default; }
#lookup-btn:disabled:hover { background: transparent; color: inherit; border-color: rgba(10, 10, 10, .3); }
#lookup-status {
  flex: 1; min-width: 0;
  font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  line-height: 1.6; color: #F15C61;
}
#lookup-status.is-miss { color: rgba(10, 10, 10, .5); }
#lookup-status[hidden] { display: none; }
.party-list { display: flex; flex-direction: column; gap: 2px; margin-bottom: 6px; }
/* Coming / not coming has to be readable at a glance, so a selected row is
   tinted and its name goes full ink while the rest stay quiet. */
.party-row {
  display: flex; align-items: center; gap: 14px;
  padding: 9px 10px; margin: 0 -10px;   /* room for the tint, same text position */
  border-bottom: 1px solid rgba(10, 10, 10, .1);
  transition: background .25s ease;
}
.party-row.is-on { background: rgba(10, 10, 10, .05); }
.party-row.is-on .chip-label { font-weight: 500; }
.party-row__main {
  display: flex; align-items: center; gap: 14px; flex: 1; border: none;
  background: transparent; padding: 0; cursor: pointer; text-align: left;
}
.party-row__remove { border: none; background: transparent; padding: 4px; font-size: 14px; line-height: 1; opacity: .35; cursor: pointer; }
/* The add field and the way out sit on one line; on a narrow panel the link
   drops beneath rather than squeezing the input. */
.party-add-row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 22px; }
.party-add { display: flex; align-items: center; gap: 12px; flex: 1 1 280px; max-width: 420px; }
.party-add input {
  /* min-width:0 so the field yields instead of shoving Add off the edge */
  flex: 1; min-width: 0; background: transparent; border: none;
  border-bottom: 1px solid rgba(10, 10, 10, .3); padding: 8px 0; font-size: 15px;
}
.party-add button {
  border: 1px solid rgba(10, 10, 10, .3); background: transparent; padding: 9px 18px;
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase; cursor: pointer; transition: all .25s ease;
}
.party-add button:hover { background: #0a0a0a; color: #f2f0ec; border-color: #0a0a0a; }

.check-list { display: flex; flex-direction: column; gap: 2px; }
.check-row {
  display: flex; align-items: center; gap: 14px; border: none;
  border-bottom: 1px solid rgba(10, 10, 10, .1); background: transparent;
  padding: 10px 0 12px; cursor: pointer; text-align: left;
}
.chip-box {
  width: 17px; height: 17px; flex: none; border: 1px solid rgba(10, 10, 10, .32);
  background: transparent; color: #0a0a0a; display: flex; align-items: center;
  justify-content: center; font-size: 11px; line-height: 1; transition: all .2s ease;
}
.chip-box.on { border-color: #0a0a0a; background: #0a0a0a; color: #f2f0ec; animation: inkTick .3s ease .06s both; }
.check-row.is-unlocking { animation: unlockRow .75s cubic-bezier(.3, .9, .3, 1) both; }
.chip-box.is-unlocking { animation: unlockBox .8s cubic-bezier(.34, 1.3, .5, 1) .2s both; }
.chip-label { font-size: 15px; font-weight: 300; opacity: .5; }
.chip-label.on { opacity: 1; }
/* The wedding itself, set apart from the weekend around it: coral where every
   other row is ink. Inline-block, not a flex child — celebrate() sets
   display:inline-block on .chip-label to animate it. */
.chip-heart { width: 13px; height: 12px; margin-right: 9px; vertical-align: -1px; color: #F15C61; }
/* the when, under the event's name — outside .chip-label so it keeps its own
   contrast whether or not the event is ticked */
.chip-stack { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.chip-when { font-size: 10px; letter-spacing: .2em; text-transform: uppercase; opacity: .62; }
.field-note { margin: 20px 0 0; font-size: 12px; line-height: 1.75; opacity: .72; }
.radio-ring {
  width: 15px; height: 15px; flex: none; border-radius: 50%;
  border: 1px solid rgba(10, 10, 10, .32); display: flex; align-items: center;
  justify-content: center; transition: all .2s ease;
}
.radio-ring.on { border-color: #0a0a0a; }
.radio-dot { width: 7px; height: 7px; border-radius: 50%; background: transparent; transition: background .2s ease; }
.radio-ring.on .radio-dot { background: #0a0a0a; animation: dotDrop .42s cubic-bezier(.34, 1.4, .5, 1); }
#travel-other {
  max-width: 420px; background: transparent; border: none;
  border-bottom: 1px solid rgba(10, 10, 10, .3); padding: 8px 0; font-size: 15px;
}

.rsvp__cta-row { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 6px; }
#rsvp-send {
  align-self: stretch; width: auto; padding: 18px 56px; font-size: 12px;
  letter-spacing: .34em; text-transform: uppercase; transition: all .3s ease;
  background: transparent; color: rgba(10, 10, 10, .35); border: 1px solid rgba(10, 10, 10, .2); cursor: not-allowed;
}
#rsvp-send.ready { background: #0a0a0a; color: #f2f0ec; border: 1px solid #0a0a0a; cursor: pointer; }
#rsvp-send.ready:hover { background: transparent; color: #0a0a0a; }
#rsvp-hint { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: #F15C61; }
#rsvp-sent {
  display: flex; flex-direction: column; justify-content: center; gap: 20px;
  min-height: 320px; border-top: 1px solid rgba(10, 10, 10, .2); padding-top: 40px;
}
#rsvp-sent[hidden] { display: none; }
.rsvp-sent__title { font-family: 'Bodoni Moda', serif; font-size: clamp(36px, 4vw, 60px); line-height: 1; }
#rsvp-sent p { margin: 0; max-width: 40ch; font-size: 16px; line-height: 1.7; font-weight: 300; }
#rsvp-reset {
  align-self: flex-start; background: transparent; border: none; border-bottom: 1px solid #0a0a0a;
  padding: 4px 0; font-size: 11px; letter-spacing: .24em; text-transform: uppercase; cursor: pointer;
}

/* ——— 03 FAQ ——— */
.faq-list { align-content: start; }
.faq-item { border-top: 1px solid rgba(10, 10, 10, .18); }
.faq-item__q {
  width: 100%; background: transparent; border: none; padding: 19px 0;
  display: flex; align-items: baseline; gap: 20px; cursor: pointer; text-align: left;
}
.faq-item__num { font-size: 10px; letter-spacing: .18em; opacity: .45; min-width: 24px; }
.faq-item__text { font-family: 'Archivo', sans-serif; font-weight: 500; font-size: clamp(15px, 1.3vw, 18px); line-height: 1.4; letter-spacing: -.005em; flex: 1; }
.faq-item__plus { font-size: 18px; line-height: 1; opacity: .5; transform: rotate(0deg); transition: transform .35s ease; }
.faq-item.open .faq-item__plus { transform: rotate(45deg); }
.faq-item__a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .5s cubic-bezier(.3, 0, .2, 1); }
.faq-item.open .faq-item__a { grid-template-rows: 1fr; }
.faq-item__a-clip { min-height: 0; overflow: hidden; opacity: 0; transition: opacity .35s ease; }
.faq-item.open .faq-item__a-clip { opacity: 1; }
.faq-item__a-pad { padding: 0 0 24px 44px; }
.faq-item__a-pad p { margin: 0; font-size: 14px; line-height: 1.7; font-weight: 300; }
.faq-item__link { display: inline-block; margin-top: 16px; font-size: 11px; letter-spacing: .24em; text-transform: uppercase; }

/* ——— 04 Stay ——— */
.stay__right { display: flex; flex-direction: column; }
.stay__map { margin-bottom: 22px; }
.stay__map iframe { height: 210px; }
.hotel__name { font-family: 'Bodoni Moda', serif; font-size: 26px; line-height: 1.2; }
.hotel__note { margin-top: 8px; font-size: 14px; font-weight: 300; line-height: 1.6; max-width: 62ch; }
.hotel__note strong { font-weight: 600; }
.hotel__cta { display: inline-block; margin-top: 14px; font-size: 10px; letter-spacing: .24em; text-transform: uppercase; }
.registry {
  margin-top: 40px; padding-top: 26px; border-top: 1px solid rgba(10, 10, 10, .85);
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.registry__label { text-align: left; }
.registry__note { margin: 12px 0 0; max-width: 42ch; font-size: 14px; line-height: 1.65; font-weight: 300; }
.registry__cta {
  border: none; border-bottom: 1px solid #0a0a0a; padding-bottom: 5px;
  font-size: 11px; letter-spacing: .26em; text-transform: uppercase; white-space: nowrap;
}

/* ——— 05 Our Story ——— */
#story { padding: 0 var(--edge) 240px; display: flex; flex-direction: column; align-items: center; gap: 140px; }
.story__title-block { height: 88vh; display: flex; align-items: center; justify-content: center; text-align: center; }
.story__kicker { font-size: 11px; letter-spacing: .32em; text-transform: uppercase; opacity: .6; }
.story__title { font-family: 'Bodoni Moda', serif; font-size: clamp(64px, 13vw, 210px); line-height: .9; text-transform: uppercase; margin-top: 22px; }
.glass {
  width: 100%; max-width: 1120px; background: rgba(12, 12, 12, .42);
  backdrop-filter: blur(22px) saturate(1.1); -webkit-backdrop-filter: blur(22px);
  /* less the 1px border, so its text lines up with the paper panels' */
  border: 1px solid rgba(244, 242, 238, .16); padding: calc(var(--pad) - 1px);
}
/* Set as a feature spread: the opening paragraph runs large with a dropped cap
   next to a standing portrait, the body falls into two columns, then a
   full-measure photograph and the sign-off. No headings anywhere. */
.story__open { display: grid; grid-template-columns: minmax(0, 1.42fr) minmax(0, 1fr); gap: clamp(30px, 4.5vw, 68px); align-items: start; }
.story__lede { margin: 0; font-size: clamp(19px, 1.45vw, 25px); line-height: 1.62; font-weight: 300; }
.story__lede::first-letter {
  float: left; font-family: 'Bodoni Moda', serif; font-weight: 400;
  font-size: 3.5em; line-height: .78; padding: .06em .1em 0 0;
}
.story__cols {
  margin-top: clamp(34px, 4.4vw, 62px);
  column-count: 2; column-gap: clamp(30px, 4.5vw, 68px);
  orphans: 2; widows: 2;
}
.story__text { margin: 0 0 22px; font-size: 17px; line-height: 1.8; font-weight: 300; opacity: .9; }
.story__cols .story__text:last-child { margin-bottom: 0; }
.story__open-text .story__text { margin: 24px 0 0; }
/* Asides live at the foot of the piece, called out by coral superscripts. */
.fn { font-size: .58em; line-height: 0; vertical-align: super; letter-spacing: .04em; }
/* no rule under the marker — the global `a` border-bottom would draw one */
.fn a { color: #F15C61; text-decoration: none; border-bottom: none; padding-left: 1px; cursor: pointer; }
.fn a:hover, .fn a:focus-visible { opacity: .75; }
/* Hovering a marker brings the note to you (desktop only — see initFootnotes).
   The text is read out of the footnote itself, so the two can't disagree. */
.fn-tip {
  position: fixed; z-index: 120; max-width: 300px; pointer-events: none;
  background: rgba(14, 13, 12, .96); color: #f4f2ee;
  border: 1px solid rgba(244, 242, 238, .18); padding: 10px 14px;
  font-size: 13px; line-height: 1.6; font-weight: 300;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .5);
  opacity: 0; visibility: hidden; transform: translateY(4px);
  transition: opacity .18s ease, transform .18s ease;
}
.fn-tip.is-on { opacity: 1; visibility: visible; transform: translateY(0); }
.story__notes {
  margin: clamp(34px, 4.4vw, 62px) 0 0; padding: 22px 0 0; list-style: none;
  counter-reset: fn; border-top: 1px solid rgba(244, 242, 238, .18);
  font-size: 13px; line-height: 1.7; opacity: .72;
}
.story__notes li {
  counter-increment: fn; position: relative; padding-left: 24px; margin-bottom: 9px;
}
.story__notes li::before {
  content: counter(fn); position: absolute; left: 0; top: -1px;
  font-family: 'Bodoni Moda', serif; font-style: italic; font-size: 15px; color: #F15C61;
}
.fn-back { color: inherit; text-decoration: none; border-bottom: none; opacity: .5; padding-left: 2px; }
.fn-back:hover { opacity: 1; }
/* Photo slots. Empty, they read as deliberate frames naming the file they want;
   filled, the frame gets out of the way. buildStoryPhotos() does the swap. */
.story__figure { margin: 0; display: flex; flex-direction: column; }
.story__figure--full { margin-top: clamp(34px, 4.4vw, 62px); }
.story__frame {
  position: relative; width: 100%; aspect-ratio: 4 / 5; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: rgba(244, 242, 238, .04); border: 1px dashed rgba(244, 242, 238, .26);
}
.story__frame--wide { aspect-ratio: 3 / 2; }
.story__frame--cinema { aspect-ratio: 21 / 9; }
.story__frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.story__frame.is-filled { border: none; background: none; }
.story__slot { padding: 0 18px; text-align: center; font-size: 10px; letter-spacing: .24em; text-transform: uppercase; line-height: 2.2; opacity: .45; }
.story__caption { margin-top: 10px; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; opacity: .5; }
.story__end { margin-top: clamp(34px, 4.4vw, 62px); max-width: 62ch; }
.story__close { margin-bottom: 0; }
/* Their handwriting. The SVG is the centreline of the real ink — traced off the
   scan — so it can be written on, one stroke at a time, the way it was signed
   rather than wiped in. initSignature() does the dashes and the timing. */
.story__sign { margin-top: 22px; }
.story__sign img, .story__sign svg { display: block; width: clamp(190px, 21vw, 290px); height: auto; }

/* ——— 06 The Cats ——— */
#cats { padding: 0 var(--edge) 140px; display: flex; justify-content: center; }
.cats__article { width: 100%; max-width: 1120px; }
.cats__head {
  padding: 0 0 18px; display: flex; justify-content: space-between;
  align-items: baseline; gap: 24px; border-bottom: 1px solid rgba(244, 242, 238, .35);
}
.cats__lede {
  margin: clamp(28px, 4vw, 48px) 0 clamp(28px, 3.5vw, 44px); max-width: 56ch;
  font-size: 16px; line-height: 1.75; font-weight: 300; opacity: .85;
}
.cats__row { display: flex; flex-direction: row; gap: 8px; height: clamp(380px, 58vh, 620px); }
.cat-tile {
  position: relative; flex: 1; min-width: 0; min-height: 0; padding: 0; border: none;
  background: #0a0a0a; overflow: hidden; cursor: pointer;
  transition: flex .7s cubic-bezier(.4, 0, .2, 1), min-height .7s cubic-bezier(.4, 0, .2, 1);
}
.cats__row.has-open .cat-tile { flex: .8; }
.cats__row.has-open .cat-tile.open { flex: 3.4; }
.cat-tile img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transform: scale(1); transition: transform .8s cubic-bezier(.4, 0, .2, 1), filter .5s ease;
  filter: grayscale(.5);
}
.cat-tile:hover img, .cat-tile.open img { filter: grayscale(0); }
.cat-tile.open img { transform: scale(1.04); }
.cat-tile__grad {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, .92) 0%, rgba(0, 0, 0, .72) 18%, rgba(0, 0, 0, .34) 42%, rgba(0, 0, 0, 0) 68%);
}
.cat-tile__veil { position: absolute; inset: 0; background: rgba(0, 0, 0, .3); opacity: .6; transition: opacity .5s ease; }
.cat-tile.open .cat-tile__veil { opacity: 0; }
.cat-tile__label {
  position: absolute; inset: auto 0 0 0; padding: clamp(18px, 2vw, 30px);
  display: flex; flex-direction: column; align-items: flex-start; gap: 0; text-align: left;
}
.cat-tile__name {
  position: relative; left: 0%; transform: translateX(0%);
  font-family: 'Bodoni Moda', serif; text-transform: uppercase;
  font-size: clamp(22px, 2.4vw, 36px); line-height: 1; letter-spacing: .01em;
  color: #f4f2ee; white-space: nowrap;
  transition: left .7s cubic-bezier(.4, 0, .2, 1), transform .7s cubic-bezier(.4, 0, .2, 1), font-size .6s cubic-bezier(.4, 0, .2, 1);
}
.cat-tile.open .cat-tile__name { font-size: clamp(38px, 4.6vw, 76px); }
.cats__row.has-open .cat-tile:not(.open) .cat-tile__name { left: 50%; transform: translateX(-50%); }
.cat-tile__rows { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .6s cubic-bezier(.3, 0, .2, 1); width: 100%; }
.cat-tile.open .cat-tile__rows { grid-template-rows: 1fr; }
.cat-tile__clip { min-height: 0; overflow: hidden; opacity: 0; transition: opacity .4s ease; }
.cat-tile.open .cat-tile__clip { opacity: 1; }
.cat-tile__blurb {
  display: block; padding-top: 12px; max-width: 40ch; font-size: 15px;
  font-weight: 300; line-height: 1.6; color: rgba(244, 242, 238, .85);
}

/* ——— Footer ——— */
footer { position: relative; z-index: 3; padding: 0 var(--edge) 90px; text-align: center; }
.footer__line { font-family: 'Bodoni Moda', serif; font-size: clamp(28px, 4vw, 56px); font-style: italic; }
.footer__sub { margin-top: 20px; font-size: 11px; letter-spacing: .3em; text-transform: uppercase; opacity: .5; }
.footer__credit {
  margin-top: 40px; display: flex; align-items: center; justify-content: center; gap: 9px;
  font-size: 10px; letter-spacing: .24em; text-transform: uppercase; opacity: .35;
}
.footer__credit svg { flex: none; }

/* ——— Corner cat ——— */
#hero-corner {
  display: flex; position: fixed; right: 40px; bottom: 40px; z-index: 45;
  color: #f4f2ee; align-items: flex-end; transition: color .35s ease, opacity .5s ease;
}
#cat { background: transparent; border: none; padding: 0 0 2px; cursor: pointer; display: block; line-height: 0; }
.cat-svg { width: 46px; height: 50px; overflow: visible; display: block; }
#cat-tail { transform-origin: 31px 46.5px; animation: tailWag 2.6s ease-in-out infinite; }
#cat-head { transform-origin: 22px 27px; animation: headTilt 11s ease-in-out infinite; }
#cat-eyes { animation: blink 5.5s linear infinite; transform-origin: 22px 18px; }
#cat-name {
  position: absolute; right: calc(100% + 14px); bottom: 6px; white-space: nowrap;
  font-size: 9px; letter-spacing: .28em; text-transform: uppercase;
  opacity: 0; transition: opacity .35s ease; pointer-events: none;
}

/* ——— Custom cursor ——— */
#cursor {
  position: fixed; top: 0; left: 0; width: 22px; height: 22px;
  mix-blend-mode: difference; z-index: 100; pointer-events: none;
  opacity: 0; transition: opacity .3s ease;
}
#cursor-paw { width: 100%; height: 100%; display: block; transform: rotate(-14deg); transition: transform .28s cubic-bezier(.4, 0, .2, 1), opacity .18s ease; }
#cursor-fish { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transform: scale(.6) rotate(8deg); transition: transform .3s cubic-bezier(.34, 1.4, .5, 1), opacity .18s ease; }
#cursor-heart { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transform: scale(.6); transition: transform .3s cubic-bezier(.34, 1.4, .5, 1), opacity .18s ease; }
#cursor-label {
  position: absolute; left: 50%; top: 100%; margin-top: 14px;
  transform: translateX(-50%) translateY(4px); white-space: nowrap;
  font-size: 9px; letter-spacing: .26em; text-transform: uppercase; color: #f4f2ee;
  opacity: 0; transition: opacity .22s ease, transform .28s cubic-bezier(.34, 1.3, .5, 1);
}
@media (pointer: coarse) { #cursor { display: none; } }

/* ——— Intro wash ——— */
#intro {
  position: fixed; inset: 0; z-index: 200; background: #0b0b0b;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
#intro-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#intro-vignette {
  position: absolute; inset: 0;
  background: radial-gradient(120% 100% at 50% 45%, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, .55) 100%);
  pointer-events: none;
}
.intro__mark { position: relative; display: flex; flex-direction: column; align-items: center; gap: 22px; animation: fadeUp 1.2s ease both; }
.intro__mark img { width: 60px; height: 60px; display: block; }
#intro-label { font-size: 9px; letter-spacing: .42em; text-transform: uppercase; color: rgba(244, 242, 238, .55); }

/* ——— Mobile (< 900px) ——— */
@media (max-width: 899px) {
  /* Tighter gutters, and every block lands on the same left/right line:
     --edge + --pad = 36px from the viewport edge, whatever the section. */
  :root { --edge: 16px; --pad: 20px; }
  .cats__article { padding-left: var(--pad); padding-right: var(--pad); }
  footer { padding-left: calc(var(--edge) + var(--pad)); padding-right: calc(var(--edge) + var(--pad)); }
  /* The heart drops below the line it belongs to. */
  .footer__credit { flex-direction: column-reverse; gap: 12px; }

  /* "Six courses," / "served family style" — a clean two-line break rather
     than "…family" wrapping away from "style". */
  .menu__sub span { display: block; }

  /* the answer reads under the button rather than squeezed beside it */
  .lookup-row { flex-direction: column; align-items: flex-start; gap: 12px; }
  #lookup-status { flex: none; }

  #sidenav { display: none; }
  .meta { display: none; }
  /* minmax(0,…) not 1fr — otherwise a nowrap child (the big date) can force
     the track wider than the panel and push the whole column out of alignment. */
  .day__grid, .two-col, .form-pair, .story__open { grid-template-columns: minmax(0, 1fr); }
  .story__cols { column-count: 1; }
  .story__lede::first-letter { font-size: 3.1em; }
  .day__date { flex-direction: row; gap: .28em; font-size: clamp(34px, 13vw, 72px); }
  .day__date-year { display: none; }
  .mapbox--day { margin-top: 18px; }
  .day__lede { margin-bottom: 12px; }
  #rsvp-send { width: 100%; }
  #hero-corner { right: 20px; }
  .cat-svg { width: 34px; height: 37px; }
  /* No room to expand one at a time on a phone — every cat is already open,
     so tapping changes nothing and all three read at once. */
  .cats__row { flex-direction: column; height: auto; gap: 10px; }
  .cats__row .cat-tile,
  .cats__row.has-open .cat-tile,
  .cats__row.has-open .cat-tile.open { flex: none; min-height: 400px; cursor: default; }
  .cats__row .cat-tile img { filter: grayscale(0); }
  .cats__row .cat-tile__veil { opacity: 0; }
  .cats__row .cat-tile__rows { grid-template-rows: 1fr; }
  .cats__row .cat-tile__clip { opacity: 1; }
  .cats__row .cat-tile__name,
  .cats__row.has-open .cat-tile:not(.open) .cat-tile__name {
    left: 0%; transform: translateX(0%); font-size: clamp(34px, 11vw, 52px);
  }
}
