/* Contact, quote and thank-you pages: the shared form language (form card,
   large rounded inputs, errors), the contact-method cards and the thank-you card.
   Loaded by contact.html, contact_thanks.html, quote.html and consultation.html after theme.css.
   quote.css adds what only the quote page needs. */

/* ---------- Page head: the call and WhatsApp cards sit on the light wash ---------- */
.page-head .talk-now { margin-top: 32px; gap: 16px; }
.page-head .talk-now-dark .talk-card { padding: 16px 20px; border-color: var(--line); border-radius: var(--card-radius); background: #fff; color: var(--ink); box-shadow: var(--card-shadow); }
.page-head .talk-now-dark .talk-card:hover { border-color: var(--blue-300); background: #fff; box-shadow: var(--card-shadow-hover); }
.page-head .talk-now-dark .talk-label { color: var(--green-700); }
.page-head .talk-now-dark .talk-text strong { color: var(--ink); }
.page-head .talk-now-dark .talk-note { color: var(--muted); }
/* The dark head used a pale green focus ring; on white it needs the blue one. */
.page-head-dark :focus-visible { outline-color: var(--blue-500); }

/* ---------- Two columns: form card and the ways to reach us ---------- */
.contact-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: clamp(24px, 4vw, 56px); }
@media (max-width: 960px) { .contact-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; } }

/* ---------- Form card ---------- */
.form-card { position: relative; overflow: hidden; padding: clamp(24px, 3.4vw, 40px); border-radius: var(--card-radius); box-shadow: var(--card-shadow); }
.form-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--grad); }
.form-card-head { margin-bottom: 24px; }
.form-card-head h2 { margin: 0 0 8px; font-size: clamp(1.5rem, 1.25rem + 1vw, 1.9rem); letter-spacing: -.02em; }
.form-card-head p { margin: 0; color: var(--muted); }
.form-card .notice { border-radius: 16px; padding: 16px; }
.form-card .notice .errorlist { margin: 0; }

/* ---------- Fields: clear label, large rounded control, visible focus ---------- */
.form-card .form-grid { gap: 24px 16px; }
.form-card .field { min-width: 0; }
.form-card .field label { margin-bottom: 8px; font-size: .94rem; }
.form-card input[type="text"], .form-card input[type="email"], .form-card input[type="tel"], .form-card input[type="date"], .form-card input[type="time"], .form-card select, .form-card textarea {
  min-height: 56px; padding: 14px 16px; border: 1px solid #7f8ea3; border-radius: 16px; background-color: var(--surface);
  outline: 2px solid transparent; outline-offset: 2px; /* shows as a real outline in forced-colours mode */
  transition: border-color .15s, box-shadow .15s, background-color .15s; }
