/* ==========================================================================
   Frederick & Nicolene — Wedding Website
   Theme: Burgundy / Navy Blue / Gold
   ========================================================================== */

:root {
  --burgundy: #5c1027;
  --burgundy-dark: #3a0a18;
  --burgundy-light: #7d2138;
  --navy: #14213d;
  --navy-light: #22335a;
  --gold: #c9a24b;
  --gold-light: #e6d1a0;
  --gold-soft: #f4e9d0;
  --cream: #faf5ea;
  --ink: #201319;
  --shadow: rgba(20, 33, 61, 0.35);

  --font-display: 'Playfair Display', 'Georgia', serif;
  --font-body: 'Cormorant Garamond', 'Georgia', serif;
  --font-ui: 'Jost', 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--ink);
  font-size: 19px;
  line-height: 1.6;
}

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

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  margin: 0 0 0.4em;
}

.eyebrow {
  font-family: var(--font-ui);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-size: 13px;
  font-weight: 500;
  color: var(--gold);
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 32px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-ui);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 13px;
  font-weight: 500;
  padding: 14px 30px;
  border-radius: 2px;
  border: 1px solid var(--gold);
  cursor: pointer;
  transition: all 0.25s ease;
  background: transparent;
  color: var(--gold);
}
.btn:hover { background: var(--gold); color: var(--navy); }

.btn-solid {
  background: var(--gold);
  color: var(--burgundy-dark);
  border-color: var(--gold);
}
.btn-solid:hover { background: var(--gold-light); border-color: var(--gold-light); }

.btn-outline-light {
  border-color: rgba(250, 245, 234, 0.7);
  color: var(--cream);
}
.btn-outline-light:hover { background: var(--cream); color: var(--burgundy-dark); }

.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin: 22px 0;
}
.divider .line { width: 60px; height: 1px; background: var(--gold); }
.divider .diamond { width: 8px; height: 8px; background: var(--gold); transform: rotate(45deg); }

/* ---------------- Navigation ---------------- */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 40px;
  background: linear-gradient(to bottom, rgba(20,33,61,0.85), rgba(20,33,61,0));
  font-family: var(--font-ui);
  transition: background 0.3s ease;
}
.site-nav.solid { background: var(--navy); box-shadow: 0 2px 16px var(--shadow); }
.site-nav .brand {
  font-family: var(--font-display);
  color: var(--gold-light);
  font-size: 22px;
  letter-spacing: 0.05em;
}
.site-nav .links {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0; padding: 0;
  align-items: center;
}
.site-nav .links a {
  color: var(--cream);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-bottom: 1px solid transparent;
  padding-bottom: 4px;
}
.site-nav .links a:hover { border-color: var(--gold); color: var(--gold-light); }
.nav-toggle { display: none; background: none; border: none; color: var(--cream); font-size: 26px; cursor: pointer; }

@media (max-width: 780px) {
  .site-nav .links {
    position: fixed; top: 64px; right: -100%; height: calc(100vh - 64px);
    flex-direction: column; background: var(--navy); width: 240px;
    padding: 30px; transition: right 0.3s ease; justify-content: flex-start;
  }
  .site-nav .links.open { right: 0; }
  .nav-toggle { display: block; }
}

/* ---------------- Hero ---------------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  background-size: cover;
  background-position: center 30%;
  color: var(--cream);
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(20,33,61,0.15) 0%, rgba(20,33,61,0.25) 55%, rgba(58,10,24,0.92) 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  text-align: center;
  padding: 60px 24px 70px;
}
.hero-content .eyebrow { color: var(--gold-light); }
.hero-names {
  font-size: clamp(42px, 8vw, 92px);
  color: var(--cream);
  margin: 10px 0;
  text-shadow: 0 4px 24px rgba(0,0,0,0.35);
}
.hero-date {
  font-family: var(--font-ui);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 15px;
  color: var(--gold-light);
}
.scroll-cue {
  position: absolute;
  bottom: 22px; left: 50%; transform: translateX(-50%);
  z-index: 2; color: var(--gold-light);
  font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase;
  animation: bob 2.2s ease-in-out infinite;
}
@keyframes bob { 0%,100%{ transform: translate(-50%, 0);} 50%{ transform: translate(-50%, 8px);} }

/* ---------------- Sections ---------------- */
section { padding: 110px 0; position: relative; }
.section-dark { background: var(--navy); color: var(--cream); }
.section-burgundy { background: var(--burgundy); color: var(--cream); }
.section-title { text-align: center; margin-bottom: 60px; }
.section-title h2 { font-size: clamp(30px, 4vw, 46px); }
.section-title.light .eyebrow { color: var(--gold-light); }
.section-dark .section-title h2, .section-burgundy .section-title h2 { color: var(--cream); }

/* Countdown */
.countdown {
  display: flex;
  justify-content: center;
  gap: 36px;
  flex-wrap: wrap;
  margin-top: 40px;
}
.countdown .cd-item { text-align: center; min-width: 90px; }
.countdown .cd-num {
  font-family: var(--font-display);
  font-size: 46px;
  color: var(--gold-light);
}
.countdown .cd-label {
  font-family: var(--font-ui);
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--cream);
  opacity: 0.8;
}

