/* The public site: landing page, application form and thank-you page.
   Colors and the light/dark switch come from the tokens in site.css (automatic via prefers-color-scheme).
   Minimum font size is 14px everywhere. No inline styles anywhere: this file is the only styling. */

button { color: inherit; font: inherit; }

.pub { --pub-max: 1120px; --pub-gap: 24px; --accent-soft: color-mix(in srgb, var(--accent) 12%, transparent); }

.pub a { color: inherit; }
.pub [hidden] { display: none !important; }
.pub-wrap { width: 100%; max-width: var(--pub-max); margin: 0 auto; padding: 0 16px; }

/* ---- header ------------------------------------------------------------ */
.pub-header { position: sticky; top: 0; z-index: 10; background: var(--bg); border-bottom: 1px solid var(--line); }
.pub-header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; padding-block: 8px; }
.pub-brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 700; font-size: 18px; text-decoration: none; letter-spacing: -0.01em; color: inherit; }
.pub-brand-name { white-space: nowrap; }
.pub-nav { display: flex; align-items: center; gap: 4px 20px; flex-wrap: wrap; }
.pub-nav a { font-size: 15px; text-decoration: none; color: var(--ink-2); padding: 8px 0; }
.pub-nav a:hover { color: var(--ink); }
.pub-nav .pub-btn { color: var(--accent-ink); padding: 8px 16px; }
.pub-nav .pub-btn:hover { color: var(--accent-ink); }

/* ---- buttons ----------------------------------------------------------- */
.pub-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 22px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font: 600 16px/1.2 var(--font); text-decoration: none; cursor: pointer;
}
.pub-btn:hover { border-color: var(--ink-2); }
.pub-btn:focus-visible, .pub input:focus-visible, .pub select:focus-visible, .pub textarea:focus-visible, .pub a:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
.pub-btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.pub-btn-primary:hover { filter: brightness(1.06); border-color: var(--accent); }
.pub-btn-large { min-height: 52px; padding: 14px 30px; font-size: 18px; }
.pub-btn[disabled] { opacity: 0.6; cursor: progress; }

/* ---- hero -------------------------------------------------------------- */
.pub-hero { padding: 72px 0 56px; background: radial-gradient(1200px 400px at 50% -10%, var(--accent-soft), transparent); }
.pub-eyebrow { display: inline-block; font-size: 14px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); margin: 0 0 12px; }
.pub-hero h1 { margin: 0 0 16px; font-size: clamp(32px, 5vw, 52px); line-height: 1.1; letter-spacing: -0.02em; max-width: 18ch; }
.pub-lede { margin: 0 0 28px; font-size: clamp(17px, 2vw, 20px); color: var(--ink-2); max-width: 60ch; }
.pub-hero-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.pub-hero-note { margin: 16px 0 0; font-size: 15px; color: var(--ink-2); }

/* ---- sections ---------------------------------------------------------- */
.pub-section { padding: 56px 0; border-top: 1px solid var(--line); }
.pub-section h2 { margin: 0 0 8px; font-size: clamp(24px, 3vw, 32px); line-height: 1.2; letter-spacing: -0.01em; }
.pub-section-lede { margin: 0 0 32px; color: var(--ink-2); font-size: 17px; max-width: 64ch; }

.pub-grid { display: grid; gap: var(--pub-gap); grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.pub-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; display: flex; flex-direction: column; gap: 8px;
}
.pub-card h3 { margin: 0; font-size: 18px; line-height: 1.3; }
.pub-card p { margin: 0; color: var(--ink-2); font-size: 15px; }
.pub-card .pub-earns { color: var(--ink); }
.pub-card-foot { margin-top: auto; padding-top: 8px; font-size: 15px; }
.pub-card-foot a { color: var(--accent); font-weight: 600; text-decoration: none; }
.pub-card-foot a:hover { text-decoration: underline; }
.pub-muted { color: var(--ink-2); }

.pub-group { margin-top: 32px; }
.pub-group:first-of-type { margin-top: 0; }
.pub-group-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 0 0 14px; }
.pub-group-head h3 { margin: 0; font-size: 20px; }
.pub-group-head p { margin: 0; color: var(--ink-2); font-size: 15px; }

.pub-tag {
  display: inline-block; align-self: flex-start; font-size: 14px; font-weight: 600; padding: 2px 10px;
  border-radius: 999px; background: var(--accent-soft); color: var(--accent);
}

/* ---- steps ------------------------------------------------------------- */
.pub-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--pub-gap); grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); counter-reset: step; }
.pub-steps li { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; counter-increment: step; }
.pub-steps li::before {
  content: counter(step); display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; margin-bottom: 12px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 16px;
}
.pub-steps h3 { margin: 0 0 6px; font-size: 18px; }
.pub-steps p { margin: 0; color: var(--ink-2); font-size: 15px; }

