/* =============================================================================
   RESET & BASE - Modern, Clean Foundation
   ============================================================================= */

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  height: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--font-normal);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background: var(--bg-secondary);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-semibold);
  line-height: var(--leading-tight);
  color: var(--text-primary);
  margin: 0;
}

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

p {
  margin: 0;
  line-height: var(--leading-normal);
}

a {
  color: var(--primary-text);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-hover);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  font-size: inherit;
}

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

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: var(--text-primary);
  background: var(--bg-primary);
  border: 1px solid var(--border);
}

input::placeholder,
textarea::placeholder {
  color: var(--text-muted);
}

ul, ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Scrollbar - Subtle & Modern */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gray-400);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: var(--gray-600);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
  background: var(--gray-500);
}

/* Focus Styles - Accessibility */
:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

/* Selection */
::selection {
  background: var(--primary-light);
  color: var(--text-primary);
}

/* hidden-attribuutti voittaa luokkien display-arvot (esim. .nav-item { display: flex }) */
[hidden] {
  display: none !important;
}
