/* ============================================================
   TABIX PRO — Public design tokens
   Base compartida para landing, login, legales y vistas públicas
   ============================================================ */

:root {
  /* Marca */
  --brand-700: #1D4ED8;
  --brand-600: #2563EB;
  --brand-500: #3B82F6;
  --brand-400: #60A5FA;
  --accent-500: #00D4AA;
  --accent-400: #2DE0BC;

  /* Superficies */
  --bg-body: #0B1121;
  --bg-elevated: #0F172A;
  --bg-card: #111C33;
  --bg-card-soft: rgba(255, 255, 255, 0.045);
  --bg-document: #F8FAFC;
  --bg-document-soft: #F1F5F9;

  /* Texto */
  --text-main: #F1F5F9;
  --text-secondary: #CBD5E1;
  --text-muted: #94A3B8;
  --text-on-light: #0F172A;
  --text-on-light-muted: #475569;

  /* Bordes */
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --border-light: #E2E8F0;

  /* Gradientes */
  --gradient-brand: linear-gradient(135deg, #2563EB 0%, #00D4AA 120%);
  --gradient-text: linear-gradient(100deg, #60A5FA 0%, #00D4AA 100%);
  --gradient-cta: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);

  /* Sombras */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 24px 48px -12px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 8px 30px rgba(37, 99, 235, 0.35);

  /* Radios */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 999px;

  /* Tipografía */
  --font-display: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Motion */
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
  --transition-fast: 0.18s var(--ease);
  --transition-base: 0.3s var(--ease);
  --transition-slow: 0.5s var(--ease);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-main);
  background-color: var(--bg-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.p-page {
  overflow-x: clip;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 0.5em;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: var(--text-main);
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--brand-400);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-400);
}

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

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

button {
  cursor: pointer;
}

ul, ol {
  margin: 0 0 1em;
  padding-left: 1.25em;
}

::selection {
  background: rgba(0, 212, 170, 0.28);
  color: #fff;
}

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

/* ---------- Layout ---------- */
.p-container {
  width: min(1200px, calc(100% - 48px));
  margin-inline: auto;
}

.p-section {
  position: relative;
  padding: 96px 0;
}

.p-section--tight {
  padding: 64px 0;
}

.p-section-head {
  max-width: 760px;
  margin: 0 auto 56px;
  text-align: center;
}

.p-section-head--left {
  margin-left: 0;
  text-align: left;
}

.p-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 7px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.p-eyebrow::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-500);
  box-shadow: 0 0 12px var(--accent-500);
}

.p-section-title {
  margin-bottom: 18px;
  font-size: clamp(2rem, 4vw, 3rem);
}

.p-section-desc {
  margin: 0;
  color: var(--text-muted);
  font-size: clamp(1rem, 1.5vw, 1.125rem);
}

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

/* ---------- Utilidades ---------- */
.p-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;
}

.p-skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--bg-body);
  font-weight: 700;
  transform: translateY(-160%);
  transition: transform var(--transition-fast);
}

.p-skip-link:focus {
  transform: translateY(0);
  color: var(--bg-body);
}

/* ---------- Reveal on scroll (progressive enhancement) ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.7s var(--ease),
    transform 0.7s var(--ease);
  transition-delay: var(--delay, 0ms);
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .js [data-reveal] {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Responsive base ---------- */
@media (max-width: 768px) {
  .p-container {
    width: min(100% - 32px, 1200px);
  }

  .p-section {
    padding: 72px 0;
  }

  .p-section-head {
    margin-bottom: 40px;
  }
}
