/* =========================================================================
   Municipal Permit & Inspection Automation Hub
   Design system — light, civic, elegant
   ========================================================================= */

:root {
  /* Brand palette — civic blue + verdigris + warm amber accents */
  --c-ink: #0f1f33;
  --c-ink-soft: #314259;
  --c-muted: #5b6b80;
  --c-line: #e3e7ee;
  --c-line-soft: #eef1f6;
  --c-bg: #f8fafc;
  --c-bg-elev: #ffffff;
  --c-bg-tint: #f1f5fb;

  --c-primary: #1f5d8c;          /* civic blue */
  --c-primary-strong: #0f3f63;
  --c-primary-soft: #e6f0f8;

  --c-teal: #1f8a8a;              /* verdigris */
  --c-teal-soft: #e2f4f3;
  --c-amber: #c97a1e;              /* warm permit amber */
  --c-amber-soft: #fbeed6;
  --c-violet: #6a4c93;
  --c-violet-soft: #ece5f5;
  --c-green: #2f8a4f;
  --c-green-soft: #e1f3e7;
  --c-rose: #b04267;
  --c-rose-soft: #f8e2ea;

  --c-code-bg: #f5f7fb;
  --c-code-border: #e1e6ee;
  --c-inline-bg: #eef2f8;

  /* Type */
  --ff-sans: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --ff-mono: "JetBrains Mono", "Fira Code", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Layout */
  --measure: 78ch;
  --container: 1340px;
  --container-wide: 1500px;
  --radius: 14px;
  --radius-sm: 8px;
  --header-h: 68px;

  /* Shadow */
  --shadow-sm: 0 1px 2px rgba(15, 31, 51, 0.05);
  --shadow-md: 0 6px 24px -8px rgba(15, 31, 51, 0.18), 0 2px 6px -3px rgba(15, 31, 51, 0.08);
  --shadow-lg: 0 30px 60px -20px rgba(15, 31, 51, 0.22);

  /* Motion */
  --t-fast: 140ms cubic-bezier(0.2, 0.6, 0.2, 1);
  --t-base: 220ms cubic-bezier(0.2, 0.6, 0.2, 1);
}

