/* ===========================================================================
   Contact — TE system
   Layout: layouts/_default/contact.html

   Page composition only. Tokens, plates, modules, labels and buttons all come
   from assets/css/te-system.css, which must load first. Nothing here redefines
   a colour or a radius.

   This file replaced a 457-line inline <style> block that used to sit at the
   top of contact.html. Do not put styles back there.
   =========================================================================== */

/* ── 01  MASTHEAD ─────────────────────────────────────────────────────────── */

.mfte .te-contact__masthead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 292px;
  gap: 48px;
  align-items: start;
}

.mfte .te-contact__title { max-width: 17ch; }

.mfte .te-contact__lede {
  max-width: 54ch;
  margin-top: 18px;
}

/* The brand accents that arrive inside hero_title / hero_lede from front
   matter. They are authored as spans in the markdown, so they are styled by
   name here rather than given TE classes. */
.mfte .te-contact__title .mf-contact-hero-title-accent,
.mfte .te-contact__lede .mf-about-hero-lede-accent {
  color: var(--te-accent);
}

.mfte .te-contact__status { padding: 18px 18px 16px; }

.mfte .te-contact__meta { margin: 0; }

.mfte .te-contact__meta-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px solid var(--te-plate-edge);
}

.mfte .te-contact__meta-row:last-child { border-bottom: 0; padding-bottom: 0; }

.mfte .te-contact__meta dt,
.mfte .te-contact__meta dd {
  margin: 0;
  font-family: var(--te-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  line-height: 1.4;
}

.mfte .te-contact__meta dt {
  text-transform: lowercase;
  color: var(--te-fg-mute);
  flex: 0 0 auto;
}

.mfte .te-contact__meta dd {
  color: var(--te-heading);
  text-align: right;
  overflow-wrap: anywhere;
}

.mfte .te-contact__meta dd a {
  color: var(--te-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ── 02  ROUTES ───────────────────────────────────────────────────────────── */

.mfte .te-contact__section-title { max-width: 20ch; }

.mfte .te-contact__routes {
  margin-top: 36px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.mfte .te-contact__route {
  display: block;
  width: 100%;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  font: inherit;
  transition: border-color 0.2s ease;
}

.mfte .te-contact__route:hover { border-color: var(--te-accent); }

.mfte .te-contact__route-icon {
  display: block;
  width: 24px;
  height: 24px;
  margin-bottom: 14px;
  color: var(--te-heading);
}

.mfte .te-contact__route-icon svg { width: 100%; height: 100%; }

.mfte .te-contact__route-title {
  display: block;
  margin-bottom: 7px;
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--te-heading);
}

.mfte .te-contact__route-text {
  display: block;
  margin-bottom: 16px;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--te-fg-mute);
}

.mfte .te-contact__route-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--te-accent);
}

.mfte .te-contact__route:hover .te-btn__arrow { transform: translateX(3px); }

/* ── 03  MESSAGE ──────────────────────────────────────────────────────────── */

.mfte .te-contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 56px;
  align-items: start;
}

.mfte .te-contact__aside-title { max-width: 14ch; }

.mfte .te-contact__steps {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mfte .te-contact__steps li {
  display: flex;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--te-rule);
}

.mfte .te-contact__steps li:last-child { border-bottom: 0; padding-bottom: 0; }

.mfte .te-contact__step-n {
  flex: 0 0 auto;
  padding-top: 3px;
  font-family: var(--te-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  color: var(--te-accent);
}

.mfte .te-contact__step-body {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--te-fg-mute);
}

.mfte .te-contact__step-body strong { color: var(--te-heading); font-weight: 700; }

/* ── FORM ─────────────────────────────────────────────────────────────────── */
/* Fields are recessed the way the readout is: sunk into the plate, mono label
   above, never a placeholder standing in for a label. Every colour pairing
   below clears WCAG AA against the plate. */

.mfte .te-contact__form { margin: 0; }

.mfte .te-contact__form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.mfte .te-field { display: flex; flex-direction: column; gap: 7px; }
.mfte .te-field--full { grid-column: 1 / -1; }

.mfte .te-field label {
  font-family: var(--te-mono);
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: lowercase;
  color: var(--te-fg-mute);
}

