/* ===== Variables ===== */
:root {
  --ivory:     #faf6f0;
  --cream:     #f2ebe0;
  --sage:      #8a9e85;
  --sage-dark: #6b7f67;
  --gold:      #c9a96e;
  --gold-dark: #a8854a;
  --charcoal:  #2c2c2c;
  --muted:     #7a7060;
  --white:     #ffffff;
  --radius:    8px;
  --shadow:    0 4px 30px rgba(0,0,0,0.08);
  --transition: 0.3s ease;
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans:  'Lato', sans-serif;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-weight: 300;
  color: var(--charcoal);
  background: var(--ivory);
  overflow-x: hidden;
}

/* ===== Utility ===== */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}
.section-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 300;
  text-align: center;
  color: var(--charcoal);
  letter-spacing: 0.04em;
}
.section-sub {
  text-align: center;
  color: var(--muted);
  font-size: 1rem;
  margin-top: 12px;
}
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px auto;
  max-width: 200px;
}
.divider span:first-child,
.divider span:last-child {
  flex: 1;
  height: 1px;
  background: var(--gold);
  opacity: 0.6;
}
.divider .diamond {
  color: var(--gold);
  font-size: 0.55rem;
  flex: none;
}
.divider.light span:first-child,
.divider.light span:last-child { background: rgba(255,255,255,0.4); }
.divider.light .diamond { color: rgba(255,255,255,0.6); }

/* ===== Navbar ===== */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 16px 24px;
  transition: background var(--transition), box-shadow var(--transition);
}
#navbar.scrolled {
  background: rgba(250, 246, 240, 0.97);
  box-shadow: 0 2px 20px rgba(0,0,0,0.06);
  backdrop-filter: blur(8px);
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-monogram {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-style: italic;
  color: var(--gold-dark);
  letter-spacing: 0.1em;
}
.nav-links {
  list-style: none;
  display: flex;
  gap: 32px;
}
.nav-links a {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--charcoal);
  transition: color var(--transition);
}
.nav-links a:hover { color: var(--gold-dark); }

/* ===== Hero ===== */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(160deg, #f7f0e6 0%, #ede4d3 40%, #e0d5c5 100%);
  overflow: hidden;
}
.hero-content {
  position: relative;
  z-index: 2;
  padding: 24px;
}
.hero-pre {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--sage-dark);
  margin-bottom: 20px;
}
.hero-names {
  font-family: var(--font-serif);
  font-size: clamp(3.5rem, 12vw, 9rem);
  font-weight: 300;
  line-height: 0.95;
  color: var(--charcoal);
  letter-spacing: -0.01em;
}
.hero-names .amp {
  display: block;
  font-style: italic;
  font-size: 0.55em;
  color: var(--gold);
  margin: 0.1em 0;
}
.hero-date {
  margin-top: 20px;
  font-family: var(--font-serif);
  font-size: clamp(0.95rem, 2.5vw, 1.2rem);
  font-style: italic;
  color: var(--muted);
  letter-spacing: 0.05em;
}
.countdown {
  display: flex;
  gap: clamp(16px, 4vw, 48px);
  justify-content: center;
  margin-top: 36px;
}
.count-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.count-num {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 6vw, 3.8rem);
  font-weight: 300;
  color: var(--charcoal);
  line-height: 1;
  min-width: 2ch;
  text-align: center;
}
.count-label {
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sage-dark);
}
.scroll-cue {
  display: inline-block;
  margin-top: 44px;
  font-size: 1.4rem;
  color: var(--gold);
  text-decoration: none;
  animation: bounce 2s infinite;
}

/* Petals */
.petals { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.petal {
  position: absolute;
  top: -30px;
  width: 10px;
  height: 14px;
  border-radius: 50% 0 50% 0;
  opacity: 0;
  animation: fall linear infinite;
}

@keyframes fall {
  0%   { transform: translateY(0) rotate(0deg) scale(0.8); opacity: 0; }
  10%  { opacity: 0.6; }
  90%  { opacity: 0.4; }
  100% { transform: translateY(110vh) rotate(720deg) scale(1); opacity: 0; }
}
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(8px); }
}

/* ===== Story ===== */
#story {
  padding: 100px 0;
  background: var(--white);
}
.timeline {
  position: relative;
  margin-top: 60px;
  padding: 0 20px;
}
.timeline::before {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  width: 1px;
  background: var(--gold);
  opacity: 0.3;
  transform: translateX(-50%);
}
.timeline-item {
  display: flex;
  justify-content: flex-end;
  padding: 0 56% 48px 0;
  position: relative;
}
.timeline-item.right {
  justify-content: flex-start;
  padding: 0 0 48px 56%;
}
.timeline-item::after {
  content: '';
  position: absolute;
  top: 12px;
  left: 50%;
  width: 10px;
  height: 10px;
  background: var(--gold);
  border-radius: 50%;
  transform: translateX(-50%);
}
.timeline-card {
  background: var(--ivory);
  border-radius: var(--radius);
  padding: 28px 32px;
  box-shadow: var(--shadow);
  max-width: 380px;
  border-top: 3px solid var(--gold);
  transition: transform var(--transition);
}
.timeline-card:hover { transform: translateY(-4px); }
.timeline-year {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 300;
  color: var(--gold);
  display: block;
  margin-bottom: 8px;
}
.timeline-card h3 {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 400;
  margin-bottom: 10px;
  color: var(--charcoal);
}
.timeline-card p {
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--muted);
}

