/*
 * contact.css — Contact page styles (tall photo hero, 3-step form, office aside)
 * ═══════════════════════════════════════════════════════════════════════
 * PATH: css/contact.css
 * ROLE: Everything page-specific for /contact: the hero band photo (scoped by
 *       the layout's data-page="contact"), the two-column frame (form beside a
 *       sticky "Get in touch / What happens next" aside), the step indicator,
 *       the field/button/review styling of the three wizard panels and the
 *       success + error states. Panel and step visibility is the `hidden`
 *       attribute ([hidden]{display:none!important} ships in main.css:581 and
 *       bootstrap-4.4.1.css:354) and field state is data-valid on the control —
 *       js/contact-form.js sets both. The fields deliberately mirror the lead
 *       popup's look (css/site-shell.css) so the two forms read as one.
 *       This page carries no .site-cta band: it IS the destination.
 *       Tokens (--band, --teal, --line, --display, --serif…) come from
 *       css/site-shell.css.
 * USED BY: app/Views/public/contact.php (loaded through the layout's 'head'
 *       section) + js/contact-form.js. The three .contact-* rules that 09-12
 *       parked in css/main.css moved here 2026-09-14 — nothing else on the
 *       site uses these classes.
 * Last Modified: 2026-09-14 — created (restyle round 3)
 */

/* ── hero band photo ─────────────────────────────────────
   The layout stamps data-page="contact" on .wrapper2; the tall variant
   (data-hero="tall" on .banner3, rules in main.css) grows the band to
   ~430px so the photo shows. The owner's own shot: finish samples and a
   tape measure on the bench, no faces (images/design.jpg, 1920×1080 cut). */
.wrapper2[data-page="contact"] {
  background-image: url(../images/home/hero-contact.jpg);
  background-attachment: scroll;   /* fixed would frame only the top edge in a 430px band */
  background-position: center 50%;
}

/* ── page frame ──────────────────────────────────────────
   Bottom padding is on the page itself here: unlike the other restyled
   pages this one does not end in the dark .site-cta band. */
.contact-page {
  padding: clamp(2.5rem, 5vw, 4rem) 0 clamp(3rem, 6vw, 5rem);
  overflow-x: clip;
}
.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 3rem;
  align-items: start;
}
.contact-main {
  min-width: 0;
}
.contact-heading {
  margin: 0 0 .5rem;
  font-family: var(--display);
  font-stretch: 112%;
  font-weight: 800;
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  letter-spacing: -.01em;
  color: var(--ink);
}
.contact-intro {
  margin: 0 0 2rem;
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--muted);
}

/* ── step indicator ──────────────────────────────────────
   One flex row of three items; the connector is a pseudo-element drawn
   across the gap, so the gap width is shared through a custom property
   instead of being written twice. */
.contact-steps {
  --contact-step-gap: clamp(1rem, 5vw, 3.5rem);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: var(--contact-step-gap);
  list-style: none;
  margin: 0 0 2.25rem;
  padding: 0;
}
.contact-step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .45rem;
  text-align: center;
}
.contact-step + .contact-step::before {
  content: "";
  position: absolute;
  top: 18px;
  right: 100%;
  width: var(--contact-step-gap);
  height: 2px;
  background: var(--line);
  transition: background .3s var(--ease);
}
.contact-step[data-state="done"] + .contact-step::before {
  background: var(--teal);
}
.contact-step-num {
  position: relative;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--line);
  color: var(--muted);
  font-family: var(--display);
  font-weight: 800;
  font-size: .95rem;
  transition: background .3s var(--ease), color .3s var(--ease);
}
.contact-step-label {
  font-family: var(--display);
  font-size: .74rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  transition: color .3s var(--ease);
}
.contact-step[data-state="active"] .contact-step-num {
  background: var(--teal);
  color: var(--band);
}
.contact-step[data-state="active"] .contact-step-label {
  color: var(--teal-deep);
  font-weight: 700;
}
.contact-step[data-state="done"] .contact-step-num {
  background: var(--teal-deep);
  color: transparent;            /* the digit gives way to the drawn check */
}
.contact-step[data-state="done"] .contact-step-label {
  color: var(--teal-deep);
}
/* check mark drawn from two borders — no icon font, no glyph coverage risk */
.contact-step[data-state="done"] .contact-step-num::after {
  content: "";
  position: absolute;
  top: 10px;
  left: 14px;
  width: 9px;
  height: 15px;
  border: solid #fff;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

/* ── wizard panels ───────────────────────────────────── */
.contact-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: clamp(1.25rem, 3vw, 2rem);
}
.contact-panel-title {
  margin: 0 0 1.5rem;
  padding-bottom: .75rem;
  border-bottom: 2px solid var(--teal);
  font-family: var(--display);
  font-stretch: 112%;
  font-weight: 800;
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  letter-spacing: -.01em;
  color: var(--ink);
}
.contact-panel-lede {
  margin: -.75rem 0 1.5rem;
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--muted);
}

