/* Contact page (app/templates/contact.php): editorial introduction, enquiry form beside a personal introduction, next steps.
 * Light mode first; dark mode at the end. */
.ct {
  --ct-ink: #1a1a1a;
  --ct-text: #34324a;
  --ct-muted: #5a5870;
  --ct-line: #e4e8ee;
  --ct-field-line: #848e9f; /* 3.3:1 on white, so field edges are clearly visible */
  --ct-field: #fff;
  --ct-panel: #fff;
  --ct-tint: #f4f6f8;
  --ct-link: #0a6aa8;
  --ct-numeral: #1a8bcb; /* a deeper cyan: 3.7:1 on white */
  --ct-error: #a8221c;
  --ct-error-tint: #fdf0ef;
}
.ct p,
.ct li {
  margin: 0;
  color: var(--ct-text);
}
.ct a {
  font-size: inherit;
}
.ct-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ------------------------------------------------------------------ introduction */
.ct-hero {
  padding: clamp(7.25rem, 11vw, 10rem) 1rem clamp(2.25rem, 4vw, 3rem);
  background-color: var(--ct-tint);
  text-align: center;
}
.ct-hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 56rem;
  margin: 0 auto;
}
.ct-hero .cs-breadcrumbs {
  margin-bottom: 1.25rem;
}
.ct-hero .cs-breadcrumbs ol {
  justify-content: center;
}
.ct-hero .cs-breadcrumbs li,
.ct-hero .cs-breadcrumbs a {
  font-size: 0.8125rem;
}
.ct p.ct-eyebrow {
  margin-bottom: 0.875rem;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ct-link);
}
.ct-title {
  margin: 0;
  max-width: 17em;
  font-size: clamp(2.125rem, 1.2rem + 3.5vw, 3.625rem);
  font-weight: 700;
  line-height: 1.14;
  color: var(--ct-ink);
  text-wrap: balance;
}
.ct p.ct-intro {
  max-width: 36rem;
  margin-top: 1.25rem;
  font-size: clamp(1.0625rem, 0.97rem + 0.4vw, 1.25rem);
  line-height: 1.6;
  color: var(--ct-muted);
  text-wrap: balance;
}

/* ------------------------------------------------------------------ layout */
.ct-main {
  display: flex;
  flex-direction: column;
  max-width: 44rem;
  margin: 0 auto;
  padding: clamp(1.25rem, 5vw, 4rem) 1rem clamp(3.5rem, 7vw, 6rem);
  box-sizing: content-box;
}
.ct-icon {
  flex: none;
  color: var(--ct-link);
}

/* Phones and tablets: direct links above the form */
.ct-quick {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  column-gap: 2rem;
  margin: 0 0 1.75rem;
  padding: 0 0 0.75rem;
  border-bottom: 1px solid var(--ct-line);
  list-style: none;
}
.ct-quick a {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  min-height: 2.75rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ct-ink);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.ct-quick a:hover {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* ------------------------------------------------------------------ enquiry panel */
.ct-panel {
  min-width: 0;
  scroll-margin-top: 7rem;
}
.ct-panel__title {
  margin: 0;
  font-size: clamp(1.625rem, 1.25rem + 1.4vw, 2.25rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--ct-ink);
  text-wrap: balance;
}
.ct p.ct-panel__lead {
  margin-top: 0.625rem;
  margin-bottom: 2rem;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ct-muted);
}
.ct-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.375rem 1.25rem;
}
.ct-field {
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.ct-label {
  display: block;
  margin: 0 0 0.5rem;
  padding: 0;
  font-family: var(--bodyFont);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: normal;
  text-transform: none;
  color: var(--ct-ink);
}
.ct p.ct-label {
  margin-bottom: 0.5rem;
  color: var(--ct-ink);
}
.ct-optional {
  font-weight: 400;
  color: var(--ct-muted);
}
.ct-input {
  width: 100%;
  min-height: 3.25rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--ct-field-line);
  border-radius: 0.5rem;
  background-color: var(--ct-field);
  font-family: var(--bodyFont);
  font-size: 1rem; /* 16px or more stops phones zooming in on focus */
  line-height: 1.5;
  color: var(--ct-ink);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.ct-input:hover {
  border-color: var(--ct-ink);
}
.ct-input:focus {
  outline: 2px solid transparent; /* keeps a visible focus in forced colours mode */
  border-color: var(--ct-link);
  box-shadow: 0 0 0 3px rgba(67, 183, 255, 0.45);
}
.ct-input[aria-invalid="true"] {
  border-color: var(--ct-error);
  box-shadow: 0 0 0 1px var(--ct-error);
}
.ct-input[aria-invalid="true"]:focus {
  box-shadow: 0 0 0 1px var(--ct-error), 0 0 0 4px rgba(67, 183, 255, 0.45);
}
.ct-textarea {
  min-height: 11rem;
  resize: vertical;
}
.ct-textarea::placeholder {
  color: var(--ct-muted);
  opacity: 1;
}
.ct p.ct-hint {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--ct-muted);
}
.ct p.ct-error {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--ct-error);
}

