/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', sans-serif;
  color: #1A1A1A;
  background-color: #F6F0EA;
  overflow-x: hidden;
  line-height: 1.7;
}

/* ============================================
   REVEAL ANIMATIONS
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-100px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(100px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-scale.visible {
  opacity: 1;
  transform: scale(1);
}

/* ============================================
   NAVIGATION
   ============================================ */
.navbar {
  position: fixed;
  top: 16px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  padding: 0 16px;
  z-index: 1000;
  opacity: 0;
  /* The full-width bar itself never intercepts clicks — only its pill does
     (see .navbar.visible .navbar-inner). A transform here would make this the
     containing block for the position:fixed mobile menu, collapsing it. */
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.navbar.visible {
  opacity: 1;
}

.navbar.visible .navbar-inner {
  pointer-events: auto;
}

.navbar-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 12px 28px;
  border-radius: 50px;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.nav-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  font-weight: 600;
  color: #1A1A1A;
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-link {
  font-size: 13px;
  color: #555;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-link:hover {
  color: #1A1A1A;
}

.nav-cta {
  background: #222;
  color: white;
  border: none;
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: background 0.2s;
}

.nav-cta:hover {
  background: #000;
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  /* Sit above the fullscreen menu overlay so it can toggle the menu closed. */
  position: relative;
  z-index: 1001;
}

.nav-hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: #1A1A1A;
  transition: transform 0.3s, opacity 0.3s;
}

.nav-hamburger.open span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-hamburger.open span:nth-child(2) {
  opacity: 0;
}

.nav-hamburger.open span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  height: 100vh;
  overflow: hidden;
}

.hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.hero-content {
  position: absolute;
  bottom: 15%;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  z-index: 1;
}

.hero-names {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 300;
  font-size: clamp(48px, 8vw, 96px);
  color: white;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.3);
  white-space: nowrap;
}

.hero-scroll-hint {
  position: absolute;
  bottom: 24px;
  right: 32px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: white;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2px;
  opacity: 0.8;
  z-index: 1;
}

/* ============================================
   TRANSITION TEXT
   ============================================ */
.transition-text {
  padding: 24px 24px;
  text-align: center;
}

.transition-phrase {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: clamp(24px, 4vw, 36px);
  color: rgba(26, 26, 26, 0.4);
  max-width: 700px;
  margin: 0 auto;
}

/* ============================================
   OUR STORY
   ============================================ */
.our-story {
  padding: 32px 24px;
  max-width: 1100px;
  margin: 0 auto;
}

.section-heading {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(48px, 8vw, 96px);
  font-weight: 300;
  text-align: center;
  margin-bottom: 28px;
  text-transform: lowercase;
}

.chapter {
  display: flex;
  align-items: center;
  gap: 36px;
  margin-bottom: 20px;
}

.chapter-text-left .chapter-text { order: 1; }
.chapter-text-left .polaroid-stack { order: 2; }
.chapter-text-right .polaroid-stack { order: 1; }
.chapter-text-right .chapter-text { order: 2; }

.chapter-text {
  flex: 1;
}

.chapter-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 16px;
  color: #1A1A1A;
}

.chapter-body {
  font-size: 17px;
  line-height: 1.8;
  color: #444;
}

/* ============================================
   POLAROID STACKS
   ============================================ */
.polaroid-stack {
  flex: 1;
  position: relative;
  height: 380px;
  max-width: 320px;
}

.polaroid {
  position: absolute;
  width: 280px;
  background: white;
  padding: 12px 12px 40px 12px;
  border-radius: 4px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  transform: rotate(var(--rotation, 0deg));
  transition: transform 0.6s ease, opacity 0.6s ease;
  left: 50%;
  top: 50%;
  margin-left: -140px;
  margin-top: -200px;
}

img.polaroid-image {
  width: 100%;
  height: 220px;
  border-radius: 2px;
  object-fit: cover;
  display: block;
}

/* F1 race-day shot is a tall portrait with lots of sky; drop the crop so
   the two of us sit centred in the frame. */
img.polaroid-image[src$="4th Polaroid.jpeg"] {
  object-position: center 72%;
}

/* Active photo on top, others behind */
.polaroid[data-index="0"] { z-index: 2; }
.polaroid[data-index="1"] { z-index: 1; }

/* Photos flick away from the centre: right-side stacks fly right, and
   left-side stacks (in text-right chapters) fly left. */
.polaroid.dismissed {
  transform: translateX(120%) rotate(15deg);
  opacity: 0;
}

