/* ---------------------------------------------------------------
   The palette is lifted from the app icon itself, not invented:
   ground #0A0D12, mark #F5F7FA, slash #FF8A00 — the same three
   values the boxed-S "POWERED BY SILVERCREEK" badge uses in the
   dashboard and in the phone app. The page, the badge and the
   App Store icon therefore agree exactly.

   #FF8A00 is too light to read as text on white, so --accent is
   for fills and marks and --accent-deep is the text-safe variant.
   --------------------------------------------------------------- */
:root {
  --paper:       #eaeef2;
  --surface:     #ffffff;
  --surface-2:   #f4f7f9;
  --ink:         #0a0d12;
  --ink-2:       #47596a;
  --ink-3:       #6b7686;
  --rule:        #c9d5de;
  --rule-soft:   #dde5eb;
  --accent:      #ff8a00;
  --accent-deep: #a35400;
  --accent-ink:  #0a0d12;
  --sev-1:       #2f7d4f;
  --sev-2:       #d08a12;
  --sev-3:       #b8292b;

  --font-display: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --measure: 64ch;
  --gutter: clamp(20px, 5vw, 64px);
  --rail: 88px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:       #0a0d12;
    --surface:     #111820;
    --surface-2:   #161f29;
    --ink:         #f5f7fa;
    --ink-2:       #a3b6c5;
    --ink-3:       #7e8b9a;
    --rule:        #2a3240;
    --rule-soft:   #1c242f;
    --accent:      #ff8a00;
    --accent-deep: #ffa23d;
    --accent-ink:  #0a0d12;
    --sev-1:       #52b47a;
    --sev-2:       #e6ab3c;
    --sev-3:       #e2565a;
  }
}
:root[data-theme="dark"] {
  --paper:       #0a0d12;
  --surface:     #111820;
  --surface-2:   #161f29;
  --ink:         #f5f7fa;
  --ink-2:       #a3b6c5;
  --ink-3:       #7e8b9a;
  --rule:        #2a3240;
  --rule-soft:   #1c242f;
  --accent:      #ff8a00;
  --accent-deep: #ffa23d;
  --accent-ink:  #0a0d12;
  --sev-1:       #52b47a;
  --sev-2:       #e6ab3c;
  --sev-3:       #e2565a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.08;
  text-wrap: balance;
  margin: 0;
}

a { color: inherit; }

.wrap { max-width: 1180px; margin: 0 auto; padding-inline: var(--gutter); }

.rail-label {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-3);
}

