/* ==========================================================================
   Contact page (contact.html). Every rule is scoped to body.page-contact.
   Shared tokens (navy, ink, gold, line, cream) come from css/styles.css.
   Values follow the original page's measurements: hero, contact rows,
   three-step enquiry card, choice tiles and field grid.
   ========================================================================== */

body.page-contact {
  --ct-hero-from: #f7f4ed;
  --ct-hero-to: #e8edf1;
  --ct-hero-copy: #536274;
  --ct-ring: rgba(8, 39, 80, 0.11);
  --ct-ring-far: rgba(8, 39, 80, 0.024);
  --ct-ring-farther: rgba(8, 39, 80, 0.02);
  --ct-label: #778495;
  --ct-detail-copy: #6b788a;
  --ct-step-copy: #637185;
  --ct-choice-copy: #405268;
  --ct-field-label: #405166;
  --ct-field-border: #c8d0da;
  --ct-progress: #e1e5e9;
  --ct-quiet-border: #cbd3dd;
  --ct-error: #a31f17;
  --ct-error-border: #b3261e;
}

/* 1. Page hero ----------------------------------------------------------- */
body.page-contact .page-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 510px;
  padding: 105px clamp(24px, 8vw, 130px) 85px;
  background: linear-gradient(135deg, var(--ct-hero-from), var(--ct-hero-to));
  overflow: hidden;
}

body.page-contact .page-hero::after {
  content: "";
  position: absolute;
  top: -40%;
  right: -8vw;
  width: 48vw;
  height: 48vw;
  border: 1px solid var(--ct-ring);
  border-radius: 50%;
  box-shadow: 0 0 0 80px var(--ct-ring-far), 0 0 0 160px var(--ct-ring-farther);
  pointer-events: none;
}

body.page-contact .page-hero h1 {
  max-width: 1050px;
  margin: 22px 0 25px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(48px, 5.3vw, 78px);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.055em;
  color: var(--navy);
}

body.page-contact .page-hero > p {
  max-width: 780px;
  margin: 0;
  color: var(--ct-hero-copy);
  font-size: 18px;
  line-height: 1.7;
}

/* 2. Contact layout ------------------------------------------------------ */
body.page-contact .contact-page-grid {
  display: grid;
  grid-template-columns: 0.56fr 1fr;
  align-items: start;
  gap: 8vw;
  padding: 90px clamp(24px, 8vw, 130px);
  background: #fff;
}

/* Contact rows: telephone, email, office and hours */
body.page-contact .contact-details {
  min-width: 0;
  display: grid;
  border-top: 1px solid var(--line);
}

body.page-contact .contact-details > a,
body.page-contact .contact-details > div {
  display: flex;
  gap: 18px;
  padding: 25px 0;
  border-bottom: 1px solid var(--line);
}

body.page-contact .contact-details .icon {
  width: 22px;
  height: 24px;
  color: var(--gold-dark);
}

body.page-contact .contact-details span,
body.page-contact .contact-details strong {
  display: block;
}

body.page-contact .contact-details span {
  margin-bottom: 6px;
  color: var(--ct-label);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1.5;
  text-transform: uppercase;
}

