/* ============================================================
   URBEMAX V4 — BASE
   Reset, variables, tipografía, modo AMOLED, accesibilidad
   ============================================================ */

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

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

html[data-font="small"] { font-size: 14px; }
html[data-font="normal"] { font-size: 16px; }
html[data-font="large"] { font-size: 18px; }

body {
  margin: 0;
  font-family: Inter, "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ub-ink);
  background: var(--ub-paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background var(--ub-transition), color var(--ub-transition);
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--ub-transition);
}

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

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

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

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

/* ============================================================
   VARIABLES — MODO DÍA
   ============================================================ */

:root {
  /* Marca púrpura */
  --ub-purple-950: #19002e;
  --ub-purple-900: #2a054f;
  --ub-purple-800: #430879;
  --ub-purple-700: #5c0d9b;
  --ub-purple-600: #7422b5;
  --ub-purple-500: #9b2cdb;
  --ub-purple-100: #f0e9f7;
  --ub-purple-50:  #faf7fd;

  /* Marca naranja */
  --ub-orange-700: #e94c0b;
  --ub-orange-600: #f96d16;
  --ub-orange-500: #ff851c;
  --ub-orange-400: #ffac4d;
  --ub-orange-200: #ffd4b4;

  /* Neutros */
  --ub-navy:  #071d50;
  --ub-ink:   #102242;
  --ub-slate: #5d6b7e;
  --ub-line:  #e1e6ee;
  --ub-paper: #f6f8fc;
  --ub-white: #ffffff;

  /* Semánticos */
  --ub-success: #27744f;
  --ub-warning: #c97800;
  --ub-danger:  #ba3e3e;
  --ub-info:    #1a6dd4;

  /* Sistema */
  --ub-radius-sm: 8px;
  --ub-radius:    16px;
  --ub-radius-lg: 22px;
  --ub-shadow-sm: 0 4px 12px rgba(48, 6, 87, 0.06);
  --ub-shadow:    0 20px 50px rgba(48, 6, 87, 0.15);
  --ub-shadow-lg: 0 30px 80px rgba(48, 6, 87, 0.22);

  --ub-max: 1240px;
  --ub-gutter: 22px;

  --ub-transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================
   MODO AMOLED
   ============================================================ */

[data-theme="dark"] {
  --ub-purple-950: #050010;
  --ub-purple-900: #1a0033;
  --ub-purple-800: #9b2cdb;
  --ub-purple-700: #b85ff0;
  --ub-purple-600: #d38cff;
  --ub-purple-500: #e0a8ff;
  --ub-purple-100: rgba(155, 44, 219, 0.15);
  --ub-purple-50:  #0d0518;

  --ub-orange-700: #ff851c;
  --ub-orange-600: #ff9a3c;
  --ub-orange-500: #ffa34d;
  --ub-orange-400: #ffc780;
  --ub-orange-200: #ffe0b8;

  --ub-navy:  #ffffff;
  --ub-ink:   #e8e8ec;
  --ub-slate: #a5a5b5;
  --ub-line:  rgba(255, 255, 255, 0.08);
  --ub-paper: #000000;
  --ub-white: #0a0a0f;

  --ub-shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.4);
  --ub-shadow:    0 20px 50px rgba(0, 0, 0, 0.6);
  --ub-shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.8);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ub-purple-950: #050010;
    --ub-purple-900: #1a0033;
    --ub-purple-800: #9b2cdb;
    --ub-purple-700: #b85ff0;
    --ub-purple-600: #d38cff;
    --ub-purple-100: rgba(155, 44, 219, 0.15);
    --ub-purple-50:  #0d0518;
    --ub-orange-700: #ff851c;
    --ub-orange-600: #ff9a3c;
    --ub-orange-500: #ffa34d;
    --ub-orange-400: #ffc780;
    --ub-orange-200: #ffe0b8;
    --ub-navy:  #ffffff;
    --ub-ink:   #e8e8ec;
    --ub-slate: #a5a5b5;
    --ub-line:  rgba(255, 255, 255, 0.08);
    --ub-paper: #000000;
    --ub-white: #0a0a0f;
  }
}

/* Alto contraste */
[data-high-contrast="true"] {
  --ub-line: #000;
}

[data-theme="dark"][data-high-contrast="true"] {
  --ub-line: #fff;
  --ub-ink: #ffffff;
  --ub-slate: #e0e0e0;
  --ub-paper: #000;
  --ub-white: #111;
}

/* ============================================================
   TIPOGRAFÍA FLUIDA
   ============================================================ */

h1 {
  font-size: clamp(2.5rem, 6.4vw, 5.75rem);
  line-height: 0.93;
  letter-spacing: -0.04em;
  font-weight: 900;
}

h2 {
  font-size: clamp(2rem, 4.5vw, 3.65rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  font-weight: 900;
}

h3 {
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 800;
}

h4 {
  font-size: clamp(1.1rem, 1.5vw, 1.25rem);
  line-height: 1.2;
  font-weight: 800;
}

.ub-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  font-weight: 900;
  color: var(--ub-orange-400);
}

.ub-eyebrow::before {
  content: "";
  width: 25px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--ub-purple-800), var(--ub-orange-500));
}

.ub-eyebrow--dark { color: var(--ub-purple-700); }
[data-theme="dark"] .ub-eyebrow--dark { color: var(--ub-orange-400); }

.ub-lead {
  color: var(--ub-slate);
  font-size: clamp(1.02rem, 1.3vw, 1.15rem);
  max-width: 640px;
}

/* ============================================================
   ACCESIBILIDAD
   ============================================================ */

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

@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;
  }
}

.ub-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Imágenes en modo oscuro */
[data-theme="dark"] img:not([src*=".svg"]) {
  filter: brightness(0.95);
}