/* ============================================
   HEYDI & YAIKIEL — WEDDING INVITATION
   Design System & Styles
   ============================================ */

/* --- Design Tokens --- */
:root {
  --blush: #E8B4B8;
  --rose-gold: #B76E79;
  --rose-gold-dark: #9A5B64;
  --sand: #F5E6D3;
  --sand-light: #FBF3EA;
  --ocean: #5B9BD5;
  --ivory: #FEFCF9;
  --charcoal: #2C2C2C;
  --charcoal-light: #555;
  --gold: #C9A96E;
  --gold-light: #D4BA8A;
  --white: #FFFFFF;
  --overlay-dark: rgba(20, 15, 10, 0.45);
  --overlay-light: rgba(254, 252, 249, 0.92);

  --font-heading: 'Playfair Display', 'Georgia', serif;
  --font-body: 'Lato', 'Helvetica Neue', sans-serif;
  --font-script: 'Great Vibes', cursive;

  --max-width: 1200px;
  --section-padding: 6rem 2rem;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 8px 32px rgba(0,0,0,0.08);
  --shadow-lg: 0 16px 48px rgba(0,0,0,0.12);
  --transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

body.lightbox-open { overflow: hidden; }
body.invite-open { overflow: hidden; }

/* --- Invite Landing Overlay --- */
.invite-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: linear-gradient(180deg, #FBF3EA 0%, #F5E6D3 40%, #FEFCF9 100%);
  overflow-y: auto;
  overflow-x: hidden;
}

.invite-overlay.visible {
  display: flex;
  align-items: center;
  justify-content: center;
}

.invite-overlay.closing {
  animation: overlaySlideUp 0.9s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

.invite-landing {
  width: 100%;
  max-width: 420px;
  padding: 3rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: fadeInUp 1s ease forwards;
}

/* Overlay language toggle */
.invite-lang-toggle {
  display: flex;
  gap: 0;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--gold-light, #D4BC8B);
  margin-bottom: 1rem;
  align-self: center;
}

.invite-lang-toggle button {
  background: transparent;
  border: none;
  padding: 6px 16px;
  font-family: var(--font-body);
  font-size: 0.65rem;
  letter-spacing: 2px;
  color: var(--charcoal-light, #777);
  cursor: pointer;
  transition: all 0.3s ease;
}

.invite-lang-toggle button.active {
  background: var(--gold, #C9A96E);
  color: #fff;
}

.invite-landing-content {
  text-align: center;
  width: 100%;
}

/* Ornaments */
.invite-ornament { width: 200px; margin: 0 auto; opacity: 0.7; }
.invite-ornament-top { margin-bottom: 1.5rem; }
.invite-ornament-bottom { margin-top: 1.5rem; transform: rotate(0deg); }

/* Subtitle */
.invite-subtitle-text {
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 6px;
  text-transform: uppercase;
  color: var(--charcoal-light);
  margin-bottom: 0.5rem;
  font-weight: 300;
}

/* Couple names */
.invite-couple {
  font-family: var(--font-script);
  font-size: clamp(2.8rem, 10vw, 4.5rem);
  color: var(--charcoal);
  font-weight: 400;
  line-height: 1.15;
  margin-bottom: 0.5rem;
}

.invite-amp {
  font-family: var(--font-script);
  color: var(--gold);
  font-size: 0.7em;
}

/* Date */
.invite-date-text {
  font-family: var(--font-body);
  font-size: 0.85rem;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: var(--rose-gold);
  font-weight: 600;
  margin-bottom: 1rem;
}

/* Greeting */
.invite-greeting {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--charcoal-light);
  font-style: italic;
  margin-bottom: 1.5rem;
  min-height: 1.5em;
}

/* === New Premium Envelope === */
.envelope-wrap {
  cursor: pointer;
  position: relative;
  width: 260px;
  height: 165px;
  margin: 10px auto 20px;
  perspective: 800px;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.3s ease;
}

.envelope-wrap:hover {
  transform: scale(1.03);
}

.envelope-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 8px;
  transition: overflow 0s linear 0.4s;
}

.envelope-wrap.opened .envelope-container {
  overflow: visible;
  transition-delay: 0s;
}

/* Letter/Card inside */
.env-letter {
  position: absolute;
  left: 12%;
  right: 12%;
  top: -30px;
  bottom: 25px;
  background: #fff;
  border-radius: 4px 4px 2px 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 18px;
  z-index: 1;
  transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 1px 8px rgba(0,0,0,0.06);
}

.env-letter-initials {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-style: italic;
  font-weight: 300;
  color: var(--gold);
  letter-spacing: 2px;
}

.env-letter-msg {
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-style: italic;
  color: var(--charcoal);
  opacity: 0.85;
  margin-top: 3px;
  line-height: 1.3;
  text-align: center;
}

.env-letter-date {
  font-family: var(--font-body);
  font-size: 9px;
  letter-spacing: 3px;
  color: var(--rose-gold);
  margin-top: 2px;
}

.env-letter-divider {
  width: 40px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 6px 0;
}

/* Back of envelope */
.env-back {
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, #D9C28E 0%, #C9A96E 40%, #B89654 100%);
  border-radius: 8px;
  z-index: 0;
  box-shadow: 
    0 8px 32px rgba(160, 120, 60, 0.18),
    0 2px 8px rgba(0,0,0,0.08),
    inset 0 1px 0 rgba(255,255,255,0.25);
}

/* Side flaps */
.env-side-left,
.env-side-right {
  position: absolute;
  top: 0;
  width: 50%;
  height: 100%;
  z-index: 2;
}

.env-side-left {
  left: 0;
  background: linear-gradient(135deg, #C9A96E 0%, #BFA05C 100%);
  clip-path: polygon(0 0, 0 100%, 100% 50%);
  border-radius: 8px 0 0 8px;
}

.env-side-right {
  right: 0;
  background: linear-gradient(225deg, #C9A96E 0%, #BFA05C 100%);
  clip-path: polygon(100% 0, 100% 100%, 0 50%);
  border-radius: 0 8px 8px 0;
}

/* Front bottom flap */
.env-front {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: linear-gradient(180deg, #D4BC8B 0%, #C9A96E 60%, #BFA05C 100%);
  clip-path: polygon(0 100%, 50% 42%, 100% 100%);
  border-radius: 0 0 8px 8px;
  z-index: 3;
  box-shadow: 0 -1px 4px rgba(0,0,0,0.05);
}

/* Top flap */
.env-flap {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: linear-gradient(0deg, #D9C28E 0%, #C9A96E 60%, #BFA05C 100%);
  clip-path: polygon(0 0, 50% 50%, 100% 0);
  border-radius: 8px 8px 0 0;
  z-index: 4;
  transform-origin: top center;
  transition: transform 0.85s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

/* Subtle texture */
.env-flap::after,
.env-front::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(45deg, transparent, transparent 20px, rgba(255,255,255,0.03) 20px, rgba(255,255,255,0.03) 40px);
  pointer-events: none;
}

.env-front::before {
  content: '';
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: 12px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
}

/* Wax seal */
.env-seal {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #D4625A 0%, #B74A42 40%, #8F3830 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  box-shadow: 0 3px 10px rgba(139, 50, 40, 0.35), 0 1px 3px rgba(0,0,0,0.15), inset 0 1px 2px rgba(255,255,255,0.2);
  transition: opacity 0.5s ease 0.2s, transform 0.5s ease 0.2s;
}

.env-seal::before {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.18);
}

.env-seal span {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  font-style: italic;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 1px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* Open state */
.envelope-wrap.opened .env-flap {
  transform: rotateX(180deg);
}

.envelope-wrap.opened .env-seal {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.5);
}

.envelope-wrap.opened .env-letter {
  transform: translateY(-55px);
  z-index: 10;
}

/* Ground shadow */
.env-shadow {
  position: absolute;
  bottom: -10px;
  left: 10%;
  right: 10%;
  height: 20px;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0.1) 0%, transparent 70%);
  z-index: -1;
  transition: opacity 0.5s ease;
}

.envelope-wrap.opened .env-shadow {
  opacity: 0.5;
}

/* CTA text */
.invite-cta {
  font-family: var(--font-body);
  font-size: 0.65rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 400;
  margin-bottom: 1.5rem;
  animation: ctaPulse 2.5s ease-in-out infinite;
}

@keyframes ctaPulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* Reserved seats */
.invite-reserved {
  margin-top: 0.5rem;
}

.invite-reserved-label {
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--charcoal-light);
  font-weight: 300;
  margin-bottom: 0.5rem;
}

.invite-reserved-number {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 600;
  color: var(--charcoal);
  line-height: 1;
  width: 70px;
  height: 70px;
  margin: 0 auto 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--gold);
  border-radius: 4px;
  position: relative;
}

/* Corner decorations on the number */
.invite-reserved-number::before,
.invite-reserved-number::after {
  content: '';
  position: absolute;
  width: 10px;
  height: 10px;
  border-color: var(--gold);
  border-style: solid;
}

.invite-reserved-number::before {
  top: -2px; left: -2px;
  border-width: 2px 0 0 2px;
}

.invite-reserved-number::after {
  bottom: -2px; right: -2px;
  border-width: 0 2px 2px 0;
}

.invite-reserved-suffix {
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--charcoal-light);
  font-weight: 300;
}

