/* ===========================================================================
   DISCOVERY FORM. Layout and structure from the supplied design; every colour
   remapped to the site palette. All contrast pairs verified: heading 9.38:1,
   body 9.72:1, field text 18.13:1, placeholder 4.60:1, button label 6.01:1.
   =========================================================================== */

:root {
  /*
    Preview values only.
    In production, map these to the NEW website's existing color tokens.
  */
  --page-bg: #F2F5FA;
  --panel-bg: #082556;
  --panel-border: #FCC600;

  --heading-color: #FCC600;
  --supporting-color: #D6D0C6;

  --field-bg: #ffffff;
  --field-text: #0C1626;
  --field-border: #D9E1EE;
  --field-focus: #FCC600;
  --field-placeholder: #6B7686;

  --button-bg: #C31344;
  --button-text: #FFFFFF;
  /* White on white. The hover background was #ffffff and the hover text was
     #ffffff too, so the label on the one button that submits the form
     disappeared under the pointer. The settled palette is #C31344 with white
     text and #A50F39 on hover, which is what these are now. */
  --button-hover-bg: #A50F39;
  --button-hover-text: #FFFFFF;

  --error: #b42318;
  --success: #067647;

  --panel-radius: 2px;
  --field-radius: 4px;

  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --font-serif: Georgia, "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--page-bg);
  color: var(--field-text);
  font-family:var(--font,Georgia,"Times New Roman",serif);
}

.page-shell {
  width: min(1450px, calc(100% - 48px));
  margin: 54px auto;
}

.discovery-panel {
  display: grid;
  grid-template-columns: minmax(360px, .92fr) minmax(0, 1.45fr);
  gap: clamp(22px, 3vw, 40px);
  align-items: center;

  min-height: 220px;
  padding: clamp(16px, 2vw, 26px);

  background: var(--panel-bg);
  border: 3px solid var(--panel-border);
  border-radius: var(--panel-radius);
  box-shadow: 0 18px 42px rgba(16, 29, 39, .16);
}

.discovery-copy {
  text-align: center;
}

.discovery-copy h2 {
  margin: 0 auto;
  max-width: 12ch;

  color: var(--heading-color);

  font-family:var(--font,Georgia,"Times New Roman",serif);
  font-size: clamp(29px, 3.2vw, 43px);
  line-height: .98;
  font-weight: 600;
  letter-spacing: -.025em;
}

.discovery-copy p {
  margin: 9px auto 0;
  max-width: 30ch;

  color: var(--supporting-color);

  font-family:var(--font,Georgia,"Times New Roman",serif);
  font-size: clamp(15px, 1.3vw, 19px);
  line-height: 1.25;
}

.discovery-form {
  width: 100%;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 14px;
}

.form-field {
  min-width: 0;
}

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

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.form-field input,
.form-field select {
  display: block;
  width: 100%;
  min-height: 44px;

  padding: 7px 13px;

  border: 2px solid var(--field-border);
  border-radius: var(--field-radius);
  outline: 0;

  background: var(--field-bg);
  color: var(--field-text);

  font-family:var(--font,Georgia,"Times New Roman",serif);
  font-size: clamp(16px, 1.05vw, 18px);
  line-height: 1.15;

  box-shadow: inset 0 0 0 1px rgba(0,0,0,.02);

  transition:
    border-color 150ms ease,
    box-shadow 150ms ease,
    background-color 150ms ease;
}

.form-field input::placeholder {
  color: var(--field-placeholder);
  opacity: 1;
}

.form-field input:hover,
.form-field select:hover {
  border-color: var(--panel-border);
}

.form-field input:focus-visible,
.form-field select:focus-visible {
  border-color: var(--field-focus);
  box-shadow: 0 0 0 4px rgba(199, 170, 98, .24);
}

.form-field [aria-invalid="true"] {
  border-color: var(--error);
}

.field-error {
  min-height: 12px;
  margin: 2px 0 0;
  color: #ffd8d3;
  font-size: 10px;
  line-height: 1.3;
}


.select-wrap {
  position: relative;
}

.select-wrap select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 42px;
}

.select-wrap::after {
  content: "";
  position: absolute;
  right: 17px;
  top: 50%;
  width: 9px;
  height: 9px;
  margin-top: -6px;
  border-right: 2px solid var(--field-text);
  border-bottom: 2px solid var(--field-text);
  transform: rotate(45deg);
  pointer-events: none;
}

.actions {
  display: flex;
  justify-content: center;
  margin-top: 9px;
}

.submit-button {
  min-width: 245px;
  min-height: 44px;
  padding: 7px 18px;

  border: 3px solid var(--panel-border);
  border-radius: var(--field-radius);

  background: var(--button-bg);
  color: var(--button-text);

  font-family:var(--font,Georgia,"Times New Roman",serif);
  font-size: clamp(16px, 1.05vw, 18px);
  font-weight: 700;
  line-height: 1.1;

  cursor: pointer;

  transition:
    background-color 150ms ease,
    color 150ms ease,
    border-color 150ms ease,
    transform 100ms ease;
}

.submit-button:hover:not(:disabled) {
  background: var(--button-hover-bg);
  color: var(--button-hover-text);
  border-color: var(--button-hover-bg);
}

.submit-button:focus-visible {
  outline: 4px solid var(--field-focus);
  outline-offset: 4px;
}

.submit-button:active:not(:disabled) {
  transform: translateY(1px);
}

.submit-button:disabled {
  opacity: .68;
  cursor: wait;
}

.form-status {
  display: none;
  margin: 0 0 9px;
  padding: 7px 10px;
  border-radius: var(--field-radius);
  font-size: 12px;
}

.form-status.visible {
  display: block;
}

.form-status.error-state {
  background: #fff0ef;
  color: var(--error);
}

.form-status.success-state {
  background: #ecfdf3;
  color: var(--success);
}

.privacy-note {
  margin: 6px auto 0;
  max-width: 76ch;

  color: rgba(255,255,255,.78);

  font-size: 10px;
  line-height: 1.35;
  text-align: center;
}

.privacy-note a {
  color: #fff;
  text-underline-offset: 2px;
}

.hp-field {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

@media (max-width: 1100px) {
  .discovery-panel {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 26px;
  }

  .discovery-copy h2 {
    max-width: 14ch;
  }

  .discovery-copy p {
    max-width: 36ch;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: 100%;
    margin: 0;
  }

  .discovery-panel {
    padding: 22px 18px 26px;
    border-left: 0;
    border-right: 0;
    box-shadow: none;
  }

  .discovery-copy h2 {
    font-size: clamp(38px, 12vw, 54px);
  }

  .discovery-copy p {
    margin-top: 12px;
    font-size: clamp(21px, 6vw, 27px);
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .form-field--full {
    grid-column: auto;
  }

  .form-field input,
  .form-field select {
    min-height: 48px;
    font-size: 16px;
    padding: 10px 14px;
  }

  .actions {
    margin-top: 22px;
  }

  .submit-button {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    font-size: 18px;
  }

  .privacy-note {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: .001ms !important;
  }
}
