/* The Enterprise enquiry page: the homepage's Enterprise card opened up into
   its form. The same charcoal, cut corner and faint knight, on the paper page
   with a grey plane on the site's 13deg slant behind it. What a team gets
   beyond the individual plans on the left, the questions on the right; one
   column below 1100px, and on phones only the headline and one line over the
   questions. */
.page-enterprise {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
}

.enquiry-page {
  position: relative;
  isolation: isolate;
  flex: 1;
  overflow-x: clip;
  padding: clamp(2.5rem, 3.5vw, 4rem) var(--gutter) clamp(3rem, 5vw, 5rem);
}

/* A page layer, not a box: it starts under the panel and runs off the right,
   a shade deeper than the site's stone, darkest at its slanted edge, which
   casts a soft shadow back onto the paper. */
.enquiry-page::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--plane, 58%);
  right: -20%;
  z-index: -1;
  background: linear-gradient(90deg, #c4c5c8, #d3d4d7 45%, #dcdde0);
  box-shadow: -1.5rem 0 3rem -1rem rgba(20, 19, 18, 0.22);
  transform: skewX(-13deg);
  transform-origin: top;
}

.enquiry-card {
  --cut: clamp(2.75rem, 4.7vw, 5.5rem);
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: clamp(2.5rem, 5vw, 6rem);
  max-width: 76rem;
  margin: 0 auto;
  padding: clamp(2.5rem, 4vw, 4.5rem) clamp(2rem, 4.5vw, 5rem);
  overflow: hidden;
  background: var(--char);
  color: var(--on-char);
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
}

/* The knight, faint in the cut corner as on the homepage card, where the card
   is one column; side by side the email field holds that corner. */
.enquiry-card::before {
  content: '';
  position: absolute;
  top: 1.5rem;
  right: -4%;
  z-index: -1;
  width: 26%;
  aspect-ratio: 318 / 455;
  background: linear-gradient(160deg, rgba(241, 237, 230, 0.09), rgba(241, 237, 230, 0.02) 75%);
  -webkit-mask: url('../knight-logo.png') center / contain no-repeat;
  mask: url('../knight-logo.png') center / contain no-repeat;
}

.enquiry-card :focus-visible {
  outline-color: var(--paper);
}

.enquiry-head {
  align-self: start;
}

.enquiry-kicker {
  font-size: 0.6875rem;
  color: var(--on-char-soft);
}

.enquiry-title {
  margin-top: clamp(1.25rem, 2vw, 1.75rem);
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.375rem, 3.3vw, 3.5rem);
  line-height: 1.04;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

/* Its turn in italic, in ink, as "Frank adjusts." is on the homepage. */
.enquiry-title em {
  font-style: italic;
}

.enquiry-intro {
  max-width: 28em;
  margin-top: clamp(1.25rem, 1.8vw, 1.75rem);
  font-family: var(--serif);
  font-size: var(--text-body);
  line-height: 1.55;
  color: var(--on-char-soft);
}

/* The homepage card's numbered list, ruled, at a reading size. */
.enquiry-points {
  margin-top: 1rem;
  list-style: none;
  counter-reset: point;
}

.enquiry-points li {
  display: grid;
  grid-template-columns: 3.25rem minmax(0, 1fr);
  align-items: baseline;
  padding: 0.75rem 0;
  font-family: var(--serif);
  font-size: clamp(1.125rem, 1.25vw, 1.375rem);
  line-height: 1.35;
  counter-increment: point;
}

.enquiry-points li + li {
  border-top: 1px solid var(--on-char-rule);
}

.enquiry-points li::before {
  content: counter(point, decimal-leading-zero);
  font: 500 0.6875rem/1 var(--sans);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.16em;
  color: var(--on-char-soft);
}

/* ── The form ── */
.enquiry {
  display: grid;
  gap: 1.5rem;
}

.enquiry[hidden] {
  display: none;
}

.enquiry__field {
  display: grid;
  gap: 0.6rem;
}

