/* ═══════════════════════════════════════════════════════════════
   FABIAN & MARCELA — WEDDING WEBSITE
   Design System: Warm Neutral / Editorial / Romantic
   Fonts: Great Vibes (script) + Cormorant Infant (serif)
   ═══════════════════════════════════════════════════════════════ */

/* ── CUSTOM PROPERTIES ─────────────────────────────────────── */
:root {
  --color-cream:       #F5F0EB;
  --color-warm-white:  #FAF8F5;
  --color-ivory:       #FFFDF9;
  --color-taupe:       #B5A99A;
  --color-taupe-dark:  #8C7E6F;
  --color-champagne:   #D4C5B2;
  --color-gold:        #C9A96E;
  --color-gold-dark:   #A68B4B;
  --color-charcoal:    #3A3632;
  --color-text:        #4A4540;
  --color-text-light:  #7A746C;
  --color-white:       #FFFFFF;
  --color-overlay:     rgba(42, 38, 34, 0.55);

  --font-script:  'Great Vibes', cursive;
  --font-serif:   'Cormorant Infant', 'Cormorant Garamond', serif;

  --ease-out:     cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out:  cubic-bezier(0.45, 0, 0.55, 1);

  --nav-height: 64px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-warm-white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

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

/* ── UTILITIES ─────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.script {
  font-family: var(--font-script);
  font-weight: 400;
}

.section-label {
  font-size: 0.8rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--color-taupe);
  margin-bottom: 8px;
}

.section-title {
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  color: var(--color-charcoal);
  line-height: 1.2;
}

.ornament {
  width: 60px;
  height: 1px;
  background: var(--color-champagne);
  margin: 20px auto 0;
}
.ornament--light {
  background: rgba(255,255,255,0.4);
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section {
  padding: 100px 0;
  position: relative;
}
.section--cream { background: var(--color-cream); }
.section--white { background: var(--color-warm-white); }

.required { color: #c97a6d; }

/* ── NAVIGATION ────────────────────────────────────────────── */
#main-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: transparent;
  transition: background 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
}

#main-nav.scrolled {
  background: rgba(250, 248, 245, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(0,0,0,0.06);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-script);
  font-size: 1.6rem;
  color: var(--color-white);
  transition: color 0.4s;
}
#main-nav.scrolled .nav-logo {
  color: var(--color-charcoal);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 32px;
}

.nav-links a {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  transition: color 0.3s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-gold);
  transition: width 0.3s var(--ease-out);
}
.nav-links a:hover::after,
.nav-links a:focus-visible::after {
  width: 100%;
}

#main-nav.scrolled .nav-links a {
  color: var(--color-text);
}
#main-nav.scrolled .nav-links a:hover {
  color: var(--color-gold-dark);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 24px;
  height: 1.5px;
  background: var(--color-white);
  transition: background 0.3s, transform 0.3s;
}
#main-nav.scrolled .nav-toggle span {
  background: var(--color-charcoal);
}

/* ── HERO ──────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: url('images/Hero.jpeg') center 30%/115% auto no-repeat;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(30, 26, 22, 0.52) 0%,
    rgba(30, 26, 22, 0.40) 45%,
    rgba(30, 26, 22, 0.58) 100%
  );
}

.hero-content {
  position: relative;
  text-align: center;
  color: var(--color-white);
  padding: 24px;
  padding-bottom: 100px;
}

.hero-subtitle {
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 16px;
  opacity: 1;
  text-shadow: 0 2px 8px rgba(0,0,0,0.45);
}

.hero-names {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-names .script {
  font-size: clamp(3rem, 10vw, 6rem);
  line-height: 1.1;
  text-shadow: 0 2px 12px rgba(0,0,0,0.4);
}

.ampersand {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 5vw, 2.8rem);
  font-weight: 300;
  font-style: italic;
  opacity: 0.7;
}

.hero-tagline {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  margin-top: 8px;
  opacity: 1;
  text-shadow: 0 2px 8px rgba(0,0,0,0.45);
}

.hero-date-line {
  width: 40px;
  height: 1px;
  background: rgba(255,255,255,0.4);
  margin: 24px auto;
}

.hero-date {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  line-height: 1.8;
  opacity: 1;
  text-shadow: 0 2px 8px rgba(0,0,0,0.45);
}

/* ── HERO COUNTDOWN ────────────────────────────────────────── */
.hero-countdown {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 28px 0 8px;
}

