/* ═══════════════════════════════════
   Tokens
═══════════════════════════════════ */
:root {
  --maroon: #223763;
  --maroon-dark: #0f1a30;
  --gold: #b8863f;
  --gold-light: #d9b876;
  --emerald: #1f5c4d;
  --cream: #faf3e6;
  --ivory: #fffaf5;
  --ink: #2a1810;
  --font-body: 'Cormorant Garamond', serif;
  --font-heading: 'Cinzel', serif;
  --font-script: 'Pinyon Script', cursive;
  --section-pad: clamp(3.5rem, 8vw, 7rem);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  overflow-x: hidden;
}

body.intro-active { overflow: hidden; height: 100vh; }

.amp { font-family: var(--font-script); color: var(--gold); }

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

/* ═══════════════════════════════════
   Intro
═══════════════════════════════════ */
.intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: var(--cream);
  cursor: pointer;
  padding-bottom: clamp(2rem, 7vh, 3.5rem);
  transition: opacity 0.6s ease 0.15s, visibility 0.6s ease 0.15s, transform 0.75s ease;
}

body:not(.intro-active) .intro {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(1.08);
}

.intro.is-flashing {
  transition: none;
  background: var(--gold);
}

.intro.is-flashing .intro-bg {
  opacity: 0;
}

.intro-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.intro-bg img,
.intro-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 40%;
}

/* Hide the browser's default paused-video play glyph — we drive playback ourselves */
.intro-video::-webkit-media-controls,
.intro-video::-webkit-media-controls-start-playback-button,
.intro-video::-webkit-media-controls-panel {
  display: none !important;
  -webkit-appearance: none;
}

.intro-content {
  pointer-events: none;
  position: relative;
  text-align: center;
  color: var(--ivory);
  padding: 2rem;
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.intro.is-playing .intro-content {
  opacity: 0;
  transform: translateY(-22px);
}

.intro-hint {
  animation: pulse 2.2s ease-in-out infinite;
}

.intro-hint-label {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ivory);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85), 0 4px 14px rgba(0, 0, 0, 0.7);
  margin: 0 0 0.5rem;
}

.intro-hint-sub {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  color: var(--gold-light);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85), 0 4px 14px rgba(0, 0, 0, 0.7);
  margin: 0;
}

@keyframes pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* ═══════════════════════════════════
   Section base
═══════════════════════════════════ */
.section {
  position: relative;
  padding: var(--section-pad) 1.5rem;
  max-width: 900px;
  margin: 0 auto;
}

.reveal-item {
  opacity: 0;
  transform: translateY(40px) scale(0.97);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-item.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* ═══════════════════════════════════
   Hero
═══════════════════════════════════ */
.hero-section {
  position: relative;
  max-width: none;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(160deg, var(--maroon) 0%, var(--maroon-dark) 100%);
  color: var(--ivory);
  overflow: hidden;
}

.hero-content {
  position: relative;
}

.hero-logo {
  width: clamp(92px, 20vw, 150px);
  height: auto;
  margin: 0 auto 1.5rem;
  filter: brightness(0) invert(1);
  opacity: 0.92;
  transform: translateX(6.5%); /* optical centering: the mark's ink is left-heavy within its canvas */
}

.hero-eyebrow {
  font-family: var(--font-heading);
  letter-spacing: 0.35em;
  text-transform: uppercase;
  font-size: 0.7rem;
  color: var(--gold);
  margin: 0 0 1.5rem;
}

.hero-names {
  margin: 0;
  font-family: var(--font-script);
  font-weight: 400;
  font-size: clamp(3.25rem, 10vw, 6rem);
}

.hero-amp {
  font-family: var(--font-script);
  color: var(--gold-light);
  margin: 0 0.15em;
}

.hero-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 1.75rem auto;
  width: min(280px, 60vw);
}

.hero-divider span {
  flex: 1;
  height: 1px;
  background: var(--gold);
  opacity: 0.6;
}

.hero-divider-mark {
  width: 18px;
  height: 18px;
  fill: var(--gold-light);
  flex-shrink: 0;
}

.hero-date, .hero-venue {
  font-family: var(--font-heading);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-size: 0.85rem;
  margin: 0.4rem 0;
  color: var(--ivory);
  opacity: 0.9;
}

