:root {
  --turquoise: #0f9b9b;
  --turquoise-deep: #0a6e6e;
  --coral: #ff7a5c;
  --sand: #fdf3e4;
  --sand-dark: #f7e6c8;
  --ink: #1f3b3b;
  --ink-soft: #5f7d7d;
  --body-font: 'Jost', sans-serif;
  --display: 'Quicksand', sans-serif;
  --script: 'Pacifico', cursive;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--body-font);
  background: var(--sand);
  color: var(--ink);
  line-height: 1.65;
  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(15,155,155,0.45) 0%, rgba(10,60,60,0.75) 100%),
    url('../resources/beach-top.jpg') center / 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(340px, 80vw);
  height: auto;
  cursor: pointer;
  filter: drop-shadow(0 12px 30px rgba(0,0,0,0.35));
  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: #fff;
  letter-spacing: 0.5px;
  font-size: 1.3rem;
  font-style: italic;
  text-align: center;
  max-width: 320px;
}

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

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

.section-title--light { color: #fff; margin-bottom: 36px; }

/* HERO — split photo/sand */
.hero {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.hero-photo {
  position: relative;
  height: 54vh;
  min-height: 320px;
  overflow: hidden;
}

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

.hero-wave {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 60px;
  fill: var(--sand);
}

.hero-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px 24px 56px;
  background: var(--sand);
}

.hero-kicker {
  font-size: 1.05rem;
  color: var(--ink-soft);
  font-style: italic;
  margin-bottom: 18px;
  max-width: 420px;
}

.hero-names {
  font-family: var(--script);
  font-weight: 400;
  font-size: clamp(2.8rem, 10vw, 4.6rem);
  color: var(--coral);
  line-height: 1.1;
  margin-bottom: 14px;
}

.hero-names .amp {
  font-family: var(--display);
  font-size: 0.5em;
  color: var(--turquoise);
  margin: 0 0.25em;
  vertical-align: middle;
}

.hero-date {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--turquoise-deep);
  margin-bottom: 40px;
}

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

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

.hero-scroll:hover .hero-arrow-btn { transform: scale(1.08); }

.hero-arrow { width: 18px; height: 18px; color: #fff; }

.hero-scroll small {
  font-size: 0.78rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 600;
}

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

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

/* TICKETS (boarding pass style events) */
.tickets-section {
  padding: 90px 24px 60px;
  text-align: center;
}

.tickets-sub {
  color: var(--ink-soft);
  font-style: italic;
  margin-bottom: 40px;
}

.tickets {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 6px;
  max-width: 380px;
  margin: 0 auto;
}

.ticket {
  width: 100%;
  max-width: 320px;
  display: flex;
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 14px 34px rgba(15,110,110,0.18);
  text-align: left;
}

.ticket-main {
  flex: 1;
  padding: 26px 20px;
}

.ticket-label {
  font-family: var(--display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: 6px;
}

.ticket-main h3 {
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--turquoise-deep);
  margin-bottom: 10px;
}

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

.ticket-stub {
  flex: 0 0 84px;
  background: var(--turquoise);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  border-left: 2px dashed rgba(255,255,255,0.5);
}

.ticket-stub::before,
.ticket-stub::after {
  content: '';
  position: absolute;
  left: -11px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--sand);
}

.ticket-stub::before { top: -11px; }
.ticket-stub::after { bottom: -11px; }

.ticket-icon { font-size: 1.6rem; }

.ticket-time {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 1px;
}

.map-btn {
  display: inline-block;
  border: 1px solid var(--turquoise);
  color: var(--turquoise-deep);
  text-decoration: none;
  padding: 8px 18px;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: all 0.25s ease;
}

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

/* COUNTDOWN — wave band */
.countdown-section {
  position: relative;
  background: var(--turquoise);
  padding: 56px 24px 70px;
  text-align: center;
}

.wave-top, .wave-bottom {
  position: absolute;
  left: 0;
  width: 100%;
  height: 40px;
}

.wave-top { top: -1px; fill: var(--sand); }
.wave-bottom { bottom: -1px; fill: var(--sand); }

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

.cd-item {
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 14px;
  padding: 18px 20px;
  min-width: 78px;
}

.cd-item span {
  display: block;
  font-family: var(--display);
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
}

.cd-item small {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,0.85);
}

/* 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: 24px;
  overflow: hidden;
  box-shadow: 0 14px 34px rgba(15,110,110,0.18);
}

.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: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.9);
  color: var(--turquoise-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.25s ease;
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
}

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

.carousel-arrow:hover { background: var(--turquoise); 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(--coral);
  border-color: var(--coral);
  transform: scale(1.2);
}

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

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

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

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

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

.rsvp-form {
  background: #fff;
  border-radius: 20px;
  padding: 36px 30px;
  box-shadow: 0 14px 34px rgba(15,110,110,0.14);
  text-align: left;
}

.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(--sand-dark);
  border-radius: 12px;
  font-family: var(--body-font);
  font-size: 1rem;
  background: var(--sand);
  color: var(--ink);
  resize: vertical;
}

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

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

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

.rsvp-submit:hover { background: #e8613f; }

.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(--turquoise-deep);
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: 20px;
}

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

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

/* FOOTER */
.footer {
  text-align: center;
  padding: 30px;
  background: var(--turquoise-deep);
  color: #fff;
  font-size: 0.85rem;
  letter-spacing: 1px;
}

@media (max-width: 600px) {
  .section { padding: 60px 20px; }
  .tickets-section { padding: 70px 20px 40px; }
}
