/* /css/base.css
 *
 * Base styles, reset, and accessibility helpers.
 * Provides foundational styling for the site.
 * Applies global resets and basic typography.
 * Includes accessibility utilities.
 */

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

html {
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

body {
  min-height: 100vh;

  font-family: var(--font-sans);
  font-size: var(--text-md);
  line-height: 1.6;

  color: var(--text-main);
  background-color: var(--bg-main);

  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;

  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::-webkit-scrollbar {
  width: 0;
  height: 0;
}

html::-webkit-scrollbar {
  width: 0;
  height: 0;
}

/* Reduced motion */
@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;
  }
}

/* Headings */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  line-height: 1.25;
  color: var(--text-bright);
}

h1 {
  font-size: var(--text-2xl);
}

h2 {
  font-size: var(--text-xl);
}

h3 {
  font-size: var(--text-lg);
}

/* Text */
p {
  color: var(--text-main);
}

strong {
  font-weight: 600;
}

em {
  font-style: italic;
}

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

a:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 3px;
}

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

/* Lists */
ul,
ol {
  list-style-position: inside;
}

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

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

/* Accessibility */
.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: -40px;
  left: 1rem;

  padding: 0.5rem 1rem;
  background-color: var(--accent-primary);
  color: #fff;

  z-index: 1000;
  border-radius: var(--radius-sm);

  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 1rem;
}

/* Anchor offset for fixed header */
section[id] {
  scroll-margin-top: calc(var(--header-height) + 1rem);
}
