/* ============================================================
   FONTS
   ============================================================ */
@font-face {
  font-family: 'Madelyn';
  src: url('website/FONT - Madelyn - Headlines/madelyn_regular.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Nunito';
  src: url('website/FONT - Nunito - Body/Nunito-VariableFont_wght.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
}

@font-face {
  font-family: 'Nunito';
  src: url('website/FONT - Nunito - Body/Nunito-Italic-VariableFont_wght.ttf') format('truetype');
  font-weight: 100 900;
  font-style: italic;
}

/* ============================================================
   CSS VARIABLES
   ============================================================ */
:root {
  --cream:      #fffcf5;
  --blue-light: #e9f5ff;
  --blue:       #366baa;
  --dark:       #1a1a2e;
  --nav-h:      52px;
}

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

html {
  scroll-behavior: smooth;
}

.page-wrap {
  overflow-x: hidden;
}

body {
  font-family: 'Nunito', sans-serif;
  background: var(--cream);
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(1rem, 3vw, 2.5rem);
  padding: 0 clamp(1.25rem, 4vw, 3.5rem);
  z-index: 200;
  background: rgba(255, 252, 245, 0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.nav-link {
  font-family: 'Nunito', sans-serif;
  font-size: clamp(0.8rem, 1.1vw, 1rem);
  font-weight: 400;
  color: var(--dark);
  text-decoration: none;
  letter-spacing: 0.01em;
  position: relative;
  padding-bottom: 2px;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1.5px;
  background: var(--blue);
  transition: width 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-link:hover::after,
.nav-link--active::after {
  width: 100%;
}

.nav-link--active {
  font-weight: 700;
}

/* ============================================================
   SLIDE 1 — ANIMATIONS
   ============================================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-30px) rotate(-3deg); }
  to   { opacity: 1; transform: translateY(0)    rotate(-3deg); }
}

@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ============================================================
   SLIDE 1 — VIDEO HERO
   ============================================================ */
.slide-1 {
  position: relative;
  width: 100%;
  height: 100svh; /* svh = small viewport height — avoids mobile bar issues */
  min-height: 520px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Full-bleed video */
.s1-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

/* Tape badges top-left / top-right */
.s1-badge {
  position: absolute;
  z-index: 2;
  height: clamp(220px, 24vw, 350px);
  top: 3%;
  display: block;
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              filter 0.4s ease;
  animation: fadeInLeft 1s cubic-bezier(0.22, 1, 0.36, 1) 1.4s both;
}

.s1-badge img {
  height: 100%;
  width: auto;
  display: block;
}

.s1-badge:hover {
  transform: translateY(-10px) scale(1.06);
  filter: drop-shadow(0 8px 16px rgba(0,0,0,0.18));
}
.s1-badge--left  { left:  clamp(1rem, 3.5vw, 4.5rem); }
.s1-badge--right { right: clamp(1rem, 3.5vw, 4.5rem); top: 6.5%; animation: fadeInRight 1s cubic-bezier(0.22, 1, 0.36, 1) 1.6s both; }

/* Centre block: title + tape strip — absolutely placed so badges never overlap */
.s1-center {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  width: 90%;
}

.s1-title {
  font-family: 'Madelyn', cursive;
  font-size: clamp(5.25rem, 15vw, 18rem);
  font-weight: normal;
  color: #ffffff;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  text-shadow: 0 2px 24px rgba(0,0,0,0.18);
  animation: fadeUp 1s cubic-bezier(0.22, 1, 0.36, 1) 0.3s both;
}

.s1-tape {
  height: clamp(330px, 36vw, 500px);
  max-width: 88vw;
  object-fit: contain;
  transform: rotate(-3deg);
  margin-top: -8rem;
  animation: fadeDown 1s cubic-bezier(0.22, 1, 0.36, 1) 0.9s both;
}

/* Bottom row: stars flanking the tape — always travel together */
.s1-bottom-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.5rem, 2vw, 2rem);
  width: 100%;
}

.s1-deco {
  pointer-events: none;
  flex-shrink: 0;
  transform: translateY(-4rem);
  animation: fadeIn 1s ease 1.2s both;
}

.s1-deco--left {
  width: clamp(70px, 10vw, 155px);
  mix-blend-mode: screen;
}

.s1-deco--right {
  width: clamp(50px, 7vw, 110px);
}

/* ============================================================
   SLIDE 2 — COUNTDOWN
   ============================================================ */
.slide-2 {
  position: relative;
  background: var(--cream);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(3.5rem, 8vh, 7rem) 2rem;
}

/* Ribbon decorations — decorative, behind all text (z-index: 0) */
.s2-ribbon {
  position: absolute;
  width: clamp(300px, 35%, 860px);
  pointer-events: none;
  mix-blend-mode: multiply;
  z-index: 0;
}

/* ↕ Tweak `top` (%) and `translateY` offset to shift ribbon up/down */
.s2-ribbon--left {
  left: -2%;
  top: 70%;
  transform: translateY(-50%);
}

.s2-ribbon--right {
  right: -2%;
  top: 42%;
  transform: translateY(-50%);
}

/* Countdown content — always above the ribbon images */
.s2-content {
  position: relative;
  z-index: 2;
  text-align: center;
}

.s2-label {
  font-family: 'Madelyn', cursive;
  font-size: clamp(2rem, 5vw, 5.5rem);
  color: var(--blue);
  font-weight: normal;
  line-height: 1.15;
  margin-bottom: clamp(0.75rem, 2vh, 1.5rem);
}

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

.countdown__unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: clamp(56px, 9vw, 130px);
}

.countdown__num {
  font-family: 'Nunito', sans-serif;
  font-size: clamp(2rem, 5.5vw, 6.5rem);
  font-weight: 800;
  color: var(--dark);
  line-height: 1;
}

.countdown__num--blue {
  color: var(--blue);
}

.countdown__sep {
  font-family: 'Nunito', sans-serif;
  font-size: clamp(2rem, 5.5vw, 6.5rem);
  font-weight: 800;
  color: var(--dark);
  line-height: 1;
  align-self: flex-start;
  padding: 0 clamp(0.1rem, 0.5vw, 0.4rem);
}

.countdown__lbl {
  font-family: 'Nunito', sans-serif;
  font-size: clamp(0.65rem, 1.1vw, 1.1rem);
  font-weight: 400;
  color: #6b7a90;
  margin-top: 0.3rem;
  letter-spacing: 0.01em;
}

/* ============================================================
   SLIDE 3 — INVITATION
   ============================================================ */
.slide-3 {
  background: var(--blue-light);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(4rem, 9vh, 8rem) clamp(2rem, 8vw, 9rem);
}

.s3-inner {
  width: 100%;
  max-width: 1380px;
  display: flex;
  align-items: center;
  gap: clamp(2.5rem, 5vw, 7rem);
}

/* Text column */
.s3-text {
  flex: 1 1 0;
  min-width: 0;
}

.s3-heading {
  font-family: 'Madelyn', cursive;
  font-size: clamp(2.2rem, 4.5vw, 5.75rem);
  font-weight: normal;
  color: var(--dark);
  line-height: 1.1;
  margin-bottom: clamp(1.5rem, 3vh, 2.5rem);
}

.s3-text p {
  font-family: 'Nunito', sans-serif;
  font-size: clamp(0.9rem, 1.3vw, 1.2rem);
  font-weight: 400;
  color: var(--blue);
  line-height: 1.85;
  text-align: justify;
  margin-bottom: 1.1em;
}

.s3-text p:last-child {
  margin-bottom: 0;
}

/* Photo collage column */
.s3-photos {
  flex: 0 0 auto;
  width: clamp(240px, 38%, 500px);
}

.s3-photos img {
  width: 100%;
  height: auto;
  display: block;
}

/* ============================================================
   SLIDE 5 — LOCATION
   ============================================================ */
.slide-5 {
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100svh;
  padding: calc(var(--nav-h) + clamp(2.5rem, 5vh, 4rem)) clamp(2rem, 6vw, 7rem) clamp(3rem, 6vh, 5rem);
}

.s5-inner {
  width: 100%;
  max-width: 1380px;
  display: flex;
  align-items: flex-start;
  gap: clamp(2rem, 4vw, 6rem);
}

/* ── Left column ── */
.s5-left {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(1rem, 2.5vh, 2rem);
}

.s5-heading-sub {
  display: block;
  font-family: 'Nunito', sans-serif;
  font-size: clamp(1rem, 1.5vw, 1.4rem);
  font-weight: 600;
  color: var(--blue);
  margin-bottom: -0.3em;
}

.s5-heading-main {
  font-family: 'Madelyn', cursive;
  font-size: clamp(5rem, 11vw, 15rem);
  font-weight: normal;
  color: var(--dark);
  line-height: 1;
  margin: 0;
}

.s5-body {
  font-family: 'Nunito', sans-serif;
  font-size: clamp(0.95rem, 1.3vw, 1.2rem);
  font-weight: 400;
  color: var(--blue);
  line-height: 1.8;
  text-align: justify;
}

.s5-body strong em {
  font-style: italic;
  font-weight: 700;
}

.s5-body a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 0.2s;
}

.s5-body a:hover {
  opacity: 0.65;
}

.s5-body {
  margin-top: -1rem;
  margin-bottom: clamp(1rem, 3vh, 2.5rem);
}

/* Map — torn parchment frame */
.s5-map-wrap {
  position: relative;
  width: 85%;
  margin: 0 auto;
}

/* Parchment sits behind the iframe, extending beyond it on all sides */
.s5-map-wrap::before {
  content: '';
  position: absolute;
  inset: -22% -13% -30% -13%;
  background-image: url('website/Graphics/Slide 5/map bg.png');
  background-size: 100% 100%;
  pointer-events: none;
  z-index: 0;
}

/* ↕ Change height here to resize only the map, parchment scales with it */
.s5-map-wrap iframe {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: clamp(340px, 52vh, 600px);
  border: 0;
  border-radius: 12px;
  box-shadow: 0 4px 32px rgba(180, 160, 120, 0.35), 0 1px 8px rgba(150, 130, 90, 0.2);
  -webkit-mask-image: linear-gradient(to right,  transparent, black 5%, black 95%, transparent),
                      linear-gradient(to bottom, transparent, black 4%, black 99%, transparent);
  -webkit-mask-composite: destination-in;
  mask-image: linear-gradient(to right,  transparent, black 5%, black 95%, transparent),
              linear-gradient(to bottom, transparent, black 4%, black 99%, transparent);
  mask-composite: intersect;
}

/* ── Right column ── */
.s5-right {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}

.s5-photos {
  width: 120%;
  max-width: 680px;
  height: auto;
  display: block;
}

.s5-shells {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.5rem, 1.5vw, 1.5rem);
  margin-top: -36%;
}

.s5-shells-left {
  width: clamp(160px, 28%, 300px);
}

.s5-shells-right {
  width: clamp(140px, 23%, 260px);
}

.s5-ritual {
  margin-top: -4%;
  padding-left: 8%;
  font-family: 'Nunito', sans-serif;
  font-size: clamp(1rem, 1.4vw, 1.3rem);
  font-weight: 400;
  color: var(--blue);
  line-height: 1.8;
}

/* ============================================================
   SLIDE 4 — RSVP
   ============================================================ */
.slide-4 {
  position: relative;
  width: 100%;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: url('website/Graphics/Slide 4/BG-cropped.png');
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.s4-deco {
  position: absolute;
  pointer-events: none;
  z-index: 0;
}

.s4-deco--palm {
  left: -16%;
  bottom: -2%;
  width: clamp(500px, 62vw, 1000px);
}

.s4-deco--dove {
  right: -3%;
  top: 50%;
  transform: translateY(-50%);
  width: clamp(320px, 42vw, 700px);
}

/* Card */
.s4-card {
  position: relative;
  z-index: 2;
  background: #f5f0e6;
  border-radius: 12px;
  width: clamp(340px, 48vw, 720px);
  padding: clamp(2.5rem, 5vh, 4.5rem) clamp(2rem, 4vw, 3.5rem) clamp(2rem, 4vh, 3.5rem);
  text-align: center;
  /* layered shadow to mimic pinned-note look */
  box-shadow:
    -10px 14px 0 -2px rgba(0, 0, 0, 0.10),
    -14px 20px 28px rgba(0, 0, 0, 0.20);
}

/* Brown tape at top */
.s4-card::before {
  content: '';
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: clamp(70px, 10vw, 140px);
  height: clamp(20px, 2.5vw, 36px);
  background: #b8906a;
  border-radius: 4px;
}

.s4-title {
  font-family: 'Madelyn', cursive;
  font-size: clamp(2rem, 4vw, 4.25rem);
  font-weight: normal;
  color: var(--blue);
  line-height: 1.1;
  margin-bottom: clamp(1rem, 2.5vh, 2rem);
}

.s4-body {
  font-family: 'Nunito', sans-serif;
  font-size: clamp(0.9rem, 1.25vw, 1.15rem);
  font-weight: 500;
  color: var(--dark);
  line-height: 1.7;
  margin-bottom: 0.2em;
}

.s4-date {
  display: block;
  font-family: 'Nunito', sans-serif;
  font-size: clamp(0.95rem, 1.35vw, 1.2rem);
  font-weight: 700;
  font-style: italic;
  color: var(--blue);
  margin: 0.5em 0;
}

.s4-footer {
  font-family: 'Nunito', sans-serif;
  font-size: clamp(0.9rem, 1.25vw, 1.15rem);
  font-weight: 500;
  color: var(--dark);
  line-height: 1.7;
  margin-bottom: clamp(1.5rem, 3.5vh, 2.75rem);
}

.s4-btn {
  display: inline-block;
  background: var(--blue);
  color: #ffffff;
  font-family: 'Nunito', sans-serif;
  font-size: clamp(0.9rem, 1.2vw, 1.1rem);
  font-weight: 700;
  text-decoration: none;
  padding: clamp(0.7rem, 1.5vh, 1rem) clamp(2rem, 5vw, 3.75rem);
  border-radius: 7px;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease;
}

.s4-btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(54, 107, 170, 0.45);
}

/* ============================================================
   SLIDE 6 — PROGRAM
   ============================================================ */
.slide-6 {
  position: relative;
  width: 100%;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: url('website/BG-paper.png');
  background-size: cover;
  background-position: center;
  padding: clamp(5rem, 12vh, 9rem) clamp(1rem, 5vw, 4rem) clamp(8rem, 18vh, 14rem);
}

.s6-card {
  position: relative;
  width: clamp(300px, 72vw, 1000px);
  padding: clamp(2rem, 4vh, 4rem) clamp(2.5rem, 6vw, 7rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1.5rem, 4vh, 3rem);
}

.s6-title {
  font-family: 'Madelyn', cursive;
  font-size: clamp(3rem, 6vw, 6rem);
  font-weight: normal;
  color: var(--dark);
  text-align: center;
  line-height: 1.1;
}

.s6-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(1rem, 2vw, 2rem) clamp(2rem, 5vw, 5rem);
  width: 100%;
}

