/* ── Base ─────────────────────────────────────────────── */
:root {
  --blue: #262626;
  --blush: #F0C2C3;
  --blush-dark: #F0C2C3;
  --font-body: 'Work Sans', sans-serif;
  --font-script: 'Aboreto', cursive;
}

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

html { scroll-behavior: smooth; }

body {
  background-color: var(--blush);
  color: var(--blue);
  font-family: var(--font-body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── Typography ─────────────────────────────────────── */
.font-script { font-family: var(--font-script); }

/* ── Sections ───────────────────────────────────────── */
section { position: relative; overflow: hidden; }

/* ── Scroll-reveal animations ───────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.35s; }
.reveal-delay-4 { transition-delay: 0.5s; }
.reveal-delay-5 { transition-delay: 0.65s; }

/* ── Hero section ────────────────────────────────────── */
.hero-section {
  height: 97svh;
  min-height: 600px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 16px 16px 16px;
  text-align: center;
  background-color: var(--blush);
  position: relative;
}

.hero-intro {
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0.01em;
  color: var(--blue);
  margin-bottom: 12px;
}

.hero-intro-names {
  font-family: var(--font-script);
  font-size: 3rem;
  font-weight: 400;
  line-height: 1.15;
  color: var(--blue);
  text-align: center;
}

.hero-names {
  width: min(260px, 88vw);
  margin: 0 auto 24px;
}

.hero-illustration-wrapper {
  position: relative;
  width: min(320px, 90vw);
  margin: 0 auto 24px;
  will-change: transform;
}

.hero-illustration-wrapper img,
.hero-illustration-video {
  width: 100%;
  height: auto;
  display: block;
}

.hero-illustration-video {
  border: 0;
  background: transparent;
}

.hero-ribbon {
  width: 100px;
  margin: 0 auto 20px;
  margin-top: 20px;
}

.hero-date {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.0em;
  margin-bottom: 4px;
}

.hero-venue {
  font-size: 0.875rem;
  font-weight: 400;
  opacity: 0.85;
  margin-bottom: 16px;
}

.hero-chevron {
  width: 28px;
  animation: float-down 2.2s ease-in-out infinite;
  cursor: pointer;
  opacity: 0.7;
}

@keyframes float-down {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(9px); }
}

/* ── Floating decorative elements ───────────────────── */
@keyframes hero-float-a {
  0%, 100% { transform: translateY(0px)   rotate(-6deg); }
  50%       { transform: translateY(-14px) rotate(6deg);  }
}
@keyframes hero-float-b {
  0%, 100% { transform: translateY(0px)  rotate(8deg);  }
  50%       { transform: translateY(-10px) rotate(-4deg); }
}
@keyframes hero-float-c {
  0%, 100% { transform: translateY(0px) rotate(0deg);   }
  35%       { transform: translateY(-9px) rotate(12deg); }
  70%       { transform: translateY(5px)  rotate(-9deg); }
}

.hero-float {
  position: absolute;
  pointer-events: none;
  will-change: transform;
}

/* Stars — subtle dark tint */
.hero-float img  { opacity: 0.55; }
/* Hearts — soft pink */
.hero-float svg  { color: #C9778A; opacity: 0.55; }

/* Positions + individual animation assignments
   Spread organically across the full hero — not just edges */
/* — top zone (above intro text) — */
.hero-float--1  { top:  3%; left:  7%; animation: hero-float-a 4.6s ease-in-out infinite 0.0s; }
.hero-float--2  { top:  4%; left: 50%; animation: hero-float-b 5.3s ease-in-out infinite 1.8s; }
.hero-float--3  { top:  6%; right: 8%; animation: hero-float-c 3.5s ease-in-out infinite 2.4s; }
.hero-float--4  { top: 14%; left: 24%; animation: hero-float-a 5.8s ease-in-out infinite 0.4s; }
.hero-float--5  { top: 17%; right:20%; animation: hero-float-b 4.2s ease-in-out infinite 3.2s; }
/* — mid-upper (beside names) — */
.hero-float--6  { top: 25%; left:  5%; animation: hero-float-c 3.8s ease-in-out infinite 2.9s; }
.hero-float--7  { top: 28%; right: 5%; animation: hero-float-a 4.9s ease-in-out infinite 0.7s; }
.hero-float--8  { top: 36%; left: 20%; animation: hero-float-b 6.1s ease-in-out infinite 1.9s; }
/* — mid (beside illustration) — */
.hero-float--9  { top: 43%; left:  4%; animation: hero-float-c 5.0s ease-in-out infinite 0.2s; }
.hero-float--10 { top: 47%; right: 5%; animation: hero-float-a 4.7s ease-in-out infinite 3.1s; }
.hero-float--11 { top: 56%; left: 17%; animation: hero-float-b 3.6s ease-in-out infinite 2.2s; }
.hero-float--12 { top: 60%; right:16%; animation: hero-float-c 4.1s ease-in-out infinite 0.5s; }
/* — lower (beside date / countdown) — */
.hero-float--13 { top: 70%; left:  6%; animation: hero-float-a 5.8s ease-in-out infinite 1.7s; }
.hero-float--14 { top: 73%; right: 6%; animation: hero-float-b 4.4s ease-in-out infinite 3.0s; }
/* — bottom zone — */
.hero-float--15 { top: 84%; left: 33%; animation: hero-float-c 3.9s ease-in-out infinite 0.3s; }
.hero-float--16 { top: 87%; right:28%; animation: hero-float-a 5.2s ease-in-out infinite 1.4s; }


/* ── Countdown timer ─────────────────────────────────── */
.hero-countdown {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  margin-top: 20px;
  margin-bottom: 24px;
}

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

.countdown-num {
  font-size: 1.65rem;
  font-weight: 600;
  line-height: 1;
  color: var(--blue);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.countdown-label {
  font-size: 0.6rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.45;
  margin-top: 4px;
}

.countdown-sep {
  width: 1px;
  height: 24px;
  background: currentColor;
  opacity: 0.15;
  margin-top: 4px;
  flex-shrink: 0;
}


/* ── Order of Events ─────────────────────────────────── */
.events-section {
  padding: 64px 45px 72px;
  background-color: #FFFCF9;
}

.events-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 48px;
  gap: 16px;
}

.events-cheers {
  width: 82px;
  height: auto;
}

.section-heading {
  font-family: var(--font-script);
  font-size: clamp(1.8rem, 8vw, 2.5rem);
  font-weight: 400;
  line-height: 1.15;
  color: var(--blue);
  text-align: center;
}

/* Timeline */
.timeline {
  max-width: 320px;
  margin: 0 auto;
  list-style: none;
  padding: 0;
}

.timeline-item {
  display: grid;
  grid-template-columns: 80px 1fr 72px;
  gap: 0 12px;
  align-items: center;
  padding: 16px 0;
  position: relative;
}

/* Left col: time stacked above optional icon */
.tl-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  align-self: center;
}

.tl-time {
  font-size: 0.9375rem;
  font-weight: 600;
  white-space: nowrap;
  color: var(--blue);
}

.tl-icon-left {
  width: 56px;
  height: auto;
}

/* Body: title + desc */
.tl-body { align-self: center; }

.tl-title {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 2px;
  color: var(--blue);
  white-space: nowrap;
}

.tl-desc {
  font-size: 0.88rem;
  font-style: italic;
  font-weight: 400;
  opacity: 0.72;
  line-height: 1.5;
  width: 200px;
}

/* Right col icons */
.tl-icon-right {
  width: 68px;
  height: auto;
  justify-self: end;
  align-self: center;
}



/* Camera spans into the row below */
.tl-paired {
  overflow: visible;
  z-index: 1;
}

.tl-camera {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(0);
  width: 72px;
  z-index: 2;
}

.tl-paired-follow {
  padding-top: 28px;
}

/* ── Venue section ───────────────────────────────────── */
.venue-section {
  padding: 64px 45px 72px;
  background-color: #FFFCF9;
}

.venue-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 44px;
  gap: 12px;
}