/* ----- A11y utilities ----- */
.visually-hidden {
  position: absolute !important;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -100px;
  background: var(--c-primary, #1f5d8c); color: #fff;
  padding: 10px 16px; border-radius: 8px;
  z-index: 1000;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus, .skip-link:focus-visible {
  top: 12px;
  clip: auto; clip-path: none; width: auto; height: auto;
}

/* ----- Reset / base ----- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  font-family: var(--ff-sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--c-ink);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
main { flex: 1; }
img, svg { max-width: 100%; display: block; }
a { color: var(--c-primary); text-decoration: none; transition: color var(--t-fast), background-color var(--t-fast); }
a:hover, a:focus-visible { color: var(--c-primary-strong); text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--c-primary) 40%, transparent); outline-offset: 2px; border-radius: 4px; }

/* ----- Containers ----- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: clamp(16px, 3vw, 40px); }
.container-wide { width: 100%; max-width: var(--container-wide); margin-inline: auto; padding-inline: clamp(16px, 3vw, 40px); }

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.88);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--c-line);
  height: var(--header-h);
}
.site-header .container-wide {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  color: var(--c-ink);
  letter-spacing: -0.01em;
}
.brand:hover { color: var(--c-primary); text-decoration: none; }
.brand-logo { width: 38px; height: 38px; flex: none; }
.brand-name { font-size: 16px; line-height: 1.1; }
.brand-name .brand-sub { display: block; font-weight: 500; font-size: 12px; color: var(--c-muted); letter-spacing: 0.02em; }

.site-nav { margin-left: auto; }
.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--c-line);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  cursor: pointer;
  color: var(--c-ink);
}
.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 4px;
  align-items: center;
}
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  color: var(--c-ink-soft);
  font-weight: 500;
  font-size: 14.5px;
  transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast);
}
.nav-link:hover { background: var(--c-bg-tint); color: var(--c-primary-strong); text-decoration: none; transform: translateY(-1px); }
.nav-link[aria-current="page"], .nav-link.is-active {
  background: var(--c-primary-soft);
  color: var(--c-primary-strong);
}
.nav-link .nav-icon { width: 18px; height: 18px; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  margin-top: 80px;
  background: var(--c-ink);
  color: #cdd6e1;
  padding: 48px 0 28px;
}
.site-footer a { color: #e8edf4; }
.site-footer a:hover { color: #fff; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(2, 1fr);
  gap: 40px;
}
.footer-brand { max-width: 380px; }
.footer-brand p { color: #aab6c5; font-size: 14.5px; line-height: 1.55; }
.footer-col h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.1em; color: #8a98ad; margin: 0 0 14px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: 14.5px; }
.footer-base { margin-top: 36px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.08); font-size: 13px; color: #8a98ad; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  padding: clamp(56px, 8vw, 96px) 0 clamp(40px, 6vw, 72px);
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(31, 93, 140, 0.10), transparent 60%),
    radial-gradient(900px 500px at 0% 20%, rgba(31, 138, 138, 0.10), transparent 60%),
    linear-gradient(180deg, #ffffff 0%, var(--c-bg) 100%);
  border-bottom: 1px solid var(--c-line);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--c-primary-strong);
  background: var(--c-primary-soft);
  border-radius: 999px;
  margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(34px, 4.6vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
  color: var(--c-ink);
}
.hero h1 .grad {
  background: linear-gradient(90deg, var(--c-primary) 0%, var(--c-teal) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-lede { font-size: clamp(17px, 1.5vw, 19px); color: var(--c-ink-soft); max-width: 60ch; }

.hero-ctas {
  margin-top: 32px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.cta-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 18px;
  background: var(--c-bg-elev);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  color: var(--c-ink);
  transition: transform var(--t-base), box-shadow var(--t-base), border-color var(--t-base);
}
.cta-card:hover {
  text-decoration: none;
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--c-primary) 35%, var(--c-line));
}
.cta-icon {
  width: 44px; height: 44px;
  flex: none;
  border-radius: 12px;
  display: grid; place-items: center;
  color: #fff;
}
.cta-icon svg { width: 26px; height: 26px; }
.cta-icon.teal  { background: linear-gradient(135deg, #1f8a8a 0%, #2bb39a 100%); }
.cta-icon.amber { background: linear-gradient(135deg, #c97a1e 0%, #e9a23b 100%); }
.cta-icon.blue  { background: linear-gradient(135deg, #1f5d8c 0%, #3b85b9 100%); }
.cta-icon.violet{ background: linear-gradient(135deg, #6a4c93 0%, #8e6dc1 100%); }
.cta-body strong { display: block; font-size: 16px; margin-bottom: 4px; }
.cta-body span { color: var(--c-muted); font-size: 14px; line-height: 1.45; }

.hero-art {
  position: relative;
  aspect-ratio: 1 / 1;
  max-width: 460px;
  justify-self: end;
  width: 100%;
}
.hero-art svg { width: 100%; height: 100%; filter: drop-shadow(0 25px 50px rgba(31, 93, 140, 0.18)); }

/* ============================================================
   Generic prose / content
   ============================================================ */
.prose {
  max-width: 92ch; /* readable but generous on widescreen */
  font-size: 17.5px;
}
.prose.prose-wide { max-width: 100%; }
.prose h1, .prose h2, .prose h3, .prose h4 {
  color: var(--c-ink);
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin: 1.6em 0 0.5em;
}
.prose > h1:first-child, .prose > h2:first-child { margin-top: 0; }
.prose h2 {
  font-size: clamp(24px, 2.5vw, 30px);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--c-line);
}
.prose h3 { font-size: clamp(19px, 1.8vw, 22px); }
.prose h2 .header-anchor, .prose h3 .header-anchor, .prose h4 .header-anchor {
  color: var(--c-muted);
  font-weight: 400;
  margin-right: 8px;
  opacity: 0;
  transition: opacity var(--t-fast);
  text-decoration: none;
}
.prose h2:hover .header-anchor, .prose h3:hover .header-anchor, .prose h4:hover .header-anchor { opacity: 1; }
.prose p { margin: 0 0 1.1em; color: var(--c-ink-soft); }
.prose strong { color: var(--c-ink); }
.prose a {
  color: var(--c-primary);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, var(--c-primary) 35%, transparent);
}
.prose a:hover {
  color: var(--c-primary-strong);
  text-decoration-color: var(--c-primary-strong);
}
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin: 0.35em 0; }
.prose ul li::marker { color: var(--c-teal); }
.prose blockquote {
  margin: 1.5em 0;
  padding: 12px 18px;
  border-left: 4px solid var(--c-teal);
  background: var(--c-teal-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--c-ink-soft);
}