.hero-countdown .countdown-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 64px;
}

.hero-countdown .countdown-number {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 400;
  color: var(--color-white);
  letter-spacing: 0.05em;
  text-shadow: 0 2px 8px rgba(0,0,0,0.45);
}

.hero-countdown .countdown-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.9);
  margin-top: 2px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.45);
}

.hero-countdown .countdown-separator {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 400;
  color: rgba(255,255,255,0.4);
  padding-bottom: 16px;
}

/* ── HERO BUTTONS ──────────────────────────────────────────── */
.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 32px;
}

/* ── BUTTONS ───────────────────────────────────────────────── */
.btn {
  display: inline-block;
  font-family: var(--font-serif);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 14px 40px;
  border: 1px solid;
  cursor: pointer;
  transition: all 0.3s var(--ease-out);
}

.btn-hero {
  font-weight: 600;
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
  color: var(--color-white);
  border-color: rgba(255,255,255,0.5);
  background: transparent;
}
.btn-hero:hover {
  background: var(--color-white);
  color: var(--color-charcoal);
  border-color: var(--color-white);
}

.btn-outline {
  color: var(--color-gold-dark);
  border-color: var(--color-champagne);
  background: transparent;
}
.btn-outline:hover {
  background: var(--color-gold);
  color: var(--color-white);
  border-color: var(--color-gold);
}

.btn-submit {
  width: 100%;
  color: var(--color-white);
  background: var(--color-gold);
  border-color: var(--color-gold);
  font-size: 0.85rem;
  padding: 16px;
}
.btn-submit:hover {
  background: var(--color-gold-dark);
  border-color: var(--color-gold-dark);
}

/* ── SCROLL INDICATOR ──────────────────────────────────────── */
.scroll-indicator {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 11px;
  color: rgba(255,255,255,0.9);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  text-shadow: 0 1px 6px rgba(0,0,0,0.4);
}
.scroll-line {
  width: 2px;
  height: 58px;
  background: rgba(255,255,255,0.32);
  position: relative;
  overflow: hidden;
}
.scroll-line::after {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255,255,255,0.8);
  animation: scrollDown 2s var(--ease-in-out) infinite;
}

@keyframes scrollDown {
  0%   { top: -100%; }
  100% { top: 100%; }
}

/* ── OUR STORY ─────────────────────────────────────────────── */
.story-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.image-frame {
  position: relative;
  overflow: hidden;
  border-radius: 2px;
}
.image-frame::before {
  content: '';
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(201, 169, 110, 0.3);
  z-index: 1;
  pointer-events: none;
}
.image-frame img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  transition: transform 0.8s var(--ease-out);
}
.image-frame:hover img {
  transform: scale(1.03);
}

.story-quote {
  font-size: 1.8rem;
  color: var(--color-gold);
  margin-bottom: 24px;
  line-height: 1.4;
}

.story-text p {
  margin-bottom: 16px;
  color: var(--color-text-light);
}

.parallax-bg {
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
}

.section-overlay {
  position: absolute;
  inset: 0;
  background: var(--color-overlay);
}

/* ── TIMELINE ──────────────────────────────────────────────── */
.timeline {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
  padding: 20px 0;
}

.timeline-line {
  position: absolute;
  left: 20px;
  top: 0;
  width: 1px;
  height: 0;
  background: var(--color-champagne);
  transition: height 0.05s linear;
}

