/*
 * components.css — reusable UI components
 *
 * Naming convention: BEM (.block__element--modifier)
 * Maps directly to CSS Modules in NextJS conversion.
 *
 * → In NextJS: each component block → its own ComponentName.module.css file
 */

/* ══════════════════════════════════════════════════════════════════════════
   NAV
   → nav.module.css
   ══════════════════════════════════════════════════════════════════════════ */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding-inline: var(--space-6);
  max-width: 1280px;
  margin-inline: auto;
}

/* ── Logo / Monogram ── */

.nav__logo {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-charcoal);
  transition: opacity var(--transition-fast);
  line-height: 1;
}

.nav__logo:hover {
  opacity: 0.7;
}

/* Blood red ampersand — one of two accent uses per brief */
.nav__ampersand {
  color: var(--color-red);
  font-style: italic;
}

/* ── Nav Menu ── */

/* Mobile: hidden dropdown revealed by .nav--open on <header> */
.nav__menu {
  display: none;
  flex-direction: column;
  position: absolute;
  top: var(--nav-height);
  left: 0;
  right: 0;
  background-color: rgba(245, 240, 232, 0.98);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-sage-light);
  padding-block: var(--space-4) var(--space-6);
}

.nav--open .nav__menu {
  display: flex;
}

.nav__link {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-charcoal);
  padding: var(--space-4) var(--space-6);
  display: block;
  transition: color var(--transition-fast);
}

.nav__link:hover {
  color: var(--color-sage-dark);
}

/* ── Hamburger Toggle Button ── */

.nav__toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: var(--space-2);
  border-radius: 2px;
  transition: opacity var(--transition-fast);
}

.nav__toggle:hover {
  opacity: 0.65;
}

.nav__toggle-bar {
  display: block;
  width: 22px;
  height: 1.5px;
  background-color: var(--color-charcoal);
  border-radius: 1px;
  transition: transform var(--transition-base), opacity var(--transition-base);
  transform-origin: center;
}

/* Animate hamburger bars → X when nav is open */
.nav--open .nav__toggle-bar:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.nav--open .nav__toggle-bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.nav--open .nav__toggle-bar:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* ── Desktop Nav (640px+) ── */

@media (min-width: 640px) {
  .nav__toggle {
    display: none;
  }

  .nav__menu {
    display: flex;
    flex-direction: row;
    position: static;
    background: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    padding: 0;
    gap: var(--space-8);
  }

  .nav__link {
    padding: 0;
    position: relative;
  }

  /* Underline slide-in on hover */
  .nav__link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 1px;
    background-color: var(--color-sage);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-base);
  }

  .nav__link:hover::after {
    transform: scaleX(1);
  }
}

/* ══════════════════════════════════════════════════════════════════════════
   HERO
   → hero.module.css
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Botanical flourish SVG ── */

.hero__flourish {
  display: flex;
  justify-content: center;
  margin-top: var(--space-6);
  margin-bottom: 0;
}

.hero__flourish-svg {
  width: 120px;
  height: auto;
  opacity: 0.80;
}

@media (min-width: 640px) {
  .hero__flourish-svg {
    width: 150px;
  }
}

/* ── Hero Text ── */

.hero__eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: var(--space-5);
}

.hero__names {
  font-family: var(--font-display);
  font-size: clamp(3rem, 11vw, 6.5rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--color-charcoal);
  margin-bottom: var(--space-4);
}

/* Second blood red accent use (per brief: ampersand in hero names) */
.hero__ampersand {
  color: var(--color-red);
  font-style: italic;
}

.hero__subtitle {
  font-family: var(--font-display);
  font-size: clamp(1.125rem, 3.5vw, 1.75rem);
  font-weight: 400;
  font-style: italic;
  color: var(--color-muted);
  letter-spacing: 0.03em;
  margin-bottom: var(--space-8);
}

/* ── Date / Location meta ── */

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-2) var(--space-4);
  margin-bottom: var(--space-10);
}

