/*
 * Shared component: the dark final ask (".ask") with the paper free-check form
 * card (".check-form"). The one stylesheet for it: every page that ends with
 * the Paper "Final ask" band loads it. Markup: views/partials/redesign/final-ask.ejs
 * (the form card alone: check-form.ejs). Behaviour: site.js ([data-check-form]);
 * server: lib/contact-route.js. The ribbons behind are a live canvas
 * (graphics/thick-ribbons.js via graphics/runner.js); the CSS background is
 * their poster. Values from Paper. Mobile board below 768px.
 */

/* ── Final ask ──────────────────────────────────────────────────── */
.ask { position: relative; background: var(--ink); color: var(--paper); overflow: clip; }
.ask__ribbons {
  position: absolute;
  inset: 0 0 auto 0;
  height: 1020px;
  opacity: 0.5;
  background: url(/images/redesign/home/thick-ribbons-1600.webp) 50% 0 / cover no-repeat;
  pointer-events: none;
}
/* Ask right above the footer (site.js adds .ask--tail and --ask-tail, the
   footer's height): the ribbons layer runs on behind the footer, so the ask
   and the footer read as one dark ground. The layer sits above the footer's
   own ink (z-index 1) and under both contents (z-index 2, chrome.css). */
.ask--tail { overflow: visible; overflow-x: clip; }
.ask--tail .ask__ribbons { z-index: 1; height: auto; bottom: calc(-1 * var(--ask-tail, 0px)); }
.ask--tail .ask__inner { z-index: 2; }
/* The ribbons move on their canvas (graphics/thick-ribbons.js); the image is their poster. */
.ask__inner { position: relative; display: flex; align-items: center; gap: 80px; padding-top: 144px; padding-bottom: 120px; }
.ask__copy { flex: 1 1 0; display: flex; flex-direction: column; gap: 24px; }
.ask__title { font-family: var(--font-display); font-size: clamp(46px, 30.4px + 4vw, 88px); font-weight: 800; letter-spacing: -0.035em; line-height: 0.955; }
.ask__sub { max-width: 560px; color: var(--text-on-ink); font-size: 19px; line-height: 29px; }
.ask__links { display: flex; flex-direction: column; gap: 12px; }
.ask__funder { color: var(--paper); font-size: 16px; font-weight: 500; line-height: 20px; text-decoration: underline 1px; text-underline-position: from-font; }
.check-form {
  width: 480px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 32px;
  border-radius: var(--radius-tile);
  background: var(--paper);
  color: var(--ink);
}
.check-form :focus-visible { outline-color: var(--deep-green); }
.check-form[hidden] { display: none; }
/* Funder card, booking step (booking-frame.ejs; frame styles in booking.css) */
.check-book__sent { display: flex; align-items: center; gap: 8px; color: var(--deep-green); font-size: 14px; font-weight: 600; line-height: 20px; }
.check-book__sent svg { flex-shrink: 0; color: var(--emerald); }
.check-book .check-form__title:focus { outline: none; }
.check-form__title { font-family: var(--font-display); font-size: 26px; font-weight: 800; line-height: 32px; }
.check-form__pair { display: flex; gap: 10px; }
.check-form__pair > .field { flex: 1 1 0; }
.check-form__pair > .check-form__site { flex-grow: 1.4; }
.check-form__pair--stack { flex-direction: column; gap: 14px; }
.check-form .field__error:empty { display: none; }
.check-form__submit { margin-top: 4px; padding: 17px; }
.check-form__status { color: var(--error); font-size: 14px; line-height: 18px; }
.check-form__status:empty { display: none; }
.check-form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
/* Optional pieces (check-form.ejs locals countryChoose, submitArrow, next,
   small; the Web Summit board). Select chevron as on the free-check page. */
.check-form__select { position: relative; }
.check-form__select .input { appearance: none; padding-right: 40px; cursor: pointer; }
.check-form__select .input:invalid { color: var(--placeholder); }
.check-form__select option { color: var(--ink); }
.check-form__chev { position: absolute; top: 50%; right: 16px; color: var(--muted); transform: translateY(-50%); pointer-events: none; }
.check-form__submit svg { flex-shrink: 0; }
.check-form__next { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--deep-green); font-size: 15px; font-weight: 600; line-height: 20px; }
.check-form__next svg { flex-shrink: 0; }
.check-form__small { color: var(--muted); font-size: 14px; line-height: 21px; text-align: center; }

@media (max-width: 767px) {
  .ask__inner { flex-direction: column; align-items: stretch; gap: 18px; padding-top: 72px; padding-bottom: 48px; }
  .ask__copy { gap: 18px; }
  .ask__title { letter-spacing: -0.035em; line-height: 44px; }
  .ask__sub { font-size: 16px; line-height: 24px; }
  .ask__funder { font-size: 14px; line-height: 18px; }
  .check-form { width: auto; gap: 10px; padding: 20px; border-radius: var(--radius-card); }
  .check-form__title { font-size: 21px; line-height: 26px; }
  .check-form .input { padding: 13px; border-radius: 12px; }
  .check-form__pair { flex-direction: column; gap: 10px; }
  .check-form .choice__row { gap: 6px; }
  .check-form .choice__opt span { padding: 8px 14px; font-size: 13px; line-height: 16px; }
  .check-form__submit { padding: 15px; font-size: 16px; line-height: 20px; }
  .check-form__next { font-size: 14px; }
  .check-form__small { font-size: 13px; line-height: 19px; }
}

@media (hover: hover) and (pointer: fine) {
  .ask__funder { transition: color var(--dur-hover) ease; }
  .ask__funder:hover { color: var(--emerald); }
}

/* Tablet: stack before the two columns crush */
@media (min-width: 768px) and (max-width: 1199px) {
  .ask__inner { flex-direction: column; align-items: stretch; gap: 48px; }
  .check-form { width: auto; }
}
