/* Download band, footer and the proposal dialog. Tokens live in sample.css and sections.css. */

/* ---------- Closing band (bookend to the hero) ---------- */

.cta-band {
  --band-reveal: 0;
  position: relative;
  display: grid;
  place-items: center;
  min-height: 80vh;
  min-height: 80svh;
  /* A framed panel, not a full-bleed wash: the light belongs to this section and stops at its edge. */
  margin: 24px;
  border-radius: 32px;
  padding-block: 128px;
  overflow: hidden;
  isolation: isolate;
}

.cta-band__canvas, .cta-band__fallback {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
}

.cta-band__canvas { display: block; }
.cta-band__fallback { display: none; background: var(--fallback-light); opacity: var(--band-reveal); }
.cta-band--no-webgl .cta-band__canvas { display: none; }
.cta-band--no-webgl .cta-band__fallback { display: block; }

.cta-band__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 720px;
  text-align: center;
}

.cta-band__title {
  margin: 0 0 16px;
  font-size: clamp(40px, 7vw, 88px);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--ink-dark);
  filter: var(--headline-shadow);
  text-wrap: balance;
}

.cta-band__text { margin: 0 0 36px; max-width: 480px; font-size: 18px; color: var(--ink-muted); text-wrap: pretty; }
.cta-band__meta { margin: 20px 0 0; font-size: 13px; color: var(--ink-muted); }

.cta-band__title, .cta-band__text, .cta-band__meta, .cta-band .button {
  transition: color var(--duration-ink) var(--ease-out), background-color var(--duration-ink) var(--ease-out);
}

/* Same rule as the hero: ink flips once, on a threshold, so a parked scroll never leaves grey text. */
.cta-band.is-lit .cta-band__title { color: var(--ink-light); }
.cta-band.is-lit .cta-band__text, .cta-band.is-lit .cta-band__meta { color: rgba(255, 255, 255, 0.86); }
.cta-band.is-lit .button--primary { background: var(--paper); color: var(--brand-blue); }
.cta-band.is-lit .button--primary:hover { background: var(--brand-pale); }

/* ---------- Footer ---------- */

.footer { padding: 32px 24px; border-top: 1px solid var(--border-hairline); background: var(--paper); }

.footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  font-size: 13px;
  color: var(--ink-muted);
}

.footer__inner p { margin: 0; }
.footer__brand { display: flex; align-items: center; gap: 10px; }
.footer__brand img { border-radius: 5px; }
.footer a { color: var(--brand-blue); font-weight: 600; text-decoration: none; }
.footer a:hover { filter: brightness(1.25); }

/* ---------- Dialog ---------- */

.dialog {
  width: min(100% - 32px, 480px);
  padding: 0;
  border: 1px solid var(--border-hairline);
  border-radius: 20px;
  background: var(--paper);
  color: var(--ink-dark);
  box-shadow: 0 24px 64px -16px rgba(9, 9, 11, 0.3);
}

.dialog::backdrop { background: rgba(9, 9, 11, 0.4); backdrop-filter: blur(4px); }
.dialog__body { display: flex; flex-direction: column; gap: 16px; padding: 24px; }
.dialog__head { display: flex; align-items: center; justify-content: space-between; }
.dialog__title { margin: 0; font-size: 20px; font-weight: 700; }

.dialog__close {
  width: 44px;
  height: 44px;
  margin-right: -12px;
  border: 0;
  background: none;
  color: var(--ink-muted);
  cursor: pointer;
}

.dialog__lead { margin: 0; font-size: 15px; color: var(--ink-muted); }
.dialog__actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 8px; }
.dialog__turnstile:empty { display: none; }
.dialog__turnstile { min-height: 65px; }

.dialog__status { margin: 0; padding: 12px 14px; border-radius: 10px; font-size: 14px; }
.dialog__status[data-tone="success"] { background: var(--success-tint); color: var(--success); }
.dialog__status[data-tone="error"] { background: var(--error-tint); color: var(--error); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field__label { font-size: 13px; font-weight: 600; }

.field__input {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-control);
  background: var(--paper);
  color: var(--ink-dark);
  font: 400 15px/1.5 var(--font-brand);
  resize: vertical;
}

.field__input:focus { border-color: var(--brand-blue); outline: none; }

@media (max-width: 640px) {
  .section { padding: 80px 16px; }
  .cta-band { padding-block: 96px; margin: 12px; border-radius: 24px; }
  .footer { padding: 24px 16px; }
  .search { width: 100%; }
  .filters { flex-direction: column; align-items: stretch; gap: 12px; }
}
