/* =========================================================
   USMAN & FAIZA — WEDDING SITE
   Design tokens
   ========================================================= */
:root {
  --ivory: #FBF3EC;
  --ivory-deep: #F3E1D2;
  --emerald: #6B2737;
  --emerald-deep: #3E141C;
  --emerald-soft: #F3E3DB;
  --gold: #C98A6B;
  --gold-light: #E9B98E;
  --gold-dark: #A8663F;
  --ink: #2A211D;
  --ink-soft: #6b5c53;

  --font-display: 'Marcellus', 'Cormorant Garamond', serif;
  --font-body: 'Jost', 'Segoe UI', sans-serif;
  --font-label: 'Jost', sans-serif;

  --radius: 2px;
  --container-max: 1120px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--ivory);
  overflow-x: hidden;
  font-size: 17px;
  line-height: 1.7;
}

h1, h2, h3, h4, .display-font {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.01em;
}

.eyebrow {
  font-family: var(--font-label);
  text-transform: uppercase;
  letter-spacing: 0.32em;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--gold-dark);
}

.section {
  padding: 6.5rem 1.5rem;
  position: relative;
}

.section-inner {
  max-width: var(--container-max);
  margin: 0 auto;
}

a { text-decoration: none; }

/* =========================================================
   NAV
   ========================================================= */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 999;
  padding: 1.1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(251, 246, 237, 0.0);
  transition: background 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

.site-nav.scrolled {
  background: rgba(251, 246, 237, 0.94);
  box-shadow: 0 1px 0 rgba(14,61,47,0.08);
  padding: 0.7rem 1.5rem;
  backdrop-filter: blur(6px);
}

.site-nav .monogram-mini {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--emerald);
  letter-spacing: 0.05em;
}

.nav-links {
  display: flex;
  gap: 2.2rem;
  list-style: none;
  margin: 0; padding: 0;
}

.nav-links a {
  font-family: var(--font-label);
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--emerald);
  opacity: 0.75;
  transition: opacity 0.25s ease;
}
.nav-links a:hover { opacity: 1; }

.nav-toggle { display: none; background: none; border: none; color: var(--emerald); font-size: 1.5rem; z-index: 1001; }

@media (max-width: 780px) {
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(251, 243, 236, 0.98);
    padding: 1.2rem 1.5rem;
    gap: 1rem;
    box-shadow: 0 12px 24px rgba(14,61,47,0.1);
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(199,154,61,0.14), transparent 55%),
    linear-gradient(180deg, var(--emerald-deep) 0%, var(--emerald) 62%, #0c352a 100%);
  color: var(--ivory);
  padding: 7rem 1.5rem 4rem;
  overflow: hidden;
}

.hero::before,
.hero::after {
  content: '';
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(232, 200, 116, 0.35);
  pointer-events: none;
  z-index: 2;
}
.hero::after { inset: 20px; border-color: rgba(232, 200, 116, 0.18); }

.hero-banner-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero-banner-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.6s ease;
}
.hero-banner-slide.visible { opacity: 1; }

/* Soft, blurred, full-bleed copy of the photo fills every edge of the hero */
.hero-banner-blur {
  position: absolute;
  inset: -30px;
  background-size: cover;
  background-position: center;
  filter: blur(30px) brightness(0.7) saturate(1.15);
  transform: scale(1.15);
}

/* The actual photo, shown completely uncropped, centered on top of the blur */
.hero-banner-sharp {
  position: absolute;
  inset: 0;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

/* Darkening gradient over the collage so names/text stay legible */
.hero-banner-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(199,154,61,0.16), transparent 55%),
    linear-gradient(180deg, var(--emerald-deep) 0%, rgba(14,61,47,0.62) 55%, rgba(12,53,42,0.82) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-petals {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}
.hero-petals span {
  position: absolute;
  bottom: -20px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold-light);
  opacity: 0.55;
  animation: floatUp 14s linear infinite;
}
.hero-petals span:nth-child(1) { left: 8%;  width: 5px; height: 5px; animation-duration: 12s; animation-delay: 0s; }
.hero-petals span:nth-child(2) { left: 22%; width: 8px; height: 8px; animation-duration: 17s; animation-delay: 2s; }
.hero-petals span:nth-child(3) { left: 40%; width: 4px; height: 4px; animation-duration: 11s; animation-delay: 4s; }
.hero-petals span:nth-child(4) { left: 62%; width: 7px; height: 7px; animation-duration: 15s; animation-delay: 1s; }
.hero-petals span:nth-child(5) { left: 78%; width: 5px; height: 5px; animation-duration: 13s; animation-delay: 6s; }
.hero-petals span:nth-child(6) { left: 90%; width: 6px; height: 6px; animation-duration: 16s; animation-delay: 3s; }