.venue-illustration {
  width: min(146px, 45vw);
  margin: 0 auto;
}

.venue-blocks {
  max-width: 380px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

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

.venue-sub-heading {
  font-family: var(--font-script);
  font-size: 1.5rem;
  font-weight: 300;
  margin-bottom: 12px;
}

.venue-name {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.venue-address {
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1.6;
  opacity: 0.8;
}

.venue-note {
  font-size: 0.88rem;
  font-style: italic;
  opacity: 0.65;
  margin-top: 4px;
}

/* ── FAQs section ────────────────────────────────────── */
.faq-section {
  padding: 64px 45px 96px;
  background-color: #FFFCF9;
}

.faq-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 44px;
  gap: 12px;
}

.faq-illustration {
  width: 72px;
}

.faq-list {
  max-width: 320px;
  margin: 0 auto;
  list-style: none;
  padding: 0;
}

.faq-item {
  border-top: 1px solid rgba(28, 102, 202, 0.15);
}
.faq-item:last-child { border-bottom: 1px solid rgba(28, 102, 202, 0.15); }

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 24px 0;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--blue);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  text-align: left;
  gap: 12px;
  line-height: 1.4;
}

.faq-chevron {
  width: 20px;
  flex-shrink: 0;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  opacity: 0.7;
}
.faq-chevron.open { transform: rotate(180deg); }