/* ── fields ──────────────────────────────────────────── */
.contact-field {
  display: grid;
  gap: .3rem;
  margin-bottom: 1.35rem;
}
.contact-field label {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.contact-required {
  color: #b02a37;
}
.contact-input {
  width: 100%;
  margin: 0;
  padding: .65rem .8rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--ground);
  box-shadow: none;
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.4;
  color: var(--ink);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
textarea.contact-input {
  resize: vertical;
}
.contact-input:focus {
  outline: none;
  border-color: var(--teal-deep);
  box-shadow: 0 0 0 3px var(--teal-tint);
}
.contact-input[data-valid="true"] {
  border-color: var(--teal);
}
.contact-input[data-valid="false"] {
  border-color: #b02a37;
}
.contact-hint {
  margin: 0;
  font-family: var(--serif);
  font-size: .88rem;
  line-height: 1.45;
  color: var(--muted);
}
/* error copy is hidden until the control is marked invalid (or, for the
   consent checkbox, until the script drops the hidden attribute) */
.contact-error-text {
  display: none;
  margin: 0;
  font-family: var(--serif);
  font-size: .88rem;
  line-height: 1.45;
  color: #b02a37;
}
.contact-input[data-valid="false"] ~ .contact-error-text {
  display: block;
}
#consent-error {
  display: block;
  margin: -.35rem 0 0;
}
.contact-consent {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  margin: 1.5rem 0 .6rem;
  font-family: var(--serif);
  font-size: .97rem;
  line-height: 1.5;
  color: var(--ink-soft);
}
.contact-consent input {
  width: auto;
  margin: .25rem 0 0;
  flex: 0 0 auto;
}
.contact-consent label {
  margin: 0;
  text-transform: none;
  letter-spacing: 0;
  font-family: inherit;
  font-size: inherit;
  font-weight: 400;
  color: inherit;
}

/* honeypot — off screen rather than display:none, which bots skip */
.contact-trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  margin: 0;
}

/* ── buttons ─────────────────────────────────────────── */
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .8rem;
  margin-top: 1.75rem;
}
.contact-actions > :only-child {
  margin-left: auto;
}
.contact-btn,
.contact-btn-alt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .8rem 1.5rem;
  border-radius: 999px;
  font-family: var(--display);
  font-weight: 600;
  font-size: .76rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
.contact-btn {
  border: 1px solid var(--teal);
  background: var(--teal);
  color: var(--band);
}
.contact-btn:hover,
.contact-btn:focus-visible {
  background: var(--teal-bright);
  border-color: var(--teal-bright);
}
.contact-btn[disabled] {
  opacity: .6;
  cursor: default;
}
.contact-btn-alt {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-soft);
}
.contact-btn-alt:hover,
.contact-btn-alt:focus-visible {
  border-color: var(--teal-deep);
  color: var(--teal-deep);
}

/* ── review rows ─────────────────────────────────────── */
.contact-review {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--ground);
  padding: .35rem 1.25rem;
}
.contact-review-row {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem 1rem;
  padding: .7rem 0;
  border-bottom: 1px solid var(--line);
}
.contact-review-row:last-child {
  border-bottom: 0;
}
.contact-review-label {
  flex: 0 0 180px;
  font-family: var(--display);
  font-weight: 600;
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.contact-review-value {
  flex: 1 1 220px;
  min-width: 0;
  font-family: var(--serif);
  font-size: .97rem;
  line-height: 1.5;
  color: var(--ink);
  overflow-wrap: break-word;
}

/* ── success + error ─────────────────────────────────── */
.contact-success {
  text-align: center;
  padding-block: clamp(2rem, 5vw, 3rem);
}
.contact-success-icon {
  width: 64px;
  height: 64px;
  margin-bottom: 1.25rem;
  color: var(--teal);
}
.contact-success h3 {
  margin: 0 0 .9rem;
  font-family: var(--display);
  font-stretch: 112%;
  font-weight: 800;
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  color: var(--ink);
}
.contact-success p {
  max-width: 34rem;
  margin: 0 auto;
  font-family: var(--serif);
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--ink-soft);
}
/* scoped past the .contact-success p rule above, which would otherwise win
   the margin with its element+class specificity */