.enquiry__label {
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.35;
}

.enquiry__optional {
  margin-left: 0.5rem;
  font: 500 0.625rem/1 var(--sans);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--on-char-soft);
}

.enquiry__help {
  margin-top: -0.25rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--on-char-soft);
}

.enquiry__note {
  font-size: 0.875rem;
  font-weight: 500;
  color: #ffc2b5;
}

.enquiry__note:empty {
  display: none;
}

.enquiry input:not([type='checkbox']) {
  width: 100%;
  height: 3.25rem;
  padding: 0 1.1rem;
  border: 0;
  border-radius: 2px;
  background: var(--paper);
  font: 400 1.0625rem/1.4 var(--serif);
  color: var(--ink);
}

/* A head count, not a size band: a short field for a short number. */
.enquiry input.enquiry__count {
  width: 8rem;
  appearance: textfield;
}

@media (min-width: 1101px) {
  .enquiry-card::before {
    display: none;
  }
}

.enquiry__count::-webkit-inner-spin-button,
.enquiry__count::-webkit-outer-spin-button {
  margin: 0;
  appearance: none;
}

.enquiry ::placeholder {
  color: var(--ink-mute);
}

.enquiry input:not([type='checkbox'])[aria-invalid='true'] {
  box-shadow: inset 0 0 0 2px #e8735f;
}

.enquiry fieldset {
  min-width: 0;
  border: 0;
}

/* The CLIs as one ticked line: a fine square box beside each name. A legend
   sits outside the fieldset's grid, so its gap is set by hand. */
.enquiry__checks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.75rem;
  margin-top: 0.6rem;
}

.enquiry__checks label {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
}

.enquiry__checks input {
  flex: none;
  width: 1.125rem;
  height: 1.125rem;
  margin: 0;
  border: 1px solid rgba(241, 237, 230, 0.55);
  border-radius: 2px;
  appearance: none;
  cursor: pointer;
  transition:
    background-color var(--dur) var(--ease),
    border-color var(--dur) var(--ease);
}

.enquiry__checks input:checked {
  border-color: var(--paper);
  background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23141312' stroke-width='2.5'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 0.85rem no-repeat;
}

.enquiry__checks input[aria-invalid='true'] {
  border-color: #e8735f;
}

/* The site's primary red, its arrow in the slanted bay, across the column. */
.enquiry .btn--primary {
  width: 100%;
  height: 3.5rem;
  margin-top: 0.25rem;
  font-size: 1.0625rem;
}

.enquiry .btn--primary:disabled {
  cursor: progress;
  opacity: 0.8;
}

.enquiry__status {
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--on-char-soft);
}

.enquiry__status:empty {
  display: none;
}

.enquiry__status[data-state='error'] {
  font-weight: 600;
  color: var(--on-char);
}

/* Sent: the form gives way to the confirmation slip (css/confirm.css), held
   level with the headline's side. */
.enquiry-done {
  align-self: center;
}

/* ── Stacked: what a team gets over the questions ── */
@media (max-width: 1100px) {
  .enquiry-card {
    grid-template-columns: minmax(0, 1fr);
    max-width: 44rem;
  }

  .enquiry,
  .enquiry-done {
    margin-top: clamp(2.25rem, 4.5vw, 3rem);
  }

  .enquiry-page {
    --plane: 66%;
  }
}

/* Phones: the card is the page, full bleed under the bar, and the headline's
   one line leads straight into the questions. */
@media (max-width: 767px) {
  .enquiry-page {
    display: flex;
    padding: 0;
  }

  .enquiry-page::before,
  .enquiry-benefits {
    display: none;
  }

  /* The card fills the screen; its rows pack at the top, so once sent the
     slip sits under the headline rather than in the middle of the screen. */
  .enquiry-card {
    --cut: 2.25rem;
    flex: 1;
    align-content: start;
    max-width: none;
    padding: 2.5rem var(--gutter) 3rem;
  }
}
