/* =====================================================================
   BASE — reset moderno + tipografía global
   ===================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  line-height: var(--lh-normal);
  color: var(--text-primary);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "ss02", "cv11";
  overflow-x: clip;
  max-width: 100vw;
}

img, svg, video, canvas, picture { max-width: 100%; height: auto; display: block; }

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}

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

button { background: none; border: 0; padding: 0; cursor: pointer; }

ul, ol { list-style: none; padding: 0; margin: 0; }
p { margin: 0; }

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--text-primary);
}

::selection {
  background: var(--accent);
  color: var(--white);
}

:focus-visible {
  outline: 2px solid var(--blue-400);
  outline-offset: 3px;
  border-radius: var(--r-xs);
}

/* === HELPERS ============================================== */

.container {
  width: 100%;
  max-width: min(var(--container-xl), 100%);
  margin-inline: auto;
  padding-inline: var(--gutter);
  box-sizing: border-box;
}
.container-lg { max-width: var(--container-lg); }
.container-md { max-width: var(--container-md); }

.section {
  padding-block: clamp(4rem, 9vw, 8rem);
  position: relative;
}
.section-tight { padding-block: clamp(3rem, 6vw, 5rem); }

/* Tipografía utilitaria */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3125rem 0.875rem 0.3125rem 0.625rem;
  font-size: 0.6875rem;
  font-weight: var(--fw-medium);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue-300);
  background: rgba(12, 141, 206, 0.09);
  border: 1px solid rgba(12, 141, 206, 0.22);
  border-radius: var(--r-pill);
  line-height: 1;
}
.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue-400);
  box-shadow: 0 0 8px 2px rgba(12, 141, 206, 0.65);
  flex-shrink: 0;
  animation: dotPulse 3s ease-in-out infinite;
}
@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 6px 1px rgba(12, 141, 206, 0.55); }
  50%       { box-shadow: 0 0 14px 3px rgba(12, 141, 206, 0.9); }
}

.display { font-size: var(--fs-display); font-weight: var(--fw-black); letter-spacing: -0.04em; }
.h1 { font-size: var(--fs-h1); }
.h2 { font-size: var(--fs-h2); }
.h3 { font-size: var(--fs-h3); }
.h4 { font-size: var(--fs-h4); font-weight: var(--fw-bold); }

.lede {
  font-size: var(--fs-body-lg);
  line-height: var(--lh-relaxed);
  color: var(--text-secondary);
  max-width: 60ch;
}

.text-gradient {
  background: var(--grad-text);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.text-accent { color: var(--accent); }
.text-muted  { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-balance{ text-wrap: balance; }
.text-pretty { text-wrap: pretty; }

.divider-line {
  height: 1px;
  background: var(--grad-line);
  width: 100%;
  border: 0;
  margin: 0;
}

/* Visually hidden */
.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;
}

/* Anchor offset para sticky header */
:target { scroll-margin-top: 100px; }

/* Animaciones de entrada */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal[data-delay="1"] { transition-delay: 80ms; }
.reveal[data-delay="2"] { transition-delay: 160ms; }
.reveal[data-delay="3"] { transition-delay: 240ms; }
.reveal[data-delay="4"] { transition-delay: 320ms; }

/* Loader/skeleton para componentes incluidos por JS */
[data-include] { min-height: 1px; }
