/* ==========================================================
   Base, layout y componentes compartidos
   ========================================================== */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-md);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -.02em;
  margin: 0;
  text-wrap: balance;
}
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -100px;
  z-index: 100;
  padding: var(--space-3) var(--space-4);
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius-sm);
  text-decoration: none;
}
.skip-link:focus { top: var(--space-4); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-y); position: relative; }
.section--alt { background: var(--bg-alt); }
.section--dark {
  background: var(--dark-bg);
  color: var(--dark-text);
  --text-muted: var(--dark-muted);
  --line: var(--dark-line);
}

/* Encabezado de sección */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-5);
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
}
.section--dark .eyebrow { color: var(--green-400); }

.section-head { max-width: 46rem; margin-bottom: var(--space-8); }
.section-head h2 { font-size: var(--fs-h2); }
.section-head p { margin-top: var(--space-5); font-size: var(--fs-lg); color: var(--text-muted); }

.text-accent { color: var(--accent); }
.section--dark .text-accent { color: var(--green-400); }
.muted { color: var(--text-muted); }

/* Botones */
.btn {
  --btn-bg: var(--navy);
  --btn-fg: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  min-height: 48px;
  padding: 0 var(--space-5);
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-sm);
  letter-spacing: .01em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease);
}
.btn svg { width: 18px; height: 18px; transition: transform .25s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn:hover { background: var(--navy-900); }
.btn--accent { --btn-bg: var(--green); }
.btn--accent:hover { background: #056B33; }
.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--navy);
  border-color: var(--line);
}
.btn--ghost:hover { background: var(--surface); border-color: var(--navy); }
.section--dark .btn--ghost, .hero .btn--ghost-dark { --btn-fg: var(--dark-text); border-color: var(--dark-line); }
.section--dark .btn--ghost:hover { background: rgba(255,255,255,.06); border-color: var(--dark-text); }

.icon { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* Placeholder visible para contenido pendiente */
.tbd {
  display: inline-block;
  padding: 0 .4em;
  border: 1px dashed currentColor;
  border-radius: 4px;
  font-family: var(--font-display);
  font-size: .85em;
  opacity: .75;
}

/* Scroll reveal */
.js .reveal:not(.is-visible) { transform: translateY(16px); }
.reveal { transition: transform var(--dur) var(--ease); }
.reveal.is-visible { transform: none; }
.reveal[data-delay="1"] { transition-delay: .08s; }
.reveal[data-delay="2"] { transition-delay: .16s; }
.reveal[data-delay="3"] { transition-delay: .24s; }


@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .js .reveal:not(.is-visible) { transform: none; }
}