@keyframes floatUp {
  0%   { transform: translateY(0) translateX(0); opacity: 0; }
  10%  { opacity: 0.55; }
  90%  { opacity: 0.3; }
  100% { transform: translateY(-110vh) translateX(20px); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-petals { display: none; }
}

.hero-motif {
  width: 92px;
  margin: 0 auto 1.6rem;
  opacity: 0;
  animation: fadeUp 1s ease forwards 0.15s;
}

.hero-eyebrow {
  opacity: 0;
  animation: fadeUp 1s ease forwards 0.35s;
  color: var(--gold-light);
}

.hero-intro-subtext {
  opacity: 0;
  animation: fadeUp 1s ease forwards 0.45s;
  font-family: var(--font-label);
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-top: 0.5rem;
}

.hero-names {
  font-size: clamp(3.2rem, 9vw, 6.4rem);
  line-height: 1.02;
  margin: 0.6rem 0 0.2rem;
  opacity: 0;
  animation: fadeUp 1.1s ease forwards 0.55s;
}

.hero-names .amp {
  display: inline-block;
  color: var(--gold-light);
  font-size: 0.7em;
  margin: 0 0.18em;
  transform: translateY(-0.05em);
}

.hero-tagline {
  opacity: 0;
  animation: fadeUp 1s ease forwards 0.7s;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  letter-spacing: 0.03em;
  color: rgba(251,246,237,0.9);
  margin-bottom: 0.6rem;
}

.hero-sub {
  opacity: 0;
  animation: fadeUp 1s ease forwards 0.8s;
  font-size: 1rem;
  letter-spacing: 0.08em;
  color: rgba(251,246,237,0.85);
  margin-bottom: 2.4rem;
}

.hero-sub strong { color: var(--gold-light); font-weight: 500; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-scroll {
  position: absolute;
  bottom: 2rem; left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  color: rgba(251,246,237,0.6);
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  opacity: 0;
  animation: fadeUp 1s ease forwards 1.2s;
}
.hero-scroll .line {
  width: 1px; height: 34px; background: rgba(251,246,237,0.5);
  margin: 0.6rem auto 0;
  animation: scrollLine 2s ease-in-out infinite;
}
@keyframes scrollLine {
  0%, 100% { transform: scaleY(1); opacity: 0.5; }
  50% { transform: scaleY(0.5); opacity: 1; }
}

/* =========================================================
   DIVIDER (paisley/mehndi motif)
   ========================================================= */
.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 0 auto 2.6rem;
  max-width: 320px;
}
.divider .rule { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.divider svg { flex-shrink: 0; }

/* =========================================================
   VERSE (Quranic verse band under the hero)
   ========================================================= */
.verse-section {
  background: var(--emerald-deep);
  padding: 3.2rem 1.5rem;
  text-align: center;
  position: relative;
}
.verse-section::before {
  content: '';
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(232, 200, 116, 0.15);
  pointer-events: none;
}
.verse-section .section-inner { max-width: 780px; }

.verse-arabic {
  font-family: 'Amiri', 'Cormorant Garamond', serif;
  font-weight: 700;
  font-size: clamp(1.5rem, 3.4vw, 2.1rem);
  line-height: 2.1;
  color: var(--gold-light);
  margin-bottom: 1.4rem;
}

.verse-translation {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1rem;
  line-height: 1.8;
  color: rgba(251,246,237,0.82);
  max-width: 56ch;
  margin: 0 auto 0.9rem;
}

.verse-citation {
  font-family: var(--font-label);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-dark);
}

@media (max-width: 480px) {
  .verse-section { padding: 2.4rem 1.2rem; }
  .verse-arabic { line-height: 1.9; }
  .verse-translation { font-size: 0.92rem; }
}

/* =========================================================
   COUNTDOWN (Nikah)
   ========================================================= */
.countdown-wrap {
  background: var(--emerald);
  color: var(--ivory);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: rgba(232,200,116,0.25);
  max-width: 680px;
  margin: 0 auto;
}

.countdown-cell {
  background: var(--emerald-deep);
  padding: 2rem 0.5rem;
  text-align: center;
}

.countdown-num {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  color: var(--gold-light);
  line-height: 1;
}

.countdown-label {
  font-family: var(--font-label);
  font-size: 0.66rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(251,246,237,0.7);
  margin-top: 0.6rem;
  display: block;
}

/* =========================================================
   STORY / TIMELINE
   ========================================================= */
.timeline {
  position: relative;
  max-width: 620px;
  margin: 0 auto;
  padding-left: 2.4rem;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: linear-gradient(180deg, var(--gold), rgba(201,138,107,0.1));
}
.timeline-item {
  position: relative;
  padding-bottom: 2.8rem;
}
.timeline-item:last-child { padding-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: -2.4rem;
  top: 6px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 5px var(--ivory), 0 0 0 6px rgba(201,138,107,0.4);
}
.timeline-eyebrow {
  font-family: var(--font-label);
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 0.35rem;
  display: block;
}
.timeline-item h3 { color: var(--emerald); margin-bottom: 0.4rem; font-size: 1.5rem; }
.timeline-item p { color: var(--ink-soft); max-width: 48ch; margin: 0; }
.timeline-item p em { color: var(--gold-dark); font-style: italic; }

@media (max-width: 480px) {
  .timeline { padding-left: 1.9rem; }
  .timeline-dot { left: -1.9rem; }
}

/* =========================================================
   EVENTS (Nikah / Walima)
   ========================================================= */
.event-card {
  background: var(--ivory);
  border: 1px solid rgba(14,61,47,0.12);
  padding: 2.6rem 2.2rem;
  height: 100%;
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.event-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(14,61,47,0.08); }
.event-card .event-icon { width: 40px; height: 40px; margin-bottom: 1.4rem; color: var(--gold-dark); }
.event-card h3 { color: var(--emerald); font-size: 1.7rem; margin-bottom: 0.3rem; }
.event-card .event-when { font-family: var(--font-label); font-size: 0.78rem; letter-spacing: 0.1em; color: var(--gold-dark); text-transform: uppercase; margin-bottom: 1rem; }
.event-card p { color: var(--ink-soft); font-size: 0.95rem; }
.event-card .event-venue { margin-top: 1.2rem; font-weight: 500; color: var(--ink); }

/* =========================================================
   GALLERY
   ========================================================= */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.8rem;
}
.gallery-grid .g-item {
  aspect-ratio: 1;
  border-radius: 2px;
  overflow: hidden;
  background: var(--emerald-soft);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gallery-grid .g-item img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* shows the whole photo, never crops or zooms it */
  display: block;
  transition: transform 0.35s ease, filter 0.35s ease;
}
.gallery-grid .g-item img:hover {
  transform: scale(1.03);
  filter: brightness(1.03);
}
.gallery-grid .g-placeholder {
  display: none;
  align-items: center; justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--gold-dark);
  font-family: var(--font-display);
  font-size: 0.9rem;
  text-align: center;
  padding: 1rem;
}
@media (max-width: 780px) {
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
}
@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
}

