/* ===== Reset ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Burgundy / wine palette with gold accents */
  --burgundy: #6b2737;
  --burgundy-dark: #4e1c28;
  --burgundy-deep: #3a1520;
  --wine: #7d3244;
  --rose: #a25065;
  --gold: #b8942e;
  --gold-light: #d4b04a;
  --gold-muted: #c2a654;
  --gold-pale: rgba(184, 148, 46, 0.12);
  --blush: #f5ece8;
  --blush-dark: #ebe0da;
  --linen: #faf7f5;
  --warm-white: #fdfcfa;
  --taupe: #8a7e76;
  --taupe-light: #b8ada5;
  --charcoal: #5a4f4f;
  --text: #6b6060;
  --text-mid: #8a7e78;
  --text-light: #a89e98;
  --border: rgba(160, 145, 138, 0.25);
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Josefin Sans', sans-serif;
  font-weight: 400;
  color: var(--text);
  background: var(--linen);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
}

/* ===== Navigation ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  padding: 1.1rem 2rem;
  background: rgba(250, 247, 245, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transform: translateY(-100%);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav.visible {
  transform: translateY(0);
}

.nav-link {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-mid);
  padding: 0.2rem 0;
  border-bottom: 1px solid transparent;
  transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--burgundy);
  border-bottom-color: var(--burgundy);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, var(--burgundy-deep) 0%, var(--burgundy-dark) 40%, var(--burgundy) 100%);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(255,255,255,0.05) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 80%, rgba(255,255,255,0.03) 0%, transparent 60%);
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem;
  animation: heroFadeIn 1.5s ease-out;
}

@keyframes heroFadeIn {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-prelude {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 2.5rem;
}

.hero-names {
  font-family: 'Great Vibes', cursive;
  font-size: 8rem;
  font-weight: 400;
  color: #fff;
  line-height: 1.15;
  letter-spacing: 0.02em;
  margin-bottom: 1.5rem;
  font-style: normal;
}

.amp {
  font-style: italic;
  font-weight: 400;
  color: var(--gold-light);
  margin: 0 0.15em;
}

.hero-line {
  width: 50px;
  height: 1px;
  background: var(--gold-muted);
  margin: 0 auto 1.5rem;
}

.hero-occasion {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  font-weight: 500;
  font-style: italic;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.hero-date {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-muted);
}

.scroll-cue {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--gold-muted), transparent);
  animation: scrollPulse 2.5s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.4; transform: scaleY(1); }
  50% { opacity: 0.8; transform: scaleY(1.15); }
}

/* ===== Shared Section Styles ===== */
.section-label {
  text-align: center;
  font-family: 'Josefin Sans', sans-serif;
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.8rem;
}

.section-heading {
  text-align: center;
  font-family: 'Great Vibes', cursive;
  font-size: 3.2rem;
  font-weight: 400;
  color: var(--charcoal);
  letter-spacing: 0.01em;
  margin-bottom: 1rem;
}

.thin-rule {
  width: 40px;
  height: 1px;
  background: var(--gold-muted);
  margin: 0 auto 3.5rem;
}

/* ===== Details ===== */
.details {
  padding: 7rem 2rem;
  background: var(--linen);
}

.details-columns {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 0;
  max-width: 900px;
  margin: 0 auto;
}

.detail-block {
  flex: 1;
  text-align: center;
  padding: 2rem 2.5rem;
}

.detail-link {
  text-decoration: none;
  color: inherit;
  display: block;
  border-radius: 4px;
  transition: background 0.3s ease;
}

.detail-link:hover,
.detail-link:visited,
.detail-link:active {
  text-decoration: none;
  color: inherit;
}

.detail-link:hover {
  background: rgba(107, 39, 55, 0.04);
}

.detail-divider {
  width: 1px;
  min-height: 120px;
  background: var(--border);
  align-self: center;
}

.detail-title {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.2rem;
}