/* ---------- top bar ---------- */
.topbar {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 40;
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule-soft);
}
.topbar-in {
  display: flex; align-items: center; gap: 14px;
  min-height: 64px; flex-wrap: wrap;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-weight: 700; font-size: 15px;
  text-decoration: none;
}
/* The App Store icon, used as the product mark. */
.app-icon {
  width: 30px; height: 30px; flex: none;
  border-radius: 7px;
  display: block;
  box-shadow: 0 0 0 1px rgba(10,13,18,.12);
}
.topbar nav { margin-left: auto; display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.topbar nav a.link {
  font-size: 13.5px; text-decoration: none; color: var(--ink-2);
  padding: 7px 10px; border-radius: 3px;
}
.topbar nav a.link:hover { color: var(--ink); background: var(--surface-2); }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-weight: 600; font-size: 14px;
  text-decoration: none; padding: 10px 16px;
  border-radius: 3px; border: 1px solid transparent;
  transition: transform .12s ease, background .12s ease;
}
.btn:active { transform: translateY(1px); }
.btn-solid { background: var(--accent); color: var(--accent-ink); }
.btn-solid:hover { background: color-mix(in srgb, var(--accent) 88%, #000); }
.btn-line { border-color: var(--rule); color: var(--ink); }
.btn-line:hover { background: var(--surface-2); }
/* Crew login: deliberately distinct from the sales buttons — it is for
   people who already have an account, and it is the thing a working
   crew comes to this page to find. */
.btn-login {
  border-color: var(--ink); color: var(--ink);
  font-family: var(--font-mono); font-size: 12.5px;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 9px 14px;
}
.btn-login:hover { background: var(--ink); color: var(--paper); }
.btn-login svg { width: 13px; height: 13px; }

/* ---------- hero ---------- */
.hero { padding-block: clamp(40px, 7vw, 84px) clamp(36px, 6vw, 64px); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(28px, 5vw, 56px);
  align-items: start;
}
.eyebrow {
  font-family: var(--font-mono); font-size: 11.5px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent-deep);
  margin-bottom: 18px; display: flex; align-items: center; gap: 10px;
}
.eyebrow::after { content: ""; height: 1px; flex: 1; background: var(--rule); }
.hero h1 { font-size: clamp(38px, 6.4vw, 68px); font-weight: 800; letter-spacing: -0.035em; }
.hero h1 em { font-style: normal; color: var(--accent); }
.lede { font-size: clamp(17px, 1.6vw, 19px); color: var(--ink-2); max-width: 46ch; margin-top: 22px; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 30px; }
.hero-note { margin-top: 18px; font-size: 13px; color: var(--ink-3); font-family: var(--font-mono); }
.hero-note a { color: var(--accent-deep); font-weight: 600; }

/* ---------- dispatch panel ---------- */
.panel {
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: 4px; overflow: hidden;
  box-shadow: 0 1px 0 var(--rule-soft), 0 18px 40px -28px rgba(10,13,18,.45);
}
.panel-head {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; border-bottom: 1px solid var(--rule-soft);
  background: var(--surface-2);
  font-family: var(--font-mono); font-size: 11.5px;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2);
}
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--sev-1); flex: none; animation: pulse 2.6s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .35 } }
.panel-head .count { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--ink); }
.report { display: grid; grid-template-columns: 4px 1fr auto; gap: 0 13px; align-items: center; padding: 12px 14px 12px 0; border-bottom: 1px solid var(--rule-soft); }
.report:last-child { border-bottom: 0; }
.sev-stripe { align-self: stretch; border-radius: 0 2px 2px 0; }
.report .id { font-family: var(--font-mono); font-size: 13px; font-weight: 500; }
.report .meta { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.report .when { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.chip { display: inline-block; font-family: var(--font-mono); font-size: 10.5px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; padding: 2px 7px; border-radius: 2px; border: 1px solid currentColor; margin-left: 8px; vertical-align: 1px; }
.panel-foot { padding: 10px 14px; font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); background: var(--surface-2); border-top: 1px solid var(--rule-soft); }

/* ---------- sections ---------- */
section { border-top: 1px solid var(--rule-soft); }
.sec-in { padding-block: clamp(44px, 6.5vw, 82px); }
.sec-head { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); gap: clamp(16px, 3vw, 32px); align-items: baseline; margin-bottom: 34px; }
.sec-head h2 { font-size: clamp(25px, 3.4vw, 36px); }
.sec-head p { color: var(--ink-2); max-width: var(--measure); margin: 12px 0 0; }

.contrast { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1px; background: var(--rule-soft); border: 1px solid var(--rule-soft); border-radius: 4px; overflow: hidden; }
.contrast > div { background: var(--surface); padding: 22px 22px 24px; }
.contrast h3 { font-size: 15px; margin-bottom: 8px; }
.contrast p { margin: 0; font-size: 14.5px; color: var(--ink-2); }
.contrast .tag { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); display: block; margin-bottom: 14px; }

ol.flow { list-style: none; margin: 0; padding: 0; counter-reset: s; }
ol.flow > li { counter-increment: s; display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); gap: clamp(16px, 3vw, 32px); padding-block: 22px; border-top: 1px solid var(--rule-soft); }
ol.flow > li:first-child { border-top: 0; }
ol.flow > li::before { content: counter(s, decimal-leading-zero); font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: var(--accent-deep); letter-spacing: 0.06em; padding-top: 3px; }
ol.flow h3 { font-size: 18px; margin-bottom: 6px; }
ol.flow p { margin: 0; color: var(--ink-2); max-width: var(--measure); font-size: 15px; }

.caps { display: grid; grid-template-columns: repeat(auto-fit, minmax(258px, 1fr)); gap: 26px 34px; }
.cap { border-top: 2px solid var(--ink); padding-top: 14px; }
.cap h3 { font-size: 15.5px; margin-bottom: 7px; }
.cap p { margin: 0; font-size: 14.5px; color: var(--ink-2); }

.gis { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 26px; align-items: start; }
.gis-card { background: var(--surface); border: 1px solid var(--rule); border-radius: 4px; padding: 22px; }
.gis-card h3 { font-size: 16px; margin-bottom: 9px; }
.gis-card p { margin: 0 0 12px; font-size: 14.5px; color: var(--ink-2); }
.sys-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.sys-list li { font-family: var(--font-mono); font-size: 11.5px; padding: 4px 8px; border: 1px solid var(--rule); border-radius: 2px; color: var(--ink-2); }