/* Overlay exit animation */
@keyframes overlaySlideUp {
  0% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(-100%); opacity: 0; }
}

/* --- Invalid Invite Screen --- */
.invite-invalid {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: linear-gradient(180deg, #FBF3EA 0%, #F5E6D3 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.invite-invalid-content {
  text-align: center;
  padding: 3rem 2rem;
  max-width: 440px;
}

.invite-invalid-icon {
  font-size: 4rem;
  display: block;
  margin-bottom: 1.5rem;
}

.invite-invalid-content h2 {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  color: var(--charcoal);
  margin-bottom: 1rem;
}

.invite-invalid-content p {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--charcoal-light);
  line-height: 1.7;
}


a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* --- Language Toggle --- */
html[data-lang="en"] .lang-es { display: none !important; }
html[data-lang="es"] .lang-en { display: none !important; }

/* --- Typography --- */
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 500; line-height: 1.2; }

.section-subtitle {
  font-family: var(--font-script);
  font-size: 1.5rem;
  color: var(--rose-gold);
  margin-bottom: 0.5rem;
  display: block;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--charcoal);
  margin-bottom: 1rem;
  font-weight: 500;
}

.section-divider {
  width: 60px;
  height: 2px;
  background: var(--gold);
  margin: 0 auto 2.5rem;
  border: none;
}

