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

html {
  scroll-behavior: smooth;
  background: #000;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

@media (max-width: 500px) {
  html {
    display: block;
  }

  body {
    max-width: 100% !important;
    box-shadow: none !important;
  }
}

body {
  font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  font-size: 17px;
  line-height: 1.6;
  color: #111;
  background: #ffffff;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  /* Phone-portrait constraint — always */
  width: 100%;
  max-width: 430px;
  height: 100dvh;
  overflow-y: auto;
  overscroll-behavior-y: none;
  -webkit-overflow-scrolling: touch;
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.25);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

:root {
  --ink: #111111;
  --paper: #ffffff;
  --muted: #6b6b6b;
  --green: #4a6b3e;
  --leaf: #2f4f2a;
  --brown: #3a2a1e;
  --brown-2: #5a4030;
  --cream: #f7f3ec;
}

/* ============ TYPOGRAPHY ============ */
.section-title,
h1,
h2,
h3 {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  letter-spacing: .02em;
}

.script,
.script-title {
  font-family: 'Great Vibes', 'Dancing Script', cursive;
  font-weight: 400;
}

.eyebrow {
  font-family: 'Inter', sans-serif;
  font-size: .72rem;
  letter-spacing: .45em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 1rem 0 .5rem;
}

.section-title {
  text-align: center;
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  margin: 0 auto 2rem;
  position: relative;
  display: block;
}

.script-title {
  text-align: center;
  font-size: clamp(3rem, 9vw, 5rem);
  line-height: 1;
  margin-bottom: 2rem;
}

/* ============ HERO ============ */
.hero {
  position: relative;
  padding: 0;
  background: #fff;
  flex: 0 0 32dvh;
  display: flex;
}

.hero__scene {
  position: relative;
  width: 100%;
  aspect-ratio: auto;
  max-height: none;
  height: 100%;
  overflow: hidden;
}

.hero__scene-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 65%;
}

.hero__scene-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, .45) 0%, rgba(0, 0, 0, .1) 35%, rgba(0, 0, 0, .15) 70%, rgba(0, 0, 0, .35) 100%);
}

.hero__scene-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: #fff;
  width: 90%;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .35);
}

.hero__invite {
  font-family: 'Cormorant Garamond', 'Playfair Display', serif;
  font-style: italic;
  font-weight: 400;
  font-size: 11px;
  letter-spacing: .18em;
  line-height: 1.8;
  color: rgba(255, 255, 255, .88);
  margin-bottom: 14px;
}

.hero__title {
  font-family: 'Playfair Display', serif;
  font-weight: 500;
  font-size: 28px;
  letter-spacing: .12em;
  line-height: 1;
  color: #fff;
}

.hero__title .amp {
  font-family: 'Playfair Display', serif;
  font-weight: 400;
  font-style: normal;
  font-size: 0.42em;
  margin: 0 6px;
  color: #fff;
  vertical-align: .15em;
  letter-spacing: .2em;
}

.hero__date {
  margin-top: 6px;
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  letter-spacing: .55em;
  font-size: 10px;
  color: #fff;
  padding-left: 9px;
  /* compensate tracking */
}

/* ============ SAVE THE DATE ============ */
.save-date {
  text-align: center;
  padding: clamp(13px, 3dvh, 40px) 0 clamp(3px, 0.6dvh, 8px);
  width: 100%;
  max-width: 100%;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
}

.monogram {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 8px;
  padding: 0 20px 0 36px;
}

.monogram-img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
}

.eyebrow {
  font-family: 'Cinzel', serif;
  font-weight: 400;
  font-size: 11px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: #111;
  margin: 8px 0 6px;
}

.save-date__date {
  font-family: 'Montserrat', sans-serif;
  font-style: normal;
  font-weight: 300;
  font-size: 13px;
  letter-spacing: .04em;
  color: #111;
}