/* ---- call to action band ----------------------------------------------- */
.pub-cta { text-align: center; padding: 64px 0; border-top: 1px solid var(--line); background: radial-gradient(900px 300px at 50% 120%, var(--accent-soft), transparent); }
.pub-cta h2 { margin: 0 0 12px; font-size: clamp(24px, 3vw, 34px); }
.pub-cta p { margin: 0 auto 24px; color: var(--ink-2); max-width: 52ch; font-size: 17px; }

.pub-cta-actions { justify-content: center; }

/* ---- footer ------------------------------------------------------------ */
.pub-footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--ink-2); font-size: 15px; }
.pub-footer-row { display: flex; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; }
.pub-footer a { text-decoration: none; }
.pub-footer a:hover { text-decoration: underline; }

/* ---- application form -------------------------------------------------- */
.pub-page { padding: 40px 0 72px; }
.pub-page h1 { margin: 0 0 8px; font-size: clamp(28px, 4vw, 40px); line-height: 1.15; letter-spacing: -0.02em; }
.pub-page-lede { margin: 0 0 32px; color: var(--ink-2); font-size: 17px; max-width: 62ch; }

.pub-form { display: grid; gap: 28px; max-width: 860px; }
.pub-set { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 20px; margin: 0; min-width: 0; }
.pub-set legend { padding: 0 8px; font-weight: 700; font-size: 18px; }
.pub-set-help { margin: 0 0 16px; color: var(--ink-2); font-size: 15px; }

.pub-fields { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.pub-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pub-field-wide { grid-column: 1 / -1; }
.pub-field label, .pub-label { font-weight: 600; font-size: 15px; }
.pub-optional { font-weight: 400; color: var(--ink-2); }
.pub-field input[type="text"], .pub-field input[type="email"], .pub-field input[type="number"], .pub-field input[type="url"],
.pub-field select, .pub-field textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg); color: var(--ink); font: 16px/1.4 var(--font);
}
.pub-field textarea { min-height: 150px; resize: vertical; }
.pub-help { margin: 0; font-size: 14px; color: var(--ink-2); }
.pub-field-error { margin: 0; font-size: 14px; font-weight: 600; color: var(--danger); }
.pub-field-error[hidden] { display: none; }
.pub-field.has-error input, .pub-field.has-error select, .pub-field.has-error textarea { border-color: var(--danger); }

.pub-choices { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.pub-choice-group + .pub-choice-group { margin-top: 20px; }
.pub-choice-group h3 { margin: 0 0 10px; font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); }
.pub-choice {
  position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 14px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); cursor: pointer;
}
.pub-choice:hover { border-color: var(--ink-2); }
.pub-choice input { margin: 4px 0 0; width: 18px; height: 18px; flex: none; accent-color: var(--accent); }
.pub-choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.pub-choice:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.pub-choice-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pub-choice-body strong { font-size: 16px; }
.pub-choice-body span { font-size: 15px; color: var(--ink-2); }
.pub-choice-body .pub-earns { color: var(--ink); }

.pub-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.pub-form-error { margin: 0; padding: 12px 14px; border: 1px solid var(--danger); border-radius: 8px; color: var(--danger); font-weight: 600; font-size: 15px; }
.pub-form-error[hidden] { display: none; }

/* The honeypot is off screen, not display:none, so simple bots still see and fill it. */
.pub-hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* ---- thank you --------------------------------------------------------- */
.pub-done { max-width: 720px; }
.pub-ref { display: inline-block; margin: 8px 0 24px; padding: 10px 18px; border: 1px dashed var(--accent); border-radius: var(--radius); font: 700 22px/1.2 var(--font); letter-spacing: 0.04em; background: var(--accent-soft); }
.pub-next { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 14px; counter-reset: next; }
.pub-next li { display: flex; gap: 14px; counter-increment: next; }
.pub-next li::before {
  content: counter(next); flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 15px;
}
.pub-next h3 { margin: 0 0 2px; font-size: 17px; }
.pub-next p { margin: 0; color: var(--ink-2); font-size: 15px; }

@media (max-width: 640px) {
  .pub-hero { padding: 48px 0 36px; }
  .pub-section { padding: 40px 0; }
  .pub-nav { gap: 2px 14px; }
  .pub-set { padding: 16px; }
}

@media (prefers-reduced-motion: no-preference) {
  .pub-btn, .pub-choice { transition: border-color 0.15s ease, background-color 0.15s ease; }
}
