/* ==========================================================================
   MECAS Techsolutions - Contact / Technical Enquiry page
   --------------------------------------------------------------------------
   Read off a ruler overlay on design/reference/09-contact.jpg at a matched
   1440 canvas (source is 1024 wide, so x1.406). The page wears the teal theme
   (D-009): --color-action and friends resolve to teal inside .theme-contact,
   which sits on <main> so the header stays identical to every page (D-052).

   Type is sized by measured width (D-049). The mockup face is condensed, so
   the smallest uppercase labels would fall below 12px by width alone; those
   are floored at 12-13px for legibility and noted where they are.

   HERO                  pale ground, y 140-555 (415 tall)
     copy                x 52; accent bar 211 x 5 (teal + light teal)
     title               "DISCUSS YOUR" 453 / "REQUIREMENT" 481 wide, 80px pitch -> 60px
     rule                100 x 5, navy
     intro               3 lines, 604 wide, 28px pitch -> 22.5px
     trust row           3 items, 48px icons, labels floored at 13px
     impeller            x 680-1180, sits on the hero's base
     callout             x 1206-1420: 24px title, 80 x 5 rule, 10px tags

   BODY                  x 26-1419: form card 802 | 21 | aside 570
     form head           74 tall navy bar; title 23px, tag 17px
     fields              2 columns (359 | 35 | 356), 100px row pitch
     inputs              44 tall, 17px, icon-prefixed
     checkboxes          22px boxes on a 34px pitch, 18px labels
     textarea            120 tall; counter beneath, right
     dropzone            409 x 217 dashed | accepted-types panel 320 wide
     notice              70 tall, 18.4px
     submit              82 tall, full width, 22px label
     aside               navy head (32.5px title), grid image, 4-item strip
   ========================================================================== */

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.contact-hero {
  position: relative;
  overflow: hidden;
  /* Faint drawing-sheet grid over a pale wash, as drawn behind the impeller. */
  background-image:
    linear-gradient(to right,  rgba(11, 42, 91, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(11, 42, 91, 0.045) 1px, transparent 1px),
    linear-gradient(100deg, var(--white) 0%, var(--blue-050) 55%, #E3EDF8 100%);
  background-size: 38px 38px, 38px 38px, auto;
}

.contact-hero__inner {
  display: grid;
  /* The drawn trust row spans x 52-732, past the copy's text, so the copy
     column takes 660, the impeller 474 and the callout 234 (its drawn 214
     plus the tag line's run into the margin). */
  grid-template-columns: minmax(0, 660fr) minmax(0, 474fr) minmax(0, 234fr);
  align-items: stretch;
  max-width: 1440px;
  min-height: 415px;
  margin-inline: auto;
  padding-inline: clamp(var(--gutter), 3.6vw, 52px) 12px;
}

.contact-hero__copy { padding-block: 12px 30px; }

.contact-hero__accent {
  display: block;
  width: 211px;
  height: 5px;
  background-image: linear-gradient(to right, var(--teal-700) 0 60%, #7FCAD3 60% 100%);
}

.contact-hero__title {
  margin-top: 16px;
  font-size: clamp(2.5rem, 1.1rem + 3.1vw, 3.75rem);       /* 40 -> 60 */
  /* "REQUIREMENT" is 8em wide; on the narrowest phones it must still fit. */
  font-size: min(clamp(2.5rem, 1.1rem + 3.1vw, 3.75rem), 10.8vw);
  font-weight: var(--fw-extrabold);
  line-height: 1.28;                                      /* 80px pitch at 60 */
  letter-spacing: var(--ls-display);
  text-transform: uppercase;
  color: var(--ink-heading);
}

.contact-hero__title span { color: var(--teal-700); }

.contact-hero__rule {
  display: block;
  width: 100px;
  height: 5px;
  margin-top: 12px;
  background-color: var(--ink-heading);
}

.contact-hero__intro {
  margin-top: 18px;
  max-width: 616px;               /* breaks after "component", as drawn */
  font-size: clamp(1.0625rem, 0.6rem + 1vw, 1.40625rem);   /* 17 -> 22.5 */
  line-height: 1.25;
  color: var(--ink);
}

.contact-hero__trust {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) 16px;       /* the drawn row fits the copy column in one line */
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

.contact-hero__trust li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 0.75rem;             /* 12px: measured 11px, floored for legibility */
  font-weight: var(--fw-bold);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ink-heading);
}

.contact-hero__trust svg {
  flex: none;
  width: 40px;
  height: 40px;
  fill: none;
  stroke: currentColor;
  color: var(--blue-700);
}

.contact-hero__media {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-top: 14px;
}

.contact-hero__media picture { display: block; width: 100%; max-width: 500px; }

.contact-hero__media img {
  display: block;
  /* The render is a cut-out on white. Multiplying it onto the tinted ground
     drops the white box, so the impeller sits on the wash as drawn. */
  mix-blend-mode: multiply;
  width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: contain;
  object-position: bottom;
}

.contact-hero__callout {
  align-self: center;
  padding-left: 6px;
}

.contact-hero__callout-title {
  font-family: var(--font-heading);
  font-size: clamp(1.125rem, 1.667vw, 1.5rem);            /* 24 at 1440, scaling with the column */
  font-weight: var(--fw-bold);
  line-height: 1.4;
  white-space: nowrap;
  color: var(--ink-heading);
}

.contact-hero__callout-rule {
  display: block;
  width: 80px;
  height: 5px;
  margin-top: 24px;
  background-color: var(--teal-700);
}

.contact-hero__callout-tags {
  margin-top: 42px;
  font-family: var(--font-heading);
  font-size: 0.625rem;           /* 10px, as measured: a one-line decorative caption
                                    that repeats the callout; any larger and it wraps */
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  color: var(--ink-heading);
}

@media (min-width: 1400px) {
  .contact-hero__callout-tags { white-space: nowrap; }
}

.contact-hero__callout-tags span { margin-inline: 3px; color: var(--teal-700); }

/* --------------------------------------------------------------------------
   Body: form card and aside
   -------------------------------------------------------------------------- */

.contact-body { padding-block: 4px 40px; }

.contact-body__inner {
  display: grid;
  grid-template-columns: minmax(0, 802fr) minmax(0, 570fr);
  gap: 21px;
  align-items: start;
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: clamp(var(--gutter), 1.8vw, 26px) clamp(var(--gutter), 1.5vw, 21px);
  scroll-margin-top: calc(var(--header-h) + var(--space-4));
}

.enquiry {
  border: var(--border-w) solid var(--border);
  border-radius: 10px;
  background-color: var(--white);
  box-shadow: var(--shadow-sm);
}

.enquiry__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 22px;
  min-height: 74px;
  padding: var(--space-3) 26px var(--space-3) 34px;
  border-radius: 10px 10px 0 0;
  background-image: linear-gradient(100deg, var(--navy-800), var(--blue-800));
  color: var(--ink-inverse);
}

