/* =========================================================================
   Smart Geeks -- design system
   Original CSS. Color values below must stay in sync with
   src/data/business.py -> BRAND (kept manually in sync; tests/qa.py can be
   extended to diff them if this file starts drifting).

   Structural direction only (not content or assets) takes cues from the
   general conventions of www.smartgeeks.ca: sticky header with logo/nav/
   phone CTA, headline+subhead+dual-CTA hero, card-grid services, four-
   column footer, persistent mobile contact bar.
   ========================================================================= */

:root {
  /* Brand */
  --blue: #007BFF;              /* accent / links / non-text use only */
  --blue-button: #0062CC;       /* WCAG AA-safe filled-button blue (5.80:1 on white) */
  --blue-button-hover: #004FA3;
  --navy: #0A1A2F;
  --green-accent: #00E676;      /* decorative accents only, never as text on light bg */
  --bg-soft: #F5F7FA;
  --text: #333333;
  --text-muted: #52606D;        /* AA-safe muted text */
  --border: #E1E7EF;
  --surface: #FFFFFF;
  --success: #1E7E34;
  --success-bg: #E9F7EF;
  --error: #B3261E;
  --error-bg: #FBEAE9;
  --focus-ring: #0062CC;

  /* Spacing scale (8px baseline) */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 4rem;
  --space-7: 6rem;

  /* Type scale */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-md: 1.125rem;
  --fs-lg: 1.375rem;
  --fs-xl: 1.75rem;
  --fs-2xl: 2.25rem;
  --fs-3xl: 2.75rem;

  --radius: 10px;
  --radius-sm: 6px;
  --container-w: 1180px;
  --shadow-sm: 0 1px 2px rgba(10, 26, 47, 0.06), 0 1px 1px rgba(10, 26, 47, 0.04);
  --shadow-md: 0 8px 24px rgba(10, 26, 47, 0.10);
  --header-h: 72px;
  --mab-h: 60px;
}

/* ---- Reset ------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  color: var(--text);
  background: var(--surface);
  line-height: 1.6;
  padding-bottom: var(--mab-h);
}
@media (min-width: 900px) { body { padding-bottom: 0; } }

img { max-width: 100%; height: auto; display: block; }
svg { display: block; }
a { color: var(--blue-button); text-decoration-thickness: 1.5px; text-underline-offset: 2px; }
a:hover { color: var(--blue-button-hover); }
h1, h2, h3, h4 { color: var(--navy); line-height: 1.2; margin: 0 0 var(--space-2); text-wrap: balance; font-weight: 800; }
h1 { font-size: var(--fs-3xl); }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-lg); }
p { margin: 0 0 var(--space-2); max-width: 68ch; }
ul, ol { padding-left: 1.25rem; }
address { font-style: normal; }
:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; border-radius: 4px; }

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

.skip-link {
  position: absolute; left: 1rem; top: -3rem;
  background: var(--navy); color: #fff; padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm); z-index: 200; transition: top 0.15s ease;
}
.skip-link:focus { top: 1rem; }

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

/* ---- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-weight: 700; font-size: var(--fs-sm); text-decoration: none;
  padding: 0.7rem 1.15rem; border-radius: var(--radius-sm); border: 2px solid transparent;
  min-height: 44px; cursor: pointer; transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn-primary { background: var(--blue-button); color: #fff; }
.btn-primary:hover { background: var(--blue-button-hover); color: #fff; }
.btn-secondary { background: var(--navy); color: #fff; }
.btn-secondary:hover { background: #142842; color: #fff; }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--blue-button); color: var(--blue-button); }
.btn-lg { padding: 0.9rem 1.5rem; font-size: var(--fs-base); }
.btn:disabled { opacity: .6; cursor: not-allowed; }

/* ---- Header ------------------------------------------------------------ */
.site-header {
  position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,0.96);
  backdrop-filter: saturate(180%) blur(6px);
  border-bottom: 1px solid var(--border); height: var(--header-h);
}
.header-inner { display: flex; align-items: center; gap: var(--space-3); height: 100%; }
.wordmark { display: flex; align-items: center; gap: 0.5rem; text-decoration: none; color: var(--navy); font-weight: 800; font-size: var(--fs-md); margin-right: auto; }
.wordmark-icon { flex-shrink: 0; }
.primary-nav { display: none; }
.primary-nav ul { list-style: none; display: flex; gap: var(--space-3); margin: 0; padding: 0; }
.primary-nav a { color: var(--navy); font-weight: 600; font-size: var(--fs-sm); text-decoration: none; padding: 0.4rem 0; border-bottom: 2px solid transparent; }
.primary-nav a:hover, .primary-nav a[aria-current="page"] { border-bottom-color: var(--blue-button); color: var(--blue-button); }
.header-actions { display: none; align-items: center; gap: 0.75rem; }
.header-phone svg { color: var(--blue-button); }

