/* ============================================
   Verónica & Emilio — Wedding Website
   Design System & Styles
   ============================================ */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Great+Vibes&display=swap');

/* ---------- Custom Properties ---------- */
:root {
  /* Deep Metallic Gold */
  --cream: #FFFAF0;
  --warm-white: #FFFFFF;
  --bg-dark: #0a0a0a;
  --bg-light: #FDFBF7;

  /* ---------- Unified Text Colors ---------- */
  --text-main: rgb(75, 50, 50);
  --text-muted: rgb(110, 85, 85);
  --text-inverse: #FFFFFF;

  --font-script: 'Great Vibes', cursive;
  --font-serif: Georgia, 'Times New Roman', serif;
  --font-body: 'Helvetica Neue', Helvetica, Arial, sans-serif;

  /* ---------- Typography Tokens ---------- */
  --fs-sm: 14px;
  --fs-base: 1rem;
  --fs-md: 1.25rem;
  --fs-lg: 2.5rem;

  --max-width: 1000px;
  --border-radius: 8px;
  --transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  font-weight: 300;
  color: var(--text-main);
  background: var(--cream);
  background-image: url("https://www.transparenttextures.com/patterns/natural-paper.png");
  line-height: 1.7;
  overflow-x: hidden;
}

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

a {
  color: var(--text-main);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--text-main);
}

/* ---------- Utility ---------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.text-center {
  text-align: center;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 32px;
  min-height: 44px;
  border-radius: var(--border-radius);
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  text-decoration: none;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn--primary {
  background: var(--text-main);
  color: var(--text-inverse);
  box-shadow: 0 4px 15px rgba(75, 50, 50, 0.2);
}

.btn--primary:hover {
  background: var(--text-muted);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(75, 50, 50, 0.3);
  color: var(--text-inverse);
}

.btn--secondary {
  background: transparent;
  color: var(--text-main);
  border: 1.5px solid var(--text-main);
}

.btn--secondary:hover {
  background: rgba(75, 50, 50, 0.05);
  transform: translateY(-2px);
}

.btn span {
  position: relative;
  z-index: 2;
}

/* ---------- Scroll Reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Section Base ---------- */
section {
  position: relative;
  padding: 0 20px;
  overflow: hidden;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, var(--fs-lg));
  font-weight: 500;
  color: var(--text-main);
  text-align: center;
  margin-bottom: 12px;
  letter-spacing: 1px;
  padding-top: 100px;
}

.section-subtitle {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  font-weight: 300;
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 0;
}

.section-divider {
  display: block;
  width: 80px;
  height: 2px;
  margin: 0 auto;
  padding: 40px 0;
  border: none;
  position: relative;
}

.section-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--text-main), transparent);
}

/* ============================================
   NAVIGATION HEADER
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 12px 40px;
  background: var(--cream);
  border-bottom: 1px solid rgba(157, 124, 28, 0.15);
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.05);
}

.navbar__overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(10, 10, 10, 0.3);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
  z-index: 998;
}

.js-navbar.menu-open .navbar__overlay {
  opacity: 1;
  visibility: visible;
}

.navbar__container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar__logo {
  font-family: var(--font-serif);
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: 2px;
  text-decoration: none;
}

.navbar__toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}

.hamburger {
  display: block;
  width: 25px;
  height: 2px;
  background: var(--text-main);
  position: relative;
  transition: all 0.3s ease;
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background: var(--text-main);
  left: 0;
  transition: all 0.3s ease;
}

.hamburger::before {
  top: -8px;
}

.hamburger::after {
  bottom: -8px;
}

/* Ensure toggle is visible and has a hover effect */
.navbar__toggle:hover .hamburger,
.navbar__toggle:hover .hamburger::before,
.navbar__toggle:hover .hamburger::after {
  background: var(--text-main);
}

/* Menu open state for hamburger */
.navbar.menu-open .hamburger {
  background: transparent;
}

.navbar.menu-open .hamburger::before {
  top: 0;
  transform: rotate(45deg);
}

.navbar.menu-open .hamburger::after {
  bottom: 0;
  transform: rotate(-45deg);
}

.navbar__list {
  display: flex;
  list-style: none;
  gap: 30px;
}

