:root {
  --wine: #6d1626;
  --wine-deep: #440d17;
  --gold: #b8925a;
  --gold-light: #d9bd8f;
  --cream: #faf3ea;
  --cream-dark: #f0e0da;
  --ink: #2e1b1f;
  --ink-soft: #7c6468;
  --serif: 'Cormorant Garamond', serif;
  --script: 'Alex Brush', cursive;
  --display: 'Cinzel', serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--serif);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
}

body.locked {
  overflow: hidden;
  height: 100vh;
}

/* ENVELOPE INTRO */
.envelope-screen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  background:
    radial-gradient(ellipse at center, rgba(109,22,38,0.35), rgba(24,9,12,0.92)),
    var(--wine-deep);
  transition: opacity 0.9s ease, visibility 0.9s ease;
}

.envelope-screen.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.envelope {
  width: min(340px, 80vw);
  height: auto;
  cursor: pointer;
  filter: drop-shadow(0 12px 34px rgba(0,0,0,0.55));
  transition: transform 0.3s ease;
}

.envelope:hover {
  transform: scale(1.04);
}

.envelope.shake {
  animation: envelope-shake 0.5s ease;
  pointer-events: none;
}

@keyframes envelope-shake {
  0%, 100% { transform: translateX(0) rotate(0); }
  15% { transform: translateX(-8px) rotate(-3deg); }
  30% { transform: translateX(7px) rotate(3deg); }
  45% { transform: translateX(-6px) rotate(-2deg); }
  60% { transform: translateX(5px) rotate(2deg); }
  75% { transform: translateX(-3px) rotate(-1deg); }
  90% { transform: translateX(2px) rotate(1deg); }
}

.envelope-hint {
  color: var(--gold-light);
  letter-spacing: 1px;
  font-size: 1.4rem;
  font-style: italic;
  text-align: center;
  max-width: 320px;
}

.section {
  max-width: 720px;
  margin: 0 auto;
  padding: 90px 24px;
  text-align: center;
}

.section-title {
  font-family: var(--display);
  font-size: clamp(1.5rem, 3.4vw, 2rem);
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 44px;
  color: var(--wine);
  position: relative;
}

.section-title::after {
  content: '✦';
  display: block;
  font-size: 0.9rem;
  color: var(--gold);
  margin-top: 16px;
  letter-spacing: 0;
}

.section-title--light {
  color: #fff;
}

/* HERO — full-bleed photo */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero-photo-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-photo-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 60% center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(0deg, rgba(24,9,12,0.92) 0%, rgba(24,9,12,0.55) 42%, rgba(68,13,23,0.15) 68%, rgba(68,13,23,0.35) 100%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 600px;
  padding: 60px 24px 72px;
}

.hero-kicker {
  font-size: 1.15rem;
  color: var(--gold-light);
  font-style: italic;
  margin-bottom: 20px;
}

.hero-names {
  font-family: var(--script);
  font-weight: 400;
  font-size: clamp(3.6rem, 13vw, 7rem);
  color: #fff;
  line-height: 1;
  margin-bottom: 18px;
  text-shadow: 0 4px 24px rgba(0,0,0,0.4);
}

.hero-names .amp {
  font-family: var(--display);
  font-size: 0.4em;
  color: var(--gold);
  margin: 0 0.3em;
  vertical-align: middle;
}

.hero-date {
  font-family: var(--display);
  font-size: 1.05rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 48px;
}

.hero-scroll {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--gold-light);
  text-decoration: none;
}

.hero-arrow-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 1px solid var(--gold-light);
  animation: bounce 2s ease-in-out infinite;
  transition: background 0.25s ease, transform 0.25s ease;
}

.hero-scroll:hover .hero-arrow-btn {
  background: var(--gold);
  border-color: var(--gold);
}

.hero-arrow {
  width: 18px;
  height: 18px;
  color: var(--gold-light);
  transition: color 0.25s ease;
}

.hero-scroll:hover .hero-arrow {
  color: var(--wine-deep);
}

.hero-scroll small {
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

@keyframes pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* OUR STORY */
.story-section {
  background: var(--cream);
  padding: 90px 24px;
}

.story-inner {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}

.story-kicker {
  font-family: var(--script);
  font-size: 2.4rem;
  color: var(--wine);
  margin-bottom: 18px;
}

.story-text {
  font-size: 1.2rem;
  font-style: italic;
  color: var(--ink-soft);
  margin-bottom: 32px;
}

.story-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.story-divider span:not(.story-divider-dot) {
  width: 60px;
  height: 1px;
  background: var(--gold);
}

.story-divider-dot {
  color: var(--gold);
  font-size: 0.9rem;
}

/* COUNTDOWN — dark full-bleed band */
.countdown-section {
  position: relative;
  padding: 100px 24px;
  overflow: hidden;
  text-align: center;
}

.countdown-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.countdown-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}

.countdown-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(160deg, rgba(24,9,12,0.88) 0%, rgba(68,13,23,0.82) 100%);
}

.countdown-inner {
  position: relative;
  z-index: 2;
}

.countdown {
  display: flex;
  justify-content: center;
  gap: clamp(16px, 4vw, 40px);
  flex-wrap: wrap;
}

.cd-item {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(217,189,143,0.35);
  border-radius: 2px;
  padding: 22px 20px;
  min-width: 84px;
  backdrop-filter: blur(2px);
}

.cd-item span {
  display: block;
  font-family: var(--display);
  font-size: 2rem;
  font-weight: 600;
  color: var(--gold-light);
}