/* =========================================================
   VIDEO
   ========================================================= */
.video-frame-wrap { max-width: 460px; margin: 0 auto; text-align: center; }

.video-frame {
  position: relative;
  padding: 10px;
  background: var(--ivory);
  box-shadow: 0 20px 45px rgba(14,61,47,0.12);
}

.video-frame video {
  width: 100%;
  display: block;
  aspect-ratio: 16/9;
  background: var(--emerald-deep);
  object-fit: cover;
}

/* Dynamic multi-video grid (populated from the admin panel, 4-6 smaller clips) */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.2rem;
  max-width: 900px;
  margin: 0 auto;
}
.video-grid .video-grid-item {
  position: relative;
  padding: 8px;
  background: var(--ivory);
  box-shadow: 0 16px 34px rgba(14,61,47,0.1);
}
.video-grid .video-grid-item video {
  width: 100%;
  display: block;
  aspect-ratio: 16/9;
  background: var(--emerald-deep);
  object-fit: cover;
}
@media (max-width: 600px) {
  .video-grid { grid-template-columns: 1fr 1fr; gap: 0.7rem; }
}
@media (max-width: 420px) {
  .video-grid { grid-template-columns: 1fr; }
}

.video-placeholder {
  display: none;
  position: absolute;
  inset: 14px;
  flex-direction: column;
  align-items: center; justify-content: center;
  gap: 0.9rem;
  background: linear-gradient(160deg, var(--emerald-soft), var(--ivory-deep));
  text-align: center;
  padding: 1.5rem;
}
.video-placeholder p { font-family: var(--font-body); font-size: 0.85rem; color: var(--ink-soft); margin: 0; }
.video-placeholder code { background: rgba(201,138,107,0.15); padding: 0.1rem 0.4rem; border-radius: 2px; }

