/* ClearMax Labs microsite base stylesheet - premium template (2026-11-03). One file, no framework,
   system typefaces (Avenir Next on Apple, Segoe UI Variable on Windows, Roboto on Android), no external
   requests (CSP style-src 'self', font-src 'self'). Copied per site by _machine/base_site; do not fork per site.
   Accent #f97316 (ClearMax orange) on deep navy. Light by default; dark follows the OS. */

:root {
  --bg: #ffffff;
  --surface: #f6f7f9;
  --surface-2: #eef1f5;
  --text: #0f172a;
  --muted: #475569;
  --border: #e2e8f0;
  --accent: #f97316;
  --accent-deep: #ea580c;
  --accent-ink: #0f172a;      /* text on top of the orange */
  --link: #c2410c;
  --link-hover: #9a3412;
  --focus: #f97316;
  --navy: #0b1220;
  --navy-2: #16213a;
  --hero-text: #f8fafc;
  --hero-muted: #cbd5e1;
  --header-bg: rgba(255, 255, 255, 0.92);
  --footer-bg: #0b1220;
  --footer-text: #cbd5e1;
  --footer-link: #fdba74;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --radius: 14px;
  --gutter: 16px;
  --tap: 44px;
  --max: 1080px;
  --prose: 740px;
  --font: "Avenir Next", "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, system-ui, sans-serif;
  --font-display: "Avenir Next", "Segoe UI Variable Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1220;
    --surface: #111a2e;
    --surface-2: #16213a;
    --text: #e5e7eb;
    --muted: #9aa5b8;
    --border: #22304a;
    --link: #fb923c;
    --link-hover: #fdba74;
    --header-bg: rgba(11, 18, 32, 0.92);
    --footer-bg: #060a14;
    --footer-text: #cbd5e1;
    --footer-link: #fdba74;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: inline-block; }

a { color: var(--link); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--link-hover); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* Skip link: off-screen until focused (accessibility, not content) */
.skip {
  position: absolute;
  left: -10000px;
  top: 0;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 10px 14px;
  z-index: 100;
  text-decoration: none;
  font-weight: 700;
}
.skip:focus { left: 8px; top: 8px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 68px;
  padding-top: 10px;
  padding-bottom: 10px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  min-height: var(--tap);
}
.brand img { width: 44px; height: 44px; border-radius: 10px; flex: 0 0 auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; letter-spacing: -0.01em; }
.brand-tag { font-size: 0.78rem; color: var(--muted); font-weight: 500; letter-spacing: 0.02em; text-transform: uppercase; }

.header-phone {
  display: none;              /* shown at desktop widths below; the mobile call bar takes over on phones */
  align-items: center;
  min-height: var(--tap);
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(249, 115, 22, 0.28);
}
.header-phone:hover { color: var(--accent-ink); background: var(--accent-deep); }
.header-phone-label { font-weight: 500; margin-right: 6px; }
.header-phone-pending { background: var(--surface); color: var(--muted); border: 1px solid var(--border); box-shadow: none; }

/* Primary nav: a real <nav>; single row, scrolls sideways on small screens (no page overflow) */
.site-nav { border-top: 1px solid var(--border); }
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 2px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  white-space: nowrap;
}
.site-nav li { flex: 0 0 auto; }
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding: 0 14px;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  border-bottom: 3px solid transparent;
}
.site-nav a:hover { color: var(--link); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--accent); font-weight: 700; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  color: var(--hero-text);
  background:
    radial-gradient(900px 420px at 85% -10%, rgba(249, 115, 22, 0.28), transparent 60%),
    radial-gradient(700px 360px at -10% 110%, rgba(59, 130, 246, 0.18), transparent 60%),
    linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 100%);
  padding: 36px 0 32px;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-deep) 60%, transparent);
}
.hero-home { padding: 56px 0 44px; }
.hero .container { max-width: var(--max); }
.hero h1 {
  font-family: var(--font-display);
  color: #ffffff;
  font-size: clamp(1.9rem, 3.6vw + 0.8rem, 3.1rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
  margin: 0 0 18px;
  max-width: 20ch;
  text-wrap: balance;
}
.hero-home h1 { max-width: 18ch; }
.eyebrow {
  margin: 0 0 14px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fdba74;
}
.hero .crumbs { color: var(--hero-muted); margin: 0 0 14px; }
.hero .crumbs a { color: #ffffff; }
.hero .crumbs li + li::before { color: var(--hero-muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 22px; }
.trust {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
}
.trust li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.07);
  color: var(--hero-text);
  font-size: 0.88rem;
  font-weight: 500;
}
.trust li::before {
  content: "";
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.25);
}