.section-header { text-align: center; margin-bottom: 3rem; }

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 1.25rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.4s ease;
}

/* Lang toggle always visible in nav-right */
.nav-right .lang-toggle { display: flex; }

.nav.scrolled {
  background: var(--overlay-light);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0.75rem 2rem;
  box-shadow: 0 2px 24px rgba(0,0,0,0.06);
}

.nav-logo {
  font-family: var(--font-script);
  font-size: 1.6rem;
  color: var(--white);
  transition: color var(--transition);
}

.nav.scrolled .nav-logo { color: var(--rose-gold); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--white);
  transition: color var(--transition);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 1.5px;
  background: var(--gold);
  transition: width var(--transition);
}

.nav-links a:hover::after { width: 100%; }
.nav.scrolled .nav-links a { color: var(--charcoal); }

.lang-toggle {
  display: flex;
  gap: 0;
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 20px;
  overflow: hidden;
  transition: border-color var(--transition);
}

.nav.scrolled .lang-toggle { border-color: var(--blush); }

.lang-toggle button {
  padding: 0.35rem 0.85rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--white);
  transition: all var(--transition);
}

.nav.scrolled .lang-toggle button { color: var(--charcoal); }

.lang-toggle button.active {
  background: var(--rose-gold);
  color: var(--white) !important;
}