.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--gold-light);
  text-decoration: none;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.hero-scroll-chevron {
  width: 10px;
  height: 10px;
  border-right: 1.5px solid var(--gold-light);
  border-bottom: 1.5px solid var(--gold-light);
  transform: rotate(45deg);
  animation: bob 2s ease-in-out infinite;
}

@keyframes bob {
  0%, 100% { transform: rotate(45deg) translate(0, 0); }
  50% { transform: rotate(45deg) translate(4px, 4px); }
}

/* ═══════════════════════════════════
   Invite
═══════════════════════════════════ */
.invite-section { text-align: center; }

.invite-card {
  border: 1.5px solid var(--gold);
  padding: clamp(2rem, 6vw, 3.5rem) clamp(1.5rem, 5vw, 3rem);
  position: relative;
  background: var(--ivory);
}

.invite-card::before {
  content: '';
  position: absolute;
  inset: 10px;
  border: 1px solid var(--gold-light);
  pointer-events: none;
}

.invite-flourish {
  position: absolute;
  top: -14px;
  width: 44px;
  height: 44px;
  stroke: var(--gold);
  fill: none;
  stroke-width: 1.5;
  opacity: 0.85;
}

.invite-flourish circle { fill: var(--gold); stroke: none; }

.invite-flourish--l { left: -14px; }
.invite-flourish--r { right: -14px; }

@media (max-width: 560px) {
  .invite-flourish { width: 32px; height: 32px; top: -10px; }
}

.invite-overline {
  font-family: var(--font-heading);
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 1.25rem;
}

.invite-kicker {
  font-size: 1.1rem;
  color: var(--maroon-dark);
  margin: 0 0 1.25rem;
}

.invite-rule {
  width: min(200px, 50%);
  height: 12px;
  margin: 1.25rem auto;
  stroke: var(--gold);
  fill: var(--gold);
  stroke-width: 1;
}

.invite-names {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem 1.25rem;
}

.invite-person {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.invite-name {
  font-family: var(--font-script);
  font-size: clamp(2rem, 6vw, 3rem);
  color: var(--maroon);
}

.invite-grandparent {
  font-size: 0.72rem;
  font-style: italic;
  color: var(--ink);
  opacity: 0.55;
}

.invite-parent {
  font-size: 0.85rem;
  color: var(--ink);
  opacity: 0.75;
}

.invite-amp {
  font-family: var(--font-script);
  font-size: 1.5rem;
  color: var(--gold);
}

.invite-meta { margin-top: 1rem; }

.invite-date, .invite-venue {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--maroon-dark);
  margin: 0.35rem 0;
}

/* ═══════════════════════════════════
   Events
═══════════════════════════════════ */
.events-header, .story-content, .gallery-header, .countdown-header {
  text-align: center;
}

.events-eyebrow, .story-eyebrow, .gallery-eyebrow {
  font-family: var(--font-heading);
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.5rem;
}

.events-title, .story-title, .gallery-title {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  color: var(--maroon);
  margin: 0 0 2.5rem;
}

.story-title {
  margin-bottom: 0.75rem;
}

.events-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.events-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
}

.events-row .event-card {
  flex: 1 1 260px;
  max-width: 320px;
}

.card-portrait {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 56px;
  height: 74px;
  margin: 0 auto 0.75rem;
}

.card-portrait--emblem {
  width: 110px;
  height: 110px;
  align-items: center;
}

.card-portrait img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  display: block;
  filter: drop-shadow(0 6px 14px rgba(61, 15, 26, 0.18));
}

.ritual-sub-list {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin: 0.5rem 0 1.1rem;
}

.ritual-sub-item {
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--gold-light);
}

.ritual-sub-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.ritual-sub-name {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  color: var(--maroon);
  letter-spacing: 0.03em;
  margin: 0 0 0.3rem;
}

.ritual-sub-meta {
  font-size: 0.85rem;
  color: var(--ink);
  opacity: 0.75;
  margin: 0.1rem 0;
}

.event-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 460px;
  border: 1px solid var(--gold-light);
  background: var(--ivory);
  padding: 2.5rem 1.5rem;
  text-align: center;
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.event-card:hover {
  transform: translateY(-6px);
  border-color: var(--gold);
  box-shadow: 0 16px 34px rgba(107, 30, 46, 0.16);
}