/* ---------- Project cards (home) ---------- */
.projects { padding: 28px 0 8px; background: var(--surface); border-bottom: 1px solid var(--border); }
.section-kicker {
  margin: 0 0 14px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.cards {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}
.card {
  margin: 0;
  padding: 18px 18px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--accent);
}
.card-title { font-family: var(--font-display); font-size: 1.05rem; margin: 0 0 6px; letter-spacing: -0.01em; }
.card p { margin: 0; color: var(--muted); font-size: 0.95rem; line-height: 1.5; }

/* ---------- Main content ---------- */
main { padding-top: 32px; padding-bottom: 56px; }
main > article { max-width: var(--prose); }

.crumbs { font-size: 0.9rem; color: var(--muted); margin: 0 0 12px; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--muted); }
.crumbs a { display: inline-block; padding: 8px 0; margin: -8px 0; }

h1, h2, h3 { font-family: var(--font-display); line-height: 1.2; letter-spacing: -0.015em; color: var(--text); }
h1 { font-size: clamp(1.7rem, 4.5vw + 0.5rem, 2.4rem); margin: 0 0 14px; }
h2 { font-size: clamp(1.35rem, 2.2vw + 0.7rem, 1.75rem); margin: 44px 0 12px; padding-top: 14px; position: relative; }
h2::before {
  content: "";
  position: absolute; left: 0; top: 0;
  width: 40px; height: 3px;
  background: var(--accent);
  border-radius: 2px;
}
h3 { font-size: 1.15rem; margin: 26px 0 6px; }
p, ul, ol { margin: 0 0 16px; }
ul, ol { padding-left: 1.3em; }
li { margin-bottom: 6px; }
article > p:first-of-type { font-size: 1.2rem; line-height: 1.6; color: var(--text); }

.updated {
  display: inline-block;
  font-size: 0.82rem;
  color: var(--muted);
  margin: -4px 0 22px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
}

code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.95em;
  background: var(--surface); padding: 1px 5px; border-radius: 4px; }

hr { border: 0; border-top: 1px solid var(--border); margin: 32px 0; }

table { border-collapse: collapse; width: 100%; margin: 0 0 20px; font-size: 0.95rem; display: block; overflow-x: auto; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: var(--surface); }

figure { margin: 0 0 20px; }
figcaption { font-size: 0.875rem; color: var(--muted); }

/* ---------- CTA block ---------- */
.cta {
  margin: 32px 0;
  padding: 22px 22px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.cta::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 5px;
  background: linear-gradient(180deg, var(--accent), var(--accent-deep));
}
.cta-title { margin: 0 0 8px; font-size: 1.3rem; padding-top: 0; }
.cta-title::before { display: none; }
.cta p { margin-bottom: 12px; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cta-route { font-size: 0.88rem; color: var(--muted); margin: 10px 0 0; } /* v3 2026-11-03 vendor routing line */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  min-width: var(--tap);
  padding: 11px 20px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1.2;
  transition: transform 120ms ease, background-color 120ms ease, box-shadow 120ms ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); box-shadow: 0 8px 20px rgba(249, 115, 22, 0.3); }