.chapter-text-right .polaroid.dismissed {
  transform: translateX(-120%) rotate(-15deg);
}

/* ============================================
   DATE + COUNTDOWN
   ============================================ */
.date-section {
  padding: 24px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.date-heading {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(48px, 8vw, 96px);
  font-weight: 700;
  text-transform: lowercase;
  margin-bottom: 24px;
}

.countdown {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 8px;
}

.countdown-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 80px;
}

.countdown-number {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 600;
  line-height: 1;
}

.countdown-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #888;
  margin-top: 8px;
}

.countdown-separator {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 300;
  color: #ccc;
  line-height: 1;
}

/* ============================================
   VENUE / LOCATION
   ============================================ */
.venue {
  padding: 80px 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.venue-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.venue-content {
  text-align: left;
}

.venue-detail {
  font-size: 16px;
  letter-spacing: 1px;
  color: #6b6b6b;
  margin-bottom: 28px;
}

.venue-rsvp-invite {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 19px;
  color: #8a7a5a;
  margin-bottom: 20px;
}

.venue-heading {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 32px;
  color: #3a3a3a;
}

.venue-heading-script {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 300;
  color: #8a7a5a;
}

.venue-cta {
  background: transparent;
  color: #6b6b6b;
  border: 1px solid #b0a58a;
  padding: 12px 36px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 1.5px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  text-transform: uppercase;
  transition: background 0.3s, color 0.3s;
  margin-top: 12px;
}

.venue-cta:hover {
  background: #b0a58a;
  color: #fff;
}

.venue-image-wrapper {
  position: relative;
}

.venue-image {
  width: 100%;
  height: 520px;
  border-radius: 4px;
  object-fit: cover;
  display: block;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.08);
}

@media (max-width: 768px) {
  .venue-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .venue-content {
    text-align: center;
  }

  .venue-image {
    height: 350px;
  }
}

.rsvp-inline-btn {
  background: linear-gradient(135deg, #C8A96E, #B8956A);
  color: white;
  border: none;
  padding: 14px 40px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: transform 0.2s, box-shadow 0.2s;
}

.rsvp-inline-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(200, 169, 110, 0.4);
}

.rsvp-deadline {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #888;
  margin-top: 16px;
}

/* ============================================
   FURTHER DETAILS
   ============================================ */
.details {
  padding: 56px 24px;
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}

/* ============================================
   FAQ
   ============================================ */
.faq {
  padding: 56px 24px;
  max-width: 1100px;
  margin: 0 auto;
}

.faq-layout {
  display: flex;
  gap: 48px;
  align-items: flex-start;
}

.faq-left {
  flex: 0 0 280px;
  position: sticky;
  top: 100px;
}

.faq-heading {
  font-family: 'Cormorant Garamond', serif;
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 16px;
}

.faq-contact-text {
  font-size: 15px;
  color: #888;
  margin-bottom: 4px;
}

.faq-contact-link {
  font-size: 15px;
  color: #1A1A1A;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.faq-right {
  flex: 1;
}

.faq-item {
  border-bottom: 1px solid #eee;
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  background: none;
  border: none;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  color: #1A1A1A;
  cursor: pointer;
  text-align: left;
  gap: 16px;
}

.faq-chevron {
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.faq-question[aria-expanded="true"] .faq-chevron {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.faq-answer p {
  padding: 0 0 20px;
  color: #666;
  font-size: 15px;
  line-height: 1.7;
}

/* ============================================
   FOOTER
   ============================================ */
.footer-image {
  position: relative;
  height: 70vh;
  margin-top: 32px;
  overflow: hidden;
}

.footer-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 65%;
}

.footer-quote {
  position: absolute;
  bottom: 60px;
  left: 48px;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: clamp(24px, 3.5vw, 36px);
  color: #1A1A1A;
  text-shadow: 0 1px 16px rgba(255, 255, 255, 0.6);
  line-height: 1.4;
  max-width: 600px;
}

/* ============================================
   RSVP MODAL
   ============================================ */
.rsvp-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.rsvp-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.rsvp-modal {
  background: #FAF8F5;
  border-radius: 20px;
  padding: 48px;
  max-width: 480px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.rsvp-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  font-size: 32px;
  color: #888;
  cursor: pointer;
  line-height: 1;
}

.rsvp-heading {
  font-family: 'Cormorant Garamond', serif;
  font-size: 32px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 4px;
}

.rsvp-subtitle {
  text-align: center;
  color: #888;
  font-style: italic;
  margin-bottom: 28px;
  font-size: 15px;
}

.rsvp-section-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #B8956A;
  font-weight: 600;
  margin-bottom: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #eee;
}

