/* Contact us — dark, photo column. templates/contact/index.twig (topics) and contact/_topic.twig (forms).
   Figma: Catalog — Contact › "Contact — 03a Topics (dark, photo column)", 05-01a … 05-11, mobile M1–M5. */
/* the dark area runs down to the footer even when the page is short (e.g. "Call" chosen) */
.ctd-page main {
  display: flex;
  flex-direction: column;
  background: #0e1619;
}
.ctd-page .ctd {
  flex: 1 0 auto;
}
.ctd {
  --ctd-bg: #0e1619;
  --ctd-card: rgba(24, 36, 40, 0.2);
  --ctd-panel: #182428;
  --ctd-line: #324248;
  --ctd-tile: #282218;
  --ctd-orange: #ff8c00;
  --ctd-teal: #6cc4cb;
  --ctd-soft: #aab6bb;
  --ctd-dim: #96a2a7;
  --ctd-field: #1e2b30;
  --ctd-field-line: #54676e;
  overflow: hidden;
  background: var(--ctd-bg);
  color: #fff;
  color-scheme: dark;
}
.ctd__grid {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  column-gap: 40px;
  padding: 56px var(--gutter) 96px;
}
.ctd-title {
  grid-column: 1 / -1;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 40px;
}
.ctd--form .ctd-title {
  grid-column: 1;
}
.ctd-title p,
.ctd-title h1 {
  margin: 0;
}
.ctd .eyebrow {
  padding-left: 20px;
  color: #e8860b;
}
.ctd-title__h {
  color: #fff;
}
.ctd-title__sub {
  padding-left: 20px;
  font-family: var(--pcli-font-sans);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ctd-dim);
}
.ctd-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  align-self: flex-start;
  margin-left: 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ctd-teal);
  text-decoration: none;
}
.ctd-back:hover {
  text-decoration: underline;
}

/* Photo: soft-edged, behind the left column */
.ctd-photo {
  grid-column: 1;
  grid-row: 2;
  align-self: start; /* only as tall as the photo, so the name sits on the photo, not at the bottom of the column */
  position: relative;
  z-index: 0;
  pointer-events: none;
}
.ctd-photo img {
  display: block;
  width: 620px;
  max-width: none;
  height: auto;
  margin: -40px 0 0 -100px;
  opacity: 0.85;
  /* sides and bottom fade into the page; the top stays solid (no fade over the head) */
  -webkit-mask-image: linear-gradient(to right, transparent, #000 25%, #000 75%, transparent), linear-gradient(to bottom, #000 60%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 25%, #000 75%, transparent), linear-gradient(to bottom, #000 60%, transparent);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}
/* Name of the person in the photo — small, at its lower left, in the fade (Figma: Catalog — Contact › "Name of person") */
.ctd-photo__name {
  position: absolute;
  left: 20px;
  bottom: 135px;
  margin: 0;
  font-size: 13px;
  line-height: 1.25;
  color: rgba(245, 245, 247, 0.55);
}
.ctd-main {
  grid-column: 2;
  grid-row: 2;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}
/* Forms: the title row keeps its own height (a tall form stretches only row 2), so the photo sits exactly where it
   does on the topics page */
.ctd--form .ctd__grid {
  grid-template-rows: auto 1fr;
}
/* Forms: the topic heading shares the "Contact us" baseline */
.ctd--form .ctd-main {
  grid-row: 1 / span 2;
  padding-top: 44px;
}

.ctd-icon {
  flex: none;
}
.ctd-tile {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--ctd-tile);
  color: var(--ctd-orange);
}

/* ---- Topics */
.ctd-topics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.ctd-topics li {
  display: flex;
}
.ctd-topic {
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
  padding: 20px 22px;
  border: 1px solid var(--ctd-line);
  border-radius: 12px;
  background: var(--ctd-card); /* same see-through, blurred card as the forms */
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  color: #fff;
  text-decoration: none;
  transition:
    border-color 0.15s,
    background 0.15s;
}
.ctd-topic:hover,
.ctd-topic:focus-visible {
  border-color: var(--ctd-orange);
  background: rgba(40, 34, 24, 0.45);
}
.ctd-topic__text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.ctd-topic__title {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
}
.ctd-topic__desc {
  font-size: 13px;
  line-height: 1.45;
  color: var(--ctd-soft);
}
.ctd-topic__chev {
  color: var(--ctd-orange);
}

/* ---- Topic intro (heading above the form) */
.ctd-intro {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 32px 4px;
}
.ctd-intro__head {
  display: flex;
  align-items: center;
  gap: 14px;
}
.ctd-intro__title {
  margin: 0;
  font-size: 26px;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: #fff;
}
.ctd-intro__title:focus {
  outline: none;
}
.ctd-intro__text {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ctd-soft);
}
.ctd-tip {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 12px 16px;
  border-radius: 8px;
  background: #143034;
  font-size: 14px;
  line-height: 1.5;
  color: #c8e6e8;
}
.ctd-tip .ctd-icon {
  color: var(--ctd-teal);
}