body.page-contact .contact-details strong {
  color: var(--navy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 19px;
  font-weight: 500;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

body.page-contact .contact-details > p {
  margin: 0;
  color: var(--ct-detail-copy);
  font-size: 16px;
  line-height: 1.65;
}

/* 3. Enquiry card -------------------------------------------------------- */
body.page-contact .quote-wizard {
  position: relative;
  min-width: 0;
  min-height: 610px;
  padding: 40px;
  background: #fff;
  box-shadow: 0 25px 70px rgba(4, 26, 55, 0.12);
}

body.page-contact .wizard-progress {
  height: 4px;
  margin: -40px -40px 45px;
  background: var(--ct-progress);
}

body.page-contact .wizard-progress span {
  display: block;
  height: 100%;
  background: var(--gold);
  transition: width 0.3s ease;
}

body.page-contact .quote-wizard fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

body.page-contact .quote-wizard fieldset[hidden] {
  display: none;
}

body.page-contact .quote-wizard legend {
  float: none;
  width: 100%;
  margin: 0;
  padding: 0;
  color: var(--navy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(32px, 3.4vw, 48px);
  font-weight: 500;
  line-height: 1.08;
}

body.page-contact .quote-wizard legend:focus {
  outline: none;
}

body.page-contact .quote-wizard fieldset > p {
  margin: 0;
  color: var(--ct-step-copy);
  font-size: 16px;
  line-height: 1.65;
}

/* Project choice tiles */
body.page-contact .choice-field {
  gap: 0;
}

body.page-contact .choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin: 30px 0;
}

body.page-contact .choice-grid label {
  position: relative;
  display: block;
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--ct-choice-copy);
}

body.page-contact .choice-grid input {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
}

body.page-contact .choice-grid span {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 62px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  color: var(--ct-choice-copy);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

body.page-contact .choice-grid .icon {
  width: 16px;
  height: 24px;
  opacity: 0.25;
  color: var(--ct-choice-copy);
}

body.page-contact .choice-grid input:checked + span {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

body.page-contact .choice-grid input:checked + span .icon {
  color: var(--gold);
  opacity: 1;
}

body.page-contact .choice-grid input:focus-visible + span {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

body.page-contact .choice-field.is-invalid .choice-grid span {
  border-color: var(--ct-error-border);
}

body.page-contact .choice-field .field-error {
  margin: -18px 0 30px;
}

/* Field grid (property and contact steps) */
body.page-contact .field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 30px;
}

body.page-contact .field-grid .field {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}

body.page-contact .field-grid .wide {
  grid-column: 1 / -1;
}

body.page-contact .field-grid .field > label {
  display: block;
  margin: 0 0 7px;
  color: var(--ct-field-label);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.5;
}

body.page-contact .enquiry-form .field input:not([type="checkbox"]):not([type="radio"]),
body.page-contact .enquiry-form .field select,
body.page-contact .enquiry-form .field textarea {
  padding: 13px 14px;
  border: 1px solid var(--ct-field-border);
  border-radius: 0;
  font-size: 16px;
}

body.page-contact .enquiry-form .field input:not([type="checkbox"]):not([type="radio"]) {
  line-height: 24px;
}

body.page-contact .enquiry-form .field textarea {
  min-height: 155px;
  line-height: 24px;
}

body.page-contact .enquiry-form .field .field-error {
  margin-top: 6px;
}

/* Consent line */
body.page-contact .enquiry-form .consent {
  flex-wrap: wrap;
  gap: 10px;
  min-height: 24px;
  font-size: 11px;
  color: var(--ct-field-label);
}

body.page-contact .enquiry-form .consent input {
  flex: 0 0 auto;
  width: 17px;
  height: 13px;
  margin: 0;
  accent-color: var(--navy);
}

body.page-contact .enquiry-form .consent label {
  flex: 1 1 0;
  min-width: 0;
  margin: 0;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.5;
  color: var(--ct-field-label);
}

body.page-contact .enquiry-form .consent label a {
  color: var(--navy);
  text-decoration: underline;
}

body.page-contact .enquiry-form .consent .field-error {
  flex-basis: 100%;
  padding-left: 27px;
  margin-top: 0;
}

body.page-contact .enquiry-form .consent.is-invalid label {
  color: var(--ct-error);
}

/* Step controls */
body.page-contact .wizard-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 32px;
}

body.page-contact .quote-wizard .wizard-next {
  align-self: flex-start;
}

body.page-contact .quote-wizard .button-quiet,
body.page-contact .quote-wizard .button-quiet:focus-visible {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--ct-quiet-border);
  box-shadow: none;
}

body.page-contact .quote-wizard .button-quiet:hover {
  background: #f6f8fb;
  color: var(--ink);
  border-color: #9aa6b5;
}

body.page-contact .quote-wizard .button .icon {
  width: 16px;
  height: 24px;
}

/* Sent state: the steps give way to the confirmation message */
body.page-contact .quote-wizard.is-sent {
  min-height: 0;
}

body.page-contact .quote-wizard.is-sent .wizard-progress,
body.page-contact .quote-wizard.is-sent .wizard-step {
  display: none;
}

body.page-contact .quote-wizard .form-status {
  margin-top: 0;
}

/* 4. Responsive ----------------------------------------------------------- */
@media (max-width: 1080px) {
  body.page-contact .contact-page-grid {
    grid-template-columns: 1fr;
    gap: 8vw;
    padding-block: 70px;
  }

  body.page-contact .contact-details {
    max-width: 640px;
  }
}

@media (max-width: 760px) {
  body.page-contact .page-hero {
    min-height: 470px;
    padding-top: 80px;
  }

  body.page-contact .quote-wizard {
    min-height: 0;
    padding: 28px 20px;
  }

  body.page-contact .wizard-progress {
    margin: -28px -20px 35px;
  }

  body.page-contact .choice-grid,
  body.page-contact .field-grid {
    grid-template-columns: 1fr;
  }

  body.page-contact .field-grid .wide {
    grid-column: auto;
  }
}
