/* Contact (/contact/), ported from the site concept v3 (parts/pages/contact.css). One H1 head, the direct channels as
   three card-links (WhatsApp first), then the quote form on a white panel beside "What happens next". Task page: no
   reveals on the form, the channels or the steps. Prefix ct-.
   Port notes: the form posts for real (template-parts/quote-form.php); the success panel comes back from the server
   with "Send another request" as a link; a server error that is not about one field shows as one alert (.ct-err). */
.page-contact [hidden] { display: none !important; }

/* ---------- Direct channels: whole card is the link ---------- */
.ct-channels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: clamp(32px, 4vw, 44px); }
.ct-ch { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 16px; align-items: center; min-height: 92px; padding: 18px 22px 18px 18px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); touch-action: manipulation; transition: transform var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease), border-color var(--t-med) var(--ease); }
.ct-ch:hover { transform: translateY(-4px); box-shadow: var(--shadow-card-hover); border-color: transparent; }
.ct-ch:active { transform: translateY(-1px); }
.ct-ch:focus-visible { border-radius: var(--radius-lg); }
.ct-ch-ico { width: 52px; height: 52px; border-radius: var(--radius); display: grid; place-items: center; background: var(--tint); color: var(--brand); transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.ct-ch-ico svg { width: 22px; height: 22px; }
.ct-ch-ico.wa { color: #1E9E57; } /* the WhatsApp green base.css already gives the glyph on light buttons */
.ct-ch:hover .ct-ch-ico { background: var(--brand); color: #FFFFFF; }
.ct-ch-k { display: flex; align-items: center; gap: 8px; font: 600 19px/1.2 var(--font-display); letter-spacing: -0.005em; color: var(--brand); }
.ct-ch-k .arr { font: 500 16px/1 var(--font-sub); color: var(--accent-ink); }
.ct-ch-v { display: block; margin-top: 6px; font-size: 15.5px; line-height: 1.4; color: var(--muted); overflow-wrap: anywhere; transition: color var(--t-fast) var(--ease); }
.ct-ch:hover .ct-ch-v { color: var(--ink); }

/* ---------- Form and next steps ---------- */
.ct-main { padding-block: clamp(40px, 5vw, 72px) clamp(72px, 8vw, 112px); }
.ct-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 32px clamp(32px, 5vw, 80px); align-items: start; }
.ct-panel { padding: clamp(24px, 3.4vw, 48px); border-radius: 24px; background: var(--surface); box-shadow: var(--shadow-card); }
.ct-panel h2, .ct-next h2 { font-size: clamp(1.6rem, 2.2vw, 2rem); letter-spacing: -0.015em; line-height: 1.1; }
.ct-form { margin-top: 28px; }

/* Crew list note (from /contact/?list=1) */
.ct-listnote { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; margin-top: 22px; padding: 4px 8px 4px 16px; border-radius: var(--radius); background: var(--tint); font-size: 15px; color: var(--ink); }
.ct-listnote svg { flex: none; width: 20px; height: 20px; color: var(--accent-ink); }
.ct-listnote b { font-weight: 600; }
.ct-listnote a { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding-inline: 8px; font: 500 14.5px/1 var(--font-sub); color: var(--brand); }
.ct-listnote a .arr { color: var(--accent-ink); }
.ct-listnote + .ct-form { margin-top: 24px; }

/* Controls: a check for good fields, a chevron for the select, an icon on errors (never colour alone) */
.ct-control { position: relative; display: block; }
.ct-control .input { padding-right: 46px; }
.ct-control > svg { position: absolute; right: 15px; top: 50%; width: 20px; height: 20px; margin-top: -10px; color: #1E7F4F; opacity: 0; transform: scale(0.8); transition: opacity var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); pointer-events: none; }
.ct-form .field.is-good .ct-control > svg { opacity: 1; transform: none; }
.ct-form .input, .ct-form .textarea { caret-color: var(--brand); }
.ct-select .select { -webkit-appearance: none; appearance: none; padding-right: 48px; cursor: pointer; }
.ct-select::after { content: ""; position: absolute; right: 20px; top: 50%; width: 8px; height: 8px; margin-top: -6px; border-right: 2px solid var(--brand); border-bottom: 2px solid var(--brand); transform: rotate(45deg); pointer-events: none; }
.ct-form .field.is-bad .field-error { display: flex; align-items: center; gap: 8px; }
.ct-form .field-error::before { content: "!"; flex: none; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: #B42318; color: #FFFFFF; font: 600 12px/1 var(--font-sub); }

/* A server answer that is not about one field (expired form, too many requests, a fault on our side): one alert above
   the fields, the same red and "!" mark as the field errors */
.ct-err { display: flex; align-items: flex-start; gap: 10px; margin-top: 22px; background: #FEF3F2; color: #B42318; border: 1px solid #F6CFCB; line-height: 1.45; }
.ct-err::before { content: "!"; flex: none; display: grid; place-items: center; width: 18px; height: 18px; margin-top: 1px; border-radius: 50%; background: #B42318; color: #FFFFFF; font: 600 12px/1 var(--font-sub); }
.ct-err:focus { outline: none; }
.ct-err:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.ct-err + .ct-form { margin-top: 22px; }

/* Submit: one main action, an in-button spinner while pending */
.ct-actions { margin-top: 28px; }
.ct-submit { touch-action: manipulation; }
.ct-submit:hover .arr { transform: translateX(4px); }
.ct-submit:active { transform: translateY(0); }
.ct-submit:focus-visible { border-radius: 999px; }
.ct-submit[disabled] { cursor: progress; transform: none; box-shadow: none; background: var(--accent); }
.ct-spin { display: none; width: 16px; height: 16px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--brand-deep) 25%, transparent); border-top-color: var(--brand-deep); }
.ct-submit.is-pending .ct-spin { display: inline-block; animation: ct-spin var(--t-slow) linear infinite; }
.ct-submit.is-pending .arr { display: none; }
@keyframes ct-spin { to { transform: rotate(360deg); } }

/* Success: the server answers ?sent=1 and the panel replaces the form */
.ct-done:focus { outline: none; }
.motion .ct-done { animation: ct-in var(--t-med) var(--ease); }
@keyframes ct-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.ct-alert { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 18px; align-items: start; padding: clamp(20px, 3vw, 30px); border-radius: var(--radius-lg); }
.ct-alert-ico { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: #1E7F4F; color: #FFFFFF; }
.ct-alert-ico svg { width: 22px; height: 22px; }
.ct-alert-title { padding-top: 6px; font: 600 20px/1.3 var(--font-display); letter-spacing: -0.005em; color: #145A38; }
.ct-again { display: inline-flex; align-items: center; margin-top: 10px; min-height: 44px; font: 500 15px/1 var(--font-sub); color: var(--brand); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--brand) 30%, transparent); text-underline-offset: 4px; touch-action: manipulation; transition: text-decoration-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.ct-again:hover { color: var(--ink); text-decoration-color: var(--accent); }

/* What happens next: three honest steps, the first is where the visitor is now */
.ct-next { position: sticky; top: calc(104px + var(--wp-bar)); padding-top: clamp(8px, 3.4vw, 48px); }
.ct-steps { margin-top: 28px; }
.ct-steps li { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 18px; padding-bottom: 28px; }
.ct-steps li:last-child { padding-bottom: 0; }
.ct-steps li:not(:last-child)::before { content: ""; position: absolute; left: 19px; top: 40px; bottom: 0; width: 2px; background: color-mix(in srgb, var(--muted) 28%, transparent); }
.ct-step-n { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); box-shadow: 0 0 0 1px var(--line); font: 600 16px/1 var(--font-display); color: var(--brand); }
.ct-steps li:first-child .ct-step-n { background: var(--accent); color: var(--brand-deep); box-shadow: none; }
.ct-steps p { padding-top: 8px; font-size: 17px; line-height: 1.5; color: var(--ink); }
.ct-meta { margin-top: 32px; padding-top: 24px; border-top: 1px solid color-mix(in srgb, var(--muted) 20%, transparent); }
.ct-hours, .ct-where { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 12px; align-items: start; }
.ct-hours svg, .ct-where svg { width: 20px; height: 20px; margin-top: 2px; }
.ct-hours { font-size: 15.5px; line-height: 1.5; color: var(--ink); }
.ct-hours svg { color: var(--accent-ink); }
.ct-where { margin-top: 14px; font-size: 14px; line-height: 1.55; color: var(--muted); }

/* ---------- Contact responsive ---------- */
@media (max-width: 1099px) {
  .ct-channels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ct-channels li:first-child { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .ct-grid { grid-template-columns: 1fr; }
  .ct-next { position: static; padding-top: 8px; }
}
@media (max-width: 640px) {
  .ct-channels { grid-template-columns: 1fr; gap: 12px; }
  .ct-ch { min-height: 80px; padding: 14px 16px 14px 14px; gap: 14px; grid-template-columns: 48px minmax(0, 1fr); }
  .ct-ch-ico { width: 48px; height: 48px; }
  .ct-ch-k { font-size: 18px; }
  .ct-panel { border-radius: var(--radius-lg); }
  .ct-submit { width: 100%; }
  .ct-alert { grid-template-columns: 1fr; gap: 12px; }
}
