:root {
  --paper: #f8f5ef;
  --ink: #302f2c;
  --muted: #77726a;
  --sage: #8e9789;
  --line: #d8d0c3;
  --serif: "Noto Serif TC", serif;
  --display: "Cormorant Garamond", serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: #deddd9;
  font-family: var(--serif);
  font-weight: 300;
}
body.invitation-locked { overflow: hidden; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.invitation-gate {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% 38%, rgba(255,255,255,.92), transparent 35%),
    linear-gradient(145deg, #f7f1e7, #e8dfd1);
  opacity: 1;
  visibility: visible;
  transition: opacity .8s ease, visibility .8s;
}
.invitation-gate.is-opening {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.gate-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  text-align: center;
}
.gate-heading {
  margin: 0;
  color: #4f594d;
  font: 500 .72rem/1 var(--display);
  letter-spacing: .3em;
}
.envelope-button {
  position: relative;
  width: min(76vw, 310px);
  aspect-ratio: 1.48;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
  filter: drop-shadow(0 18px 24px rgba(69,70,57,.2));
  perspective: 900px;
}
.envelope-button:focus-visible {
  outline: 2px solid #566353;
  outline-offset: 12px;
  border-radius: 4px;
}
.envelope-back,
.envelope-front,
.envelope-flap {
  position: absolute;
  inset: 0;
  display: block;
}
.envelope-back {
  border-radius: 3px;
  background: #93a08c;
}
.envelope-front {
  z-index: 3;
  overflow: hidden;
  border-radius: 0 0 3px 3px;
  background:
    linear-gradient(27deg,
      transparent 49.35%,
      rgba(47,61,46,.22) 49.7%,
      rgba(255,255,255,.1) 50.08%,
      transparent 50.45%) left bottom / 52% 100% no-repeat,
    linear-gradient(-27deg,
      transparent 49.35%,
      rgba(47,61,46,.22) 49.7%,
      rgba(255,255,255,.1) 50.08%,
      transparent 50.45%) right bottom / 52% 100% no-repeat,
    #93a08c;
  box-shadow:
    inset 0 -7px 12px rgba(51,65,49,.07),
    inset 4px 0 7px rgba(255,255,255,.04),
    inset -4px 0 7px rgba(46,58,45,.05);
}
.envelope-front::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 1px rgba(255,255,255,.08);
}
.envelope-flap {
  z-index: 4;
  height: 62%;
  border-radius: 3px 3px 0 0;
  background: #93a08c;
  filter: drop-shadow(0 3px 2px rgba(48,61,47,.18));
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: top center;
  transition: transform .65s cubic-bezier(.4,0,.2,1), z-index 0s .32s;
}
.envelope-card {
  position: absolute;
  z-index: 2;
  left: 7%;
  right: 7%;
  bottom: 7%;
  height: 88%;
  padding: 28px 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  border: 1px solid #d8cebd;
  color: #393a35;
  background: #fbf7ef;
  box-shadow: 0 2px 8px rgba(50,50,40,.12);
  opacity: 0;
  transition:
    transform .75s .42s cubic-bezier(.2,.75,.25,1),
    opacity .18s .3s;
}
.envelope-card > span {
  font: 500 .56rem/1 var(--display);
  letter-spacing: .2em;
}
.envelope-card strong {
  font: 400 1.55rem/1 var(--display);
}
.envelope-card strong i {
  display: inline-block;
  margin: 0 .12em;
  font-size: .75em;
  font-style: normal;
}
.envelope-card small {
  font: 500 .68rem/1 var(--display);
  letter-spacing: .18em;
}
.envelope-seal {
  position: absolute;
  z-index: 5;
  left: 50%;
  top: 62%;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.42);
  border-radius: 50%;
  color: #f7f1e5;
  background: #536250;
  box-shadow: 0 3px 8px rgba(43,53,42,.24);
  transform: translate(-50%, -50%);
  font: 500 .7rem/1 var(--display);
  letter-spacing: .05em;
  transition: opacity .25s .12s, transform .35s;
}
.envelope-seal span { margin: 0 .04em; opacity: .65; }
.envelope-button:hover { transform: translateY(-3px); }
.envelope-button,
.envelope-button:hover { transition: transform .3s ease; }
.invitation-gate.envelope-open .envelope-flap {
  z-index: 1;
  transform: rotateX(180deg);
}
.invitation-gate.envelope-open .envelope-card {
  opacity: 1;
  transform: translateY(-59%);
}
.invitation-gate.envelope-open .envelope-seal {
  opacity: 0;
  transform: translate(-50%, -50%) scale(.7);
}
.gate-prompt {
  margin: 0;
  color: #596156;
  font-size: .75rem;
  letter-spacing: .12em;
  animation: gate-pulse 2s ease-in-out infinite;
}