.rsvp-section-label:first-of-type {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #999;
  margin-bottom: 6px;
}

.form-group input[type="text"],
.form-group input[type="email"] {
  width: 100%;
  border: 1px solid #ddd;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  background: white;
  color: #1A1A1A;
  transition: border-color 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: #B8956A;
}

.form-group input.error {
  border-color: #e74c3c;
}

.rsvp-partner-absent-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.rsvp-partner-absent-row label {
  margin: 0;
  font-size: 13px;
  text-transform: none;
  letter-spacing: 0;
  color: #1A1A1A;
  cursor: pointer;
}

.rsvp-partner-absent-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #B8956A;
  cursor: pointer;
}

.form-group input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #f5f5f5;
}

.rsvp-poll {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.rsvp-poll-option {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rsvp-poll-option label {
  margin: 0;
  font-size: 13px;
  text-transform: none;
  letter-spacing: 0;
  color: #1A1A1A;
  cursor: pointer;
}

.rsvp-poll-checkbox {
  width: 16px;
  height: 16px;
  accent-color: #B8956A;
  cursor: pointer;
}

.rsvp-toggle {
  display: flex;
  gap: 12px;
}

.rsvp-toggle-btn {
  flex: 1;
  border: 2px solid #ddd;
  padding: 12px;
  border-radius: 8px;
  text-align: center;
  background: white;
  color: #999;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.rsvp-toggle-btn.active {
  border-color: #1A1A1A;
  background: #1A1A1A;
  color: white;
}

.rsvp-submit {
  width: 100%;
  background: linear-gradient(135deg, #C8A96E, #B8956A);
  color: white;
  border: none;
  padding: 14px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  margin-top: 8px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.rsvp-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(200, 169, 110, 0.4);
}

.rsvp-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.rsvp-result {
  text-align: center;
  padding: 40px 0;
}

.rsvp-result-message {
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px;
  font-weight: 600;
  color: #1A1A1A;
  line-height: 1.5;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  /* backdrop-filter establishes a containing block for fixed descendants,
     which would trap the fullscreen menu inside the pill. Drop it on mobile —
     the pill background is near-opaque, so the frosted effect isn't missed. */
  .navbar-inner {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.97);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
    z-index: 999;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-link {
    font-size: 18px;
  }

  .nav-hamburger {
    display: flex;
  }

  .chapter {
    flex-direction: column;
    gap: 40px;
  }

  /* Every chapter reads text → photos on mobile, regardless of which side the
     photos sit on at desktop widths (chapter two is markup-ordered photo-first). */
  .chapter-text-left .chapter-text,
  .chapter-text-right .chapter-text {
    order: 0;
  }

  .chapter-text-left .polaroid-stack,
  .chapter-text-right .polaroid-stack {
    order: 1;
  }

  .polaroid-stack {
    /* In the column layout flex:1 would govern the (main-axis) height with a
       0 basis; since the polaroids are absolutely positioned there's no
       in-flow content, so the stack would collapse to 0 and the photos float
       up over the text. Pin an explicit height instead. */
    flex: none;
    max-width: 100%;
    height: 300px;
  }

  /* Centre the polaroid inside its stack so it can't overflow up onto the
     chapter text above it. Height ≈ 12 (top pad) + 220 (image) + 40 (bottom
     pad) = 272px, so a -136px top margin centres it. */
  .polaroid {
    left: 50%;
    margin-left: -130px;
    margin-top: -136px;
    width: 260px;
  }

  .faq-layout {
    flex-direction: column;
    gap: 40px;
  }

  .faq-left {
    position: static;
    flex: none;
  }

  .footer-quote {
    left: 24px;
    bottom: 32px;
    right: 24px;
  }

  .rsvp-overlay {
    align-items: flex-end;
  }

  .rsvp-modal {
    border-radius: 20px 20px 0 0;
    max-height: 85vh;
    width: 100%;
    max-width: 100%;
  }
}

/* ---- Narrow phones: keep the countdown on one line ---- */
@media (max-width: 480px) {
  .countdown {
    gap: 4px;
  }

  .countdown-unit {
    min-width: 62px;
  }
}

@media (max-width: 360px) {
  .countdown-unit {
    min-width: 50px;
  }

  .countdown-number,
  .countdown-separator {
    font-size: 28px;
  }

  .countdown-label {
    font-size: 9px;
    letter-spacing: 1px;
  }

  .hero-names {
    font-size: 42px;
  }
}