.event-card:hover .icon-badge {
  transform: scale(1.08);
  box-shadow: 0 6px 18px rgba(184, 134, 63, 0.35);
}

/* ═══════════════════════════════════
   Icon badges — hand-drawn line icons in a ringed circle,
   used across event cards, guest-info cards and the gallery.
═══════════════════════════════════ */
.icon-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 1.1rem;
  border-radius: 50%;
  border: 1px solid var(--gold);
  background: var(--ivory);
  box-shadow: 0 4px 12px rgba(61, 15, 26, 0.15);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.icon-badge-svg {
  width: 28px;
  height: 28px;
  color: var(--maroon);
}

.gallery-frame .icon-badge {
  width: 56px;
  height: 56px;
  margin: 0 auto 0.75rem;
}

.event-name {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--maroon);
  margin: 0 0 0.75rem;
  letter-spacing: 0.04em;
}

.event-rule {
  width: 60px;
  height: 8px;
  stroke: var(--gold);
  fill: var(--gold);
  margin: 0 auto 0.75rem;
}

.event-time { font-size: 1.4rem; margin: 0.25rem 0; color: var(--ink); }
.event-date, .event-venue {
  font-size: 0.85rem;
  color: var(--ink);
  opacity: 0.7;
  margin: 0.15rem 0;
}

.event-note {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.85rem;
  color: var(--gold);
  margin: 0.35rem 0 0;
}


.event-map-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: auto;
  padding: 0.5rem 1rem;
  border: 1px solid var(--gold);
  border-radius: 999px;
  font-family: var(--font-heading);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--maroon);
  text-decoration: none;
  transition: background 0.3s ease, color 0.3s ease;
}

.event-map-link svg { width: 14px; height: 14px; }

.event-map-link:hover {
  background: var(--maroon);
  color: var(--ivory);
}

/* ═══════════════════════════════════
   Story
═══════════════════════════════════ */
.story-section { position: relative; text-align: center; overflow: hidden; }

.story-content { position: relative; }

.story-body-wrap { position: relative; }

.story-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(230px, 50vw);
  height: auto;
  /* centers on the paragraph only (not the eyebrow/title above), with a
     small correction since the mark's ink centroid sits ~6.5%/4.8%
     up-left of its canvas' geometric center */
  transform: translate(-43.5%, -45.2%);
  opacity: 0.07;
  pointer-events: none;
  z-index: -1;
}

.story-rule {
  width: 140px;
  height: 12px;
  stroke: var(--gold);
  fill: var(--gold);
  margin: 1rem auto 1.75rem;
}

.story-body {
  font-size: 1.2rem;
  line-height: 1.75;
  color: var(--ink);
  max-width: 640px;
  margin: 0 auto;
}

/* ═══════════════════════════════════
   Gallery — single framed carousel
═══════════════════════════════════ */
.gallery-carousel {
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-frame {
  position: relative;
  width: min(360px, 68vw);
  aspect-ratio: 3 / 4;
  border: 1.5px solid var(--gold);
  background: var(--ivory);
  box-shadow: 0 20px 44px rgba(61, 15, 26, 0.2);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  cursor: grab;
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
  transition: opacity 0.25s ease;
}

.gallery-frame.is-visible { opacity: 1; }

.gallery-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  pointer-events: none;
}

.gallery-frame-placeholder {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--maroon);
  opacity: 0.7;
}

.gallery-caption {
  text-align: center;
  font-family: var(--font-body);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--maroon);
  margin: 1.5rem 0 1rem;
}

.gallery-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.gallery-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: var(--gold-light);
  opacity: 0.5;
  cursor: pointer;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.gallery-dot.is-active {
  opacity: 1;
  background: var(--maroon);
  transform: scale(1.35);
}

/* ═══════════════════════════════════
   RSVP
═══════════════════════════════════ */
.rsvp-section {
  position: relative;
  max-width: none;
  text-align: center;
  background:
    radial-gradient(ellipse 70% 60% at 50% 0%, rgba(184, 134, 63, 0.16) 0%, transparent 65%),
    linear-gradient(160deg, var(--maroon) 0%, var(--maroon-dark) 100%);
  color: var(--ivory);
  overflow: hidden;
}

