/* ── MODAL ─────────────────────────────────────────────────────────────────── */
#modal-bg {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(5, 8, 16, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  /* Only animate opacity + transform — no layout changes */
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s var(--ease);
}
#modal-bg.open {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: var(--midnight-mid);
  border: 1px solid var(--border);
  padding: 52px 48px;
  width: 100%;
  max-width: 460px;
  position: relative;
  transform: translateY(20px);
  transition: transform .35s var(--ease);
  will-change: transform;
}
#modal-bg.open .modal { transform: none; }

.modal-close {
  position: absolute;
  top: 18px; right: 20px;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
  transition: color .2s;
  padding: 4px;
}
.modal-close:hover { color: #fff; }

.modal h3 {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  letter-spacing: .04em;
  margin-bottom: 8px;
}
.modal-sub {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 32px;
}

.modal label {
  display: block;
  font-size: 10px;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.modal input {
  display: block;
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 13px 16px;
  margin-bottom: 20px;
  font-size: 14px;
  font-family: var(--font);
  outline: none;
  transition: border-color .25s;
}
.modal input:focus  { border-color: var(--red); }
.modal input.error  { border-color: var(--red); }
.modal input::placeholder { color: rgba(255, 255, 255, 0.2); }

.modal .btn-primary { width: 100%; text-align: center; }

/* Confirmation state */
#form-thanks {
  text-align: center;
  padding: 20px 0;
  font-size: 15px;
  color: var(--text);
  line-height: 1.9;
}
.thanks-icon {
  font-size: 36px;
  color: var(--red);
  margin-bottom: 12px;
}

/* Footer */
footer {
  padding: 36px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-dim);
  flex-wrap: wrap;
  gap: 12px;
}
.footer-logo { font-size: 16px; font-weight: 800; color: #fff; }
.footer-logo span { color: var(--red); }

@media (max-width: 680px) {
  footer { padding: 32px 24px; flex-direction: column; text-align: center; }
  .modal { padding: 40px 28px; }
}
