/* Genesis Impact Studios — Intake Portal
   Design language from Jeremy's genesis_portal.html:
   EB Garamond display / Inter 300 body, warm paper, hairline rules,
   underline-only fields, dark rectangular buttons, red used sparingly. */

:root {
  --black: #0f0f0f;
  --ink: #1c1c1c;
  --rule: #d0ccc4;
  --field-bg: #f9f8f6;
  --page: #f4f2ee;
  --warm-mid: #7a7570;
  --serif: 'EB Garamond', Georgia, serif;
  --sans: 'Inter', system-ui, sans-serif;
  --red: #8b1a1a;
  --ok: #3d6b46;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 300;
  line-height: 1.65;
}

.wrap { max-width: 760px; margin: 0 auto; padding: 0 24px 90px; }

/* ---------- Masthead ---------- */
header.masthead {
  border-bottom: 1px solid var(--ink);
  padding: 34px 0 16px;
  margin-bottom: 0;
}
.masthead h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 24px;
  letter-spacing: 0.01em;
  margin: 0;
}
.masthead .sub {
  font-family: var(--serif);
  font-style: italic;
  color: var(--warm-mid);
  font-size: 14px;
  margin-top: 2px;
}
.casebar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 0.5px solid var(--rule);
  margin-bottom: 30px;
  font-size: 12px;
  color: var(--warm-mid);
}
.casebar strong { font-weight: 500; color: var(--ink); }
.casebar .caseid {
  font-weight: 500;
  color: var(--red);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 11px;
}

/* ---------- Part labels (Jeremy's treatment) ---------- */
.stamp {
  display: block;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--warm-mid);
  margin-bottom: 6px;
}
section.part { margin: 44px 0; }
section.part > h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 28px;
  margin: 0 0 6px;
}
section.part > .lede {
  color: var(--warm-mid);
  font-size: 13.5px;
  margin: 0 0 26px;
  max-width: 56ch;
}

/* ---------- Steps ---------- */
.steps {
  display: flex;
  gap: 0;
  margin: 26px 0 0;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-bottom: 0.5px solid var(--rule);
}
.steps span {
  flex: 1;
  text-align: center;
  padding: 12px 4px 10px;
  color: var(--warm-mid);
  border-bottom: 2px solid transparent;
  margin-bottom: -0.5px;
}
.steps span.active { color: var(--ink); border-bottom-color: var(--black); }
.steps span.done { color: var(--ink); border-bottom-color: var(--rule); }

/* ---------- Fields ---------- */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 34px; }
.grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .grid { grid-template-columns: 1fr; } }

label.f {
  display: block;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--warm-mid);
  margin-bottom: 2px;
}
input[type="text"], input[type="email"], input[type="tel"], input[type="date"], textarea {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 300;
  color: var(--ink);
  background: var(--field-bg);
  border: none;
  border-bottom: 1px solid var(--rule);
  border-radius: 0;
  padding: 10px 8px;
  width: 100%;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s;
}
input:focus, textarea:focus { border-bottom-color: var(--ink); }
textarea { min-height: 96px; line-height: 1.65; }
.q { margin-bottom: 30px; }
.q .qnum {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 17px;
  margin-bottom: 8px;
}
button:focus-visible, .drop:focus-visible {
  outline: 1.5px solid var(--red);
  outline-offset: 2px;
}

