/* The contact page. Built on learn.css (the poster style), but flipped:
   a blue band at the top and off-white below, with blue type and dots. */

.v-contact {
  --rule: color-mix(in srgb, var(--blue) 40%, transparent);
  background: var(--page);
  color: var(--blue);
}
.v-contact ::selection { background: var(--blue); color: var(--page); }
.v-contact .band { background: var(--blue); color: var(--page); }
.v-contact .dot, .v-contact .dots i { background: var(--blue); }
.v-contact .poster-btn { background: var(--blue); color: var(--page); }
.v-contact .poster-btn:hover, .v-contact .poster-btn:focus-visible { background: var(--ink); color: var(--page); }

.contact-form { display: grid; gap: clamp(24px, 3vw, 40px); max-width: 980px; }

/* What it's about: four boxes in a thin-ruled row */
.topics { grid-template-columns: repeat(4, 1fr); margin: 0; padding: 0; min-width: 0; }
.topics label { position: relative; padding: 0; cursor: pointer; }
.topics input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.topics span { display: block; padding: 14px 14px; font-size: 15px; transition: background .2s, color .2s; }
.topics input:checked + span { background: var(--blue); color: var(--page); font-weight: 500; }
.topics input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 3px; }
.topics label:hover span { background: color-mix(in srgb, var(--blue) 8%, transparent); }
.topics input:checked:hover + span { background: var(--blue); }

.contact-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 20px clamp(20px, 2.4vw, 40px); }
.field { display: grid; gap: 8px; }
.field-wide { grid-column: 1 / -1; }
.field > span { font-size: 13px; font-weight: 500; letter-spacing: .02em; }
.field i { font-style: normal; font-weight: 400; opacity: .7; }
.field input, .field textarea {
  width: 100%;
  padding: 14px;
  font: inherit;
  font-size: 16px;               /* stops iPhones zooming in */
  font-weight: 400;
  color: var(--ink);
  background: #ffffff;           /* white only for boxes on the off-white, as in the app */
  border: 1px solid var(--rule);
  border-radius: 0;
  resize: vertical;
}
.field input:focus, .field textarea:focus { outline: 2px solid var(--blue); outline-offset: -1px; border-color: transparent; }

.contact-send { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.contact-send button { border: 0; cursor: pointer; font: inherit; font-weight: 500; font-size: 16px; }
.contact-send button:disabled { opacity: .6; cursor: default; }
.contact-send .status { margin: 0; font-size: 15px; }
.contact-small { margin: 0; font-size: var(--small); opacity: .85; }
.contact-small a, .learn-end h2 a { border-bottom: 1px solid var(--rule); transition: border-color .2s; }
.contact-small a:hover, .learn-end h2 a:hover { border-bottom-color: currentColor; }

.contact-form.is-sent .topics, .contact-form.is-sent .contact-fields, .contact-form.is-sent button { display: none; }

.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

@media (max-width: 760px) {
  .topics { grid-template-columns: 1fr 1fr; }
  .topics > :nth-child(3) { border-left: 0; }
  .topics > :nth-child(n+3) { border-top: 1px solid var(--rule); }
  .contact-fields { grid-template-columns: 1fr; }
}