.cd-item small {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #e8d9d4;
}

/* VENUE CAROUSEL */
.venue-sub {
  color: var(--ink-soft);
  font-style: italic;
  margin-bottom: 36px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.carousel {
  position: relative;
  border-radius: 2px;
  overflow: hidden;
  box-shadow: 0 14px 40px rgba(68,13,23,0.25);
  border: 1px solid var(--cream-dark);
}

.carousel-track {
  display: flex;
  transition: transform 0.6s cubic-bezier(.22,1,.36,1);
}

.carousel-slide {
  flex: 0 0 100%;
  aspect-ratio: 4 / 3;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(250,243,234,0.9);
  color: var(--wine);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
}

.carousel-arrow svg { width: 20px; height: 20px; }

.carousel-arrow:hover {
  background: var(--wine);
  color: #fff;
}

.carousel-prev { left: 16px; }
.carousel-next { right: 16px; }

.carousel-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.carousel-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255,255,255,0.6);
  border: 1px solid rgba(255,255,255,0.85);
  cursor: pointer;
  padding: 0;
  transition: background 0.25s ease, transform 0.25s ease;
}

.carousel-dot.active {
  background: var(--gold);
  border-color: var(--gold);
  transform: scale(1.2);
}

@media (max-width: 600px) {
  .carousel-arrow { width: 36px; height: 36px; }
  .carousel-arrow svg { width: 16px; height: 16px; }
}

/* MESSAGE */
.message-section { background: var(--cream-dark); }

.ornament {
  color: var(--wine);
  font-size: 1.5rem;
  margin: 12px 0;
}

.message-text {
  font-size: 1.25rem;
  font-style: italic;
  color: var(--ink);
  max-width: 560px;
  margin: 0 auto;
}

/* EVENTS */
.events {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
}

.event-card {
  background: #fff;
  border: 1px solid var(--cream-dark);
  border-left: 3px solid var(--wine);
  border-radius: 2px;
  padding: 40px 28px;
  flex: 1 1 260px;
  width: 300px;
  max-width: 300px;
  box-shadow: 0 6px 24px rgba(68,13,23,0.1);
  text-align: left;
}

.event-icon { font-size: 1.8rem; margin-bottom: 12px; }

.event-card h3 {
  font-family: var(--display);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 8px;
  color: var(--wine);
}

.event-time {
  color: var(--gold);
  font-weight: 600;
  letter-spacing: 1px;
  margin-bottom: 12px;
  font-family: var(--display);
  font-size: 0.95rem;
}

.event-place {
  color: var(--ink-soft);
  margin-bottom: 20px;
}

.map-btn {
  display: inline-block;
  border: 1px solid var(--wine);
  color: var(--wine);
  text-decoration: none;
  padding: 8px 20px;
  border-radius: 30px;
  font-size: 0.9rem;
  letter-spacing: 1px;
  transition: all 0.25s ease;
}

.map-btn:hover {
  background: var(--wine);
  color: #fff;
}

/* RSVP */
.rsvp-section { background: var(--cream-dark); }

.rsvp-sub {
  color: var(--ink-soft);
  margin-bottom: 32px;
}

.rsvp-form {
  background: #fff;
  border-radius: 2px;
  padding: 40px 32px;
  box-shadow: 0 10px 34px rgba(68,13,23,0.14);
  text-align: left;
  border-top: 3px solid var(--wine);
}

.form-row { margin-bottom: 22px; }

.form-row label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--ink);
}

.form-row input[type="text"],
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--cream-dark);
  border-radius: 2px;
  font-family: var(--serif);
  font-size: 1rem;
  background: var(--cream);
  color: var(--ink);
  resize: vertical;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--wine);
}

.radio-group {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 400;
  cursor: pointer;
}

.radio-option input { accent-color: var(--wine); }

.rsvp-submit {
  width: 100%;
  padding: 15px;
  background: var(--wine);
  color: #fff;
  border: none;
  border-radius: 30px;
  font-family: var(--display);
  font-size: 0.95rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.25s ease;
}

.rsvp-submit:hover { background: var(--wine-deep); }

.rsvp-fields {
  opacity: 1;
  transition: opacity 0.5s ease;
}

.rsvp-fields.collapsed {
  opacity: 0;
}

.rsvp-form {
  overflow: hidden;
  transition: height 0.7s ease;
}

.rsvp-success {
  text-align: center;
  padding: 12px 0;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.rsvp-success.visible {
  opacity: 1;
}

.rsvp-success-text {
  color: var(--wine);
  font-weight: 600;
  font-size: 1.2rem;
  margin-bottom: 20px;
}

.rsvp-agenda-btn {
  display: inline-block;
  background: var(--wine);
  color: #fff;
  text-decoration: none;
  padding: 12px 28px;
  border-radius: 30px;
  font-family: var(--display);
  font-size: 0.85rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  transition: background 0.25s ease, transform 0.25s ease;
}

.rsvp-agenda-btn:hover {
  background: var(--wine-deep);
  transform: scale(1.03);
}

/* FOOTER */
.footer {
  text-align: center;
  padding: 34px;
  background: var(--wine-deep);
  color: var(--gold-light);
  font-size: 0.85rem;
  letter-spacing: 2px;
  text-transform: uppercase;
}

@media (max-width: 600px) {
  .section { padding: 64px 20px; }
  .story-section { padding: 64px 20px; }
  .countdown-section { padding: 72px 20px; }
  .events { flex-direction: column; align-items: center; }
}
