/*
 * Chart Algo AI — contact form (/contact) only.
 *
 * Loaded from app/views/contacts/new.html.erb via `content_for :head` rather
 * than from the application.css manifest, so the ~10 KB the rest of the site
 * never needs stays off the marketing and legal pages.
 *
 * Because that <link> lands ABOVE the application.css one, every selector
 * here is either brand new or carries enough specificity (.contact-form .x)
 * to win regardless of order. It introduces no new design language: the
 * palette, radii, fonts and the .button/.kicker/.card components all come
 * from tokens.css and base.css.
 */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 48px;
  align-items: start;
}

/* -------------------------------------------------------------- the pitch */

.contact-intro h1 { margin-bottom: 16px; }

.contact-lead {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 46ch;
}

.contact-topics {
  list-style: none;
  margin: 26px 0 0;
  padding: 0;
}

.contact-topics li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 10px;
  color: var(--ink-soft);
  font-size: 0.96rem;
}

/* Gold tick-mark bullets, the same annotation accent the kicker rule uses. */
.contact-topics li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 10px;
  height: 1px;
  background: var(--accent);
}

.contact-direct {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 0.92rem;
  color: var(--muted);
}

/* --------------------------------------------------------------- the form */

.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 2px solid var(--gold-dim);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--panel-shadow);
}

.contact-form h2 {
  font-size: 1.15rem;
  margin-bottom: 22px;
}

.contact-form .field { margin-bottom: 20px; }

.contact-form label {
  display: block;
  margin-bottom: 7px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: var(--track-caps);
  text-transform: uppercase;
  color: var(--muted);
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--text);
  font: inherit;
  font-size: 0.98rem;
}

.contact-form textarea {
  min-height: 150px;
  resize: vertical;
  line-height: 1.55;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder { color: var(--muted); opacity: 1; }

.contact-form input:focus-visible,
.contact-form textarea:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
  border-color: var(--primary);
}

.contact-form .button { width: 100%; }

.contact-errors {
  margin-bottom: 22px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(239, 68, 68, 0.5);
  background: rgba(239, 68, 68, 0.1);
  color: var(--flash-bad-ink);
  font-size: 0.9rem;
}

/* Honeypot: off-canvas for sighted users, hidden from assistive tech and the
   tab order, but a plain visible text input as far as a form-filling bot is
   concerned. `display: none` would be skipped by the better ones. */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.recaptcha-note {
  margin: 18px 0 0;
  font-size: 0.76rem;
  line-height: 1.5;
  color: var(--muted);
}

/* ------------------------------------------------------------ responsive */

@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; gap: 36px; }
}

@media (max-width: 620px) {
  .contact-form { padding: 24px 20px; }
}
