/* ================================================================
   Contact — luxury complement to home.css (single source of truth)
   Palette: Navy #204088 | Cyan #30C0E8 | Champagne #C5A572 | Ivory #fdfcf8
   Merges pre-b13ba9f structure (icons, split rail, map) with luxury chrome.
   Hick / Fitts / Miller / Peak-end / recognition / honest 112/108
   ================================================================ */

body.im-public-contact {
  background: var(--ivory);
  color: var(--ink);
}

.im-ct-reach,
.im-ct-write,
.im-ct-map-sec,
.im-ct-paths {
  scroll-margin-top: 96px;
}

body.im-public-contact .im-ct {
  background: var(--ivory);
}

/* Interior ivory hero: ghost buttons must be navy, not white-on-ivory */
body.im-public-contact .im-page-hero .im-btn-ghost {
  color: var(--navy);
  border-color: rgba(32, 64, 136, 0.28);
  background: transparent;
}

body.im-public-contact .im-page-hero .im-btn-ghost:hover,
body.im-public-contact .im-page-hero .im-btn-ghost:focus-visible {
  background: rgba(32, 64, 136, 0.06);
  border-color: var(--navy);
  color: var(--navy);
}

body.im-public-contact .im-page-hero h1 {
  max-width: 16ch;
  color: var(--navy);
}

body.im-public-contact .im-page-hero .im-lede {
  color: var(--ink-light);
}

body.im-public-contact .im-page-hero .im-ab-hero-note {
  color: var(--ink-light);
  font-size: 0.9rem;
  line-height: 1.55;
}

/* ================================================================
   PATH PICKER — Hick: pick a job, not a wall of equal actions
   ================================================================ */
.im-ct-paths {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  width: min(1180px, calc(100% - 48px));
  margin: 28px auto 8px;
  padding: 18px 24px;
  border-radius: 20px;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
}

.im-ct-paths > p {
  margin: 0;
  color: var(--navy);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
}

.im-ct-paths-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.im-ct-paths-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  background: var(--ivory);
  border: 1.5px solid var(--line);
  color: var(--navy);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  transition: background var(--dur-base) var(--ease-out),
              border-color var(--dur-base) var(--ease-out),
              color var(--dur-base) var(--ease-out),
              transform var(--dur-base) var(--ease-out);
}

.im-ct-paths-links a:hover,
.im-ct-paths-links a:focus-visible {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
  transform: translateY(-1px);
}

.im-ct-paths-links a.is-primary {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--navy-dark);
  min-height: 56px;
  padding-inline: 22px;
}

.im-ct-paths-links a.is-primary:hover,
.im-ct-paths-links a.is-primary:focus-visible {
  background: var(--gold-light);
  border-color: var(--gold-light);
  color: var(--navy-dark);
}

/* ================================================================
   REACH CARDS — old theme icons + luxury tokens
   ================================================================ */
.im-ct-reach {
  width: min(1180px, calc(100% - 48px));
  margin: 56px auto 24px;
  padding: 0;
}

.im-ct-reach .im-sec-head {
  margin-bottom: 28px;
}

.im-ct-reach .im-sec-head h2 {
  color: var(--navy);
}

.im-ct-cards {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.im-ct-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px 24px 24px;
  box-shadow: var(--shadow-card);
  min-height: 100%;
  transition: transform var(--dur-base) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out);
}

.im-ct-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 24px;
  right: 24px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: linear-gradient(90deg, var(--gold), var(--sky));
  opacity: 0;
  transition: opacity var(--dur-base) var(--ease-out);
}

.im-ct-card:hover,
.im-ct-card:focus-within {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.im-ct-card:hover::before,
.im-ct-card:focus-within::before {
  opacity: 1;
}

.im-ct-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: rgba(32, 64, 136, 0.08);
  color: var(--navy);
  margin-bottom: 4px;
}

.im-ct-card-icon svg {
  width: 24px;
  height: 24px;
}

.im-ct-card-kicker {
  color: var(--gold-dark);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0;
}

