/* Landing page. Tokens come from base.css. */

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ---------------------------------------------------------------- hero */

.hero { background: var(--band); }
.hero__frame { display: flex; justify-content: center; }

/* The banner is shown whole. On a laptop it is sized to leave the start of the
   registration section visible below it; it never shrinks under 640px wide. */
.hero__img {
  width: min(100%, 1290px, max(640px, calc((100vh - 96px) * 1.3438)));
  height: auto;
}
@supports (height: 100svh) {
  .hero__img { width: min(100%, 1290px, max(640px, calc((100svh - 96px) * 1.3438))); }
}

/* ---------------------------------------------------------------- registration */

.register { padding: 40px 0 64px; scroll-margin-top: 0; }
.register__grid { display: grid; gap: 28px; }

.register__intro h1 {
  font-size: 28px; line-height: 34px; font-weight: 700; letter-spacing: -0.02em;
  max-width: 18em;
  text-wrap: balance;   /* even line lengths, no single word left on the last line */
}
.lead { margin-top: 16px; font-size: 18px; line-height: 28px; color: var(--ink-2); max-width: 34em; }

.steps { display: none; }

@media (min-width: 960px) {
  .register { padding: 80px 0 96px; }
  .register__grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 64px; align-items: start;
  }
  .register__intro { position: sticky; top: 48px; padding-top: 8px; }
  .register__intro h1 { font-size: 36px; line-height: 42px; }

  .steps {
    display: grid; gap: 20px;
    list-style: none; margin: 40px 0 0; padding: 32px 0 0;
    border-top: 1px solid var(--line);
  }
  .steps li { display: grid; grid-template-columns: 36px 1fr; gap: 16px; align-items: start; }
  .steps strong { display: block; font-weight: 700; }
  .steps__n {
    width: 36px; height: 36px; border-radius: 50%;
    display: grid; place-items: center;
    border: 1.5px solid var(--ink);
    font-size: 14px; font-weight: 700;
  }
  .steps__sub { display: block; color: var(--ink-2); font-size: 14px; line-height: 20px; margin-top: 2px; }
}

/* ---------------------------------------------------------------- form card */

.form-card { padding: 24px 20px 28px; scroll-margin-top: 16px; }
@media (min-width: 640px) { .form-card { padding: 40px; } }

.form-head h2 { font-size: 22px; line-height: 28px; font-weight: 700; }
.form-head p { margin-top: 4px; font-size: 14px; line-height: 20px; color: var(--ink-3); }

#form-error { margin-top: 20px; }

.fields { display: grid; gap: 20px; margin-top: 24px; }
@media (min-width: 560px) {
  .fields { grid-template-columns: 1fr 1fr; column-gap: 16px; }
  .field--full { grid-column: 1 / -1; }
}

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form-actions { margin-top: 28px; }
.fineprint { margin-top: 16px; font-size: 14px; line-height: 20px; color: var(--ink-3); }

/* ---------------------------------------------------------------- success */

.success:focus { outline: none; }
.success__badge {
  width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent); color: #000;
}
.success h2 { margin-top: 20px; font-size: 28px; line-height: 34px; font-weight: 700; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.success__lead { margin-top: 8px; font-size: 18px; line-height: 28px; color: var(--ink-2); }

.success__actions { display: grid; gap: 12px; margin-top: 28px; }
@media (min-width: 480px) { .success__actions { grid-template-columns: 1fr 1fr; } }

.linkbox { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.linkbox .field__hint { margin-top: 2px; }
.linkbox__row { display: flex; gap: 8px; margin-top: 10px; }
.linkbox__row .input { flex: 1; min-width: 0; height: 44px; font-size: 14px; }
.copy-status { min-height: 20px; margin-top: 6px; font-size: 14px; line-height: 20px; color: var(--accent-ink); font-weight: 500; }

/* QR code: only where it helps, on a larger screen with a mouse (laptop, kiosk). */
.qr { display: none; }
@media (min-width: 900px) and (hover: hover) {
  .qr.is-ready {
    display: flex; gap: 20px; align-items: center;
    margin-top: 12px; padding: 16px; border-radius: 12px;
    background: var(--surface-2);
  }
}
.qr img {
  flex: none; width: 120px; height: 120px; padding: 8px;
  background: #fff; border-radius: 8px; image-rendering: pixelated;
}
.qr p { font-size: 14px; line-height: 20px; color: var(--ink-2); }
.qr strong { display: block; color: var(--ink); font-size: 16px; line-height: 24px; margin-bottom: 2px; }

.save-tip { margin-top: 20px; font-size: 14px; line-height: 20px; color: var(--ink-2); }
.save-tip strong { color: var(--ink); font-weight: 500; }
.again { margin-top: 12px; margin-left: -4px; }

/* ---------------------------------------------------------------- footer */

.footer {
  background: var(--footer);
  color: rgb(255 255 255 / 0.85);
  padding: 40px 0 calc(40px + env(safe-area-inset-bottom));
  text-align: center;
}
.footer__inner { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.footer__logo { width: 188px; height: auto; }
.footer__legal { max-width: 36em; font-size: 14px; line-height: 20px; }