.detail-main {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.detail-sub {
  font-size: 0.88rem;
  font-weight: 400;
  color: var(--text-mid);
  line-height: 1.7;
}

.detail-map-link {
  display: inline-block;
  margin-top: 0.8rem;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--burgundy);
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

.detail-link:hover .detail-map-link {
  opacity: 1;
}

/* ===== Story / Timeline ===== */
.story {
  padding: 7rem 2rem;
  background: var(--blush);
}

.story .section-heading {
  color: var(--charcoal);
}

.timeline {
  max-width: 1160px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  transform: translateX(-50%);
  background: linear-gradient(to bottom, transparent, var(--gold-muted) 5%, var(--gold-muted) 92%, transparent);
}

.timeline-item {
  display: grid;
  grid-template-columns: 1.5fr 60px 1fr;
  grid-template-areas: "photo node card";
  align-items: center;
  margin-bottom: 5rem;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.timeline-item:nth-child(even) {
  grid-template-columns: 1fr 60px 1.5fr;
  grid-template-areas: "card node photo";
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-item.visible {
  opacity: 1;
  transform: translateY(0);
}

.timeline-photo {
  grid-area: photo;
  margin: 0 1.5rem;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 6px 28px rgba(58, 21, 32, 0.14);
  transition: box-shadow 0.7s ease;
}

.timeline-photo img {
  width: 100%;
  display: block;
  filter: sepia(28%) brightness(0.92) contrast(1.08) saturate(0.72);
  transform: scale(1);
  transition: filter 0.7s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.timeline-item:hover .timeline-photo {
  box-shadow: 0 12px 44px rgba(58, 21, 32, 0.24);
}

.timeline-item:hover .timeline-photo img {
  filter: sepia(8%) brightness(0.97) contrast(1.04) saturate(0.88);
  transform: scale(1.05);
}

.timeline-node {
  grid-area: node;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 1;
}

.timeline-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--gold);
  border: 2px solid var(--blush);
}

.timeline-card {
  grid-area: card;
  padding: 0 2rem;
}

.timeline-item:nth-child(even) .timeline-card {
  text-align: right;
}

.timeline-year {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.3rem;
  display: block;
}

.timeline-card h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 0.35rem;
}

.timeline-card p {
  font-size: 0.92rem;
  font-weight: 400;
  color: var(--text-mid);
  line-height: 1.75;
}

.timeline-item--final .timeline-node {
  align-self: start;
  padding-top: 0.3rem;
}

.timeline-item--final .timeline-card {
  grid-column: 1 / -1;
  grid-row: 2;
  position: relative;
  z-index: 2;
  background: var(--blush);
  text-align: center;
  max-width: 440px;
  margin: 0 auto;
  padding: 1.5rem 1rem 0;
}

/* ===== RSVP ===== */
.rsvp {
  padding: 7rem 2rem;
  background: var(--warm-white);
}

.rsvp-deadline {
  text-align: center;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  font-style: italic;
  color: var(--text-mid);
  margin-top: -2rem;
  margin-bottom: 3rem;
}

.rsvp-container {
  max-width: 480px;
  margin: 0 auto;
}

.rsvp-form {
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group > label:first-child {
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--taupe);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group select,
.form-group textarea {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 400;
  padding: 0.85rem 0;
  border: none;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  color: var(--charcoal);
  transition: border-color 0.3s ease;
  outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--taupe-light);
  font-weight: 300;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-bottom-color: var(--gold);
}

.form-group select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' fill='%239a8e8e' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0 center;
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
  border: 1px solid var(--border);
  padding: 0.85rem 1rem;
  border-radius: 3px;
}

.form-group textarea:focus {
  border-color: var(--gold);
}

/* Radio buttons */
.radio-group {
  display: flex;
  gap: 2rem;
  margin-top: 0.2rem;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  font-size: 0.9rem !important;
  font-weight: 400 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  color: var(--text) !important;
}

.radio-label input[type="radio"] {
  display: none;
}

.radio-dot {
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--taupe-light);
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
  transition: border-color 0.3s ease;
}

.radio-label input[type="radio"]:checked + .radio-dot {
  border-color: var(--gold);
}

.radio-label input[type="radio"]:checked + .radio-dot::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
}

/* Attending fields */
.attending-fields {
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
}

.attending-fields.hidden {
  display: none;
}

/* Submit */
.submit-btn {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 0.74rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 1.1rem 3rem;
  border: 1.5px solid var(--gold);
  border-radius: 0;
  background: transparent;
  color: var(--burgundy);
  cursor: pointer;
  transition: all 0.35s ease;
  align-self: center;
  margin-top: 0.5rem;
}

