/* ==========================================================================
   Compucom Computers — Midland, MI
   Custom palette: deep slate-teal (trust/tech) + warm amber accent (craft/local)
   ========================================================================== */

:root,
[data-theme='light'] {
  /* Surfaces */
  --color-bg: #f6f4ef;
  --color-surface: #ffffff;
  --color-surface-2: #fbfaf7;
  --color-surface-offset: #ede9e0;
  --color-surface-offset-2: #e3ddd1;
  --color-divider: #ddd7cb;
  --color-border: #cfc7b6;

  /* Text */
  --color-text: #1c2430;
  --color-text-muted: #5a6473;
  --color-text-faint: #9aa1ab;
  --color-text-inverse: #f6f4ef;

  /* Primary accent — deep slate teal (trust, technical expertise) */
  --color-primary: #0f4a56;
  --color-primary-hover: #0b3941;
  --color-primary-active: #082a30;
  --color-primary-highlight: #d3e2e2;

  /* Secondary accent — warm amber (local craft, 30-year warmth) */
  --color-amber: #c8791e;
  --color-amber-hover: #a86213;
  --color-amber-active: #8a4f0f;
  --color-amber-highlight: #f0dcc0;

  --radius-sm: 0.375rem;
  --radius-md: 0.625rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 9999px;

  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  --shadow-sm: 0 1px 2px oklch(0.2 0.02 220 / 0.06);
  --shadow-md: 0 6px 16px oklch(0.2 0.02 220 / 0.10);
  --shadow-lg: 0 16px 40px oklch(0.2 0.02 220 / 0.16);

  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1180px;

  --font-display: 'Cabinet Grotesk', 'Segoe UI', sans-serif;
  --font-body: 'Satoshi', 'Segoe UI', sans-serif;
}

[data-theme='dark'] {
  --color-bg: #12161c;
  --color-surface: #171c23;
  --color-surface-2: #1b2028;
  --color-surface-offset: #1d222a;
  --color-surface-offset-2: #262c35;
  --color-divider: #2b313b;
  --color-border: #384049;

  --color-text: #e9e6dd;
  --color-text-muted: #9aa1ab;
  --color-text-faint: #666d78;
  --color-text-inverse: #171c23;

  --color-primary: #5fa9b3;
  --color-primary-hover: #7fbdc6;
  --color-primary-active: #98cbd2;
  --color-primary-highlight: #223b3f;

  --color-amber: #e0983f;
  --color-amber-hover: #eaad61;
  --color-amber-active: #f2c081;
  --color-amber-highlight: #3d2e1c;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.3);
  --shadow-md: 0 6px 16px oklch(0 0 0 / 0.35);
  --shadow-lg: 0 16px 40px oklch(0 0 0 / 0.5);
}

/* ---------- Type scale ---------- */
:root {
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.25rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 4.5rem);

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scroll-padding-top: var(--space-20);
}

body {
  min-height: 100dvh;
  line-height: 1.6;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background-color: var(--color-bg);
  transition: background-color var(--transition-interactive), color var(--transition-interactive);
}

img, svg, picture {
  display: block;
  max-width: 100%;
  height: auto;
}

ul[role='list'] { list-style: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  text-wrap: balance;
  line-height: 1.12;
  letter-spacing: -0.01em;
}

p, li { text-wrap: pretty; }

a { color: inherit; text-decoration: none; }

::selection {
  background: oklch(from var(--color-primary) l c h / 0.25);
  color: var(--color-text);
}

:focus-visible {
  outline: 2px solid var(--color-amber);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

button {
  cursor: pointer;
  background: none;
  border: none;
  font: inherit;
  color: inherit;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

.container {
  width: 100%;
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

section {
  padding-block: clamp(var(--space-16), 8vw, var(--space-24));
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--color-bg) 88%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--color-divider);
  transition: box-shadow var(--transition-interactive);
}
.site-header.is-scrolled { box-shadow: var(--shadow-sm); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  padding-block: var(--space-3);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-lg);
  color: var(--color-text);
}
.brand svg { color: var(--color-primary); flex-shrink: 0; }
.brand .brand-sub {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}
.main-nav a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  transition: color var(--transition-interactive);
}
.main-nav a:hover { color: var(--color-primary); }

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.theme-toggle {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  color: var(--color-text-muted);
  transition: background var(--transition-interactive), color var(--transition-interactive);
}
.theme-toggle:hover { background: var(--color-surface-offset); color: var(--color-primary); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 600;
  white-space: nowrap;
  transition: transform var(--transition-interactive), background var(--transition-interactive), box-shadow var(--transition-interactive);
}
.btn-primary {
  background: var(--color-amber);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--color-amber-hover); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-ghost {
  background: var(--color-surface-offset);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}