.contact-success .contact-success-tag {
  margin-top: 1.5rem;
  font-family: var(--display);
  letter-spacing: .08em;
  color: var(--ink);
}
/* main.css paints bare links white and turns them blue on hover — both
   states are restated so these stay readable on the white panel */
.contact-success-link,
.contact-success-link:hover,
.contact-success-link:focus {
  color: var(--teal-deep);
  text-decoration: underline;
  text-decoration-color: rgba(42, 139, 130, .35);
  text-underline-offset: 3px;
}
.contact-alert {
  margin: 1.25rem 0 0;
  padding: .9rem 1.1rem;
  border: 1px solid #f0c2c7;
  border-left: 4px solid #b02a37;
  border-radius: 8px;
  background: #fdf2f3;
  font-family: var(--serif);
  font-size: .97rem;
  line-height: 1.55;
  color: #8a222c;
}

/* ── aside ───────────────────────────────────────────── */
.contact-side {
  position: sticky;
  top: calc(62px + 1.25rem);       /* the shrunken header height + air */
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.contact-box {
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.contact-box-title {
  margin: 0;
  padding: .9rem 1.25rem;
  background: var(--band);
  color: #fff;
  font-family: var(--display);
  font-weight: 700;
  font-size: .74rem;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.contact-details {
  list-style: none;
  margin: 0;
  padding: 0;
}
.contact-details li {
  padding: .8rem 1.25rem;
  font-family: var(--serif);
  font-size: .97rem;
  line-height: 1.5;
  color: var(--ink-soft);
}
.contact-details li + li {
  border-top: 1px solid var(--line);
}
.contact-details a,
.contact-details a:hover,
.contact-details a:focus {
  color: var(--teal-deep);
  text-decoration: underline;
  text-decoration-color: rgba(42, 139, 130, .35);
  text-underline-offset: 3px;
  overflow-wrap: break-word;
}
.contact-next {
  list-style: none;
  counter-reset: contact-next-step;
  margin: 0;
  padding: 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
/* two grid columns: the counter circle and ONE content wrapper — the view
   keeps the strong + copy inside a <div> so the copy never lands in the
   32px counter column (same idiom as .warranty-steps) */
.contact-next li {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: .85rem;
  font-family: var(--serif);
  font-size: .95rem;
  line-height: 1.55;
  color: var(--ink-soft);
}
.contact-next li::before {
  counter-increment: contact-next-step;
  content: counter(contact-next-step);
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--teal);
  color: var(--band);
  font-family: var(--display);
  font-weight: 800;
  font-size: .85rem;
}
.contact-next strong {
  display: block;
  margin-bottom: .1rem;
  font-family: var(--display);
  font-size: .98rem;
  color: var(--ink);
}
.contact-credentials {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-align: center;
  color: var(--muted);
}

/* ── responsive ──────────────────────────────────────── */
@media (max-width: 1000px) {
  .contact-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  /* the aside follows the form in source order, so it simply drops below */
  .contact-side {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
    gap: 1rem;
  }
  .contact-credentials {
    grid-column: 1 / -1;
  }
}
@media (max-width: 560px) {
  .contact-side {
    grid-template-columns: 1fr;
  }
  .contact-steps {
    --contact-step-gap: .75rem;
  }
  .contact-step-label {
    font-size: .64rem;
    letter-spacing: .06em;
    white-space: normal;
  }
  .contact-actions {
    flex-direction: column-reverse;
  }
  .contact-actions > :only-child {
    margin-left: 0;
  }
  .contact-review-label {
    flex: 1 1 100%;
  }
}
@media (prefers-reduced-motion: reduce) {
  .contact-step-num,
  .contact-step-label,
  .contact-step + .contact-step::before,
  .contact-input,
  .contact-btn,
  .contact-btn-alt {
    transition: none;
  }
}
