:root {
  --mustard: #e0a527;
  --mustard-deep: #b9821a;
  --terracotta: #c96f3e;
  --terracotta-deep: #a5532a;
  --olive: #6b7a3a;
  --olive-deep: #4c5a28;
  --cream: #fbf3e2;
  --cream-dark: #f3e4c3;
  --ink: #3c2f1e;
  --ink-soft: #7a6a4e;
  --display: 'Baloo 2', sans-serif;
  --body: 'Nunito', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  font-weight: 400;
  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: 30px;
  background:
    linear-gradient(180deg, rgba(60,47,30,0.35) 0%, rgba(60,47,30,0.88) 100%),
    url('../resources/jungle-leaves.jpg') center / cover no-repeat;
  transition: opacity 0.9s ease, visibility 0.9s ease;
  overflow: hidden;
}

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

.leaf-decor {
  position: absolute;
  font-size: 5rem;
  opacity: 0.35;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,0.3));
}
.leaf-decor-1 { top: 6%; left: -6%; transform: rotate(-18deg); }
.leaf-decor-2 { bottom: 4%; right: -8%; transform: rotate(24deg) scaleX(-1); font-size: 6rem; }

.envelope {
  width: min(320px, 78vw);
  height: auto;
  cursor: pointer;
  filter: drop-shadow(0 12px 30px rgba(0,0,0,0.45));
  transition: transform 0.3s ease;
  z-index: 1;
}

.envelope:hover { transform: scale(1.05) rotate(-1deg); }

.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 {
  font-family: var(--display);
  font-weight: 600;
  color: #fff6e2;
  letter-spacing: 0.4px;
  font-size: 1.15rem;
  text-align: center;
  max-width: 300px;
  z-index: 1;
}

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

.section-kicker {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 1px;
  color: var(--terracotta-deep);
  margin-bottom: 6px;
}

.section-title {
  font-family: var(--display);
  font-size: clamp(1.5rem, 3.6vw, 2.1rem);
  font-weight: 700;
  margin-bottom: 40px;
  color: var(--olive-deep);
}

/* HERO */
.hero {
  min-height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  background: linear-gradient(160deg, var(--mustard) 0%, var(--terracotta) 55%, var(--terracotta-deep) 100%);
  overflow: hidden;
}

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

.hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.22;
  mix-blend-mode: multiply;
}

.hero-card {
  position: relative;
  z-index: 1;
  max-width: 520px;
  background: rgba(251, 243, 226, 0.94);
  border: 4px dashed var(--olive);
  border-radius: 28px;
  padding: 44px 30px 36px;
  box-shadow: 0 20px 50px rgba(60,47,30,0.35);
}

.hero-kicker {
  font-family: var(--body);
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

.hero-paws {
  font-size: 1.1rem;
  letter-spacing: 10px;
  margin-bottom: 6px;
  opacity: 0.85;
}

.hero-name {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(3.2rem, 14vw, 5.2rem);
  color: var(--terracotta-deep);
  line-height: 1;
  margin-bottom: 6px;
  -webkit-text-stroke: 1.5px var(--olive-deep);
  text-shadow: 3px 3px 0 var(--mustard);
}

.hero-occasion {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--olive-deep);
  margin-bottom: 24px;
}

.hero-date-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--olive);
  color: #fff8ea;
  border-radius: 16px;
  padding: 10px 22px;
  margin-bottom: 34px;
  box-shadow: 0 8px 18px rgba(76,90,40,0.35);
}

.hero-date-day {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.8rem;
  line-height: 1;
}

.hero-date-rest {
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
}

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

.paw-trail {
  display: flex;
  gap: 6px;
}

.paw-trail .paw {
  font-size: 1.3rem;
  display: inline-block;
  animation: paw-bounce 1.6s ease-in-out infinite;
}
.paw-trail .paw:nth-child(1) { animation-delay: 0s; transform: translateY(2px) rotate(-8deg); }
.paw-trail .paw:nth-child(2) { animation-delay: 0.2s; transform: translateY(-2px) rotate(4deg); }
.paw-trail .paw:nth-child(3) { animation-delay: 0.4s; transform: translateY(2px) rotate(-4deg); }

@keyframes paw-bounce {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.6; }
  50% { transform: translateY(-10px) scale(1.15); opacity: 1; }
}

