/* Contact (info + lead form) and footer. */
.contact { overflow: hidden; background: var(--bg-2); --red: #b91c1c; /* darker red keeps validation text AA on light surfaces */ }
.contact .wrap { position: relative; }
.contact-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 56px; align-items: start; }
.contact h2 { margin: 14px 0 18px; font-size: clamp(32px, 4.2vw, 54px); line-height: 1.12; font-weight: 300; letter-spacing: -0.04em; }
.contact .lead { max-width: 460px; color: var(--text-2); font-size: 17px; }
.cinfo { display: flex; flex-direction: column; gap: 14px; margin-top: 34px; }
.cinfo li { display: flex; align-items: center; gap: 14px; font-size: 15px; }
.cinfo i { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--white); color: var(--accent); }
.cinfo svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.cinfo small { display: block; font: 400 12px var(--mono); color: var(--text-3); }
.cinfo a { display: inline-flex; align-items: center; min-height: 44px; text-underline-offset: 4px; }

.form { padding: 30px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--white); }
.form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.fld { margin: 0 0 16px; padding: 0; border: 0; min-width: 0; }
.fld label, .fld legend { display: block; padding: 0; margin-bottom: 7px; font-size: 13px; font-weight: 400; color: var(--text-2); }
.fld em { color: var(--accent); font-style: normal; }
.fld input, .fld textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; font: inherit; font-size: 16px; color: var(--text);
  background: var(--paper); border: 1px solid var(--line-2); border-radius: var(--r);
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.fld textarea { min-height: 110px; resize: vertical; }
.fld input:hover, .fld textarea:hover { border-color: var(--text-3); }
.fld input:focus-visible, .fld textarea:focus-visible { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(42, 98, 214, 0.18); outline: none; }
.fld input[aria-invalid="true"] { border-color: var(--red); }
.err { margin-top: 6px; font-size: 12.5px; color: var(--red); }
.err[hidden] { display: none; }

/* Agent checkboxes: input is visually hidden but stays focusable; the pill shows state and focus */
.pick-list { display: flex; flex-wrap: wrap; gap: 8px; }
.pick label { position: relative; margin: 0; cursor: pointer; }
.pick input { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; margin: 0; opacity: 0; cursor: pointer; }
.pick span { display: inline-flex; align-items: center; min-height: 36px; padding: 7px 12px; font-size: 13px; color: var(--text-2); border: 1px solid var(--line-2); border-radius: var(--r); transition: border-color var(--dur-fast), background-color var(--dur-fast), color var(--dur-fast); }
.pick input:checked + span { border-color: var(--accent); color: var(--text); background: rgba(42, 98, 214, 0.1); }
.pick input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }

.form .btn { width: 100%; margin-top: 6px; }
.note { min-height: 1.4em; margin-top: 12px; font-size: 13.5px; color: var(--accent-2); text-align: center; }

.foot {
  padding: 64px 0 calc(28px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); color: var(--text-3); font-size: 14px;
  background: var(--bg);
}
.fgrid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.fh { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; font: 400 12px var(--mono); letter-spacing: 0.14em; color: var(--text-2); }
.fh::before { content: ""; width: 14px; height: 2px; background: var(--accent); }
.fgrid nav a { display: flex; align-items: center; min-height: 32px; text-decoration: none; transition: color var(--dur-fast), transform var(--dur-fast); }
.fgrid nav a:hover, .fgrid nav a:focus-visible { color: var(--text); transform: translateX(3px); }
.fbrand .brand img { height: 48px; }
/* Three short tags instead of one string, so a narrow column never breaks mid-phrase or strands a dot */
.ftags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.ftags li { padding: 5px 12px; border: 1px solid var(--line-2); border-radius: var(--r); font-size: 12.5px; color: var(--text-2); }
.fbottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 13px; }
.fbottom a { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; transition: color var(--dur-fast); }
.fbottom a:hover, .fbottom a:focus-visible { color: var(--text); }
.totop-ic { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line-2); border-radius: 50%; transition: border-color var(--dur-fast), background-color var(--dur-fast), transform var(--dur-fast); }
.totop:hover .totop-ic, .totop:focus-visible .totop-ic { border-color: var(--accent); background: var(--surface); }

@media (max-width: 1024px) {
  .contact-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .fgrid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .form { padding: 22px; }
  .form .two { grid-template-columns: minmax(0, 1fr); }
  /* Footer: brand on its own row, then link columns side by side (halves the height of the single-column stack) */
  .fgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 20px; }
  .fbrand, .fgrid nav:last-child { grid-column: 1 / -1; }
  .fgrid nav:last-child { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 20px; }
  .fgrid nav:last-child .fh { grid-column: 1 / -1; }
  .foot-mark { margin-top: 36px; width: min(200px, 52vw); }
}

/* Oversized mark + stepped blue bands close the page (Mistral-style footer) */
.foot { padding-bottom: 0; }
.foot-mark { width: min(300px, 60vw); height: auto; margin: 64px auto 0; opacity: 0.95; }
.fbottom { margin-top: 40px; padding-bottom: 20px; }
.foot-bands { margin-top: 12px; padding-bottom: env(safe-area-inset-bottom); background: var(--block-4); }
.foot-bands i { display: block; height: clamp(18px, 2.4vw, 32px); }
.foot-bands i:nth-child(1) { background: var(--block-1); }
.foot-bands i:nth-child(2) { background: var(--block-2); }
.foot-bands i:nth-child(3) { background: var(--block-3); }
.foot-bands i:nth-child(4) { background: var(--block-4); }

/* Touch devices: 44px targets for pills and footer links */
@media (pointer: coarse) {
  .pick span { min-height: 44px; }
  .fgrid nav a { min-height: 44px; }
}
@media (max-width: 560px) {
  .contact .lead, .note { font-size: 16px; }
  .cinfo li { font-size: 16px; }
}
