/* Tristate Construction News — shared styles
   Layout concept: a trade-publication masthead over a bid-tab ledger.
   Section eyebrows use real CSI MasterFormat front-end section numbers. */
:root {
  --navy: #152C3D;
  --orange: #E56732;
  --orange-ink: #B9471A;      /* orange for small text on light grounds */
  --bg: #F3F5F6;              /* cool, slightly blue paper */
  --surface: #FFFFFF;
  --ink: #152C3D;
  --muted: #566775;
  --rule: #D3DCE2;
  --rule-strong: #152C3D;
  --band: #152C3D;            /* dark band background */
  --band-ink: #E9EFF3;
  --band-muted: #9FB1BE;
  --redact: #C9D3DA;
  --good: #2F7D4F;
  --display: "Playfair Display", Georgia, "Times New Roman", serif;
  --label: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --body: "Barlow", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --wrap: 1160px;
  --radius: 3px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0D1A24; --surface: #13263A; --ink: #E6EDF2; --muted: #9BAEBB;
    --rule: #22384B; --rule-strong: #E6EDF2; --band: #08131B; --band-ink: #E6EDF2;
    --band-muted: #8FA3B1; --redact: #2A4257; --orange: #EE7442; --orange-ink: #F08A5D;
    --good: #5DBB84; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0D1A24; --surface: #13263A; --ink: #E6EDF2; --muted: #9BAEBB;
  --rule: #22384B; --rule-strong: #E6EDF2; --band: #08131B; --band-ink: #E6EDF2;
  --band-muted: #8FA3B1; --redact: #2A4257; --orange: #EE7442; --orange-ink: #F08A5D;
  --good: #5DBB84; color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--body); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--surface); }
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

.wrap {
  max-width: var(--wrap); margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
@media (min-width: 720px) { .wrap { padding-left: max(32px, env(safe-area-inset-left, 0px)); padding-right: max(32px, env(safe-area-inset-right, 0px)); } }

/* ---------- type ---------- */
h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1.08; margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.3rem, 5.6vw, 4.1rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); }
h3 { font-size: 1.35rem; line-height: 1.2; }
p { margin: 0; max-width: 65ch; }
.lede { font-size: 1.2rem; color: var(--muted); }
.label, .eyebrow {
  font-family: var(--label); font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; font-size: 0.86rem;
}
.eyebrow { display: inline-flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; color: var(--muted); }
.eyebrow .csi { color: var(--muted); opacity: .75; font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: 0.04em; display: inline-flex; align-items: center; gap: 10px; }
.eyebrow .csi::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: currentColor; flex: 0 0 auto; transform: translateY(-0.5px); }
.num { font-variant-numeric: tabular-nums; }

/* ---------- masthead ---------- */
.dateline { background: var(--band); color: var(--band-muted); font-family: var(--label); font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; }
.dateline .wrap { display: flex; justify-content: space-between; gap: 12px; padding-block: 7px; flex-wrap: wrap; }
.dateline b { color: var(--band-ink); font-weight: 600; }
.masthead { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--surface); border-bottom: 3px double var(--rule-strong); }
.masthead .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 12px; }
.brand { display: flex; align-items: center; text-decoration: none; min-width: 0; }
.brand img { height: 46px; width: auto; }
.brand .logo-dark { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand .logo-light { display: none; } :root:not([data-theme="light"]) .brand .logo-dark { display: block; } }
:root[data-theme="dark"] .brand .logo-light { display: none; }
:root[data-theme="dark"] .brand .logo-dark { display: block; }
.nav { display: flex; align-items: center; gap: 22px; font-family: var(--label); font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; font-size: 0.95rem; }
.nav a { text-decoration: none; color: var(--ink); }
.nav a:hover { color: var(--orange-ink); }
.nav .hide-sm { display: none; }
@media (min-width: 860px) { .nav .hide-sm { display: inline; } .brand img { height: 52px; } }
@media (max-width: 520px) { .brand img { height: 34px; } .nav { gap: 12px; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--label); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  font-size: 1.02rem; padding: 13px 24px; border-radius: var(--radius); border: 2px solid transparent;
  text-decoration: none; cursor: pointer; transition: transform .15s ease, background-color .15s ease;
  line-height: 1.1;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: #D45A27; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--rule-strong); }
.btn-ghost-light { background: transparent; color: var(--band-ink); border-color: var(--band-muted); }
.btn-sm { padding: 9px 16px; font-size: 0.92rem; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }

/* ---------- sections ---------- */
section { padding-block: 72px; }
@media (max-width: 640px) { section { padding-block: 52px; } }
.section-head { display: grid; gap: 14px; margin-bottom: 40px; max-width: 760px; }
.band { background: var(--band); color: var(--band-ink); }
.band .lede, .band .muted { color: var(--band-muted); }
.band .eyebrow { color: var(--band-muted); }
.band .eyebrow .csi { color: var(--band-muted); }
.surface { background: var(--surface); border-block: 1px solid var(--rule); }
.muted { color: var(--muted); }

/* ---------- footer ---------- */
.footer { background: var(--band); color: var(--band-muted); font-size: 0.92rem; }
.footer .wrap { display: grid; gap: 28px; padding-block: 48px; }
@media (min-width: 760px) { .footer .wrap { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer img { height: 40px; width: auto; }
.footer h4 { font-family: var(--label); text-transform: uppercase; letter-spacing: .08em; color: var(--band-ink); margin: 0 0 10px; font-size: 0.95rem; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.footer a { color: var(--band-ink); text-decoration: none; }
.footer a:hover { color: var(--orange); }
.footer .fine { grid-column: 1 / -1; border-top: 1px solid #2A4152; padding-top: 18px; font-size: 0.82rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }

/* ---------- forms ---------- */
.field { display: grid; gap: 6px; min-width: 0; }
.field label { font-family: var(--label); font-weight: 600; text-transform: uppercase; letter-spacing: .07em; font-size: 0.85rem; color: var(--muted); }
.field input, .field select, .field textarea {
  font: inherit; font-size: 1rem; color: var(--ink); background: var(--surface);
  border: 1.5px solid var(--rule); border-radius: var(--radius); padding: 11px 12px; width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--orange); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--orange) 25%, transparent); }
.form-note { font-size: 0.88rem; color: var(--muted); }
.notice { border: 1.5px dashed var(--orange); padding: 12px 14px; border-radius: var(--radius); font-size: 0.93rem; background: color-mix(in srgb, var(--orange) 8%, transparent); }

/* ---------- chips ---------- */
.chip { display: inline-block; font-family: var(--label); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; font-size: 0.78rem; padding: 2px 8px; border-radius: 2px; border: 1px solid var(--rule); color: var(--muted); white-space: nowrap; }
.chip-hot { background: var(--orange); border-color: var(--orange); color: #fff; }
.chip-navy { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.redact { display: inline-block; height: 0.8em; border-radius: 2px; background: var(--redact); vertical-align: middle; }