.timeline-item {
  position: relative;
  padding-left: 60px;
  padding-bottom: 48px;
}
.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: 13px;
  top: 6px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--color-warm-white);
  border: 2px solid var(--color-champagne);
  z-index: 2;
  transition: background 0.5s var(--ease-out), border-color 0.5s var(--ease-out), transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out);
}

.timeline-item.is-visible .timeline-dot {
  background: var(--color-gold);
  border-color: var(--color-gold);
  transform: scale(1.3);
  box-shadow: 0 0 0 6px rgba(201, 169, 110, 0.18);
}

.timeline-card {
  padding: 8px 0 12px;
}

.timeline-icon {
  color: var(--color-gold);
  margin-bottom: 8px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}

.timeline-time {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-taupe-dark);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
  transition-delay: 0.1s;
}

.timeline-event-title {
  font-family: var(--font-script);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 400;
  color: var(--color-charcoal);
  margin: 6px 0 10px;
  line-height: 1.3;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
  transition-delay: 0.2s;
}

.timeline-desc {
  font-size: 0.95rem;
  color: var(--color-text-light);
  line-height: 1.6;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
  transition-delay: 0.35s;
}

/* Reveal children when timeline item enters */
.timeline-item.is-visible .timeline-icon,
.timeline-item.is-visible .timeline-time,
.timeline-item.is-visible .timeline-event-title,
.timeline-item.is-visible .timeline-desc {
  opacity: 1;
  transform: translateY(0);
}

/* Subtle gold underline that draws in under the title */
.timeline-event-title::after {
  content: '';
  display: block;
  width: 0;
  height: 1px;
  background: var(--color-champagne);
  margin-top: 6px;
  transition: width 0.8s var(--ease-out);
  transition-delay: 0.4s;
}
.timeline-item.is-visible .timeline-event-title::after {
  width: 60px;
}

/* ── GALLERY CAROUSEL ──────────────────────────────────────── */
.gallery-carousel {
  position: relative;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.gallery-item {
  overflow: hidden;
  border-radius: 2px;
  display: none;
}
.gallery-item.gallery-visible {
  display: block;
  animation: galleryFadeIn 0.5s var(--ease-out);
}
.gallery-item img {
  width: 100%;
  aspect-ratio: 5/6;
  object-fit: cover;
  transition: transform 0.7s var(--ease-out);
}
.gallery-item:hover img {
  transform: scale(1.05);
}

@keyframes galleryFadeIn {
  from { opacity: 0; transform: scale(0.97); }
  to   { opacity: 1; transform: scale(1); }
}

/* Navigation */
.gallery-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 32px;
}

.gallery-arrow {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--color-champagne);
  background: transparent;
  color: var(--color-taupe-dark);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s var(--ease-out);
}
.gallery-arrow:hover {
  background: var(--color-gold);
  border-color: var(--color-gold);
  color: var(--color-white);
}
.gallery-arrow:disabled {
  opacity: 0.3;
  cursor: default;
}
.gallery-arrow:disabled:hover {
  background: transparent;
  border-color: var(--color-champagne);
  color: var(--color-taupe-dark);
}

.gallery-dots {
  display: flex;
  gap: 8px;
  align-items: center;
}
.gallery-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-champagne);
  border: none;
  cursor: pointer;
  transition: all 0.3s var(--ease-out);
  padding: 0;
}
.gallery-dot.active {
  background: var(--color-gold);
  transform: scale(1.3);
}

/* ── TRAVEL ────────────────────────────────────────────────── */
.travel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.travel-card {
  text-align: center;
  padding: 48px 36px;
  background: var(--color-cream);
  border: 1px solid rgba(0,0,0,0.04);
  border-radius: 4px;
}

.travel-card-icon {
  color: var(--color-gold);
  margin-bottom: 20px;
}

.travel-card-title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--color-charcoal);
  margin-bottom: 12px;
}

