/*
  Token system
  Color:  --purple (ink/headlines), --pink (accent/action), --gold (sparse
          celebratory sparkle), --paper/--mist (light section tints),
          --purple-deep (footer band only)
  Type:   Libre Caslon Display (headlines — editorial, institutional serif),
          Poppins (UI/body)
  Motif:  light, airy sections in pale washes of the brand palette, gentle
          filled wave dividers between them, and a few restrained confetti
          dots — festive without tipping into a kids'-party look.
*/

:root {
  --purple: #352e80;
  --purple-deep: #2b2460;
  --purple-mid: #6b62b8;
  --pink: #e15c7f;
  --pink-soft: #f6dee6;
  --gold: #e0a94a;
  --mist: #f7f2fa;
  --paper: #fdfaf8;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Poppins', 'Segoe UI', sans-serif;
  color: var(--purple);
  background: var(--paper);
  overflow-x: hidden;
}

h1, h2 {
  font-family: 'Libre Caslon Display', Georgia, serif;
  font-weight: 400;
  color: var(--purple);
  margin: 0;
}

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

a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 2px;
}

/* Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px clamp(20px, 5vw, 64px);
}
.logo { height: 44px; width: auto; }
.logo-small { height: 30px; }

/* Hero */
.hero {
  position: relative;
  background: linear-gradient(180deg, #ffffff 0%, var(--pink-soft) 100%);
  padding: 8px 0 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 32px;
  align-items: center;
  max-width: 1180px;
  margin: 0 auto;
  padding: 40px clamp(20px, 6vw, 64px) 88px;
}

.stub-tag {
  display: inline-block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--pink);
  background: #fff;
  border-radius: 999px;
  padding: 7px 18px;
  margin: 0 0 22px;
  box-shadow: 0 4px 14px rgba(225, 92, 127, 0.18);
}

.hero h1 {
  font-size: clamp(2rem, 4.2vw, 3.1rem);
  line-height: 1.18;
  margin-bottom: 20px;
}

.hero-sub {
  font-size: 1.05rem;
  line-height: 1.6;
  max-width: 46ch;
  color: var(--purple-mid);
  margin: 0 0 32px;
}

.hero-art {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-line { width: 100%; max-width: 320px; }

.confetti {
  position: absolute;
  border-radius: 50%;
  box-shadow: 0 3px 6px rgba(53, 46, 128, 0.12);
}
.c1 { width: 12px; height: 12px; background: var(--gold); top: 10%; left: 8%; }
.c2 { width: 9px; height: 9px; background: var(--pink); top: 68%; left: 4%; }
.c3 { width: 8px; height: 8px; background: var(--purple-mid); top: 14%; right: 10%; }
.c4 { width: 11px; height: 11px; background: var(--gold); bottom: 10%; right: 18%; }

.wave-divider { line-height: 0; margin-top: -2px; }
.wave-divider svg { width: 100%; height: 64px; display: block; }
.wave-divider path { fill: var(--paper); }
.wave-divider-mist path { fill: var(--mist); }
.wave-divider-deep path { fill: var(--purple-deep); }

/* Buttons */
.btn {
  display: inline-block;
  border: none;
  border-radius: 999px;
  padding: 15px 34px;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-primary {
  background: var(--pink);
  color: #fff;
  box-shadow: 0 10px 24px rgba(225, 92, 127, 0.3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 28px rgba(225, 92, 127, 0.4); }
.btn-full { width: 100%; }
.btn-secondary {
  background: #fff;
  color: var(--purple);
  box-shadow: inset 0 0 0 2px var(--purple-mid);
}
.btn-secondary:hover { transform: translateY(-2px); }

/* Gallery */
.gallery-section {
  position: relative;
  padding: 56px 0 0;
  text-align: center;
  background: var(--paper);
}
.gallery-section h2 { font-size: 1.8rem; margin-bottom: 32px; }

.gallery-marquee {
  display: flex;
  align-items: flex-start;
  gap: 30px;
  width: max-content;
  animation: scroll-gallery 32s linear infinite;
  padding: 4px 24px 56px;
}
.gallery-marquee:hover { animation-play-state: paused; }

.photo {
  margin: 0;
  background: #fff;
  padding: 8px;
  border-radius: 10px;
  box-shadow: 0 10px 22px rgba(53, 46, 128, 0.12);
  position: relative;
}
.photo::after {
  content: '';
  position: absolute;
  top: 14px;
  right: 14px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
}
.photo img {
  width: 260px;
  height: 190px;
  object-fit: cover;
  border-radius: 6px;
}
.gallery-marquee > .photo:nth-child(odd) { transform: rotate(-1.5deg); }
.gallery-marquee > .photo:nth-child(even) { transform: rotate(1.2deg); }

.gallery-empty {
  color: var(--purple-mid);
  font-style: italic;
}

@keyframes scroll-gallery {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Form */
.form-section {
  position: relative;
  background: var(--mist);
  padding: 24px 0 0;
}

.form-card {
  position: relative;
  z-index: 1;
  max-width: 520px;
  width: calc(100% - 40px);
  margin: 0 auto 64px;
  background: #fff;
  border-radius: 20px;
  padding: clamp(28px, 5vw, 48px);
  box-shadow: 0 20px 40px rgba(53, 46, 128, 0.1);
  text-align: center;
}

.form-card h2 { font-size: 1.7rem; margin-bottom: 8px; }
.form-intro { margin: 0 0 28px; color: var(--purple-mid); }

#rsvp-form { text-align: left; }

#rsvp-form label:not(.toggle) {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
}

#rsvp-form input[type="text"] {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--pink-soft);
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--purple);
  margin-bottom: 24px;
}
#rsvp-form input[type="text"]:focus { outline: none; border-color: var(--pink); }

.toggle-row {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 28px;
}

.toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

.toggle input { position: absolute; opacity: 0; width: 0; height: 0; }

.toggle-track {
  width: 46px;
  height: 26px;
  background: var(--pink-soft);
  border-radius: 999px;
  position: relative;
  flex-shrink: 0;
  transition: background 0.2s ease;
}

.toggle-thumb {
  position: absolute;
  top: 3px; left: 3px;
  width: 20px; height: 20px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  transition: transform 0.2s ease;
}

.toggle input:checked + .toggle-track { background: var(--pink); }
.toggle input:checked + .toggle-track .toggle-thumb { transform: translateX(20px); }
.toggle input:focus-visible + .toggle-track { outline: 2px solid var(--purple); outline-offset: 2px; }

.toggle-label { font-weight: 600; }

.form-message {
  min-height: 1.4em;
  margin: 16px 0 0;
  font-weight: 600;
  text-align: center;
}
.form-message.success { color: #2f8f5b; }

.calendar-links { margin-top: 20px; text-align: center; }
.calendar-links p { margin: 0 0 12px; }
.calendar-buttons { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.form-message.error { color: var(--pink); }

/* Footer */
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 30px clamp(20px, 6vw, 64px);
  background: var(--purple-deep);
  color: #cfc9ec;
}
.site-footer p { margin: 0; font-family: 'Libre Caslon Display', Georgia, serif; }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; text-align: left; }
  .hero-art { max-width: 220px; margin: 0 auto; order: -1; }
}

@media (max-width: 640px) {
  .site-header, .site-footer { flex-direction: column; gap: 12px; }
  .photo img { width: 200px; height: 150px; }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-marquee { animation: none; overflow-x: auto; }
}
