/* assets/css/base.css */

/* ── Font import (single load point — covers every page via CSS cascade) ── */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400;1,600&family=Instrument+Serif:ital@0;1&display=swap');

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

/* ── Root ── */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

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

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  line-height: 1.15;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

p {
  line-height: 1.7;
  color: var(--text-secondary);
}

strong {
  font-weight: 600;
  color: var(--text-primary);
}

/* ── Links ── */
a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

/* ── Buttons ── */
button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
}

/* ── Lists ── */
ul,
ol {
  list-style: none;
}

/* ── Forms ── */
input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
}

/* ── HR ── */
hr {
  border: none;
  border-top: 1px solid var(--border-light);
}

/* ── Selection ── */
::selection {
  background: var(--primary);
  color: #ffffff;
}

/* ── Focus ── */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ── Scrollbar (webkit) ── */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--border-medium);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ── Screen reader only ── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ── Skip link ── */
.skip-link {
  position: absolute;
  top: -9999px;
  left: 16px;
  background: var(--primary);
  color: #ffffff;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-weight: 600;
  z-index: 10000;
}
.skip-link:focus {
  top: 16px;
}
