/* ============================================================
   Base · reset, tipografía y utilidades
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  color: var(--color-text-primary);
  background: var(--color-background-page);
  font-family: var(--font-body);
  font-size: var(--font-size-body);
  line-height: 1.625;
  font-weight: 400;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
}

img {
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-title);
  color: var(--apph-blue-900);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 12px;
}

h1 { font-size: var(--font-size-h1); }
h2 { font-size: var(--font-size-h2); }
h3 { font-size: var(--font-size-h3); }

p {
  margin: 0 0 16px;
}

a {
  color: var(--color-link);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
  color: var(--apph-blue-900);
}

ul, ol {
  padding-left: 20px;
}

:focus-visible {
  outline: none;
  box-shadow: var(--apph-focus-ring);
  border-radius: var(--apph-radius-sm);
}

.container {
  width: 100%;
  max-width: var(--apph-content-max);
  margin: 0 auto;
  padding: 0 20px;
}

.lead {
  font-size: var(--font-size-lead);
  color: var(--color-text-secondary);
}

.section {
  padding: var(--apph-space-12) 0;
}
.section--alt {
  background: var(--color-background-subtle);
}
.section--blue {
  background: var(--color-background-info);
}
.section--dark {
  background: linear-gradient(135deg, var(--apph-blue-900), var(--apph-blue-600));
  color: #fff;
}
.section--dark h1,
.section--dark h2,
.section--dark h3 {
  color: #fff;
}

.section-head {
  max-width: 760px;
  margin-bottom: var(--apph-space-8);
}
.section-head.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
.section-head .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--apph-orange);
  font-weight: 600;
  font-size: var(--font-size-sm);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}
.section--blue .section-head h2,
.section--alt .section-head h2 {
  color: var(--apph-blue-900);
}

.text-center { text-align: center; }
.text-primary { color: var(--apph-blue-900); }
.mt-1 { margin-top: var(--apph-space-1); }
.mt-2 { margin-top: var(--apph-space-2); }
.mt-3 { margin-top: var(--apph-space-3); }
.mt-4 { margin-top: var(--apph-space-4); }
.mt-6 { margin-top: var(--apph-space-6); }
.mt-8 { margin-top: var(--apph-space-8); }
.mb-0 { margin-bottom: 0; }

/* Grids */
.grid {
  display: grid;
  gap: var(--apph-space-6);
}
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr; }

@media (min-width: 768px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* Accesibilidad */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--apph-blue-900);
  color: #fff;
  padding: 8px 16px;
  z-index: 9999;
}
.skip-link:focus {
  left: 8px;
  top: 8px;
}

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