/* ==========================================================================
   Contact: enquiry form + direct contact card + social links
   ========================================================================== */

.contact-grid {
  display: grid;
  gap: var(--s-8);
  text-align: left;
}

@media (min-width: 900px) {
  .contact-grid {
    grid-template-columns: 1.15fr 0.85fr;
    gap: var(--s-12);
    align-items: start;
  }
}

/* ---------- Form ---------- */
.form-card {
  border: 1px solid var(--border-2);
  border-radius: var(--r-lg);
  padding: var(--s-6);
  background: var(--surface);
}

@media (min-width: 640px) {
  .form-card { padding: var(--s-8); }
}

.form-rows { display: grid; gap: var(--s-5); }

/* Grid at every width so stacked fields keep their gap on phones; the pair
   only sits side by side once there is room for it. */
.form-split { display: grid; gap: var(--s-5); }

@media (min-width: 560px) {
  .form-split { grid-template-columns: 1fr 1fr; }
}

.field { display: flex; flex-direction: column; gap: var(--s-2); }

.field label {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.field label .opt { color: var(--muted-2); text-transform: none; letter-spacing: 0; }

.field input,
.field select,
.field textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border-2);
  border-radius: var(--r-sm);
  padding: 0.85rem var(--s-4);
  color: var(--text);
  font-size: var(--t-base); /* 16px stops iOS zooming on focus */
  font-family: var(--font-body);
  min-height: 50px;
  transition: border-color var(--d-fast) ease, background var(--d-fast) ease;
}

.field textarea {
  min-height: 128px;
  resize: vertical;
  line-height: 1.6;
}

.field input::placeholder,
.field textarea::placeholder { color: var(--muted-2); }

.field input:hover,
.field select:hover,
.field textarea:hover { border-color: var(--border-3); }

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg-2);
}

.field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: var(--s-10);
  cursor: pointer;
}

/* The dropdown list itself is painted by the OS, so set both colours
   explicitly or Windows renders light-on-light. */
.field select option {
  background: var(--bg-2);
  color: var(--text);
}

/* Native select arrows can't be themed, so the control is unstyled and the
   chevron is drawn by the wrapper instead. */
.select-wrap { position: relative; }
.select-wrap::after {
  content: '';
  position: absolute;
  right: var(--s-4);
  top: 50%;
  width: 9px;
  height: 9px;
  margin-top: -6px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(45deg);
  pointer-events: none;
}

.field.invalid input,
.field.invalid select,
.field.invalid textarea { border-color: var(--danger); }

.err {
  font-size: var(--t-xs);
  color: var(--danger);
  min-height: 1em;
}
.err:empty { display: none; }

/* honeypot: hidden from humans, catnip for bots */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-foot {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  margin-top: var(--s-6);
}

.form-foot .btn { width: 100%; justify-content: center; }

.form-note {
  font-size: var(--t-xs);
  color: var(--muted-2);
  line-height: 1.6;
}

/* status messages */
.form-status {
  display: none;
  gap: var(--s-3);
  margin-top: var(--s-5);
  padding: var(--s-4) var(--s-5);
  border-radius: var(--r-sm);
  font-size: var(--t-sm);
  line-height: 1.6;
}
.form-status.show { display: flex; }

.form-status.ok {
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  color: var(--text);
}
.form-status.bad {
  border: 1px solid oklch(70% 0.18 29 / 40%);
  background: oklch(70% 0.18 29 / 10%);
  color: var(--text-2);
}
.form-status b { display: block; margin-bottom: 2px; }
.form-status a { color: var(--accent); border-bottom: 1px solid var(--accent-line); }

.btn[aria-busy="true"] { opacity: 0.7; pointer-events: none; }

/* ---------- Direct contact card ---------- */
.reach { display: flex; flex-direction: column; gap: var(--s-5); }

.reach-card {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--s-6);
  background: var(--bg-2);
}

.reach-card h3 {
  font-size: var(--t-md);
  margin-bottom: var(--s-2);
}

.reach-card p {
  font-size: var(--t-sm);
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: var(--s-5);
}

.reach-mail {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  padding: var(--s-4);
  border: 1px solid var(--border-2);
  border-radius: var(--r-sm);
  background: var(--bg);
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  letter-spacing: -0.04em;
  color: var(--text-2);
  transition: border-color var(--d-fast) ease, color var(--d-fast) ease;
  min-height: 52px;
  width: 100%;
}
.reach-mail:hover { border-color: var(--accent-line); color: var(--accent); }
.reach-mail span:last-child { color: var(--muted-2); flex-shrink: 0; }
.reach-mail.is-copied { border-color: var(--accent); color: var(--accent); }

/* ---------- Socials ---------- */
.socials { display: grid; gap: var(--s-3); }

.social {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  padding: var(--s-4);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--bg);
  transition: border-color var(--d-fast) ease, transform var(--d-fast) var(--ease-quart), background var(--d-fast) ease;
  min-height: 62px;
}
.social:hover {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  transform: translateY(-2px);
}

.social-ic {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-2);
  border-radius: var(--r-sm);
  color: var(--text);
}
.social:hover .social-ic { border-color: var(--accent-line); color: var(--accent); }

.social-txt { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.social-txt b {
  font-size: var(--t-sm);
  font-weight: 600;
  color: var(--text);
}
.social-txt span {
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  letter-spacing: -0.04em;
  color: var(--muted-2);
}

.social-go {
  margin-left: auto;
  color: var(--muted-2);
  font-size: var(--t-sm);
  transition: transform var(--d-fast) var(--ease-quart), color var(--d-fast) ease;
  flex-shrink: 0;
}
.social:hover .social-go { transform: translateX(3px); color: var(--accent); }

/* ---------- Footer socials ---------- */
.foot-social {
  display: flex;
  gap: var(--s-2);
  margin-top: var(--s-1);
}

.foot-social a {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-2);
  border-radius: var(--r-sm);
  color: var(--muted);
  transition: color var(--d-fast) ease, border-color var(--d-fast) ease, transform var(--d-fast) var(--ease-quart);
}
.foot-social a:hover {
  color: var(--accent);
  border-color: var(--accent-line);
  transform: translateY(-2px);
}

/* ---------- Final CTA overrides when it holds a form ---------- */
.final .head-center {
  text-align: center;
  max-width: 44ch;
  margin-inline: auto;
  margin-bottom: var(--s-10);
}
.final .head-center h2 { font-size: var(--t-2xl); text-wrap: balance; }
.final .head-center p:not(.tag) {
  margin-top: var(--s-4);
  color: var(--muted);
  font-size: var(--t-md);
}
.final .head-center .tag { margin-inline: auto; }

@media (max-width: 899px) {
  .final .head-center { text-align: left; margin-inline: 0; }
  .final .head-center .tag { margin-inline: 0; }
}
