/* =========================================================================
   San Jose Built — design system
   Palette: "Copper & Circuit" — warm graphite neutrals + a copper accent
   and a circuit-trace green secondary. Built to read as PC-hardware /
   Silicon Valley without falling back on the teal-and-orca look of
   seattlebuilt.com or the lavender/orchid look of socient.net.
   Type: IBM Plex Sans Condensed (display), IBM Plex Sans (body/UI),
   IBM Plex Mono (specs, prices, badges).
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Condensed:wght@600;700&family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@500;600&display=swap');

:root {
  /* ---- Copper & Circuit: light theme ---- */
  --bg: #f6f4ef;
  --bg-alt: #edeae0;
  --surface: #ffffff;
  --surface-2: #faf8f3;
  --border: #ddd8c9;
  --text: #1b1a16;
  --text-muted: #63604f;
  --text-faint: #8b876f;

  --accent: #d9531e;        /* copper — buttons, CTAs */
  --accent-strong: #a83d14; /* pressed / accessible text-on-white copper */
  --accent-soft: #f7e1d2;   /* tint band / badge fill */
  --accent-ink: #ffffff;    /* text placed on --accent */

  --trace: #4b7a3e;         /* circuit-trace green — secondary accent */
  --trace-strong: #396030;
  --trace-soft: #e4eedb;

  --danger: #b3261e;
  --danger-soft: #fbe4e2;
  --success: #2f6a34;
  --success-soft: #e2f0e2;

  --shadow-sm: 0 1px 2px rgba(27, 26, 22, 0.08);
  --shadow-md: 0 8px 24px rgba(27, 26, 22, 0.10);
  --shadow-lg: 0 24px 64px rgba(27, 26, 22, 0.18);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 18px;

  --container: 1160px;
  --header-h: 128px;

  color-scheme: light;
}

:root[data-theme='dark'] {
  --bg: #14130f;
  --bg-alt: #1b1a13;
  --surface: #201e16;
  --surface-2: #262418;
  --border: #37341f;
  --text: #f4f1e6;
  --text-muted: #bdb8a3;
  --text-faint: #8f8a75;

  --accent: #ff8146;
  --accent-strong: #ffb088;
  --accent-soft: #3a2314;
  --accent-ink: #1b1206;

  --trace: #8fcb63;
  --trace-strong: #b3e08d;
  --trace-soft: #22301d;

  --danger: #ff8b83;
  --danger-soft: #3a1a17;
  --success: #8fd08f;
  --success-soft: #182c1a;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.6);

  color-scheme: dark;
}

/* ---------- Reset ---------- */
*, *::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: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.2s ease, color 0.2s ease;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--accent-strong); }
:root[data-theme='dark'] a { color: var(--accent); }
h1, h2, h3, h4 {
  font-family: 'IBM Plex Sans Condensed', 'IBM Plex Sans', sans-serif;
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.25em; }
button { font-family: inherit; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- Layout helpers ---------- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0; padding: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; background: var(--accent);
  color: var(--accent-ink); padding: 10px 16px; border-radius: var(--radius-sm);
  z-index: 200; transition: top 0.15s ease; font-weight: 600;
}
.skip-link:focus { top: 12px; }

section { padding: 72px 0; }
.section-alt { background: var(--bg-alt); }
.section-dark {
  background: var(--text);
  color: var(--bg);
}
:root[data-theme='dark'] .section-dark { background: #0c0b08; color: var(--text); }
.section-dark .eyebrow { color: var(--accent); }
.section-dark p { color: rgba(255,255,255,0.75); }
:root[data-theme='dark'] .section-dark p { color: var(--text-muted); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent-strong);
  margin-bottom: 12px;
}
:root[data-theme='dark'] .eyebrow { color: var(--accent); }
.eyebrow::before {
  content: '';
  width: 18px; height: 2px;
  background: var(--accent);
  display: inline-block;
}

.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head p { color: var(--text-muted); font-size: 1.05rem; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius-sm);
  padding: 13px 24px;
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease, border-color 0.12s ease;
  line-height: 1.2;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--accent-strong); color: var(--accent-ink); box-shadow: var(--shadow-md); }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--text); }
.btn-ghost { background: transparent; color: var(--text); border: none; padding: 8px 4px; }
.btn-block { width: 100%; }
.btn-lg { padding: 16px 30px; font-size: 1.05rem; }
.btn[disabled] { opacity: 0.6; cursor: not-allowed; }

