@font-face {
  font-family: 'Providence Sans Offc';
  src: url('../fonts/Providence Sans Offc W00 Rg.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Providence Sans Offc';
  src: url('../fonts/Providence Sans Offc W00 Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ─── Reset & Variables ─────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  width: 100%;
  --gutter: clamp(1.25rem, 5vw, 3rem);
}
body.nav-open { overflow: hidden; }
body.gate-locked { overflow: hidden; }
img, svg { max-width: 100%; }

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}
.gate-input:focus-visible {
  outline-offset: 0;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ─── PASSWORD GATE ──────────────────────────────────── */
#gate {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: var(--cream);
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
#gate.unlocked {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

#gate-form {
  width: 100%;
  max-width: 360px;
  text-align: center;
}
.gate-title {
  font-family: var(--display);
  font-size: clamp(2rem, 6vw, 2.75rem);
  font-weight: 700;
  margin-bottom: 1rem;
}
.gate-copy {
  font-size: 0.95rem;
  opacity: 0.72;
  margin-bottom: 1.75rem;
}
.gate-input {
  display: block;
  width: 100%;
  padding: 0.85rem 1rem;
  margin-bottom: 1.25rem;
  border: 1px solid var(--ink-faint);
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.05rem;
  text-align: center;
  letter-spacing: 0.04em;
}
.gate-input:focus {
  outline: none;
  border-color: var(--ink);
}
.gate-submit {
  width: 100%;
  padding: 0.85rem 1rem;
  margin: 0;
}
.gate-error {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: #a33;
}

:root {
  --cream:   #f8f5f1;
  --ink:     #1a1a1a;
  --ink-mid: rgba(26,26,26,0.55);
  --ink-faint: rgba(26,26,26,0.12);
  --display: 'Providence Sans Offc', sans-serif;
  --body:    'Lato', Helvetica, Arial, sans-serif;

  /* Type scale: h1 (hero) > h2 (section titles) > h3 (sub-headings —
     location headings, FAQ questions all share this so
     the hierarchy reads consistently across sections) */
  --text-h1: clamp(2.04rem, 7.06vw, 5.31rem);
  --text-h2: clamp(2.4rem, 7vw, 5.5rem);
  --text-h3: clamp(1.35rem, 3.2vw, 1.85rem);
}

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.75;
  overflow-x: hidden;
}

/* Single source of truth for the page's horizontal gutter. Sections bleed
   full-width by default; #home cancels it back out with a negative margin
   (see below) since its illustration is meant to run edge-to-edge. */
main {
  display: block;
  padding-inline: var(--gutter);
}

/* ─── NAV ───────────────────────────────────────────── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.1rem 2rem;
  border-bottom: 1px solid var(--ink-faint);
  transition: box-shadow 0.35s;
  transform: translateZ(0);
  will-change: box-shadow;
  backface-visibility: hidden;
}
/* Extra depth once scrolled, on top of the always-visible border above. */
nav.scrolled { box-shadow: 0 4px 24px rgba(0,0,0,0.04); }

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 3vw, 2.75rem);
  list-style: none;
  width: 100%;
  max-width: 1100px;
}
.nav-links a {
  font-family: var(--body);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  opacity: 0.72;
  transition: opacity 0.2s;
}
.nav-links a:hover { opacity: 1; }

/* Language toggle — last item in .nav-links; margin-left:auto pushes it to
   the far right of the (now left-aligned) link group on desktop. On mobile
   .nav-links switches to a centered column (see RESPONSIVE below), so it
   just falls into place as another item in the full-screen menu. */
.lang-toggle {
  margin-left: auto;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
}
.lang-toggle button {
  background: none;
  border: none;
  padding: 0;
  font-family: var(--body);
  font-size: inherit;
  letter-spacing: inherit;
  color: var(--ink);
  opacity: 0.6;
  cursor: pointer;
}
.lang-toggle button:hover { opacity: 0.85; }
.lang-toggle button.active {
  opacity: 1;
  font-weight: 700;
  cursor: default;
}

/* Mobile hamburger */
.nav-toggle {
  display: none;
  background: none; border: none;
  cursor: pointer;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  position: absolute;
  right: 1rem;
}
.nav-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--ink);
  margin: 3px 0;
  transition: transform 0.3s, opacity 0.3s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* ─── HERO ──────────────────────────────────────────── */
#home {
  min-height: 100svh; /* fallback for browsers without dvh support */
  min-height: 100dvh; /* tracks the mobile browser's toolbar live, unlike
                          svh (always the *smallest* possible viewport) —
                          using svh alone left a gap under #home whenever
                          the toolbar was collapsed/hidden, showing the top
                          of #rsvp underneath it. */
  margin-inline: calc(-1 * var(--gutter));
  position: relative;
  overflow: hidden;
}