.mobile-nav { position: relative; margin-left: auto; }
.mobile-nav > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.mobile-nav > summary::-webkit-details-marker { display: none; }
.mobile-nav-icon { width: 20px; height: 2px; background: var(--navy); position: relative; }
.mobile-nav-icon::before, .mobile-nav-icon::after { content: ""; position: absolute; left: 0; width: 20px; height: 2px; background: var(--navy); }
.mobile-nav-icon::before { top: -6px; }
.mobile-nav-icon::after { top: 6px; }
.mobile-nav-panel {
  position: absolute; right: 0; top: calc(100% + 8px); width: min(88vw, 320px);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-md); padding: var(--space-3);
}
.mobile-nav-panel ul { list-style: none; margin: 0 0 var(--space-2); padding: 0; }
.mobile-nav-panel li { border-bottom: 1px solid var(--border); }
.mobile-nav-panel a { display: block; padding: 0.75rem 0.25rem; color: var(--navy); font-weight: 600; text-decoration: none; }
.mobile-nav-actions { display: flex; flex-direction: column; gap: 0.5rem; }

@media (min-width: 900px) {
  .primary-nav { display: block; }
  .header-actions { display: flex; }
  .mobile-nav { display: none; }
}

/* ---- Breadcrumbs -------------------------------------------------------- */
.breadcrumbs { background: var(--bg-soft); border-bottom: 1px solid var(--border); }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0.6rem var(--space-3); margin: 0; font-size: var(--fs-sm); color: var(--text-muted); }
.breadcrumbs li:not(:last-child)::after { content: "/"; margin-left: 0.4rem; color: var(--text-muted); }
.breadcrumbs a { color: var(--text-muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--blue-button); }
.breadcrumbs li[aria-current="page"] { color: var(--navy); font-weight: 600; }

/* ---- Hero ---------------------------------------------------------------- */
.hero { background: linear-gradient(180deg, var(--bg-soft) 0%, var(--surface) 100%); padding: var(--space-6) 0 var(--space-5); }
.hero-inner { display: grid; gap: var(--space-4); align-items: center; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: 0.4rem; font-size: var(--fs-sm); font-weight: 700; color: var(--blue-button); background: #EAF3FF; padding: 0.35rem 0.75rem; border-radius: 999px; margin-bottom: var(--space-2); }
.hero h1 { font-size: var(--fs-2xl); }
.hero-sub { font-size: var(--fs-md); color: var(--text-muted); max-width: 60ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: var(--space-3); }
.hero-trust { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); margin-top: var(--space-4); padding-top: var(--space-3); border-top: 1px solid var(--border); font-size: var(--fs-sm); color: var(--text-muted); }
.hero-trust li { list-style: none; display: flex; align-items: center; gap: 0.4rem; }
.hero-trust svg { color: var(--blue-button); flex-shrink: 0; }
.hero-media { border-radius: var(--radius); overflow: hidden; }
@media (min-width: 900px) {
  .hero h1 { font-size: var(--fs-3xl); }
  .hero-inner.with-media { grid-template-columns: 1.1fr 0.9fr; }
}