/* Service chips: real checkboxes, drawn as chips */
.ct-services {
  display: block;
}
.ct-services legend {
  float: left; /* lets the legend sit in the normal flow */
  width: 100%;
  margin-bottom: 0.75rem;
}
.ct-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  clear: both;
}
.ct-chip {
  position: relative;
  display: inline-flex;
}
.ct-chip input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.ct-chip span {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.5rem 1.125rem;
  border: 1px solid var(--ct-field-line);
  border-radius: 2rem;
  background-color: var(--ct-field);
  font-size: 0.9375rem;
  line-height: 1.3;
  color: var(--ct-ink);
  pointer-events: none;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.ct-chip svg {
  display: none;
  flex: none;
}
.ct-chip input:hover + span {
  border-color: var(--ct-link);
  color: var(--ct-link);
}
.ct-chip input:checked + span {
  border-color: var(--secondary);
  background-color: var(--secondary);
  font-weight: 600;
  color: var(--primary);
}
.ct-chip input:checked + span svg {
  display: block;
}
.ct-chip input:focus-visible + span {
  outline: 3px solid var(--ct-link);
  outline-offset: 2px;
}

/* Honeypot: invisible to people, tempting to bots */
.ct-hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.ct-form {
  position: relative;
  overflow: visible;
}

/* Verification, submit and privacy */
.ct-verify {
  margin-top: 1.5rem;
  min-height: 6.5rem; /* room for the check, so the button does not jump when it appears */
  scroll-margin-top: 7rem;
}
.ct-verify__problem {
  margin-top: 0.5rem;
}
.ct-verify__problem[hidden] {
  display: none;
}
.ct-retry {
  min-height: 2.75rem;
  margin-top: 0.5rem;
  padding: 0.5rem 1.25rem;
  border: 1px solid var(--ct-link);
  border-radius: 2rem;
  background: transparent;
  font-family: var(--bodyFont);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ct-link);
}
.ct .ct-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  margin-top: 1.75rem;
  border: 0;
  line-height: 3.5rem;
  letter-spacing: 0.04em;
  cursor: pointer;
}
.ct .ct-submit[aria-disabled="true"] {
  opacity: 0.65;
  cursor: progress;
}
.ct .ct-submit:focus-visible,
.ct-retry:focus-visible,
.ct a:focus-visible {
  outline: 3px solid var(--ct-link);
  outline-offset: 3px;
}
.ct-arrow {
  flex: none;
  transition: transform 0.25s;
}
.ct-submit:hover .ct-arrow,
.ct-textlink:hover .ct-arrow {
  transform: translateX(4px);
}
.ct p.ct-privacy {
  margin-top: 1rem;
  font-size: 0.875rem;
  line-height: 1.55;
  text-align: center;
  color: var(--ct-muted);
}
.ct-privacy a,
.ct-alert a,
.ct-hint a {
  font-weight: 600;
  color: var(--ct-link);
  text-underline-offset: 0.15em;
}