.btn-ghost:hover { background: var(--color-surface-offset-2); }

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  place-items: center;
  color: var(--color-text);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-block: clamp(var(--space-20), 12vw, var(--space-32)) clamp(var(--space-16), 8vw, var(--space-24));
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 85% 10%, color-mix(in oklab, var(--color-amber) 16%, transparent), transparent 55%),
    radial-gradient(circle at 5% 90%, color-mix(in oklab, var(--color-primary) 18%, transparent), transparent 55%);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-16);
  align-items: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  background: var(--color-primary-highlight);
  color: var(--color-primary);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: var(--space-5);
}
[data-theme='dark'] .eyebrow { color: var(--color-text); }

.hero h1 {
  font-size: var(--text-3xl);
  font-weight: 650;
  color: var(--color-text);
  margin-bottom: var(--space-5);
}
.hero h1 .accent { color: var(--color-amber); }

.hero-lede {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  max-width: 46ch;
  margin-bottom: var(--space-8);
}

.hero-ctas {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-bottom: var(--space-10);
}

.hero-stats {
  display: flex;
  gap: var(--space-8);
  flex-wrap: wrap;
}
.hero-stat .num {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 650;
  color: var(--color-primary);
}
[data-theme='dark'] .hero-stat .num { color: var(--color-amber); }
.hero-stat .label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.hero-visual {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4/5;
  border: 1px solid var(--color-border);
}
.hero-visual img { width: 100%; height: 100%; object-fit: cover; }
.hero-badge {
  position: absolute;
  bottom: var(--space-5);
  left: var(--space-5);
  right: var(--space-5);
  background: color-mix(in oklab, var(--color-surface) 92%, transparent);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  box-shadow: var(--shadow-md);
}
.hero-badge svg { color: var(--color-amber); flex-shrink: 0; }
.hero-badge strong { font-family: var(--font-display); font-size: var(--text-base); display: block; }
.hero-badge span { font-size: var(--text-xs); color: var(--color-text-muted); }

/* ---------- Disambiguation banner ---------- */
.disambig {
  background: var(--color-surface-offset);
  border-top: 1px solid var(--color-divider);
  border-bottom: 1px solid var(--color-divider);
}
.disambig-inner {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding-block: var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}
.disambig-inner svg { flex-shrink: 0; margin-top: 2px; color: var(--color-primary); }
.disambig-inner strong { color: var(--color-text); }

/* ---------- Section heading ---------- */
.section-head {
  max-width: 640px;
  margin-bottom: var(--space-12);
}
.section-head .eyebrow { margin-bottom: var(--space-4); }
.section-head h2 {
  font-size: var(--text-2xl);
  font-weight: 620;
  margin-bottom: var(--space-4);
}
.section-head p {
  font-size: var(--text-base);
  color: var(--color-text-muted);
}
.section-head.centered { margin-inline: auto; text-align: center; }

/* ---------- Services ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
}
.service-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition: transform var(--transition-interactive), box-shadow var(--transition-interactive), border-color var(--transition-interactive);
}
.service-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary);
}
.service-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  background: var(--color-primary-highlight);
  color: var(--color-primary);
  margin-bottom: var(--space-4);
}
[data-theme='dark'] .service-icon { color: var(--color-amber); }
.service-card h3 {
  font-size: var(--text-base);
  font-weight: 650;
  margin-bottom: var(--space-2);
}
.service-card p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* ---------- Products / custom builds ---------- */
.products-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  align-items: start;
}
.product-col h3 {
  font-size: var(--text-lg);
  font-weight: 650;
  margin-bottom: var(--space-5);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.product-col h3 svg { color: var(--color-amber); }
.product-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.product-row {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}
.product-row svg { color: var(--color-primary); flex-shrink: 0; margin-top: 2px; }
.product-row strong { font-size: var(--text-sm); display: block; margin-bottom: 2px; }
.product-row span { font-size: var(--text-xs); color: var(--color-text-muted); }

.custom-callout {
  margin-top: var(--space-6);
  background: linear-gradient(135deg, var(--color-primary), color-mix(in oklab, var(--color-primary) 70%, black));
  color: var(--color-text-inverse);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}
[data-theme='dark'] .custom-callout { color: #fff; }
.custom-callout h4 {
  font-family: var(--font-display);
  font-size: var(--text-base);
  margin-bottom: var(--space-2);
}
.custom-callout p { font-size: var(--text-sm); opacity: 0.9; }

/* ---------- History timeline ---------- */
.history-section { background: var(--color-surface-2); }
.timeline {
  position: relative;
  padding-left: var(--space-8);
  border-left: 2px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}
.timeline-item { position: relative; }
.timeline-item::before {
  content: '';
  position: absolute;
  left: calc(-1 * var(--space-8) - 6px);
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-amber);
  border: 2px solid var(--color-surface-2);
}
.timeline-year {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 650;
  color: var(--color-primary);
}
[data-theme='dark'] .timeline-year { color: var(--color-amber); }
.timeline-item p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  max-width: 60ch;
}

