/*
 * The contact page.
 *
 * The column beside the form held a stock photograph of a man looking puzzled.
 * It carries what someone about to write to a company actually wants to know
 * instead: who reads the message, what comes back, and the two faster routes
 * for the two questions people arrive with.
 */

.contact {
  background: var(--sg-ground);
}

.contact .contact-band {
  background: var(--sg-sunk);
  border-block: 1px solid var(--sg-line);
}

/* Hero -------------------------------------------------------------------- */

.contact .contact-hero {
  position: relative;
  isolation: isolate;
  padding-block: clamp(2.25rem, 4vw, 3.875rem) clamp(1.75rem, 3vw, 2.875rem);
}

.contact .contact-hero__inner {
  position: relative;
  z-index: 1;
}

.contact .contact-hero__title {
  margin-top: 0.875rem;
  max-width: 16ch;
}

.contact .contact-hero__lead {
  max-width: 52ch;
}

/* The two columns ---------------------------------------------------------- */

.contact .contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: start;
  padding-bottom: clamp(3rem, 5.5vw, 5.5rem);
}

.contact .contact-card {
  padding: clamp(1.5rem, 3vw, 2rem);
  border: 1px solid var(--sg-line);
  border-radius: var(--sg-radius-lg);
  background: var(--sg-raised);
  box-shadow: var(--sg-shadow);
}

.contact .contact-card__lead {
  margin: 0.5625rem 0 1.375rem;
  font-size: 0.9rem;
  color: var(--sg-body);
}

/* The form ------------------------------------------------------------------ */

.contact .contact-field {
  margin: 0 0 1rem;
}

.contact .contact-field label {
  display: block;
  margin-bottom: 0.4375rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--sg-ink);
}

.contact .contact-field input,
.contact .contact-field textarea,
.contact .contact-select select {
  display: block;
  width: 100%;
  padding: 0.6875rem 0.875rem;
  border: 1px solid var(--sg-line);
  border-radius: var(--sg-radius);
  background: var(--sg-ground);
  color: var(--sg-ink);
  font-family: var(--sg-font);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.contact .contact-field textarea {
  resize: vertical;
  min-height: 8rem;
}

.contact .contact-field input:focus-visible,
.contact .contact-field textarea:focus-visible,
.contact .contact-select select:focus-visible {
  outline: 2px solid var(--sg-up-text);
  outline-offset: 1px;
  border-color: var(--sg-up-text);
}

/* A native select, with the platform's own arrow replaced rather than the
   control: the keyboard and the mobile picker stay exactly as they were. */
.contact .contact-select {
  position: relative;
  display: block;
}

.contact .contact-select select {
  appearance: none;
  padding-right: 2.5rem;
}

.contact .contact-select svg {
  position: absolute;
  right: 0.875rem;
  top: 50%;
  translate: 0 -50%;
  width: 18px;
  height: 18px;
  pointer-events: none;
  color: var(--sg-soft);
}

.contact .contact-send {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.375rem;
}

.contact .contact-send small {
  max-width: 32ch;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--sg-soft);
}

.contact .contact-error {
  margin: 0 0 1rem;
  padding: 0.75rem 0.875rem;
  border-radius: var(--sg-radius);
  background: oklch(0.665 0.185 26 / 0.1);
  font-size: 0.875rem;
  color: var(--sg-down-text);
}

.contact .contact-sent {
  padding: 1.75rem 0 0.5rem;
}

.contact .contact-sent__title {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: var(--sg-track-tight);
  color: var(--sg-ink);
}

.contact .contact-sent p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--sg-body);
}

/* What happens next --------------------------------------------------------- */

.contact .contact-aside {
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
}

.contact .contact-next {
  padding: 1.5rem 1.625rem;
  border: 1px solid var(--sg-line);
  border-radius: var(--sg-radius-lg);
}

.contact .contact-next h2 {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.018em;
}

.contact .contact-next ol {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.contact .contact-next li {
  position: relative;
  counter-increment: step;
  padding: 0 0 1rem 2.125rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--sg-body);
}

.contact .contact-next li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--sg-line);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--sg-soft);
}

/* The rule joins one marker to the next and stops at the last one, rather
   than trailing off the end of the list. */
.contact .contact-next li:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 11px;
  top: 26px;
  bottom: 6px;
  width: 1px;
  background: var(--sg-line);
}

.contact .contact-next li:last-child {
  padding-bottom: 0;
}

.contact .contact-next b {
  color: var(--sg-ink);
  font-weight: 600;
}

.contact .contact-route {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  padding: 1.25rem 1.375rem;
  border: 1px solid var(--sg-line);
  border-radius: var(--sg-radius-lg);
  background: var(--sg-raised);
}

.contact .contact-route__icon {
  flex: none;
  margin-top: 2px;
  color: var(--sg-soft);
}

.contact .contact-route__icon svg {
  display: block;
  width: 20px;
  height: 20px;
}

.contact .contact-route h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.contact .contact-route p {
  margin: 0.3125rem 0 0.75rem;
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--sg-body);
}

/* The call ------------------------------------------------------------------- */

.contact .contact-call {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem 2.5rem;
  padding: clamp(1.75rem, 3.5vw, 2.125rem) clamp(1.75rem, 3.5vw, 2.5rem);
}

.contact .contact-call h2 {
  max-width: 22ch;
}

.contact .contact-call p {
  margin: 0.75rem 0 0;
  max-width: 54ch;
  font-size: 0.9375rem;
  color: var(--sg-panel-body);
}

.contact .contact-call .sg-btn {
  margin-left: auto;
}

/* Narrow ----------------------------------------------------------------------- */

@media (max-width: 899px) {
  .contact .contact-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .contact .contact-call .sg-btn {
    margin-left: 0;
  }
}