/* Title lives in the top 70% of the viewport (below the fixed nav),
   centered within that zone. Illustration is capped at max 70svh and
   anchored to the bottom. Both are absolutely positioned against #home
   directly (rather than flex siblings), since that's what makes each
   one's zone independent of the other's actual rendered size. */
.hero-title-wrap {
  position: absolute;
  top: 80px;
  left: 0;
  right: 0;
  height: calc(70svh - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}
@media (min-width: 721px) {
  .hero-title-wrap {
    height: calc(75svh - 80px);
  }
}

.hero-title {
  font-family: var(--display);
  font-size: var(--text-h1);
  font-weight: 700;
  line-height: 0.95;
  text-align: center;
  letter-spacing: 0.01em;
  padding: 0 var(--gutter);
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
#home.hero-in .hero-title { opacity: 1; transform: translateY(0); }

#home .hero-illustration {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s ease 0.15s, transform 0.9s ease 0.15s;
}
#home.hero-in .hero-illustration { opacity: 1; transform: translateY(0); }

.hero-illustration {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  width: 100%;
  z-index: 0;
  pointer-events: none;
}
.hero-illustration img {
  width: 100%;
  min-width: 600px;
  height: auto;
  display: block;
}
/* Desktop only: cap the illustration's height so it can't dominate the
   viewport. width:100% + max-height alone (a naive-looking fix) actually
   makes browsers shrink the *width* to preserve aspect ratio per spec —
   that reads as the image going narrow/letterboxed, not cropped. Giving
   the container a fixed height and using object-fit:cover instead keeps
   it genuinely full-width; excess height gets cropped off the bottom
   (object-position: top keeps the top of the scene in view). */
@media (min-width: 721px) {
  .hero-illustration {
    height: 70svh;
  }
  .hero-illustration img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
  }
}

/* ─── SHARED SECTION STYLES ─────────────────────────── */
.section {
  padding-block: clamp(4rem, 10vh, 7rem);
  max-width: 860px;
  margin-inline: auto;
  text-align: center;
}
/* Every section but Gallery fills the viewport height and centers its
   content vertically, so scrolling reads like flipping through full-screen
   pages rather than a continuous document. min-height (not height) lets a
   section grow taller than the viewport if its content needs more room
   (e.g. FAQ with several answers open) instead of clipping it. 100svh
   (not 100vh) accounts for mobile browser chrome. */
.section:not(#gallery) {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
/* Desktop: regular (non-wide) sections narrow to half the available width,
   which gives generous, viewport-proportional side margins instead of a
   fixed gutter. Mobile keeps the full-width behavior above (gutter-only) —
   50% of a phone-width viewport would be unreadably narrow. */
@media (min-width: 721px) {
  .section:not(.section--wide) { max-width: 50%; }
}
.section--wide { max-width: 1100px; }
.section--left { text-align: left; }

.section-title {
  font-family: var(--display);
  font-size: var(--text-h2);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.03em;
  margin-bottom: 2.5rem;
}

p {
  font-weight: 300;
  font-size: clamp(1rem, 2.2vw, 1.15rem);
  margin-bottom: 1rem;
  color: var(--ink);
}
p:last-child { margin-bottom: 0; }

/* ─── RSVP SECTION ──────────────────────────────────── */
#rsvp .venue-info {
  margin: 2rem 0 2.5rem;
}
#rsvp .venue-info strong {
  display: block;
  font-weight: 600;
  font-size: clamp(1.05rem, 2.5vw, 1.25rem);
  line-height: 1.6;
}

.btn {
  display: inline-block;
  padding: 0.85rem 3rem;
  margin: 2rem 0 1rem;
  border: 2px solid var(--ink);
  border-radius: 100px;
  font-family: var(--display);
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  letter-spacing: 0.08em;
  text-decoration: none;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  transition: background 0.22s, color 0.22s, transform 0.15s;
}
.btn:hover {
  background: var(--ink);
  color: var(--cream);
  transform: translateY(-1px);
}
.btn:active { transform: translateY(0); }

.rsvp-note,
.detail-meta {
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  opacity: 0.72;
}
.rsvp-note { margin-top: 0.5rem; }
.detail-meta { display: inline-block; margin-top: 0.4rem; }

/* ─── GALLERY ───────────────────────────────────────── */
.gallery-grid {
  display: flex;
  gap: 0.75rem;
  margin-top: 3rem;
}
.gallery-col {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1 1 0%;
}
.gallery-item {
  background: rgba(26,26,26,0.06);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}