.travel-card p {
  font-size: 0.95rem;
  color: var(--color-text-light);
  margin-bottom: 24px;
  line-height: 1.6;
}

/* ── RSVP FORM ─────────────────────────────────────────────── */
.rsvp-content {
  position: relative;
  max-width: 600px;
}

.rsvp-form {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 48px 40px;
  border-radius: 4px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-taupe-dark);
  margin-bottom: 6px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group select,
.form-group textarea {
  width: 100%;
  font-family: var(--font-serif);
  font-size: 1rem;
  padding: 12px 16px;
  border: 1px solid var(--color-champagne);
  border-radius: 2px;
  background: var(--color-white);
  color: var(--color-charcoal);
  transition: border-color 0.3s;
  appearance: none;
  -webkit-appearance: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-gold);
  box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.15);
}

.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%238C7E6F' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

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

.radio-group {
  display: flex;
  gap: 32px;
  margin-top: 8px;
}

.form-group .radio-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-family: var(--font-serif);
  font-size: 1rem;
  text-transform: none;
  letter-spacing: 0.02em;
  color: var(--color-text);
  padding: 8px 0;
  margin-bottom: 0;
}

.radio-label input[type="radio"] {
  display: none;
}

.radio-custom {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--color-champagne);
  position: relative;
  transition: border-color 0.3s;
  flex-shrink: 0;
}
.radio-label input:checked + .radio-custom {
  border-color: var(--color-gold);
}
.radio-label input:checked + .radio-custom::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-gold);
}

.form-success {
  display: none;
  text-align: center;
  padding: 40px 20px;
  color: var(--color-charcoal);
}
.form-success svg {
  color: var(--color-gold);
  margin-bottom: 12px;
}
.form-success.show {
  display: block;
  animation: fadeIn 0.5s var(--ease-out);
}

/* ── FAQ ───────────────────────────────────────────────────── */
.faq-content {
  position: relative;
  max-width: 700px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.faq-item {
  border-bottom: 1px solid rgba(255,255,255,0.15);
}
.faq-item:first-child {
  border-top: 1px solid rgba(255,255,255,0.15);
}

.faq-question {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-white);
  padding: 20px 32px 20px 0;
  cursor: pointer;
  list-style: none;
  position: relative;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 6px rgba(0,0,0,0.3);
  transition: color 0.3s;
}
.faq-question::-webkit-details-marker {
  display: none;
}
.faq-question::after {
  content: '+';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--color-champagne);
  transition: transform 0.3s var(--ease-out);
}
.faq-item[open] .faq-question::after {
  content: '−';
  transform: translateY(-50%);
}
.faq-question:hover {
  color: var(--color-champagne);
}

.faq-answer {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  color: rgba(255,255,255,0.8);
  line-height: 1.7;
  padding: 0 0 20px 0;
  animation: faqFadeIn 0.3s var(--ease-out);
}

@keyframes faqFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── FOOTER ────────────────────────────────────────────────── */
.footer {
  background: var(--color-charcoal);
  padding: 60px 24px;
  text-align: center;
  color: rgba(255,255,255,0.5);
}

.footer-names {
  font-size: 2.2rem;
  color: rgba(255,255,255,0.85);
  margin-bottom: 8px;
}

.footer-date {
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  margin-bottom: 4px;
}

.footer-hashtag {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: var(--color-gold);
  margin-top: 12px;
}

