/* Mississauga Cleaning – DAPE Build Standards v1.0
   Clean, fast, accessible, maintainable CSS
   No frameworks, minimal CSS, excellent performance */

:root {
  --color-primary: #0f766e; /* teal-700 */
  --color-primary-dark: #0d5c56;
  --color-primary-light: #14b8a6;
  --color-accent: #0369a1; /* sky-700 */
  --color-text: #1e293b;
  --color-text-muted: #64748b;
  --color-bg: #ffffff;
  --color-bg-alt: #f8fafc;
  --color-border: #e2e8f0;
  --color-success: #059669;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --max-width: 72rem;
  --radius: 0.5rem;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

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

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--color-primary-dark);
}

a:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.25;
  font-weight: 700;
  color: var(--color-text);
  margin-top: 0;
}

h1 { font-size: 2.25rem; margin-bottom: 1rem; }
h2 { font-size: 1.75rem; margin-bottom: 0.75rem; margin-top: 2rem; }
h3 { font-size: 1.375rem; margin-bottom: 0.5rem; margin-top: 1.5rem; }
h4 { font-size: 1.125rem; margin-bottom: 0.5rem; }

p { margin-top: 0; margin-bottom: 1.25rem; }

ul, ol {
  margin-top: 0;
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

li { margin-bottom: 0.375rem; }

/* Layout */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.section {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.section-alt {
  background-color: var(--color-bg-alt);
}

/* Header */
.site-header {
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
  background-color: rgba(255, 255, 255, 0.95);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
  gap: 1rem;
}

.logo {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--color-text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo:hover {
  color: var(--color-primary);
}

.logo-mark {
  width: 2rem;
  height: 2rem;
  background: var(--color-primary);
  border-radius: 0.375rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.875rem;
  font-weight: 800;
}

/* Navigation */
.nav {
  display: none;
}

.nav a {
  color: var(--color-text);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9375rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
}

.nav a:hover {
  background: var(--color-bg-alt);
  color: var(--color-primary);
}

.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: white;
  cursor: pointer;
}

.nav-toggle:focus-visible {
  outline: 2px solid var(--color-primary);
}

@media (min-width: 768px) {
  .nav {
    display: flex;
    gap: 0.25rem;
  }
  .nav-toggle {
    display: none;
  }
}

/* Mobile nav */
.mobile-nav {
  display: none;
  border-top: 1px solid var(--color-border);
  padding: 1rem;
  background: white;
}

.mobile-nav.open {
  display: block;
}

.mobile-nav a {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--color-text);
  text-decoration: none;
  font-weight: 500;
  border-radius: var(--radius);
}

.mobile-nav a:hover {
  background: var(--color-bg-alt);
}

/* Hero */
.hero {
  padding: 4rem 0 3rem;
  background: linear-gradient(180deg, #f0fdfa 0%, #ffffff 100%);
  border-bottom: 1px solid var(--color-border);
}

.hero h1 {
  font-size: 2.5rem;
  max-width: 40rem;
  margin-bottom: 1.25rem;
}

.hero-lead {
  font-size: 1.25rem;
  color: var(--color-text-muted);
  max-width: 36rem;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  font-size: 0.9375rem;
  border-radius: var(--radius);
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.btn-primary {
  background: var(--color-primary);
  color: white;
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  color: white;
}

.btn-secondary {
  background: white;
  color: var(--color-text);
  border-color: var(--color-border);
}

.btn-secondary:hover {
  background: var(--color-bg-alt);
  border-color: #cbd5e1;
}

/* Cards */
.card-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .card-grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: calc(var(--radius) + 0.125rem);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s, border-color 0.15s;
}

.card:hover {
  box-shadow: var(--shadow);
  border-color: #cbd5e1;
}

.card h3 {
  margin-top: 0;
  font-size: 1.125rem;
}

.card p {
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  margin-bottom: 1rem;
}

.card a {
  font-weight: 600;
  text-decoration: none;
  color: var(--color-primary);
}

.card a:hover {
  text-decoration: underline;
}

/* Knowledge map */
.knowledge-map {
  display: grid;
  gap: 1rem;
}

@media (min-width: 768px) {
  .knowledge-map {
    grid-template-columns: repeat(2, 1fr);
  }
}

.map-item {
  display: flex;
  gap: 1rem;
  padding: 1.25rem;
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.map-item .icon {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  background: #ccfbf1;
  color: var(--color-primary);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

/* Breadcrumbs */
.breadcrumbs {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
}

.breadcrumbs a {
  color: var(--color-text-muted);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

.breadcrumbs span {
  margin: 0 0.5rem;
}

/* Article content */
.article {
  max-width: 48rem;
}

.article h2 {
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 0.5rem;
}

.quick-answer {
  background: #f0fdfa;
  border-left: 4px solid var(--color-primary);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.quick-answer p:last-child {
  margin-bottom: 0;
}

.key-takeaways {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 2rem 0;
}

.key-takeaways h3 {
  margin-top: 0;
}

.key-takeaways ul {
  margin-bottom: 0;
}

/* Footer */
.site-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 3rem 0 2rem;
  margin-top: 4rem;
}

.site-footer a {
  color: #cbd5e1;
  text-decoration: none;
}

.site-footer a:hover {
  color: white;
  text-decoration: underline;
}

.footer-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
  margin-bottom: 2rem;
}

@media (min-width: 640px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
}

.footer-brand {
  color: white;
  font-weight: 700;
  font-size: 1.125rem;
  margin-bottom: 0.75rem;
}

.footer-heading {
  color: white;
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-bottom {
  border-top: 1px solid #1e293b;
  padding-top: 1.5rem;
  font-size: 0.875rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}

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

.text-muted {
  color: var(--color-text-muted);
}

.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* Search form */
.search-form {
  display: flex;
  gap: 0.5rem;
  max-width: 28rem;
}

.search-form input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 1rem;
}

.search-form input:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 0;
  border-color: var(--color-primary);
}

.search-form button {
  padding: 0.75rem 1.25rem;
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
}

.search-form button:hover {
  background: var(--color-primary-dark);
}

/* TOC */
.toc {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
}

.toc h2 {
  font-size: 1rem;
  margin-top: 0;
  margin-bottom: 0.75rem;
}

.toc ol {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.9375rem;
}

.toc a {
  text-decoration: none;
}

.toc a:hover {
  text-decoration: underline;
}

/* Related */
.related {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}

.related h2 {
  font-size: 1.25rem;
  margin-top: 0;
}

/* Meta */
.page-meta {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* 404 */
.error-page {
  text-align: center;
  padding: 6rem 0;
}

.error-page h1 {
  font-size: 4rem;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}
