:root {
  --bg: #faf6f0;
  --bg-warm: #f3eade;
  --ink: #2c1810;
  --ink-soft: #5b4436;
  --gold: #c9996b;
  --rose: #d4a59a;
  --line: rgba(44, 24, 16, 0.2);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Cormorant Garamond", "Times New Roman", serif;
  background: var(--bg);
  color: var(--ink);
  font-weight: 300;
  font-size: 18px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

/* ---------- HERO ---------- */
.hero {
  position: relative;
  height: 100vh;
  min-height: 640px;
  width: 100%;
  overflow: hidden;
  background: #1a0f0a;
}

.hero-photo {
  position: absolute;
  inset: 0;
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  animation: slowZoom 14s ease-out forwards;
}

@keyframes slowZoom {
  from { transform: scale(1.08); }
  to   { transform: scale(1); }
}

.hero-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(20,10,5,.25) 0%, rgba(20,10,5,0) 35%, rgba(20,10,5,0) 55%, rgba(20,10,5,.55) 100%),
    radial-gradient(ellipse at center, rgba(0,0,0,0) 40%, rgba(0,0,0,.35) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff4e4;
  text-align: center;
  padding: 0 24px;
  animation: fadeUp 1.6s ease .3s both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-tag {
  font-family: "Parisienne", cursive;
  font-size: 22px;
  letter-spacing: .04em;
  opacity: .9;
  margin-bottom: 18px;
}

.names {
  font-family: "Parisienne", cursive;
  font-weight: 400;
  font-size: clamp(54px, 12vw, 130px);
  line-height: 1;
  letter-spacing: .01em;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .2em;
  text-shadow: 0 2px 24px rgba(0,0,0,.35);
}

.names em {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-weight: 300;
  font-size: .55em;
  opacity: .75;
  margin: 0 .05em;
}

.hero-date {
  margin-top: 24px;
  font-family: "Cormorant Garamond", serif;
  font-weight: 300;
  font-size: 20px;
  letter-spacing: .5em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 16px;
  opacity: .92;
  padding-left: .5em;
}

.hero-date .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  opacity: .7;
}

.scroll-cue {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 42px;
  border: 1px solid rgba(255,244,228,.6);
  border-radius: 14px;
  display: block;
}
.scroll-cue span {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 8px;
  background: rgba(255,244,228,.8);
  border-radius: 2px;
  animation: scrollDot 1.8s ease-in-out infinite;
}
@keyframes scrollDot {
  0%   { opacity: 0; transform: translate(-50%, 0); }
  30%  { opacity: 1; }
  80%  { opacity: 0; transform: translate(-50%, 14px); }
  100% { opacity: 0; }
}

/* ---------- GENERAL ---------- */
.kicker {
  font-family: "Cormorant Garamond", serif;
  text-transform: uppercase;
  letter-spacing: .45em;
  font-size: 12px;
  color: var(--gold);
  font-weight: 400;
  padding-left: .45em;
}
.kicker.light { color: #e9d8c7; }

/* ---------- STORY ---------- */
.story {
  padding: 140px 24px 120px;
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}

.story .kicker { margin-bottom: 24px; }

.story-title {
  font-family: "Cormorant Garamond", serif;
  font-weight: 300;
  font-size: clamp(36px, 6vw, 58px);
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: 32px;
}
.story-title em {
  font-family: "Parisienne", cursive;
  font-style: normal;
  color: var(--gold);
  font-weight: 400;
  font-size: 1.15em;
}

.story-text {
  font-size: 20px;
  color: var(--ink-soft);
  font-style: italic;
  font-weight: 300;
}

.divider {
  margin-top: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  color: var(--gold);
  font-size: 18px;
}
.divider span {
  display: block;
  width: 80px;
  height: 1px;
  background: var(--line);
}

/* ---------- GALLERY ---------- */
.gallery {
  padding: 40px 24px 120px;
  max-width: 1200px;
  margin: 0 auto;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 180px;
  gap: 14px;
}

.g-item {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  background: #ddd0c2;
  grid-column: span 2;
  grid-row: span 2;
}

.g-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s ease;
}
.g-item:hover img { transform: scale(1.04); }

.g-tall { grid-row: span 3; }
.g-wide { grid-column: span 3; }

.g-item figcaption {
  position: absolute;
  left: 20px;
  bottom: 18px;
  right: 20px;
  font-family: "Parisienne", cursive;
  font-size: 24px;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0,0,0,.5);
}

@media (max-width: 820px) {
  .gallery {
    padding: 20px 14px 80px;
  }
  .gallery-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
    gap: 12px;
  }
  .g-item,
  .g-item.g-wide,
  .g-item.g-tall {
    grid-column: 1;
    grid-row: auto;
    aspect-ratio: auto;
    height: auto;
  }
  .g-item img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
  }
  .g-item figcaption {
    font-size: 22px;
    left: 16px;
    right: 16px;
    bottom: 16px;
  }
}