.form-card select { padding-right: 44px; background-position: right 16px center; text-overflow: ellipsis; }
.form-card textarea { min-height: 168px; }
.form-card input:hover, .form-card select:hover, .form-card textarea:hover { border-color: var(--blue-500); }
.form-card input:focus, .form-card select:focus, .form-card textarea:focus { border-color: var(--blue-600); background-color: #fff; box-shadow: 0 0 0 4px rgba(22, 119, 204, .28); }
.form-card .help { margin: 8px 0 0; font-size: .86rem; }
.form-card .help:empty { display: none; }

/* Errors: red edge on the control and the message straight under it. */
.form-card .field.has-error input, .form-card .field.has-error select, .form-card .field.has-error textarea { border-color: var(--red-700); background-color: #fff8f8; }
.form-card .field.has-error input:focus, .form-card .field.has-error select:focus, .form-card .field.has-error textarea:focus { box-shadow: 0 0 0 4px rgba(229, 72, 77, .25); }
.form-card .field .errorlist { margin: 8px 0 0; display: grid; gap: 4px; }
.form-card .field .errorlist li { display: grid; grid-template-columns: 18px 1fr; gap: 8px; align-items: start; line-height: 1.4; }
.form-card .field .errorlist li::before { content: "!"; display: grid; place-items: center; width: 18px; height: 18px; margin-top: 1px; border-radius: 50%; background: var(--red-700); color: #fff; font-size: .74rem; font-weight: 700; line-height: 1; }

/* Consent: a soft panel so the checkbox is easy to find and to tap. */
.form-card .field .check { display: grid; gap: 12px; align-items: start; margin: 0; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); grid-template-columns: 24px 1fr; font-weight: 600; color: var(--text); line-height: 1.5; cursor: pointer; }
.form-card .check input { width: 22px; height: 22px; margin-top: 1px; cursor: pointer; }
.form-card .field.has-error .check { border-color: var(--red-700); background: #fff8f8; }

.form-card .form-actions { margin-top: 32px; gap: 16px 24px; }
.form-card .form-actions .btn { min-height: 52px; padding-inline: 28px; }
@media (max-width: 560px) { .form-card .form-actions .btn { width: 100%; justify-content: center; } }

/* ---------- Ways to reach us: one card per method ---------- */
.contact-aside { gap: 16px; }
.reach-title { margin: 0; font-size: 1.3rem; letter-spacing: -.015em; }
.reach-lead { margin: -8px 0 8px; color: var(--muted); font-size: .96rem; }
.channel { grid-template-columns: 48px minmax(0, 1fr); gap: 16px; padding: 20px; border-radius: var(--card-radius); box-shadow: var(--card-shadow); transition: box-shadow .2s var(--ease), border-color .2s; }
.channel:hover { border-color: var(--blue-200); box-shadow: var(--card-shadow-hover); }
.channel .card-icon { width: 48px; height: 48px; border-radius: 14px; }
.channel h3 { margin: 0 0 2px; font-size: 1rem; line-height: 1.4; }
.channel a { text-underline-offset: 3px; }
.channel p { margin-top: 4px; line-height: 1.5; }
.channel p a { font-weight: 600; }
.map-facade { border-radius: var(--card-radius); box-shadow: var(--card-shadow); min-height: 320px; }
.map-facade .map-actions { left: 12px; right: 12px; bottom: 12px; padding: 12px 16px; border-radius: 14px; gap: 12px; }
@media (min-width: 641px) and (max-width: 960px) {
  .contact-aside { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact-aside > :not(.channel) { grid-column: 1 / -1; }
  .map-facade { aspect-ratio: 16 / 9; }
}
@media (prefers-reduced-motion: reduce) { .channel, .form-card input, .form-card select, .form-card textarea { transition: none; } }

/* ---------- Thank-you page ---------- */
.thanks { background: var(--wash), #fff; }
.thanks-card { padding: clamp(32px, 6vw, 64px) clamp(24px, 5vw, 56px); border: 1px solid var(--line); border-radius: var(--card-radius); background: #fff; box-shadow: var(--card-shadow); }
.thanks-card h1 { margin-bottom: 16px; font-size: clamp(1.8rem, 1.3rem + 2vw, 2.6rem); letter-spacing: -.025em; }
.thanks-card .lead { margin-inline: auto; }
.thanks-ref { display: inline-block; padding: 2px 12px; border-radius: 10px; background: var(--blue-50); font-family: var(--mono); font-size: .95em; letter-spacing: .04em; white-space: nowrap; }
.thanks-card .hero-actions { margin-top: 32px; }
.thanks-card .thanks-help { margin: 32px 0 0; padding-top: 24px; border-top: 1px solid var(--line); }


/* ---------- One page, two tabs: Send a message / Request a quote ----------
   Both pages share this layout. The tabs are links between the two addresses
   and land on the form, so switching feels like changing a tab. */
#talk { scroll-margin-top: 96px; }
.talk-main { min-width: 0; }
.talk-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0 0 20px; }
.talk-tab { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 0 20px; border: 1px solid var(--card-line, #dbe6f4); border-radius: 16px; background: #fff; color: var(--ink); font-weight: 700; text-decoration: none; box-shadow: var(--card-shadow); transition: background-color .2s, color .2s, border-color .2s, box-shadow .2s; }
.talk-tab .icon { flex: none; width: 18px; height: 18px; }
.talk-tab span { min-width: 0; line-height: 1.25; text-align: center; text-wrap: balance; }
.talk-tab:hover { border-color: var(--blue-300); color: var(--blue-700); }
.talk-tab[aria-current="page"] { border-color: transparent; background: var(--blue-600); color: #fff; box-shadow: 0 14px 28px -16px rgba(11, 95, 174, .8); }
/* Three across down to a phone: there the icon sits above the label, which may take two lines but never breaks a word. */
@media (max-width: 720px) {
  .talk-tabs { gap: 8px; }
  .talk-tab { flex-direction: column; gap: 6px; min-height: 72px; padding: 10px 6px; font-size: .86rem; }
}
@media (max-width: 340px) { .talk-tabs { grid-template-columns: 1fr; } .talk-tab { flex-direction: row; min-height: 48px; } }
/* Book Consultation: the date and time boxes take the look of the other fields. */
.form-card input[type="date"], .form-card input[type="time"] { width: 100%; box-sizing: border-box; color: var(--ink); font: inherit; }

/* ---------- Our Offices ---------- */
.offices { margin: 0 0 28px; }
.office-card { position: relative; padding: 24px; border: 1px solid #cfe1f6; border-radius: var(--card-radius); background: linear-gradient(135deg, #f1f6fd, #e9f2fd); }
.office-card h3 { margin: 0; color: var(--ink); font-size: 1.2rem; }
.office-place { margin: 4px 0 16px; color: var(--muted); }
.office-tag { position: absolute; top: 20px; right: 20px; padding: 4px 10px; border-radius: 6px; background: #d8ebfb; color: var(--blue-700); font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.office-card ul { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.office-card li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 12px; align-items: start; color: var(--text); }
.office-card li .icon { width: 18px; height: 18px; margin-top: 3px; color: var(--blue-600); }
.office-card a { color: var(--ink); font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .talk-tab { transition: none; } }
/* The map card must never be wider than its column on a phone. */
.contact-aside { min-width: 0; }
.contact-aside .map-facade { max-width: 100%; }
.contact-aside .map-actions, .contact-aside .map-actions .cluster { flex-wrap: wrap; min-width: 0; }
.office-hours { display: grid; gap: 2px; }
/* Three tabs: keep each label on one line where the column allows it. */
@media (min-width: 561px) { .talk-tab { padding-inline: 12px; gap: 8px; font-size: .94rem; white-space: nowrap; } }
