/* Zelazny Services - public site
 * Design goals: professional, conservative, fast on iPhone, prints clean.
 * No JS framework. No web fonts (system stack). Single CSS file.
 * Mobile first in practice: 44px tap targets, 16px form text so iOS does
 * not zoom on focus, single column below 700px.
 */

:root {
  --ink: #0d1117;
  --ink-2: #1f2937;
  --muted: #4b5563;
  --line: #e5e7eb;
  --bg: #ffffff;
  --bg-alt: #f7f8fa;
  --accent: #0b3a66;   /* deep aviation blue */
  --accent-2: #1457a3;
  --warn: #b45309;
  --ok: #15803d;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

.container { max-width: 980px; margin: 0 auto; padding: 0 24px; }

/* Header */
header.site {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: sticky; top: 0; z-index: 10;
}
header.site .container {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 14px; padding-bottom: 14px;
}
header.site .brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; color: var(--ink); font-size: 1.05em;
}
header.site .brand img { height: 28px; width: auto; }
header.site nav a {
  margin-left: 22px; color: var(--ink-2); font-weight: 500; font-size: 0.95em;
}
header.site nav a.cta {
  background: var(--accent); color: white;
  padding: 8px 14px; border-radius: 6px;
}
header.site nav a.cta:hover { background: var(--accent-2); text-decoration: none; }

/* Hero */
.hero { padding: 64px 0 48px; background: var(--bg-alt); border-bottom: 1px solid var(--line); }
.hero h1 { font-size: 2.4em; line-height: 1.15; margin: 0 0 16px; color: var(--ink); }
.hero p.lead { font-size: 1.2em; color: var(--muted); max-width: 680px; margin: 0 0 24px; }
.hero .actions a { margin-right: 12px; margin-bottom: 10px; }

/* Type experience line under the hero */
.types {
  margin: 24px 0 0; padding-top: 16px; border-top: 1px solid var(--line);
  font-size: 0.9em; color: var(--muted); letter-spacing: 0.01em;
}

/* Generic sections */
main { padding: 48px 0; }
section { padding: 32px 0; }
section + section { border-top: 1px solid var(--line); }
h2 { font-size: 1.6em; margin: 0 0 16px; }
h3 { font-size: 1.15em; margin: 0 0 8px; color: var(--ink); }
p { margin: 8px 0; }
ul, ol { margin: 8px 0 16px; padding-left: 22px; }
li { margin: 4px 0; }

.subtitle { color: var(--muted); margin-top: -8px; }

/* Buttons */
.btn {
  display: inline-block; padding: 10px 18px; border-radius: 6px;
  background: var(--accent); color: white !important; font-weight: 600;
  border: 0; cursor: pointer; font-size: 1em;
}
.btn:hover { background: var(--accent-2); text-decoration: none; }
.btn.secondary { background: white; color: var(--accent) !important; border: 1px solid var(--accent); }
.btn.secondary:hover { background: var(--bg-alt); }
.btn:disabled { opacity: 0.5; cursor: wait; }

/* Service grid */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.service {
  border: 1px solid var(--line); border-radius: 8px; padding: 20px;
  background: var(--bg); transition: border-color 0.15s, transform 0.15s;
}
.service:hover { border-color: var(--accent); transform: translateY(-1px); }
.service h3 { margin-bottom: 6px; color: var(--accent); }
.service p { font-size: 0.95em; color: var(--ink-2); margin: 0; }

/* Callout */
.callout {
  background: #fffbeb; border: 1px solid #fde68a; border-left: 4px solid var(--warn);
  padding: 14px 18px; border-radius: 6px; margin: 16px 0;
  color: #78350f; font-size: 0.95em;
}

/* Numbered engagement steps */
ol.steps { counter-reset: step; list-style: none; padding-left: 0; margin: 16px 0; }
ol.steps li {
  counter-increment: step; position: relative;
  padding: 0 0 0 44px; margin: 0 0 14px; min-height: 32px;
}
ol.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent); color: white;
  font-weight: 700; font-size: 0.9em;
  display: flex; align-items: center; justify-content: center;
}

/* Portrait on the About page */
.portrait {
  float: right; width: 190px; height: auto; margin: 0 0 16px 24px;
  border-radius: 8px; border: 1px solid var(--line);
}

/* Form */
form.intake { display: grid; gap: 14px; max-width: 640px; }
form.intake label,
form.intake .group-label { display: block; font-weight: 600; font-size: 0.9em; color: var(--ink-2); margin-bottom: 4px; }
form.intake .hint { font-weight: 400; color: var(--muted); }
form.intake input, form.intake select, form.intake textarea {
  width: 100%; min-height: 44px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 6px;
  font-family: inherit; font-size: 16px; line-height: 1.4;
  color: var(--ink); background: var(--bg);
}
form.intake textarea { min-height: 120px; resize: vertical; }
form.intake input:focus, form.intake select:focus, form.intake textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(20,87,163,0.15);
}
form.intake .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
form.intake .row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }

/* Grouped sections so a phone user can see where they are */
form.intake fieldset {
  border: 1px solid var(--line); border-radius: 8px;
  padding: 18px; margin: 0; display: grid; gap: 14px;
}
form.intake legend {
  padding: 0 8px; margin-left: -8px;
  font-weight: 700; font-size: 0.85em; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--accent);
}

/* Checkbox list: whole row is the tap target */
.checks { display: grid; gap: 2px; }
.checks label {
  display: flex; align-items: center; gap: 10px;
  min-height: 44px; margin: 0; padding: 2px 4px;
  font-weight: 400; font-size: 1em; color: var(--ink);
  border-radius: 6px; cursor: pointer;
}
.checks label:hover { background: var(--bg-alt); }
.checks input[type="checkbox"] {
  width: 20px; height: 20px; min-height: 20px; flex: 0 0 auto; margin: 0; accent-color: var(--accent);
}

/* Honeypot. Off-screen rather than display:none so bots still fill it. */
.hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.turnstile { min-height: 0; }
form.intake .submit-bar { display: grid; gap: 10px; }
form.intake .submit-bar .btn { min-height: 48px; padding: 13px 18px; }

.form-status { padding: 12px 14px; border-radius: 6px; }
.form-status.ok { background: #f0fdf4; border: 1px solid #bbf7d0; color: var(--ok); }
.form-status.error { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; }
.form-status.busy { background: var(--bg-alt); border: 1px solid var(--line); color: var(--muted); }

/* Report viewer */
.report-meta { background: var(--bg-alt); border: 1px solid var(--line); border-radius: 8px; padding: 16px; margin-bottom: 24px; }
.report-meta dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 0; }
.report-meta dt { font-weight: 600; color: var(--muted); }
.report-meta dd { margin: 0; }
.scoreboard .pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.85em; margin-right: 4px; border: 1px solid var(--line); background: var(--bg); }
.scoreboard .pill.green { color: var(--ok); border-color: #bbf7d0; }
.scoreboard .pill.yellow { color: var(--warn); border-color: #fde68a; }
.scoreboard .pill.red { color: #b91c1c; border-color: #fecaca; }
.scoreboard .pill.grey { color: var(--muted); }
table.findings { width: 100%; border-collapse: collapse; margin-top: 12px; }
table.findings th, table.findings td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); font-size: 0.95em; vertical-align: top; }
table.findings th { background: var(--bg-alt); font-weight: 600; }

/* Footer */
footer.site {
  background: var(--ink); color: #cbd5e1; padding: 32px 0;
  font-size: 0.9em; margin-top: 64px;
}
footer.site a { color: #e5e7eb; }
footer.site .footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px; }
footer.site .legal { color: #94a3b8; margin-top: 24px; font-size: 0.85em; }

/* Sticky "Request a proposal" bar, phones only. Pages that already are the
   form (contact, thanks) do not carry the .with-cta body class. */
.mobile-cta { display: none; }

@media (max-width: 700px) {
  .hero { padding: 40px 0 32px; }
  .hero h1 { font-size: 1.8em; }
  .hero .actions a { display: block; margin-right: 0; text-align: center; }
  header.site nav a { margin-left: 12px; font-size: 0.9em; }
  header.site nav a.cta { padding: 10px 12px; }
  form.intake .row2, form.intake .row3 { grid-template-columns: 1fr; }
  form.intake fieldset { padding: 14px; }
  footer.site .footer-grid { grid-template-columns: 1fr; }
  .portrait { float: none; width: 160px; margin: 0 0 16px; display: block; }

  /* Submit stays reachable without scrolling to the bottom of a long form */
  form.intake .submit-bar {
    position: sticky; bottom: 0; z-index: 5;
    background: var(--bg); border-top: 1px solid var(--line);
    padding: 10px 0 calc(10px + env(safe-area-inset-bottom));
    margin: 0 -2px;
  }

  body.with-cta { padding-bottom: 80px; }
  body.with-cta .mobile-cta {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    background: var(--bg); border-top: 1px solid var(--line);
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  }
  body.with-cta .mobile-cta .btn {
    display: block; text-align: center; min-height: 48px; padding: 13px 18px;
  }
}

@media print {
  header.site, footer.site, .hero .actions, form.intake, .mobile-cta { display: none; }
  body { color: black; background: white; }
  a { color: black; text-decoration: none; }
}