/* ---------- DETAILS ---------- */
.details {
  padding: 100px 24px 140px;
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  background:
    radial-gradient(ellipse at top, rgba(201,153,107,.08), transparent 70%),
    var(--bg);
}

.details .kicker { margin-bottom: 20px; }

.details-title {
  font-family: "Parisienne", cursive;
  font-weight: 400;
  font-size: clamp(48px, 8vw, 78px);
  color: var(--gold);
  margin-bottom: 70px;
}

.timeline {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  margin-bottom: 90px;
}

.t-item {
  text-align: center;
}
.t-time {
  font-family: "Parisienne", cursive;
  font-size: 32px;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 6px;
}
.t-item h3 {
  font-family: "Cormorant Garamond", serif;
  font-weight: 400;
  font-size: 24px;
  letter-spacing: .02em;
  margin-bottom: 4px;
}
.t-place {
  color: var(--ink-soft);
  font-style: italic;
  font-size: 16px;
}
.t-line {
  width: 1px;
  height: 36px;
  background: var(--line);
}

.dresscode {
  margin-bottom: 70px;
}
.dresscode .kicker { margin-bottom: 14px; }
.dresscode h3 {
  font-family: "Cormorant Garamond", serif;
  font-weight: 300;
  font-style: italic;
  font-size: 24px;
  margin-bottom: 22px;
  color: var(--ink-soft);
}
.colors {
  display: flex;
  justify-content: center;
  gap: 12px;
}
.colors span {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.08);
}

.rsvp {
  display: inline-block;
  padding: 16px 46px;
  border: 1px solid var(--ink);
  color: var(--ink);
  text-decoration: none;
  font-family: "Cormorant Garamond", serif;
  letter-spacing: .35em;
  text-transform: uppercase;
  font-size: 13px;
  transition: all .35s ease;
}
.rsvp:hover {
  background: var(--ink);
  color: var(--bg);
  letter-spacing: .4em;
}

/* ---------- FINALE ---------- */
.finale {
  position: relative;
  height: 100vh;
  background: #ffffff;
  overflow: hidden;
}

.finale-track {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #ffffff;
}

.stage {
  position: absolute;
  inset: 0;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  will-change: transform, opacity;
  transform: translateY(100%);
  opacity: 0;
  transition:
    transform 1.05s cubic-bezier(.22,.61,.36,1),
    opacity .55s ease;
  z-index: 1;
}

.stage.active {
  transform: translateY(0);
  opacity: 1;
  z-index: 3;
}

/* parallax: previous stage moves up slower than scroll, stays partly visible */
.stage.past {
  transform: translateY(-22%);
  opacity: 0;
  z-index: 2;
}

.s-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #ffffff;
}

.stage-t {
  padding: 0 24px;
}

.missing {
  text-align: center;
  color: var(--ink);
  max-width: 760px;
}
.missing-mark {
  display: inline-block;
  color: var(--gold);
  font-size: 24px;
  margin-bottom: 30px;
  opacity: .7;
}
.missing h2 {
  font-family: "Cormorant Garamond", serif;
  font-weight: 300;
  font-size: clamp(42px, 7.5vw, 84px);
  line-height: 1.12;
  margin-bottom: 32px;
  letter-spacing: .005em;
}
.missing h2 em {
  font-family: "Parisienne", cursive;
  font-style: normal;
  color: var(--gold);
  font-size: 1.15em;
}
.missing-sub {
  font-family: "Parisienne", cursive;
  font-size: clamp(28px, 4vw, 40px);
  color: var(--rose);
}

/* ---------- FOOTER ---------- */
.foot {
  padding: 42px 24px;
  text-align: center;
  background: #ffffff;
  color: var(--ink-soft);
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  letter-spacing: .06em;
  font-size: 15px;
  border-top: 1px solid var(--line);
}

/* ---------- REVEAL ON SCROLL ---------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1.2s ease, transform 1.2s ease;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- PERSONAL NOTE (per-guest message) ---------- */
.personal-note {
  max-width: 580px;
  margin: 48px auto 0;
  padding: 36px 32px 30px;
  background: linear-gradient(180deg, #fffaf1 0%, #fbf3e5 100%);
  border: 1px solid rgba(201, 153, 107, .25);
  border-radius: 6px;
  position: relative;
  text-align: center;
  box-shadow: 0 10px 30px rgba(122, 90, 50, .08), inset 0 1px 0 rgba(255,255,255,.7);
}
.personal-note::before,
.personal-note::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  height: 1px;
  background: rgba(201,153,107,.3);
}
.personal-note::before { top: 10px; }
.personal-note::after  { bottom: 10px; }

