/* ============================================================
   CONTACT PAGE — split screen.
   Left: navy side with the headline, "what happens next" and the
   contact details. Right: the form card on off-white, visible
   without scrolling. Two forms behind a switch (claim a free audit /
   ask a question): js/contact.js adds .is-tabs to .ct-inner; without
   it both forms show one after the other.
   On phones the order is headline, form, what happens next.
   ============================================================ */

.ct-split { padding-top: var(--nav-height); background: var(--off-white); overflow: hidden; }
.ct-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  grid-template-rows: auto 1fr;
}

/* --- Navy side: two blocks that read as one panel. The shadow carries the
       navy out to the left edge of the screen; the clip stops it at the
       middle. --- */
.ct-intro,
.ct-next { grid-column: 1; padding-right: 4rem; background: var(--navy); box-shadow: 0 0 0 100vmax var(--navy); color: var(--white); }
.ct-intro { grid-row: 1; padding-top: 72px; clip-path: inset(-100vmax 0 0 -100vmax); }
.ct-next { grid-row: 2; padding-top: 3rem; padding-bottom: 96px; clip-path: inset(-2px 0 -100vmax -100vmax); }

.ct-label {
  display: block;
  margin: 0 0 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--light-blue);
}
.ct-intro h1 { margin: 0 0 1.1rem; font-size: clamp(2.4rem, 4.6vw, 3.9rem); line-height: 1.05; letter-spacing: -0.03em; color: var(--white); }
.ct-intro p { max-width: 26rem; font-size: 1.12rem; line-height: 1.6; color: rgba(255, 255, 255, 0.85); }

/* What happens next: three numbered steps */
.ct-steps { margin: 0; padding: 0; list-style: none; counter-reset: ct-step; }
.ct-steps li {
  position: relative;
  counter-increment: ct-step;
  padding: 0 0 1.4rem 3.4rem;
  font-size: 0.98rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.8);
}
.ct-steps li::before {
  content: counter(ct-step);
  position: absolute;
  left: 0;
  top: -0.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.3rem;
  height: 2.3rem;
  border: 1px solid var(--light-blue);
  border-radius: 50%;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--white);
}
/* dotted line joining the step numbers */
.ct-steps li:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 1.15rem;
  top: 2.4rem;
  bottom: 0.3rem;
  border-left: 2px dotted rgba(123, 159, 212, 0.6);
}
.ct-steps strong { display: block; font-size: 1.05rem; font-weight: 700; color: var(--white); }

/* Contact details */
.ct-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; margin: 1.4rem 0 0; padding-top: 1.6rem; border-top: 1px solid rgba(255, 255, 255, 0.2); }
.ct-details dt { margin-bottom: 0.35rem; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--light-blue); }
.ct-details dd { margin: 0; font-size: 1rem; font-weight: 600; line-height: 1.4; color: var(--white); overflow-wrap: anywhere; }
.ct-details a { color: inherit; border-bottom: 1px solid var(--light-blue); transition: color var(--transition); }
.ct-details a:hover,
.ct-details a:focus-visible { color: var(--light-blue); }

/* --- Form side --- */
.ct-inner { grid-column: 2; grid-row: 1 / span 2; align-self: start; padding: 56px 0 96px 4rem; }

/* The switch between the two forms */
.ct-doors { display: none; }
.ct-inner.is-tabs .ct-doors {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.4rem;
  padding: 0.4rem;
  border: 1px solid var(--border);
  border-bottom: 0;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: var(--white);
}
.ct-door {
  padding: 0.9rem 1rem;
  border: 0;
  border-radius: calc(var(--radius-lg) - 0.4rem);
  background: var(--off-white);
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.ct-door:hover { background: var(--border); }
.ct-door[aria-selected="true"] { background: var(--navy); color: var(--white); }
.ct-door:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* Form card */
.ct-panel + .ct-panel { margin-top: 2rem; }
.ct-inner.is-tabs .ct-panel + .ct-panel { margin-top: 0; }
.ct-form {
  padding: 2.25rem 2.25rem 2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow);
}
.ct-inner.is-tabs .ct-form { padding-top: 1.6rem; border-top: 0; border-radius: 0 0 var(--radius-lg) var(--radius-lg); }

.ct-form-title { margin: 0 0 0.4rem; font-size: clamp(1.5rem, 2.6vw, 1.9rem); line-height: 1.15; letter-spacing: -0.02em; }
.ct-form-note { margin: 0 0 1.5rem; font-size: 1rem; }

.ct-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.25rem; }
.ct-form .form-group { margin-bottom: 1.1rem; }
.ct-form label,
.ct-choice legend { display: block; margin-bottom: 0.4rem; font-size: 0.88rem; font-weight: 700; color: var(--navy); }
.ct-optional { font-weight: 500; color: var(--text-muted); }
.ct-form input[type="text"],
.ct-form input[type="email"],
.ct-form input[type="tel"],
.ct-form textarea { width: 100%; }
.ct-form textarea { min-height: 5.5rem; }

/* "What should we look at?" as three pills */
.ct-choice { margin: 0 0 1.2rem; padding: 0; border: 0; min-width: 0; }
.ct-pills { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.ct-pills input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.ct-pills label {
  margin: 0;
  padding: 0.65rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--off-white);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.ct-pills label:hover { border-color: var(--navy); }
.ct-pills input:checked + label { background: var(--navy); border-color: var(--navy); color: var(--white); }
.ct-pills input:focus-visible + label { outline: 2px solid var(--blue); outline-offset: 2px; }

.ct-submit { width: 100%; justify-content: center; margin-top: 0.4rem; }
.ct-privacy { margin: 1rem 0 0; font-size: 0.85rem; text-align: center; }
.ct-privacy a { font-weight: 700; color: var(--blue); border-bottom: 1px solid var(--light-blue); }
.ct-privacy a:hover,
.ct-privacy a:focus-visible { color: var(--navy); border-color: var(--navy); }

/* Spam trap: real visitors never see or reach this field */
.ct-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* --- Tablets and phones: one column — headline, form, what happens next --- */
@media (max-width: 960px) {
  .ct-grid { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; }
  .ct-intro,
  .ct-next,
  .ct-inner { grid-column: 1; grid-row: auto; }
  .ct-intro { padding: 48px 0 44px; clip-path: inset(0 -100vmax); }
  .ct-next { padding: 44px 0 56px; clip-path: inset(0 -100vmax); }
  .ct-inner { padding: 36px 0 48px; }
}
@media (max-width: 700px) {
  .ct-door { padding: 0.85rem 0.5rem; font-size: 0.9rem; }
  .ct-form { padding: 1.6rem 1.3rem 1.5rem; }
  .ct-row { grid-template-columns: minmax(0, 1fr); }
  .ct-details { grid-template-columns: minmax(0, 1fr); gap: 1.1rem; }
}