.s6-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  width: clamp(130px, 18vw, 200px);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.s6-item:hover {
  transform: translateY(-8px);
}

.s6-icon {
  width: 100%;
  height: auto;
  object-fit: contain;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.s6-item:hover .s6-icon {
  transform: scale(1.12) rotate(-3deg);
}

.s6-time {
  font-family: 'Nunito', sans-serif;
  font-size: clamp(0.9rem, 1.3vw, 1.15rem);
  font-weight: 700;
  color: var(--blue);
  text-align: center;
}

.s6-desc {
  font-family: 'Nunito', sans-serif;
  font-size: clamp(0.85rem, 1.2vw, 1.05rem);
  font-weight: 400;
  color: var(--blue);
  text-align: center;
  line-height: 1.4;
}

/* ============================================================
   SLIDE 7 — Q&A
   ============================================================ */
.slide-7 {
  position: relative;
  width: 100%;
  background: var(--cream);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(4rem, 8vh, 7rem) clamp(230px, 26vw, 420px);
  overflow: hidden;
}

.slide-7::before,
.slide-7::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: clamp(160px, 18vw, 280px);
  background-repeat: repeat;
  background-size: 380px auto;
  pointer-events: none;
  opacity: 0.9;
}

.slide-7::before {
  left: 0;
  background-image: url('website/BG_pattern_DVE.png');
}

