/* ==========================================================================
   Base Styles — Reset, Typography, Semantic Defaults
   ========================================================================== */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* ---------- Box-sizing Reset ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ---------- Root / Body ---------- */
html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--font-regular);
  line-height: var(--leading-normal);
  color: var(--color-text-primary);
  background-color: var(--color-bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Page load fade-in */
body {
  animation: pageFadeIn 0.4s var(--ease-out) both;
}

@keyframes pageFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ---------- Headings ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: var(--font-extrabold);
  line-height: var(--leading-tight);
  color: var(--color-text-primary);
  letter-spacing: -0.02em;
}

h1 { font-size: var(--text-6xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-md); }

@media (max-width: 768px) {
  h1 { font-size: var(--text-4xl); }
  h2 { font-size: var(--text-3xl); }
  h3 { font-size: var(--text-xl); }
}

@media (max-width: 480px) {
  h1 { font-size: var(--text-3xl); }
  h2 { font-size: var(--text-2xl); }
}

/* ---------- Paragraphs & Text ---------- */
p {
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
  max-width: 70ch;
}

strong { font-weight: var(--font-bold); color: var(--color-text-primary); }
em     { font-style: italic; }

small  { font-size: var(--text-sm); color: var(--color-text-muted); }

/* ---------- Links ---------- */
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);
}

/* ---------- Lists ---------- */
ul, ol { list-style: none; }

/* ---------- Images ---------- */
img, video {
  display: block;
  max-width: 100%;
  height: auto;
}

/* ---------- Buttons (base) ---------- */
button {
  font-family: var(--font-sans);
  cursor: pointer;
  border: none;
  background: none;
}

button:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

/* ---------- Inputs (base) ---------- */
input, textarea, select {
  font-family: var(--font-sans);
  font-size: var(--text-base);
}

/* ---------- Semantic Element Defaults ---------- */
main {
  min-height: 60vh;
}

section {
  padding: var(--space-3xl) 0;
}

article {
  line-height: var(--leading-relaxed);
}

hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: var(--space-2xl) 0;
}

/* ---------- Selection ---------- */
::selection {
  background-color: var(--color-accent);
  color: #fff;
}
