/* ══════════════════════════════════════════════════════════════
   TechMartSE — Base Reset & Typography
   ══════════════════════════════════════════════════════════════ */

@import './design-tokens.css';

/* ── Font Loading ── */
@font-face {
  font-family: 'Geist';
  src: local('Geist');
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: 'Outfit';
  src: local('Outfit');
  font-weight: 400 500 600 700;
  font-display: swap;
}

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

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-gray-700);
  background: var(--color-surface);
  overflow-x: hidden;
  min-height: 100dvh;
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--color-gray-800);
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-3xl); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

p { margin-bottom: var(--space-4); max-width: 65ch; }

a {
  color: var(--color-primary-500);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out-expo);
}
a:hover { color: var(--color-primary-600); }

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

ul, ol { list-style: none; }

/* ── Focus ── */
:focus-visible {
  outline: 2px solid var(--color-primary-500);
  outline-offset: 2px;
}

/* ── Selection ── */
::selection {
  background: var(--color-primary-200);
  color: var(--color-gray-800);
}

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

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--color-gray-50); }
::-webkit-scrollbar-thumb {
  background: var(--color-gray-300);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover { background: var(--color-gray-400); }

/* ── Utility Classes ── */
.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;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--section-x);
}

.container-narrow {
  max-width: var(--container-narrow);
}

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