/* MicroProse — "Work with us" submission form
   Vanilla CSS. Tokens live on :root; dark mode is opt-in (see README). */

:root {
  --bg: #f7f8f9;
  --ink: #12100e;
  --body: #4a4843;
  --label: #3a3a3a;
  --muted: #6f6c63;
  --rule: #1a1814;
  --badge-ink: #ffffff;
  --border: #cfcdc6;
  --field-bg: #f7f8f9;
  --placeholder: #a5a5a0;
  --note: #d4121f;
  --link: #ed192d;
  --link-hover: #b3121f;
  --btn-off-bg: #dcdcd8;
  --btn-off-ink: #8a877e;
  --brand: #ed192d;
  --font-sans: 'IBM Plex Sans', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
  color-scheme: light;
}

/* Night mode — currently OFF. To enable automatic dark mode, uncomment this block.
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111010; --ink: #f2f0eb; --body: #c9c6bf; --label: #d8d5ce; --muted: #9a978f;
    --rule: #f2f0eb; --badge-ink: #111010; --border: #3a3835; --field-bg: #171615;
    --placeholder: #6f6c63; --note: #ff5a66; --link: #ff5a66; --link-hover: #ff8a93;
    --btn-off-bg: #2a2826; --btn-off-ink: #6f6c63;
    color-scheme: dark;
  }
}
*/

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; }

/* ---- Banner ---- */
.banner { background: var(--brand); padding: 16px 28px; }
.banner__inner { max-width: 760px; margin: 0 auto; }
.banner__logo { height: 24px; display: block; filter: brightness(0) invert(1); }

/* ---- Page column ---- */
.page { max-width: 760px; margin: 0 auto; padding: 0 28px 80px; }

/* ---- Intro ---- */
.intro { padding: 44px 0 40px; border-bottom: 2px solid var(--rule); }
.intro__title {
  margin: 0;
  font-size: clamp(34px, 4.6vw, 48px);
  line-height: 1.02;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-wrap: pretty;
}
.intro__copy {
  margin: 20px 0 0;
  max-width: 560px;
  font-size: 16px;
  line-height: 1.65;
  color: var(--body);
  text-wrap: pretty;
}
.intro__note {
  margin: 22px 0 0;
  font-size: 15.5px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--note);
}

/* ---- Sections ---- */
.section {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 40px 0 44px;
  border-bottom: 2px solid var(--rule);
}
.section--last { border-bottom: 0; padding-bottom: 0; }

.section__head { display: flex; align-items: center; gap: 13px; }
.badge {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  background: var(--rule);
  color: var(--badge-ink);
  padding: 5px 9px;
}
.section__title {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}

/* ---- Fields ---- */
.fields { display: flex; flex-direction: column; gap: 20px; }

.field { display: flex; flex-direction: column; gap: 8px; }
.field__label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 13px;
  font-weight: 500;
  color: var(--label);
}
.field__optional { font-weight: 400; color: var(--muted); }

.control {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 0;
  background: var(--field-bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
}
.control::placeholder { color: var(--placeholder); }
.control:focus { outline: none; border-color: var(--brand); }

textarea.control {
  height: auto;
  min-height: 170px;
  padding: 14px;
  line-height: 1.6;
  resize: vertical;
}

select.control {
  padding-right: 40px;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' stroke='%239a978f' stroke-width='1.6' fill='none' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 15px center;
}

/* ---- Consent + submit ---- */
.send { display: flex; flex-direction: column; gap: 26px; align-items: flex-start; }

.consent {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  max-width: 560px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1.55;
  color: var(--body);
}
.consent input {
  margin: 3px 0 0;
  width: 16px;
  height: 16px;
  flex: none;
  accent-color: var(--brand);
}

.btn {
  height: 52px;
  padding: 0 42px;
  border: 0;
  border-radius: 0;
  background: var(--brand);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
}
.btn:hover { background: var(--link-hover); }
.btn:disabled {
  background: var(--btn-off-bg);
  color: var(--btn-off-ink);
  cursor: not-allowed;
}

/* ---- Success ---- */
.success {
  padding: 110px 0 120px;
  text-align: center;
  border-bottom: 2px solid var(--rule);
}
.success__check {
  width: 56px; height: 56px;
  margin: 0 auto 22px;
  background: var(--brand);
  color: #fff;
  font-size: 25px;
  display: flex; align-items: center; justify-content: center;
}
.success__title {
  font-size: 34px;
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: var(--ink);
}
.success__copy {
  margin: 14px auto 0;
  max-width: 440px;
  font-size: 16px;
  line-height: 1.65;
  color: var(--body);
}

/* ---- Footer ---- */
.footer {
  margin-top: 64px;
  padding-top: 20px;
  border-top: 2px solid var(--rule);
  font-size: 14px;
  line-height: 1.6;
  color: var(--body);
}

[hidden] { display: none !important; }

/* ---- Anti-bot honeypot (never shown) and inline error ---- */
.hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.form-error { margin: 0 0 16px; font-size: 14px; line-height: 1.5; color: var(--note); }
.form-error.is-info { color: var(--body); }
#turnstile-slot { min-height: 0; }

/* ---- "How can we help?" checkbox grid ---- */
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px 20px; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; line-height: 1.45; color: var(--body); cursor: pointer; }
.checks--top { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }

/* ---- Square custom checkboxes: help options and the consent box ---- */
.check input, .consent input[type="checkbox"] {
  appearance: none; -webkit-appearance: none;
  width: 20px; height: 20px; margin: 1px 0 0; flex: none;
  border: 1.5px solid var(--border); border-radius: 0; background: var(--field-bg);
  display: inline-grid; place-content: center; cursor: pointer;
}
.check input:hover, .consent input[type="checkbox"]:hover { border-color: var(--ink); }
.check input:focus-visible, .consent input[type="checkbox"]:focus-visible { outline: none; border-color: var(--brand); }
.check input::before, .consent input[type="checkbox"]::before {
  content: ""; width: 12px; height: 12px; transform: scale(0);
  background: var(--brand);
  clip-path: polygon(14% 44%, 0 62%, 40% 100%, 100% 20%, 84% 6%, 40% 66%);
}
.check input:checked, .consent input[type="checkbox"]:checked { border-color: var(--brand); }
.check input:checked::before, .consent input[type="checkbox"]:checked::before { transform: scale(1); }

/* ---- Success state: footer sits centred between the two rules ---- */
.page.is-done .footer { margin-top: 0; border-top: 0; border-bottom: 2px solid var(--rule); padding: 28px 0; text-align: center; }