.gallery-item img {
  width: 100%; height: auto;
  display: block;
  transition: transform 0.4s ease;
}
.gallery-item:hover img { transform: scale(1.04); }
.gallery-placeholder {
  aspect-ratio: 4/5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.3;
}

/* ─── THE DAY ───────────────────────────────────────── */

.location-list {
  list-style: none;
  display: flex;
  gap: 4.5rem;
  margin-top: 3rem;
}
.location-block {
  flex: 1 1 0;
  min-width: 0;
  padding: 2.25rem 0;
  text-align: center;
}
.theday-icon {
  width: clamp(100px, 28vw, 120px);
  height: clamp(100px, 28vw, 120px);
  object-fit: contain;
  display: block;
  margin: 0 auto 1.25rem;
  transition: transform 0.25s ease;
}
@media (hover: hover) and (pointer: fine) {
  .location-block:hover .theday-icon { transform: translateY(-4px); }
}

.location-heading {
  font-family: var(--display);
  font-size: var(--text-h3);
  font-weight: 400;
  margin-bottom: 0.6rem;
}
.location-detail {
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 0.9rem;
}
.map-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--body);
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px solid currentColor;
  opacity: 0.75;
  transition: opacity 0.2s;
}
.map-link:hover { opacity: 1; }

/* ─── REGISTRY ──────────────────────────────────────── */
.registry-cake {
  width: min(160px, 40%);
  margin: 0 auto 2.5rem;
}
.registry-cake img {
  width: 100%;
  height: auto;
  display: block;
}

/* ─── FAQ ───────────────────────────────────────────── */
.faq-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 3rem;
}
.faq-floral { width: clamp(100px, 18vw, 180px); height: auto; display: block; flex-shrink: 0; }

.faq-item { border-bottom: 1px solid var(--ink-faint); }

.faq-question {
  width: 100%;
  background: none; border: none;
  text-align: left;
  padding: 1.4rem 0;
  font-family: var(--display);
  font-size: var(--text-h3);
  color: var(--ink);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq-question:hover { opacity: 0.75; }

.faq-chevron {
  width: 18px; height: 18px;
  flex-shrink: 0;
  transition: transform 0.3s ease;
  stroke: currentColor;
}
.faq-item.open .faq-chevron { transform: rotate(180deg); }

.faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.38s ease;
}
.faq-item.open .faq-answer { grid-template-rows: 1fr; }

.faq-answer-inner {
  overflow: hidden;
  font-size: 1.05rem;
  font-weight: 300;
  line-height: 1.8;
  text-align: justify;
  padding-bottom: 0;
  transition: padding-bottom 0.38s ease;
}
.faq-item.open .faq-answer-inner { padding-bottom: 1.5rem; }
.faq-answer-inner a { color: var(--ink); }

/* ─── FOOTER ────────────────────────────────────────── */
footer {
  text-align: center;
  padding: 3.5rem 2rem;
  font-family: var(--body);
  font-size: 0.85rem;
  letter-spacing: 0.07em;
  opacity: 0.65;
}
.group-switcher {
  margin-top: 0.75rem;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}
.group-switcher a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  opacity: 0.7;
}
.group-switcher a:hover { opacity: 1; }

/* ─── SCROLL ANIMATIONS ─────────────────────────────── */
.fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* Cascading stagger for multi-item reveals (the day's blocks, gallery,
   FAQ) — items entering the viewport together fade in slightly offset
   rather than all at once. */
.location-list > .fade-up:nth-child(2),
#faq-list > .fade-up:nth-child(2) { transition-delay: 0.08s; }
.location-list > .fade-up:nth-child(3),
#faq-list > .fade-up:nth-child(3) { transition-delay: 0.16s; }
.location-list > .fade-up:nth-child(4),
#faq-list > .fade-up:nth-child(4) { transition-delay: 0.24s; }

/* ─── RESPONSIVE ────────────────────────────────────── */
@media (max-width: 720px) {
  .nav-toggle { display: flex; flex-direction: column; z-index: 210; }
  .nav-links {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    height: 100svh;
    z-index: 205;
    background: var(--cream);
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    padding: 6rem 2rem 3rem;
    overflow-y: auto;
    transform: translateY(-110%);
    transition: transform 0.38s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { font-size: 1rem; letter-spacing: 0.15em; }
  .lang-toggle { margin-left: 0; font-size: 0.85rem; }

  .location-list { flex-direction: column; gap: 2.5rem; }
}

@media (max-width: 480px) {
  .gallery-grid { flex-direction: column; }
  .faq-header { gap: 0.75rem; }
  .faq-floral { width: 70px; }
}