/* ---------- Header / Nav ---------- */
header { position: sticky; top: 0; z-index: 100; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.nav-inner { max-width: var(--container); margin: 0 auto; padding: 14px 24px 10px; }
.nav-row { display: flex; align-items: center; justify-content: space-between; }
.nav-row-top { gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.logo-mark { width: 34px; height: 34px; flex: none; }
.logo-text { font-family: 'IBM Plex Sans Condensed', sans-serif; font-weight: 700; font-size: 1.24rem; letter-spacing: -0.01em; }
.logo-text span { color: var(--accent); }
.nav-actions { display: flex; align-items: center; gap: 10px; }

.theme-toggle {
  width: 38px; height: 38px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); display: inline-flex;
  align-items: center; justify-content: center; cursor: pointer;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle .icon-sun { display: none; }
:root[data-theme='dark'] .theme-toggle .icon-moon { display: none; }
:root[data-theme='dark'] .theme-toggle .icon-sun { display: block; }

.nav-cta { background: var(--accent); color: var(--accent-ink); border: none; border-radius: var(--radius-sm); padding: 10px 18px; font-weight: 600; cursor: pointer; }
.nav-cta:hover { background: var(--accent-strong); }

.nav-toggle {
  display: none; width: 38px; height: 38px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface); cursor: pointer;
  align-items: center; justify-content: center; flex-direction: column; gap: 4px;
}
.nav-toggle span { width: 18px; height: 2px; background: var(--text); display: block; }

.nav-row-bottom { margin-top: 10px; }
.nav-links { list-style: none; margin: 0; padding: 0; display: flex; gap: 26px; flex-wrap: wrap; }
.nav-links a, .nav-links .nav-drop > button {
  color: var(--text-muted); text-decoration: none; font-weight: 500; font-size: 0.94rem;
  background: none; border: none; cursor: pointer; padding: 4px 0; font-family: inherit;
  display: inline-flex; align-items: center; gap: 4px;
}
.nav-links a:hover, .nav-links .nav-drop > button:hover, .nav-links a[aria-current='page'] { color: var(--accent-strong); }
:root[data-theme='dark'] .nav-links a:hover,
:root[data-theme='dark'] .nav-links a[aria-current='page'] { color: var(--accent); }

.nav-drop { position: relative; }
.nav-drop-panel {
  display: none; position: absolute; top: 100%; left: -14px; margin-top: 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  box-shadow: var(--shadow-md); padding: 10px; min-width: 220px; z-index: 50;
}
.nav-drop.open .nav-drop-panel { display: block; }
.nav-drop-panel a {
  display: block; padding: 9px 12px; border-radius: var(--radius-sm); color: var(--text);
  font-size: 0.92rem; text-decoration: none;
}
.nav-drop-panel a:hover { background: var(--bg-alt); color: var(--accent-strong); }

/* ---------- Hero ---------- */
.hero { padding: 56px 0 72px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); margin-bottom: 20px; }
.hero .lede { font-size: 1.15rem; color: var(--text-muted); max-width: 46ch; margin-bottom: 28px; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 28px; }
.hero-meta { display: flex; gap: 22px; flex-wrap: wrap; font-family: 'IBM Plex Mono', monospace; font-size: 0.82rem; color: var(--text-faint); }
.hero-meta strong { color: var(--text); font-family: 'IBM Plex Sans', sans-serif; font-weight: 700; display: block; font-size: 1.3rem; }

.hero-panel {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 28px; box-shadow: var(--shadow-lg); position: relative;
}
.hero-panel-badge {
  position: absolute; top: -14px; right: 24px; background: var(--trace); color: #fff;
  font-family: 'IBM Plex Mono', monospace; font-size: 0.72rem; font-weight: 600;
  padding: 6px 12px; border-radius: 999px; letter-spacing: 0.04em;
}
.spec-list { list-style: none; margin: 0; padding: 0; }
.spec-list li {
  display: flex; justify-content: space-between; gap: 16px; padding: 11px 0;
  border-bottom: 1px dashed var(--border); font-size: 0.94rem;
}
.spec-list li:last-child { border-bottom: none; }
.spec-list .k { color: var(--text-muted); }
.spec-list .v { font-family: 'IBM Plex Mono', monospace; font-weight: 600; }

/* ---------- Grids / Cards ---------- */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 26px; box-shadow: var(--shadow-sm);
}
.card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.card p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 0; }

