/* =========================================================================
   Slingshot v3 · Contact (/contact/). Loads after /styles.css.
   Carbon, like Team's head: the H1 and one column of fields (max 560px)
   on the page grid's left edge; on desktop a quiet carrier body (no amber,
   no tags, drawn once) sits beside it. The stone pill submits. Errors are
   stone text tied to their field, never colour alone. Amber per view: the
   pill's hover / focus bar only.
   ========================================================================= */

.ct {
  position: relative;
  overflow: hidden;
  min-height: 100svh;
  padding-block: calc(var(--bar-h) + clamp(56px, 8vw, 120px))
    clamp(72px, 8vw, 120px);
}
.ct-in {
  position: relative;
  z-index: 1;
  align-items: start;
}
.ct-col {
  max-width: 560px;
}
@media (min-width: 1024px) {
  .ct-col {
    grid-column: 1 / 7;
  }
  .ct-fig {
    grid-column: 7 / 13;
  }
}
.ct-h1 {
  margin-bottom: clamp(36px, 4vw, 56px);
  color: var(--stone);
}

/* ------------------------------------------------------------- fields -- */
.ct-form {
  display: grid;
  gap: 26px;
}
.ct-field {
  display: grid;
  gap: 8px;
}
.ct-label {
  font: 500 var(--fs-ui) / 1.3 var(--f-body);
  color: var(--stone);
}
.ct-input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  background: rgba(245, 240, 235, 0.04);
  color: var(--stone);
  border: 1px solid rgba(245, 240, 235, 0.5);
  border-radius: 2px;
  font: 400 1rem / 1.4 var(--f-body);
  transition:
    border-color var(--dur-fast) var(--ease-out),
    background-color var(--dur-fast) var(--ease-out);
}
.ct-input:hover {
  border-color: rgba(245, 240, 235, 0.78);
}
.ct-input:focus-visible,
.ct-input:focus {
  outline: 2px solid var(--stone);
  outline-offset: 2px;
  border-color: var(--stone);
}
.ct-area {
  min-height: 168px;
  resize: vertical;
}
.ct-select {
  position: relative;
  display: block;
}
.ct-select select {
  appearance: none;
  padding-right: 44px;
  cursor: pointer;
}
.ct-select select:invalid {
  color: var(--on-d-82);
}
.ct-select option {
  background: var(--carbon);
  color: var(--stone);
}
.ct-caret {
  position: absolute;
  right: 16px;
  top: 50%;
  width: 12px;
  height: 12px;
  margin-top: -6px;
  fill: none;
  stroke: var(--stone);
  stroke-width: 1.5;
  pointer-events: none;
}

/* invalid: a heavier stone border and the message under it */
.ct-input[aria-invalid="true"] {
  border-color: var(--stone);
  box-shadow: inset 0 0 0 1px var(--stone);
}
.ct-err {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font: 500 0.875rem / 1.4 var(--f-body);
  color: var(--stone);
}
.ct-err::before {
  content: "";
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  margin-top: 0.45em;
  border: 1px solid var(--stone);
  transform: rotate(45deg);
}

/* the honeypot: out of sight, out of the tab order, out of the a11y tree */
.ct-hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ------------------------------------------------------------- submit -- */
.ct-actions {
  display: grid;
  justify-items: start;
  gap: 14px;
  margin-top: 6px;
}
.ct-submit {
  cursor: pointer;
}
.ct-submit[disabled] {
  opacity: 0.6;
  cursor: progress;
}
.ct-send-err {
  max-width: 46ch;
  font: 400 0.9375rem / 1.5 var(--f-body);
  color: var(--stone);
}
.ct-send-err .ct-mail {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--heat-peach);
  text-underline-offset: 3px;
  cursor: pointer;
}
.ct-send-err .ct-mail:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}
.ct-send-err:empty,
.ct-send-err:has(> [hidden]:only-child) {
  display: none;
}

/* ------------------------------------------------------------ success -- */
.ct-done {
  display: grid;
  justify-items: start;
  gap: 20px;
  padding-top: 28px;
  border-top: 1px solid var(--rule-d);
}
.ct-done[hidden] {
  display: none;
}
.ct-done-h {
  max-width: 22ch;
  color: var(--stone);
  outline-offset: 6px;
}
.ct-back {
  color: var(--stone);
}

/* ------------------------------------------------------------- figure -- */
.ct-fig {
  position: relative;
  margin: 0;
  aspect-ratio: 1 / 1;
  width: min(100%, 560px);
  justify-self: end;
}
@media (max-width: 1023px) {
  .ct-fig {
    display: none;
  }
}
html:not(.js) .ct-fig {
  display: none;
}