.enquiry__head-icon svg {
  display: block;
  width: 44px;
  height: 44px;
  fill: none;
  stroke: currentColor;
}

.enquiry__title {
  font-size: clamp(1.25rem, 0.95rem + 0.6vw, 1.4375rem);   /* 20 -> 23 */
  font-weight: var(--fw-bold);
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--ink-inverse);
}

.enquiry__tag {
  margin-left: auto;
  font-size: clamp(0.9375rem, 0.8rem + 0.25vw, 1.0625rem); /* 15 -> 17 */
  color: var(--ink-inverse-muted);
}

.enquiry__form { padding: 26px 26px 20px; }

.enquiry__grid {
  display: grid;
  grid-template-columns: minmax(0, 359fr) minmax(0, 356fr);
  gap: 0 35px;
}

/* --- Fields -------------------------------------------------------------- */

.field { min-width: 0; margin: 0 0 18px; padding: 0; border: 0; }

.field--full { grid-column: 1 / -1; }

.field__label {
  display: block;
  padding: 0;
  font-family: var(--font-heading);
  font-size: 0.9375rem;          /* 15px */
  font-weight: var(--fw-bold);
  color: var(--ink-heading);
}

.field__label .req { color: var(--color-action); }

.field__hint {
  font-family: var(--font-body);
  font-weight: var(--fw-regular);
  color: var(--ink-muted);
}

.field__control { position: relative; margin-top: 8px; }

.field__icon {
  position: absolute;
  left: 18px;
  top: 11px;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  color: var(--blue-700);
  pointer-events: none;
}

