/* ============================================================
   Digital Wheelie — /contact page additions
   Loads AFTER styles-a.css. Additive only: everything is scoped to
   .contact-page or .interests, so nothing here touches the home page.
   (Safe to paste onto the end of styles-a.css instead of loading
   this as a separate file.)
   ============================================================ */

/* Intro copy under the eyebrow */
.contact-page .contact-intro {
  max-width: 640px;
  margin: 0 auto 1.75rem;
  text-align: center;
  font-size: var(--fs-body);
  line-height: 1.5;
  color: var(--ink);
}

/* Nav logo is already up top, so keep the big one modest —
   the form should be on screen as soon as the page opens. */
.contact-page .footer-logo { max-width: 360px; margin-bottom: 1.25rem; }

/* Phones (the QR scan case): the nav already shows the logo, so drop the
   big one and tighten the top so the first fields are on the first screen. */
@media (max-width: 640px) {
  .contact-page .footer-logo { display: none; }
  .contact-page .contact.section { padding-top: 1.5rem; }
  .contact-page .contact .wrap { padding-top: 0; }
  .contact-page .contact-intro { margin-bottom: 1.25rem; }
}

/* ---- "Interested in:" checkboxes ---- */
.interests {
  border: 0;
  padding: 0;
  margin: 0 0 1.1rem;
  min-width: 0;
}
.interests legend {
  padding: 0;
  margin-bottom: 0.2rem;
  font-weight: 700;
  color: var(--ink);
}
.interests legend .label-note { font-weight: 400; }

.interests .check {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-height: 44px;              /* comfortable touch target */
  padding: 0.25rem 0;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
}

.interests input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  flex: 0 0 auto;
  display: grid;
  place-content: center;
  width: 1.75rem;
  height: 1.75rem;
  margin: 0;
  padding: 0;
  border: 3px solid var(--ink);   /* ink on orange is ~6:1 */
  border-radius: 8px;
  background: var(--paper);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-glide),
              transform var(--dur-fast) var(--ease-glide);
}
.interests input[type="checkbox"]::before {
  content: "";
  width: 0.95rem;
  height: 0.95rem;
  background: var(--paper);
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
  transform: scale(0);
  transition: transform var(--dur-fast) var(--ease-glide);
}
.interests input[type="checkbox"]:checked { background: var(--violet); }
.interests input[type="checkbox"]:checked::before { transform: scale(1); }
.interests .check:hover input[type="checkbox"] { transform: scale(1.06); }
.interests input[type="checkbox"]:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  border-radius: 8px;
}

@media (forced-colors: active) {
  .interests input[type="checkbox"] {
    forced-color-adjust: none;
    border-color: ButtonText;
    background: Canvas;
  }
  .interests input[type="checkbox"]:checked { background: Highlight; }
  .interests input[type="checkbox"]::before { background: HighlightText; }
}

/* ---- Sticky footer ----
   Short page (tall window, or after the form is replaced by the thank-you):
   the footer sits at the bottom of the window and the contact panel
   stretches to meet it, instead of the footer floating mid-screen. */
body.contact-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
.contact-page main {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}
.contact-page .contact.section {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}
.contact-page .contact .wrap {
  flex: 1 0 auto;
  width: 100%;          /* needed: auto margins shrink flex items otherwise */
}

/* ---- After a successful send: "back to home" link under the thank-you ---- */
.contact-card-body .form-after {
  margin: 1.25rem 0 0;
  text-align: center;
  font-weight: 700;
  color: var(--ink);
}
.contact-card-body .form-after a {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.contact-card-body .form-after a:hover { color: var(--violet); }