.save-date__place {
  font-family: 'Montserrat', sans-serif;
  font-weight: 300;
  color: #111;
  margin-top: 2px;
  letter-spacing: .04em;
  font-size: 11px;
}

.save-date__time {
  font-family: 'Montserrat', sans-serif;
  font-weight: 400;
  color: #111;
  margin-top: 2px;
  margin-bottom: 19px;
  letter-spacing: .08em;
  font-size: 11px;
  text-transform: uppercase;
}

/* ---- Odometer countdown ---- */
.countdown {
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 0;
}

.countdown__unit {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.countdown__drums {
  display: flex;
  gap: 1px;
}

/* Single drum (aperture) */
.drum {
  position: relative;
  overflow: hidden;
  width: 0.62em;
  height: 1em;
  font-family: 'DM Sans', sans-serif;
  font-size: min(38px, 8.8vw);
  color: #111;
  line-height: 1em;
}

/* The rolling strip */
.drum__strip {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  will-change: transform;
}

.drum__cell {
  display: block;
  height: 1em;
  line-height: 1em;
  text-align: center;
}

.countdown__label {
  font-family: 'Montserrat', sans-serif;
  font-weight: 400;
  font-size: 11px;
}

.countdown__sep {
  font-family: 'DM Sans', sans-serif;
  font-weight: 200;
  font-size: min(38px, 8.8vw);
  line-height: 1em;
  height: 1em;
  display: flex;
  align-items: center;
  align-self: flex-start;
  padding: 0 0.08em;
  color: #111;
}

/* ============ OUR STORY ============ */
.our-story-section {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #fff;
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  align-items: stretch;
}

.os-blobs {
  position: absolute;
  bottom: -60px;
  right: -60px;
  width: 380px;
  height: 380px;
  pointer-events: none;
  z-index: 0;
}

.os-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  position: relative;
  z-index: 1;
  align-items: center;
  padding: clamp(12px, 3dvh, 24px) 10px clamp(12px, 3dvh, 24px);
  gap: 8px;
  width: 100%;
  height: 100%;
}

/* ── Left: arch photo ── */
.os-arch-column {
  display: flex;
  justify-content: center;
  align-items: center;
  padding-top: 0;
  min-width: 0;
}

.os-arch-wrapper {
  position: relative;
  display: inline-block;
  max-width: 100%;
}

.os-arch-card {
  position: relative;
  z-index: 2;
  width: min(clamp(60px, 16dvh, 145px), 40vw);
  border-radius: 50% 50% 0 0 / 38% 38% 0 0;
  box-shadow: 8px 12px 40px rgba(0, 0, 0, .18), 0 2px 8px rgba(0, 0, 0, .08);
  overflow: hidden;
}

.os-arch-card::after {
  content: '';
  position: absolute;
  inset: 10px;
  border-radius: 50% 50% 0 0 / 36% 36% 0 0;
  border: 1.5px solid rgba(255, 255, 255, .85);
  pointer-events: none;
  z-index: 2;
}

.os-arch-card img {
  display: block;
  width: min(clamp(60px, 16dvh, 145px), 40vw);
  height: min(clamp(100px, 27dvh, 244px), 67vw);
  object-fit: cover;
  object-position: center 45%;
  border-radius: inherit;
  filter: sepia(8%) brightness(0.98);
}

.os-leaf-svg {
  position: absolute;
  bottom: -10px;
  left: clamp(-20px, -5dvh, -10px);
  width: min(clamp(48px, 12dvh, 110px), 30vw);
  pointer-events: none;
  z-index: 1;
  opacity: 1;
  filter: drop-shadow(0 1px 1px rgba(255, 255, 255, .6));
}

.os-arch-flora {
  position: absolute;
  top: -18px;
  right: clamp(-20px, -5dvh, -10px);
  width: min(clamp(48px, 12dvh, 110px), 30vw);
  pointer-events: none;
  z-index: 1;
  opacity: 1;
  filter: drop-shadow(0 1px 1px rgba(255, 255, 255, .6));
}