.spec-scroll { overflow-x: auto; }
table.spec { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 460px; }
table.spec th, table.spec td { text-align: left; padding: 11px 14px 11px 0; border-bottom: 1px solid var(--rule-soft); vertical-align: top; }
table.spec th { font-family: var(--font-mono); font-weight: 500; font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); width: 34%; white-space: nowrap; }
table.spec td { color: var(--ink-2); }

.builder { background: var(--surface); border-left: 3px solid var(--accent); border-radius: 0 4px 4px 0; padding: 26px clamp(20px, 4vw, 34px); }
.builder p { max-width: var(--measure); color: var(--ink-2); margin: 0 0 14px; }
.builder p:last-child { margin-bottom: 0; }
.builder strong { color: var(--ink); font-weight: 600; }

/* ---------- crew login band ---------- */
.login-band { background: var(--ink); color: var(--paper); border-top: 0; }
.login-in {
  padding-block: clamp(30px, 4.5vw, 46px);
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
}
.login-in .li-icon { width: 42px; height: 42px; border-radius: 9px; flex: none; }
.login-in h2 { font-size: clamp(20px, 2.4vw, 26px); color: var(--paper); }
.login-in p { margin: 6px 0 0; color: color-mix(in srgb, var(--paper) 72%, transparent); font-size: 14.5px; max-width: 52ch; }
.login-in .btn { margin-left: auto; }
.btn-login-lg { background: var(--accent); color: #0a0d12; font-size: 15px; padding: 13px 22px; }
.btn-login-lg:hover { background: color-mix(in srgb, var(--accent) 88%, #fff); }

/* ---------- close ---------- */
.close-in { padding-block: clamp(48px, 7vw, 88px); text-align: center; }
.close-in h2 { font-size: clamp(27px, 4vw, 42px); }
.close-in p { color: var(--ink-2); max-width: 54ch; margin: 16px auto 0; }
.close-cta { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 30px; }

/* ---------- footer + powered-by badge ---------- */
footer { border-top: 1px solid var(--rule-soft); padding-block: 30px 40px; font-size: 13px; color: var(--ink-3); }
.foot-in { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }
.foot-in a { color: var(--ink-2); }

/* Matches the dashboard's #powered-by-badge and the phone app's
   SilvercreekCredit widget exactly — same boxed S, same colors,
   same "POWERED BY [S] ILVERCREEK" reading. */
.pb-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: 999px; padding: 6px 14px;
  font-size: 11px; font-weight: 600; color: #6b7686; letter-spacing: 1.2px;
  text-decoration: none;
}
.pb-s-mark {
  width: 20px; height: 20px; border-radius: 6px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: #0a0d12; border: 1.5px solid #2a3240;
  color: #f5f7fa; font-size: 12.5px; font-weight: 800; letter-spacing: 0;
  font-family: var(--font-display);
}

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .sec-head, ol.flow > li { grid-template-columns: 1fr; gap: 8px; }
  ol.flow > li::before { padding-top: 0; }
  .login-in .btn { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }


/* ---------- site chrome added for the multi-page build ---------- */
.topbar nav a.link.current { color: var(--ink); background: var(--surface-2); }

footer .foot-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr));
  gap: 28px;
  padding-block: 8px 24px;
}
footer h4 {
  font-family: var(--font-display); font-size: 12px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2);
  margin: 0 0 12px;
}
footer .foot-grid a {
  display: block; color: var(--ink-2); text-decoration: none;
  font-size: 14px; padding: 3px 0;
}
footer .foot-grid a:hover { color: var(--accent-deep); }
.foot-note { display: block; font-size: 12.5px; color: var(--ink-3); margin-top: 8px; }
.foot-legal { padding-top: 18px; border-top: 1px solid var(--rule-soft); font-size: 12.5px; color: var(--ink-3); }

.contact-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px;
}
.contact-card {
  display: block; text-decoration: none;
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: 4px; padding: 22px;
}
a.contact-card:hover { border-color: var(--accent); }
.contact-card strong {
  display: block; font-family: var(--font-display); font-size: 19px;
  margin-top: 8px; color: var(--ink); word-break: break-word;
}

@media (max-width: 820px) {
  footer .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  footer .foot-grid { grid-template-columns: 1fr; }
}