/* Nav right group (lang toggle + hamburger) */
.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Hamburger */
.hamburger { display: none; flex-direction: column; gap: 5px; padding: 5px; z-index: 1001; }
.hamburger span {
  width: 24px; height: 2px;
  background: var(--white);
  transition: all 0.3s ease;
}
.nav.scrolled .hamburger span { background: var(--charcoal); }
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* --- Hero Section --- */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-video {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(20, 15, 10, 0.3) 0%,
    rgba(20, 15, 10, 0.15) 40%,
    rgba(20, 15, 10, 0.4) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--white);
  padding: 0 2rem;
}

.hero-names {
  font-family: var(--font-script);
  font-size: clamp(3rem, 8vw, 6rem);
  color: var(--white);
  text-shadow: 0 2px 8px rgba(0,0,0,0.5), 0 4px 30px rgba(0,0,0,0.4), 0 0 60px rgba(0,0,0,0.2);
  margin-bottom: 0.5rem;
  line-height: 1.1;
}

.hero-ampersand {
  font-family: var(--font-script);
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: var(--gold-light);
  display: block;
  margin: 0.25rem 0;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.hero-date {
  font-family: var(--font-body);
  font-size: clamp(0.9rem, 2vw, 1.15rem);
  letter-spacing: 6px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.9);
  margin-top: 1.5rem;
  font-weight: 300;
  text-shadow: 0 1px 6px rgba(0,0,0,0.4);
}

.hero-venue {
  font-family: var(--font-heading);
  font-size: clamp(0.85rem, 1.5vw, 1rem);
  color: var(--gold-light);
  margin-top: 0.5rem;
  font-style: italic;
  letter-spacing: 2px;
  text-shadow: 0 1px 6px rgba(0,0,0,0.4);
}

.scroll-indicator {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255,255,255,0.7);
  font-size: 0.7rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  animation: fadeInUp 1s 1.5s both;
}

.scroll-indicator .arrow {
  width: 20px; height: 20px;
  border-right: 1.5px solid rgba(255,255,255,0.7);
  border-bottom: 1.5px solid rgba(255,255,255,0.7);
  transform: rotate(45deg);
  animation: bounce 2s infinite;
}

/* --- Sound Toggle Button --- */
.sound-toggle {
  position: absolute;
  bottom: 2.5rem;
  right: 2rem;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1.1rem;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50px;
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  animation: soundPulse 2.5s ease-in-out 2s 3;
}

.sound-toggle:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.4);
  transform: scale(1.05);
}

.sound-toggle.active {
  background: rgba(201, 169, 110, 0.25);
  border-color: var(--gold-light);
  animation: none;
}

.sound-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.sound-label {
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 400;
  white-space: nowrap;
}

@keyframes soundPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
  50% { box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.12); }
}

/* --- Our Story Section --- */
.story { padding: var(--section-padding); background: var(--ivory); }

.story-content {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.story-image-wrapper {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.story-image-wrapper::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  opacity: 0.3;
  pointer-events: none;
}

.story-image-wrapper img {
  width: 100%; height: 100%;
  object-fit: cover;
  aspect-ratio: 3/4;
}

.story-text { padding: 1rem 0; }

.story-text .section-subtitle { text-align: left; }
.story-text .section-title { text-align: left; font-size: clamp(1.8rem, 3vw, 2.5rem); }
.story-text .section-divider { margin: 0 0 2rem; }

.story-text p {
  font-size: 1.05rem;
  line-height: 1.9;
  color: var(--charcoal-light);
  margin-bottom: 1.5rem;
}

.story-text .signature {
  font-family: var(--font-script);
  font-size: 1.8rem;
  color: var(--rose-gold);
  margin-top: 1rem;
}

/* --- Gallery Section --- */
.gallery { padding: var(--section-padding); background: var(--sand-light); }

.gallery-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-sm);
  cursor: pointer;
  aspect-ratio: 3/4;
}

.gallery-item.landscape { aspect-ratio: 4/3; grid-column: span 2; }

