/* Orden de carga: base.css, components.css, landing.css. */
:root {
  --color-primary: #2b3094;
  --color-primary-dark: #20246f;
  --color-accent: #84c454;
  --color-accent-dark: #3e7023;
  --color-text: #202735;
  --color-text-muted: #596273;
  --color-background: #ffffff;
  --color-surface: #ffffff;
  --color-surface-alt: #f3f5f8;
  --color-border: #808a99;
  --color-success: #27643b;
  --color-error: #b42318;
  --font-body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-heading: "Poppins", var(--font-body);
  --container-max: 75rem;
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 4rem;
  --radius-small: 0.375rem;
  --radius-medium: 0.75rem;
  --shadow-card: 0 0.25rem 1rem rgb(32 39 53 / 8%);
  --duration-fast: 160ms;
  --duration-reveal: 600ms;
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-block-start: var(--space-2);
}

body {
  margin: 0;
  background: var(--color-background);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

h1, h2, h3, h4, h5, h6, p, figure {
  margin: 0;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.2;
  text-wrap: balance;
}

h1 { font-size: clamp(2rem, 1.4rem + 2.5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 1.3rem + 1.5vw, 2.5rem); }
h3 { font-size: 1.375rem; }
h1, h2 { font-weight: 700; }
h3 { font-weight: 600; }
h4, h5, h6 { font-size: 1.125rem; }

p + p { margin-block-start: var(--space-2); }

a {
  color: var(--color-primary);
  text-underline-offset: 0.2em;
  text-decoration-thickness: 0.08em;
}

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

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

button, input, select, textarea, fieldset { min-inline-size: 0; }
button, select { cursor: pointer; }
button:disabled, input:disabled, select:disabled, textarea:disabled {
  cursor: not-allowed;
}
textarea { resize: vertical; }
fieldset { margin: 0; }
legend { padding-inline: var(--space-1); }

img, picture, svg, video {
  display: block;
  max-inline-size: 100%;
}

img, video { block-size: auto; }

/* Conservar width/height en HTML; loading="lazy" sólo fuera del hero/LCP. */
.container {
  inline-size: min(calc(100% - var(--space-4)), var(--container-max));
  margin-inline: auto;
}

.section { padding-block: clamp(var(--space-5), 6vw, var(--space-6)); }

:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 3px;
  box-shadow: 0 0 0 3px var(--color-surface);
}

::selection {
  background: var(--color-primary);
  color: var(--color-surface);
}

[hidden] { display: none !important; }

.visually-hidden:not(:focus):not(:active) {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  inset-block-start: 0;
  inset-inline-start: var(--space-2);
  z-index: 1000;
  max-inline-size: calc(100% - var(--space-4));
  padding: var(--space-1) var(--space-2);
  background: var(--color-surface);
  color: var(--color-primary);
  font-weight: 600;
  transform: translateY(-200%);
  clip-path: inset(50%);
}

.skip-link:focus {
  inset-block-start: var(--space-2);
  transform: none;
  clip-path: none;
  outline: 3px solid var(--color-primary);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
