:root {
  --cream: #faf6f0;
  --cream-dark: #f0e9df;
  --ink: #2c2925;
  --ink-soft: #5a5450;
  --red: #891529;
  --red-light: #dcb3ba;
  --line: #ecd9dc;
  --serif-display: 'Playfair Display', Georgia, serif;
  --serif-body: 'EB Garamond', Georgia, serif;
}

* { box-sizing: border-box; }

/* Password gate */
.site-content { display: none; }
body.unlocked .site-content { display: block; }
body.unlocked .password-gate { display: none; }

.password-gate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(ellipse at top, rgba(216, 195, 156, 0.25), transparent 60%),
    linear-gradient(180deg, var(--cream) 0%, var(--cream-dark) 100%);
}
.password-card {
  max-width: 420px;
  width: 100%;
  text-align: center;
  border: 1.5px solid var(--red);
  border-radius: 22px;
  padding: 48px 36px;
  background: rgba(255, 255, 255, 0.5);
}
.password-logo { height: 60px; width: auto; margin: 0 auto 18px; display: block; }
.password-title { font-family: var(--serif-display); font-size: 1.8rem; margin: 0 0 14px; }
.password-text { color: var(--ink-soft); font-size: 1rem; margin: 0 0 26px; }
.password-form { display: flex; flex-direction: column; gap: 14px; }
.password-input {
  font-family: var(--serif-body);
  font-size: 1.05rem;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  text-align: center;
  background: white;
  color: var(--ink);
}
.password-input:focus { outline: none; border-color: var(--red); }
.password-error {
  color: var(--red);
  font-size: 0.9rem;
  margin: 18px 0 0;
  display: none;
}
.password-error.visible { display: block; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--serif-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.7;
}

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

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

/* Nav */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 246, 240, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-brand {
  display: block;
}
.nav-logo {
  height: 40px;
  width: auto;
  display: block;
}
.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 32px;
  margin: 0;
  padding: 0;
}
.nav-links a {
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--ink-soft);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--red); }
.nav-cta {
  background: var(--red);
  color: white !important;
  padding: 9px 20px;
  border-radius: 999px;
  transition: background 0.2s, transform 0.2s;
}
.nav-cta:hover {
  background: #6e0f20;
  color: white !important;
}
.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--ink);
  cursor: pointer;
}

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 100px 24px 60px;
  background:
    radial-gradient(ellipse at top, rgba(216, 195, 156, 0.25), transparent 60%),
    linear-gradient(180deg, var(--cream) 0%, var(--cream-dark) 100%);
  border-bottom: 1px solid var(--line);
}
.hero-frame {
  max-width: 640px;
  border: 1.5px solid var(--red);
  border-radius: 22px;
  padding: 56px 44px;
  position: relative;
  background: rgba(255,255,255,0.35);
}
.hero-frame::before {
  content: '';
  position: absolute;
  inset: 10px;
  border: 1px solid var(--red);
  border-radius: 15px;
  pointer-events: none;
}
.hero-content { max-width: 720px; }
.hero-wordmark {
  width: 100%;
  max-width: 480px;
  height: auto;
  margin: 4px auto 10px;
  display: block;
}
.hero-invite {
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 600;
  color: var(--red);
  font-size: 1rem;
  margin: 0 0 18px;
  line-height: 1.6;
}
.hero-year {
  font-family: var(--serif-display);
  font-size: 2rem;
  color: var(--ink);
  letter-spacing: 2px;
  margin: 0 0 40px;
}

.countdown {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-bottom: 46px;
}
.countdown-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 70px;
}
.countdown-number {
  font-family: var(--serif-display);
  font-size: 2.1rem;
  color: var(--red);
  border: 1px solid var(--red-light);
  border-radius: 6px;
  padding: 10px 6px;
  width: 100%;
  background: rgba(255,255,255,0.5);
}
.countdown-label {
  font-size: 0.72rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 8px;
}

.hero-scroll {
  display: inline-block;
  font-size: 0.9rem;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--red-light);
  padding-bottom: 2px;
}

/* Sections */
.section {
  max-width: 900px;
  margin: 0 auto;
  padding: 140px 24px;
  text-align: center;
  scroll-margin-top: 90px;
}
.section-kicker {
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--red);
  font-size: 0.85rem;
  margin-bottom: 10px;
}
.section-title {
  font-size: 2.2rem;
  margin-bottom: 40px;
}
.subheading {
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--red);
  font-size: 0.95rem;
  margin: 0 0 20px;
}

.placeholder-note {
  color: #a3572c;
  background: #fdf1e6;
  border: 1px dashed #e3b98a;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 0.85rem;
  display: inline-block;
  margin-bottom: 16px;
  font-family: var(--serif-body);
}
.placeholder-note.center { display: block; margin: 40px auto 0; max-width: 560px; }

