:root {
  --sage: #7c9070;
  --sage-dark: #5f7052;
  --sage-light: #a8b89a;
  --rose: #d9a5a0;
  --rose-dark: #c98d88;
  --rose-light: #f0d9d5;
  --cream: #fdf3f0;
  --cream-dark: #f6e3dd;
  --ink: #4a4536;
  --ink-soft: #8f8672;
  --serif: 'Cormorant Garamond', serif;
  --script: 'Parisienne', cursive;
}

* { 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:
    linear-gradient(180deg, rgba(253,243,240,0.82) 0%, rgba(240,217,213,0.9) 100%),
    url('../resources/intro-bg.jpg') center 40% / cover no-repeat;
  transition: opacity 0.9s ease, visibility 0.9s ease;
}

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

.envelope {
  width: min(360px, 85vw);
  height: auto;
  cursor: pointer;
  filter: drop-shadow(0 12px 30px rgba(95,112,82,0.25));
  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(--sage-dark);
  letter-spacing: 1px;
  font-size: 2rem;
  font-style: italic;
  text-align: center;
}

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

.section-title {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 500;
  letter-spacing: 1px;
  margin-bottom: 40px;
  color: var(--sage-dark);
  position: relative;
}

.section-title::after {
  content: '❧';
  display: block;
  width: auto;
  height: auto;
  background: none;
  color: var(--rose-dark);
  font-size: 1.3rem;
  margin: 14px auto 0;
}

/* HERO */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 24px;
  background:
    radial-gradient(ellipse at top, rgba(217,165,160,0.18), transparent 60%),
    radial-gradient(ellipse at bottom, rgba(124,144,112,0.12), transparent 60%),
    linear-gradient(180deg, var(--cream) 0%, var(--cream-dark) 100%);
  position: relative;
}

.hero-inner { max-width: 600px; }

.hero-photo {
  width: 220px;
  height: 220px;
  object-fit: cover;
  object-position: center 20%;
  border-radius: 50%;
  border: 4px solid #fff;
  box-shadow: 0 8px 24px rgba(124,144,112,0.28);
  margin: 0 auto 28px;
  display: block;
}

.hero-kicker {
  font-size: 1.5rem;
  color: var(--ink-soft);
  font-style: italic;
  margin-bottom: 24px;
}

.hero-names {
  font-family: var(--script);
  font-weight: 400;
  font-size: clamp(3.5rem, 12vw, 6.5rem);
  color: var(--sage-dark);
  line-height: 1.1;
  margin-bottom: 20px;
}

.hero-names .amp {
  font-family: var(--serif);
  font-size: 0.5em;
  color: var(--rose-dark);
  margin: 0 0.35em;
  vertical-align: middle;
  font-style: italic;
}

.hero-date {
  font-size: 1.4rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 60px;
}

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

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

.hero-scroll:hover .hero-arrow-btn {
  background: var(--sage);
  transform: scale(1.06);
}

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

.hero-scroll:hover .hero-arrow {
  color: #fff;
}

.hero-scroll small {
  font-size: 1.2rem;
  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; }
}

/* COUNTDOWN */
.countdown-section { background: var(--cream); }

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

.cd-item {
  background: #fff;
  border: 1px solid var(--rose-light);
  border-radius: 8px;
  padding: 20px 18px;
  min-width: 80px;
  box-shadow: 0 4px 20px rgba(124,144,112,0.1);
}

.cd-item span {
  display: block;
  font-size: 2.2rem;
  font-weight: 600;
  color: var(--sage-dark);
}

.cd-item small {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--ink-soft);
}

/* 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: 16px;
  overflow: hidden;
  box-shadow: 0 10px 34px rgba(124,144,112,0.22);
  border: 1px solid var(--rose-light);
}

.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(253,243,240,0.88);
  color: var(--sage-dark);
  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(74,63,53,0.18);
}

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

.carousel-arrow:hover {
  background: var(--sage);
  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(--rose-dark);
  border-color: var(--rose-dark);
  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(--rose-dark);
  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(--rose-light);
  border-radius: 12px;
  padding: 36px 28px;
  flex: 1 1 260px;
  width: 300px;
  max-width: 300px;
  box-shadow: 0 4px 20px rgba(124,144,112,0.1);
}

.event-icon { font-size: 2rem; margin-bottom: 10px; }

.event-card h3 {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--sage-dark);
}

.event-time {
  color: var(--rose-dark);
  font-weight: 600;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

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

.map-btn {
  display: inline-block;
  border: 1px solid var(--sage);
  color: var(--sage-dark);
  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(--sage);
  color: #fff;
}

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

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

.rsvp-form {
  background: #fff;
  border-radius: 14px;
  padding: 36px 30px;
  box-shadow: 0 8px 30px rgba(124,144,112,0.14);
  text-align: left;
  border: 1px solid var(--rose-light);
}

.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(--rose-light);
  border-radius: 8px;
  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(--sage);
  box-shadow: 0 0 0 3px rgba(124,144,112,0.15);
}

.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(--sage); }

.rsvp-submit {
  width: 100%;
  padding: 14px;
  background: var(--sage);
  color: #fff;
  border: none;
  border-radius: 30px;
  font-family: var(--serif);
  font-size: 1.1rem;
  letter-spacing: 1px;
  cursor: pointer;
  transition: background 0.25s ease;
}

.rsvp-submit:hover { background: var(--sage-dark); }

.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(--sage-dark);
  font-weight: 600;
  font-size: 1.2rem;
  margin-bottom: 20px;
}

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

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

/* FOOTER */
.footer {
  text-align: center;
  padding: 30px;
  color: var(--ink-soft);
  font-size: 0.9rem;
  letter-spacing: 1px;
}

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