.im-ct-card h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--navy);
  margin: 0;
  line-height: 1.3;
}

.im-ct-card p {
  font-size: 0.95rem;
  color: var(--ink-light);
  margin: 0;
  line-height: 1.6;
}

.im-ct-card a {
  color: var(--navy);
  text-decoration: none;
  font-weight: 700;
  text-underline-offset: 3px;
}

.im-ct-card a:hover,
.im-ct-card a:focus-visible {
  color: var(--navy-dark);
  text-decoration: underline;
}

.im-ct-dial {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

/* ================================================================
   WRITE — split form + brand rail (old drop-area, luxury tokens)
   ================================================================ */
.im-ct-write {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 72px 0 80px;
  background:
    radial-gradient(900px 360px at 6% -10%, rgba(32, 64, 136, 0.06), transparent 58%),
    radial-gradient(760px 300px at 100% 10%, rgba(197, 165, 114, 0.12), transparent 52%),
    var(--ivory);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.im-ct-write-grid {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.92fr);
  gap: 28px;
  align-items: start;
}

.im-ct-form-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 36px 32px 32px;
  box-shadow: var(--shadow-card);
}

.im-ct-form-card > .im-kicker {
  color: var(--gold-dark);
  margin-bottom: 8px;
}

.im-ct-form-card > h2 {
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  font-weight: 800;
  color: var(--navy);
  margin: 0 0 10px;
  line-height: 1.2;
}

.im-ct-form-card > .im-lede {
  color: var(--ink-light);
  font-size: 1rem;
  line-height: 1.65;
  margin: 0 0 24px;
  max-width: 52ch;
}

.im-ct-form {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.im-ct-fieldset {
  border: 0;
  margin: 0 0 22px;
  padding: 0;
}

.im-ct-legend {
  display: block;
  width: 100%;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin: 0 0 14px;
  padding: 0;
}

.im-ct-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 16px;
}

.im-ct-field {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.im-ct-field--full {
  grid-column: 1 / -1;
}

.im-ct-field label {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 0.01em;
}

.im-ct-req {
  color: var(--crimson);
  font-weight: 800;
}

.im-ct-field input,
.im-ct-field textarea {
  width: 100%;
  min-height: 48px;
  border: 1.5px solid rgba(32, 64, 136, 0.18);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 1rem;
  font-family: var(--font-ui);
  color: var(--ink);
  background: var(--white);
  line-height: 1.5;
  transition: border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}

.im-ct-field textarea {
  min-height: 160px;
  resize: vertical;
}

.im-ct-field input::placeholder,
.im-ct-field textarea::placeholder {
  color: var(--ink-muted);
}

.im-ct-field input:hover,
.im-ct-field textarea:hover {
  border-color: rgba(32, 64, 136, 0.35);
}

.im-ct-field input:focus,
.im-ct-field textarea:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(32, 64, 136, 0.12);
}

.im-ct-field input:user-invalid,
.im-ct-field textarea:user-invalid {
  border-color: var(--crimson);
}

.im-ct-hint {
  font-size: 0.78rem;
  color: var(--ink-muted);
  margin: 0;
}

.im-ct-count {
  font-size: 0.75rem;
  color: var(--ink-muted);
  text-align: right;
  margin: 4px 0 0;
}

/* Recognition chips — fill subject instead of recalling a label */
.im-ct-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.im-ct-chip {
  min-height: 44px;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  border: 1.5px solid rgba(32, 64, 136, 0.18);
  background: var(--ivory);
  color: var(--navy);
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--dur-fast) ease,
              border-color var(--dur-fast) ease,
              color var(--dur-fast) ease;
}

.im-ct-chip:hover,
.im-ct-chip:focus-visible {
  border-color: var(--navy);
  background: rgba(32, 64, 136, 0.06);
}

.im-ct-chip.is-on {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}

.im-ct-agree {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--ink-light);
  margin: 4px 0 22px;
  line-height: 1.5;
}

