/* ============================================
   PIMBA AÍ — Reset & Base
   ============================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  font-family: var(--font-family);
  background: var(--bg-page);
  color: var(--text-primary);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

body.modal-open {
  overflow: hidden;
}

/* ---- Typography ---- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-display);
  font-weight: 700;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--text-primary);
}

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

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

strong, b { font-weight: 600; }

small { font-size: var(--text-sm); }

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

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

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

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

img[loading="lazy"] {
  background-color: var(--gray-100);
}

/* ---- Buttons ---- */
button {
  cursor: pointer;
  font-family: var(--font-family);
  border: none;
  background: none;
  font-size: inherit;
  color: inherit;
}

button:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ---- Inputs ---- */
input,
select,
textarea {
  font-family: var(--font-family);
  font-size: var(--text-base);
  color: var(--text-primary);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
}

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

/* ---- Misc ---- */
hr {
  border: none;
  border-top: 1px solid var(--gray-200);
  margin: var(--space-6) 0;
}

::selection {
  background: rgba(var(--brand-orange-rgb), 0.2);
  color: var(--brand-orange-dark);
}

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

::-webkit-scrollbar-track {
  background: transparent;
}

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

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

/* ---- 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-width: 0;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  padding: var(--space-3) var(--space-4);
  background: var(--color-primary);
  color: var(--text-inverse);
  border-radius: var(--radius-md);
  font-weight: 600;
  z-index: var(--z-tooltip);
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: var(--space-4);
}