.mfte .te-field label span { color: var(--te-accent); }

.mfte .te-field input,
.mfte .te-field select,
.mfte .te-field textarea {
  width: 100%;
  padding: 13px 14px;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.4;
  color: var(--te-fg);
  background: var(--te-recess);
  border: 1px solid var(--te-plate-edge);
  border-radius: var(--te-r-control);
  box-shadow: inset 0 2px 4px rgba(20, 24, 29, 0.07);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  -webkit-appearance: none;
          appearance: none;
}

.mfte .te-field textarea { resize: vertical; min-height: 128px; }

/* Native select needs its own arrow back once appearance is stripped. */
.mfte .te-field select {
  background-image:
    linear-gradient(45deg, transparent 50%, var(--te-fg-mute) 50%),
    linear-gradient(135deg, var(--te-fg-mute) 50%, transparent 50%);
  background-position:
    calc(100% - 19px) calc(50% + 2px),
    calc(100% - 14px) calc(50% + 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 38px;
}

/* Placeholders get their own token, darker than --te-fg-mute. On the recessed
   field background the mute grey measures 4.17:1, which is under the AA floor;
   #5c636a measures 5.1:1. Do not swap this back to --te-fg-mute. */
.mfte .te-field input::placeholder,
.mfte .te-field textarea::placeholder {
  color: #5c636a;
  opacity: 1;
}

.mfte .te-field input:focus,
.mfte .te-field select:focus,
.mfte .te-field textarea:focus {
  outline: none;
  border-color: var(--te-accent);
  box-shadow: inset 0 2px 4px rgba(20, 24, 29, 0.07),
              0 0 0 3px rgba(255, 136, 51, 0.24);
}

.mfte .te-field input:focus-visible,
.mfte .te-field select:focus-visible,
.mfte .te-field textarea:focus-visible { outline: none; }

.mfte .te-contact__submit { width: 100%; justify-content: center; }

.mfte .te-contact__status {
  margin: 16px 0 0;
  padding: 13px 15px;
  border: 1px solid var(--te-plate-edge);
  border-left: 3px solid var(--te-accent);
  border-radius: var(--te-r-control);
  background: var(--te-module);
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--te-heading);
}

.mfte .te-contact__status[hidden] { display: none; }

.mfte .te-contact__privacy { margin: 16px 0 0; }

/* ── 04  CLOSER ───────────────────────────────────────────────────────────── */

.mfte .te-contact__closer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}

.mfte .te-contact__closer-copy { max-width: 52ch; }

.mfte .te-contact__closer-title { margin-bottom: 12px; max-width: 18ch; }

.mfte .te-contact__closer-text {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--te-ink-soft);
}

/* ── RESPONSIVE ───────────────────────────────────────────────────────────── */

@media (max-width: 1100px) {
  .mfte .te-contact__routes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 991px) {
  .mfte .te-contact__masthead,
  .mfte .te-contact__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
  }

  .mfte .te-contact__title { max-width: 22ch; }

  .mfte .te-contact__closer {
    flex-direction: column;
    align-items: flex-start;
    gap: 26px;
  }
}

@media (max-width: 767px) {
  .mfte .te-contact__routes { grid-template-columns: minmax(0, 1fr); }
  .mfte .te-contact__form-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .mfte .te-contact__route,
  .mfte .te-field input,
  .mfte .te-field select,
  .mfte .te-field textarea { transition: none; }
}

/* ═══ CASCADE OVERRIDES ═══════════════════════════════════════════════════ */
/* The theme bundle carries `.text-dark, form label { color: #111 !important }`
   unlayered in style.css, which was repainting every field label near-black and
   killing the mono label treatment. Important declarations resolve with the
   layer order reversed, so an unlayered !important is the weakest author
   declaration and a layered one wins. This file loads after the bundle. */

@layer site {
  .mfte .te-field label {
    color: var(--te-fg-mute) !important;
    font-family: ui-monospace, 'SFMono-Regular', 'SF Mono', Menlo, Consolas,
                 'Liberation Mono', monospace !important;
    font-size: 0.6875rem !important;
    font-weight: 400 !important;
  }

  .mfte .te-field label span { color: var(--te-accent) !important; }
}