/* Story / gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.gallery-grid img {
  width: 100%; height: 260px; object-fit: cover; border-radius: 3px;
  box-shadow: 0 12px 30px var(--shadow);
  transition: transform 0.4s ease;
}
.gallery-grid img:hover { transform: translateY(-6px); }
.gallery-grid a:nth-child(1) { grid-column: span 2; grid-row: span 2; }
.gallery-grid a:nth-child(1) img { height: 100%; min-height: 536px; }
@media (max-width: 900px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid a:nth-child(1) { grid-column: span 2; grid-row: span 1; }
  .gallery-grid a:nth-child(1) img { min-height: 260px; }
}

/* Details cards (venue / schedule / dress code) */
.details-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
@media (max-width: 900px) { .details-grid { grid-template-columns: 1fr; } }
.detail-card {
  background: var(--cream);
  border: 1px solid var(--gold-soft);
  border-top: 3px solid var(--gold);
  padding: 40px 30px;
  text-align: center;
  box-shadow: 0 14px 34px rgba(60,10,24,0.06);
}
.detail-card .icon { font-size: 34px; margin-bottom: 14px; }
.detail-card h3 { color: var(--burgundy); font-size: 24px; }
.detail-card p { margin: 6px 0; color: #4a3a41; }
.detail-card .map-link { display: inline-block; margin-top: 12px; font-family: var(--font-ui); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--burgundy); border-bottom: 1px solid var(--gold); }

.map-embed { margin-top: 60px; border-radius: 4px; overflow: hidden; box-shadow: 0 20px 50px rgba(0,0,0,0.15); }
.map-embed iframe { width: 100%; height: 420px; border: 0; display: block; }

/* Invite panel */
.invite-panel {
  max-width: 720px;
  margin: -110px auto 0;
  background: var(--cream);
  position: relative;
  z-index: 5;
  padding: 56px 48px;
  text-align: center;
  border: 1px solid var(--gold-soft);
  box-shadow: 0 30px 70px rgba(20,33,61,0.25);
}
@media (max-width: 700px) { .invite-panel { padding: 40px 24px; margin-top: -70px; } }
.invite-panel .to-label { font-family: var(--font-ui); letter-spacing: 0.2em; text-transform: uppercase; font-size: 12px; color: var(--gold); }
.invite-panel h1 { color: var(--burgundy); font-size: clamp(32px, 5vw, 46px); margin-top: 6px; }
.invite-msg { font-size: 21px; color: #3d2a31; max-width: 560px; margin: 18px auto 0; }

/* RSVP form */
.rsvp-form {
  max-width: 620px;
  margin: 40px auto 0;
  text-align: left;
}
.rsvp-choices { display: flex; gap: 14px; margin-bottom: 22px; flex-wrap: wrap; }
.rsvp-choice {
  flex: 1;
  min-width: 150px;
  border: 1px solid var(--gold);
  padding: 16px;
  text-align: center;
  cursor: pointer;
  font-family: var(--font-ui);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 13px;
  color: var(--burgundy);
  background: #fff;
  transition: all 0.2s ease;
}
.rsvp-choice.selected { background: var(--burgundy); color: var(--cream); border-color: var(--burgundy); }
.field { margin-bottom: 20px; }
.field label { display: block; font-family: var(--font-ui); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--navy); margin-bottom: 8px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 14px; font-family: var(--font-body); font-size: 18px;
  border: 1px solid #d8c9b0; background: #fff; color: var(--ink);
  border-radius: 2px;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,162,75,0.18); }
.form-msg { margin-top: 16px; font-family: var(--font-ui); font-size: 14px; }
.form-msg.error { color: var(--burgundy); }
.form-msg.success { color: #285c3a; }

.rsvp-done {
  padding: 30px;
  border: 1px dashed var(--gold);
  text-align: center;
}
.rsvp-done .big-tick { font-size: 44px; color: var(--gold); }

/* Footer */
.site-footer {
  background: var(--burgundy-dark);
  color: var(--gold-soft);
  text-align: center;
  padding: 60px 24px 30px;
}
.site-footer .brand { font-family: var(--font-display); font-size: 26px; color: var(--gold-light); }
.site-footer .fine-print { margin-top: 30px; font-family: var(--font-ui); font-size: 12px; opacity: 0.6; letter-spacing: 0.05em; }

/* Loading / states */
.loader {
  display: flex; align-items: center; justify-content: center; min-height: 60vh; flex-direction: column; gap: 14px;
}
.spinner {
  width: 42px; height: 42px; border-radius: 50%;
  border: 3px solid var(--gold-soft); border-top-color: var(--gold);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.error-page {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--navy); color: var(--cream); text-align: center; padding: 40px;
}
.error-page h1 { font-size: 60px; color: var(--gold-light); }

/* subtle hidden-joke tooltip */
[data-joke] { position: relative; cursor: help; border-bottom: 1px dotted var(--gold); }

/* Tag pill for RSVP status */
.pill { display: inline-block; padding: 4px 12px; border-radius: 30px; font-family: var(--font-ui); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; }
.pill.pending { background: #eee0c2; color: #7a5c14; }
.pill.attending { background: #d4ecd9; color: #1e6b3a; }
.pill.declined { background: #f0d4d4; color: #8a2323; }
