/* ==========================================================================
   Contact page. Uses only the design tokens from site.css; reuses .page-head
   and .breadcrumb from catalog.css.
   ========================================================================== */
.contact-section { padding: 32px 0 56px; }
@media (min-width: 960px) { .contact-section { padding: 48px 0 80px; } }

.contact-layout { display: grid; gap: 24px; align-items: start; }
@media (min-width: 960px) {
  .contact-layout { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 32px; }
  .contact-aside { position: sticky; top: calc(var(--header-h) + 24px); }
}

.contact-card {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 24px;
}
@media (min-width: 720px) { .contact-card { padding: 32px; } }
.contact-card-title { font-size: 1.375rem; margin: 0 0 6px; }
.contact-card-title:focus { outline: none; }
.contact-card-sub { margin: 0; color: var(--muted); font-size: .9375rem; }

/* ---------- Form ---------- */
.contact-form-card { border-top: 3px solid var(--brand-blue); }
.no-js .contact-form, .no-js .contact-success { display: none; }
.contact-noscript { margin: 0; color: var(--muted); }

.contact-form-head { margin-bottom: 24px; }
.req { color: var(--brand-red); font-weight: 600; }

.field-row { display: grid; gap: 0 20px; }
@media (min-width: 720px) { .field-row { grid-template-columns: 1fr 1fr; } }
.field { margin-bottom: 20px; }
.field-label { display: block; margin-bottom: 6px; font-weight: 500; font-size: .9375rem; color: var(--navy); }
.field-optional { font-weight: 400; color: var(--muted); }

.field-input {
  display: block; width: 100%; min-height: var(--tap); padding: 10px 14px;
  background: var(--bg); color: var(--text); font: inherit; line-height: 1.5;
  border: 1px solid rgba(15, 23, 42, .45); /* navy at 45%: 3:1 against white for the field edge */ border-radius: var(--radius-sm);
  transition: border-color var(--ease), box-shadow var(--ease), background-color var(--ease);
}
.field-input:hover { border-color: var(--muted); }
.field-input:focus { outline: none; border-color: var(--brand-blue); box-shadow: var(--focus-ring); }
.field-input[aria-invalid="true"] { border-color: var(--brand-red); background: rgba(228, 20, 36, .04); }
.field-input[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px rgba(228, 20, 36, .25); }
.field-textarea { min-height: 160px; resize: vertical; }

.field-meta { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-top: 6px; }
.field-error {
  display: flex; align-items: flex-start; gap: 6px; margin: 6px 0 0;
  color: var(--brand-red); font-size: .875rem; line-height: 1.4;
}
.field-error[hidden] { display: none; }
.field-meta .field-error { margin-top: 0; }
.field-error::before { content: "!"; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; margin-top: 1px; border-radius: 50%; background: var(--brand-red); color: #fff; font-size: .6875rem; font-weight: 700; }
.field-count { margin: 0 0 0 auto; color: var(--muted); font-size: .8125rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.field-count.is-near { color: var(--navy); font-weight: 500; }

.contact-submit { width: 100%; margin-top: 4px; }
@media (min-width: 560px) { .contact-submit { width: auto; min-width: 200px; } }
.btn-arrow { stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; transition: transform var(--ease); }
.contact-submit:hover .btn-arrow { transform: translateX(3px); }
.btn-spinner {
  display: none; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff;
  animation: contact-spin .7s linear infinite;
}
.contact-submit.is-loading { cursor: progress; opacity: .9; }
.contact-submit.is-loading .btn-spinner { display: inline-block; }
.contact-submit.is-loading .btn-arrow { display: none; }
@keyframes contact-spin { to { transform: rotate(360deg); } }

/* ---------- Success state ---------- */
.contact-success { text-align: center; padding: 24px 0 8px; animation: contact-in .35s ease both; }
.success-icon {
  display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; margin-bottom: 16px;
  border-radius: 50%; background: var(--brand-blue-tint); color: var(--brand-blue);
}
.success-icon svg { stroke: currentColor; stroke-width: 2.5; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.contact-success-text { margin: 4px auto 24px; max-width: 42ch; color: var(--muted); }
@keyframes contact-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Details and browse cards ---------- */
.contact-aside { display: grid; gap: 24px; }
.info-list { list-style: none; margin: 16px 0 0; padding: 0; }
.info-item { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-top: 1px solid var(--border); }
.info-item:first-child { border-top: 0; padding-top: 4px; }
.info-icon {
  flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  border-radius: 50%; background: var(--brand-blue-tint); color: var(--brand-blue);
}
.info-icon svg { stroke: currentColor; stroke-width: 1.75; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.info-body { display: flex; flex-direction: column; min-width: 0; }
.info-label { font-size: .75rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.info-value { color: var(--navy); font-weight: 500; overflow-wrap: anywhere; line-height: 1.45; }
.info-text { padding-top: 4px; }

.contact-browse { background: var(--surface); box-shadow: none; }
.contact-browse-title { font-size: 1.125rem; margin: 0 0 4px; }
.contact-browse .btn { margin-top: 16px; }

@media (prefers-reduced-motion: reduce) {
  .contact-success { animation: none; }
  .btn-spinner { animation-duration: 1.6s; }
  .contact-submit:hover .btn-arrow { transform: none; }
}