/* ---- Sections ------------------------------------------------------------ */
.section { padding: var(--space-6) 0; }
.section-tight { padding: var(--space-5) 0; }
.section-alt { background: var(--bg-soft); }
.section-head { max-width: 68ch; margin-bottom: var(--space-4); }
.section-head p { color: var(--text-muted); }

/* ---- Image placeholder (used until real photography is supplied) -------- */
.img-frame {
  position: relative; width: 100%; border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(135deg, var(--navy) 0%, #14304F 55%, var(--blue-button) 100%);
  aspect-ratio: var(--ar, 4 / 3);
}
.img-frame svg { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.9; }
.img-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ---- Cards --------------------------------------------------------------- */
.card-grid { display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.service-card {
  display: flex; flex-direction: column; gap: 0.5rem; padding: var(--space-3);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  text-decoration: none; color: inherit; transition: box-shadow .15s ease, border-color .15s ease, transform .15s ease;
}
.service-card:hover { box-shadow: var(--shadow-md); border-color: var(--blue-button); transform: translateY(-2px); }
.service-card-icon { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; background: #EAF3FF; border-radius: var(--radius-sm); color: var(--blue-button); }
.service-card h3 { margin-bottom: 0.15rem; font-size: var(--fs-md); }
.service-card p { color: var(--text-muted); font-size: var(--fs-sm); margin-bottom: 0.25rem; }
.service-card-link { font-size: var(--fs-sm); font-weight: 700; color: var(--blue-button); }

.info-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--space-3); }
.info-card h3 { font-size: var(--fs-base); }

/* ---- Process steps -------------------------------------------------------- */
.step-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); }
.step-list li { display: grid; grid-template-columns: auto 1fr; gap: var(--space-2); align-items: start; }
.step-num { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 800; font-size: var(--fs-sm); flex-shrink: 0; }
.step-list h3 { margin-bottom: 0.15rem; font-size: var(--fs-base); }
.step-list p { color: var(--text-muted); margin-bottom: 0; font-size: var(--fs-sm); }

/* ---- FAQ (native details/summary) ----------------------------------------- */
.faq-block { padding: var(--space-5) 0; }
.faq-list { display: flex; flex-direction: column; gap: 0.6rem; margin-top: var(--space-3); }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.25rem var(--space-2); background: var(--surface); }
.faq-item summary { cursor: pointer; padding: 0.75rem 1.75rem 0.75rem 0; font-weight: 700; color: var(--navy); list-style: none; position: relative; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 0.25rem; top: 0.6rem; font-size: 1.25rem; color: var(--blue-button); }
.faq-item[open] summary::after { content: "\2212"; }
.faq-answer { padding: 0 0 0.9rem; color: var(--text-muted); font-size: var(--fs-sm); }
.faq-answer p { max-width: none; }