/* ===== Details ===== */
#details {
  padding: 100px 0;
  background: var(--cream);
}
.details-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 52px;
}
.detail-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 40px 28px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.detail-card:hover { transform: translateY(-4px); }
.detail-card.featured {
  background: var(--charcoal);
  color: var(--ivory);
  transform: translateY(-10px);
}
.detail-card.featured:hover { transform: translateY(-14px); }
.detail-icon { font-size: 2rem; margin-bottom: 8px; }
.detail-card h3 {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 400;
}
.detail-card.featured h3 { color: var(--gold); }
.detail-time {
  font-size: 1rem;
  color: var(--sage-dark);
  letter-spacing: 0.06em;
}
.detail-card.featured .detail-time { color: var(--sage); }
.detail-venue {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-style: italic;
  color: var(--charcoal);
}
.detail-card.featured .detail-venue { color: var(--ivory); }
.detail-address {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.6;
  text-align: center;
}
.detail-card.featured .detail-address { color: rgba(250,246,240,0.6); }
.detail-link {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--gold-dark);
  border-bottom: 1px solid var(--gold-dark);
  padding-bottom: 2px;
  transition: opacity var(--transition);
}
.detail-card.featured .detail-link { color: var(--gold); border-color: var(--gold); }
.detail-link:hover { opacity: 0.7; }

.dress-code {
  margin-top: 60px;
  text-align: center;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px 36px;
  box-shadow: var(--shadow);
}
.dress-code h3 {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 400;
  margin-bottom: 12px;
}
.dress-code p {
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--muted);
}
.dress-code strong { color: var(--charcoal); font-weight: 400; }

/* ===== Gallery ===== */
#gallery {
  padding: 100px 0;
  background: var(--white);
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto;
  gap: 12px;
  margin-top: 40px;
}
.gallery-item { border-radius: var(--radius); overflow: hidden; }
.g1 { grid-column: 1; grid-row: 1; aspect-ratio: 1; }
.g2 { grid-column: 2; grid-row: 1 / 3; aspect-ratio: 2/3; }
.g3 { grid-column: 3; grid-row: 1; aspect-ratio: 1; }
.g4 { grid-column: 1; grid-row: 2; aspect-ratio: 16/9; }
.g5 { grid-column: 3; grid-row: 2; aspect-ratio: 1; }
.g6 { grid-column: 1 / 4; grid-row: 3; aspect-ratio: 21/6; }

.gallery-placeholder {
  width: 100%;
  height: 100%;
  min-height: 180px;
  background: linear-gradient(135deg, var(--cream) 0%, #ddd5c5 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--gold);
  opacity: 0.7;
  transition: opacity var(--transition);
}
.gallery-item:hover .gallery-placeholder { opacity: 1; }

/* ===== RSVP ===== */
#rsvp {
  padding: 100px 0;
  background: linear-gradient(160deg, #2c2c2c 0%, #3d3530 100%);
}
#rsvp .section-title { color: var(--ivory); }
#rsvp .section-sub { color: rgba(250,246,240,0.6); }
#rsvp .divider span:first-child,
#rsvp .divider span:last-child { background: var(--gold); opacity: 0.4; }
#rsvp .divider .diamond { color: var(--gold); }
.rsvp-container { max-width: 680px; }

.rsvp-form {
  margin-top: 48px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-group label {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(250,246,240,0.7);
}
.form-group input,
.form-group select,
.form-group textarea {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(201,169,110,0.3);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--ivory);
  outline: none;
  transition: border-color var(--transition);
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: rgba(250,246,240,0.3); }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--gold); }
.form-group select option { background: #3d3530; color: var(--ivory); }
.form-group textarea { resize: vertical; min-height: 90px; }

.radio-group {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.radio-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  color: var(--ivory);
  cursor: pointer;
  letter-spacing: normal;
  text-transform: none;
}
.radio-label input[type="radio"] {
  accent-color: var(--gold);
  width: 16px;
  height: 16px;
  cursor: pointer;
}
.optional { color: rgba(250,246,240,0.4); font-size: 0.75em; }

.btn-submit {
  align-self: center;
  margin-top: 8px;
  padding: 14px 56px;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--charcoal);
  background: var(--gold);
  border: none;
  border-radius: 2px;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}
