/* Contact page */

.contact-hero {
  padding: clamp(72px, 12vh, 100px) var(--page-pad) 28px;
  max-width: var(--form-max);
  margin: 0 auto;
}

.contact-hero h1 {
  margin: 12px 0 10px;
  font-size: clamp(32px, 4vw, 40px);
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
}

.contact-hero p {
  margin: 0;
  color: var(--text-body);
}

.contact-stage {
  max-width: var(--form-max);
  margin: 0 auto;
  padding: 0 var(--page-pad) 96px;
  min-height: 420px;
}

.contact-form {
  display: grid;
  gap: 14px;
}

.contact-form .req {
  color: var(--accent);
  font-weight: 600;
}

.contact-form__error {
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.08);
  color: #fca5a5;
  font-size: 13px;
}

.contact-form.is-leaving {
  animation: contact-leave var(--dur) var(--ease) forwards;
  pointer-events: none;
}

.contact-thanks {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  padding: 48px 16px 24px;
}

.contact-thanks.is-show {
  display: flex;
  animation: contact-thanks-in var(--dur-slow) var(--ease) both;
}

.contact-thanks__ring {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  box-shadow: 0 0 0 0 rgba(16, 163, 127, 0.35);
  animation: thanks-pulse 1.2s var(--ease) 1;
}

.contact-thanks__circle {
  stroke: rgba(16, 163, 127, 0.35);
}

.contact-thanks__check {
  stroke: var(--accent-hover);
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
}

.contact-thanks.is-show .contact-thanks__check {
  animation: check-draw 0.55s var(--ease) 0.12s forwards;
}

.contact-thanks__title {
  margin: 8px 0 0;
  max-width: 22ch;
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
}

.contact-thanks__sub {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
}

@keyframes contact-leave {
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

@keyframes contact-thanks-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes check-draw {
  to { stroke-dashoffset: 0; }
}

@keyframes thanks-pulse {
  0% { box-shadow: 0 0 0 0 rgba(16, 163, 127, 0.35); }
  70% { box-shadow: 0 0 0 18px rgba(16, 163, 127, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 163, 127, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .contact-form.is-leaving,
  .contact-thanks.is-show,
  .contact-thanks__ring,
  .contact-thanks.is-show .contact-thanks__check {
    animation: none !important;
  }

  .contact-thanks.is-show .contact-thanks__check {
    stroke-dashoffset: 0;
  }
}