/* ---- CTA block -------------------------------------------------------------- */
.cta-block { background: var(--navy); color: #fff; padding: var(--space-5) 0; }
.cta-block h2 { color: #fff; }
.cta-block p { color: #C7D2E0; }
.cta-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); }
.cta-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.cta-block .btn-ghost { border-color: rgba(255,255,255,0.4); color: #fff; }
.cta-block .btn-ghost:hover { border-color: #fff; }

/* ---- Disclosure note ---------------------------------------------------------- */
.disclosure-note { font-size: var(--fs-sm); color: var(--text-muted); background: var(--bg-soft); border-radius: var(--radius-sm); padding: var(--space-2); border: 1px solid var(--border); }

/* ---- Forms ---------------------------------------------------------------------- */
.form-grid { display: grid; gap: var(--space-2); max-width: 640px; }
.form-field { display: flex; flex-direction: column; gap: 0.35rem; }
.form-field label { font-weight: 700; font-size: var(--fs-sm); color: var(--navy); }
.form-field .req { color: var(--error); }
input, select, textarea {
  font: inherit; padding: 0.7rem 0.8rem; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); min-height: 44px;
}
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--blue-button); }
.form-note { font-size: var(--fs-sm); color: var(--text-muted); }
.form-radio-group { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.form-radio-group label { display: flex; align-items: center; gap: 0.4rem; font-weight: 500; font-size: var(--fs-sm); color: var(--text); }
.form-consent { display: flex; align-items: start; gap: 0.5rem; font-size: var(--fs-sm); color: var(--text-muted); }
.form-consent input { min-height: auto; margin-top: 0.2rem; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { border-radius: var(--radius-sm); padding: 0.85rem 1rem; font-size: var(--fs-sm); display: none; }
.form-status.is-visible { display: block; }
.form-status.is-success { background: var(--success-bg); color: var(--success); border: 1px solid #BFE3CB; }
.form-status.is-error { background: var(--error-bg); color: var(--error); border: 1px solid #F0C4C1; }
[aria-invalid="true"] { border-color: var(--error); }
.field-error { color: var(--error); font-size: var(--fs-sm); min-height: 1.1em; }

/* ---- Footer ------------------------------------------------------------------------ */
.site-footer { background: var(--navy); color: #C7D2E0; margin-top: var(--space-6); }
.footer-grid { display: grid; gap: var(--space-4); padding: var(--space-6) var(--space-3) var(--space-4); grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.footer-col h2 { color: #fff; font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: var(--space-2); }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.footer-col a { color: #C7D2E0; text-decoration: none; font-size: var(--fs-sm); }
.footer-col a:hover { color: #fff; }
.footer-contact address, .footer-contact p { font-size: var(--fs-sm); margin: 0 0 0.5rem; }
.footer-social { display: flex; gap: 0.75rem; margin-top: var(--space-2); flex-wrap: wrap; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); padding: var(--space-3); display: flex; flex-wrap: wrap; gap: var(--space-2); justify-content: space-between; font-size: var(--fs-sm); color: #8FA0B8; }
.footer-disclosure { max-width: 60ch; }

/* ---- Mobile action bar --------------------------------------------------------------- */
.mobile-action-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; height: var(--mab-h);
  display: grid; grid-template-columns: repeat(4, 1fr); background: var(--surface);
  border-top: 1px solid var(--border); box-shadow: 0 -4px 12px rgba(10,26,47,0.08);
}
.mab-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.15rem; color: var(--navy); text-decoration: none; font-size: 0.7rem; font-weight: 700; }
.mab-item svg { color: var(--blue-button); }
@media (min-width: 900px) { .mobile-action-bar { display: none; } }

/* ---- Utility -------------------------------------------------------------------------- */
.text-muted { color: var(--text-muted); }
.badge { display: inline-flex; align-items: center; gap: 0.35rem; font-size: var(--fs-sm); font-weight: 700; padding: 0.3rem 0.7rem; border-radius: 999px; background: #EAF3FF; color: var(--blue-button); }
.two-col { display: grid; gap: var(--space-4); }
@media (min-width: 900px) { .two-col { grid-template-columns: 1fr 1fr; align-items: start; } }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: var(--fs-sm); }
th, td { text-align: left; padding: 0.6rem 0.8rem; border-bottom: 1px solid var(--border); }
th { color: var(--navy); }

/* ---- 404 --------------------------------------------------------------------------------- */
.error-page { text-align: center; padding: var(--space-7) 0; }
.error-page h1 { font-size: var(--fs-3xl); }

/* ---- Print ---------------------------------------------------------------------------------- */
@media print {
  .site-header, .mobile-action-bar, .cta-block, .mobile-nav { display: none !important; }
}