.btn-submit:hover {
  background: var(--gold-dark);
  transform: translateY(-2px);
}
.form-success, .form-error { text-align: center; font-size: 0.92rem; display: none; }
.form-success { color: #a8c9a0; }
.form-error   { color: #e8a09a; }

/* ===== Footer ===== */
#footer {
  padding: 60px 24px 40px;
  background: #1f1c19;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.footer-monogram {
  font-family: var(--font-serif);
  font-size: 2.4rem;
  font-style: italic;
  color: var(--gold);
  letter-spacing: 0.12em;
}
.footer-date {
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(250,246,240,0.4);
  margin-bottom: 8px;
}
.footer-quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.05rem;
  color: rgba(250,246,240,0.55);
  max-width: 400px;
}
.footer-credit {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: rgba(250,246,240,0.2);
  margin-top: 16px;
}

/* ===== RSVP Page ===== */
.rsvp-page #rsvp { padding-top: 60px; }

.rsvp-banner {
  padding: 140px 24px 60px;
  text-align: center;
  background: linear-gradient(160deg, #2c2c2c 0%, #3d3530 100%);
}
.rsvp-banner-title {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 10vw, 6rem);
  font-weight: 300;
  color: var(--ivory);
  letter-spacing: 0.12em;
  line-height: 1;
  margin: 12px 0 16px;
}
.rsvp-banner .hero-pre { color: var(--sage); }
.rsvp-banner .hero-date { color: rgba(250,246,240,0.5); }

.honeypot { display: none; }
.nav-monogram { text-decoration: none; }
.nav-active { color: var(--gold-dark) !important; }

.rsvp-back {
  text-align: center;
  margin-top: 36px;
}
.rsvp-back a {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(250,246,240,0.45);
  text-decoration: none;
  border-bottom: 1px solid rgba(201,169,110,0.3);
  padding-bottom: 2px;
  transition: color var(--transition);
}
.rsvp-back a:hover { color: var(--gold); }

/* ===== Registry ===== */
#registry {
  padding: 80px 0;
  background: #1f1c19;
  text-align: center;
}
#registry .section-title { color: var(--ivory); }
#registry .section-sub {
  color: rgba(250,246,240,0.6);
  max-width: 480px;
  margin: 0 auto 36px;
}
#registry .divider span:first-child,
#registry .divider span:last-child { background: var(--gold); opacity: 0.4; }
#registry .divider .diamond { color: var(--gold); }
.registry-container { max-width: 600px; }

.btn-registry {
  display: inline-block;
  padding: 14px 56px;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--charcoal);
  background: var(--gold);
  border-radius: 2px;
  text-decoration: none;
  transition: background var(--transition), transform var(--transition);
}
.btn-registry:hover {
  background: var(--gold-dark);
  transform: translateY(-2px);
}

/* ===== 2-Step RSVP ===== */
@keyframes stepFadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.rsvp-step { animation: stepFadeIn 0.4s ease both; }

.step2-greeting {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.6rem;
  color: var(--ivory);
  text-align: center;
  margin-bottom: 4px;
}

#familyCheckboxGroup {
  gap: 12px;
}
#familyCheckboxGroup > label:first-of-type {
  /* The static "Who will be attending?" label */
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(250,246,240,0.7);
  margin-bottom: 4px;
}
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  color: var(--ivory);
  cursor: pointer;
  letter-spacing: normal;
  text-transform: none;
}
.checkbox-label input[type="checkbox"] {
  accent-color: var(--gold);
  width: 16px;
  height: 16px;
  cursor: pointer;
  flex-shrink: 0;
}

.form-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.btn-back {
  background: none;
  border: none;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(250,246,240,0.4);
  cursor: pointer;
  transition: color var(--transition);
  padding: 4px 0;
}
.btn-back:hover { color: var(--gold); }

.form-error a,
.form-error a:visited {
  color: inherit;
  text-decoration: underline;
}

/* ===== Responsive ===== */
@media (max-width: 860px) {
  .details-grid { grid-template-columns: 1fr; max-width: 400px; margin-left: auto; margin-right: auto; }
  .detail-card.featured { transform: none; }
  .detail-card.featured:hover { transform: translateY(-4px); }

  .gallery-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
  }
  .g1,.g3,.g4,.g5 { grid-column: auto; grid-row: auto; aspect-ratio: 1; }
  .g2 { grid-column: auto; grid-row: auto; aspect-ratio: 1; }
  .g6 { grid-column: 1 / 3; aspect-ratio: 16/5; }

  .timeline::before { left: 20px; }
  .timeline-item,
  .timeline-item.right {
    justify-content: flex-start;
    padding: 0 0 36px 52px;
  }
  .timeline-item::after { left: 20px; }
  .timeline-card { max-width: 100%; }
}

@media (max-width: 600px) {
  .nav-links { display: none; }
  .form-row { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
  .g6 { grid-column: 1; aspect-ratio: 4/3; }
  .hero-names { font-size: clamp(3rem, 18vw, 5.5rem); }
}