.submit-btn:hover {
  background: var(--gold);
  color: var(--warm-white);
}

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

.btn-loading { display: none; }
.btn-loading:not(.hidden) { display: inline; }
.btn-text.hidden { display: none; }

/* Success */
.rsvp-success {
  text-align: center;
  padding: 3rem 0;
  animation: fadeUp 0.6s ease;
}

.rsvp-success.hidden { display: none; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.success-check {
  width: 48px;
  height: 48px;
  margin: 0 auto 1.5rem;
  color: var(--gold);
}

.rsvp-success h3 {
  font-size: 2.2rem;
  color: var(--charcoal);
  margin-bottom: 0.5rem;
}

.rsvp-success p {
  font-size: 0.95rem;
  color: var(--text-mid);
  line-height: 1.8;
}

/* ===== Messages ===== */
.messages {
  padding: 7rem 2rem;
  background: var(--blush);
}

.messages-grid {
  max-width: 800px;
  margin: 0 auto;
  columns: 2;
  column-gap: 2rem;
}

.message-card {
  break-inside: avoid;
  margin-bottom: 2rem;
  padding: 1.8rem;
  background: var(--warm-white);
  border: 1px solid var(--border);
  border-radius: 2px;
  animation: fadeUp 0.5s ease;
}

.message-card .message-author {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 0.4rem;
}

.message-card .message-text {
  font-size: 0.88rem;
  font-weight: 400;
  color: var(--text-mid);
  line-height: 1.8;
  font-style: italic;
}

.no-messages {
  text-align: center;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  font-style: italic;
  color: var(--text-light);
}

.no-messages.hidden { display: none; }

/* ===== Footer ===== */
.footer {
  padding: 5rem 2rem;
  text-align: center;
  background: var(--burgundy-deep);
  color: rgba(255, 255, 255, 0.85);
}

.footer-rule {
  width: 30px;
  height: 1px;
  background: var(--gold-muted);
  margin: 0 auto 2rem;
}

.footer-names {
  font-family: 'Great Vibes', cursive;
  font-size: 2.5rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 0.3rem;
}

.footer-years {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.35em;
  color: var(--gold-muted);
  margin-bottom: 0.8rem;
}

.footer-note {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.05rem;
  font-style: italic;
  color: rgba(255, 255, 255, 0.5);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav {
    gap: 1.2rem;
    padding: 0.9rem 1rem;
  }

  .nav-link {
    font-size: 0.62rem;
    letter-spacing: 0.15em;
  }

  .hero-names {
    font-size: 4.5rem;
  }

  .hero-prelude {
    font-size: 0.62rem;
    padding: 0 1rem;
  }

  .section-heading {
    font-size: 2.6rem;
  }

  .details-columns {
    flex-direction: column;
    align-items: center;
  }

  .detail-block {
    padding: 1.5rem 2rem;
  }

  .detail-divider {
    width: 40px;
    min-height: 0;
    height: 1px;
  }

  .details, .story, .rsvp, .messages {
    padding: 5rem 1.5rem;
  }

  .timeline::before {
    display: none;
  }

  .timeline-item,
  .timeline-item:nth-child(even) {
    display: block;
    position: relative;
    padding-left: 2.5rem;
    padding-bottom: 3rem;
    grid-template-areas: none;
  }

  .timeline-node {
    position: absolute;
    left: 0;
    top: 0.3rem;
    display: block;
  }

  .timeline-photo {
    margin: 0 0 1.2rem 0;
  }

  .timeline-card,
  .timeline-item:nth-child(even) .timeline-card {
    padding: 0;
    text-align: left;
  }

  .timeline-item--final .timeline-card {
    grid-column: auto;
    grid-row: auto;
    position: static;
    background: none;
    max-width: none;
    margin: 0;
    padding: 0;
    text-align: left;
  }

  .messages-grid {
    columns: 1;
  }

  .radio-group {
    flex-direction: column;
    gap: 0.8rem;
  }
}

@media (max-width: 480px) {
  .hero-names {
    font-size: 3.5rem;
  }

  .hero-occasion {
    font-size: 1.2rem;
  }

  .nav {
    gap: 0.7rem;
  }

  .nav-link {
    font-size: 0.58rem;
    letter-spacing: 0.12em;
  }

  .section-heading {
    font-size: 2rem;
  }
}