.slide-7::after {
  right: 0;
  background-image: url('website/BG_pattern_DVE.png');
}

.s7-content {
  width: 100%;
  max-width: 820px;
  display: flex;
  flex-direction: column;
  gap: clamp(1.5rem, 3.5vh, 2.75rem);
}

.s7-title {
  font-family: 'Madelyn', cursive;
  font-size: clamp(3rem, 5.5vw, 5.5rem);
  font-weight: normal;
  color: var(--dark);
  text-align: center;
  line-height: 1.1;
  margin-bottom: clamp(0.5rem, 2vh, 1.5rem);
}

.s7-qa {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.s7-q {
  font-family: 'Nunito', sans-serif;
  font-size: clamp(1rem, 1.4vw, 1.25rem);
  font-weight: 700;
  color: var(--blue);
  line-height: 1.5;
}

.s7-a {
  font-family: 'Nunito', sans-serif;
  font-size: clamp(0.9rem, 1.2vw, 1.1rem);
  font-weight: 400;
  color: var(--dark);
  line-height: 1.75;
}

/* ============================================================
   SLIDE 8 — Thank you
   ============================================================ */
.slide-8 {
  background: var(--blue-light);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4rem 2rem 2.5rem;
  gap: 1rem;
}

.s8-title {
  font-family: 'Madelyn', cursive;
  font-size: clamp(3rem, 6vw, 6.5rem);
  color: var(--dark);
  text-align: center;
  line-height: 1.1;
}

.s8-subtitle {
  font-family: 'Nunito', sans-serif;
  font-size: clamp(0.95rem, 1.3vw, 1.15rem);
  color: var(--blue);
  text-align: center;
  line-height: 1.7;
}

.s8-gallery {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(1.5rem, 3vw, 3rem);
  width: 100%;
  max-width: 1200px;
  padding: 2.5rem 2rem 5rem;
}

.s8-pol {
  height: clamp(220px, 28vw, 380px);
  width: auto;
  flex-shrink: 0;
}

.s8-pol--left  { transform: rotate(14deg);  margin-top: -2rem; margin-right: clamp(1rem, 3vw, 3rem); transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1); }
.s8-pol--right { transform: rotate(-14deg); margin-top: -2rem; margin-left: -2rem; transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1); }

