/* ─── Design tokens ─────────────────────────────────────────────────────── */
:root {
  --rose:         #c45b6b;
  --blush:        #f6d6d6;
  --petal:        #e8b4bc;
  --gold:         #d4af37;
  --ink:          #2b2230;
  --ink-light:    #3e3248;
  --cream:        #fff7f4;
  --cream-dim:    rgba(255, 247, 244, 0.88);
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Inter', system-ui, sans-serif;
  --slide-radius: 16px;
}

/* ─── Reset / base ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100dvh;
  overflow: hidden;
  background: var(--ink);
  font-family: var(--font-body);
  color: var(--ink);
  -webkit-tap-highlight-color: transparent;
}

/* ─── Progress bar ──────────────────────────────────────────────────────── */
.progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 30;
  background: rgba(255, 255, 255, 0.15);
}

.progress__bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--petal), var(--gold));
  transition: width 0.35s ease;
  will-change: width;
}

/* ─── Audio toggle ──────────────────────────────────────────────────────── */
.audio-toggle {
  position: fixed;
  top: 14px;
  right: 16px;
  z-index: 30;
  width: 38px;
  height: 38px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: background 0.2s;
}

.audio-toggle:hover,
.audio-toggle:focus-visible {
  background: rgba(0, 0, 0, 0.55);
  outline: 2px solid var(--petal);
  outline-offset: 2px;
}

/* ─── Swiper container ──────────────────────────────────────────────────── */
.swiper {
  width: 100%;
  height: 100dvh;
}

/* ─── Slides — shared ───────────────────────────────────────────────────── */
.slide {
  height: 100dvh;
  width: 100%;
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  border-radius: var(--slide-radius);
  overflow: hidden;
  user-select: none;
}

.slide__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 32px 28px 52px;
  text-align: center;
}

/* ─── Reason slides ─────────────────────────────────────────────────────── */
.slide--reason {
  background: var(--ink);
}

.slide__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* scrim: darkens bottom so message is always legible over any photo */
.slide--reason::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.72) 0%,
    rgba(0, 0, 0, 0.32) 38%,
    rgba(0, 0, 0, 0.06) 60%,
    transparent 75%
  );
}

.slide__num {
  display: block;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--petal);
  margin-bottom: 10px;
  opacity: 0.85;
}

.slide__message {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 4.5vw, 1.55rem);
  font-weight: 500;
  font-style: italic;
  line-height: 1.45;
  color: var(--cream);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.45);
}

/* ─── Intro slide ───────────────────────────────────────────────────────── */
.slide--intro {
  background: radial-gradient(ellipse at 50% 30%, var(--ink-light) 0%, var(--ink) 70%);
  align-items: center;
  justify-content: center;
}

.slide--intro .slide__inner {
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.slide__eyebrow {
  margin: 0;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--petal);
  opacity: 0.75;
}

.slide--intro .slide__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 8vw, 2.8rem);
  font-weight: 600;
  line-height: 1.2;
  color: var(--cream);
  letter-spacing: 0.01em;
}

.intro__begin {
  margin-top: 12px;
  padding: 14px 34px;
  border: 1.5px solid var(--petal);
  border-radius: 100px;
  background: transparent;
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.intro__begin:hover,
.intro__begin:focus-visible {
  background: var(--petal);
  color: var(--ink);
  outline: none;
}

/* ─── Final slide ───────────────────────────────────────────────────────── */
.slide--final {
  background: radial-gradient(ellipse at 50% 40%, var(--ink-light) 0%, var(--ink) 75%);
  align-items: center;
  justify-content: center;
}

.slide--final .slide__inner {
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.slide--final .slide__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 7vw, 2.6rem);
  font-weight: 600;
  font-style: italic;
  line-height: 1.3;
  color: var(--cream);
  text-align: center;
}

/* ─── Desktop: phone-width keepsake card ───────────────────────────────── */
@media (min-width: 768px) {
  .swiper {
    max-width: 440px;
    margin: 0 auto;
  }
}

/* ─── Reduced motion ────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .progress__bar {
    transition: none;
  }

  .audio-toggle {
    transition: none;
  }

  .intro__begin {
    transition: none;
  }
}