/* Details */
.details-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  text-align: left;
  margin-top: 10px;
}
.detail-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 32px;
}
.detail-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  display: block;
  object-fit: cover;
  margin-bottom: 16px;
}
.detail-card h3 {
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--red);
  margin-bottom: 10px;
}
.detail-name { font-family: var(--serif-display); font-size: 1.4rem; margin: 0 0 8px; }
.detail-meta { color: var(--ink-soft); margin: 0 0 6px; }
.detail-address { color: var(--ink-soft); margin: 0 0 14px; }
.detail-note { color: var(--ink-soft); margin: 0 0 14px; }
.detail-link { color: var(--red); font-weight: 500; border-bottom: 1px solid var(--red-light); }
.detail-links { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  text-align: left;
  margin-top: 40px;
}
.info-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 24px 28px;
}
.info-card h4 {
  font-family: var(--serif-display);
  font-size: 1.05rem;
  color: var(--red);
  margin: 0 0 8px;
  letter-spacing: 0.5px;
}
.info-card p {
  color: var(--ink-soft);
  margin: 0;
  font-size: 0.98rem;
}
.info-card .detail-link { display: inline-block; margin-top: 10px; font-size: 0.92rem; }


/* Dresscode section */
.dresscode-subtitle {
  color: var(--red);
  font-size: 1.15rem;
  letter-spacing: 0.5px;
  margin: 0 0 18px;
}
.dresscode-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 44px;
  align-items: center;
}
.dresscode-image {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 18px 24px rgba(43, 21, 15, 0.18));
}

/* Timeline */
.timeline {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  max-width: 480px;
  text-align: left;
  border-left: 2px solid var(--red-light);
}
.timeline li {
  position: relative;
  padding: 4px 0 28px 28px;
}
.timeline li::before {
  content: '';
  position: absolute;
  left: -7px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--red);
  border: 2px solid var(--cream);
}
.timeline-time {
  display: block;
  font-family: var(--serif-display);
  color: var(--red);
  font-size: 1.1rem;
}
.timeline-text { color: var(--ink-soft); }

/* RSVP & Gaver */
.rsvp-photo {
  width: 320px;
  height: 320px;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 22px 45px rgba(43, 21, 15, 0.32);
  margin: 6px auto 28px;
  display: block;
}
.section-text {
  color: var(--ink-soft);
  font-size: 1.1rem;
  max-width: 560px;
  margin: 0 auto 34px;
}
.btn-primary {
  display: inline-block;
  font-family: var(--serif-body);
  background: var(--red);
  color: white;
  border: none;
  border-radius: 999px;
  padding: 16px 44px;
  font-size: 1.05rem;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.btn-primary:hover { background: #6e0f20; transform: translateY(-1px); }

.rsvp-modal {
  position: fixed;
  inset: 0;
  background: rgba(44, 41, 37, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 1000;
}
.rsvp-modal.open { display: flex; }
.rsvp-modal-card {
  background: var(--cream);
  border-radius: 16px;
  padding: 32px;
  width: 100%;
  max-width: 560px;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}
.rsvp-modal-title {
  font-size: 1.4rem;
  color: var(--red);
  margin-bottom: 18px;
  text-align: center;
}
.rsvp-close {
  position: absolute;
  top: 14px;
  right: 18px;
  background: none;
  border: none;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--ink-soft);
  cursor: pointer;
}
.rsvp-iframe {
  width: 100%;
  height: 480px;
  border: none;
  display: none;
}
.rsvp-fallback {
  text-align: center;
  color: var(--ink-soft);
  display: none;
}

/* Footer */
.site-footer {
  text-align: center;
  padding: 60px 24px;
  border-top: 1px solid var(--line);
  background: var(--cream-dark);
}
.footer-logo { height: 90px; width: auto; margin: 0 auto 16px; display: block; }
.footer-names { font-family: var(--serif-display); font-size: 1.6rem; margin-bottom: 4px; }
.footer-date { color: var(--red); letter-spacing: 1px; margin-bottom: 10px; }
.footer-note { color: var(--ink-soft); font-size: 0.95rem; }

/* Responsive */
@media (max-width: 720px) {
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--cream);
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .section { padding: 90px 20px; }
  .info-grid { grid-template-columns: 1fr; }
  .dresscode-grid { grid-template-columns: 1fr; gap: 36px; }
  .rsvp-photo { width: 220px; height: 220px; }
  .countdown { gap: 14px; }
  .countdown-item { min-width: 58px; }
  .countdown-number { font-size: 1.5rem; padding: 8px 4px; }
  .hero-frame { padding: 40px 22px; }
}
