/* ============ RESET & BASE ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  background: #ffffff;
  min-height: 100%;
  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;
  min-height: 100dvh;
  height: 100dvh;
  overflow: hidden;
  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;
}
.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: 38px;
  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: 38px;
  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: 24px 10px 14px;
  gap: 8px;
  width: 100%;
  height: 100%;
}

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

.os-arch-wrapper {
  position: relative;
  display: inline-block;
}

.os-arch-card {
  position: relative;
  z-index: 2;
  width: clamp(88px, 22dvh, 145px);
  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: clamp(88px, 22dvh, 145px);
  height: clamp(146px, 37dvh, 244px);
  object-fit: cover;
  object-position: center 30%;
  border-radius: inherit;
  filter: sepia(8%) brightness(0.98);
}

.os-leaf-svg {
  position: absolute;
  bottom: -10px;
  left: clamp(-20px, -5dvh, -10px);
  width: clamp(72px, 18dvh, 110px);
  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: clamp(72px, 18dvh, 110px);
  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);
}

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

.os-attire-heading {
  font-family: 'Cinzel', serif;
  font-weight: 600;
  font-size: 26px;
  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: 0;
  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(38px, 6.5dvh, 65px);
  height: clamp(38px, 6.5dvh, 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;
}

/* 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: 38px; }
  .countdown__sep { font-size: 38px; }
  .countdown__label { font-size: 8px; margin-top: 5px; letter-spacing: .14em; }
}

/* Short phones (≤750px tall) — squeeze everything to fit */
@media (max-height: 750px) {
  .hero { flex: 0 0 30dvh; }
  .save-date { padding: 16px 0 5px; }
  .drum { font-size: 34px; }
  .countdown__sep { font-size: 34px; }
  .os-grid { padding: 18px 10px 10px; }
  .os-arch-card,
  .os-arch-card img { width: clamp(78px, 19dvh, 125px); height: clamp(130px, 33dvh, 210px); border-radius: 50% 50% 0 0 / 38% 38% 0 0; }
  /* Scale decorations down further to match smaller arch card */
  .os-leaf-svg { width: clamp(58px, 14dvh, 90px); left: clamp(-16px, -4dvh, -8px); bottom: -8px; }
  .os-arch-flora { width: clamp(58px, 14dvh, 90px); top: -14px; right: clamp(-16px, -4dvh, -8px); }
  .os-attire-leaf { width: clamp(12px, 2.8dvh, 18px); }
  .os-attire-leaf-tall { width: clamp(14px, 3dvh, 20px); }
  .os-attire-heading { font-size: 22px; text-align: center; }
  .os-swatch { width: clamp(36px, 7.5dvh, 58px); height: clamp(36px, 7.5dvh, 58px); }
}

/* Very short phones (≤640px tall) — squeeze even more */
@media (max-height: 640px) {
  .hero { flex: 0 0 28dvh; }
  .save-date { padding: 10px 0 3px; }
  .drum { font-size: 30px; }
  .countdown__sep { font-size: 30px; }
  .os-grid { padding: 14px 10px 8px; }
  .os-arch-card,
  .os-arch-card img { width: clamp(65px, 16dvh, 100px); height: clamp(108px, 27dvh, 164px); border-radius: 50% 50% 0 0 / 38% 38% 0 0; }
  .os-leaf-svg { width: clamp(50px, 12dvh, 76px); left: clamp(-12px, -3dvh, -6px); bottom: -6px; }
  .os-arch-flora { width: clamp(50px, 12dvh, 76px); top: -10px; right: clamp(-12px, -3dvh, -6px); }
  .os-attire-heading { font-size: 18px; }
  .os-swatch { width: clamp(30px, 6dvh, 48px); height: clamp(30px, 6dvh, 48px); }
}

/* ============ GIFT WRAP REVEAL GATEWAY ============ */
.gateway {
  position: absolute;
  inset: 0;
  z-index: 9999;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  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__inner {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  user-select: none;
}
.gateway__monogram {
  width: clamp(58px, 14vw, 88px);
  height: auto;
  margin-bottom: clamp(18px, 4vw, 30px);
  filter: sepia(0.35) saturate(2.2) hue-rotate(-15deg) brightness(0.85);
  opacity: 0.9;
  transition: opacity 700ms cubic-bezier(0.4, 0, 0.2, 1) 80ms,
              transform 700ms cubic-bezier(0.4, 0, 0.2, 1) 80ms;
}
.gateway__cta {
  font-family: 'Montserrat', 'Inter', sans-serif;
  font-size: clamp(10px, 2.6vw, 12px);
  letter-spacing: 0.32em;
  font-weight: 400;
  color: #6b6258;
  text-transform: uppercase;
  margin-bottom: clamp(14px, 3vw, 22px);
  animation: gatewayPulse 2.2s ease-in-out infinite;
  transition: opacity 500ms cubic-bezier(0.4, 0, 0.2, 1);
}
.gateway__bow {
  width: 100%;
  position: relative;
  filter: drop-shadow(0 18px 28px rgba(60, 50, 35, 0.18));
  transition: opacity 900ms cubic-bezier(0.4, 0, 0.2, 1),
              transform 900ms cubic-bezier(0.4, 0, 0.2, 1);
}
.gateway__bow-img {
  width: 100%;
  height: auto;
  display: block;
}

/* Opening state */
.gateway.is-opening {
  background-color: rgba(255, 255, 255, 0);
}
.gateway.is-opening .gateway__monogram,
.gateway.is-opening .gateway__cta {
  opacity: 0;
  transform: translateY(-20px);
}
.gateway.is-opening .gateway__bow {
  opacity: 0;
  transform: scale(1.18) translateY(-40px);
}

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

@keyframes gatewayPulse {
  0%, 100% { opacity: 0.55; letter-spacing: 0.32em; }
  50%      { opacity: 1;    letter-spacing: 0.38em; }
}

@media (prefers-reduced-motion: reduce) {
  .gateway, .gateway *, .gateway__cta { transition: none !important; animation: none !important; }
}