/* =========================================================
   BUTTONS
   ========================================================= */
.btn-gold {
  background: var(--gold);
  color: var(--emerald-deep);
  border: none;
  padding: 0.95rem 2.6rem;
  font-family: var(--font-label);
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  border-radius: var(--radius);
  transition: background 0.25s ease, transform 0.2s ease;
  cursor: pointer;
}
.btn-gold:hover { background: var(--gold-light); transform: translateY(-1px); }
.btn-gold:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  background: var(--emerald-deep);
  color: rgba(251,246,237,0.6);
  text-align: center;
  padding: 2.6rem 1.5rem 2rem;
  border-top: 1px solid rgba(232,200,116,0.15);
}
.site-footer .monogram-mini { color: var(--gold-light); font-size: 1.4rem; margin-bottom: 0.6rem; display: block; }
.site-footer small { font-size: 0.72rem; letter-spacing: 0.05em; }

/* =========================================================
   REVEAL ON SCROLL
   ========================================================= */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* Section heading block */
.section-head { max-width: 640px; margin: 0 auto 3.5rem; text-align: center; }
.section-head h2 { color: var(--emerald); font-size: clamp(2.1rem, 4.5vw, 3rem); margin: 0.5rem 0 0.8rem; }
.section-head p { color: var(--ink-soft); }

.section-alt { background: var(--ivory-deep); }

/* subtle dot texture on ivory sections for extra richness */
.section:not(.countdown-wrap):not(.letter-section)::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(14,61,47,0.055) 1px, transparent 1px);
  background-size: 22px 22px;
  pointer-events: none;
  opacity: 0.6;
}
.section > * { position: relative; z-index: 1; }

/* =========================================================
   ENGAGEMENT PHOTO
   ========================================================= */
.engagement-section { background: var(--ivory); }

.photo-frame-wrap { max-width: 560px; margin: 0 auto; text-align: center; }

.photo-frame {
  position: relative;
  padding: 18px;
  background: var(--ivory);
  box-shadow: 0 30px 60px rgba(14,61,47,0.15);
}

.photo-frame-inner {
  position: relative;
  aspect-ratio: 4/5;
  overflow: hidden;
  background: linear-gradient(160deg, var(--emerald-soft), var(--ivory-deep));
  border: 1px solid rgba(199,154,61,0.35);
}

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

.photo-placeholder {
  display: none;
  position: absolute; inset: 0;
  flex-direction: column;
  align-items: center; justify-content: center;
  gap: 0.9rem;
  color: var(--gold-dark);
  text-align: center;
  padding: 1.5rem;
}
.photo-placeholder p { font-family: var(--font-body); font-size: 0.85rem; color: var(--ink-soft); margin: 0; }
.photo-placeholder code { background: rgba(199,154,61,0.12); padding: 0.1rem 0.4rem; border-radius: 2px; }

.frame-corner {
  position: absolute;
  width: 22px; height: 22px;
  border: 1.5px solid var(--gold);
}
.frame-corner.tl { top: 4px; left: 4px; border-right: none; border-bottom: none; }
.frame-corner.tr { top: 4px; right: 4px; border-left: none; border-bottom: none; }
.frame-corner.bl { bottom: 4px; left: 4px; border-right: none; border-top: none; }
.frame-corner.br { bottom: 4px; right: 4px; border-left: none; border-top: none; }

