/* ==========================================================================
   The Switchboard Man — design tokens
   Clean, trustworthy trade-services site. Palette and type chosen to read
   as precise and current-carrying without tipping into gimmick.
   ========================================================================== */

:root {
  /* Color */
  --ink: #101826;          /* primary text, deep navy-charcoal */
  --slate: #5B6472;        /* secondary text */
  --slate-light: #8891A0;  /* tertiary / muted */
  --paper: #FFFFFF;        /* base surface */
  --mist: #F5F7FA;         /* section surface */
  --line: #E2E6EC;         /* hairline borders */
  --volt: #0C6CC3;         /* accent — electric blue, matched to logo */
  --volt-deep: #094F8F;    /* accent, hover/pressed */
  --volt-wash: #E7F1FA;    /* accent tint for chips/backgrounds */
  --copper: #B5622A;       /* secondary accent, used sparingly (switchboard/warmth) */

  /* Type */
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;

  /* Layout */
  --max: 1120px;
  --gutter: 24px;
  --radius: 3px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  margin: 0 0 0.5em 0;
  font-weight: 600;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.4rem, 4.5vw, 3.6rem); line-height: 1.05; font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); line-height: 1.15; }
h3 { font-size: 1.25rem; line-height: 1.3; }

p { margin: 0 0 1em 0; max-width: 62ch; color: var(--slate); }
p.lead { font-size: 1.15rem; color: var(--ink); max-width: 52ch; }

a { color: var(--volt); text-decoration: none; }
a:hover { color: var(--volt-deep); }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--volt);
  outline-offset: 3px;
}

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

/* ---------- Nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 18px var(--gutter);
  max-width: var(--max);
  margin: 0 auto;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
}

.wordmark .mark {
  width: 88px;
  height: 88px;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  color: var(--slate);
  font-size: 0.95rem;
  font-weight: 500;
}

.nav-links a.active,
.nav-links a:hover {
  color: var(--ink);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: var(--font-body);
}

.btn-primary {
  background: var(--ink);
  color: var(--paper);
}
.btn-primary:hover { background: var(--volt-deep); color: var(--paper); }

.btn-ghost {
  border-color: var(--line);
  color: var(--ink);
  background: transparent;
}
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle svg { width: 24px; height: 24px; }

.nav-cta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.nav-phone {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--slate);
  white-space: nowrap;
}
.nav-phone:hover { color: var(--volt); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 88px 0 96px;
  border-bottom: 1px solid var(--line);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: center;
}
.hero-grid > div { max-width: 62ch; }

.eyebrow {
  color: var(--volt);
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 14px;
  display: block;
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.trace {
  width: 100%;
  height: auto;
}

/* ---------- Sections ---------- */

section { padding: 88px 0; }
section.tight { padding: 64px 0; }
.section-alt { background: var(--mist); }

.section-head {
  max-width: 46ch;
  margin-bottom: 48px;
}

.section-head .kicker {
  color: var(--slate-light);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 10px;
  display: block;
}

/* ---------- Service cards ---------- */

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.service-card {
  background: var(--paper);
  padding: 36px 30px;
  display: flex;
  flex-direction: column;
}

.service-card.featured {
  background: var(--ink);
  color: var(--paper);
}
.service-card.featured h3,
.service-card.featured p { color: var(--paper); }
.service-card.featured p { opacity: 0.75; }
.service-card.featured .tag { color: var(--paper); border-color: rgba(255,255,255,0.3); }

.tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--volt);
  border: 1px solid var(--volt-wash);
  background: var(--volt-wash);
  padding: 4px 10px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  width: fit-content;
}

.service-card h3 { margin-bottom: 10px; }
.service-card p { font-size: 0.96rem; margin-bottom: 0; }

/* ---------- Two column feature ---------- */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.check-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.check-list li {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-weight: 500;
}
.check-list li:last-child { border-bottom: 1px solid var(--line); }
.check-list svg { flex-shrink: 0; margin-top: 3px; color: var(--volt); width: 18px; height: 18px; }

/* ---------- Process steps ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.step {
  border-top: 2px solid var(--ink);
  padding-top: 18px;
}

.step .num {
  font-family: var(--font-display);
  color: var(--slate-light);
  font-size: 0.95rem;
  margin-bottom: 10px;
  display: block;
}

/* ---------- Service detail blocks (services.html) ---------- */

.service-detail {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
  align-items: start;
  padding: 64px 0;
}

.service-detail:not(:last-child) { border-bottom: 1px solid var(--line); }

.service-detail .index {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--volt);
  font-weight: 600;
  margin-bottom: 12px;
  display: block;
}

.detail-list {
  list-style: none;
  padding: 0;
  margin: 20px 0 0 0;
}
.detail-list li {
  padding: 10px 0 10px 22px;
  position: relative;
  color: var(--ink);
  font-size: 0.95rem;
  border-top: 1px solid var(--line);
}
.detail-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18px;
  width: 6px;
  height: 6px;
  background: var(--volt);
}

/* ---------- CTA band ---------- */

.cta-band {
  background: var(--ink);
  color: var(--paper);
  padding: 72px 0;
  text-align: left;
}
.cta-band h2 { color: var(--paper); }
.cta-band p { color: rgba(255,255,255,0.7); }
.cta-band .hero-actions { margin-top: 28px; }
.cta-band .btn-ghost { border-color: rgba(255,255,255,0.3); color: var(--paper); }
.cta-band .btn-ghost:hover { border-color: var(--paper); }
.cta-band .btn-primary { background: var(--volt); }
.cta-band .btn-primary:hover { background: #3763e0; }

/* ---------- Contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
}

.contact-card {
  border: 1px solid var(--line);
  padding: 32px;
  background: var(--mist);
}

.contact-row {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.contact-row:first-child { border-top: none; }
.contact-row svg { flex-shrink: 0; color: var(--volt); width: 20px; height: 20px; margin-top: 2px; }
.contact-row .label { font-size: 0.82rem; color: var(--slate-light); margin-bottom: 2px; }
.contact-row .value { font-weight: 600; color: var(--ink); }
.contact-row .value a { color: inherit; text-decoration: none; }
.contact-row .value a:hover { color: var(--volt); }

.placeholder-note {
  font-size: 0.82rem;
  color: var(--slate-light);
  font-style: italic;
}

form.quote-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--paper);
  color: var(--ink);
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--volt);
}

.field textarea { resize: vertical; min-height: 110px; }

/* ---------- About ---------- */

.credentials {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: 8px;
}
.credential {
  background: var(--paper);
  padding: 26px;
}
.credential .big {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--ink);
  display: block;
  margin-bottom: 6px;
}
.credential .label { color: var(--slate); font-size: 0.9rem; }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px 0;
}
.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-grid .wordmark { font-size: 1rem; }
.footer-links {
  display: flex;
  gap: 24px;
}
.footer-links.footer-contact {
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.footer-links a { color: var(--slate); font-size: 0.9rem; }
.foot-note { color: var(--slate-light); font-size: 0.82rem; margin-top: 20px; }

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .hero-grid,
  .split,
  .contact-grid,
  .service-detail { grid-template-columns: 1fr; }
  .service-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .credentials { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .nav-toggle { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}