.im-ct-agree input[type="checkbox"] {
  width: 24px;
  height: 24px;
  margin-top: 1px;
  accent-color: var(--navy);
  flex-shrink: 0;
  cursor: pointer;
}

.im-ct-agree a {
  color: var(--navy);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 700;
}

.im-ct-agree a:hover {
  color: var(--navy-dark);
}

.im-ct-form .im-btn-primary {
  align-self: flex-start;
  min-width: 200px;
}

.im-ct-alert {
  background: #fef2f2;
  color: #7f1d1d;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: 0.95rem;
  border: 1px solid #fecaca;
  line-height: 1.5;
}

/* Peak-end confirmation */
.im-ct-done {
  text-align: center;
  padding: 20px 8px 12px;
}

.im-ct-done-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: rgba(11, 110, 79, 0.12);
  color: #0b6e4f;
}

.im-ct-done .im-kicker {
  color: var(--gold-dark);
  margin-bottom: 8px;
}

.im-ct-done h2 {
  font-size: clamp(1.4rem, 2.4vw, 1.8rem);
  font-weight: 800;
  color: var(--navy);
  margin: 0 0 12px;
  line-height: 1.2;
}

.im-ct-done p {
  color: var(--ink-light);
  font-size: 1rem;
  line-height: 1.65;
  margin: 0 auto 28px;
  max-width: 42ch;
}

.im-ct-done .im-hero-actions {
  justify-content: center;
}

.im-ct-done .im-btn-ghost {
  color: var(--navy);
  border-color: rgba(32, 64, 136, 0.28);
}

.im-ct-done .im-btn-ghost:hover,
.im-ct-done .im-btn-ghost:focus-visible {
  background: rgba(32, 64, 136, 0.06);
  border-color: var(--navy);
  color: var(--navy);
}

/* ================================================================
   RAIL — branded photo + helpline (old auth panel + luxury)
   ================================================================ */
.im-ct-rail {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.im-ct-brand {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--navy-dark);
  color: var(--white);
  padding: 28px 24px 24px;
  min-height: 220px;
}

.im-ct-brand::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -40px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(197, 165, 114, 0.28), transparent 70%);
  pointer-events: none;
}

.im-ct-brand img {
  height: 42px;
  width: auto;
  margin-bottom: 16px;
  filter: brightness(0) invert(1);
}

.im-ct-brand p {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.88);
}

.im-ct-brand ul {
  position: relative;
  z-index: 1;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.im-ct-brand li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.45;
}

.im-ct-brand li::before {
  content: "";
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--gold);
}

.im-ct-portrait {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--line);
}