.photo-caption {
  margin-top: 1.6rem;
  font-family: var(--font-display);
  font-style: italic;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

/* =========================================================
   LETTER / ENVELOPE
   ========================================================= */
.letter-section {
  background: linear-gradient(180deg, var(--emerald-deep), var(--emerald) 70%, var(--emerald-deep));
  color: var(--ivory);
}
.letter-section .section-head p { color: rgba(251,246,237,0.7); }

.envelope-wrap { max-width: 480px; margin: 0 auto; text-align: center; }

.envelope {
  position: relative;
  width: 100%;
  max-width: 340px;
  aspect-ratio: 3/2;
  margin: 0 auto;
  filter: drop-shadow(0 20px 34px rgba(0,0,0,0.35));
}

.envelope-back {
  position: absolute; inset: 0;
  background: linear-gradient(160deg, #f3ead9, #e6d9bd);
  border-radius: 3px;
}

.envelope-front {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 62%;
  background: linear-gradient(160deg, #ece0c8, #ddcda3);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  border-radius: 0 0 3px 3px;
}

.envelope-flap {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 55%;
  background: linear-gradient(200deg, #e9dcbf, #d8c69a);
  clip-path: polygon(0 0, 100% 0, 50% 78%);
  transform-origin: top center;
  transition: transform 0.7s cubic-bezier(0.6, 0, 0.4, 1);
  z-index: 3;
}

.envelope-seal {
  position: absolute;
  top: 40%; left: 50%;
  transform: translate(-50%, -50%);
  width: 46px; height: 46px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--gold-light), var(--gold-dark));
  color: var(--emerald-deep);
  font-family: var(--font-display);
  font-size: 0.85rem;
  display: flex; align-items: center; justify-content: center;
  z-index: 4;
  box-shadow: 0 4px 10px rgba(0,0,0,0.35);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.envelope.open .envelope-flap {
  transform: rotateX(150deg);
}
.envelope.open .envelope-seal {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.4);
}

.letter-paper {
  max-width: 560px;
  margin: 2.6rem auto 0;
  background: #FBF6ED;
  color: var(--ink);
  padding: 3rem 2.6rem;
  text-align: left;
  border-radius: 2px;
  box-shadow: 0 30px 70px rgba(0,0,0,0.35);
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.9s ease, opacity 0.7s ease, padding 0.7s ease, margin 0.7s ease;
}
.letter-paper.visible {
  max-height: 1200px;
  opacity: 1;
}

.letter-paper p {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.12rem;
  line-height: 1.85;
  color: var(--ink-soft);
  margin-bottom: 1.1rem;
}

.letter-to {
  font-style: normal !important;
  font-size: 1.3rem !important;
  color: var(--emerald) !important;
  margin-bottom: 1.4rem !important;
}

.letter-signature {
  margin-top: 1.8rem;
  font-style: normal !important;
}
.letter-signature span {
  font-family: 'Mrs Saint Delafield', cursive;
  font-size: 2.4rem;
  color: var(--gold-dark);
  display: inline-block;
  margin-top: 0.2rem;
}

.letter-close-btn {
  display: block;
  margin: 2.2rem auto 0;
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold-dark);
  padding: 0.7rem 1.8rem;
  font-family: var(--font-label);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.letter-close-btn:hover {
  background: var(--gold);
  color: var(--emerald-deep);
}

@media (max-width: 640px) {
  .letter-paper { padding: 2.2rem 1.5rem; }
}

/* =========================================================
   LETTER PASSWORD LOCK
   ========================================================= */
.letter-lock {
  display: none;
  max-width: 340px;
  margin: 1.6rem auto 0;
}
.letter-lock.visible { display: block; }

.lock-label {
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: rgba(251,246,237,0.75);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.lock-input-row {
  display: flex;
  gap: 0.6rem;
}

.lock-input {
  flex: 1;
  background: rgba(251,246,237,0.06);
  border: 1px solid rgba(251,246,237,0.3);
  color: var(--ivory);
  border-radius: var(--radius);
  padding: 0.7rem 0.9rem;
  font-family: var(--font-body);
  font-size: 0.92rem;
  min-width: 0;
}
.lock-input::placeholder { color: rgba(251,246,237,0.4); }
.lock-input:focus {
  outline: none;
  border-color: var(--gold-light);
  background: rgba(251,246,237,0.1);
}
.lock-input.shake {
  animation: lockShake 0.4s ease;
  border-color: #e08a8a;
}
@keyframes lockShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

.lock-error {
  display: none;
  color: #f0a5a5;
  font-size: 0.78rem;
  margin-top: 0.7rem;
}
.lock-error.visible { display: block; }

@media (max-width: 480px) {
  .lock-input-row { flex-direction: column; }
}

/* =========================================================
   RESPONSIVENESS PASS — tablets & phones
   ========================================================= */
@media (max-width: 780px) {
  .section { padding: 4.5rem 1.25rem; }
  .section-head { margin-bottom: 2.4rem; }
  .event-card { padding: 2rem 1.6rem; }
  .countdown-grid { max-width: 100%; }
  .envelope { max-width: 280px; }
}

@media (max-width: 480px) {
  body { font-size: 16px; }
  .hero { padding: 6rem 1.1rem 3rem; }
  .hero-motif { width: 70px; }
  .hero-sub { font-size: 0.88rem; letter-spacing: 0.04em; }
  .site-nav { padding: 0.9rem 1.1rem; }
  .site-nav .monogram-mini { font-size: 1.05rem; }

  .section { padding: 3.6rem 1rem; }
  .section-head h2 { font-size: 1.85rem; }

  .countdown-grid { grid-template-columns: repeat(2, 1fr); gap: 1px; }
  .countdown-cell { padding: 1.4rem 0.4rem; }
  .countdown-num { font-size: 2rem; }

  .photo-frame { padding: 10px; }
  .photo-caption { font-size: 0.92rem; }

  .envelope { max-width: 230px; }
  .envelope-seal { width: 38px; height: 38px; font-size: 0.72rem; }
  .letter-paper { padding: 1.8rem 1.1rem; margin-top: 2rem; }
  .letter-paper p { font-size: 1rem; }
  .letter-signature span { font-size: 2rem; }

  .btn-gold { width: 100%; padding: 0.9rem 1rem; }
}

@media (max-width: 360px) {
  .hero-names { font-size: 2.5rem; }
  .countdown-num { font-size: 1.7rem; }
}

/* =========================================================
   WEDDING DAY FLOW
   ========================================================= */
.flow-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.4rem;
  max-width: 620px;
  margin: 0 auto;
}
.flow-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}
.flow-time {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--emerald);
}
.flow-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 6px var(--ivory), 0 0 0 7px rgba(201,138,107,0.4);
}
.flow-label {
  font-family: var(--font-label);
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-align: center;
}
.flow-connector {
  flex: 1;
  min-width: 50px;
  height: 1px;
  background: linear-gradient(90deg, var(--gold), rgba(201,138,107,0.2), var(--gold));
  position: relative;
  top: -12px;
}

