:root {
  --color-bg: #f3eae3;
  --color-text: #2a2a2a;
  --color-blue: #8397c6;
  --color-red: #d25d50;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: "Lora", serif;
  overflow-x: hidden;
}

/* ---------- Hero ---------- */

.hero {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(32px, 6vw, 56px) 24px 24px;
  text-align: center;
}

.hero-names {
  width: min(70vw, 360px);
  height: auto;
  margin: 0 0 clamp(16px, 3vw, 24px);
}

.hero-tagline {
  font-size: clamp(16px, 2.2vw, 20px);
  line-height: 1.6;
  margin: 0 0 clamp(20px, 4vw, 32px);
  opacity: 0.85;
}

.hero-tagline strong {
  font-weight: 700;
}

.chair-wrap {
  position: relative;
  width: min(70vw, 400px);
  aspect-ratio: 0.82 / 1;
  margin: 0 auto;
}

.chair {
  position: absolute;
  height: auto;
  opacity: 0;
}

.chair-blue {
  left: 0;
  top: 4%;
  width: 58%;
  z-index: 1;
}

.chair-red {
  right: -6%;
  top: 5%;
  width: 58%;
  z-index: 2;
}

.chair.play {
  opacity: 1;
}

.chair.animate.chair-blue {
  animation: chairInBlue 1.3s cubic-bezier(0.22, 0.9, 0.34, 1) both;
}

.chair.animate.chair-red {
  animation: chairInRed 1.3s cubic-bezier(0.22, 0.9, 0.34, 1) 0.12s both;
}

.chair.fade-only {
  transition: opacity 1s ease;
}

.chair.fade-only.chair-red {
  transition-delay: 0.1s;
}

@keyframes chairInBlue {
  0% {
    transform: translate(-60vw, 14px) rotate(-9deg);
    opacity: 0;
  }
  18% {
    opacity: 1;
  }
  55% {
    transform: translate(-11vw, -10px) rotate(5deg);
  }
  78% {
    transform: translate(-3vw, 5px) rotate(-2deg);
  }
  100% {
    transform: translate(0, 0) rotate(0deg);
    opacity: 1;
  }
}

@keyframes chairInRed {
  0% {
    transform: translate(58vw, 16px) rotate(9deg);
    opacity: 0;
  }
  18% {
    opacity: 1;
  }
  55% {
    transform: translate(11vw, -8px) rotate(-5deg);
  }
  78% {
    transform: translate(3vw, 6px) rotate(2deg);
  }
  100% {
    transform: translate(0, 0) rotate(0deg);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .chair.animate.chair-blue,
  .chair.animate.chair-red {
    animation: none;
  }
}

/* ---------- Shared section styles ---------- */

.section-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
  margin: 0 0 40px;
}

