/* ==========================================================================
   Avezz Design System — Base Reset, Typography, Icons & Layout Primitives
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  color-scheme: light;
}

html[data-theme="dark"] {
  color-scheme: dark;
}

body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-top: var(--nav-h);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.48;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.2s ease, color 0.2s ease;
}

body.scroll-body {
  padding-top: 0;
}

body.no-scroll {
  overflow: hidden;
}

button, input, textarea, select {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

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

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: none;
}

/* Icons */
.svg-sprite {
  display: none;
}

.icon {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
  flex-shrink: 0;
}

.icon-xs { width: 13px; height: 13px; }
.icon-sm { width: 14px; height: 14px; }
.icon-lg { width: 20px; height: 20px; }
.icon-xl { width: 24px; height: 24px; }
.action-icon { width: 17px; height: 17px; }

.icon-fill {
  fill: currentColor;
  stroke: none;
}

.ico-on { display: none; }
.active .ico-off { display: none; }
.active .ico-on { display: inline; }

/* Utilities */
.num { font-variant-numeric: tabular-nums; }
.hide, [hidden] { display: none !important; }

.vhide,
.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;
}

/* Page Stage & Containers */
.page-stage {
  flex: 1 0 auto;
  width: 100%;
}

.page,
.container {
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 24px;
}

.page {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding-bottom: 64px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.divider {
  height: 1px;
  background: var(--border);
  width: 100%;
}

/* Section Headers */
.section {
  scroll-margin-top: calc(var(--nav-h) + 16px);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 0 2px;
}

.section-title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-index {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-tertiary);
  font-variant-numeric: tabular-nums;
}

.section-note {
  font-size: 12.5px;
  color: var(--text-tertiary);
}

/* Global Footer */
.site-footer {
  flex-shrink: 0;
  margin-top: 48px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.footer-inner {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-secondary);
}

.footer-brand strong {
  color: var(--text);
  font-weight: 600;
}

.footer-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links a {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.15s ease;
}

.footer-links a:hover {
  color: var(--text);
}

@media (max-width: 820px) {
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .page,
  .container,
  .footer-inner {
    padding-left: 16px;
    padding-right: 16px;
  }
}