/* Outcome messages */
.ct-alert {
  margin-bottom: 1.75rem;
  padding: 1.125rem 1.25rem;
  border-left: 3px solid var(--ct-error);
  border-radius: 0 0.5rem 0.5rem 0;
  background-color: var(--ct-error-tint);
  scroll-margin-top: 7rem;
}
.ct-alert h3 {
  margin: 0 0 0.375rem;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ct-ink);
}
.ct-alert p,
.ct-alert li {
  font-size: 0.9375rem;
  line-height: 1.55;
}
.ct-alert ul {
  margin: 0.5rem 0 0;
  padding-left: 1.125rem;
}
.ct-alert li a {
  display: inline-block;
  padding: 0.125rem 0;
  color: var(--ct-error);
  text-decoration: underline;
}
.ct-state {
  scroll-margin-top: 7rem;
}
/* Focus moves here so the confirmation is announced; it is not a control, so it needs no ring. */
.ct .ct-state:focus,
.ct .ct-state:focus-visible {
  outline: none;
}
.ct-state__mark {
  display: block;
  margin-bottom: 1.25rem;
  color: var(--ct-link);
}
.ct-state > p {
  max-width: 34rem;
  margin-top: 1rem;
  font-size: 1.0625rem;
  line-height: 1.65;
}
.ct-state > p.ct-state__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2rem;
  margin-top: 2rem;
}
.ct-textlink {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  font-weight: 600;
  color: var(--ct-link);
  text-decoration: none;
}
.ct-textlink:hover {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.ct-direct {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}
.ct-direct a {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 2.75rem;
  font-weight: 600;
  color: var(--ct-ink);
}

/* ------------------------------------------------------------------ personal introduction and details */
.ct-about {
  margin-top: clamp(3.5rem, 9vw, 5rem);
  padding-top: clamp(2.5rem, 6vw, 3.5rem);
  border-top: 1px solid var(--ct-line);
}
.ct-about__title {
  margin: 0 0 1rem;
  font-size: clamp(1.625rem, 1.25rem + 1.4vw, 2.25rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--ct-ink);
  text-wrap: balance;
}
.ct-about > p {
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ct-muted);
}
.ct-about > p + p {
  margin-top: 0.875rem;
}
.ct-founder {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas: "photo name" "words words";
  align-items: center;
  column-gap: 1.25rem;
  margin: 2.25rem 0 0;
}
.ct-founder__photo {
  grid-area: photo;
  display: block;
  width: 6rem;
  height: 7.5rem;
  border-radius: 0.5rem;
  object-fit: cover;
}
.ct-founder__name {
  grid-area: name;
}
.ct-founder__name b {
  display: block;
  font-family: var(--headerFont);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--ct-ink);
}
.ct-founder__name span {
  display: block;
  margin-top: 0.125rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ct-link);
}
.ct-founder__words {
  grid-area: words;
  margin: 1.25rem 0 0;
  padding: 0 0 0 1.25rem;
  border-left: 3px solid var(--secondary);
}
.ct-founder__words p {
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ct-ink);
}
.ct-details {
  display: flex;
  flex-direction: column;
  margin: 2.25rem 0 0;
  padding: 0;
  border-top: 1px solid var(--ct-line);
  list-style: none;
}
.ct-details li {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--ct-line);
}
.ct-details li.ct-details__wide {
  display: none; /* shown above the form on narrower screens */
}
.ct-details .ct-icon {
  margin-top: 0.125rem;
}
.ct-details div {
  min-width: 0;
}
.ct-details__label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ct-muted);
}
.ct-details a,
.ct-details__value {
  display: block;
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.6;
  color: var(--ct-ink);
  overflow-wrap: anywhere;
}
.ct-details a {
  text-decoration: none;
}
.ct-details a:hover {
  color: var(--ct-link);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.ct-details__note {
  display: block;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--ct-muted);
}
/* Without the form (sent or unavailable) there are no quick links, so the details always show. */
.ct-main:not(:has(.ct-quick)) .ct-details li.ct-details__wide {
  display: flex;
}

/* ------------------------------------------------------------------ what happens next */
.ct-next {
  padding: 0 1rem;
}
.ct-next__inner {
  max-width: 44rem; /* lines up with the form below 64rem */
  margin: 0 auto;
  padding: clamp(3rem, 6vw, 5rem) 0 clamp(1rem, 3vw, 2rem);
  border-top: 1px solid var(--ct-line);
  text-align: center;
}
.ct-next__title {
  margin: 0;
  font-size: clamp(1.625rem, 1.25rem + 1.4vw, 2.25rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--ct-ink);
  text-wrap: balance;
}
.ct-steps {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
  max-width: 28rem;
  margin: clamp(2.25rem, 4vw, 3.25rem) auto 0;
  padding: 0;
  list-style: none;
  text-align: left;
}
.ct-step {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr);
  column-gap: 1rem;
  padding-top: 1.25rem;
  border-top: 2px solid var(--ct-line);
}
.ct-step__num {
  grid-row: span 2;
  font-family: var(--headerFont);
  font-size: 2.25rem;
  font-weight: 600;
  line-height: 1;
  color: var(--ct-numeral);
}
.ct-step__title {
  margin: 0 0 0.375rem;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ct-ink);
}
.ct-step p {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ct-muted);
}