.hero__date,
.hero__location {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-charcoal);
}

.hero__separator {
  color: var(--color-sage-light);
}

/* ── Countdown pill ── */

.hero__countdown {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-sage-dark);
  border: 1px solid var(--color-sage-light);
  border-radius: 2px;
  padding: var(--space-3) var(--space-6);
}

#countdown-days {
  font-family: var(--font-display);
  font-size: 1.35em;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--color-sage-dark);
}

/* ── Photo pair ── */

.hero__photos {
  display: flex;
  justify-content: center;
  gap: var(--space-5);
  margin-top: var(--space-12);
}

.hero__photo-frame {
  width: 44%;
  max-width: 190px;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  flex-shrink: 0;
  border: 3px solid var(--color-warm-white);
  box-shadow: 0 6px 28px rgba(44, 44, 44, 0.16);
}

/* Subtle counter-rotation for a natural, un-template feel */
.hero__photo-frame:first-child {
  transform: rotate(-2deg);
  align-self: flex-end;
}

.hero__photo-frame:last-child {
  transform: rotate(1.5deg);
}

.hero__photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

@media (min-width: 640px) {
  .hero__photo-frame {
    max-width: 230px;
  }
}

@media (min-width: 1024px) {
  .hero__photo-frame {
    max-width: 270px;
  }
}

/* ══════════════════════════════════════════════════════════════════════════
   DETAILS
   → details.module.css
   ══════════════════════════════════════════════════════════════════════════ */

.details__card {
  background-color: var(--color-cream);
  border: 1px solid var(--color-sage-light);
  border-top: 3px solid var(--color-sage);
  border-radius: 2px;
  padding: var(--space-8);
}

.details__label {
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-sage-dark);
  margin-bottom: var(--space-4);
}

.details__value {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-muted);
  line-height: 1.65;
}

.details__value--prominent {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 600;
  color: var(--color-charcoal);
  line-height: 1.1;
  margin-top: var(--space-2);
}

.details__note {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-style: italic;
  color: var(--color-muted);
  line-height: 1.65;
  max-width: 480px;
  margin-inline: auto;
}

/* ══════════════════════════════════════════════════════════════════════════
   FAQ ACCORDION
   → faq.module.css
   ══════════════════════════════════════════════════════════════════════════ */

.faq__item {
  border-bottom: 1px solid var(--color-sage-light);
}

.faq__item:first-child {
  border-top: 1px solid var(--color-sage-light);
}

/* Full-width button — entire row is the tap target */
.faq__question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  width: 100%;
  padding: var(--space-5) var(--space-2);
  text-align: left;
  min-height: 56px; /* thumb-friendly, exceeds 44px minimum */
  transition: color var(--transition-fast);
}

.faq__question:hover {
  color: var(--color-sage-dark);
}

.faq__question-text {
  font-family: var(--font-display);
  font-size: clamp(1.0625rem, 2.5vw, 1.25rem);
  font-weight: 600;
  line-height: 1.3;
  color: inherit;
}

/* + icon rotates 45° to become × when open */
.faq__icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.375rem;
  font-weight: 300;
  line-height: 1;
  color: var(--color-sage);
  transition: transform var(--transition-base), color var(--transition-fast);
}

.faq__item--open .faq__icon {
  transform: rotate(45deg);
  color: var(--color-sage-dark);
}

/* max-height animation — CSS handles open/close, JS only toggles the class */
.faq__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-slow);
}

.faq__item--open .faq__answer {
  max-height: 600px;
}

.faq__answer-inner {
  padding: 0 var(--space-2) var(--space-6);
}

.faq__answer p {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-muted);
  line-height: 1.8;
  max-width: 680px;
}

/* ══════════════════════════════════════════════════════════════════════════
   FOOTER
   → footer.module.css
   ══════════════════════════════════════════════════════════════════════════ */

.footer__text {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--color-charcoal);
  margin-bottom: var(--space-2);
}

.footer__made {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--color-muted);
}
