/* Contact — illustrated paper home style. Source: scripts/generate-contact.mjs.
   Reuse existing film art; essential text and form controls remain live DOM. */
.contact-page--paper {
  --contact-paper: #fbf4e6;
  --contact-card: #fffdf9;
  --contact-muted: #565a78;
  --contact-line: rgba(7, 8, 63, .14);
  --contact-accent: linear-gradient(rgba(7, 8, 63, .36), rgba(7, 8, 63, .36)), var(--cb-accent-gradient);
  --contact-button: linear-gradient(rgba(7, 8, 63, .48), rgba(7, 8, 63, .48)), var(--cb-accent-gradient);
  color: var(--cb-ink);
  background: var(--contact-paper);
  font-family: var(--cb-display-font);
}
html:has(.contact-page--paper) { background: #fbf4e6; }
.contact-page--paper :where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid #3155c7;
  outline-offset: 4px;
}
.contact-shell { width: var(--cb-shell); margin-inline: auto; }
.contact-main {
  position: relative;
  isolation: isolate;
  padding: clamp(40px, 4vw, 72px) 0 clamp(48px, 5vw, 88px);
  background: var(--contact-paper);
}
.contact-main::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: url("/assets/home/home-v27/paper-20261011.webp") center / 1400px auto repeat;
  opacity: .28;
  mix-blend-mode: multiply;
}
.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  align-items: start;
  gap: 40px clamp(48px, 5.4vw, 96px);
}
.contact-intro { padding-top: 18px; min-width: 0; }
.contact-eyebrow, .contact-form-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 20px;
  color: var(--contact-muted);
  font-size: var(--cb-eyebrow-size);
  font-weight: var(--cb-eyebrow-weight);
  letter-spacing: var(--cb-eyebrow-tracking);
  line-height: 1.4;
  text-transform: uppercase;
}
.contact-eyebrow > span {
  width: 25px; height: 2px; flex: none;
  background: var(--contact-accent);
}
.contact-intro h1, .contact-panel__heading h2 {
  margin: 0;
  color: var(--cb-ink);
  font-family: var(--cb-display-font);
  font-weight: var(--cb-display-weight);
  letter-spacing: var(--cb-display-tracking);
  line-height: var(--cb-display-leading);
  text-wrap: balance;
}
.contact-intro h1 { max-width: 620px; font-size: var(--cb-title-hero); }
.contact-intro h1 em {
  display: block;
  font-style: normal;
  color: transparent;
  background: var(--contact-accent);
  background-clip: text;
  -webkit-background-clip: text;
}
.contact-intro__lead {
  max-width: 570px;
  margin: 24px 0 0;
  color: var(--contact-muted);
  font-size: var(--cb-lead-section);
  font-weight: var(--cb-lead-weight);
  letter-spacing: var(--cb-lead-tracking);
  line-height: 1.5;
}
.contact-write-link {
  display: inline-flex;
  align-items: center;
  gap: 28px;
  min-height: 48px;
  margin-top: 18px;
  color: #244aaa;
  font-size: 16px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 5px;
}
.contact-write-link span { font-size: 24px; }
.contact-scene {
  position: relative;
  margin: 22px -18px 0;
}
.contact-scene > img {
  width: 100%;
  height: auto;
  aspect-ratio: 820 / 624;
  object-fit: contain;
  mix-blend-mode: multiply;
  /* Same paint edge as the home, without a full rectangular image border. */
  mask-image: url("/assets/home/home-v27/bloom-mask-20261011.png");
  mask-size: 100% 100%;
  mask-repeat: no-repeat;
}
.contact-scene__bubble {
  position: absolute;
  top: 2%;
  right: 0;
  max-width: 70%;
  margin: 0;
  padding: 13px 18px;
  color: var(--cb-ink);
  background: var(--contact-card);
  border: 1px solid var(--contact-line);
  border-radius: 18px 18px 18px 4px;
  box-shadow: 0 8px 22px rgba(61, 44, 14, .1);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
}
.contact-scene figcaption {
  margin: -18px 18px 0;
  position: relative;
  color: var(--contact-muted);
  font-size: 12px;
  line-height: 1.5;
}
.contact-team-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 22px 0;
  color: var(--contact-muted);
  font-size: 14px;
  line-height: 1.5;
}
.contact-team-note > span { width: 6px; height: 6px; border-radius: 50%; background: #315bb0; flex: none; }
.contact-follow { border-top: 1px solid var(--contact-line); padding-top: 24px; }
.contact-follow .contact-compact-title { margin: 0 0 16px; font-size: 20px; font-weight: 600; letter-spacing: -.02em; line-height: 1.3; }
.contact-follow ol {
  display: grid; gap: 14px;
  padding: 0; margin: 0;
  list-style: none; counter-reset: follow;
}
.contact-follow li {
  display: flex; align-items: baseline; gap: 12px;
  color: var(--contact-muted); font-size: 15px; line-height: 1.5;
  counter-increment: follow;
}
.contact-follow li::before { content: counter(follow, decimal-leading-zero); color: #315bb0; font-size: 12px; font-weight: 600; }
.contact-privacy-note { margin: 20px 0 0; color: var(--contact-muted); font-size: 13px; line-height: 1.5; }

/* Form: one page, three semantic groups. Small legends are component labels. */
.contact-panel {
  min-width: 0;
  padding: clamp(28px, 2.8vw, 44px);
  border: 1px solid var(--contact-line);
  border-radius: 24px;
  background: var(--contact-card);
  box-shadow: 0 18px 48px rgba(61, 44, 14, .07), 0 2px 6px rgba(61, 44, 14, .04);
  scroll-margin-top: 20px;
}
.contact-panel__heading .contact-form-eyebrow { margin-bottom: 12px; }
.contact-panel__heading h2 { font-size: var(--cb-title-section-side); }
.contact-panel__heading > p:last-child { margin: 12px 0 0; color: var(--contact-muted); font-size: 16px; line-height: 1.5; }
.contact-required-note { margin: 20px 0 24px; color: var(--contact-muted); font-size: 12px; line-height: 1.5; }
.contact-form-block { min-width: 0; margin: 0; padding: 0; border: 0; }
.contact-form-block + .contact-form-block { margin-top: 26px; padding-top: 0; }
.contact-form-block legend {
  display: flex; align-items: center; gap: 12px;
  width: 100%; margin-bottom: 16px; padding: 0;
  color: var(--cb-ink); font-size: 16px; font-weight: 600; line-height: 1.4;
}
.contact-step {
  display: inline-grid; place-items: center; width: 29px; height: 29px; flex: none;
  border: 1px solid #d3d9e4; border-radius: 50%; background: #f0f4fb;
  color: #3155a6; font-size: 11px; font-weight: 600;
}
.contact-departments > p { margin: -5px 0 14px; color: var(--contact-muted); font-size: 14px; line-height: 1.5; }
.contact-departments__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.department-card {
  position: relative;
  display: flex; flex-direction: column; gap: 12px; align-items: flex-start;
  min-width: 0; min-height: 154px; padding: 17px;
  border: 1px solid #d3d6e0; border-radius: 14px;
  background: #fffefa; cursor: pointer;
}
.department-card:hover { border-color: #3155a6; }
.department-card:has(input:checked), .department-card.is-selected {
  border-color: #3155a6; background: #eef3fc; box-shadow: inset 0 0 0 1px #3155a6;
}
.department-card input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.department-card:has(input:focus-visible) { outline: 3px solid #3155c7; outline-offset: 4px; }
.department-card:has(input:disabled) { cursor: wait; }
.department-card__icon { display: grid; place-items: center; width: 33px; height: 33px; color: #3155a6; }
.department-card__icon svg, .department-card__check svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.department-card strong { display: block; color: var(--cb-ink); font-size: 16px; font-weight: 600; line-height: 1.35; }
.department-card small { display: block; margin-top: 6px; color: var(--contact-muted); font-size: 13px; line-height: 1.45; }
.department-card__check {
  position: absolute; top: 17px; right: 17px;
  display: grid; place-items: center; width: 24px; height: 24px;
  border: 1px solid #747c91; border-radius: 50%; color: transparent; background: #fff;
}
.department-card__check svg { width: 15px; height: 15px; stroke-width: 2.5; }
.department-card:has(input:checked) .department-card__check, .department-card.is-selected .department-card__check { color: #fff; background: #3155a6; border-color: #3155a6; }
.contact-recipient { display: flex; gap: 8px; margin: 12px 0 0; color: var(--contact-muted); font-size: 12px; line-height: 1.5; }
.contact-recipient strong { color: #3155a6; font-weight: 500; }
.contact-honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.contact-form__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 14px; }
.contact-form__grid > label { min-width: 0; }
.contact-form__grid label > span:not(.contact-field-error) { display: block; margin-bottom: 7px; color: var(--cb-ink); font-size: 14px; font-weight: 500; line-height: 1.4; }
.contact-form__grid label > span b { color: #3155a6; font-weight: 500; }
.contact-form__grid label > span small { margin-left: 5px; color: var(--contact-muted); font-size: 12px; font-weight: 400; }
.contact-form__wide { grid-column: 1 / -1; }
.contact-page--paper [hidden] { display: none !important; }
.contact-form input:not([type='radio']):not([type='checkbox']):not([type='hidden']), .contact-form select, .contact-form textarea {
  width: 100%; min-width: 0; padding: 12px 14px;
  border: 1px solid #85899b; border-radius: 9px; color: var(--cb-ink); background: #fff;
  font-size: 16px; line-height: 1.4;
}
.contact-form input:not([type='radio']):not([type='checkbox']):not([type='hidden']), .contact-form select { min-height: 48px; }
.contact-form textarea { display: block; min-height: 126px; resize: vertical; }
.contact-form :where(input, select, textarea)::placeholder { color: #696c82; opacity: 1; }
.contact-form :where(input, select, textarea):focus { border-color: #3155a6; }
.contact-form :where(input, select, textarea).is-invalid { border-color: #a22e40; box-shadow: inset 0 0 0 1px #a22e40; }
.contact-field-help { margin: 9px 0 0; color: var(--contact-muted); font-size: 12px; line-height: 1.5; }
.contact-field-error { display: block; margin: 7px 0 0; color: #a22e40; font-size: 13px; font-weight: 500; line-height: 1.4; }
.contact-field-error:empty { display: none; }
.contact-consent {
  display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px 12px;
  margin-top: 22px; color: var(--contact-muted); font-size: 13px; line-height: 1.5; cursor: pointer;
}
.contact-consent input { width: 24px; height: 24px; flex: 0 0 24px; margin: 0; accent-color: #3155a6; }
.contact-consent > span:not(.contact-field-error) { flex: 1; min-width: 0; }
.contact-consent > .contact-field-error { flex-basis: 100%; margin-left: 36px; }
.contact-consent a { color: #244aaa; text-decoration: underline; text-underline-offset: 3px; }
.contact-status { margin: 20px 0 0; padding: 14px 16px; border: 1px solid; border-radius: 12px; font-size: 14px; font-weight: 500; line-height: 1.5; scroll-margin-top: calc(var(--cb-chrome-height, 100px) + 24px); }
.contact-status:empty { display: none; }
.contact-status.is-success { color: #176044; background: #eef8f0; border-color: #759e82; }
.contact-status.is-error { color: #9b253a; background: #fff1f0; border-color: #c28088; }
.contact-submit {
  display: inline-flex; align-items: center; justify-content: center; gap: 16px;
  width: 100%; min-height: 54px; margin-top: 20px; padding: 14px 20px;
  border: 0; border-radius: 999px; color: #fff; background: var(--contact-button);
  box-shadow: 0 8px 20px rgba(42, 72, 119, .18); font-size: 16px; font-weight: 600; line-height: 1.4; cursor: pointer;
}
.contact-submit:hover:not(:disabled) { box-shadow: 0 10px 24px rgba(42, 72, 119, .26); }
.contact-submit:disabled { cursor: wait; opacity: .7; }
.contact-submit svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.contact-form[aria-busy='true'] :is(input, textarea, select) { opacity: .65; }

/* Secondary client route below the form, never competing with the main action. */
.contact-client-help {
  grid-column: 1 / -1;
  display: flex; align-items: center; gap: 24px;
  padding: 28px 32px; border: 1px solid var(--contact-line); border-radius: 18px;
  /* Ink stays readable over the darkest paint pixels (minimum 5.59:1). */
  background: linear-gradient(rgba(255, 253, 249, .65), rgba(255, 253, 249, .65)), url("/assets/home/home-v27/wash-blue-20261011.webp") center / cover, #eef1ee;
}
.contact-client-help__icon { width: 48px; height: 48px; flex: none; display: grid; place-items: center; color: #3155a6; background: rgba(255, 253, 249, .85); border-radius: 50%; }
.contact-client-help__icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.contact-client-help .contact-compact-title { margin: 0 0 6px; color: var(--cb-ink); font-size: 20px; font-weight: 600; line-height: 1.3; }
.contact-client-help p { max-width: 690px; margin: 0; color: #3e4863; font-size: 15px; line-height: 1.5; }
.contact-client-help > a { display: inline-flex; align-items: center; justify-content: center; gap: 20px; min-height: 48px; margin-left: auto; padding: 12px 20px; border: 1px solid #9da9c3; border-radius: 999px; color: #244aaa; background: var(--contact-card); font-size: 14px; font-weight: 600; line-height: 1.4; text-decoration: none; }
@media (max-width: 1120px) {
  .contact-layout { grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr); gap: 36px; }
  .contact-departments__grid { grid-template-columns: 1fr; }
  .department-card { flex-direction: row; align-items: center; min-height: 94px; padding-right: 48px; }
  .department-card__icon { flex: none; }
  .contact-intro__lead { font-size: var(--cb-lead-section); }
}
@media (max-width: 940px) {
  .contact-shell { width: min(calc(100% - 36px), 720px); }
  body.contact-page--paper #cb-site-header { --cb-header-shell: min(calc(100% - 36px), 720px); }
  .contact-layout { grid-template-columns: 1fr; gap: 32px; }
  .contact-intro { padding-top: 0; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 0 16px; }
  .contact-intro > :is(.contact-eyebrow, h1, .contact-intro__lead, .contact-write-link) { grid-column: 1 / -1; }
  .contact-intro__lead { max-width: 100%; }
  .contact-scene { grid-column: 2; grid-row: 5 / 7; margin: 12px -10px 0; }
  .contact-scene__bubble, .contact-scene figcaption { display: none; }
  .contact-team-note { grid-column: 1; margin: 20px 0 0; }
  .contact-follow { display: none; }
  .contact-panel { grid-row: 2; }
  .contact-client-help { grid-row: 3; }
  .contact-departments__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .department-card { flex-direction: column; min-height: 154px; padding-right: 17px; }
  .contact-client-help { flex-wrap: wrap; }
  .contact-client-help > a { margin-left: 72px; }
}
@media (max-width: 600px) {
  .contact-main { padding: 32px 0 44px; }
  .contact-intro { display: block; }
  .contact-intro h1 { font-size: var(--cb-title-hero); }
  .contact-intro__lead { margin-top: 20px; font-size: var(--cb-lead-section); }
  .contact-scene { display: none; }
  .contact-team-note { margin: 16px 0 0; font-size: 12px; }
  .contact-panel { padding: 24px 20px; border-radius: 18px; }
  .contact-panel__heading h2 { font-size: var(--cb-title-section-side); }
  .contact-form-eyebrow { font-size: var(--cb-eyebrow-size); }
  .contact-departments__grid { grid-template-columns: 1fr; }
  .department-card { flex-direction: row; align-items: center; min-height: 98px; padding: 16px 46px 16px 14px; }
  .department-card__icon { width: 28px; }
  .contact-form__grid { grid-template-columns: 1fr; }
  .contact-client-help { padding: 24px 20px; gap: 14px; align-items: flex-start; }
  .contact-client-help__icon { width: 36px; height: 36px; }
  .contact-client-help > div { flex: 1; }
  .contact-client-help > a { width: 100%; margin-left: 0; }
}
@media (prefers-reduced-motion: no-preference) {
  .department-card, .contact-submit { transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease; }
}
@media (prefers-reduced-motion: reduce) {
  html:has(.contact-page--paper) { scroll-behavior: auto; }
  .contact-page--paper *, .contact-page--paper *::before, .contact-page--paper *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