.fade-section {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-section.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .fade-section {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- Details / RSVP trigger ---------- */

.details {
  max-width: 940px;
  margin: 0 auto;
  padding: clamp(48px, 8vw, 88px) 24px;
  border-top: 1px solid rgba(42, 42, 42, 0.14);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 56px;
  text-align: center;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 32px;
}

.detail-heading {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0 0 12px;
}

.detail-heading-blue {
  color: var(--color-blue);
}

.detail-heading-red {
  color: var(--color-red);
}

.detail-time {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 6px;
}

.detail-venue {
  font-size: 17px;
  margin: 0 0 4px;
}

.detail-address {
  font-size: 15px;
  margin: 0;
  opacity: 0.75;
}

.rsvp-trigger .section-label {
  margin: 0 0 12px;
}

.rsvp-deadline {
  font-size: 14px;
  opacity: 0.7;
  margin: 0 0 28px;
}

.rsvp-thanks {
  font-size: 18px;
  padding: 16px 0;
  margin: 0;
}

.btn-outline {
  font-family: "Lora", serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 14px 36px;
  background: transparent;
  color: var(--color-text);
  border: 1.5px solid var(--color-text);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-outline:hover {
  background: var(--color-text);
  color: var(--color-bg);
}

/* ---------- Menu ---------- */

.menu {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(48px, 8vw, 88px) 24px;
  border-top: 1px solid rgba(42, 42, 42, 0.14);
  text-align: center;
}

.menu-list {
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.menu-course {
  border-top: 1px solid rgba(42, 42, 42, 0.1);
  padding-top: 36px;
}

.menu-course:first-child {
  border-top: none;
  padding-top: 0;
}

.menu-course-label {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.55;
  margin: 0 0 14px;
}

.menu-item {
  font-size: 16px;
  line-height: 1.6;
  margin: 0 0 8px;
}

.menu-or {
  font-size: 13px;
  font-style: italic;
  opacity: 0.5;
  margin: 4px 0;
}

/* ---------- Venues ---------- */

.venues {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(48px, 8vw, 88px) 24px;
  border-top: 1px solid rgba(42, 42, 42, 0.14);
}

.venues-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 48px;
}

.venue-name {
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 4px;
}

.venue-address {
  font-size: 14px;
  margin: 0 0 16px;
  opacity: 0.75;
}

.venue-map {
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(42, 42, 42, 0.14);
  margin-bottom: 16px;
}

.map-embed {
  display: block;
  border: 0;
}

.venue-links {
  display: flex;
  gap: 20px;
  font-size: 14px;
}

.map-link {
  color: var(--color-text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- RSVP modal ---------- */

.rsvp-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(42, 42, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 100;
}

.rsvp-modal-backdrop[hidden] {
  display: none;
}

.rsvp-modal {
  background: var(--color-bg);
  border-radius: 12px;
  max-width: 480px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  padding: 40px 28px 32px;
  position: relative;
  box-shadow: 0 20px 60px rgba(42, 42, 42, 0.35);
  text-align: left;
}

.rsvp-modal .section-label,
.rsvp-modal .rsvp-deadline {
  text-align: center;
}

.rsvp-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: transparent;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  color: var(--color-text);
  display: flex;
  align-items: center;
  justify-content: center;
}

.rsvp-close:hover {
  background: rgba(42, 42, 42, 0.08);
}

.rsvp-modal .rsvp-thanks {
  text-align: center;
  font-size: 18px;
  padding: 24px 0;
}

#rsvp-form {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

#rsvp-form[hidden] {
  display: none;
}

#rsvp-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.field-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.6;
}

#rsvp-form input[type="text"],
#rsvp-form textarea {
  width: 100%;
  font-family: "Lora", serif;
  font-size: 17px;
  padding: 8px 2px;
  background: transparent;
  border: none;
  border-bottom: 1.5px solid rgba(42, 42, 42, 0.3);
  color: var(--color-text);
  outline: none;
  transition: border-color 0.25s ease;
}

#rsvp-form textarea {
  resize: vertical;
}

#rsvp-form input[type="text"]:focus,
#rsvp-form textarea:focus {
  border-bottom-color: var(--color-blue);
}

.attending-field {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.attending-pills {
  display: flex;
  gap: 12px;
}

.pill {
  flex: 1;
  text-align: center;
  padding: 12px 16px;
  border: 1.5px solid rgba(42, 42, 42, 0.25);
  border-radius: 8px;
  cursor: pointer;
  font-size: 15px;
  font-family: "Lora", serif;
  font-weight: 400;
  color: rgba(42, 42, 42, 0.7);
  background: transparent;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.pill.selected {
  font-weight: 600;
  color: var(--color-text);
}

.pill-blue.selected {
  border-color: var(--color-blue);
  background: rgba(131, 151, 198, 0.08);
}

.pill-red.selected {
  border-color: var(--color-red);
  background: rgba(210, 93, 80, 0.08);
}

.counters-row {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}

.counter-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.counter {
  display: flex;
  align-items: center;
  gap: 14px;
}

.counter-value {
  min-width: 20px;
  text-align: center;
  font-size: 18px;
}

.counter-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid rgba(42, 42, 42, 0.3);
  background: transparent;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  color: var(--color-text);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: border-color 0.2s ease;
}

.counter-btn-blue:hover {
  border-color: var(--color-blue);
}

.counter-btn-red:hover {
  border-color: var(--color-red);
}

.guests-fields {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.guests-fields[hidden] {
  display: none;
}

.btn-filled {
  align-self: center;
  font-family: "Lora", serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 14px 36px;
  background: var(--color-text);
  color: var(--color-bg);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  margin-top: 8px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.btn-filled:hover {
  background: var(--color-blue);
  transform: translateY(-2px);
}

.btn-filled:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.rsvp-error {
  color: var(--color-red);
  font-size: 14px;
  text-align: center;
  margin: 0;
}

/* Honeypot: visually and structurally hidden from real users */
.hp-field {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  left: -9999px;
}

/* ---------- Footer ---------- */

footer {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 24px 56px;
  border-top: 1px solid rgba(42, 42, 42, 0.14);
  text-align: center;
}

footer p {
  font-size: 15px;
  margin: 0 0 6px;
}
