/*
 * Contact page (page-contact.php), 2026 redesign (Contact.dc.html). The hero
 * layout comes from newsletters.css (.nlx-hero); this file styles the
 * topic card, the enquiry form and its thank-you panel.
 */

.cx-hero-button {
  align-self: flex-start;
}

.cx-hero-button svg {
  width: 16px;
  height: 16px;
}

.cx-hero :focus-visible,
.cx-form-section :focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
  box-shadow: none;
}

/* The topic card: six tiles, two a row, each opening the form on its topic
   (no email address: page-contact.php), then the office and phone as quiet
   links under a line. */
.cx-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 520px;
  padding: 28px;
  font-family: var(--font-ui);
}

.cx-topics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 1fr; /* Every row as tall as the tallest tile (a name on two lines). */
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cx-topic {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 100%;
  padding: 12px 14px 12px 12px;
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, .7);
  color: var(--ink-strong);
  transition: background-color .15s ease, box-shadow .15s ease, color .15s ease;
}

.cx-topic:hover {
  background: #fff;
  box-shadow: var(--shadow-card);
  color: var(--purple);
}

.cx-topic-icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-round);
  background: var(--purple-tint-ui);
  color: var(--purple);
}

.cx-topic-icon.is-cyan { background: var(--cyan-tint); color: var(--cyan-ink); }
.cx-topic-icon.is-orange { background: var(--orange-wash); color: var(--orange-ink); }

.cx-topic-icon svg {
  width: 18px;
  height: 18px;
}

.cx-topic-name {
  flex: 1 1 auto;
  min-width: 0;
  font-size: var(--text-ui);
  font-weight: 700;
  line-height: 1.3;
}

/* The arrow shows the tile leads somewhere; it slides in on hover. */
.cx-topic-go {
  flex-shrink: 0;
  display: grid;
  color: var(--purple);
  opacity: .35;
  transition: opacity .15s ease, transform .15s ease;
}

.cx-topic-go svg {
  width: 14px;
  height: 14px;
}

.cx-topic:hover .cx-topic-go {
  opacity: 1;
  transform: translateX(2px);
}

.cx-card-foot {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid rgba(42, 12, 102, .08);
}

.cx-foot-link {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted-strong);
  font-size: var(--text-ui-sm);
  line-height: 1.45;
}

.cx-foot-link > svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  color: var(--purple);
}

.cx-foot-link:hover {
  color: var(--ink-strong);
}

.cx-foot-map {
  flex-shrink: 0;
  margin-left: auto;
  color: var(--purple);
  font-size: var(--text-ui-xs);
  font-weight: 700;
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  .cx-topic,
  .cx-topic-go {
    transition: none;
  }

  .cx-topic:hover .cx-topic-go {
    transform: none;
  }
}

/* Enquiry form ---------------------------------------------------------------- */
.cx-form-section {
  padding: 96px 0;
  background: #fff;
  color: var(--ink-strong);
  font-family: var(--font-ui);
}

/* Its label 96px under the hero, as on every page (site-wide uniformity review, 2026-10-29: the aside's 12px top
   padding put it at 108px). */
.cx-form-section .cx-form-aside {
  padding-top: 0;
}

.cx-form-grid {
  width: min(var(--max-wide), calc(100% - 42px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  align-items: start;
  gap: 64px;
}

.cx-form-aside {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-top: 12px;
}

.cx-label {
  color: var(--purple);
  font-size: var(--text-ui-xs);
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.cx-form-aside h2 {
  max-width: none;
  margin: 0;
  color: var(--ink-strong);
  font-family: var(--font-display);
  font-size: var(--text-section);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.02em;
}

.cx-notes {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 8px;
}

.cx-note {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin: 0;
  padding: 18px;
  border-radius: var(--radius-xl);
  background: var(--surface-soft);
  color: var(--muted-ui);
  font-size: var(--text-ui);
  line-height: 1.55;
}

.cx-note strong {
  color: var(--ink-strong);
}

.cx-note-icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-round);
  background: var(--purple-tint-ui);
  color: var(--purple);
}

.cx-note-icon.is-cyan {
  background: var(--cyan-tint);
  color: var(--cyan-ink);
}

.cx-note-icon svg {
  width: 18px;
  height: 18px;
}

/* The form card (and the thank-you panel that replaces it). */
.cx-form,
.cx-sent {
  padding: 36px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-card);
  background: #fff;
  box-shadow: var(--shadow-menu);
}

.cx-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.cx-form[hidden],
.cx-sent[hidden] {
  display: none;
}

.cx-form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.cx-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cx-field label {
  color: var(--ink-strong);
  font-size: var(--text-ui-sm);
  font-weight: 700;
}

.cx-req {
  color: var(--orange-ink);
}

.cx-field input,
.cx-field select,
.cx-field textarea {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  border: 1px solid var(--line-control);
  border-radius: var(--radius-ui);
  background: var(--surface-soft);
  color: var(--ink-strong);
  font-family: var(--font-ui);
  font-size: var(--text-ui);
  transition: border-color .15s ease, box-shadow .15s ease;
}