/* ------------------------------------------------------------------ wider screens */
@media only screen and (min-width: 36rem) {
  .ct-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ct-field--wide {
    grid-column: 1 / -1;
  }
}
@media only screen and (min-width: 48rem) {
  .ct-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(1.5rem, 3vw, 3rem);
    max-width: none;
  }
  .ct-step {
    display: block;
  }
  .ct-step__num {
    display: block;
    margin-bottom: 0.875rem;
    font-size: 2.75rem;
  }
}
@media only screen and (min-width: 64rem) {
  .ct-hero {
    padding-top: clamp(9.25rem, 11vw, 10rem); /* clear of the floating header */
  }
  .ct-next__inner {
    max-width: 80rem;
  }
  .ct-main {
    display: grid;
    grid-template-columns: minmax(0, 40fr) minmax(0, 60fr);
    grid-template-areas: "about panel";
    align-items: start;
    column-gap: clamp(3rem, 5.5vw, 6rem);
    max-width: 80rem;
    padding-top: clamp(3.5rem, 5vw, 5rem);
  }
  .ct-quick {
    display: none;
  }
  .ct-about {
    grid-area: about;
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
  }
  .ct-panel {
    grid-area: panel;
    padding: clamp(2rem, 3.2vw, 3rem);
    border: 1px solid var(--ct-line);
    border-top: 3px solid var(--secondary);
    border-radius: 0.875rem;
    background-color: var(--ct-panel);
  }
  .ct-details li.ct-details__wide {
    display: flex;
  }
  .ct .ct-submit {
    display: inline-flex;
    width: auto;
    min-width: 17rem;
  }
  .ct p.ct-privacy {
    text-align: left;
  }
}

/* ------------------------------------------------------------------ dark mode */
html.dark-mode .ct {
  --ct-ink: #fafbfc;
  --ct-text: #d3dce5;
  --ct-muted: #a9b8c7;
  --ct-line: #1d3547;
  --ct-field-line: #59748b;
  --ct-field: #06151f;
  --ct-panel: #0a1a27;
  --ct-tint: #0a1a27;
  --ct-link: #43b7ff;
  --ct-numeral: #43b7ff;
  --ct-error: #ff9c94;
  --ct-error-tint: #2a1518;
}
html.dark-mode .ct p,
html.dark-mode .ct li {
  color: var(--ct-text);
}
html.dark-mode .ct h1,
html.dark-mode .ct h2,
html.dark-mode .ct h3,
html.dark-mode .ct p.ct-label,
html.dark-mode .ct .ct-founder__words p {
  color: var(--ct-ink);
}
html.dark-mode .ct p.ct-eyebrow {
  color: var(--ct-link);
}
html.dark-mode .ct p.ct-intro,
html.dark-mode .ct p.ct-panel__lead,
html.dark-mode .ct p.ct-hint,
html.dark-mode .ct p.ct-privacy,
html.dark-mode .ct .ct-about > p,
html.dark-mode .ct .ct-step p {
  color: var(--ct-muted);
}
html.dark-mode .ct p.ct-error {
  color: var(--ct-error);
}
html.dark-mode .ct-hero .cs-breadcrumbs li,
html.dark-mode .ct-hero .cs-breadcrumbs a {
  color: var(--ct-muted);
}
html.dark-mode .ct-input {
  color-scheme: dark; /* the browser's own control details (scrollbars, autofill) follow */
}
@media (prefers-reduced-motion: reduce) {
  .ct-arrow,
  .ct-input,
  .ct-chip span {
    transition: none;
  }
}
@media (forced-colors: active) {
  .ct-chip input:checked + span {
    outline: 2px solid Highlight;
  }
}