/* ══════════════════════════════════════════════════════════════
   SCROLL REVEAL ANIMATIONS
   ══════════════════════════════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
  transition-delay: var(--delay, 0s);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal--left {
  transform: translateX(-40px) translateY(0);
}
.reveal--left.is-visible {
  transform: translateX(0) translateY(0);
}

.reveal--right {
  transform: translateX(40px) translateY(0);
}
.reveal--right.is-visible {
  transform: translateX(0) translateY(0);
}

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

/* ══════════════════════════════════════════════════════════════
   REDUCED MOTION
   ══════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal, .reveal--left, .reveal--right {
    opacity: 1;
    transform: none;
  }
  .timeline-card,
  .timeline-icon,
  .timeline-time,
  .timeline-event-title,
  .timeline-desc {
    opacity: 1;
    transform: none;
  }
  .timeline-event-title::after {
    width: 60px;
  }
  .parallax-bg {
    background-attachment: scroll;
  }
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .story-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .travel-grid {
    grid-template-columns: 1fr;
  }
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    height: 100dvh;
    background: var(--color-warm-white);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    transition: right 0.4s var(--ease-out);
    box-shadow: -4px 0 30px rgba(0,0,0,0.1);
    z-index: 999;
  }
  .nav-links.open {
    right: 0;
  }
  .nav-links a {
    color: var(--color-text) !important;
    font-size: 0.85rem;
  }

  .section {
    padding: 72px 0;
  }

  .hero-countdown {
    gap: 6px;
  }
  .hero-countdown .countdown-unit {
    min-width: 50px;
  }
  .hero-countdown .countdown-number {
    font-size: 1.6rem;
  }
  .hero-countdown .countdown-separator {
    font-size: 1.2rem;
    padding-bottom: 12px;
  }

  .hero-buttons {
    flex-direction: column;
    gap: 12px;
    align-items: center;
  }
  .hero-buttons .btn {
    width: 220px;
    text-align: center;
  }

  .form-row {
    grid-template-columns: 1fr;
  }
  .rsvp-form {
    padding: 32px 24px;
  }

  .radio-group {
    flex-direction: column;
    gap: 12px;
  }

  .parallax-bg {
    background-attachment: scroll;
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  .hero-names .script {
    font-size: 2.6rem;
  }
  .hero-names {
    flex-direction: column;
    gap: 4px;
  }
  .ampersand {
    font-size: 1.4rem;
  }
}

/* ═══════════════════════════════════════════════════════════════
   DRESS CODE — chips + modal
   ═══════════════════════════════════════════════════════════════ */

/* ── CHIP (opens the modal) ────────────────────────────────── */
.dress-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 8px 16px;
  font-family: var(--font-serif);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-gold-dark);
  background: transparent;
  border: 1px solid var(--color-champagne);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.3s var(--ease-out), color 0.3s var(--ease-out), border-color 0.3s var(--ease-out);
}
.dress-chip:hover {
  background: var(--color-gold);
  color: var(--color-white);
  border-color: var(--color-gold);
}
.dress-chip:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 3px;
}
.dress-chip-name {
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: none;
  font-style: italic;
  font-size: 0.86rem;
}

/* Chip on the dark FAQ background */
.dress-chip--light {
  color: var(--color-white);
  border-color: rgba(255,255,255,0.45);
}
.dress-chip--light:hover {
  background: var(--color-white);
  color: var(--color-charcoal);
  border-color: var(--color-white);
}

.faq-dress-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 0 22px;
}
.faq-dress-links .dress-chip {
  margin-top: 0;
}

/* Chip joins the timeline card's staggered reveal */
.timeline-card .dress-chip {
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 0.6s var(--ease-out) 0.45s,
    transform 0.6s var(--ease-out) 0.45s,
    background 0.3s var(--ease-out),
    color 0.3s var(--ease-out),
    border-color 0.3s var(--ease-out);
}
.timeline-item.is-visible .timeline-card .dress-chip {
  opacity: 1;
  transform: translateY(0);
}

/* ── MODAL SHELL ───────────────────────────────────────────── */
body.modal-open {
  overflow: hidden;
}

.dress-modal {
  position: fixed;
  inset: 0;
  /* Must beat #main-nav (1000) and .nav-toggle (1001), or the nav bar draws
     over the panel and covers the ✕. */
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.35s var(--ease-out);
}
/* `display: flex` above would otherwise beat the browser's [hidden] rule, leaving
   an invisible full-screen layer that eats every click on the page. */
