/* ============================================================
   Contact page. Built on home.css (tokens, nav, .h1, .lede, .btn)
   and subpages.css, in the same family as android.css.
   Desktop: heading + facts on the left, the form on the right.
   Phone: heading, form, then the facts.
   ============================================================ */

.ct-hero { padding-top: 150px; padding-bottom: var(--sect); position: relative; }
.ct-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  grid-template-areas: "head form" "facts form";
  grid-template-rows: auto 1fr;
  column-gap: clamp(36px, 6vw, 96px);
  row-gap: 40px;
  align-items: start;
}
.ct-head { grid-area: head; display: flex; flex-direction: column; align-items: flex-start; gap: 24px; min-width: 0; }
.ct-head .h1 { font-size: clamp(2.6rem, 5vw, 4.4rem); max-width: 11ch; }
.ct-head .lede { max-width: 28em; }
/* No spaces to wrap at in Japanese and Chinese: let the title use the column. */
.ct-head .h1:lang(ja), .ct-head .h1:lang(zh) { max-width: none; }

/* ---------- The three facts: email, response time, help ---------- */
.ct-facts { grid-area: facts; margin: 0; display: grid; min-width: 0; }
.ct-facts > div {
  display: grid; grid-template-columns: minmax(7.5em, 0.42fr) 1fr; gap: 16px;
  align-items: baseline; padding: 17px 0; border-top: 1px solid var(--hair);
}
.ct-facts > div:last-child { border-bottom: 1px solid var(--hair); }
.ct-facts dt {
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--tx-3);
}
.ct-facts dd { margin: 0; color: var(--tx-2); font-size: 0.98rem; line-height: 1.5; min-width: 0; }
.ct-facts a { color: var(--tx); text-decoration: underline; text-decoration-color: var(--hair-2); text-underline-offset: 3px; }
.ct-facts a:hover { color: var(--accent); }
.ct-facts .ct-mail { font-size: 1.12rem; font-weight: 600; letter-spacing: -0.01em; text-decoration: none; overflow-wrap: anywhere; }

/* ---------- Form ---------- */
.ct-card {
  grid-area: form; min-width: 0;
  display: flex; flex-direction: column; gap: 18px;
  padding: clamp(22px, 3.2vw, 36px);
  border: 1px solid var(--hair); border-radius: var(--r-lg);
  background: var(--surface);
  scroll-margin-top: 110px;
}
.ct-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 14px; }
.ct-field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ct-field > span { font-size: 0.86rem; font-weight: 600; color: var(--tx-2); }
.ct-field input,
.ct-field textarea {
  width: 100%; padding: 14px 16px;
  border: 1px solid var(--hair-2); border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.025);
  color: var(--tx); font: 500 1rem/1.45 var(--sans); letter-spacing: -0.01em;
  outline: none; -webkit-appearance: none; appearance: none;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.ct-field textarea { min-height: 170px; resize: vertical; }
.ct-field input::placeholder,
.ct-field textarea::placeholder { color: var(--tx-3); }
.ct-field input:focus,
.ct-field textarea:focus { border-color: var(--accent-line); box-shadow: 0 0 0 4px var(--accent-dim); background: rgba(255, 255, 255, 0.04); }

.ct-consent { display: flex; align-items: flex-start; gap: 11px; cursor: pointer; }
.ct-consent input {
  appearance: none; -webkit-appearance: none; flex: none;
  width: 18px; height: 18px; margin: 2px 0 0; border-radius: 5px;
  border: 1.5px solid var(--hair-2); background: transparent; cursor: pointer;
  display: grid; place-content: center; transition: background .15s ease, border-color .15s ease;
}
.ct-consent input::after {
  content: ""; width: 9px; height: 5px; margin-top: -2px;
  border: 2px solid var(--accent-ink); border-top: 0; border-right: 0;
  transform: rotate(-45deg) scale(0); transition: transform .15s ease;
}
.ct-consent input:checked { background: var(--accent); border-color: var(--accent); }
.ct-consent input:checked::after { transform: rotate(-45deg) scale(1); }
.ct-consent input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ct-consent span { font-size: 0.9rem; line-height: 1.5; color: var(--tx-3); }
.ct-consent a { color: var(--tx-2); text-decoration: underline; text-decoration-color: var(--hair-2); text-underline-offset: 3px; }
.ct-consent a:hover { color: var(--accent); }

.ct-card .cf-turnstile:empty { display: none; }

.ct-actions { display: flex; align-items: center; gap: 12px 18px; flex-wrap: wrap; margin-top: 4px; }
.ct-actions .btn { height: 52px; padding: 0 28px; }
.ct-actions .btn[disabled] { opacity: .55; cursor: progress; transform: none; }
.ct-msg { flex: 1 1 14em; font-size: 0.95rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1.45; }
.ct-msg:empty { display: none; }
.ct-msg.ok { color: var(--accent); }
.ct-msg.err { color: #fa6152; }
.ct-msg.hint { color: var(--tx-2); }

/* Sent: the form gives way to the confirmation. */
.ct-card.sent { background: var(--accent-dim); border-color: var(--accent-line); }
.ct-card.sent > :not(.ct-actions),
.ct-card.sent .btn { display: none; }
.ct-card.sent .ct-actions { margin: 0; }
.ct-card.sent .ct-msg { font-size: 1.2rem; line-height: 1.4; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .ct-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "form" "facts"; grid-template-rows: none; row-gap: 32px; }
  .ct-head .h1 { max-width: 14ch; }
}
@media (max-width: 560px) {
  .ct-hero { padding-top: 120px; }
  .ct-pair { grid-template-columns: minmax(0, 1fr); }
  .ct-card { padding: 20px 18px; border-radius: var(--r-md); }
  .ct-actions .btn { width: 100%; justify-content: center; }
  .ct-facts > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
}