.faq-answer {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.45s cubic-bezier(0.22, 1, 0.36, 1),
              padding 0.35s ease;
}
.faq-answer.open { max-height: 600px; }

.faq-answer-inner {
  padding-bottom: 20px;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.65;
  opacity: 0.82;
}

/* Bank details */
.bank-names {
  margin-top: 6px;
  font-weight: 600;
  opacity: 1;
}

/* ── Footer ──────────────────────────────────────────── */
.footer {
  padding: 32px 24px;
  text-align: center;
  font-size: 0.75rem;
  opacity: 0.4;
  background-color: #FFFCF9;
}

/* ── Photos section ──────────────────────────────────── */
.photos-section {
  padding: 64px 0 88px;
  background-color: var(--blush);
  overflow: hidden;
}

/* ── Background scattered polaroids ─────────────────── */
.bg-polaroids {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.bg-polaroid {
  position: absolute;
  width: 185px;
  height: 235px;
  isolation: isolate;
}

.bg-polaroid::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("./images/polaroid-frame-PNG-for-photoshop 4.png")
              no-repeat center / 100% 100%;
  z-index: 2;
}

.bg-polaroid-photo {
  position: absolute;
  top: 10%;
  left: 13.4%;
  width: 75.6%;
  height: 65.6%;
  object-fit: cover;
  display: block;
  z-index: 1;
}

/* Individual positions — mobile: close to edges */
.bg-polaroid--1 { top:  4%; left:   2%;  transform: rotate(-12deg); }
.bg-polaroid--2 { top:  2%; right:  2%;  transform: rotate(10deg);  }
.bg-polaroid--3 { top: 32%; left:   0%;  transform: rotate(-7deg);  }
.bg-polaroid--4 { top: 30%; right:  0%;  transform: rotate(14deg);  }
.bg-polaroid--5 { bottom: 5%; left:   3%;  transform: rotate(9deg);  }
.bg-polaroid--6 { bottom: 3%; right:  2%;  transform: rotate(-10deg); }

/* Tablet & desktop: anchor to the carousel centre so they stay close */
@media (min-width: 640px) {
  /* carousel is 345px wide, centred — left edge at calc(50% - 172px)
     polaroid is 185px wide — place right edge ~20px into the carousel */
  .bg-polaroid--1 { top:  5%;    left:  calc(50% - 345px); transform: rotate(-12deg); }
  .bg-polaroid--2 { top:  3%;    right: calc(50% - 345px); transform: rotate(10deg);  }
  .bg-polaroid--3 { top: 35%;    left:  calc(50% - 360px); transform: rotate(-7deg);  }
  .bg-polaroid--4 { top: 32%;    right: calc(50% - 350px); transform: rotate(14deg);  }
  .bg-polaroid--5 { bottom: 8%;  left:  calc(50% - 335px); transform: rotate(9deg);   }
  .bg-polaroid--6 { bottom: 5%;  right: calc(50% - 325px); transform: rotate(-10deg); }
}

/* Deck sits above the background layer */
.deck-wrapper {
  position: relative;
  z-index: 1;
}

.photos-header {
  text-align: center;
  margin-bottom: 40px;
  padding: 0 28px;
}

.photos-hint {
  font-size: 0.75rem;
  opacity: 0.45;
  letter-spacing: 0.06em;
  margin-top: 8px;
}

/* ── Deck ──────────────────────────────────────────────── */
.deck-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

.deck {
  position: relative;
  width: 320px;
  height: 425px; /* card 380px + 25px stack peek */
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}

/* Each card sits in the same absolute space */
.deck-card {
  position: absolute;
  inset: 0;
  width: 320px;
  height: 400px;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              opacity   0.4s ease;
  will-change: transform;
}

/* ── Stack depths (set via JS as data-pos) ──────────────── */
.deck-card[data-pos="0"] {
  z-index: 6;
  transform: rotate(2deg);
  opacity: 1;
}
.deck-card[data-pos="1"] {
  z-index: 5;
  transform: rotate(-4deg) translateY(8px) scale(0.97);
  opacity: 1;
}
.deck-card[data-pos="2"] {
  z-index: 4;
  transform: rotate(3deg) translateY(15px) scale(0.94);
  opacity: 0.9;
}
.deck-card[data-pos="3"],
.deck-card[data-pos="4"],
.deck-card[data-pos="5"] {
  z-index: 1;
  transform: rotate(1deg) translateY(20px) scale(0.91);
  opacity: 0;
  pointer-events: none;
}