.dress-modal[hidden] {
  display: none;
}
/* Belt and braces: also inert while fading out, before [hidden] is reapplied. */
.dress-modal:not(.is-open) {
  pointer-events: none;
}
.dress-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.dress-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(42, 38, 34, 0.6);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.dress-modal-panel {
  position: relative;
  width: 100%;
  max-width: 680px;
  max-height: 88vh;
  overflow-y: auto;
  /* Stop scroll chaining: reaching the end of the card must not start
     scrolling the page behind it. */
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  /* Column flow so the close button can be sticky rather than absolute. */
  display: flex;
  flex-direction: column;
  padding: 10px 44px 44px;
  background: var(--color-ivory);
  border: 1px solid var(--color-champagne);
  box-shadow: 0 30px 70px rgba(42, 38, 34, 0.25);
  text-align: center;
  transform: translateY(20px) scale(0.98);
  transition: transform 0.45s var(--ease-out);
}
.dress-modal.is-open .dress-modal-panel {
  transform: translateY(0) scale(1);
}
.dress-modal-panel:focus {
  outline: none;
}

/* Sticky, not absolute: stays pinned to the top of the scrolling card, and
   because it is in normal flow it survives pinch-zoom panning on iOS (where
   position:fixed detaches from the visual viewport). */
.dress-modal-close {
  position: sticky;
  top: 0;
  align-self: flex-end;
  flex-shrink: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-right: -14px;
  color: var(--color-charcoal);
  background: rgba(255, 253, 249, 0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: color 0.3s var(--ease-out), background 0.3s var(--ease-out);
}
.dress-modal-close:hover {
  color: var(--color-charcoal);
  background: var(--color-cream);
}
.dress-modal-close:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
}

/* ── MODAL CONTENT ─────────────────────────────────────────── */
.dress-event {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--color-taupe-dark);
}

.dress-title {
  font-family: var(--font-script);
  font-size: clamp(2.4rem, 6vw, 3.2rem);
  font-weight: 400;
  color: var(--color-charcoal);
  line-height: 1.2;
  margin: 8px 0 4px;
}

.dress-vibe {
  font-size: 0.78rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--color-gold-dark);
}

.dress-modal-body .ornament {
  margin: 20px auto 28px;
}

/* Palette */
.dress-palette {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px 16px;
  list-style: none;
  margin-bottom: 34px;
}
.dress-swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 58px;
}
.dress-swatch-dot {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(42, 38, 34, 0.08);
}
.dress-swatch-label {
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-light);
  line-height: 1.3;
}

/* For Her / For Him */
.dress-guide {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  padding: 28px 0;
  border-top: 1px solid var(--color-cream);
  border-bottom: 1px solid var(--color-cream);
  text-align: left;
}
.dress-guide-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-gold-dark);
  margin-bottom: 8px;
}
.dress-guide-text {
  font-size: 0.94rem;
  line-height: 1.65;
  color: var(--color-text-light);
}

.dress-note {
  font-size: 0.95rem;
  font-style: italic;
  line-height: 1.7;
  color: var(--color-text-light);
  margin: 24px auto 0;
  max-width: 46ch;
}

/* Tags */
.dress-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  list-style: none;
  margin-top: 22px;
}
.dress-tag {
  padding: 5px 14px;
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-taupe-dark);
  background: var(--color-cream);
  border-radius: 999px;
}

/* Please avoid */
.dress-avoid {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 26px;
  padding: 10px 20px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--color-charcoal);
  background: var(--color-cream);
  border: 1px solid var(--color-champagne);
  border-radius: 999px;
}
.dress-avoid svg {
  flex-shrink: 0;
  color: var(--color-taupe-dark);
}

