/* ============================================================================
   UNIKABIZ — base.css
   Reset & Foundation
   ----------------------------------------------------------------------------
   Load order on every page: style.css -> base.css -> components.css
   ============================================================================ */

/* ---------------------------------------------------------------------------
   1. FULL RESET
--------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--space-16);
}

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

body {
  min-height: 100dvh;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  transition: background-color var(--transition-smooth), color var(--transition-smooth);
}

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

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

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

ul, ol {
  list-style: none;
}

table {
  border-collapse: collapse;
  width: 100%;
}

/* ---------------------------------------------------------------------------
   2. TYPOGRAPHY FOUNDATIONS
   Cabinet Grotesk (--font-display) reserved for --text-xl (24px) and above.
   h1-h4 qualify; h5/h6 fall below the threshold and use Satoshi Bold instead.
--------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  text-wrap: balance;
  line-height: 1.15;
  color: var(--color-text);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
}

h5, h6 {
  font-family: var(--font-body);
  font-weight: 700;
}

h1 { font-size: var(--text-3xl); font-weight: 900; }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); font-weight: 700; }
h5 { font-size: var(--text-base); }
h6 { font-size: var(--text-sm); text-transform: uppercase; letter-spacing: 0.08em; }

p, li {
  text-wrap: pretty;
  max-width: 72ch;
  color: var(--color-text-muted);
}

strong, b { font-weight: 700; color: var(--color-text); }

a {
  color: inherit;
  text-decoration: none;
}

/* ---------------------------------------------------------------------------
   3. INTERACTIVE ELEMENT TRANSITIONS
--------------------------------------------------------------------------- */
a, button, input, textarea, select {
  transition: color var(--transition-interactive),
              background-color var(--transition-interactive),
              border-color var(--transition-interactive),
              box-shadow var(--transition-interactive);
}

/* ---------------------------------------------------------------------------
   4. ACCESSIBILITY — Focus states, skip link, screen-reader utility
--------------------------------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

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

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-4);
  z-index: 999;
  background: var(--color-primary);
  color: var(--color-text-inverse);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  font-weight: 700;
  transition: top var(--transition-fast);
}
.skip-link:focus {
  top: var(--space-4);
}

/* ---------------------------------------------------------------------------
   5. SELECTION
--------------------------------------------------------------------------- */
::selection {
  background: oklch(from var(--color-primary) l c h / 0.25);
  color: var(--color-text);
}

/* ---------------------------------------------------------------------------
   6. SCROLLBAR (WebKit)
--------------------------------------------------------------------------- */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: var(--color-bg);
}
::-webkit-scrollbar-thumb {
  background: var(--color-surface-dynamic);
  border-radius: var(--radius-full);
  border: 2px solid var(--color-bg);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-divider);
}
