/* Contact page: form, privacy box and confirmation dialog. */

.contact__grid {
  display: grid;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}
@media (min-width: 960px) {
  .contact__grid { grid-template-columns: 0.85fr 1.15fr; }
  .contact__intro { position: sticky; top: calc(var(--header-h) + 2rem); }
}
.contact__intro h2 { font-size: var(--step-3); }
.contact__intro > p { margin-top: 1.25rem; color: var(--text-muted); font-size: var(--step-1); }
.contact__points { list-style: none; display: grid; gap: 0.75rem; margin-top: 2rem; }
.contact__points li { display: flex; gap: 0.75rem; }
.contact__address {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  color: var(--text-dim);
  font-size: var(--step--1);
  font-style: normal;
  line-height: 1.8;
}

.form {
  display: grid;
  gap: 1.35rem;
  padding: clamp(1.25rem, 4vw, 2.5rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--surface), var(--bg-raised));
}

.field { display: grid; gap: 0.5rem; }
.field label { font-weight: 600; font-size: 0.95rem; }
.req { color: var(--lime); }

.field input[type="text"],
.field input[type="email"],
.field select,
.field textarea {
  width: 100%;
  min-height: 52px;
  padding: 0.8rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 1rem; /* 16px keeps iOS from zooming on focus */
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { min-height: 160px; resize: vertical; line-height: 1.6; }
.field select {
  appearance: none;
  padding-right: 2.75rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2383d841' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 18px;
}
.field input:hover,
.field select:hover,
.field textarea:hover { border-color: rgb(255 255 255 / 0.28); }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--lime);
  box-shadow: 0 0 0 4px var(--lime-glow);
}
.field [aria-invalid="true"] { border-color: #ff6b6b; }
.field__error { color: #ff8a8a; font-size: var(--step--1); }
.field__hint { color: var(--text-dim); font-size: 0.8rem; text-align: right; }

.field--hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.field--check {
  grid-template-columns: auto 1fr;
  align-items: start;
  column-gap: 0.75rem;
}
.field--check input {
  width: 22px; height: 22px;
  margin: 0.15rem 0 0;
  accent-color: var(--lime);
}
.field--check label { font-weight: 500; }
.field--check label a { color: var(--lime); }
.field--check .field__error { grid-column: 2; }

.policy {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
}
.policy summary {
  padding: 0.9rem 1rem;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 600;
}
.policy summary span { margin-left: 0.5rem; color: var(--text-dim); font-weight: 500; }
.policy__body {
  display: grid;
  gap: 0.75rem;
  max-height: 220px;
  overflow-y: auto;
  padding: 0 1rem 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.8;
}
.policy__body a { color: var(--lime); }

.cf-turnstile { min-height: 65px; }

.form__submit { justify-self: start; }
@media (max-width: 600px) {
  .form__submit { justify-self: stretch; }
}

.form__alert {
  padding: 0.9rem 1rem;
  border: 1px solid rgb(255 107 107 / 0.5);
  border-radius: 12px;
  background: rgb(255 107 107 / 0.08);
  color: #ffc9c9;
}

/* Confirmation dialog */
.confirm {
  width: min(640px, calc(100vw - 2rem));
  max-height: calc(100dvh - 2rem);
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--bg-raised);
  color: var(--text);
  box-shadow: 0 40px 100px rgb(0 0 0 / 0.6);
}
.confirm::backdrop { background: rgb(0 0 0 / 0.65); backdrop-filter: blur(4px); }
@media (prefers-reduced-motion: no-preference) {
  .confirm[open] { animation: pop 0.3s var(--ease); }
}
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(0.98); } }
.confirm__inner { padding: clamp(1.5rem, 4vw, 2.5rem); }
.confirm h2 { font-size: var(--step-2); }
.confirm__list { display: grid; margin: 1.5rem 0 0; border-top: 1px solid var(--line); }
.confirm__list > div { display: grid; gap: 0.2rem 1.5rem; padding: 0.85rem 0; border-bottom: 1px solid var(--line); }
@media (min-width: 560px) { .confirm__list > div { grid-template-columns: 110px 1fr; } }
.confirm__list dt { color: var(--text-dim); font-size: var(--step--1); font-weight: 600; }
.confirm__list dd { margin: 0; overflow-wrap: anywhere; }
.confirm__message { white-space: pre-wrap; max-height: 30vh; overflow-y: auto; }
.confirm__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.75rem; margin-top: 1.75rem; }