.s8-pol--left:hover  { transform: rotate(8deg)  translateY(-12px) scale(1.04); }
.s8-pol--right:hover { transform: rotate(-8deg) translateY(-12px) scale(1.04); }

.s8-main-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.s8-main-photo {
  width: clamp(260px, 30vw, 420px);
  border-radius: 4px;
  display: block;
}

.s8-footer {
  font-family: 'Nunito', sans-serif;
  font-size: clamp(0.75rem, 1vw, 0.9rem);
  color: var(--dark);
  text-align: center;
  opacity: 0.55;
  padding-bottom: 0.5rem;
}

/* ============================================================
   SITE FOOTER
   ============================================================ */
.site-footer {
  background: var(--blue);
  padding: 0.3rem 2rem;
  text-align: center;
}

.site-footer__text {
  font-family: 'Nunito', sans-serif;
  font-size: clamp(0.65rem, 0.9vw, 0.8rem);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.75);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Tablet (≤ 900px) */
@media (max-width: 900px) {
  .s1-title {
    font-size: clamp(4rem, 15vw, 9rem);
  }

  .s1-tape {
    margin-top: -2rem;
  }

  /* Shrink ribbons a little so they don't crowd the text */
  .s2-ribbon {
    width: clamp(200px, 44%, 580px);
  }

  .s3-inner {
    flex-direction: column-reverse;
  }

  .s3-photos {
    width: clamp(220px, 72%, 420px);
  }

  .s3-text p {
    text-align: left;
  }

  .s5-inner {
    flex-direction: column;
  }

  .s5-left {
    align-items: center;
  }

  .s5-map-wrap {
    width: 85%;
    margin: 0 auto;
  }

  .s5-right {
    align-items: center;
    text-align: center;
  }

  .s5-ritual {
    text-align: left;
  }

  .s4-deco--palm {
    width: clamp(340px, 50vw, 640px);
  }

  .s4-deco--dove {
    display: none;
  }

  .s4-card {
    width: clamp(320px, 62vw, 520px);
  }

  .s4-title {
    font-size: clamp(3rem, 6vw, 4.25rem);
  }

  .s6-card {
    width: clamp(280px, 90vw, 700px);
    padding: clamp(2rem, 4vh, 4rem) clamp(2rem, 5vw, 5rem);
  }

  .s6-grid {
    gap: 0.75rem 2rem;
  }

  .s6-item {
    width: clamp(100px, 18vw, 150px);
    gap: 0.3rem;
  }

  .slide-7::before,
  .slide-7::after {
    width: clamp(100px, 14vw, 180px);
  }

  .slide-7 {
    padding-left: clamp(130px, 16vw, 210px);
    padding-right: clamp(130px, 16vw, 210px);
  }

  .s8-gallery {
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem 2.5rem;
    padding: 1.5rem 2rem 2rem;
  }

  .s8-main-wrap {
    order: 1;
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .s8-main-photo {
    width: clamp(300px, 45vw, 460px);
  }

  .s8-pol {
    display: block;
    order: 2;
    height: clamp(180px, 28vw, 300px);
    width: auto;
    margin-top: 0;
  }

  .s8-pol--left  { transform: rotate(8deg); }
  .s8-pol--right { transform: rotate(-8deg); }
}

/* Mobile (≤ 600px) */
@media (max-width: 600px) {
  :root {
    --nav-h: 46px;
  }

  .nav {
    gap: 1rem;
    padding: 0 1rem;
  }

  /* Let the title wrap on very narrow screens */
  .s1-title {
    white-space: normal;
    font-size: clamp(2.5rem, 16vw, 5rem);
    padding: 0 0.5rem;
  }

  .s1-badge {
    height: auto;
    width: clamp(260px, 82vw, 420px);
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    top: 8%;
  }

  .s1-badge img {
    width: 100%;
    height: auto;
  }

  .s1-badge--right {
    top: 27%;
  }

  .s1-center {
    top: 55%;
  }

  .s1-tape {
    margin-top: 0;
  }

  .s1-tape {
    height: auto;
    width: clamp(160px, 55vw, 280px);
    margin-top: 0;
  }

  .s1-deco--left  { width: clamp(55px, 14vw, 80px); transform: translateY(-1rem); }
  .s1-deco--right { width: clamp(40px, 10vw, 60px); transform: translateY(-1rem); }

  /* Ribbons are purely decorative — hide on phone to keep countdown clean */
  .s2-ribbon {
    display: none;
  }

  .slide-2 {
    padding: 3rem 1.5rem;
  }

  /* Scale down countdown label on small screens */
  .s2-label {
    font-size: clamp(1.7rem, 7vw, 2.8rem);
  }

  /* Scale down countdown numbers so they fit in one row */
  .countdown__num,
  .countdown__sep {
    font-size: clamp(2.4rem, 12vw, 3.8rem);
  }

  .countdown__unit {
    min-width: clamp(44px, 13vw, 72px);
  }

  .countdown__lbl {
    font-size: clamp(0.6rem, 2.5vw, 0.85rem);
  }

  .s3-photos {
    width: 90%;
  }

  /* Slide 5 — fix photo overflow and shells overlap on mobile */
  .s5-photos {
    width: 100%;
  }

  .s5-shells {
    margin-top: -18%;
  }

  /* Slide 6 — push card into the paper zone of the background */
  .slide-6 {
    align-items: flex-start;
    padding-top: clamp(9rem, 30svh, 14rem);
  }

  .s4-deco--palm,
  .s4-deco--dove {
    display: none;
  }

  .s4-card {
    width: clamp(300px, 86vw, 480px);
  }

  .s4-title {
    font-size: clamp(3rem, 10vw, 4rem);
  }

  .s5-heading-main {
    font-size: clamp(5rem, 22vw, 9rem);
  }

  .s6-card {
    width: 94vw;
    padding: 2rem 1.5rem;
  }

  .s6-title {
    font-size: clamp(2.5rem, 11vw, 4rem);
  }

  .s6-grid {
    gap: 0.75rem 2rem;
  }

  .s6-item {
    width: clamp(90px, 36vw, 140px);
    gap: 0.25rem;
  }

  .slide-7::before,
  .slide-7::after {
    display: none;
  }

  .slide-7 {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .s8-gallery {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 1rem;
    padding: 1.5rem 1rem 2.5rem;
    max-width: 500px;
  }

  .s8-main-wrap {
    grid-column: 1 / -1;
    grid-row: 1;
    display: flex;
    justify-content: center;
    order: unset;
    width: auto;
  }

  .s8-main-photo {
    width: clamp(240px, 66vw, 340px);
  }

  .s8-pol {
    display: block;
    grid-row: 2;
    height: 42vw;
    width: auto;
    justify-self: center;
    margin-top: 0;
    order: unset;
  }

  .s8-pol--left  { grid-column: 1; transform: rotate(5deg); }
  .s8-pol--right { grid-column: 2; transform: rotate(-5deg); }
}

/* ============================================================
   AFTER PAGE — Снимки и видеа
   ============================================================ */
.after-slide {
  background: var(--cream);
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--nav-h) + clamp(3rem, 6vh, 5rem)) clamp(1.5rem, 5vw, 6rem) clamp(3rem, 6vh, 5rem);
}

.after-content {
  max-width: 780px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: clamp(0.8rem, 2vh, 1.4rem);
}

.after-title {
  font-family: 'Madelyn', cursive;
  font-size: clamp(4rem, 12vw, 9rem);
  font-weight: normal;
  color: var(--dark);
  line-height: 1.15;
  margin: 0;
}

.after-body {
  font-family: 'Nunito', sans-serif;
  font-size: clamp(0.95rem, 1.3vw, 1.15rem);
  color: var(--blue);
  line-height: 1.8;
  margin: 0;
}

.after-link {
  color: var(--blue);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 0.2s;
}

.after-link:hover {
  opacity: 0.6;
}

/* Polaroid */
.after-polaroid {
  margin-top: clamp(1rem, 3vh, 2rem);
}

.after-polaroid img {
  display: block;
  width: clamp(240px, 38vw, 460px);
  height: auto;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.15));
}

/* ============================================================
   BACK TO TOP BUTTON
   ============================================================ */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 999;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--blue);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover {
  background: #2a5a96;
  transform: translateY(-3px);
}