/* ── Deal-out / deal-in animations ──────────────────────── */
@keyframes card-exit-left {
  0%   { transform: rotate(2deg); opacity: 1; }
  25%  { transform: rotate(-6deg) translateX(-40px) translateY(-10px); opacity: 1; }
  100% { transform: rotate(-22deg) translateX(-120vw) translateY(-15px); opacity: 0; }
}
@keyframes card-enter-right {
  0%   { transform: rotate(22deg) translateX(120vw) translateY(-15px); opacity: 0; }
  75%  { transform: rotate(-2deg) translateX(30px) translateY(-5px); opacity: 1; }
  100% { transform: rotate(2deg); opacity: 1; }
}

.deck-card.exiting {
  animation: card-exit-left 0.42s cubic-bezier(0.4, 0, 0.8, 1) forwards;
  z-index: 10 !important;
  transition: none !important;
  pointer-events: none;
}
.deck-card.entering {
  animation: card-enter-right 0.42s cubic-bezier(0.2, 0, 0.4, 1) forwards;
  z-index: 10 !important;
  transition: none !important;
  pointer-events: none;
}

/* ── Polaroid card ───────────────────────────────────────── */
.polaroid-card {
  position: relative;
  width: 300px;
  height: 380px;
  isolation: isolate; /* self-contained stacking context */
}

/* Frame overlaid as pseudo-element — CSS background-image
   correctly composites PNG alpha, unlike an <img> overlay */
.polaroid-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("./images/polaroid-frame-PNG-for-photoshop 4.png")
              no-repeat center / 100% 100%;
  pointer-events: none;
  z-index: 2;
}

.polaroid-photo {
  position: absolute;
  top: 10%;
  left: 13.4%;
  width: 75.6%;   /* 100% − 13.4% − 11%  */
  height: 65.6%;  /* 100% − 10%   − 24.4% */
  object-fit: cover;
  display: block;
  pointer-events: none;
  z-index: 1;
}

/* The <img class="polaroid-frame"> in HTML is replaced by ::after */
.polaroid-frame { display: none; }

/* ── Deck nav ────────────────────────────────────────────── */
.deck-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 999px;
  padding: 8px 16px;
}

.deck-counter {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  opacity: 0.45;
  font-variant-numeric: tabular-nums;
  min-width: 48px;
  text-align: center;
}

/* ── End-of-deck message ─────────────────────────────── */
.deck-end {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -60%);
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 24px 28px;
  text-align: center;
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 20px;
  width: max-content;
  max-width: 280px;
  z-index: 10;
}

.deck-end:not([hidden]) {
  display: flex;
}

.deck-end-msg {
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.5;
  color: var(--blue);
}

.deck-end-btn {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
  background: transparent;
  border: 1.5px solid var(--blue);
  border-radius: 999px;
  padding: 7px 20px;
  cursor: pointer;
  opacity: 0.75;
  transition: opacity 0.2s ease;
}

.deck-end-btn:hover { opacity: 1; }

.deck-end-btn:hover { opacity: 1; }

.deck-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  background: none;
  color: var(--blue);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.45;
  transition: opacity 0.2s ease, transform 0.2s ease;
  flex-shrink: 0;
}
.deck-btn:hover { opacity: 0.85; transform: scale(1.08); }

/* ── Parallax util ───────────────────────────────────── */
.parallax { will-change: transform; }

/* ── Responsive: tablet+ ─────────────────────────────── */
@media (min-width: 640px) {
  .hero-illustration-wrapper { width: min(340px, 70vw); }
  .hero-names { width: min(320px, 70vw); }
  .hero-intro { font-size: 1rem; }
  .events-section,
  .venue-section,
  .faq-section { padding-left: 48px; padding-right: 48px; }
  .deck { width: 345px; height: 462px; }
  .deck-card { width: 345px; height: 437px; }
  .polaroid-card { width: 345px; height: 437px; }
}
/* ── Responsive: desktop+ ─────────────────────────────── */
@media (min-width: 1024px) {
  .hero-section { padding-top: 16px; }
  .hero-illustration-wrapper { width: 360px; }
  .hero-names { width: 340px; }
  .hero-intro { font-size: 1.0625rem; }
  .hero-date { font-size: 1.125rem; }
  .events-section,
  .venue-section,
  .faq-section { padding-left: 0; padding-right: 0; }
}

@media (max-height: 550px) {
  .hero-section { padding-top: 16px; }
  .hero-illustration-wrapper { width: 200px; }
  .hero-names { width: 200px; }
  .hero-intro { font-size: 1rem; }
  .hero-date { font-size: 1rem; }
  .events-section,
  .venue-section,
  .faq-section { padding-left: 48px; padding-right: 48px; }
}