.field__input {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 8px 14px 8px 56px;
  font: inherit;
  font-size: 1.0625rem;          /* 17px, measured */
  color: var(--ink);
  background-color: var(--white);
  border: var(--border-w) solid var(--border-strong);
  border-radius: 6px;
  transition: border-color var(--duration-fast) var(--ease), box-shadow var(--duration-fast) var(--ease);
}

.field__input::placeholder { color: #8C98A8; }

.field__input:hover { border-color: #9FB0C4; }

.field__input:focus {
  outline: none;
  border-color: var(--color-action);
  box-shadow: 0 0 0 3px rgba(1, 107, 123, 0.18);
}

textarea.field__input {
  min-height: 120px;
  padding-top: 12px;
  resize: vertical;
  line-height: 1.45;
}

.field__control--area .field__icon { top: 14px; }

.field__counter {
  margin-top: 6px;
  font-size: 0.9375rem;
  text-align: right;
  color: var(--ink-muted);
}

.field__counter.is-near { color: #A15C00; }

.field__error {
  margin-top: 6px;
  font-size: 0.875rem;
  color: #B42318;
}

.field__error:empty { display: none; }

.field.is-invalid .field__input { border-color: #B42318; }
.field.is-invalid .field__input:focus { box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.16); }

/* --- Checkboxes ----------------------------------------------------------- */

.field--checks { grid-row: span 2; }

.field--checks .field__label { margin-bottom: 10px; }

.check {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 34px;
  cursor: pointer;
  font-size: clamp(1rem, 0.85rem + 0.3vw, 1.125rem);       /* 16 -> 18 */
  color: var(--ink);
}

/* The real input stays in place, invisible, so it keeps keyboard focus and
   its accessible name. The drawn box sits on top of it. */
.check input {
  position: absolute;
  left: 0;
  width: 22px;
  height: 22px;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.check__box {
  display: grid;
  place-items: center;
  flex: none;
  width: 22px;
  height: 22px;
  border: 1.5px solid var(--border-strong);
  border-radius: 4px;
  background-color: var(--white);
  color: var(--white);
  transition: background-color var(--duration-fast) var(--ease), border-color var(--duration-fast) var(--ease);
  pointer-events: none;           /* clicks reach the real checkbox beneath */
}

.check__box svg { width: 14px; height: 14px; opacity: 0; fill: none; stroke: currentColor; }

.check input:checked + .check__box { background-color: var(--color-action); border-color: var(--color-action); }
.check input:checked + .check__box svg { opacity: 1; }
.check input:focus-visible + .check__box { outline: 2px solid var(--color-action); outline-offset: 2px; }
.check:hover .check__box { border-color: var(--color-action); }

/* --- Upload ---------------------------------------------------------------- */

.upload {
  display: grid;
  grid-template-columns: minmax(0, 409fr) minmax(0, 320fr);
  gap: 19px;
  margin-top: 8px;
}

.dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 217px;
  padding: var(--space-5) var(--space-4);
  text-align: center;
  cursor: pointer;
  border: 1.5px dashed #8DB5E3;
  border-radius: 8px;
  background-color: #F7FAFE;
  transition: background-color var(--duration-fast) var(--ease), border-color var(--duration-fast) var(--ease);
}

.dropzone:hover,
.dropzone.is-dragging { background-color: var(--blue-050); border-color: var(--color-action); }

.dropzone:focus-within { outline: 2px solid var(--color-action); outline-offset: 2px; }

/* Covers the whole zone, so a click anywhere opens the picker, and stays
   reachable by keyboard. */
.dropzone__input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.dropzone__icon { width: 60px; height: 60px; fill: none; stroke: currentColor; color: var(--blue-800); }

.dropzone__title {
  font-family: var(--font-heading);
  font-size: clamp(1rem, 0.8rem + 0.4vw, 1.15625rem);      /* 16 -> 18.5 */
  font-weight: var(--fw-bold);
  line-height: 1.45;
  color: var(--blue-800);
}

.dropzone__help {
  font-size: clamp(0.875rem, 0.7rem + 0.4vw, 1.09375rem);  /* 14 -> 17.5 */
  color: var(--ink-muted);
}

.accepted {
  padding: 20px 18px;
  border-radius: 8px;
  background-color: var(--blue-050);
}

.accepted__title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: var(--fw-bold);
  color: var(--ink-heading);
}

.accepted__list { margin: 10px 0 0; padding: 0; list-style: none; }

.accepted__list li {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 33px;
  font-size: clamp(0.9375rem, 0.75rem + 0.4vw, 1.0625rem); /* 15 -> 17 */
  line-height: 1.42;              /* a wrapped item's lines must not overlap */
  color: var(--ink);
}

/* Filled teal disc with a white tick, as drawn. */
.accepted__list svg {
  flex: none;
  width: 22px;
  height: 22px;
  fill: var(--color-action);
  stroke: var(--white);
}

.file-list { margin: 12px 0 0; padding: 0; list-style: none; }

.file-list:empty { display: none; }

.file-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 8px 12px;
  margin-bottom: 8px;
  border: var(--border-w) solid var(--border);
  border-radius: 6px;
  background-color: var(--surface-alt);
  font-size: 0.9375rem;
}

.file-chip svg { flex: none; width: 18px; height: 18px; fill: none; stroke: currentColor; }

.file-chip__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.file-chip__size { flex: none; color: var(--ink-muted); }

.file-chip__remove {
  display: grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 4px;
  color: var(--ink-muted);
}

.file-chip__remove:hover { background-color: var(--border); color: var(--ink); }

/* --- Notice, submit, spam trap -------------------------------------------- */

.notice {
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 70px;
  margin-top: 4px;
  padding: 12px 20px;
  border-radius: 8px;
  background-color: var(--blue-050);
}

.notice__icon { flex: none; width: 36px; height: 36px; fill: none; stroke: currentColor; color: var(--color-action); }

.notice p {
  font-size: clamp(1rem, 0.75rem + 0.55vw, 1.15rem);        /* 16 -> 18.4 */
  line-height: 1.4;
  color: var(--ink-heading);
}

.enquiry__submit {
  width: 100%;
  justify-content: center;
  gap: var(--space-5);
  min-height: 82px;
  margin-top: 30px;
  font-size: clamp(1.125rem, 0.8rem + 0.7vw, 1.375rem);     /* 18 -> 22 */
  font-weight: var(--fw-bold);
  border-radius: 6px;
  background-image: var(--gradient-action);
}

.enquiry__submit .btn__arrow { width: 30px; height: 30px; }

.enquiry__submit[aria-busy="true"] { cursor: progress; opacity: 0.8; }

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* --- Status messages ------------------------------------------------------ */

.enquiry__banner {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  padding: 14px 16px;
  border: var(--border-w) solid #F2C4BF;
  border-radius: 6px;
  background-color: #FEF3F2;
  color: #7A271A;
}

.enquiry__banner[hidden] { display: none; }

.enquiry__banner svg { flex: none; width: 22px; height: 22px; fill: none; stroke: currentColor; }

/* After a no-JavaScript submission the service redirects to #enquiry-sent or
   #enquiry-error; :target shows the matching message with no script. */
.enquiry-status {
  display: none;
  gap: 14px;
  align-items: flex-start;
  margin: 20px 26px 0;
  padding: 14px 16px;
  border-radius: 6px;
}

.enquiry-status:target { display: flex; }

.enquiry-status--sent { background-color: var(--teal-100); color: var(--teal-800); }
.enquiry-status--error { background-color: #FEF3F2; color: #7A271A; }

.enquiry-status__icon { flex: none; width: 24px; height: 24px; fill: none; stroke: currentColor; }

.enquiry__done {
  padding: 56px 32px 64px;
  text-align: center;
}

.enquiry__done[hidden] { display: none; }

.enquiry__done:focus { outline: none; }

.enquiry__done-icon { width: 72px; height: 72px; fill: none; stroke: currentColor; color: var(--color-action); }

.enquiry__done-title {
  margin-top: 18px;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: var(--fw-bold);
  color: var(--ink-heading);
}

.enquiry__done-text { max-width: 44ch; margin: 10px auto 0; color: var(--ink); }

/* --- Aside ------------------------------------------------------------------ */

.realize {
  position: sticky;
  top: calc(var(--header-h) + var(--space-4));   /* below the sticky header */
}

.realize__head {
  padding: 22px 22px 24px 26px;   /* the step line measures 521 of 522 */
  border-radius: 4px;
  background-image: linear-gradient(110deg, var(--navy-800), var(--blue-800));
  color: var(--ink-inverse);
}

.realize__title {
  font-size: clamp(1.5rem, 1rem + 1.1vw, 2.03125rem);       /* 24 -> 32.5 */
  font-weight: var(--fw-bold);
  line-height: 1.22;
  text-transform: uppercase;
  color: var(--ink-inverse);
}

.realize__title span { color: var(--cyan-400); }

.realize__rule {
  display: block;
  width: 68px;
  height: 4px;
  margin-top: 16px;
  background-color: var(--cyan-400);
}

.realize__steps {
  margin-top: 16px;
  font-size: clamp(0.9375rem, 0.7rem + 0.5vw, 1.1875rem);  /* 15 -> 19 */
  color: var(--ink-inverse);
}

.realize__steps span { color: var(--ink-inverse-muted); }   /* spaced by the text's own spaces, as drawn */

.realize__media {
  margin-top: 14px;
  padding: 3px;
  border: var(--border-w) solid var(--border);
  border-radius: 6px;
  background-color: var(--white);
}

.realize__media img { display: block; width: 100%; height: auto; border-radius: 4px; }

.realize__strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 18px 0 0;
  padding: 26px 8px 22px;
  list-style: none;
  border-radius: 8px;
  background-color: var(--blue-050);
}

.realize__strip li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding-inline: 6px;
  text-align: center;
  font-family: var(--font-heading);
  font-size: 0.75rem;             /* 12px: measured 11px, floored */
  font-weight: var(--fw-bold);
  line-height: 1.35;
  text-transform: uppercase;
  color: var(--ink-heading);
}

