/* ============================================================
   INTELECTA — Base & Reset
   ============================================================ */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 24px);
  background: var(--color-bg);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--color-fg);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01", "ss03";
  overflow-x: clip;
  transition: background-color 0.35s ease, color 0.35s ease;
}

.main-wrap {
  overflow-x: clip;
}

img, svg:not(.brand-wordmark) { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: transparent; color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  letter-spacing: -0.025em;
  color: var(--text-heading);
  margin: 0;
  line-height: 1.08;
}

p {
  margin: 0;
  color: var(--text-body);
  line-height: 1.65;
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
}

@media (min-width: 640px) {
  .container { padding: 0 24px; }
}

.container-narrow { max-width: var(--container-narrow); }

.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;
  left: 1rem;
  top: 0.75rem;
  z-index: 10000;
  padding: 0.65rem 1rem;
  border-radius: 0.5rem;
  background: var(--color-primary, #1e3a5f);
  color: var(--color-on-primary, #fff);
  font-weight: 700;
  text-decoration: none;
  /* Oculto hasta teclado/focus (más fiable que solo translateY) */
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  width: 1px;
  height: 1px;
  overflow: hidden;
  white-space: nowrap;
}

.skip-link:focus,
.skip-link:focus-visible {
  clip: auto;
  clip-path: none;
  width: auto;
  height: auto;
  overflow: visible;
  outline: 2px solid var(--color-accent, #f2a922);
  outline-offset: 2px;
}

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