.cx-field select {
  padding: 0 14px;
}

.cx-field textarea {
  height: auto;
  min-height: 150px;
  padding: 14px 16px;
  line-height: 1.55;
  resize: vertical;
}

.cx-field ::placeholder {
  color: var(--muted-strong);
  opacity: 1;
}

.cx-field input:focus,
.cx-field select:focus,
.cx-field textarea:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(79, 23, 168, .15);
  outline: none;
}

.cx-field input:user-invalid,
.cx-field select:user-invalid,
.cx-field textarea:user-invalid {
  border-color: var(--orange-ink);
}

.cx-consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--muted-ui);
  font-size: var(--text-ui-sm);
  line-height: 1.5;
}

.cx-consent input {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--purple);
}

.cx-consent a {
  color: var(--purple);
  font-weight: 700;
}

.cx-form-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 4px;
}

.cx-submit {
  margin-left: auto;
  border: 0;
  cursor: pointer;
}

.cx-submit svg {
  width: 16px;
  height: 16px;
}

.cx-submit:disabled {
  opacity: .6;
  cursor: progress;
}

/* Thank-you panel. */
.cx-sent {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  padding: 48px 36px;
}

.cx-sent:focus {
  outline: none;
}

.cx-sent-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-round);
  background: var(--purple-tint-ui);
  color: var(--purple);
}

.cx-sent-icon svg {
  width: 26px;
  height: 26px;
}

.cx-sent h2 {
  margin: 0;
  color: var(--ink-strong);
  font-family: var(--font-display);
  font-size: var(--text-section-sm);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.02em;
}

.cx-sent p {
  margin: 0;
  color: var(--muted-ui);
  font-size: var(--text-ui-md);
  line-height: 1.65;
}

.cx-sent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 6px;
}

.cx-sent-actions .pill-button {
  height: var(--ds-button-md);
  padding: 0 22px;
  font-size: var(--text-ui);
}

/* Spam protection and outcome messages (also used by the no-JavaScript submission). */
.honeypot {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.form-status {
  margin: 0;
  color: var(--purple);
  font-size: var(--text-ui-sm);
  font-weight: 600;
}

.form-status:empty {
  display: none;
}

.form-status.is-sent {
  padding: 12px 14px;
  border-left: 4px solid var(--cyan-ink);
  border-radius: 0 var(--radius-ui) var(--radius-ui) 0;
  background: var(--cyan-tint);
  color: var(--ink-strong);
}

.form-status.is-error {
  padding: 12px 14px;
  border-left: 4px solid var(--orange-ink);
  border-radius: 0 var(--radius-ui) var(--radius-ui) 0;
  background: var(--orange-tint);
  color: var(--ink-strong);
}

.turnstile {
  min-height: 65px;
}

/* Responsive ------------------------------------------------------------------ */
/* Tablets: the card spans the width under the text, the tiles three a row. */
@media (min-width: 768px) and (max-width: 1180px) {
  .cx-card {
    max-width: none;
  }

  .cx-topics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1000px) {
  .cx-form-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .cx-form-aside {
    padding-top: 0;
  }
}

@media (max-width: 767px) {
  .cx-hero-button {
    align-self: stretch;
    justify-content: center;
    height: var(--ds-button-md); /* Every page's hero button size on phones (uniformity review, 2026-10-29). */
  }

  .cx-card {
    gap: 14px;
    padding: 20px;
  }

  /* Phones: the icon above the name, so longer names ("Events and learning") fit two a row. */
  .cx-topic {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 12px;
    border-radius: var(--radius-ui);
  }

  .cx-topic-icon {
    width: 32px;
    height: 32px;
  }

  .cx-topic-icon svg {
    width: 16px;
    height: 16px;
  }

  .cx-topic-name {
    font-size: var(--text-ui-sm);
  }

  .cx-topic-go {
    display: none;
  }

  .cx-foot-link {
    font-size: var(--text-ui-xs);
  }

  .cx-form-section {
    padding: 40px 0 44px;
  }

  .cx-form-aside {
    gap: 14px;
  }

  .cx-label {
    font-size: var(--text-ui-3xs);
  }

  .cx-form-aside h2 {
    font-size: var(--text-section-sm);
  }

  .cx-note {
    gap: 12px;
    padding: 14px;
    font-size: var(--text-ui-sm);
  }

  .cx-form,
  .cx-sent {
    padding: 22px;
    border-radius: var(--radius-xl);
  }

  .cx-form {
    gap: 16px;
  }

  .cx-form-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .cx-field input,
  .cx-field select {
    height: var(--ds-button-md);
  }

  .cx-form-foot {
    flex-direction: column;
    align-items: stretch;
  }

  .cx-submit {
    justify-content: center;
    margin-left: 0;
  }

  .cx-sent h2 {
    font-size: var(--text-ui-step);
  }

  .cx-sent p {
    font-size: var(--text-ui-sm);
  }

  .cx-sent-actions {
    flex-direction: column;
    align-self: stretch;
  }

  .cx-sent-actions .pill-button {
    justify-content: center;
  }
}