.im-ct-portrait img {
  width: 100%;
  display: block;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.im-ct-portrait figcaption {
  background: var(--navy-dark);
  color: rgba(255, 255, 255, 0.9);
  padding: 12px 16px;
  font-size: 0.88rem;
  line-height: 1.5;
  font-weight: 500;
}

.im-ct-call {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px 22px 20px;
  box-shadow: var(--shadow-card);
}

.im-ct-call-label {
  color: var(--gold-dark);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0 0 8px;
}

.im-ct-call a[href^="tel"] {
  display: flex;
  align-items: center;
  min-height: 56px;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--navy);
  text-decoration: none;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.im-ct-call a[href^="tel"]:hover,
.im-ct-call a[href^="tel"]:focus-visible {
  color: var(--navy-dark);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.im-ct-call p {
  font-size: 0.9rem;
  color: var(--ink-light);
  margin: 8px 0 0;
  line-height: 1.55;
}

.im-ct-call p a {
  font-size: inherit;
  font-weight: 700;
  color: var(--navy);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ================================================================
   MAP
   ================================================================ */
.im-ct-map-sec {
  width: min(1180px, calc(100% - 48px));
  margin: 64px auto 8px;
}

.im-ct-map-sec .im-sec-head h2 {
  color: var(--navy);
}

.im-ct-map {
  margin: 20px 0 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--line);
  line-height: 0;
  background: var(--white);
}

.im-ct-map iframe {
  width: 100%;
  height: min(42vh, 420px);
  min-height: 280px;
  border: 0;
  display: block;
}

.im-ct-map figcaption {
  background: var(--navy-dark);
  color: rgba(255, 255, 255, 0.9);
  padding: 12px 18px;
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.5;
}

/* ================================================================
   FAQ — contact-specific questions (home.css accordion chrome)
   ================================================================ */
body.im-public-contact .im-faq {
  width: min(900px, calc(100% - 48px));
  margin: 56px auto 24px;
}

body.im-public-contact .im-faq .im-sec-head h2 {
  color: var(--navy);
}

body.im-public-contact .im-accordion {
  border-color: var(--line);
  box-shadow: var(--shadow-card);
}

body.im-public-contact .im-accordion__trigger {
  min-height: 56px;
  color: var(--navy);
  font-family: var(--font-ui);
}

body.im-public-contact .im-accordion__panel-inner {
  color: var(--ink-light);
}

/* Close on navy: keep white ghost readable */
body.im-public-contact .im-close .im-btn-ghost {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.35);
}

body.im-public-contact .im-close .im-kicker,
body.im-public-contact .im-close p {
  color: rgba(255, 255, 255, 0.82);
}

body.im-public-contact .im-close h2 {
  color: var(--white);
}

/* Emergency copy inside strip is white */
body.im-public-contact .im-emerg-heading,
body.im-public-contact .im-emerg-sub {
  color: var(--white);
}

body.im-public-contact .im-emerg-dial {
  min-height: 56px;
  min-width: 120px;
}

/* Nav current page */
body.im-public-contact .im-nav-links a[aria-current="page"] {
  color: var(--navy);
  opacity: 1;
}

body.im-public-contact .im-nav-links a[aria-current="page"]::after {
  width: 100%;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 960px) {
  .im-ct-write-grid {
    grid-template-columns: 1fr;
  }

  .im-ct-cards {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .im-ct-brand img {
    filter: none;
    background: var(--white);
    padding: 8px 12px;
    border-radius: 10px;
    height: 48px;
  }
}

@media (max-width: 720px) {
  .im-ct-paths {
    padding: 16px;
  }

  .im-ct-paths-links a,
  .im-ct-paths-links a.is-primary {
    width: 100%;
  }

  .im-ct-fields {
    grid-template-columns: 1fr;
  }

  .im-ct-form-card {
    padding: 24px 18px 22px;
  }

  .im-ct-form .im-btn-primary {
    width: 100%;
  }

  .im-ct-reach,
  .im-ct-write-grid,
  .im-ct-map-sec,
  .im-ct-paths {
    width: min(1180px, calc(100% - 32px));
  }
}

@media (prefers-reduced-motion: reduce) {
  .im-ct-card,
  .im-ct-paths-links a,
  .im-ct-chip,
  .im-ct-field input,
  .im-ct-field textarea {
    transition: none;
  }

  .im-ct-card:hover,
  .im-ct-paths-links a:hover {
    transform: none;
  }
}

@media (prefers-color-scheme: dark) {
  body.im-public-contact .im-ct-form-card,
  body.im-public-contact .im-ct-card,
  body.im-public-contact .im-ct-call,
  body.im-public-contact .im-ct-paths {
    background: var(--white);
    color: var(--ink);
  }

  body.im-public-contact .im-ct-field input,
  body.im-public-contact .im-ct-field textarea {
    background: var(--ivory);
    color: var(--ink);
    border-color: rgba(197, 165, 114, 0.35);
  }

  body.im-public-contact .im-ct-alert {
    background: #3b1515;
    color: #fecaca;
    border-color: #7f1d1d;
  }
}

@media print {
  body.im-public-contact .im-nav,
  body.im-public-contact .im-emerg,
  body.im-public-contact .im-progress,
  body.im-public-contact .im-close {
    display: none !important;
  }

  body.im-public-contact .im-ct-map iframe {
    display: none;
  }
}