/* Inline code — subtle, blend-in */
.prose :not(pre) > code {
  background: var(--c-inline-bg);
  padding: 0.1em 0.42em;
  border-radius: 5px;
  font-family: var(--ff-mono);
  font-size: 0.92em;
  color: var(--c-primary-strong);
  border: 0;
}
.prose :not(pre) > code::before, .prose :not(pre) > code::after { content: none; }

/* ----- Code blocks ----- */
.codeblock {
  position: relative;
  margin: 1.5em 0;
  border-radius: var(--radius);
  background: var(--c-code-bg);
  border: 1px solid var(--c-code-border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.codeblock pre {
  margin: 0;
  padding: 18px 20px;
  overflow-x: auto;
  background: transparent !important;
  font-family: var(--ff-mono);
  font-size: 14.5px;
  line-height: 1.6;
  color: #243042;
}
.codeblock code { font-family: inherit; }
.copy-btn {
  position: absolute;
  top: 10px; right: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  font: 600 12px / 1 var(--ff-sans);
  letter-spacing: 0.02em;
  color: var(--c-ink-soft);
  background: rgba(255,255,255,0.85);
  border: 1px solid var(--c-line);
  border-radius: 999px;
  cursor: pointer;
  opacity: 0;
  transition: opacity var(--t-base), background var(--t-fast), color var(--t-fast), transform var(--t-fast);
  z-index: 2;
}
.codeblock:hover .copy-btn, .copy-btn:focus-visible { opacity: 1; }
.copy-btn:hover { background: var(--c-primary); color: #fff; border-color: var(--c-primary); transform: translateY(-1px); }
.copy-btn.is-copied { background: var(--c-green); color: #fff; border-color: var(--c-green); opacity: 1; }

/* PrismJS — bind to our palette (light) */
.codeblock pre[class*="language-"] { color: #243042; }
.token.comment, .token.prolog, .token.doctype, .token.cdata { color: #7a8497; font-style: italic; }
.token.punctuation { color: #4a5568; }
.token.namespace { opacity: 0.7; }
.token.property, .token.tag, .token.constant, .token.symbol, .token.deleted { color: var(--c-rose); }
.token.boolean, .token.number { color: var(--c-amber); }
.token.selector, .token.attr-name, .token.string, .token.char, .token.builtin, .token.inserted { color: var(--c-green); }
.token.operator, .token.entity, .token.url, .token.variable { color: var(--c-primary-strong); }
.token.atrule, .token.attr-value, .token.function, .token.class-name { color: var(--c-violet); }
.token.keyword { color: var(--c-primary); font-weight: 600; }
.token.regex, .token.important { color: var(--c-amber); }
.token.important, .token.bold { font-weight: 700; }
.token.italic { font-style: italic; }

/* ----- Tables (responsive horizontal scroll) ----- */
.prose .table-wrap, .table-wrap {
  margin: 1.5em 0;
  overflow-x: auto;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  background: var(--c-bg-elev);
  box-shadow: var(--shadow-sm);
}
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 540px; }
.prose th, .prose td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--c-line-soft); }
.prose thead th { background: var(--c-bg-tint); color: var(--c-ink); font-weight: 600; letter-spacing: 0.01em; }
.prose tbody tr:hover { background: var(--c-bg-tint); }
.prose tbody tr:last-child td { border-bottom: 0; }

/* ----- Task-list checkboxes ----- */
.prose ul.contains-task-list { list-style: none; padding-left: 0; }
.prose .task-list-item { display: flex; align-items: flex-start; gap: 10px; padding: 6px 10px; border-radius: 8px; transition: background var(--t-fast); }
.prose .task-list-item:hover { background: var(--c-bg-tint); }
.prose .task-list-item::marker { content: ""; }
.prose .task-list-item input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px; height: 18px;
  margin-top: 6px;
  flex: none;
  border: 2px solid var(--c-line);
  border-radius: 5px;
  background: #fff;
  cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast);
  position: relative;
}
.prose .task-list-item input[type="checkbox"]:hover { border-color: var(--c-primary); }
.prose .task-list-item input[type="checkbox"]:checked {
  background: var(--c-primary);
  border-color: var(--c-primary);
}
.prose .task-list-item input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  top: 1px; left: 5px;
  width: 4px; height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.prose .task-list-item.is-checked > label,
.prose .task-list-item.is-checked { color: var(--c-muted); text-decoration: line-through; }

/* ----- FAQ accordions ----- */
.faq { margin: 2em 0; }
.faq-item {
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  background: var(--c-bg-elev);
  margin: 12px 0;
  overflow: hidden;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.faq-item[open] { border-color: color-mix(in srgb, var(--c-primary) 30%, var(--c-line)); box-shadow: var(--shadow-sm); }
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 20px;
  font-weight: 600;
  color: var(--c-ink);
  display: flex; align-items: center; gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before {
  content: "+";
  display: inline-grid; place-items: center;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--c-primary-soft);
  color: var(--c-primary-strong);
  font-weight: 700;
  flex: none;
  transition: transform var(--t-base), background var(--t-fast);
}
.faq-item[open] summary::before { content: "−"; background: var(--c-primary); color: #fff; }
.faq-answer { padding: 0 20px 18px 56px; color: var(--c-ink-soft); }

/* ----- Mermaid (themed background) ----- */
pre.mermaid {
  background: var(--c-bg-elev);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  padding: 18px;
  margin: 1.5em 0;
  display: flex;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
}

/* ============================================================
   Content layout (with breadcrumbs / related)
   ============================================================ */
.content-shell {
  padding: 28px 0 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 48px;
}
.content-main { min-width: 0; }
.content-aside {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  align-self: start;
  font-size: 14.5px;
}
.aside-card {
  background: var(--c-bg-elev);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  padding: 18px 18px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 18px;
}
.aside-card h3 { font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--c-muted); margin: 0 0 12px; }
.aside-card ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.aside-card a { color: var(--c-ink-soft); }
.aside-card a:hover { color: var(--c-primary); }
.aside-card a.is-current { color: var(--c-primary-strong); font-weight: 600; }

/* Breadcrumbs */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  align-items: center;
  margin-bottom: 14px;
  font-size: 13.5px;
  color: var(--c-muted);
}
.crumbs a { color: var(--c-muted); }
.crumbs a:hover { color: var(--c-primary); }
.crumbs .sep { color: var(--c-line); }
.crumbs .current { color: var(--c-ink-soft); font-weight: 500; }

/* Title */
.content-title {
  font-size: clamp(28px, 3.5vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 8px;
  background: linear-gradient(92deg, var(--c-primary) 0%, var(--c-teal) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.content-meta {
  display: flex; flex-wrap: wrap; gap: 10px 18px;
  font-size: 13.5px; color: var(--c-muted);
  margin-bottom: 28px;
}
.content-meta .pill { padding: 3px 10px; border-radius: 999px; background: var(--c-bg-tint); color: var(--c-ink-soft); }

.related-block {
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid var(--c-line);
}
.related-block h2 { font-size: 20px; margin: 0 0 16px; }
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}
.related-card {
  display: block;
  padding: 16px 16px;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  background: var(--c-bg-elev);
  color: var(--c-ink);
  transition: transform var(--t-base), border-color var(--t-base), box-shadow var(--t-base);
}
.related-card:hover {
  text-decoration: none;
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--c-primary) 30%, var(--c-line));
  box-shadow: var(--shadow-md);
}
.related-card .rel-kicker { font-size: 12px; color: var(--c-muted); letter-spacing: 0.05em; text-transform: uppercase; }
.related-card strong { display: block; margin-top: 4px; font-size: 15.5px; color: var(--c-ink); }

/* ============================================================
   Section landing pages (hub)
   ============================================================ */
.section-hero {
  padding: clamp(48px, 6vw, 72px) 0 28px;
  background: linear-gradient(180deg, var(--c-primary-soft) 0%, var(--c-bg) 100%);
  border-bottom: 1px solid var(--c-line);
}
.section-hero .eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 10px; border-radius: 999px;
  background: rgba(255,255,255,0.7);
  color: var(--c-primary-strong);
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
}