.realize__strip li + li { border-left: var(--border-w) solid var(--border-strong); }

.realize__strip svg { width: 44px; height: 44px; fill: none; stroke: currentColor; color: var(--blue-800); }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

/* The callout leaves the hero's third column and sits under the copy. */
@media (max-width: 1199.98px) {
  .contact-hero__inner {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    padding-right: clamp(var(--gutter), 3.6vw, 52px);
  }

  .contact-hero__copy { grid-row: 1 / span 2; }
  .contact-hero__callout { align-self: start; padding: 0 0 var(--space-5); }
  .contact-hero__callout-rule { margin-top: 14px; }
  .contact-hero__callout-tags { margin-top: 14px; }
}

/* One column from here: the form first, the aside after it. */
@media (max-width: 1099.98px) {
  .contact-body__inner { grid-template-columns: minmax(0, 1fr); gap: var(--space-6); }
  .realize { position: static; }
  .contact-body__inner { scroll-margin-top: calc(var(--header-h-mobile) + var(--space-4)); }
}

@media (max-width: 767.98px) {
  .contact-hero__inner { grid-template-columns: minmax(0, 1fr); padding-inline: var(--gutter); }
  .contact-hero__copy { grid-row: auto; padding-bottom: 0; }
  .contact-hero__media { padding-top: var(--space-5); }
  .contact-hero__media picture { max-width: 380px; }
  .contact-hero__callout { padding: var(--space-5) 0 var(--space-6); }

  .enquiry__grid { grid-template-columns: minmax(0, 1fr); }
  .field--checks { grid-row: auto; }
  .upload { grid-template-columns: minmax(0, 1fr); }
  .dropzone { min-height: 180px; }

  .enquiry__head { padding-inline: 20px; }
  .enquiry__tag { margin-left: 0; flex-basis: 100%; }
  .enquiry__form { padding-inline: 18px; }
}

@media (max-width: 575.98px) {
  .contact-hero__trust { flex-direction: column; gap: var(--space-3); }
  .contact-hero__trust svg { width: 36px; height: 36px; }

  .enquiry__submit { min-height: 64px; gap: var(--space-3); white-space: normal; }
  .enquiry__submit .btn__arrow { width: 22px; height: 22px; }

  .notice { align-items: flex-start; gap: 14px; }
  .notice__icon { width: 28px; height: 28px; }

  .realize__strip { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: var(--space-5); }
  .realize__strip li:nth-child(3) { border-left: none; }
}