.series-card { display: flex; flex-direction: column; gap: 14px; }
.series-card .tag {
  align-self: flex-start; font-family: 'IBM Plex Mono', monospace; font-size: 0.72rem;
  font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  background: var(--accent-soft); color: var(--accent-strong); padding: 5px 10px; border-radius: 999px;
}
:root[data-theme='dark'] .series-card .tag { color: var(--accent); }
.series-card ul { list-style: none; padding: 0; margin: 4px 0 0; display: flex; flex-direction: column; gap: 6px; }
.series-card ul li { font-size: 0.88rem; color: var(--text-muted); padding-left: 18px; position: relative; }
.series-card ul li::before { content: '›'; position: absolute; left: 0; color: var(--trace); font-weight: 700; }

.step-list { counter-reset: step; list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0; }
.step-list li {
  counter-increment: step; position: relative; padding: 20px 0 20px 56px; border-bottom: 1px solid var(--border);
}
.step-list li:last-child { border-bottom: none; }
.step-list li::before {
  content: counter(step, decimal-leading-zero); position: absolute; left: 0; top: 18px;
  font-family: 'IBM Plex Mono', monospace; font-weight: 600; color: var(--accent);
  font-size: 0.95rem; width: 40px;
}
.step-list h3 { font-size: 1.02rem; margin-bottom: 4px; }
.step-list p { color: var(--text-muted); margin: 0; font-size: 0.94rem; }

/* ---------- Values / features ---------- */
.value-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.value-item .num { font-family: 'IBM Plex Mono', monospace; color: var(--accent); font-weight: 600; font-size: 0.85rem; margin-bottom: 10px; display: block; }

/* ---------- Logos strip ---------- */
.brand-strip { display: flex; flex-wrap: wrap; gap: 36px; align-items: center; justify-content: center; opacity: 0.85; }
.brand-strip span {
  font-family: 'IBM Plex Mono', monospace; font-size: 0.85rem; color: var(--text-faint);
  border: 1px solid var(--border); border-radius: 999px; padding: 8px 16px;
}

/* ---------- Testimonials ---------- */
.quote-card { padding: 28px; }
.quote-card .stars { color: var(--accent); font-family: 'IBM Plex Mono', monospace; letter-spacing: 2px; margin-bottom: 10px; }
.quote-card p.quote { font-size: 1rem; color: var(--text); margin-bottom: 14px; }
.quote-card .who { font-size: 0.85rem; color: var(--text-muted); font-weight: 600; }

/* ---------- FAQ ---------- */
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item:first-child { border-top: 1px solid var(--border); }
.faq-q {
  width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  padding: 20px 0; display: flex; justify-content: space-between; align-items: center;
  gap: 16px; font-weight: 600; color: var(--text); font-size: 1rem;
}
.faq-q .plus { font-family: 'IBM Plex Mono', monospace; color: var(--accent); font-size: 1.1rem; flex: none; }
.faq-item.open .plus { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.2s ease; }
.faq-item.open .faq-a { max-height: 480px; }
.faq-a p { padding-bottom: 20px; color: var(--text-muted); margin: 0; max-width: 68ch; }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--accent); color: var(--accent-ink); border-radius: var(--radius-lg);
  padding: 48px; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap;
}
.cta-band h2 { margin-bottom: 6px; }
.cta-band p { margin: 0; opacity: 0.92; }
.cta-band .btn-primary { background: var(--accent-ink); color: var(--accent); }
.cta-band .btn-primary:hover { background: color-mix(in srgb, var(--accent-ink) 88%, var(--accent)); }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--border); background: var(--bg-alt); padding: 56px 0 28px; margin-top: 40px; }
.footer-top { display: flex; justify-content: space-between; gap: 48px; flex-wrap: wrap; margin-bottom: 40px; }
.footer-brand { max-width: 320px; }
.footer-brand p { color: var(--text-muted); font-size: 0.92rem; margin-top: 12px; }
.footer-nav { display: flex; gap: 56px; flex-wrap: wrap; }
.footer-nav-title { font-family: 'IBM Plex Mono', monospace; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 14px; }
.footer-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-nav a, .footer-link-btn { color: var(--text-muted); text-decoration: none; font-size: 0.92rem; background: none; border: none; padding: 0; cursor: pointer; font-family: inherit; text-align: left; }
.footer-nav a:hover, .footer-link-btn:hover { color: var(--accent-strong); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding-top: 24px; border-top: 1px solid var(--border); font-size: 0.85rem; color: var(--text-faint); }
.footer-legal-link { color: var(--text-faint); }
.footer-social { display: flex; gap: 14px; }
.footer-social-link { width: 34px; height: 34px; border-radius: 999px; border: 1px solid var(--border); display: inline-flex; align-items: center; justify-content: center; color: var(--text-muted); }
.footer-social-link svg { width: 16px; height: 16px; }
.footer-social-link:hover { border-color: var(--accent); color: var(--accent-strong); }
.footer-note { font-size: 0.8rem; color: var(--text-faint); margin-top: 18px; max-width: 60ch; }