.personal-note-mark {
  display: block;
  color: var(--gold);
  font-size: 22px;
  margin-bottom: 18px;
  opacity: .75;
}
.personal-note-text {
  font-family: "Cormorant Garamond", serif;
  font-weight: 300;
  font-style: italic;
  font-size: 20px;
  line-height: 1.55;
  color: var(--ink);
  white-space: pre-wrap;
}
.personal-note-sign {
  margin-top: 22px;
  font-family: "Parisienne", cursive;
  color: var(--gold);
  font-size: 22px;
}
@media (max-width: 640px) {
  .personal-note {
    margin: 36px 8px 0;
    padding: 30px 22px 24px;
  }
  .personal-note-text { font-size: 18px; }
}

/* ---------- PERSONAL GUEST LINE ---------- */
.hero-guest {
  margin-top: 18px;
  font-family: "Parisienne", cursive;
  font-size: clamp(22px, 3.2vw, 30px);
  color: #fff4e4;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 1s ease .8s, transform 1s ease .8s;
  text-shadow: 0 2px 16px rgba(0,0,0,.35);
  min-height: 1em;
}
.hero-guest.shown {
  opacity: .95;
  transform: translateY(0);
}

.rsvp-hint {
  display: block;
  text-align: center;
  color: var(--ink-soft);
  font-style: italic;
  font-size: 14px;
  margin-top: 14px;
  opacity: .75;
}
.rsvp-hint.hidden { display: none; }

/* Style the RSVP button (it's a <button> now, not an <a>) */
button.rsvp {
  cursor: pointer;
  background: transparent;
  font-family: "Cormorant Garamond", serif;
}

.rsvp-guest {
  display: block;
  margin-bottom: 14px;
  font-family: "Parisienne", cursive;
  font-size: 26px;
  color: var(--gold);
}

/* ---------- RSVP MODAL ---------- */
.rsvp-modal {
  position: fixed;
  inset: 0;
  background: rgba(20, 12, 6, .55);
  display: grid;
  place-items: center;
  padding: 24px;
  z-index: 1000;
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s ease;
}
.rsvp-modal:not(.hidden) {
  opacity: 1;
  pointer-events: auto;
}

.rsvp-card {
  background: var(--bg);
  border-radius: 14px;
  padding: 44px 36px 36px;
  width: 100%;
  max-width: 460px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
  text-align: center;
  transform: translateY(20px) scale(.97);
  transition: transform .4s cubic-bezier(.22,.61,.36,1);
}
.rsvp-modal:not(.hidden) .rsvp-card {
  transform: translateY(0) scale(1);
}

.rsvp-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  font-size: 26px;
  color: var(--ink-soft);
  cursor: pointer;
  line-height: 1;
}
.rsvp-close:hover { color: var(--ink); }

.rsvp-card h3 {
  font-family: "Cormorant Garamond", serif;
  font-weight: 300;
  font-size: 28px;
  margin-bottom: 10px;
}
.rsvp-greeting {
  font-family: "Parisienne", cursive;
  font-size: 28px;
  color: var(--gold);
  margin-bottom: 24px;
  min-height: 1em;
}

.rsvp-choose {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}
.rsvp-pick {
  flex: 1;
  padding: 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font-family: "Cormorant Garamond", serif;
  font-size: 16px;
  letter-spacing: .05em;
  cursor: pointer;
  transition: all .25s ease;
}
.rsvp-pick:hover { border-color: var(--gold); color: var(--gold); }
.rsvp-pick.active {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

.rsvp-extra { text-align: left; }
.rsvp-count {
  margin-bottom: 18px;
}
.rsvp-count label,
.rsvp-msg {
  display: block;
  font-family: "Cormorant Garamond", serif;
  font-size: 14px;
  color: var(--ink-soft);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.rsvp-count-pick {
  display: flex;
  gap: 8px;
}
.rsvp-count-pick button {
  flex: 1;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font-family: "Cormorant Garamond", serif;
  font-size: 16px;
  cursor: pointer;
  transition: all .2s ease;
}
.rsvp-count-pick button.active {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

.rsvp-msg textarea {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fffcf7;
  font-family: "Cormorant Garamond", serif;
  font-size: 16px;
  color: var(--ink);
  resize: vertical;
  min-height: 70px;
}
.rsvp-msg textarea:focus {
  outline: none;
  border-color: var(--gold);
}
.rsvp-msg {
  text-transform: none;
  letter-spacing: normal;
  font-style: italic;
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 14px;
  margin-bottom: 20px;
}

.rsvp-submit {
  width: 100%;
  padding: 14px;
  border: none;
  background: var(--ink);
  color: var(--bg);
  font-family: "Cormorant Garamond", serif;
  letter-spacing: .35em;
  text-transform: uppercase;
  font-size: 13px;
  border-radius: 10px;
  cursor: pointer;
  transition: background .2s ease;
}
.rsvp-submit:hover { background: #000; }

.rsvp-status {
  margin-top: 16px;
  font-style: italic;
  color: var(--ink-soft);
  font-size: 14px;
  min-height: 1em;
}
.rsvp-status.ok { color: var(--gold); }
.rsvp-status.err { color: #b24c4c; }

.hidden { display: none !important; }
