/* ==========================================================================
   qgate.systems — Base / Reset
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

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

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

body {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--color-bg); }
::-webkit-scrollbar-thumb {
  background: var(--color-border-light);
  border-radius: 4px;
}

/* Focus styles for accessibility */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Links */
a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-smooth);
}
a:hover { color: var(--color-cyan); }

/* Headings */
h1, h2, h3, h4, h5, h6 {
  color: var(--color-text);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
}

h1 { font-size: var(--fs-4xl); }
h2 { font-size: var(--fs-3xl); }
h3 { font-size: var(--fs-2xl); }
h4 { font-size: var(--fs-xl); }

@media (max-width: 768px) {
  h1 { font-size: var(--fs-3xl); }
  h2 { font-size: var(--fs-2xl); }
  h3 { font-size: var(--fs-xl); }
}

p { margin-bottom: var(--sp-4); }
p:last-child { margin-bottom: 0; }

strong { font-weight: var(--fw-semibold); }

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

ul, ol { list-style: none; }

code, pre {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
}

pre {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--sp-6);
  overflow-x: auto;
  line-height: var(--lh-loose);
}

code {
  background: var(--color-bg-alt);
  padding: 0.15em 0.4em;
  border-radius: var(--radius-sm);
}

pre code {
  background: none;
  padding: 0;
}

/* Skip-to-content for a11y */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--sp-4);
  background: var(--color-accent);
  color: var(--color-bg);
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--radius-sm);
  z-index: 10000;
  font-weight: var(--fw-medium);
}
.skip-link:focus {
  top: var(--sp-4);
}

/* Selection */
::selection {
  background: var(--color-accent);
  color: var(--color-bg);
}
