/* The contact page (9 October 2026). Nothing boxed: a modest heading and two
   useful links on the left, the form straight on the room on the right. White
   fields with a hairline, the navy #1e3c63 for a chosen topic, the black
   button, and the site blue only for focus, links and the sent tick. */

.contact-section { padding: 156px 0 112px; min-height: calc(100dvh - 150px); box-sizing: border-box; }
.contact-layout {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-rows: auto 1fr;
  grid-template-areas: 'intro panel' 'links panel'; column-gap: clamp(48px, 8vw, 128px); align-items: start;
}

.contact-intro { grid-area: intro; }
.contact-intro h1 { margin: 0; font-size: clamp(34px, 3.3vw, 44px); font-weight: 500; line-height: 1.08; letter-spacing: -.02em; text-wrap: balance; }
.contact-lead { max-width: 38ch; margin: 18px 0 0; font-size: 16px; line-height: 1.6; color: #5b6470; text-wrap: pretty; }

.contact-links { grid-area: links; display: flex; flex-direction: column; max-width: 360px; margin-top: 44px; border-top: 1px solid #e3e6ea; }
.contact-links a {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 17px 2px;
  border-bottom: 1px solid #e3e6ea; font-size: 14.5px; letter-spacing: -.01em; color: var(--ink);
  transition: color 160ms ease;
}
.contact-links .arrow { width: 16px; height: 16px; flex-shrink: 0; color: #8a929c; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 200ms var(--ease), color 160ms ease; }

.contact-panel { grid-area: panel; width: 100%; max-width: 620px; justify-self: end; }

/* The form */
.contact-form { display: grid; gap: 22px; }
.contact-label { display: block; margin: 0 0 9px; padding: 0; font-size: 13px; font-weight: 500; color: #2f3843; }
.contact-topics { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.contact-topics legend { float: left; width: 100%; }
.contact-topic { position: relative; }
.contact-topic input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: pointer; }
.contact-topic span {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px;
  background: #fff; box-shadow: inset 0 0 0 1px #dde1e6; color: #2f3843; font-size: 13.5px; font-weight: 500;
  transition: background-color 180ms ease, color 180ms ease, box-shadow 180ms ease, transform 160ms var(--ease);
}
.contact-topic input:checked + span { background: #1e3c63; color: #fff; box-shadow: inset 0 0 0 1px #1e3c63; }
.contact-topic input:active + span { transform: scale(.97); }
.contact-topic input:focus-visible + span { outline: 2px solid #1875d8; outline-offset: 2px; }

.contact-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.contact-field { display: block; min-width: 0; }
.contact-field input, .contact-field textarea {
  display: block; width: 100%; box-sizing: border-box; margin: 0; padding: 14px 15px;
  border: 1px solid #dde1e6; border-radius: 12px; background: #fff; color: var(--ink);
  box-shadow: 0 1px 2px rgb(16 24 40 / 4%);
  font: inherit; font-size: 15px; line-height: 1.4; outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.contact-field textarea { min-height: 172px; resize: vertical; line-height: 1.6; }
.contact-field input::placeholder { color: #6b7683; }
.contact-field input:focus, .contact-field textarea:focus { border-color: #1875d8; box-shadow: 0 0 0 3px rgb(24 117 216 / 14%); }
.contact-field[data-invalid] input, .contact-field[data-invalid] textarea { border-color: #c4352b; }
.contact-field[data-invalid] input:focus, .contact-field[data-invalid] textarea:focus { box-shadow: 0 0 0 3px rgb(196 53 43 / 12%); }
.contact-field-error { display: block; margin-top: 7px; font-size: 12.5px; color: #a3241a; }
.contact-count:empty { display: none; }
.contact-count { display: block; margin-top: 7px; font-size: 12px; text-align: right; color: #626971; font-variant-numeric: tabular-nums; }

/* The field people never see, for the robots that fill every field. */
.contact-trap { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.contact-error { margin: 0; padding: 12px 14px; border-radius: 12px; background: #fdf0ef; color: #8f2219; font-size: 13.5px; line-height: 1.5; }
.contact-send { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 4px; }
.contact-submit { position: relative; min-width: 176px; }
.contact-submit .arrow, .contact-pane .button .arrow { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.contact-submit:disabled { cursor: default; opacity: .75; }
.contact-spinner { display: none; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgb(255 255 255 / 30%); border-top-color: #fff; animation: contact-turn 700ms linear infinite; }
.contact-submit[data-busy] .contact-spinner { display: block; }
.contact-submit[data-busy] .contact-submit-label, .contact-submit[data-busy] .arrow { display: none; }
.contact-note { margin: 0; font-size: 13px; color: #626971; }

/* Sent: a ring is drawn round, then the tick, as in the app when a plan begins. */
.contact-pane[data-pane='sent'] { padding-top: 6px; }
.contact-tick { display: block; width: 52px; height: 52px; margin: 0 0 24px; overflow: visible; }
.contact-tick circle { fill: none; stroke: #1875d8; stroke-width: 2.4; stroke-dasharray: 151; stroke-dashoffset: 151; transform: rotate(-90deg); transform-origin: 28px 28px; }
.contact-tick path { fill: none; stroke: #1875d8; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 30; stroke-dashoffset: 30; }
.contact-panel[data-state='sent'] .contact-tick { animation: contact-pop 420ms cubic-bezier(.34, 1.56, .64, 1) 820ms; }
.contact-panel[data-state='sent'] .contact-tick circle { animation: contact-draw 620ms cubic-bezier(.65, 0, .35, 1) forwards; }
.contact-panel[data-state='sent'] .contact-tick path { animation: contact-draw 320ms cubic-bezier(.22, 1, .36, 1) 560ms forwards; }
.contact-panel[data-state='kept'] .contact-tick circle, .contact-panel[data-state='kept'] .contact-tick path { stroke-dashoffset: 0; }
.contact-pane h2 { margin: 0 0 10px; font-size: 28px; font-weight: 500; line-height: 1.15; letter-spacing: -.02em; color: var(--ink); outline: none; }
.contact-sent-line { margin: 0; font-size: 16px; line-height: 1.6; color: #39424d; }
.contact-sent-line strong { font-weight: 500; color: var(--ink); overflow-wrap: anywhere; }
.contact-sent-note { max-width: 42ch; margin: 6px 0 30px; font-size: 14px; line-height: 1.6; color: #626971; }
.contact-pane[data-arriving] { animation: contact-in 420ms var(--ease); }

/* Opening: the three parts settle in, one after another. */
.contact-intro, .contact-links, .contact-panel { animation: contact-rise 640ms var(--ease) both; }
.contact-links { animation-delay: 70ms; }
.contact-panel { animation-delay: 120ms; }

@keyframes contact-rise { from { opacity: 0; transform: translateY(10px); } }
@keyframes contact-draw { to { stroke-dashoffset: 0; } }
@keyframes contact-pop { 50% { transform: scale(1.08); } }
@keyframes contact-turn { to { transform: rotate(360deg); } }
@keyframes contact-in { from { opacity: 0; transform: translateY(8px); } }

@media (hover: hover) and (pointer: fine) {
  .contact-links a:hover { color: #1875d8; }
  .contact-links a:hover .arrow { color: #1875d8; transform: translateX(3px); }
  .contact-topic:hover input:not(:checked) + span { box-shadow: inset 0 0 0 1px #c3cad3; }
  .contact-field input:hover:not(:focus), .contact-field textarea:hover:not(:focus) { border-color: #c8cfd7; }
  .contact-submit:hover .arrow { transform: translateX(3px); }
}
@media (max-width: 1000px) {
  .contact-layout { grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); column-gap: 48px; }
}
@media (max-width: 760px) {
  .contact-section { padding: 116px 0 64px; min-height: 0; }
  .contact-layout { grid-template-columns: 1fr; grid-template-rows: none; grid-template-areas: 'intro' 'panel' 'links'; }
  .contact-intro h1 { font-size: 32px; }
  .contact-lead { font-size: 15px; margin-top: 14px; }
  .contact-panel { justify-self: stretch; max-width: none; margin-top: 34px; }
  .contact-links { max-width: none; margin-top: 52px; }
  .contact-topic span { min-height: 44px; }
  .contact-row { grid-template-columns: 1fr; gap: 22px; }
  .contact-send { flex-direction: column; align-items: stretch; text-align: center; }
  .contact-submit { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .contact-intro, .contact-links, .contact-panel, .contact-panel[data-state='sent'] .contact-tick, .contact-pane[data-arriving], .contact-spinner { animation: none; }
  .contact-panel[data-state='sent'] .contact-tick circle, .contact-panel[data-state='sent'] .contact-tick path { animation: none; stroke-dashoffset: 0; }
}