.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease, filter 0.4s ease;
}

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,0.25) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.gallery-item:hover img { transform: scale(1.06); filter: brightness(1.05); }
.gallery-item:hover::after { opacity: 1; }

/* --- Event Details Section --- */
.details { padding: var(--section-padding); background: var(--ivory); }

.details-grid {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.detail-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 3rem 2.5rem;
  text-align: center;
  box-shadow: var(--shadow);
  border-top: 3px solid var(--gold);
  transition: transform var(--transition), box-shadow var(--transition);
}

.detail-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.detail-card-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.detail-card h3 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  margin-bottom: 1.5rem;
  color: var(--charcoal);
}

.detail-card p {
  font-size: 0.95rem;
  color: var(--charcoal-light);
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.detail-card .venue-name {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--rose-gold);
  margin-bottom: 0.25rem;
}

.detail-card .venue-address {
  font-size: 0.9rem;
  color: var(--charcoal-light);
  font-style: italic;
}

.adults-only-card {
  max-width: 540px;
  margin: 3rem auto 0;
  text-align: center;
  padding: 2.5rem 2rem;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border-top: 3px solid var(--rose-gold);
}

.adults-only-icon {
  margin: 0 auto 1rem;
}

.adults-emoji {
  font-size: 3rem;
}

.adults-only-card h3 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--charcoal);
  margin-bottom: 1rem;
}

.adults-only-card p {
  font-size: 0.95rem;
  color: var(--charcoal-light);
  line-height: 1.7;
}

/* Dress Code Card */
.dress-code-card {
  max-width: 480px;
  margin: 2rem auto 0;
  background: var(--white);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  text-align: center;
  box-shadow: var(--shadow);
  border-top: 3px solid var(--gold);
}

.dress-code-card h3 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
  color: var(--charcoal);
}

.dresscode-img {
  width: 120px;
  height: auto;
  margin: 0 auto;
  display: block;
}

.ceremony-img {
  width: 100px;
  height: auto;
  margin: 0 auto;
  display: block;
}

.dress-code-card > p {
  font-size: 1.05rem;
  color: var(--rose-gold);
  font-family: var(--font-heading);
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.avoid-colors { margin-top: 0.5rem; }

.avoid-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--charcoal-light);
  margin-bottom: 1rem;
}

.avoid-icons {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
}

.avoid-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--charcoal-light);
  font-weight: 400;
}

.color-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  position: relative;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.color-circle.color-white {
  background: #FFFFFF;
  border: 2px solid #e0e0e0;
}

.color-circle.color-red {
  background: #C0392B;
  border: 2px solid #A93226;
  color: white;
}

.avoid-clothing {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(201, 169, 110, 0.2);
}

.clothing-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  position: relative;
  background: var(--sand-light);
  border: 2px solid #e0e0e0;
}

.no-slash {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.8rem;
  color: #C0392B;
  font-weight: 700;
  line-height: 1;
  opacity: 0.85;
}

/* --- Wedding Schedule / Timeline --- */
.schedule {
  padding: var(--section-padding);
  background: linear-gradient(180deg, var(--sand-light) 0%, var(--sand) 100%);
}

.tl {
  max-width: 550px;
  margin: 0 auto;
  position: relative;
  padding: 2rem 0;
}

/* Centered vertical line */
.tl::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1.5px;
  background: var(--gold);
  transform: translateX(-50%);
}

/* Diamond dot at top of line */
.tl::after {
  content: '◆';
  position: absolute;
  top: -0.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--gold);
  font-size: 0.7rem;
  z-index: 2;
}

/* Each row: 3 columns (text | icon | text) */
.tl-item {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0;
  padding: 1.5rem 0;
  position: relative;
}

/* Small diamond between items */
.tl-item::before {
  content: '◆';
  position: absolute;
  bottom: -0.25rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--gold);
  font-size: 0.45rem;
  z-index: 2;
}

.tl-item:last-child::before { display: none; }

/* Icon circle centered on the line */
.tl-icon-wrap {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--sand-light);
  border: 1.5px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  box-shadow: 0 2px 12px rgba(201, 169, 110, 0.15);
}