.rsvp-fireworks {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.rsvp-content { position: relative; max-width: 560px; margin: 0 auto; }

.rsvp-eyebrow {
  font-family: var(--font-heading);
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin: 0 0 0.75rem;
}

.rsvp-headline {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  margin: 0 0 1rem;
}

.rsvp-body { font-size: 1.1rem; opacity: 0.85; margin: 0 0 2rem; }

.rsvp-btn {
  display: inline-block;
  font-family: var(--font-heading);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.85rem;
  color: var(--maroon-dark);
  background: var(--gold-light);
  padding: 1rem 2.5rem;
  text-decoration: none;
  border: 1px solid var(--gold-light);
  transition: background 0.3s ease, color 0.3s ease;
}

.rsvp-btn:hover { background: transparent; color: var(--gold-light); }

.rsvp-helper {
  font-size: 0.8rem;
  opacity: 0.6;
  margin: 1rem 0 2.5rem;
}

.rsvp-cal-heading {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin: 0 0 1rem;
}

.rsvp-cal-btns {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.rsvp-cal-btn {
  font-size: 0.85rem;
  color: var(--ivory);
  border: 1px solid rgba(255, 250, 245, 0.4);
  padding: 0.6rem 1.25rem;
  text-decoration: none;
  transition: border-color 0.3s ease;
}

.rsvp-cal-btn:hover { border-color: var(--gold-light); }

/* ═══════════════════════════════════
   Countdown
═══════════════════════════════════ */
.countdown-section { text-align: center; }

.countdown-garland {
  width: min(420px, 90%);
  margin: 0 auto 2rem;
}

.countdown-garland-svg {
  width: 100%;
  height: 24px;
  stroke: var(--gold);
  fill: var(--gold);
  stroke-width: 1;
}

.cd-title-lead {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.cd-title-forever {
  display: block;
  font-family: var(--font-script);
  font-size: clamp(2.5rem, 7vw, 3.5rem);
  color: var(--maroon);
}

.countdown-cells {
  display: flex;
  justify-content: center;
  gap: clamp(1rem, 4vw, 2.5rem);
  margin-top: 2.5rem;
  flex-wrap: wrap;
}

.cd-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 70px;
}

.cd-num {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 6vw, 3rem);
  color: var(--maroon);
  line-height: 1;
}

.cd-label {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink);
  opacity: 0.65;
  margin-top: 0.5rem;
}

/* ═══════════════════════════════════
   Footer
═══════════════════════════════════ */
.site-footer {
  text-align: center;
  padding: 3rem 1.5rem;
  background: var(--maroon-dark);
  color: var(--ivory);
}

.ft-logo {
  width: 48px;
  height: auto;
  margin: 0 auto 1rem;
  filter: brightness(0) invert(1);
  opacity: 0.9;
  transform: translateX(6.5%); /* optical centering: the mark's ink is left-heavy within its canvas */
}

.ft-names {
  font-family: var(--font-script);
  font-size: 2rem;
  margin: 0 0 0.5rem;
}

.ft-date {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin: 0 0 0.5rem;
}

.ft-tagline {
  font-size: 0.85rem;
  opacity: 0.6;
  margin: 0;
}

/* ═══════════════════════════════════
   Floating nav
═══════════════════════════════════ */
.fab-cluster {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
  pointer-events: none;
}

.fab {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  background: var(--ivory);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  box-shadow: 0 6px 18px rgba(107, 30, 46, 0.18);
  pointer-events: auto;
}

.fab-line {
  width: 20px;
  height: 1.5px;
  background: var(--maroon);
}

.nav-panel {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  background: var(--ivory);
  border: 1px solid var(--gold);
  padding: 1rem 1.5rem;
  opacity: 0;
  transform: translateY(10px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.nav-panel.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.nav-link {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: var(--maroon-dark);
  text-decoration: none;
  padding: 0.4rem 0;
}

.nav-link:hover { color: var(--gold); }

/* ═══════════════════════════════════
   Responsive
═══════════════════════════════════ */
@media (max-width: 640px) {
  .invite-names { flex-direction: column; }
  .rsvp-cal-btns { flex-direction: column; align-items: center; }
}