.section-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

/* ============================================================
   Front page extras
   ============================================================ */
.section-block { padding: clamp(48px, 6vw, 80px) 0; }
.section-block.alt { background: var(--c-bg-elev); border-block: 1px solid var(--c-line); }
.section-block h2 {
  font-size: clamp(26px, 2.6vw, 34px);
  letter-spacing: -0.015em;
  margin: 0 0 10px;
}
.section-block .lead { font-size: 17px; color: var(--c-ink-soft); max-width: 70ch; margin: 0 0 28px; }
.section-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}
.section-cards-grid > .section-card { display: flex; flex-direction: column; gap: 14px; padding: 26px; border-radius: var(--radius); border: 1px solid var(--c-line); background: var(--c-bg-elev); box-shadow: var(--shadow-sm); transition: transform var(--t-base), box-shadow var(--t-base); }
.section-cards-grid > .section-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.section-cards-grid > .section-card h3 { margin: 0; font-size: 20px; color: var(--c-ink); }
.section-cards-grid > .section-card p { margin: 0; color: var(--c-ink-soft); }
.section-cards-grid > .section-card .icon-wrap { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; color: #fff; }
.section-cards-grid > .section-card .icon-wrap.teal  { background: linear-gradient(135deg, #1f8a8a 0%, #2bb39a 100%); }
.section-cards-grid > .section-card .icon-wrap.amber { background: linear-gradient(135deg, #c97a1e 0%, #e9a23b 100%); }
.section-cards-grid > .section-card .arrow {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--c-primary); font-weight: 600; font-size: 14.5px;
  margin-top: auto;
  transition: gap var(--t-fast);
}
.section-cards-grid > .section-card:hover .arrow { gap: 12px; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}
.feature {
  display: flex; flex-direction: column; gap: 10px;
  padding: 22px;
  background: var(--c-bg-elev);
  border-radius: var(--radius);
  border: 1px solid var(--c-line);
  transition: transform var(--t-base), border-color var(--t-base);
}
.feature:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--c-primary) 30%, var(--c-line)); }
.feature .ficon { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; color: #fff; }
.feature h4, .feature .feature-title { margin: 0; font-size: 16px; font-weight: 600; }
.feature p { margin: 0; color: var(--c-muted); font-size: 14.5px; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { max-width: 320px; justify-self: start; }
  .content-shell { grid-template-columns: 1fr; }
  .content-aside { position: static; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .section-cards-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  :root { --header-h: 60px; }
  .nav-toggle { display: inline-flex; align-items: center; }
  .site-nav .nav-list {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: #fff;
    border-bottom: 1px solid var(--c-line);
    padding: 14px;
    transform: translateY(-110%);
    transition: transform var(--t-base);
    box-shadow: var(--shadow-md);
  }
  .site-nav.is-open .nav-list { transform: translateY(0); }
  .nav-link { padding: 12px 14px; border-radius: 10px; }
  .brand-name { font-size: 14.5px; }
  .brand-name .brand-sub { display: none; }
  .hero h1 { font-size: 32px; }
  .hero-ctas { grid-template-columns: 1fr; }
}

@media (min-width: 1600px) {
  :root { --container: 1480px; --container-wide: 1620px; }
}

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

/* Print niceties */
@media print {
  .site-header, .site-footer, .copy-btn, .content-aside { display: none !important; }
  .codeblock { break-inside: avoid; }
}