/* ── INSPIRATION CARD (shown inline, tap to enlarge) ───────── */
.dress-card {
  display: block;
  margin: 0 auto 30px;
  width: fit-content;
  max-width: 100%;
  text-decoration: none;
}
.dress-card img {
  display: block;
  /* Tall 2:3 artwork — cap by height so the card reads as a preview and the
     palette and guidance below it stay reachable without a long scroll. */
  max-height: 46vh;
  width: auto;
  max-width: 100%;
  border: 1px solid var(--color-cream);
  transition: border-color 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}
.dress-card:hover img {
  border-color: var(--color-champagne);
  box-shadow: 0 10px 30px rgba(42, 38, 34, 0.14);
}
.dress-card:focus-visible img {
  outline: 2px solid var(--color-gold);
  outline-offset: 3px;
}

/* A caption rather than an overlay, so it never covers the artwork. */
.dress-card-hint {
  display: block;
  margin-top: 10px;
  font-family: var(--font-serif);
  font-size: 0.64rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-taupe-dark);
  transition: color 0.3s var(--ease-out);
}
.dress-card:hover .dress-card-hint {
  color: var(--color-gold-dark);
}

/* ── RESPONSIVE ────────────────────────────────────────────── */
@media (max-width: 600px) {
  .dress-modal {
    padding: 0;
    align-items: flex-end;
  }
  .dress-modal-panel {
    max-width: 100%;
    max-height: 92vh;
    padding: 8px 24px 28px;
    border: none;
  }
  .dress-guide {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .dress-palette {
    gap: 14px 16px;
  }
  .dress-swatch {
    width: 54px;
  }
  .dress-swatch-dot {
    width: 38px;
    height: 38px;
  }
  .faq-dress-links .dress-chip {
    width: 100%;
    justify-content: center;
  }
  /* Comfortable thumb target on phones (44px+), instead of the 35px desktop pill. */
  .dress-chip {
    padding: 13px 20px;
    font-size: 0.74rem;
  }
  .dress-chip-name {
    font-size: 0.9rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dress-modal,
  .dress-modal-panel,
  .timeline-card .dress-chip {
    transition: none;
  }
  .timeline-card .dress-chip {
    opacity: 1;
    transform: none;
  }
}

/* ═══════════════════════════════════════════════════════════════
   LANGUAGE TOGGLE + EVENT TAGLINES + SIMPLE QUESTIONS
   ═══════════════════════════════════════════════════════════════ */

/* ── EN/ES toggle in the nav ───────────────────────────────── */
.lang-toggle {
  font-family: var(--font-serif);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.9);
  background: transparent;
  border: 1px solid rgba(255,255,255,0.45);
  border-radius: 999px;
  padding: 6px 16px;
  cursor: pointer;
  transition: background 0.3s var(--ease-out), color 0.3s var(--ease-out), border-color 0.3s var(--ease-out);
}
.lang-toggle:hover {
  background: rgba(255,255,255,0.92);
  color: var(--color-charcoal);
}
#main-nav.scrolled .lang-toggle {
  color: var(--color-gold-dark);
  border-color: var(--color-champagne);
}
#main-nav.scrolled .lang-toggle:hover {
  background: var(--color-gold);
  color: var(--color-white);
  border-color: var(--color-gold);
}

/* ── Tagline under an event title (e.g. "No Tricks, Just Tequila") ── */
.timeline-tagline {
  font-size: 0.9rem;
  font-style: italic;
  letter-spacing: 0.12em;
  color: var(--color-gold-dark);
  margin: -4px 0 8px;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
  transition-delay: 0.28s;
}
.timeline-item.is-visible .timeline-tagline {
  opacity: 1;
  transform: translateY(0);
}

/* ── Simple questions section (replaces the FAQ accordion) ─── */
.faq-simple {
  text-align: center;
  font-size: 1.25rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.92);
  text-shadow: 0 1px 6px rgba(0,0,0,0.35);
  max-width: 32em;
  margin: 0 auto;
}

@media (max-width: 768px) {
  /* Keep the toggle visible in the collapsed mobile menu row */
  .lang-toggle {
    color: var(--color-gold-dark) !important;
    border-color: var(--color-champagne);
  }
}

