/**
 * Public contact center — cross-deck.com/contact/.
 *
 * Inherits the site's design system from ../styles.css for tokens
 * (colours, fonts, radius); adds only the layout this page needs:
 * a calm hero, a self-serve deflection row, topic cards that route
 * into the form, and the form itself as the centerpiece.
 *
 * Same dialect as legal/legal.css — light-cream canvas, quiet
 * borders, the accent reserved for interaction, nothing shouting.
 */

/* Page-level. .contact-body opts the page into the legal-page
   off-white canvas rather than the marketing-page cream. */
.contact-body {
  background: var(--ds-canvas);
  color: var(--ds-text);
  font-family: var(--ds-sans);
}

.contact-main {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 24px 80px 24px;
}

/* ----- Hero (matches legal-hero pattern) */
.contact-hero {
  padding: 80px 0 40px 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.contact-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--ds-muted);
}

.contact-eyebrow-pill {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--ds-accent-soft, #ffe9df);
  color: var(--ds-accent-strong, #c2421a);
}

.contact-hero h1 {
  font-size: 40px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0;
  color: var(--ds-text);
}

.contact-lead {
  font-size: 16px;
  line-height: 1.6;
  color: var(--ds-text-soft, #2c2825);
  max-width: 640px;
  margin: 0;
}

/* ----- Self-serve row: honest deflection before the form */
.contact-selfserve {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.selfserve-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px;
  background: var(--ds-surface);
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius);
  box-shadow: var(--ds-shadow-sm);
  text-decoration: none;
  color: var(--ds-text);
  transition: border-color 0.15s ease;
}

.selfserve-card:hover {
  border-color: var(--ds-accent-strong, #c2421a);
}

.selfserve-card h2 {
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  margin: 0;
  color: var(--ds-text);
}

.selfserve-card p {
  font-size: 12.5px;
  line-height: 1.55;
  margin: 0;
  color: var(--ds-muted);
  flex: 1;
}

.selfserve-cue {
  font-size: 12px;
  font-weight: 500;
  color: var(--ds-accent-strong, #c2421a);
}

/* ----- Signed-in banner: one quiet card */
.contact-signedin {
  margin-top: 14px;
  padding: 14px 18px;
  background: var(--ds-surface-soft, #fafaf6);
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius);
}

.contact-signedin p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ds-text-soft, #2c2825);
}

.contact-signedin strong {
  font-weight: 600;
  color: var(--ds-text);
}

.contact-signedin a {
  color: var(--ds-accent-strong, #c2421a);
  text-decoration: none;
  border-bottom: 1px solid rgba(238, 79, 37, 0.3);
}

.contact-signedin a:hover {
  border-bottom-color: var(--ds-accent-strong, #c2421a);
}

/* ----- Topic cards: each routes into the form below */
.contact-topics {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.topic-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 22px;
  background: var(--ds-surface);
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius);
  box-shadow: var(--ds-shadow-sm);
  text-decoration: none;
  color: var(--ds-text);
  transition: border-color 0.15s ease;
}

.topic-card:hover {
  border-color: var(--ds-accent-strong, #c2421a);
}

.topic-card h2 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.005em;
  margin: 0;
  color: var(--ds-text);
}

.topic-card p {
  font-size: 13px;
  line-height: 1.6;
  margin: 0;
  color: var(--ds-text-soft, #2c2825);
  flex: 1;
}

.topic-address {
  font-family: var(--ds-mono);
  font-size: 12.5px;
  color: var(--ds-accent-strong, #c2421a);
}

/* ----- The form: the centerpiece */
.contact-form-section {
  margin-top: 40px;
}

.contact-form-card {
  background: var(--ds-surface);
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-lg, 14px);
  box-shadow: var(--ds-shadow-md);
  padding: 32px 36px 36px 36px;
  scroll-margin-top: 24px;
}

.contact-form-card h2 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 6px 0;
  color: var(--ds-text);
}

.contact-form-sub {
  font-size: 13.5px;
  line-height: 1.6;
  margin: 0 0 24px 0;
  color: var(--ds-muted);
}

.contact-form-card form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ds-text);
}

.label-optional {
  font-weight: 400;
  font-size: 12px;
  color: var(--ds-muted-soft, #948a7e);
}

.form-field input,
.form-field select,
.form-field textarea {
  font-family: var(--ds-sans);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ds-text);
  background: var(--ds-surface);
  border: 1px solid var(--ds-border-strong, rgba(23, 19, 17, 0.16));
  border-radius: var(--ds-radius-sm, 6px);
  padding: 9px 12px;
  width: 100%;
  box-sizing: border-box;
}

.form-field textarea {
  resize: vertical;
  min-height: 140px;
}

.form-field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%236b6259' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--ds-accent-strong, #ee4f25);
  box-shadow: 0 0 0 3px var(--ds-accent-soft, rgba(255, 110, 69, 0.1));
}

.form-field input.is-invalid,
.form-field textarea.is-invalid {
  border-color: var(--ds-danger, #b3382a);
}

/* Quiet inline validation — present only when it has something to say. */
.field-error {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ds-danger, #b3382a);
}

.field-error:empty {
  display: none;
}

/* Honeypot — invisible to humans, irresistible to bots. */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.form-submit {
  font-family: var(--ds-sans);
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: var(--ds-accent-strong, #ee4f25);
  border: 0;
  border-radius: var(--ds-radius-sm, 6px);
  padding: 10px 22px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.form-submit:hover {
  background: var(--ds-accent, #ff6e45);
}

.form-submit:disabled {
  opacity: 0.6;
  cursor: default;
}

.form-status {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ds-muted);
  flex: 1;
  min-width: 200px;
}

.form-status.is-error {
  color: var(--ds-danger, #b3382a);
}

/* ----- Success panel (replaces the form) */
.form-success {
  outline: none;
}

.form-success h3 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.005em;
  margin: 0 0 8px 0;
  color: var(--ds-text);
}

.form-success p {
  font-size: 14px;
  line-height: 1.65;
  margin: 0 0 6px 0;
  color: var(--ds-text-soft, #2c2825);
}

.form-success-note {
  color: var(--ds-muted);
  font-size: 13px;
}

/* ----- Specialist line + footer */
.contact-specialist {
  margin: 36px 0 0 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ds-muted);
}

.contact-specialist a {
  color: var(--ds-muted);
  text-decoration: none;
  border-bottom: 1px solid var(--ds-divider);
}

.contact-specialist a:hover {
  color: var(--ds-text);
  border-bottom-color: var(--ds-muted);
}

.contact-specialist span {
  color: var(--ds-muted-soft);
  margin: 0 4px;
}

.contact-footer {
  margin-top: 48px;
  padding-top: 22px;
  border-top: 1px solid var(--ds-divider);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: var(--ds-muted);
}

.contact-footer a {
  color: var(--ds-muted);
  text-decoration: none;
}

.contact-footer a:hover {
  color: var(--ds-text);
  text-decoration: underline;
}

.contact-footer span {
  color: var(--ds-muted-soft);
}

/* ----- Responsive */
@media (max-width: 720px) {
  .contact-hero {
    padding: 50px 0 28px 0;
  }
  .contact-hero h1 {
    font-size: 32px;
  }
  .contact-selfserve {
    grid-template-columns: 1fr;
  }
  .contact-topics {
    grid-template-columns: 1fr;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .contact-form-card {
    padding: 24px 20px 28px 20px;
  }
}