.tl-img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 50%;
}

/* Text block */
.tl-text {
  padding: 0 2rem;
}

.tl-text h3 {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--charcoal);
  margin-bottom: 0.2rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  font-weight: 600;
}

.tl-time {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--rose-gold);
  font-weight: 600;
  letter-spacing: 1px;
}

/* Alternating sides */
.tl-right .tl-text { text-align: right; }
.tl-left .tl-text { text-align: left; }

/* Spacer fills the empty side */
.tl-spacer { min-width: 0; }

/* --- Countdown Section --- */
.countdown-section {
  padding: 5rem 2rem;
  background: linear-gradient(135deg, var(--sand) 0%, var(--blush) 50%, var(--sand) 100%);
  text-align: center;
}

.countdown {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  max-width: 700px;
  margin: 0 auto;
}

.countdown-item { display: flex; flex-direction: column; align-items: center; }

.countdown-value {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 600;
  color: var(--rose-gold-dark);
  line-height: 1;
  min-width: 100px;
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
  border-bottom: 2px solid var(--gold);
}

.countdown-label {
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 0.8rem;
  color: var(--charcoal-light);
  font-weight: 400;
}

/* --- RSVP Section --- */
.rsvp { padding: var(--section-padding); background: var(--sand-light); }

.rsvp-card {
  max-width: 640px;
  margin: 0 auto;
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius);
  padding: 3rem 2.5rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(201, 169, 110, 0.2);
}

.form-group { position: relative; margin-bottom: 2rem; }

.form-group label {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--charcoal-light);
  margin-bottom: 0.5rem;
  font-weight: 400;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.85rem 0;
  border: none;
  border-bottom: 1.5px solid var(--blush);
  background: transparent;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--charcoal);
  transition: border-color 0.3s ease;
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-bottom-color: var(--rose-gold);
}

.form-group textarea { resize: vertical; min-height: 80px; }

.form-group select {
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23B76E79' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0 center;
  padding-right: 20px;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }

.radio-group { display: flex; gap: 1.5rem; margin-top: 0.5rem; }

.radio-group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
  color: var(--charcoal);
}

.radio-group input[type="radio"] {
  width: auto;
  accent-color: var(--rose-gold);
}

.btn-submit {
  display: block;
  width: 100%;
  padding: 1rem 2rem;
  background: var(--rose-gold);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  border-radius: 50px;
  transition: all var(--transition);
  margin-top: 1rem;
}

.btn-submit:hover { background: var(--rose-gold-dark); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(183, 110, 121, 0.35); }

.form-success {
  display: none;
  text-align: center;
  padding: 2rem;
}

.form-success.show { display: block; }
.form-success .check { font-size: 3rem; margin-bottom: 1rem; display: block; }
.form-success h3 { font-family: var(--font-heading); font-size: 1.5rem; margin-bottom: 0.5rem; color: var(--charcoal); }
.form-success p { color: var(--charcoal-light); }

.form-error {
  display: none;
  text-align: center;
  padding: 2rem;
}

.form-error.show { display: block; }
.form-error .error-icon { font-size: 3rem; margin-bottom: 1rem; display: block; }
.form-error h3 { font-family: var(--font-heading); font-size: 1.5rem; margin-bottom: 0.75rem; color: var(--rose-gold-dark); }
.form-error p { color: var(--charcoal-light); line-height: 1.6; }

/* --- Footer --- */
.footer {
  background: var(--charcoal);
  color: rgba(255,255,255,0.7);
  text-align: center;
  padding: 4rem 2rem 2rem;
}

.footer-monogram {
  font-family: var(--font-script);
  font-size: 3rem;
  color: var(--gold);
  margin-bottom: 1rem;
}

.footer p { font-size: 0.85rem; margin-bottom: 0.5rem; }

.footer .footer-love {
  font-size: 0.8rem;
  margin-top: 2rem;
  opacity: 0.5;
}