/* ---------- Hours & contact ---------- */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
}
.info-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
}
.info-card h3 {
  font-size: var(--text-lg);
  font-weight: 650;
  margin-bottom: var(--space-6);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.info-card h3 svg { color: var(--color-amber); }

.hours-table { width: 100%; border-collapse: collapse; }
.hours-table tr { border-bottom: 1px solid var(--color-divider); }
.hours-table tr:last-child { border-bottom: none; }
.hours-table td { padding: var(--space-3) 0; font-size: var(--text-sm); }
.hours-table td:first-child { color: var(--color-text-muted); }
.hours-table td:last-child { text-align: right; font-weight: 600; }
.hours-table tr.today td { color: var(--color-primary); font-weight: 650; }
[data-theme='dark'] .hours-table tr.today td { color: var(--color-amber); }

.contact-list { display: flex; flex-direction: column; gap: var(--space-5); }
.contact-row { display: flex; align-items: flex-start; gap: var(--space-4); }
.contact-row svg {
  color: var(--color-primary);
  background: var(--color-primary-highlight);
  border-radius: var(--radius-md);
  padding: var(--space-2);
  width: 36px; height: 36px;
  flex-shrink: 0;
}
[data-theme='dark'] .contact-row svg { color: var(--color-amber); }
.contact-row strong { display: block; font-size: var(--text-sm); margin-bottom: 2px; }
.contact-row a, .contact-row span { font-size: var(--text-sm); color: var(--color-text-muted); }
.contact-row a:hover { color: var(--color-primary); }

.map-embed {
  margin-top: var(--space-6);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border);
  aspect-ratio: 16/9;
}
.map-embed iframe { width: 100%; height: 100%; border: none; }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(135deg, var(--color-primary), color-mix(in oklab, var(--color-primary) 60%, black));
  color: #fff;
  border-radius: var(--radius-xl);
  padding: clamp(var(--space-10), 6vw, var(--space-16));
  text-align: center;
  margin-inline: auto;
}
.cta-band h2 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-4);
}
.cta-band p {
  font-size: var(--text-base);
  opacity: 0.85;
  max-width: 50ch;
  margin-inline: auto;
  margin-bottom: var(--space-8);
}
.cta-band .btn-primary { background: var(--color-amber); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--color-divider);
  padding-block: var(--space-12);
  background: var(--color-surface-2);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--space-8);
  margin-bottom: var(--space-8);
}
.footer-brand .brand { margin-bottom: var(--space-3); }
.footer-brand p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  max-width: 40ch;
}
.footer-col h4 {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 650;
  margin-bottom: var(--space-4);
  color: var(--color-text);
}
.footer-col ul { display: flex; flex-direction: column; gap: var(--space-2); }
.footer-col a {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  transition: color var(--transition-interactive);
}
.footer-col a:hover { color: var(--color-primary); }

.footer-bottom {
  border-top: 1px solid var(--color-divider);
  padding-top: var(--space-6);
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}
.footer-disclaimer {
  max-width: 640px;
}

/* ---------- Trust grid ---------- */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-4);
}

/* ---------- Mobile ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; aspect-ratio: 16/10; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .products-layout { grid-template-columns: 1fr; gap: var(--space-8); }
  .contact-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .main-nav { display: none; }
  .nav-toggle { display: grid; }
}

@media (max-width: 900px) {
  .main-nav.is-open {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-divider);
    padding: var(--space-6);
    gap: var(--space-4);
    box-shadow: var(--shadow-md);
  }
}

@media (max-width: 640px) {
  .services-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: var(--space-6); }
  .disambig-inner { font-size: var(--text-xs); }
}
