/* Contact me. Shared tokens, header, hero, buttons and footer come from site.css. */
.contact-hero .eyebrow { margin-bottom: 14px; }
.contact-hero .gold-rule { margin-bottom: 22px; }
.contact-hero .hero-copy p:not(.eyebrow) { max-width: 30ch; }
/* No photo here. Instead, a faint ink layer covers the whole page: copperplate script in invented words, in the manner of
   an engrossed document, written by a hand holding a fountain pen at the lower right. It sits above the paper and tint
   backgrounds and below the words and fields. */
.contact-page { position: relative; isolation: isolate; }
.contact-page::before { content: ""; position: absolute; inset: 0; z-index: 1; background: url("/images/contact-writing.svg") no-repeat right bottom -64px / cover; opacity: .035; filter: blur(3px); pointer-events: none;
  /* Fades in from the top: almost nothing over the hero, full strength from the tint band down. */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, transparent calc(var(--hero-height) * .55), rgb(0 0 0 / .2) var(--hero-height), #000 calc(var(--hero-height) + 260px));
  mask-image: linear-gradient(to bottom, transparent 0, transparent calc(var(--hero-height) * .55), rgb(0 0 0 / .2) var(--hero-height), #000 calc(var(--hero-height) + 260px)); }
.contact-page { --hero-height: clamp(380px, 34vw, 520px); }
.contact-hero .hero-copy, .contact-grid { position: relative; z-index: 2; }
/* The desk photo is portrait, so its column is narrower than on other pages; that keeps the cup and notebook whole. */
.contact-hero { grid-template-columns: minmax(0, 1fr) minmax(0, 42%); min-height: clamp(380px, 34vw, 520px); }
.contact-hero .hero-photo { z-index: 2; }
.contact-hero .hero-photo img { object-position: 50% 78%; }
.contact-band { background: var(--tint); }
/* Contact links across the site land here (/contact#send-message), with the heading just below the top edge. */
.contact-form { scroll-margin-top: 32px; }
/* The form leads; the notes beside it sit in a narrower column on the same left edge per column. */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 56px 96px; padding: var(--section-space) 0; }
.contact-form h2 { font-size: clamp(2.2rem, 3vw, 2.9rem); line-height: 1.1; letter-spacing: -.035em; }
.form-intro { margin-top: 16px; max-width: 46ch; color: var(--muted); font-size: 1.2rem; line-height: 1.55; text-wrap: pretty; }
.form-alert:not(.validation-summary-valid) { margin-top: 24px; padding: 14px 18px; border-left: 2px solid var(--gold); background: var(--paper); color: var(--ink); font: 1rem/1.5 var(--sans); }
.form-alert.validation-summary-valid { display: none; }
/* Shown above an empty form after a message goes out. It eases in once; reduced motion shows it at rest. */
.form-sent { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-left: 2px solid var(--gold); background: var(--paper); color: var(--ink); font: 1rem/1.5 var(--sans); animation: form-sent-in 360ms var(--ease) both; }
.form-sent-mark { display: grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--navy); color: var(--paper); font-size: .8rem; }
@keyframes form-sent-in { from { opacity: 0; transform: translateY(-8px); } }
@media (prefers-reduced-motion: reduce) { .form-sent { animation: none; } }
.form-alert ul { margin: 0; padding: 0; list-style: none; }
.contact-form form { margin-top: 32px; display: grid; gap: 24px; max-width: 760px; }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { color: var(--ink); font: 500 1rem/1.4 var(--sans); }
.optional { color: var(--muted); font-weight: 400; }
/* Square, flat fields on paper with a navy edge that turns brass on focus. */
.field input, .field select, .field textarea { width: 100%; min-height: 52px; padding: 12px 14px; border: 1px solid #8b939e; border-radius: 0; background: var(--paper); color: var(--ink); font: 1.1rem/1.5 var(--serif); }
.field textarea { min-height: 200px; resize: vertical; }
/* The native arrow is drawn in CSS so the strict CSP needs no data: images. */
.field select { appearance: none; padding-right: 44px; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: right 22px center, right 16px center; background-size: 6px 6px; background-repeat: no-repeat; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-color: var(--ink); }
.field [aria-invalid="true"] { border-color: #a3341f; }
.field-error { color: #a3341f; font: 500 .875rem/1.4 var(--sans); }
.field-error:empty { display: none; }
.contact-form button.contact-link { justify-self: start; min-height: 52px; }
.contact-aside { display: grid; align-content: start; gap: 40px; padding-top: 8px; }
.aside-item { position: relative; padding-top: 20px; }
.aside-item::before { content: ""; position: absolute; top: 0; left: 0; width: 28px; height: 2px; background: var(--gold); }
.aside-item h2 { margin-bottom: 10px; color: var(--label); font: 500 .875rem/1.4 var(--sans); }
.aside-item p { color: var(--muted); font-size: 1.15rem; line-height: 1.55; text-wrap: pretty; }
.aside-item p + p { margin-top: 12px; }
.elsewhere { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 28px; }
.elsewhere .text-link { margin-top: 0; min-height: 44px; display: inline-flex; align-items: end; }
/* The error page (Pages/Error.cshtml) borrows this contact stylesheet for its simple message layout. */
.sent { padding: 112px 0 var(--section-space); }
.sent h1 { max-width: 16ch; }
.sent > p:not(.eyebrow) { color: var(--muted); font-size: 1.3rem; line-height: 1.55; }
.sent-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 36px; margin-top: 36px; }
.sent-actions .text-link { margin-top: 0; }
@media (max-width: 1000px) {
  .contact-grid { grid-template-columns: 1fr; }
  .contact-aside { grid-template-columns: 1fr 1fr; gap: 36px 48px; padding-top: 0; }
}
@media (max-width: 760px) {
  .contact-hero { grid-template-columns: 1fr; min-height: 0; }
  .contact-page { --hero-height: 330px; }
  /* At phone width, "cover" would blow the script up past legibility; repeat it down the page at a set scale instead. */
  .contact-page::before { background-size: 280% auto; background-position: right top; background-repeat: repeat-y; }
  .contact-grid { padding-block: 48px 56px; }
  .field-pair, .contact-aside { grid-template-columns: 1fr; }
  .form-intro { font-size: 1.15rem; }
  .sent { padding-top: 64px; }
}
@media (forced-colors: active) {
  .contact-page::before { display: none; }
  .field select { appearance: auto; background-image: none; padding-right: 14px; }
}