/* ---- Form card */
.ctd-card {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 32px;
  border: 1px solid var(--ctd-line);
  border-radius: 14px;
  background: var(--ctd-card);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.ctd-card fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
.ctd-panel {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.ctd .form-error {
  margin: 0;
  border-color: rgba(255, 138, 128, 0.5);
  background: #3a1d1b;
  color: #ffd9d4;
}
.ctd-eyebrow {
  padding: 0;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ctd-orange);
}
.ctd-rule {
  width: 100%;
  height: 1px;
  margin: 0;
  border: 0;
  background: var(--ctd-line);
}
.ctd-more {
  margin: 0 0 -4px;
  font-size: 17px;
  font-weight: 600;
  color: #fff;
}

/* Radios and checkboxes (options, call/contact, contact preference) */
.ctd-card input[type='radio'],
.ctd-card input[type='checkbox'] {
  flex: none;
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  margin: 0;
  border: 1px solid var(--ctd-dim);
  border-radius: 50%;
  background: var(--ctd-bg);
  cursor: pointer;
}
.ctd-card input[type='checkbox'] {
  border-radius: 4px;
}
.ctd-card input[type='radio']:checked {
  border: 5px solid var(--ctd-orange);
  background: #fff;
}
.ctd-card input[type='checkbox']:checked {
  border-color: var(--ctd-orange);
  background: var(--ctd-orange)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230e1619' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E")
    center / 14px no-repeat;
}
.ctd-card input[type='radio']:focus-visible,
.ctd-card input[type='checkbox']:focus-visible {
  outline: 2px solid var(--ctd-teal);
  outline-offset: 2px;
}

/* Call / have someone contact me */
.ctd-modes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.ctd-mode {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  column-gap: 10px;
  row-gap: 6px;
  align-content: start;
  padding: 18px 20px;
  border: 1px solid var(--ctd-line);
  border-radius: 12px;
  background: var(--ctd-bg);
  cursor: pointer;
}
.ctd-mode input {
  align-self: center;
}
.ctd-mode__h {
  font-size: 16px;
  font-weight: 600;
}
.ctd-mode__num,
.ctd-mode__sub {
  grid-column: 2;
}
.ctd-mode__num {
  font-size: 24px;
  font-weight: 600;
  color: var(--ctd-teal);
  text-decoration: none;
}
.ctd-mode__sub {
  font-size: 13px;
  line-height: 1.5;
  color: var(--ctd-soft);
}
.ctd-mode:has(input:checked) {
  padding: 17px 19px;
  border: 2px solid var(--ctd-orange);
  background: var(--ctd-tile);
}
/* the form only for "contact"; the office numbers only for "call" */
.ctd-form:has(.ctd-modes input[value='call']:checked) .ctd-panel--form,
.ctd-form:has(.ctd-modes input[value='contact']:checked) .ctd-panel--call {
  display: none;
}

/* Office numbers by state */
.ctd-states {
  columns: 2;
  column-gap: 40px;
}
.ctd-state {
  break-inside: avoid;
  margin-bottom: 18px;
}
.ctd-state__h {
  margin: 0 0 2px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ctd-orange);
}
.ctd-offices {
  margin: 0;
  padding: 0;
  list-style: none;
}
.ctd-office {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 9px 0 9px 12px;
  border-bottom: 1px solid var(--ctd-line);
  font-size: 14px;
}
.ctd-office__city {
  color: #fff;
  text-decoration: none;
}
.ctd-office__num {
  font-weight: 600;
  color: var(--ctd-teal);
  text-decoration: none;
  white-space: nowrap;
}
.ctd-office a:hover {
  text-decoration: underline;
}

/* What can we help with? */
.ctd-options__list {
  display: grid;
  gap: 10px;
}
.ctd-options__list--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.ctd-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid var(--ctd-line);
  border-radius: 8px;
  background: var(--ctd-bg);
  font-size: 15px;
  line-height: 1.35;
  cursor: pointer;
}
.ctd-opt__text {
  flex: 1;
}
.ctd-opt:has(input:checked) {
  border-color: var(--ctd-orange);
  background: var(--ctd-tile);
  font-weight: 600;
}
.ctd-opt__link {
  display: none;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ctd-teal);
  text-decoration: none;
  white-space: nowrap;
}
.ctd-opt:has(input:checked) .ctd-opt__link {
  display: inline-flex;
}
.ctd-tip--reset {
  display: none;
  margin-top: 10px;
}
.ctd-options:has(.ctd-opt:nth-child(2) input:checked) .ctd-tip--reset {
  display: flex;
}

/* "Other …" (the last option) opens a details box under the options */
.ctd-other {
  display: none;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}
.ctd-other.is-open,
.ctd-options:has(.ctd-opt:last-child input:checked) .ctd-other {
  display: flex;
}
.ctd-options:has(.ctd-opt input:checked):not(:has(.ctd-opt:last-child input:checked)) .ctd-other {
  display: none;
} /* picking another option closes it again, even after a failed send */