/* ── Right: dress attire ── */
.os-attire-column {
  padding-left: 8px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: clamp(6px, 2dvh, 22px);
  isolation: isolate;
  /* contain the z-index:-1 leaf inside this column */
  min-width: 0;
}

.os-attire-heading-wrap {
  position: relative;
  display: inline-block;
}

.os-attire-heading {
  font-family: 'Cinzel', serif;
  font-weight: 600;
  font-size: min(clamp(15px, 3dvh, 26px), 6.5vw);
  line-height: .92;
  letter-spacing: .12em;
  color: #6b1a2a;
  text-align: center;
  text-transform: uppercase;
  margin: 0;
}

.os-attire-leaf {
  position: absolute;
  top: -8px;
  right: clamp(-10px, -2.5dvh, -6px);
  width: clamp(14px, 3.5dvh, 22px);
  pointer-events: none;
  opacity: 1;
}

.os-attire-leaf-tall {
  display: block;
  position: absolute;
  top: 0;
  right: 0;
  width: clamp(18px, 4dvh, 26px);
  height: 100%;
  pointer-events: none;
  z-index: -1;
  opacity: 1;
}

.os-swatches {
  display: flex;
  gap: clamp(5px, 1.1dvh, 12px);
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

.os-swatch {
  width: clamp(28px, 7dvh, 65px);
  height: clamp(28px, 7dvh, 65px);
  border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, var(--c1) 0%, var(--c2) 65%);
  box-shadow: 0 4px 18px rgba(0, 0, 0, .13), inset 0 -2px 8px rgba(0, 0, 0, .08);
  flex-shrink: 0;
}

/* Clothing attire rows */
.os-attire-rows {
  display: flex;
  flex-direction: column;
  gap: clamp(5px, 1.1dvh, 14px);
  align-items: center;
  width: 100%;
}

.os-attire-row {
  display: flex;
  align-items: center;
  gap: clamp(3px, 0.7dvh, 9px);
  justify-content: center;
  flex-wrap: nowrap;
  width: 100%;
}

.os-clothing-icon {
  width: min(clamp(22px, 5.5dvh, 44px), 10.2vw);
  height: min(clamp(30px, 7dvh, 56px), 13vw);
  object-fit: contain;
  flex-shrink: 0;
}

.os-swatch--attire {
  width: min(clamp(18px, 4.5dvh, 36px), 8.4vw);
  height: min(clamp(18px, 4.5dvh, 36px), 8.4vw);
  flex-shrink: 0;
}

.os-swatch-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(3px, 0.7dvh, 7px);
  align-items: center;
  justify-items: center;
}

/* Responsive font tweaks for small screens — all in px, immune to user font preferences */
@media (max-width: 480px) {
  .hero__invite {
    font-size: 9px;
    line-height: 1.5;
    margin-bottom: 8px;
  }

  .hero__title {
    font-size: 23px;
  }

  .hero__date {
    font-size: 9px;
    margin-top: 4px;
  }

  .eyebrow {
    margin: 2px 0;
    font-size: 9px;
  }

  .save-date__date {
    font-size: 11px;
  }

  .save-date__place {
    font-size: 10px;
  }

  .save-date__time {
    font-size: 10px;
  }

  .countdown {
    margin: 9px auto 0;
  }

  .drum {
    font-size: min(38px, 8.8vw);
  }

  .countdown__sep {
    font-size: min(38px, 8.8vw);
  }

  .countdown__label {
    font-size: 8px;
    margin-top: 5px;
    letter-spacing: .14em;
  }
}

/* Short phones (≤750px tall) — structural squeeze only; sizing handled by continuous dvh clamps above */
@media (max-height: 750px) {
  .hero {
    flex: 0 0 30dvh;
  }

  .save-date {
    padding: 16px 0 5px;
  }

  .drum {
    font-size: min(34px, 8.8vw);
  }

  .countdown__sep {
    font-size: min(34px, 8.8vw);
  }
}