.navbar__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--font-body);
  font-size: var(--fs-md);
  color: var(--text-main);
  transition: all var(--transition);
  position: relative;
}

.navbar__link::after {
  content: '';
  position: absolute;
  bottom: 8px;
  /* Adjusted for min-height padding */
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--text-main);
  transition: width 0.3s ease;
}

.navbar__link:hover::after,
.navbar__link.active::after {
  width: 100%;
}

.navbar:hover .navbar__link {
  color: var(--text-main);
}

/* Mobile Menu */
@media (max-width: 991px) {
  .navbar {
    padding: 15px 25px;
    background: rgba(255, 255, 255, 0.98);
    /* Always visible on mobile for legibility */
    border-bottom: 1px solid rgba(157, 124, 28, 0.05);
  }

  .navbar__toggle {
    display: flex;
  }

  .navbar__menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: var(--warm-white);
    padding: 100px 40px;
    transition: all var(--transition);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.05);
    z-index: 999;
  }

  .navbar.menu-open .navbar__menu {
    right: 0;
  }

  .navbar__list {
    flex-direction: column;
    gap: 25px;
  }

  .navbar__link {
    font-size: 1.1rem;
  }
}

/* ============================================
   HERO SECTION (SPLIT LAYOUT)
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  /* Mobile: Stacked */
  padding: 0;
  position: relative;
  background: var(--warm-white);
}

.hero__side {
  width: 100%;
  position: relative;
  overflow: hidden;
}

.hero__side--image {
  height: 45vh;
  /* Mobile half screen */
  background-color: var(--bg-dark);
}

.hero__bg-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  opacity: 0.85;
}

.hero__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* Radial vignette to pull focus and hide resolution artifacts */
  background: radial-gradient(circle at center, transparent 0%, rgba(0, 0, 0, 0.5) 100%);
}

.hero__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 25px;
}

.hero__actions .btn {
  width: 100%;
  max-width: 320px;
  justify-content: center;
}

/* Content Side (Left on Desktop, Bottom on Mobile) */
.hero__side--content {
  min-height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--warm-white) 0%, var(--bg-light) 100%);
  padding: 40px 20px;
}

.hero__content-wrapper {
  max-width: 500px;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Typography & Elements */
.hero__names {
  font-family: var(--font-script);
  font-size: clamp(2.8rem, 10vw, 5.5rem);
  font-weight: 400;
  color: var(--text-main);
  line-height: 1;
  /* Tighter for stacked names */
  margin-bottom: 30px;
  animation: fadeInUp 1.2s ease forwards;
}

.hero__names p {
  margin: 0;
}

.hero_names-amp {
  font-size: clamp(1rem, 10vw, 2rem);
}



.hero__date-detail {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 40px;
  opacity: 0;
  animation: fadeInUp 1.2s ease 0.7s forwards;
}

.hero__date-segment {
  font-family: var(--font-serif);
  font-size: var(--fs-md);
  font-weight: 400;
  color: var(--text-main);
}

.hero__date-segment--large {
  font-size: var(--fs-lg);
}

.hero__date-separator {
  width: 1px;
  height: 30px;
  background: var(--text-main);
}

.hero__rsvp-btn {
  opacity: 0;
  animation: fadeInUp 1.2s ease 0.9s forwards;
}

.hero__secondary-btn {
  opacity: 0;
  animation: fadeInUp 1.2s ease 1.1s forwards;
}

/* Scroll Arrow */
.hero__scroll-indicator {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  animation: fadeInUp 1.2s ease 1s forwards;
  z-index: 10;
}

@media (min-width: 1000px) {
  .hero {
    flex-direction: row;
    height: 100vh;
  }

  .hero__side {
    width: 50%;
    height: 100%;
  }

  .hero__side--image {
    height: 100%;
  }

  .hero__side--content {
    min-height: 100%;
    padding: 60px;
  }
}

/* ============================================
   DETAILS SECTION
   ============================================ */
.details {
  background: var(--warm-white);
}

/* --- Timeline --- */
.timeline {
  position: relative;
  max-width: 900px;
  margin: 60px auto 0;
  padding: 40px 0;
}

.timeline__track {
  position: absolute;
  top: 30px;
  left: 0;
  width: 100%;
  height: 2px;
  background: rgba(125, 99, 22, 0.2);
}

.timeline__items {
  display: flex;
  justify-content: space-around;
  position: relative;
  z-index: 1;
}

.timeline__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  text-align: center;
  padding: 0 20px;
}

