:root {
  --bg: #1d1709;
  --ink: #2c2620;
  --ink-soft: #6b5f4e;
  --gold: #b48a52;
  --gold-soft: #d8bd8f;
  --cream-text: #fbf5ea;
  --serif: 'Cormorant Garamond', 'Georgia', serif;
  --sans: 'Cormorant Garamond', 'Georgia', serif;
  --script: 'Rouge Script', 'Cormorant Garamond', cursive;
  --script-2: 'Pinyon Script', 'Cormorant Garamond', cursive;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  overflow-x: hidden;
}

/* ---------- Story section (shared) ---------- */

.story {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.story-photo {
  position: absolute;
  inset: 0;
  transform: scale(1.08);
  transition: transform 3.2s cubic-bezier(.19, 1, .22, 1);
  will-change: transform;
}

.story.in-view .story-photo {
  transform: scale(1);
}

.story-photo::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--bg-image);
  background-size: cover;
  background-position: center;
  opacity: 0.7;
}

.story-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
    rgba(20, 14, 8, 0.48) 0%,
    rgba(20, 14, 8, 0.2) 32%,
    rgba(20, 14, 8, 0.24) 60%,
    rgba(20, 14, 8, 0.62) 100%);
  transition: opacity 0.6s ease, background-color 0.6s ease;
}

.story-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 640px;
  padding: 9vh 8vw;
  text-align: center;
  color: var(--cream-text);
}

/* ---------- Reveal animation ---------- */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s ease, transform 0.9s ease;
  transition-delay: calc(var(--i, 0) * 0.14s);
}

.story.in-view .reveal {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Section 1: Hero ---------- */

.eyebrow {
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(11px, 1.6vw, 13px);
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin: 0 0 18px;
}

.names {
  font-family: var(--script);
  font-weight: 400;
  font-size: clamp(54px, 12vw, 98px);
  line-height: 1.15;
  margin: 0 0 18px;
}

.names .amp {
  color: var(--gold-soft);
  font-size: 0.75em;
  padding: 0 10px;
}

.subtitle {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(16px, 2.4vw, 20px);
  margin: 0 0 28px;
  color: var(--cream-text);
}

.date-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.date-line {
  height: 1px;
  width: 40px;
  background: var(--gold-soft);
}

.date-text {
  font-family: var(--sans);
  font-weight: 500;
  letter-spacing: 3px;
  font-size: clamp(14px, 2vw, 17px);
  color: var(--gold-soft);
}

.scroll-cue {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  transition: opacity 0.5s ease;
}

.scroll-cue span {
  display: block;
  width: 12px;
  height: 12px;
  border-right: 1.5px solid var(--cream-text);
  border-bottom: 1.5px solid var(--cream-text);
  transform: rotate(45deg);
  animation: cue-bounce 2s ease-in-out infinite;
  opacity: 0.85;
}

.scroll-cue.hide {
  opacity: 0;
  pointer-events: none;
}

@keyframes cue-bounce {
  0%, 100% { transform: rotate(45deg) translate(0, 0); }
  50% { transform: rotate(45deg) translate(6px, 6px); }
}

/* Mobile only: eyebrow pinned to top, names centered, footer pinned to bottom */
@media (max-width: 899.98px) {
  #hero .story-content {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  #hero .eyebrow {
    position: absolute;
    top: 7vh;
    left: 8vw;
    right: 8vw;
    margin: 0;
  }

  #hero .hero-footer {
    position: absolute;
    bottom: 7vh;
    left: 8vw;
    right: 8vw;
  }
}

/* ---------- Section 2: Schedule ---------- */

.section-title {
  font-family: var(--script-2);
  font-weight: 400;
  font-size: clamp(36px, 6.5vw, 54px);
  margin: 0 0 8vh;
}

.events {
  display: flex;
  flex-direction: column;
  gap: 38px;
  text-align: left;
}

.event {
  display: flex;
  align-items: flex-start;
  gap: 18px;
}

.event-icon {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border: 1px solid var(--gold-soft);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-soft);
}

.event-icon svg {
  width: 22px;
  height: 22px;
}

.event-body h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(20px, 2.8vw, 24px);
  margin: 2px 0 4px;
  color: var(--cream-text);
}

.event-time {
  font-family: var(--sans);
  font-weight: 500;
  letter-spacing: 1px;
  font-size: 13px;
  color: var(--gold-soft);
  margin: 0 0 4px;
}

.event-place {
  font-family: var(--sans);
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--cream-text);
  opacity: 0.9;
  text-decoration: underline;
  text-decoration-color: var(--gold-soft);
  text-underline-offset: 3px;
  display: inline-block;
}

.event-place:hover {
  color: var(--gold-soft);
}

.event-place-plain {
  text-decoration: none;
  pointer-events: none;
}

/* ---------- Section 3: RSVP ---------- */

.story-content-center {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.rsvp-intro {
  font-family: var(--serif);
  font-size: clamp(19px, 2.8vw, 24px);
  line-height: 1.5;
  margin: 0 0 80px;
}

.rsvp-contacts {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin-bottom: 72px;
}

.rsvp-contact {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--cream-text);
  text-decoration: none;
  transition: color 0.25s ease;
}

.rsvp-contact:hover {
  color: var(--gold-soft);
}

.rsvp-name {
  font-family: var(--sans);
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  font-size: 18px;
  color: var(--gold-soft);
}

.rsvp-number {
  font-family: var(--serif);
  font-size: clamp(30px, 4.5vw, 39px);
}

.rsvp-closing {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(17px, 2.4vw, 21px);
  margin: 0 0 14px;
}

.heart {
  color: var(--gold-soft);
  animation: heartbeat 1.8s ease-in-out infinite;
}

.heart svg {
  width: 26px;
  height: 26px;
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  25% { transform: scale(1.15); }
  40% { transform: scale(0.98); }
  55% { transform: scale(1.1); }
}

/* ---------- Section 4: Verse ---------- */

.quote {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(20px, 3.4vw, 30px);
  line-height: 1.55;
  margin: 0 0 24px;
}

.quote-ref {
  font-family: var(--sans);
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-size: 12.5px;
  color: var(--gold-soft);
  margin: 0;
}

/* ---------- Desktop split layout ---------- */

@media (min-width: 900px) {

  .story {
    flex-direction: row;
    align-items: stretch;
    height: 100vh;
    min-height: 0;
  }

  .story:nth-of-type(even) {
    flex-direction: row-reverse;
  }

  .story-photo {
    position: relative;
    inset: auto;
    flex: 0 0 50%;
    width: 50%;
    height: 100%;
    transform: scale(1.08);
  }

  .story-scrim {
    background: rgba(20, 14, 8, 0.32);
  }

  .story-content {
    flex: 0 0 50%;
    width: 50%;
    max-width: none;
    height: 100%;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
    align-items: flex-start;
    background: var(--bg);
    padding: 6vh 6vw;
  }

  .story-content-center {
    align-items: flex-start;
    text-align: left;
  }

  .story-content > * {
    max-width: 460px;
  }

  .events,
  .rsvp-contacts {
    max-width: 460px;
  }

  .section-title {
    margin-bottom: 6vh;
  }

  .scroll-cue {
    display: none;
  }
}