.quick-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 15px;
}
.quick-nav a {
  color: white;
  text-decoration: none;
  font: 500 .61rem/1 var(--display);
  letter-spacing: .08em;
  white-space: nowrap;
  text-shadow: 0 1px 7px rgba(0,0,0,.75);
  transition: color .25s, text-shadow .25s, opacity .2s;
}
.quick-nav a:hover { opacity: .7; }
.hero-topbar.scrolled .quick-nav a {
  color: #4e4a44;
  text-shadow:
    0 1px 0 rgba(255,255,255,.95),
    0 0 8px rgba(255,255,255,.9);
}

.hero-topbar {
  position: fixed;
  z-index: 40;
  top: 0;
  left: 50%;
  width: min(100%, 520px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 82px;
  padding: 4px 18px 4px 10px;
  background: transparent;
  transform: translateX(-50%);
}
.hero-monogram {
  width: 74px;
  height: 74px;
  display: block;
  overflow: hidden;
  text-decoration: none;
}
.hero-monogram img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 0 3px rgba(255,255,255,.7));
}

.invitation {
  width: min(100%, 520px);
  min-height: 100vh;
  margin: 0 auto;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 0%, rgba(255,255,255,.8), transparent 30%),
    var(--paper);
  box-shadow: 0 0 40px rgba(0,0,0,.08);
}