/* ── Timeline location line (pin + venue name) ─────────────── */
.timeline-location {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-taupe-dark);
  margin: -2px 0 8px;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
  transition-delay: 0.24s;
}
.timeline-location svg { color: var(--color-gold); flex-shrink: 0; }
.timeline-item.is-visible .timeline-location {
  opacity: 1;
  transform: translateY(0);
}

/* ── "Adults Only" in the same script face as event titles ─── */
.timeline-tagline--script {
  font-family: var(--font-script);
  font-style: normal;
  font-size: 1.5rem;
  letter-spacing: 0.02em;
  color: var(--color-gold-dark);
  margin: -6px 0 6px;
}

/* ── Questions section: tall enough to show the couple in full ─
   Kissing.jpg is a very tall portrait (1179×2556); the couple sits
   between ~35% and ~70% of its height. Fixed attachment sizes the
   background against the viewport instead of the section, which is
   what cropped their heads — scroll + a tuned position keeps the
   crop window centered on them at any screen size. */
#faq {
  /* Height tracks width so the cover-crop window is always ~36% of the
     photo — just taller than the couple's ~35% band — at any screen size.
     The vh floor keeps it tall on narrow/mobile screens. */
  min-height: max(92vh, 78vw);
  display: flex;
  /* Text sits in the upper band (columns), not over the couple. */
  align-items: flex-start;
  justify-content: center;
  padding-top: 120px;
  background-attachment: scroll;
  background-position: center 54%;
}
#faq .faq-content {
  width: 100%;
}
@media (max-width: 768px) {
  #faq {
    min-height: 70vh;
  }
}

/* ═══════════════════════════════════════════════════════════════
   MOBILE MENU: scrim, ✕ close, scroll lock
   ═══════════════════════════════════════════════════════════════ */

/* Tap-outside target. Opacity/pointer-events rather than [hidden] so a
   `display` rule can never leave an invisible layer eating taps. */
.nav-scrim {
  position: fixed;
  inset: 0;
  z-index: 998;
  background: rgba(42, 38, 34, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease-out);
}
.nav-scrim.is-open {
  opacity: 1;
  pointer-events: auto;
}
/* Desktop never shows the panel, so it must never show the scrim either. */
@media (min-width: 769px) {
  .nav-scrim { display: none; }
}

body.nav-open {
  overflow: hidden;
}

/* Hamburger turns into a ✕ while the menu is open. The bars also switch to
   charcoal — white-on-cream made the close control invisible. */
.nav-toggle span {
  transition: background 0.3s, transform 0.3s var(--ease-out), opacity 0.2s;
}
.nav-toggle.is-open span,
#main-nav.scrolled .nav-toggle.is-open span {
  background: var(--color-charcoal);
}
.nav-toggle.is-open span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.nav-toggle.is-open span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.is-open span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}
/* Keep the ✕ above the sliding panel and give it a comfortable tap target. */
.nav-toggle {
  position: relative;
  z-index: 1001;
}

@media (prefers-reduced-motion: reduce) {
  .nav-scrim, .nav-toggle span { transition: none; }
}

/* Second, always-reachable exit at the end of the card. Pinch-zoom on iOS can
   put the sticky ✕ outside the visual viewport; this one is plain page flow. */
.dress-modal-done {
  display: block;
  width: 100%;
  max-width: 260px;
  margin: 34px auto 0;
  padding: 15px 24px;
  font-family: var(--font-serif);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-gold-dark);
  background: transparent;
  border: 1px solid var(--color-champagne);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.3s var(--ease-out), color 0.3s var(--ease-out), border-color 0.3s var(--ease-out);
}
.dress-modal-done:hover {
  background: var(--color-gold);
  color: var(--color-white);
  border-color: var(--color-gold);
}
.dress-modal-done:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 3px;
}
