/**
 * Section: Contact
 * Ported from .docs/mockup/css/contact.css, everything above the
 * "Custom / CatWorks nudge" comment (line 232 in the mockup) — that block
 * (`.contact-cta` and friends) is a different, already-reserved section
 * (`cta-split`) and is not owned by this file.
 *
 * One deliberate rename: the mockup's `.contact-form-card h2` rule
 * (contact.css line 144) now targets `.contact-form-card h3`. The markup in
 * contact.php demotes that heading from <h2> to <h3> so the section carries
 * only one <h2> (the accessibility contract's "one <h2> per section, card
 * titles are <h3>" rule) — this rule already sized that heading at
 * --text-h3, so the rename changes nothing visually, only the selector.
 *
 * One addition: `.field-required`, a small accessibility affordance (a
 * visible marker on required form fields) the mockup's inert prototype form
 * never needed to show. It uses the existing --terracotta token and adds no
 * new spacing value — the gap before the asterisk comes from a literal space
 * in the label markup, not a margin.
 */

.contact {
  padding-block: var(--section-space-m);
  padding-inline: var(--space-gutter);
}

.contact-grid {
  max-width: var(--container);
  margin-inline: auto;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: var(--space-2xl);
  align-items: start;
}

/* --- Ways to reach us --- */
.contact-methods {
  display: flex;
  flex-direction: column;
  gap: var(--space-s);
  align-items: flex-start;
}

.contact-methods h2 {
  font-size: var(--text-h2);
  font-weight: 800;
  line-height: 1.05;
}

.contact-methods > p {
  color: var(--graphite);
  line-height: 1.6;
  max-width: 44ch;
}

.method {
  display: flex;
  align-items: center;
  gap: var(--space-s);
  width: 100%;
  padding: var(--space-s);
  background: var(--off-white);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast),
              transform var(--duration-fast) var(--ease-out);
}

a.method:hover {
  border-color: var(--terracotta);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.method-ic {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: var(--radius-sm);
  background: var(--coastal-soft);
  display: grid;
  place-items: center;
  color: var(--deep-ocean);
}

.method-ic .material-symbols-outlined {
  font-size: 24px;
}

.method > span:not(.method-ic) {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.m-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--graphite);
}

.m-value {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--text-h4);
  color: var(--deep-ocean);
}

.m-sub {
  font-size: var(--text-small);
  color: var(--graphite);
  line-height: 1.4;
}

.hours {
  width: 100%;
  margin-top: var(--space-2xs);
  background: var(--pebble);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: var(--space-m);
}

.hours h3 {
  font-size: var(--text-h4);
  font-weight: 700;
  color: var(--deep-ocean);
  margin-bottom: var(--space-xs);
}

.hours-row {
  display: flex;
  justify-content: space-between;
  gap: var(--space-s);
  padding: var(--space-2xs) 0;
  font-size: var(--text-small);
  color: var(--charcoal);
}

.hours-row + .hours-row {
  border-top: 1px solid var(--hairline);
}

.hours-row span:last-child {
  color: var(--graphite);
  font-weight: 500;
  text-align: right;
}

/* --- Message form --- */
.contact-form-card {
  background: var(--off-white);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: var(--space-l);
  box-shadow: var(--shadow-md);
}

.contact-form-card h3 {
  font-size: var(--text-h3);
  font-weight: 800;
  margin-bottom: var(--space-2xs);
}

.contact-form-card > p {
  color: var(--graphite);
  line-height: 1.55;
  margin-bottom: var(--space-m);
  max-width: 50ch;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-s);
}

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

.field.full {
  grid-column: 1 / -1;
}

.field label {
  font-size: var(--text-small);
  font-weight: 600;
  color: var(--deep-ocean);
}

.field-required {
  color: var(--terracotta);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: var(--text-body);
  color: var(--charcoal);
  background: var(--off-white);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
}

.field select {
  appearance: none;
  cursor: pointer;
}

.field textarea {
  min-height: 132px;
  resize: vertical;
  line-height: 1.5;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--graphite);
  opacity: 0.7;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--deep-ocean);
  box-shadow: 0 0 0 3px rgba(27, 94, 122, 0.12);
}

.form-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: var(--space-m);
  flex-wrap: wrap;
  margin-top: var(--space-2xs);
}

.form-note {
  font-size: var(--text-small);
  color: var(--graphite);
}

/* === RESPONSIVE === */
@media (max-width: 860px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }
}

@media (max-width: 560px) {
  .form-grid {
    grid-template-columns: 1fr;
  }

  .contact-form-card {
    padding: var(--space-m);
  }
}

/* --- Submission trap and result notice ------------------------------------
   Added 27 Aug 2026 when the form stopped being decorative and got a real
   handler in inc/contact-form.php. */

/* Pushed off-canvas rather than display:none. Some bots deliberately skip
   inputs that are display:none, and would step around the trap entirely. */
.catnip-trap {
  position: absolute;
  left: -100vw;
  width: 0;
  height: 0;
  overflow: hidden;
}

.catnip-form-notice {
  margin: 0 0 var(--space-s);
  padding: var(--space-2xs) var(--space-xs);
  border-radius: var(--radius-sm);
  font-size: var(--text-small);
}

.catnip-form-notice.is-success {
  background: color-mix(in srgb, var(--eucalypt) 12%, var(--pebble));
  color: var(--eucalypt);
}

.catnip-form-notice.is-error {
  background: color-mix(in srgb, var(--terracotta) 12%, var(--pebble));
  color: var(--terracotta);
}