.hero {
  position: relative;
  min-height: 100svh;
  padding: 48px 24px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  color: white;
  background:
    linear-gradient(to bottom, rgba(65,53,40,.08) 0%, rgba(255,246,228,.04) 38%, rgba(92,72,52,.08) 58%, rgba(42,32,23,.56) 100%),
    url("assets/hero-cream.webp") center center / cover;
  background-blend-mode: normal, normal;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .06;
  pointer-events: none;
  background:
    linear-gradient(rgba(255,245,225,.15), rgba(242,219,181,.03)),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.95' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.18'/%3E%3C/svg%3E");
  mix-blend-mode: screen;
}
.hero-copy {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-bottom: 8vh;
  text-align: center;
  text-shadow: 0 2px 9px rgba(0,0,0,.55);
  animation: hero-arrival 1.2s .2s both cubic-bezier(.22,.7,.28,1);
}
.eyebrow, .section-kicker {
  font-family: var(--display);
  font-size: .73rem;
  letter-spacing: .28em;
}
.hero h1, .closing h2 {
  margin: 16px 0 10px;
  font: 400 clamp(2.7rem, 11.5vw, 4.2rem)/.9 var(--display);
}
.hero h1 { white-space: nowrap; }
.hero h1 i, .closing h2 i { font-weight: 400; }
.plane-mark {
  width: .72em;
  height: .72em;
  display: inline-block;
  position: relative;
  margin: 0 .08em;
  vertical-align: .02em;
}
.plane-mark::before {
  content: "✈︎";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: currentColor;
  font-family: Arial, "Helvetica Neue", sans-serif;
  font-size: .64em;
  font-style: normal;
  line-height: 1;
  font-variant-emoji: text;
  transform: scaleX(var(--plane-direction, 1)) rotate(var(--plane-angle, -18deg));
}
.hero-copy p {
  margin: 20px 0 34px;
  font: 500 .95rem/1 var(--display);
  letter-spacing: .28em;
}
.hero-details {
  display: inline-block;
  min-width: 185px;
  padding: 15px 25px;
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 30px;
  color: white;
  text-decoration: none;
  font: 500 .78rem/1 var(--display);
  letter-spacing: .18em;
  text-shadow: none;
  transition: color .2s, background .2s;
}
.hero-details:hover { color: #272521; background: white; }

.section { padding: 88px 34px; text-align: center; }
.section-kicker { margin: 0 0 14px; color: var(--sage); }
.section h2 {
  margin: 0;
  font-size: 1.38rem;
  font-weight: 400;
  letter-spacing: .08em;
}
.flourish { margin: 25px 0; color: #a8a093; font-size: 1.2rem; }
.hand-heart svg {
  width: 18px;
  height: auto;
  display: block;
  margin: 0 auto;
  overflow: visible;
}
.hand-heart path {
  fill: #b97570;
  stroke: #9f625e;
  stroke-width: 1.15;
  stroke-linejoin: round;
  filter: drop-shadow(-.5px -.2px 0 rgba(255,255,255,.42));
}
.poem {
  margin: 0;
  color: #5e5a54;
  font-size: .92rem;
  line-height: 2.15;
}
.names {
  margin: 38px 0 0;
  font: italic 1.8rem/1 var(--display);
}
.names span { padding: 0 7px; color: var(--sage); }

.date-section { background: #ece9e2; }
.event-time { margin: 12px 0 40px; color: var(--muted); font-size: .84rem; }
.calendar { width: min(100%, 320px); margin: 0 auto; }
.month { margin-bottom: 22px; font: 500 1.15rem/1 var(--display); letter-spacing: .2em; }
.weekdays, .days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 9px 3px;
}
.weekdays { margin-bottom: 10px; color: var(--muted); font: .7rem/1 var(--display); }
.days span {
  height: 33px;
  display: grid;
  place-items: center;
  font: .78rem/1 var(--display);
}
.days .wedding-day {
  border-radius: 50%;
  color: white;
  background: var(--sage);
  box-shadow: 0 3px 8px rgba(80,86,77,.22);
}
.countdown { margin: 35px 0 0; color: var(--muted); font-size: .78rem; letter-spacing: .08em; }

.timeline { background: #faf8f4; }
.timeline h2 { margin-bottom: 42px; }
.timeline-list {
  position: relative;
  width: min(100%, 330px);
  margin: 0 auto;
}
.timeline-list::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 92px;
  width: 1px;
  background: #d7cfc3;
}
.timeline-item {
  display: grid;
  grid-template-columns: 72px 18px 1fr;
  gap: 12px;
  align-items: center;
  text-align: left;
}
.timeline-item + .timeline-item { margin-top: 32px; }
.timeline-item time {
  text-align: right;
  font: 500 1.15rem/1 var(--display);
  letter-spacing: .06em;
}
.timeline-dot {
  position: relative;
  z-index: 1;
  width: 9px;
  height: 9px;
  justify-self: center;
  border: 2px solid #faf8f4;
  border-radius: 50%;
  background: var(--sage);
  box-shadow: 0 0 0 1px var(--sage);
}
.timeline-item strong { font-size: .88rem; font-weight: 400; }
.timeline-item p {
  margin: 5px 0 0;
  color: #948d83;
  font: .65rem/1 var(--display);
  letter-spacing: .1em;
}
.dress-code {
  width: min(100%, 340px);
  margin: 55px auto 0;
  padding-top: 30px;
  border-top: 1px solid #d8d0c4;
}
.dress-code-title {
  margin: 0 0 22px;
  color: var(--sage);
  font: 500 .72rem/1 var(--display);
  letter-spacing: .25em;
}
.dress-code-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.dress-look {
  padding: 18px 10px;
  border: 1px solid #ded7cc;
  background: rgba(255,255,255,.52);
}
.color-swatch {
  width: 28px;
  height: 28px;
  display: block;
  margin: 0 auto 12px;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(76,70,62,.16);
}
.formal-swatch { background: linear-gradient(135deg, #ded5c7 50%, #7d786f 50%); }
.black-swatch { background: #181817; }
.dress-look strong { font-size: .76rem; font-weight: 400; }
.dress-look p { margin: 6px 0 0; color: #827a70; font-size: .68rem; }
.dress-note {
  margin: 20px 0 0;
  color: #6f685f;
  font-size: .72rem;
  line-height: 1.8;
}

.gallery { padding-left: 20px; padding-right: 20px; }
.gallery h2 { margin-bottom: 32px; font: italic 2.2rem/1 var(--display); }
.gallery-viewer { position: relative; }
.gallery-main {
  position: relative;
  display: block;
  width: 100%;
  height: 540px;
  padding: 0;
  border: 0;
  overflow: hidden;
  background: #e5e1da;
  cursor: zoom-in;
}
.gallery-main img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #e9e5de;
  transition: opacity .22s ease;
}
.gallery-main img.loading { opacity: .32; }
.gallery-main span {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 7px 10px;
  color: white;
  background: rgba(25,25,23,.48);
  font-size: .62rem;
  letter-spacing: .08em;
}
.gallery-thumbnails {
  display: flex;
  gap: 7px;
  margin-top: 9px;
  padding-bottom: 5px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
}
.gallery-thumbnails::-webkit-scrollbar { display: none; }
.gallery-thumb {
  flex: 0 0 82px;
  height: 82px;
  padding: 3px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  opacity: .62;
  transition: opacity .2s, border-color .2s, transform .45s ease;
}
.gallery-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.gallery-thumb.active {
  opacity: 1;
  border-color: #8c887f;
}
.gallery-count {
  margin: 10px 2px 0;
  text-align: right;
  color: var(--muted);
  font: .7rem/1 var(--display);
  letter-spacing: .12em;
}

.venue { background: #f0ece5; }
.venue h2 { font-size: 1.45rem; }
.venue-en { margin: 9px 0 30px; color: var(--muted); font: .72rem/1 var(--display); letter-spacing: .18em; }
.venue-card { background: rgba(255,255,255,.48); padding-bottom: 25px; }
.map-art {
  position: relative;
  height: 210px;
  overflow: hidden;
  background:
    linear-gradient(145deg, transparent 48%, #d2d7cb 49%, #d2d7cb 52%, transparent 53%),
    linear-gradient(22deg, transparent 47%, #ded8cc 48%, #ded8cc 52%, transparent 53%),
    #e7e4da;
}
.map-road { position: absolute; display: block; height: 5px; background: rgba(255,255,255,.8); transform-origin: left; }
.road-a { width: 130%; left: -15%; top: 65%; transform: rotate(-12deg); }
.road-b { width: 90%; left: 35%; top: 10%; transform: rotate(72deg); }
.road-c { width: 90%; left: 5%; top: 25%; transform: rotate(35deg); }
.pin {
  position: absolute;
  width: 22px;
  height: 22px;
  left: calc(50% - 11px);
  top: calc(50% - 18px);
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: #747c70;
  box-shadow: 0 4px 10px rgba(0,0,0,.18);
}
.pin::after { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: #eeeae2; }
.venue-details { padding: 22px 25px 15px; text-align: left; }
.venue-details p {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 12px;
  margin: 10px 0;
  font-size: .78rem;
  line-height: 1.7;
}
.venue-details strong { font-weight: 500; }
.outline-button {
  display: inline-block;
  padding: 11px 25px;
  border: 1px solid #a69f94;
  color: var(--ink);
  text-decoration: none;
  font-size: .74rem;
}

.rsvp { padding: 70px 24px 55px; background: #f5f1e9; }
.rsvp-lead { margin: 10px auto 30px; color: var(--muted); font-size: .74rem; line-height: 1.7; }
.rsvp-form {
  padding: 28px 22px 24px;
  text-align: left;
  background: rgba(255,255,255,.78);
  box-shadow: 0 12px 35px rgba(83,72,57,.07);
}
fieldset { padding: 0; margin: 0 0 16px; border: 0; }
.form-section {
  margin: 0;
  padding: 0 0 26px;
}
.form-section + .form-section {
  padding-top: 25px;
  border-top: 1px solid #ded7cc;
}
.form-section legend {
  width: 100%;
  margin-bottom: 12px;
  padding: 0;
  color: #504c46;
  font-size: .9rem;
  font-weight: 500;
  letter-spacing: .12em;
}
.attendance-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 14px;
}
.attendance-section legend { grid-column: 1 / -1; }
.question-group + .question-group { margin-top: 0; }
.question-label {
  margin: 0 0 9px;
  font-size: .72rem;
  font-weight: 400;
}
.guest-name, .relationship-field, .companion-names { margin-bottom: 18px; }
.relationship-field > span {
  display: block;
  margin-bottom: 7px;
  font-size: .72rem;
  font-weight: 400;
}
.guest-count-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 20px;
  margin-top: 6px;
}
.total-guests-field { grid-column: 1 / -1; }
.total-guests-field > span:first-child {
  display: flex;
  align-items: baseline;
  gap: 7px;
}
.total-guests-field small {
  display: inline;
  margin-top: 0;
}
.number-field {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid #e1dbd1;
}
.number-field > span {
  display: block;
  font-size: .75rem;
  font-weight: 400;
}
.number-field small {
  display: block;
  margin-top: 4px;
  color: #999188;
  font-size: .58rem;
  font-weight: 300;
}
.select-wrap {
  display: flex !important;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
}
.select-wrap select {
  width: 48px;
  padding: 5px 0;
  border-bottom: 0;
  color: var(--ink);
  font: 500 1rem/1 var(--display);
}
.select-wrap em {
  color: #77716a;
  font-size: .66rem;
  font-style: normal;
}
legend, .field > span {
  display: block;
  margin-bottom: 7px;
  font-size: .72rem;
  font-weight: 400;
}
.choice-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.choice-row input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  opacity: 0;
  pointer-events: none;
}
.choice-row span {
  display: block;
  padding: 11px 5px;
  border: 1px solid var(--line);
  text-align: center;
  color: var(--muted);
  font-size: .76rem;
  cursor: pointer;
  transition: .2s;
}
.choice-row input:checked + span { color: white; border-color: var(--sage); background: var(--sage); }
.compact-choice span {
  padding: 10px 4px;
  font-size: .7rem;
}
.contact-section .field + .field { margin-top: 22px; }
.field-hint { margin: 6px 0 0; color: #9a9388; font-size: .62rem; line-height: 1.5; }
.field { display: block; }
.field-wide { grid-column: 1 / -1; }
input, select, textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  outline: 0;
  padding: 9px 2px;
  color: var(--ink);
  background: transparent;
  font-size: .78rem;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--sage); }
.submit-button {
  width: 100%;
  margin-top: 6px;
  padding: 14px;
  border: 0;
  color: white;
  background: #71796e;
  cursor: pointer;
}
.form-status { min-height: 20px; margin: 14px 0 0; text-align: center; color: var(--sage); font-size: .75rem; }

.travel-map {
  padding-left: 20px;
  padding-right: 20px;
  background: #eee9df;
}
.travel-map h2 {
  font: italic clamp(1.05rem, 4.7vw, 1.5rem)/1.15 var(--display);
  letter-spacing: -.02em;
  white-space: nowrap;
}
.travel-lead {
  margin: 12px 0 35px;
  color: #80796f;
  font-size: .76rem;
}
.world-map {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 1;
  overflow: hidden;
  border: 1px solid rgba(126,116,101,.18);
  background:
    linear-gradient(rgba(255,255,255,.35), rgba(255,255,255,.05)),
    repeating-linear-gradient(0deg, transparent 0 49px, rgba(116,107,94,.05) 50px),
    repeating-linear-gradient(90deg, transparent 0 49px, rgba(116,107,94,.05) 50px),
    #e8e2d7;
}
.world-map svg { width: 100%; height: 100%; display: block; }
.continent {
  fill: #c9c1b4;
  stroke: rgba(115,105,91,.25);
  stroke-width: 2;
}
.map-pins { position: absolute; inset: 0; }
.map-pin {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 9px;
  height: 9px;
  padding: 0;
  border: 2px solid #f3eee4;
  border-radius: 50%;
  background: #927b52;
  box-shadow: 0 0 0 1px #927b52, 0 2px 5px rgba(69,57,38,.3);
  cursor: default;
  transform: translate(-50%, -50%);
}
.map-pin::after {
  content: attr(data-place);
  position: absolute;
  left: 50%;
  bottom: 13px;
  padding: 3px 5px;
  border-radius: 2px;
  color: white;
  background: rgba(58,52,44,.86);
  font-size: .5rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(3px);
  transition: opacity .2s, transform .2s;
}
.map-pin:hover::after { opacity: 1; transform: translateX(-50%) translateY(0); }
.travel-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px 8px;
  margin-top: 25px;
}
.travel-list span,
.travel-memory-toggle {
  padding: 6px 10px;
  border: 1px solid #d1c8ba;
  border-radius: 16px;
  color: #6f685f;
  background: rgba(255,255,255,.48);
  font-size: .65rem;
  font-family: inherit;
}
.travel-memory {
  position: relative;
  display: inline-flex;
  align-items: center;
  z-index: 2;
}
.travel-memory-toggle {
  cursor: pointer;
}
.travel-memory.is-open .travel-memory-toggle {
  color: white;
  background: var(--sage);
}
.travel-memory-card {
  position: fixed;
  left: 50%;
  top: 50%;
  width: min(260px, 78vw);
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  transform: translate(-50%, -50%);
  z-index: 9999;
}
.travel-memory-card img {
  display: block;
  width: 100%;
  max-height: min(360px, 72vh);
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 14px 30px rgba(83,72,57,.18);
}
.travel-memory-close {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 6;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #5f564b;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 5px 14px rgba(83, 72, 57, .18);
  font: inherit;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

.closing {
  min-height: 520px;
  display: grid;
  place-content: center;
  text-align: center;
  color: white;
  background:
    linear-gradient(rgba(40,39,35,.35), rgba(40,39,35,.5)),
    url("assets/closing.webp") center 69% / cover;
}
.closing p { margin: 0; font: .66rem/1 var(--display); letter-spacing: .3em; }
.closing h2 { margin: 18px 0 12px; }
.closing span { font: .72rem/1 var(--display); letter-spacing: .25em; }
footer { padding: 30px 20px; text-align: center; background: #e7e3dc; }
footer button { border: 0; border-bottom: 1px solid #777; padding: 4px; background: transparent; cursor: pointer; font-size: .72rem; }
footer p { margin: 15px 0 0; color: #958e84; font: .6rem/1 var(--display); letter-spacing: .08em; }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s ease, transform .9s ease; }
.reveal.visible { opacity: 1; transform: none; }
.reveal .section-kicker,
.reveal > h2 {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.visible .section-kicker,
.reveal.visible > h2 {
  opacity: 1;
  transform: none;
}
.reveal.visible > h2 { transition-delay: .12s; }
.timeline-item {
  opacity: 0;
  transform: translateX(-10px);
  transition: opacity .55s ease, transform .55s ease;
}
.timeline.visible .timeline-item { opacity: 1; transform: none; }
.timeline.visible .timeline-item:nth-child(2) { transition-delay: .1s; }
.timeline.visible .timeline-item:nth-child(3) { transition-delay: .2s; }
.timeline.visible .timeline-item:nth-child(4) { transition-delay: .3s; }
.gallery-thumb {
  transform: translateY(5px);
}
.gallery.visible .gallery-thumb {
  transform: none;
}
@keyframes hero-arrival {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
@keyframes gate-pulse {
  0%, 100% { opacity: .58; }
  50% { opacity: 1; }
}
.lightbox {
  width: min(92vw, 500px);
  border: 0;
  padding: 0;
  background: transparent;
}
.lightbox::backdrop { background: rgba(20,20,18,.88); }
.lightbox button { position: fixed; top: 18px; right: 22px; border: 0; color: white; background: none; font-size: 2rem; cursor: pointer; }
.lightbox-image { width: 100%; aspect-ratio: 2 / 3; background-size: contain; background-position: center; background-repeat: no-repeat; background-color: #171715; }

@media (max-width: 380px) {
  .hero-topbar { min-height: 72px; padding: 3px 9px 3px 4px; }
  .quick-nav { gap: 6px; }
  .quick-nav a { font-size: .46rem; }
  .hero-monogram { width: 66px; height: 66px; }
  .section { padding-left: 25px; padding-right: 25px; }
  .gallery { padding-left: 12px; padding-right: 12px; }
  .gallery-main { height: 490px; }
  .rsvp { padding-left: 16px; padding-right: 16px; }
  .rsvp-form { padding-left: 16px; padding-right: 16px; }
  .attendance-section { gap: 0 8px; }
  .guest-count-grid { gap: 0 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-copy,
  .reveal .section-kicker,
  .reveal > h2,
  .timeline-item,
  .gallery-thumb {
    opacity: 1;
    transform: none;
    animation: none;
    transition: none;
  }
}