/* ---------- Modal / Contact form ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(15, 14, 10, 0.55); display: flex;
  align-items: center; justify-content: center; padding: 20px; z-index: 300;
  opacity: 0; pointer-events: none; transition: opacity 0.18s ease;
}
.modal-overlay.active { opacity: 1; pointer-events: auto; }
.modal-card {
  background: var(--surface); border-radius: var(--radius-lg); max-width: 480px; width: 100%;
  max-height: 90vh; overflow-y: auto; padding: 32px; box-shadow: var(--shadow-lg); position: relative;
  transform: translateY(12px); transition: transform 0.18s ease;
}
.modal-overlay.active .modal-card { transform: translateY(0); }
.modal-close {
  position: absolute; top: 18px; right: 18px; width: 32px; height: 32px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--bg); color: var(--text); cursor: pointer;
  font-size: 1.1rem; line-height: 1; display: inline-flex; align-items: center; justify-content: center;
}
.modal-card h2 { margin-bottom: 6px; }
.modal-card .modal-sub { color: var(--text-muted); font-size: 0.92rem; margin-bottom: 22px; }

.form-field { margin-bottom: 16px; }
.form-field label { display: block; font-size: 0.86rem; font-weight: 600; margin-bottom: 6px; }
.form-field input, .form-field select, .form-field textarea {
  width: 100%; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg);
  color: var(--text); padding: 11px 13px; font-size: 0.95rem; font-family: inherit;
}
.form-field textarea { min-height: 108px; resize: vertical; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.form-hp { position: absolute; left: -9999px; top: -9999px; }
.form-status { min-height: 20px; font-size: 0.88rem; margin: 4px 0 14px; }
.form-status.error { color: var(--danger); }
.form-status.success { color: var(--success); }
.form-note { font-size: 0.78rem; color: var(--text-faint); margin-top: 14px; }

.form-sent-banner {
  position: sticky; top: 0; z-index: 250; background: var(--trace); color: #fff;
  padding: 12px 20px; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  font-size: 0.92rem; font-weight: 500;
}
.form-sent-banner-close { background: none; border: none; color: #fff; font-size: 1.1rem; cursor: pointer; }

/* ---------- Confirmed page ---------- */
.confirm-panel { max-width: 560px; margin: 0 auto; text-align: center; }
.confirm-icon { width: 64px; height: 64px; margin: 0 auto 20px; }

/* ---------- Utility bands ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px; font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase;
  background: var(--trace-soft); color: var(--trace-strong); padding: 5px 10px; border-radius: 999px;
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .grid-3, .value-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  section { padding: 52px 0; }
  .nav-toggle { display: inline-flex; }
  .nav-row-bottom { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border-bottom: 1px solid var(--border); padding: 12px 24px 20px; box-shadow: var(--shadow-md); }
  .nav-row-bottom.open { display: block; }
  .nav-links { flex-direction: column; gap: 4px; }
  .nav-links li { width: 100%; }
  .nav-links a, .nav-links .nav-drop > button { display: block; padding: 10px 0; width: 100%; }
  .nav-drop-panel { position: static; box-shadow: none; border: none; padding: 0 0 0 12px; margin-top: 4px; }
  .nav-drop.open .nav-drop-panel { display: flex; flex-direction: column; }
  header { position: relative; }
  .nav-cta { padding: 9px 14px; font-size: 0.9rem; }
  .logo-text { font-size: 1.08rem; }

  .grid-2, .grid-3, .grid-4, .value-grid { grid-template-columns: 1fr; }
  .cta-band { flex-direction: column; align-items: flex-start; padding: 32px 24px; }
  .footer-top { flex-direction: column; gap: 32px; }
  .footer-nav { gap: 32px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .hero { padding: 36px 0 52px; }
  .hero-panel { padding: 22px; }
}

@media (max-width: 480px) {
  .container { padding: 0 18px; }
  .modal-card { padding: 24px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: 0.001ms !important; animation-duration: 0.001ms !important; }
}