/* ---------- Checkboxes (Jeremy's cl-item treatment, CSS-only) ---------- */
.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 10px; }
@media (max-width: 640px) { .checks { grid-template-columns: 1fr; } }
.checks label, .clist label {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 13px;
  font-weight: 300;
  color: var(--ink);
  line-height: 1.4;
  cursor: pointer;
  padding: 11px 16px;
  border: 0.5px solid var(--rule);
  background: var(--field-bg);
  transition: background 0.15s;
}
.checks label:hover, .clist label:hover { background: #f1efe9; }
.clist { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
@media (max-width: 640px) { .clist { grid-template-columns: 1fr; } }
input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 14px; height: 14px;
  border: 0.5px solid var(--warm-mid);
  background: transparent;
  flex-shrink: 0;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
input[type="checkbox"]:checked { background: var(--ink); border-color: var(--ink); }
input[type="checkbox"]:checked::after {
  content: '\2713';
  font-size: 9px;
  font-weight: 700;
  color: var(--page);
  line-height: 1;
}
h3.grouphead {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--warm-mid);
  border-bottom: 0.5px solid var(--rule);
  padding-bottom: 8px;
  margin: 34px 0 12px;
}

/* ---------- Dropzones ---------- */
.drop {
  border: 1px dashed var(--rule);
  background: var(--field-bg);
  padding: 26px 22px;
  text-align: center;
  color: var(--warm-mid);
  font-size: 13px;
  cursor: pointer;
  margin: 14px 0 6px;
  transition: border-color 0.15s, background 0.15s;
}
.drop:hover { border-color: var(--warm-mid); }
.drop.dragover { border-color: var(--ink); background: #f1efe9; color: var(--ink); }
.drop strong {
  display: block;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 17px;
  color: var(--ink);
  margin-bottom: 3px;
}
ul.filelist { list-style: none; padding: 0; margin: 8px 0 0; font-size: 13px; }
ul.filelist li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 14px;
  border: 0.5px solid var(--rule);
  border-top: none;
  background: var(--field-bg);
}
ul.filelist li:first-child { border-top: 0.5px solid var(--rule); }
ul.filelist .size { color: var(--warm-mid); white-space: nowrap; font-size: 12px; }
ul.filelist button.rm {
  border: none; background: none; color: var(--red);
  cursor: pointer; font-weight: 500; font-size: 14px; padding: 0 4px;
}

/* ---------- Buttons (Jeremy's system) ---------- */
.nav { display: flex; justify-content: space-between; margin-top: 44px; gap: 14px; }
button.btn {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 13px 32px;
  border: none;
  background: var(--black);
  color: var(--page);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
button.btn:hover { background: #333; }
button.btn.secondary {
  background: transparent;
  color: var(--warm-mid);
  border: 0.5px solid var(--rule);
}
button.btn.secondary:hover { color: var(--ink); border-color: var(--warm-mid); background: transparent; }
button.btn.primary { background: var(--red); }
button.btn.primary:hover { background: #6f1414; }
button.btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ---------- Gate (the cover, compressed) ---------- */
#gate {
  min-height: 100vh;
  background: var(--black);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px 20px;
}
#gate .wordmark {
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  letter-spacing: 0.05em;
  color: rgba(244, 242, 238, 0.45);
  margin-bottom: 8px;
  text-align: center;
}
#gate .wordtitle {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(30px, 5vw, 44px);
  color: #f4f2ee;
  margin: 0 0 34px;
  text-align: center;
}
#gate .wordtitle em { font-style: italic; color: rgba(244, 242, 238, 0.55); }
#gate .panel {
  width: 100%;
  max-width: 440px;
  background: var(--page);
  padding: 40px 38px 34px;
}
#gate h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 24px;
  margin: 0 0 4px;
}
#gate p.note { color: var(--warm-mid); font-size: 13px; margin: 0 0 24px; }
#gate .privline {
  margin-top: 26px;
  padding-top: 14px;
  border-top: 0.5px solid var(--rule);
  font-size: 11px;
  color: var(--warm-mid);
  line-height: 1.6;
}
.err { color: var(--red); font-size: 13px; margin-top: 12px; min-height: 1.2em; }

/* ---------- Case picker ---------- */
#case-list button.btn.secondary {
  font-family: var(--sans);
  text-transform: none;
  letter-spacing: 0.01em;
  font-size: 14px;
  font-weight: 300;
  color: var(--ink);
  background: var(--field-bg);
  padding: 15px 18px;
}
#case-list button.btn.secondary:hover { border-color: var(--ink); background: #f1efe9; }

/* ---------- Review ---------- */
.review-block {
  background: var(--field-bg);
  border: 0.5px solid var(--rule);
  padding: 22px 26px;
  margin: 16px 0;
}
.review-block h4 {
  margin: 0 0 12px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red);
}
.review-block dl { margin: 0; }
.review-block dt { font-weight: 500; font-size: 12px; margin-top: 12px; color: var(--warm-mid); }
.review-block dd { margin: 2px 0 4px; white-space: pre-wrap; }
.privilege {
  border-left: 2px solid var(--red);
  background: var(--field-bg);
  color: var(--ink);
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  padding: 16px 20px;
  margin: 28px 0;
}

/* ---------- Upload progress ---------- */
.upfile { margin: 18px 0; }
.upfile .uname { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; }
.upfile .bar { height: 2px; background: var(--rule); }
.upfile .bar > i { display: block; height: 100%; width: 0%; background: var(--red); transition: width 0.25s; }
.upfile.done .bar > i { background: var(--ok); }
.upfile .status { font-size: 11px; color: var(--warm-mid); margin-top: 4px; letter-spacing: 0.04em; }
.upfile.failed .status { color: var(--red); font-weight: 500; }

/* ---------- Done ---------- */
#done {
  min-height: 100vh;
  background: var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 20px;
}
#done .panel {
  width: 100%;
  max-width: 520px;
  text-align: center;
  background: var(--page);
  padding: 52px 40px 44px;
}
#done .stamp { color: var(--ok); }
#done h2 { font-family: var(--serif); font-weight: 400; font-size: 30px; margin: 4px 0 10px; }
#done p { color: var(--warm-mid); font-size: 14px; }
#done button { margin-top: 14px; }

.hidden { display: none !important; }
footer.foot {
  margin-top: 70px;
  padding-top: 18px;
  border-top: 0.5px solid var(--rule);
  color: var(--warm-mid);
  font-size: 11px;
  text-align: center;
  letter-spacing: 0.04em;
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