.btn-primary:hover { color: var(--accent-ink); background: var(--accent-deep); border-color: var(--accent-deep); }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--text); }
.btn-secondary:hover { color: var(--text); background: var(--surface); }
.btn-ghost { background: rgba(255, 255, 255, 0.08); color: #ffffff; border-color: rgba(255, 255, 255, 0.35); }
.btn-ghost:hover { color: #ffffff; background: rgba(255, 255, 255, 0.16); border-color: #ffffff; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.6; cursor: default; }

/* ---------- Form ---------- */
form {
  margin: 20px 0 28px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
form p, .field { margin: 0 0 14px; }
label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.95rem; }
input[type="text"], input[type="email"], input[type="tel"], select, textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  border: 1px solid #94a3b8;
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  line-height: 1.4;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
textarea { min-height: 140px; resize: vertical; }
select { appearance: auto; }
input::placeholder, textarea::placeholder { color: #64748b; }
.form-note, .notice {
  font-size: 0.95rem;
  padding: 12px 14px;
  border-left: 4px solid var(--accent);
  background: var(--surface);
  border-radius: 8px;
}
button[type="submit"] {
  font: inherit;
  display: inline-flex; align-items: center; justify-content: center;
  min-height: var(--tap); padding: 11px 22px;
  border-radius: 999px; border: 2px solid var(--accent);
  background: var(--accent); color: var(--accent-ink);
  font-weight: 700; font-size: 1rem; cursor: pointer;
  box-shadow: 0 8px 20px rgba(249, 115, 22, 0.3);
}
button[type="submit"]:hover { background: var(--accent-deep); border-color: var(--accent-deep); }

/* Honeypot: the one allowed hidden field (not content). Off-screen, not display:none. */
.hp {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status { margin-top: 12px; font-weight: 600; min-height: 1.5em; }
.form-status.ok { color: #047857; }
.form-status.err { color: #b91c1c; }
@media (prefers-color-scheme: dark) {
  .form-status.ok { color: #34d399; }
  .form-status.err { color: #f87171; }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 36px 0 44px;
  font-size: 0.925rem;
  border-top: 4px solid var(--accent);
}
.footer-grid { display: grid; gap: 10px 32px; grid-template-columns: 1fr; align-items: start; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand img { width: 40px; height: 40px; border-radius: 10px; }
.site-footer a { color: var(--footer-link); }
.site-footer a:hover { color: #ffffff; }
.site-footer p { margin: 0 0 6px; }
.site-footer .operator { font-weight: 700; font-size: 1rem; color: #ffffff; }
.site-footer .not-affiliated { color: #8b97ab; font-size: 0.82rem; margin-top: 10px; }
.footer-links a { display: inline-block; padding: 8px 0; }

/* ---------- Mobile floating call bar ---------- */
.callbar {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 60;
  min-height: 56px;
  align-items: center;
  justify-content: center;
  padding: 10px var(--gutter);
  padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  text-align: center;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.18);
}
.callbar:hover { color: var(--accent-ink); }
.callbar-pending { background: #1f2937; color: #f9fafb; font-weight: 600; font-size: 0.95rem; }
.callbar-pending:hover { color: #ffffff; }

@media (max-width: 768px) {
  .callbar { display: flex; }
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
  .header-phone { display: none; }
  .hero { padding: 28px 0 26px; }
  .hero-home { padding: 36px 0 30px; }
  .hero-actions .btn { flex: 1 1 auto; }
}
@media (min-width: 769px) {
  .header-phone { display: inline-flex; }
  .site-nav ul { overflow: visible; white-space: normal; flex-wrap: wrap; }
  .footer-grid { grid-template-columns: 1fr auto auto; }
  .site-footer .not-affiliated { grid-column: 1 / -1; }
}
@media (max-width: 400px) {
  .brand-name { font-size: 0.98rem; }
  .brand-tag { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}

/* ---------- Print ---------- */
@media print {
  .site-header .site-nav, .callbar, .skip, .cta-actions, .hero-actions, .header-phone, .crumbs, .projects { display: none !important; }
  body { padding-bottom: 0; color: #000; background: #fff; }
  .hero { background: #fff; color: #000; padding: 0; }
  .hero h1, .eyebrow { color: #000; }
  .trust li { color: #000; border-color: #000; }
  a { color: #000; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.85em; }
  .site-footer { background: #fff; color: #000; border-top: 1px solid #000; }
  .site-footer a { color: #000; }
}
