/* ==========================================================================
   Wedding invitation — Дима & Полина · 14.08.2026
   Layout = the original mockup as a single image, with a clickable
   hot-zone over the «ЗАПОЛНИТЬ АНКЕТУ» button.
   ========================================================================== */

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: #ece8e3;
  color: #161616;
  font-family: 'Manrope', 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { display: block; max-width: 100%; }

.page {
  position: relative;
  max-width: 600px;        /* same proportions as the original mock-up */
  margin: 0 auto;
  background: #fff;
  box-shadow: 0 30px 80px rgba(0,0,0,.18);
}

.invite {
  width: 100%;
  height: auto;
  display: block;
}

/* Invisible button overlaid exactly on the «ЗАПОЛНИТЬ АНКЕТУ» pill.
   Position is in % of the image so it scales with any screen width. */
.rsvp-hotzone {
  position: absolute;
  /* Measured against the rendered invite.jpg (3542 × 34334). */
  left:   23.0%;
  width:  53.8%;
  top:    96.35%;
  height: 1.00%;

  background: transparent;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  padding: 0;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  transition: background .25s ease, transform .25s ease;
}
.rsvp-hotzone:hover  { background: rgba(255,255,255,.18); transform: translateY(-1px); }
.rsvp-hotzone:active { transform: translateY(0); }
.rsvp-hotzone:focus-visible {
  outline: 2px dashed #f3eee6;
  outline-offset: 4px;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

/* ===== RSVP modal ===== */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 100;
}
.modal[aria-hidden="false"] { display: block; }

.modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(13,13,13,.7);
  backdrop-filter: blur(4px);
  animation: fadeIn .2s ease;
}

.modal__card {
  position: relative;
  margin: 5vh auto;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 14px;
  padding: 30px 26px;
  box-shadow: 0 30px 80px rgba(0,0,0,.4);
  animation: pop .25s ease;
}

@media (max-height: 700px) {
  .modal__card {
    margin: 2vh auto;
    padding: 20px 20px;
    max-height: 96vh;
  }
  .form { gap: 10px; }
  .form__group { padding: 10px 14px; gap: 6px; }
  .form__submit { padding: 12px; }
  .modal__sub { margin-bottom: 14px; }
}
.modal__close {
  position: absolute;
  top: 10px; right: 14px;
  background: transparent;
  border: none;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: #161616;
}

.modal__title {
  margin: 0 0 4px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-align: center;
  color: #7c1f27;
  font-size: 18px;
}
.modal__sub {
  text-align: center;
  color: #6b6b6b;
  font-size: 13px;
  margin: 0 0 22px;
}

.form { display: flex; flex-direction: column; gap: 16px; }
.form__field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.form__field input {
  appearance: none;
  border: 1px solid #d8d8d8;
  border-radius: 10px;
  padding: 12px 14px;
  font: inherit;
  font-size: 14px;
  background: #fafafa;
  transition: border .2s, background .2s;
}
.form__field input:focus { outline: none; border-color: #7c1f27; background: #fff; }
.form__group {
  border: 1px solid #d8d8d8;
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  margin: 0;
}
.form__group legend { padding: 0 6px; color: #6b6b6b; }
.form__group label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.form__other {
  flex-wrap: wrap;
}
.form__other input[type="text"] {
  flex: 1;
  min-width: 120px;
  padding: 6px 10px;
  border: 1px solid #d8d8d8;
  border-radius: 6px;
  font: inherit;
  font-size: 13px;
  background: #fafafa;
  transition: border .2s, background .2s, opacity .2s;
}
.form__other input[type="text"]:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.form__other input[type="text"]:focus {
  outline: none;
  border-color: #7c1f27;
  background: #fff;
}
.form__submit {
  margin-top: 6px;
  background: #7c1f27;
  color: #fff;
  border: none;
  padding: 14px;
  border-radius: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .2s;
}
.form__submit:hover { background: #5d141a; }
.form__note {
  margin: 6px 0 0;
  text-align: center;
  font-size: 13px;
  color: #2a7a2a;
}

@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
@keyframes pop {
  from { opacity: 0; transform: translateY(20px) scale(.96); }
  to   { opacity: 1; transform: none; }
}

/* Optional debug helper — uncomment to visualise the hot-zone */
/*
.rsvp-hotzone { background: rgba(255, 0, 0, .35) !important; }
*/