/* Fields */
.ctd-row {
  display: grid;
  gap: 16px;
}
.ctd-row--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.ctd .field {
  margin: 0;
}
.ctd label,
.ctd .label {
  color: #fff;
}
.ctd .req {
  margin-left: 4px;
  font-weight: 600;
  color: var(--ctd-orange);
}
.ctd .optional {
  font-weight: 400;
  color: var(--ctd-dim);
}
.ctd .input {
  border-color: var(--ctd-field-line);
  background: var(--ctd-field);
  color: #f0f3f4;
}
.ctd .input::placeholder {
  color: #96a1a6;
}
.ctd .input:focus {
  border-color: var(--ctd-teal);
  box-shadow: 0 0 0 3px rgba(108, 196, 203, 0.25);
}
.ctd .select::after {
  color: #f0f3f4;
}
.ctd .field--error .input {
  border-color: #ff8a80;
}
.ctd .field__error {
  color: #ffb4ab;
}

/* Contact preference */
.ctd-prefer legend {
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 600;
}
.ctd-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.ctd-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px 10px 14px;
  border: 1px solid var(--ctd-line);
  border-radius: 8px;
  background: var(--ctd-bg);
  font-size: 15px;
  cursor: pointer;
}
.ctd-pill:has(input:checked) {
  border-color: var(--ctd-orange);
  background: var(--ctd-tile);
  font-weight: 600;
}

/* PHI warning (forms with a message box, and the topics page) */
.ctd-phi {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0;
  padding: 14px 16px;
  border: 1px solid rgba(255, 140, 0, 0.45);
  border-left: 4px solid var(--ctd-orange);
  border-radius: 8px;
  background: #2e2212;
  font-size: 14px;
  line-height: 1.5;
  color: #fff;
}
.ctd-phi .ctd-icon {
  margin-top: 1px;
  color: var(--ctd-orange);
}
.ctd-phi strong {
  color: #fff;
}

.ctd-submit {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}
.ctd-submit .hcaptcha {
  margin: 0;
}
.ctd-submit .btn {
  margin-left: auto;
}

/* Sent */
.ctd-sent {
  align-items: center;
  gap: 20px;
  padding: 48px 32px;
  text-align: center;
}
.ctd-sent__check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--ctd-tile);
  color: var(--ctd-orange);
}
.ctd-sent__h {
  margin: 0;
  font-size: 26px;
  font-weight: 400;
  line-height: 1.25;
}
.ctd-sent__pick {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 10px 16px;
  border: 1px solid var(--ctd-line);
  border-radius: 8px;
  background: var(--ctd-bg);
  font-size: 14px;
  font-weight: 500;
  text-align: left;
}
.ctd-sent__pick .ctd-icon {
  color: var(--ctd-orange);
}
.ctd-sent__text {
  max-width: 520px;
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ctd-soft);
}
.ctd-sent__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 20px;
}
.ctd-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--ctd-teal);
  text-decoration: none;
}
.ctd-link:hover {
  text-decoration: underline;
}

/* ---- Tablet: photo off, one column */
@media (max-width: 1000px) {
  .ctd__grid,
  .ctd--form .ctd__grid {
    grid-template-rows: none;
    grid-template-columns: minmax(0, 1fr);
    padding: 40px var(--gutter) 72px;
  }
  .ctd-title,
  .ctd--form .ctd-title {
    grid-column: 1;
    padding-bottom: 28px;
  }
  .ctd-main,
  .ctd--form .ctd-main {
    grid-column: 1;
    grid-row: auto;
    padding-top: 0;
  }
  .ctd-photo {
    display: none;
  }
}

/* ---- Phones (Figma M1–M5) */
@media (max-width: 720px) {
  .ctd__grid {
    padding: 32px 20px 56px;
  }
  .ctd .eyebrow,
  .ctd-title__sub {
    padding-left: 0;
  }
  .ctd-back {
    margin-left: 0;
  }
  /* topics page: the photo edge to edge under the title, fading into the page */
  .ctd:not(.ctd--form) .ctd-photo {
    display: block;
    grid-row: auto;
    margin: -12px -20px 24px;
  }
  .ctd-photo__name {
    left: 20px;
    bottom: 16px;
  }
  .ctd:not(.ctd--form) .ctd-photo img {
    width: 100%;
    height: 300px;
    margin: 0;
    object-fit: cover;
    object-position: 50% 20%;
    -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent);
    mask-image: linear-gradient(to bottom, #000 55%, transparent);
  }
  .ctd-topics,
  .ctd-modes,
  .ctd-row--two,
  .ctd-options__list--two {
    grid-template-columns: minmax(0, 1fr);
  }
  .ctd-topics {
    gap: 10px;
  }
  .ctd-intro {
    padding: 0;
  }
  .ctd-intro__title {
    font-size: 22px;
  }
  .ctd-card {
    padding: 24px 20px;
  }
  .ctd-states {
    columns: 1;
  }
  .ctd-submit {
    flex-direction: column;
    align-items: stretch;
  }
  .ctd-submit .btn {
    width: 100%;
    margin: 0;
    justify-content: center;
  }
}