/* --- Lightbox --- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(10, 8, 6, 0.94);
  align-items: center;
  justify-content: center;
}

.lightbox.open { display: flex; }

.lightbox-img {
  max-width: 90vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 4px;
  animation: lightboxIn 0.3s ease;
}

.lightbox-close {
  position: absolute;
  top: 1.5rem; right: 1.5rem;
  color: rgba(255,255,255,0.8);
  font-size: 2rem;
  z-index: 2001;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  transition: color 0.3s;
}

.lightbox-close:hover { color: var(--white); }

.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,0.7);
  font-size: 2.5rem;
  z-index: 2001;
  width: 50px; height: 80px;
  display: flex; align-items: center; justify-content: center;
  transition: color 0.3s;
}

.lightbox-arrow:hover { color: var(--white); }
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }

/* --- Animations --- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-8px); }
  60% { transform: translateY(-4px); }
}

@keyframes lightboxIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

.animate-delay-1 { transition-delay: 0.15s; }
.animate-delay-2 { transition-delay: 0.3s; }
.animate-delay-3 { transition-delay: 0.45s; }

/* Hero content entrance */
.hero-content > * {
  opacity: 0;
  animation: fadeInUp 1s ease forwards;
}
.hero-content > *:nth-child(1) { animation-delay: 0.3s; }
.hero-content > *:nth-child(2) { animation-delay: 0.5s; }
.hero-content > *:nth-child(3) { animation-delay: 0.7s; }
.hero-content > *:nth-child(4) { animation-delay: 0.9s; }
.hero-content > *:nth-child(5) { animation-delay: 1.1s; }

/* --- Responsive: Tablet --- */
@media (max-width: 900px) {
  .story-content { grid-template-columns: 1fr; gap: 2.5rem; }
  .story-image-wrapper { max-width: 500px; margin: 0 auto; }
  .story-text .section-subtitle,
  .story-text .section-title,
  .story-text .section-divider { text-align: center; margin-left: auto; margin-right: auto; }
  .story-text { text-align: center; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-item.landscape { grid-column: span 2; }
  .details-grid { grid-template-columns: 1fr; max-width: 480px; }
  .countdown { gap: 1.5rem; }
}

/* --- Responsive: Mobile --- */
@media (max-width: 600px) {
  :root { --section-padding: 4rem 1.25rem; }

  .nav-links { 
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(254, 252, 249, 0.98);
    backdrop-filter: blur(16px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
  }

  .nav-links.open { display: flex; }
  .nav-links.open a { color: var(--charcoal) !important; font-size: 1rem; }
  .hamburger { display: flex; }

  .hero-names { font-size: clamp(2.5rem, 10vw, 4rem); }
  .hero-date { letter-spacing: 3px; font-size: 0.85rem; }

  /* Show more of the video on mobile by reducing hero height */
  .hero { height: 75vh; min-height: 500px; }
  .hero-video { object-fit: cover; object-position: center center; }

  .gallery-grid { grid-template-columns: 1fr 1fr; gap: 0.5rem; }
  .gallery-item.landscape { grid-column: span 2; }

  .form-row { grid-template-columns: 1fr; }
  .radio-group { flex-direction: column; gap: 0.75rem; }
  .rsvp-card { padding: 2rem 1.5rem; }

  .countdown { gap: 1rem; }
  .countdown-value { font-size: 2.5rem; min-width: 70px; }
  .countdown-label { font-size: 0.7rem; letter-spacing: 2px; }

  .lightbox-arrow { font-size: 1.5rem; }

  /* Timeline mobile — keep centered alternating */
  .tl { max-width: 100%; padding: 1.5rem 0; }
  .tl-icon-wrap { width: 60px; height: 60px; }
  .tl-img { width: 40px; height: 40px; }
  .tl-text { padding: 0 0.8rem; }
  .tl-text h3 { letter-spacing: 2px; font-size: 0.85rem; }
  .tl-time { font-size: 0.85rem; }

  .sound-toggle { bottom: 1.5rem; right: 1rem; padding: 0.5rem 0.9rem; gap: 0.4rem; }
  .sound-label { font-size: 0.65rem; letter-spacing: 1px; }
}
