@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;1,300;1,400&family=Jost:wght@300;400;500&display=swap');

@import './base.css';
@import './layout.css';
@import './components.css';

/* ── STICKY NAV ──────────────────────────────────────────── */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  padding: 1rem 1.5rem;
  background: rgba(255, 252, 248, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(115, 35, 60, 0.12);
  transition: box-shadow 0.3s ease;
  overflow: hidden;
  box-sizing: border-box;
  max-width: 100vw;
}

.site-nav.scrolled {
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
}

.site-nav a {
  font-family: inherit;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #73233C;
  text-decoration: none;
  padding: 0.25rem 0;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, opacity 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active {
  border-bottom-color: #73233C;
}

/* ── Prevent horizontal scroll ───────────────────────────── */
/* ── Total Lockdown: Prevent All Horizontal Overflow ─────────────────────── */
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden; /* Force hide any content that tries to escape */
}

/* Ensure all block-level elements behave */
* {
  box-sizing: border-box;
  max-width: 100%;
}

/* Specifically for the Hero SVGs which often cause the 'initial load' scroll */
.hero__botanical {
  max-width: 100vw;
  pointer-events: none;
}

.hero {
  overflow: visible;
  max-width: 100vw;
}

/* ── CALENDAR BUTTON ─────────────────────────────────────── */
.cal-wrap {
  display: flex;
  justify-content: center;
  position: relative;
  margin-top: 1.5rem;
}

.cal-trigger {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.2rem;
  font-family: var(--font-sans);
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--crimson);
  background: transparent;
  border: 1px solid rgba(115, 35, 60, 0.35);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
}
.cal-trigger:hover,
.cal-trigger.open {
  border-color: var(--crimson);
  background: rgba(115, 35, 60, 0.05);
}

.cal-chevron { transition: transform 0.2s; }
.cal-trigger.open .cal-chevron { transform: rotate(180deg); }

.cal-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border: 1px solid rgba(115, 35, 60, 0.15);
  border-radius: 6px;
  min-width: 220px;
  box-shadow: 0 8px 24px rgba(44, 30, 22, 0.12);
  z-index: 100;
  padding: 0.4rem;
  z-index: 999;
}
.cal-dropdown.open { display: block; }

.cal-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.65rem 0.85rem;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--ink);
  background: transparent;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
}
.cal-option:hover { background: var(--bg); }
.cal-option + .cal-option { margin-top: 2px; }

.cal-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.cal-icon--google { background: #fff; border: 1px solid #e8e0d8; }
.cal-icon--apple  { background: #1c1c1e; }

.cal-label { display: flex; flex-direction: column; gap: 1px; text-align: left; }
.cal-label-main { font-size: 0.78rem; color: var(--ink); }
.cal-label-sub  { font-size: 0.65rem; color: var(--ink-muted); }

@media (max-width: 540px) {
  .hero__botanical--tl { width: 150px; left: 0; }
  .hero__botanical--br { width: 130px; right: 0; }
  
  .cal-dropdown {
    position: fixed;
    top: auto;
    bottom: 2rem;
    left: 1rem;
    right: 1rem;
    transform: none;
    width: auto;
    min-width: unset;
  }
}

/* ── RSVP ERROR MESSAGES ─────────────────────────────────── */
/* 1. Targets the main error message that pops up at the top of the form */
.rsvp-error {
  color: #ececec; /* Soft red that will pop against a dark background */
  font-weight: 300;
  margin-bottom: 15px;
  text-align: center;
}

/* 2. Targets the smaller errors under specific input fields */
.field__error-msg {
  color: #ececec; 
  font-weight: 300;
  font-size: 0.8rem;
  margin-top: 4px;
}

/* ── Prevent horizontal scroll - The Lock-Down ──────────────────────────── */
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  /* Force the container to never be wider than the screen */
  max-width: 100vw;
  /* Clip any overflowing content */
  overflow-x: hidden;
}

/* Ensure the hero and sections don't force width */
.hero, .section, .footer {
  width: 100%;
  box-sizing: border-box;
  padding-left: 2rem;
  padding-right: 2rem;
}

/* Mobile specific reset */
@media (max-width: 540px) {
  .hero, .section, .footer {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  /* Ensure images or form elements don't push the width */
  img, input, select, textarea, .rsvp-form {
    max-width: 100%;
  }
}

/* Add spacing between form fields */
.field {
  margin-bottom: 0.10rem;
}

/* Ensure dropdowns and inputs have room */
.field-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

/* Spacing for dynamic guest name inputs */
#dynamic-guest-inputs {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

/* Ensure the button has space at the bottom */
#rsvp-submit {
  margin-top: 1rem;
  width: 100%;
}