/* ============================================================
   BASE — Reset, typography, Google Fonts import
   ============================================================ */

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

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

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

body {
  font-family: var(--font-body);
  font-size: var(--size-base);
  font-weight: var(--weight-regular);
  line-height: var(--leading-normal);
  color: var(--color-body);
  background-color: var(--color-bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  color: var(--color-heading);
}

h1, h2, h3 {
  letter-spacing: -0.02em;
}

h1 em, h2 em, h3 em {
  font-style: normal;
  color: var(--color-accent);
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
}

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

p {
  color: var(--color-body);
  line-height: var(--leading-relaxed);
}

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

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

a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

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

ul, ol {
  list-style: none;
}

button {
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
  background: none;
}

input, textarea, select {
  font-family: var(--font-body);
}

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

/* ---------- Scrollbar (Webkit) ---------- */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-void);
}
::-webkit-scrollbar-thumb {
  background: var(--color-accent);
  border-radius: var(--radius-full);
}

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

/* ---------- Responsive typography ---------- */
@media (max-width: 980px) {
  h1 { font-size: var(--size-4xl); }
  h2 { font-size: var(--size-3xl); }
}

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

@media (max-width: 479px) {
  h1 { font-size: var(--size-2xl); }
  h2 { font-size: var(--size-xl); }
}