@media (max-width: 560px) {
  .flow-wrap { flex-direction: column; gap: 0.6rem; }
  .flow-connector { width: 1px; height: 36px; min-width: 0; top: 0; background: linear-gradient(180deg, var(--gold), rgba(201,138,107,0.2)); }
}

/* =========================================================
   LOCATION
   ========================================================= */
.location-card {
  max-width: 480px;
  margin: 0 auto;
  text-align: center;
  background: var(--ivory);
  border: 1px solid rgba(14,61,47,0.1);
  padding: 2.6rem 2.2rem;
  border-radius: 2px;
}
.location-pin { margin-bottom: 1rem; }
.location-address {
  color: var(--ink-soft);
  margin-bottom: 1.6rem;
  font-size: 1rem;
  line-height: 1.6;
}
.location-directions-btn {
  display: inline-block;
  border: 1px solid var(--gold);
  color: var(--gold-dark);
  background: transparent;
  padding: 0.8rem 2.2rem;
  font-family: var(--font-label);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 2px;
  transition: all 0.2s ease;
}
.location-directions-btn:hover {
  background: var(--gold);
  color: var(--emerald-deep);
}

@media (max-width: 480px) {
  .location-card { padding: 2rem 1.4rem; }
}

/* =========================================================
   LIGHTBOX (click a gallery photo to view it larger)
   ========================================================= */
.gallery-grid .g-item {
  cursor: zoom-in;
}

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(8, 6, 5, 0.92);
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.lightbox.open {
  display: flex;
  animation: lightboxFade 0.25s ease;
}
@keyframes lightboxFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.lightbox-img {
  max-width: min(92vw, 1100px);
  max-height: 88vh;
  object-fit: contain;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
  border-radius: 2px;
}

.lightbox-close {
  position: absolute;
  top: 1.2rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: var(--ivory);
  font-size: 2.4rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}
.lightbox-close:hover { opacity: 1; }

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(251,246,237,0.08);
  border: 1px solid rgba(251,246,237,0.25);
  color: var(--ivory);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-nav:hover { background: rgba(251,246,237,0.18); }
.lightbox-prev { left: 1.2rem; }
.lightbox-next { right: 1.2rem; }
.lightbox-nav.hidden { display: none; }

@media (max-width: 600px) {
  .lightbox { padding: 1rem; }
  .lightbox-close { top: 0.8rem; right: 1rem; font-size: 2rem; }
  .lightbox-nav { width: 38px; height: 38px; font-size: 0.95rem; }
  .lightbox-prev { left: 0.5rem; }
  .lightbox-next { right: 0.5rem; }
}