.timeline__dot {
  width: 16px;
  height: 16px;
  background: var(--text-main);
  border-radius: var(--border-radius);
  border: 4px solid var(--warm-white);
  box-shadow: 0 0 0 4px rgba(125, 99, 22, 0.1);
  margin: 0 auto;
  position: absolute;
  top: 30px;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline__content {
  margin-top: 60px;
  background: var(--cream);
  padding: 25px;
  border-radius: var(--border-radius);
  border: 1px solid rgba(125, 99, 22, 0.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
  transition: transform var(--transition), box-shadow var(--transition);
  max-width: 320px;
  width: 100%;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.timeline__time {
  display: block;
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.timeline__title {
  font-family: var(--font-serif);
  font-size: var(--fs-md);
  font-weight: 600;
  line-height: normal;
  color: var(--text-main);
  margin-bottom: 4px;
}

.timeline__location {
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  color: var(--text-muted);
  margin-bottom: 15px;
}

.timeline__link {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  color: var(--text-main);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: 1px solid rgba(75, 50, 50, 0.2);
  padding: 8px 16px;
  border-radius: var(--border-radius);
  transition: all 0.3s ease;
  margin-top: auto;
  align-self: center;
}

.timeline__link:hover {
  background: var(--text-main);
  color: white;
  border-color: var(--text-main);
}

/* Alternate items position or keep them one-sided for cleanliness */
/* For now, keeping them below for better consistency on horizontal view */

/* Responsive Timeline */
@media (max-width: 768px) {
  .timeline {
    margin-top: 20px;
  }

  .timeline__track {
    top: 0;
    left: 20px;
    width: 2px;
    height: 100%;
    transform: none;
  }

  .timeline__items {
    flex-direction: column;
    align-items: stretch;
    padding-left: 40px;
    gap: 60px;
  }

  .timeline__item {
    align-items: flex-start;
    text-align: left;
    padding: 0;
  }

  .timeline__dot {
    top: 20px;
    left: -20px;
    transform: translate(-50%, 0);
  }

  .timeline__content {
    margin-top: 0;
    width: 100%;
    max-width: none;
    min-height: 240px;
  }

  .timeline__link {
    align-self: flex-start;
  }
}


/* ============================================
   HISTORY SECTION
   ============================================ */
.history {
  background: var(--warm-white);
  padding-bottom: 50px;
}

.history__content {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.history__text p {
  font-family: var(--font-serif);
  font-size: var(--fs-md);
  color: var(--text-muted);
  margin-bottom: 24px;
  line-height: 1.8;
}

/* ============================================
   GALLERY SECTION
   ============================================ */
.gallery {
  background: var(--cream);
  padding-bottom: 80px;
}

.gallery__grid {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 20px 40px;
  gap: 30px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.gallery__grid::-webkit-scrollbar {
  display: none;
}

.gallery__item {
  flex: 0 0 320px;
  height: 450px;
  overflow: hidden;
  border-radius: var(--border-radius);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
  transition: transform var(--transition);
  scroll-snap-align: center;
}

.gallery__hint {
  display: none;
  text-align: center;
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-top: 20px;
  opacity: 0.6;
}

@media (max-width: 768px) {
  .gallery__hint {
    display: block;
  }
}

.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}


/* ============================================
   FAQ SECTION
   ============================================ */
.faq {
  background: var(--warm-white);
  padding-bottom: 80px;
}

.faq__container {
  max-width: 800px;
  margin: 40px auto 0;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.faq__item {
  background: var(--bg-light);
  border: 1px solid rgba(75, 50, 50, 0.1);
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: all var(--transition);
}

.faq__item:hover {
  border-color: rgba(75, 50, 50, 0.2);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.faq__header {
  width: 100%;
  padding: 20px 25px;
  background: none;
  border: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  text-align: left;
}

.faq__question {
  font-family: var(--font-serif);
  font-size: var(--fs-md);
  color: var(--text-main);
  font-weight: 500;
  padding-right: 20px;
}

.faq__icon {
  position: relative;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.faq__icon::before,
.faq__icon::after {
  content: '';
  position: absolute;
  background: var(--text-main);
  transition: all 0.3s ease;
}

/* Plus icon morphs to Minus */
.faq__icon::before {
  width: 12px;
  height: 2px;
  top: 9px;
  left: 4px;
}

.faq__icon::after {
  width: 2px;
  height: 12px;
  top: 4px;
  left: 9px;
}

.faq__item.active .faq__icon::after {
  transform: rotate(90deg);
  opacity: 0;
}

.faq__answer {
  max-height: 0;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  background: var(--warm-white);
}

.faq__answer p {
  padding: 0 25px 25px;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  color: var(--text-muted);
  line-height: 1.6;
}

.faq__item.active .faq__answer {
  max-height: 1000px;
  /* Ensure enough room for all content */
}

.faq__item.active {
  border-color: var(--text-main);
  box-shadow: 0 4px 20px rgba(75, 50, 50, 0.08);
}

/* ============================================
   GIFTS SECTION
   ============================================ */
.gifts {
  background: var(--warm-white);
}

.gifts__card {
  max-width: 600px;
  margin: 0 auto;
  background: var(--warm-white);
  padding: 40px;
  border-radius: var(--border-radius);
  border: 1px solid rgba(125, 99, 22, 0.1);
  box-shadow: 0 15px 40px rgba(125, 99, 22, 0.05);
}

.gifts__card p {
  font-family: var(--font-serif);
  font-size: var(--fs-md);
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 20px;
}

.gifts__card p:last-child {
  margin-bottom: 0;
}

.gifts__iban {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(1.1rem, 3.5vw, 1.5rem);
  color: var(--text-main);
  display: block;
  letter-spacing: 1px;
}

/* ============================================
   RSVP SECTION
   ============================================ */
.rsvp {
  padding: 100px 20px;
  background: var(--warm-white);
  text-align: center;
}

.rsvp__content {
  max-width: 650px;
  margin: 0 auto;
}

.rsvp__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
}

.rsvp__actions .btn {
  width: 100%;
  max-width: 320px;
  justify-content: center;
}

.rsvp__text {
  font-family: var(--font-serif);
  font-size: var(--fs-md);
  color: var(--text-muted);
  margin-bottom: 40px;
  line-height: 1.8;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--bg-light);
  color: var(--text-main);
  text-align: center;
  padding: 80px 20px;
  position: relative;
  border-top: 1px solid rgba(125, 99, 22, 0.1);
  /* Subtle top border */
}

.footer__divider {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--text-main), transparent);
}

.footer__container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

.footer__names {
  font-family: var(--font-script);
  font-size: clamp(2.5rem, 6vw, 3.5rem);
  color: var(--text-main);
  margin-bottom: 8px;
  letter-spacing: 1px;
}

.footer__message {
  font-family: var(--font-serif);
  font-size: var(--fs-md);
  max-width: 500px;
  margin: 0 auto 15px;
  color: var(--text-muted);
  line-height: 1.8;
}

.footer__date {
  font-family: var(--font-serif);
  font-size: var(--fs-md);
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--text-main);
}

.footer__footnote {
  margin-top: 40px;
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  color: var(--text-muted);
  opacity: 0.6;
  letter-spacing: 1px;
}

/* ---------- Navigation Dots ---------- */
.nav-dots {
  position: fixed;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 100;
}

.nav-dot {
  width: 10px;
  height: 10px;
  border-radius: var(--border-radius);
  background: var(--text-main);
  opacity: 0.3;
  border: none;
  cursor: pointer;
  transition: opacity var(--transition), transform var(--transition), background var(--transition);
  padding: 0;
}

.nav-dot.active {
  opacity: 1;
  background: var(--text-main);
  transform: scale(1.4);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
  :root {
    --max-width: 100%;
  }

  .nav-dots {
    display: none;
  }
}

@media (max-width: 480px) {
  .hero {
    padding-top: 50px;
  }

  .hero__names {
    font-size: clamp(2.5rem, 12vw, 3.5rem);
  }
}

/* ---------- Accessibility ---------- */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  html {
    scroll-behavior: auto;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}