.hero-scroll:hover .paw-trail .paw { opacity: 1; }

.hero-scroll small {
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 1px;
}

/* ANIMAL STRIP */
.animal-strip {
  display: flex;
  justify-content: space-around;
  background: var(--olive-deep);
  padding: 14px 10px;
  font-size: 1.5rem;
  overflow: hidden;
}

/* EVENTS */
.events-section {
  max-width: 780px;
  margin: 0 auto;
  padding: 90px 24px 20px;
  text-align: center;
}

.events-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  margin-top: 40px;
  text-align: left;
}

.event-card {
  background: #fff;
  border-radius: 20px;
  padding: 30px 22px;
  box-shadow: 0 10px 26px rgba(105,79,40,0.14);
  border: 3px solid var(--cream-dark);
  text-align: center;
  position: relative;
}

.event-card:nth-child(1) { border-color: var(--olive); }
.event-card:nth-child(2) { border-color: var(--terracotta); }

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

.event-card h3 {
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--olive-deep);
  margin-bottom: 10px;
}

.event-time {
  color: var(--terracotta-deep);
  font-weight: 800;
  letter-spacing: 1px;
  margin-bottom: 8px;
  font-family: var(--display);
  font-size: 1.1rem;
}

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

.map-btn {
  display: inline-block;
  background: var(--mustard);
  border: none;
  color: var(--ink);
  text-decoration: none;
  padding: 9px 22px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.5px;
  transition: all 0.25s ease;
}

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

/* COUNTDOWN */
.countdown-wrap {
  margin-top: 58px;
}

.countdown-label {
  font-family: var(--display);
  font-weight: 700;
  color: var(--olive-deep);
  margin-bottom: 20px;
  font-size: 1.05rem;
}

.countdown {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.cd-item {
  background: var(--olive);
  border-radius: 16px;
  padding: 16px 20px;
  min-width: 78px;
  text-align: center;
  box-shadow: 0 8px 20px rgba(76,90,40,0.25);
}

.cd-item span {
  display: block;
  font-family: var(--display);
  font-size: 1.9rem;
  font-weight: 800;
  color: #fff8ea;
}

.cd-item small {
  font-family: var(--body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--mustard);
}

/* PHOTO BREAK */
.photo-break {
  position: relative;
  height: 44vh;
  min-height: 300px;
  overflow: hidden;
  margin-top: 70px;
}

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

.photo-break-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(60,47,30,0.8) 0%, rgba(60,47,30,0.05) 55%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.photo-break-caption {
  color: #fff8ea;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.05rem;
  padding: 0 30px 26px;
  text-align: center;
  max-width: 560px;
}

/* MESSAGE */
.message-section {
  position: relative;
  background:
    linear-gradient(rgba(251,243,226,0.93), rgba(251,243,226,0.93)),
    url('../resources/monstera-leaves.jpg') center / cover no-repeat;
}

.ornament { font-size: 1.8rem; margin: 12px 0; }

.message-text {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
  max-width: 560px;
  margin: 0 auto;
}

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

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

.rsvp-form {
  background: #fff;
  border-radius: 22px;
  padding: 36px 30px;
  box-shadow: 0 12px 32px rgba(105,79,40,0.16);
  text-align: left;
  border: 3px dashed var(--terracotta);
}

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

.form-row label {
  display: block;
  font-family: var(--display);
  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: 2px solid var(--cream-dark);
  border-radius: 12px;
  font-family: var(--body);
  font-weight: 400;
  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(--olive);
}

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

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

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

.rsvp-submit {
  width: 100%;
  padding: 15px;
  background: var(--terracotta-deep);
  color: #fff8ea;
  border: none;
  border-radius: 30px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 1px;
  cursor: pointer;
  transition: background 0.25s ease;
}

.rsvp-submit:hover { background: var(--olive-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 {
  font-family: var(--display);
  color: var(--olive-deep);
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 20px;
}

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

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

/* FOOTER */
.footer {
  text-align: center;
  padding: 34px 20px;
  background: var(--olive-deep);
  color: #fbf3e2;
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
}

@media (max-width: 600px) {
  .section { padding: 60px 20px; }
  .events-section { padding: 70px 20px 20px; }
  .events-grid { grid-template-columns: 1fr; }
  .hero-card { padding: 36px 22px 30px; }
}
