/* ==========================================================================
   RackTide landing page: "Let's talk numbers" contact section + footer
   Depends on the tokens in hero.css and story.css.
   ========================================================================== */

:root {
  --paper: #ffffff;
  --ink: #141a21;
  --ink-soft: #2b3540;
  --ink-muted: #8a95a1;
  --rule: #e3e8ed;
  --form-bg: #0f141a;
  --form-rule: #3a4652;
  --form-label: #eef3f7;
  --form-placeholder: #7f8b97;
}

html { scroll-behavior: smooth; }

.numbers {
  position: relative;
  padding: clamp(72px, 8vw, 112px) var(--gutter) clamp(72px, 8vw, 104px);
  background: var(--paper);
  color: var(--ink-soft);
}

.numbers__inner {
  max-width: 1200px;
  margin: 0 auto;
}

.numbers__title {
  margin: 0 auto;
  font: 700 var(--title-size) / var(--title-leading) var(--font-display);
  letter-spacing: var(--title-tracking);
  text-transform: uppercase;
  text-align: center;
  color: var(--ink);
}

.numbers__grid {
  display: grid;
  grid-template-columns: minmax(280px, 440px) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: stretch;
  margin-top: clamp(56px, 7vw, 96px);
}

/* --------------------------------------------------------------------------
   Left column: copy, contact details, trust logos
   -------------------------------------------------------------------------- */
.numbers__aside {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.numbers__copy {
  margin: 0;
  font: 400 14.5px / 1.6 var(--font-body);
  color: var(--ink-soft);
}

.contact-list {
  margin: 0;
  display: grid;
  gap: 10px;
  font: 400 14px / 1.5 var(--font-body);
  color: var(--ink-soft);
}

.contact-list div {
  display: flex;
  flex-wrap: wrap;
  gap: 0 6px;
}

.contact-list dt {
  font-weight: 700;
  color: var(--ink);
}

.contact-list dd { margin: 0; }

.contact-list address { font-style: normal; }

.contact-list a {
  color: var(--ink-soft);
  text-decoration: underline;
  text-decoration-color: rgba(43, 53, 64, 0.4);
  text-underline-offset: 3px;
  transition: color 0.25s ease, text-decoration-color 0.25s ease;
}

.contact-list a:hover {
  color: var(--blue);
  text-decoration-color: var(--blue);
}

.trust {
  margin-top: auto; /* pins the logo row to the bottom, level with the form */
  padding-top: 24px;
}

.trust__label {
  margin: 0 0 18px;
  font: 700 14px / 1.3 var(--font-body);
  color: var(--ink);
}

/* Two logos per row: four don't fit across the column, and 2 x 2 reads
   tidier than three plus an orphan. */
.trust__logos {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, max-content);
  align-items: center;
  gap: 22px 40px;
}

.trust__logo {
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  padding: 6px;
  margin: -6px;
  opacity: 0.9;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Each logo sets --logo-h inline. Wide logos get a shorter height so all
   three carry roughly the same visual weight; the row centres them. */
.trust__logo img {
  display: block;
  height: var(--logo-h, 34px);
  width: auto;
}

.trust__logo:hover,
.trust__logo:focus-visible {
  opacity: 1;
  transform: translateY(-2px);
}

.trust__logo:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   Right column: the form card
   -------------------------------------------------------------------------- */
.lead-form {
  position: relative;
  padding: clamp(28px, 3.2vw, 40px);
  border-radius: 14px;
  background: var(--form-bg);
  color: var(--form-label);
  box-shadow: 0 40px 80px -40px rgba(10, 15, 21, 0.6);
}

.lead-form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 40px;
}

.field { display: flex; flex-direction: column; }
.field--wide { grid-column: 1 / -1; }

.field__label {
  font: 500 13.5px / 1.3 var(--font-body);
  color: var(--form-label);
  margin-bottom: 6px;
}

.field__control {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  margin: 0;
  padding: 10px 0 11px;
  border: 0;
  border-bottom: 1px solid var(--form-rule);
  border-radius: 0;
  background: transparent;
  color: #ffffff;
  font: 400 14px / 1.3 var(--font-body);
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.field__control::placeholder { color: var(--form-placeholder); }

.field__control:focus {
  border-color: var(--blue);
  box-shadow: 0 1px 0 0 var(--blue);
}

/* Native select styled to match the underline inputs */
.field--select { position: relative; }

.field--select .field__control {
  padding-right: 28px;
  cursor: pointer;
}

.field--select .field__control:invalid,
.field--select .field__control.is-placeholder { color: var(--form-placeholder); }

.field--select option { color: var(--ink); background: #ffffff; }

.field--select::after {
  content: '';
  position: absolute;
  right: 6px;
  bottom: 17px;
  width: 8px;
  height: 8px;
  border-right: 1.5px solid var(--form-placeholder);
  border-bottom: 1.5px solid var(--form-placeholder);
  transform: rotate(45deg);
  pointer-events: none;
}

/* Honeypot field: off screen for people, still in the form for bots */
.lead-form__hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Inline validation state (added by site.js after a failed submit) */
.lead-form.was-validated .field__control:invalid {
  border-color: #ff7a7a;
}

.lead-form__submit {
  grid-column: 1 / -1;
  margin-top: 8px;
  width: 100%;
  height: 46px;
  border: 0;
  border-radius: 6px;
  background: var(--blue-bright);
  color: var(--blue-ink);
  font: 600 12.5px / 1 var(--font-body);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.lead-form__submit:hover {
  background: #7ed0fa;
  box-shadow: 0 0 28px rgba(47, 176, 241, 0.45);
}

.lead-form__submit:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
}

.lead-form__submit[disabled] {
  opacity: 0.6;
  cursor: progress;
}

.lead-form__status {
  grid-column: 1 / -1;
  margin: 0;
  min-height: 1.3em;
  font: 400 13px / 1.4 var(--font-body);
  color: #b3bfcc;
}

.lead-form__status[data-state="error"] { color: #ff9a9a; }
.lead-form__status[data-state="success"] { color: #8fe0ff; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  padding: 28px var(--gutter) 36px;
  background: var(--paper);
  border-top: 1px solid var(--rule);
}

.site-footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  font: 400 13px / 1.5 var(--font-body);
  color: var(--ink-muted);
}

.site-footer p { margin: 0; }

.site-footer a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.25s ease;
}

.site-footer a:hover { color: var(--ink); }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 899px) {
  .numbers__grid {
    grid-template-columns: 1fr;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
  }
  .trust { margin-top: 8px; }
}

@media (max-width: 599px) {
  .lead-form__grid { grid-template-columns: 1fr; gap: 24px; }
  .field--wide { grid-column: auto; }
  .lead-form__submit { grid-column: auto; }
  .lead-form__status { grid-column: auto; }
  .trust__logos { gap: 16px 28px; }
  .trust__logo img { height: calc(var(--logo-h, 34px) * 0.85); }
  .site-footer__inner { flex-direction: column; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .trust__logo, .lead-form__submit, .field__control { transition: none; }
}