/* Very short phones (≤640px tall) — structural squeeze only; sizing handled by continuous dvh clamps above */
@media (max-height: 640px) {
  .hero {
    flex: 0 0 28dvh;
  }

  .save-date {
    padding: 10px 0 3px;
  }

  .drum {
    font-size: min(30px, 8.8vw);
  }

  .countdown__sep {
    font-size: min(30px, 8.8vw);
  }
}

/* ============ GIFT WRAP REVEAL GATEWAY ============ */
.gateway {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  opacity: 1;
  transition: background-color 900ms cubic-bezier(0.4, 0, 0.2, 1),
    opacity 900ms cubic-bezier(0.4, 0, 0.2, 1),
    visibility 0s linear 1000ms;
}

.gateway__cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.gateway__cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Opening state */
.gateway.is-opening {
  background-color: rgba(255, 255, 255, 0);
  opacity: 0;
}

.gateway.is-hidden {
  visibility: hidden;
  pointer-events: none;
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {

  .gateway,
  .gateway * {
    transition: none !important;
    animation: none !important;
  }
}

/* ============ INVITATION PAGE ============ */
.invitation-page {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.inv-hero,
.inv-section {
  position: relative;
  width: 100%;
}

.inv-section {
  margin-top: -40px;
}

/* Reserve the correct height for image 2 so the absolute overlay always positions correctly */
.inv-section--img2 {
  aspect-ratio: 1432 / 1825;
}

/* Image 1: stays fully opaque — image 2 slides on top and fades in over it */
.inv-hero .inv-image {
  width: 100%;
  height: auto;
  display: block;
  max-width: 100%;
}

/* Subsequent images: fade in over the overlap zone only; bottom image is always opaque beneath */
.inv-section .inv-image {
  width: 100%;
  height: auto;
  display: block;
  max-width: 100%;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0px, black 40px);
  mask-image: linear-gradient(to bottom, transparent 0px, black 40px);
}

.inv-image {
  width: 100%;
  height: auto;
  display: block;
  max-width: 100%;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  pointer-events: none;
}

.inv-map-link {
  display: block;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.inv-map-link .inv-image {
  pointer-events: auto;
}

.inv-hero__logo {
  position: absolute;
  top: clamp(12px, 4vw, 20px);
  left: 50%;
  transform: translateX(-50%);
  width: clamp(54px, 14vw, 72px);
  height: auto;
  pointer-events: none;
  z-index: 2;
}

/* ============ COUNTDOWN OVERLAY ON IMAGE 2 ============ */
.countdown-overlay {
  position: absolute;
  top: 27%;
  /* Centered vertically in the 2nd part (of 7 parts) of the image height */
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  max-width: 320px;
  display: flex;
  justify-content: center;
  pointer-events: none;
  z-index: 10;
}

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

.countdown-overlay .countdown__unit {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.countdown-overlay .countdown__drums {
  display: flex;
  gap: 1px;
}

.countdown-overlay .drum {
  position: relative;
  overflow: hidden;
  width: 0.62em;
  height: 1em;
  font-family: 'DM Sans', sans-serif;
  font-size: min(34px, 8vw);
  font-weight: 300;
  color: #706080;
  /* Soft muted purple matching image text */
  line-height: 1em;
}

.countdown-overlay .drum__strip {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  will-change: transform;
}

.countdown-overlay .drum__cell {
  display: block;
  height: 1em;
  line-height: 1em;
  text-align: center;
}

.countdown-overlay .countdown__label {
  font-family: 'Montserrat', sans-serif;
  font-weight: 400;
  font-size: 8px;
  color: #706080;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-top: 4px;
}

.countdown-overlay .countdown__sep {
  font-family: 'DM Sans', sans-serif;
  font-weight: 200;
  font-size: min(34px, 8vw);
  line-height: 1em;
  height: 1em;
  display: flex;
  align-items: center;
  align-self: flex-start;
  padding: 0 0.04em;
  color: #706080;
}