/* ==========================================================================
   Rodolfo Auto Import — base.css
   Reset, tokens de diseño, tipografía y utilidades.
   ========================================================================== */

:root {
  /* Superficies (dark theme) */
  --bg-900: #0b0a0c;
  --bg-800: #121113;   /* negro de marca */
  --bg-700: #1a191c;
  --bg-600: #232126;
  --bg-500: #2e2b32;

  /* Marca */
  --red: #ca060d;
  --red-600: #e01018;
  --red-hi: #ff3b41;   /* rojo aclarado: uso exclusivo para texto de acento */
  --red-deep: #750208; /* rojo profundo: solo como final de degradado */
  --red-glow: rgba(202, 6, 13, .38);

  /* Degradados de marca.
     `--grad-red` es para FONDOS (el extremo #750208 es muy oscuro y da buen
     contraste con texto blanco). `--grad-red-hi` es para TEXTO recortado:
     se queda en el tramo claro para no perder legibilidad sobre el negro. */
  --grad-red: linear-gradient(135deg, var(--red) 0%, var(--red-deep) 100%);
  --grad-red-hi: linear-gradient(96deg, var(--red-hi) 0%, var(--red) 62%, #a8050b 100%);

  /* Texto */
  --txt: #f5f5f6;
  --txt-2: #a3a1a8;
  --txt-3: #6f6d75;

  /* Líneas y sombras */
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .14);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, .4);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, .45);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, .55);

  /* Tipografía */
  --font-title: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Métricas */
  --header-h: 104px;
  --topbar-h: 38px;
  --radius: 14px;
  --radius-sm: 8px;
  --radius-lg: 22px;
  --container: 1280px;
  --gutter: clamp(1.15rem, 4vw, 2.5rem);
  --ease: cubic-bezier(.22, .61, .36, 1);
}

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

* { margin: 0; }

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

body {
  background: var(--bg-900);
  color: var(--txt);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Lenis toma el control del scroll; se desactiva el nativo para evitar saltos */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

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

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

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

a { color: inherit; text-decoration: none; }

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

iframe { border: 0; }

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

::selection {
  background: var(--red);
  color: #fff;
}

/* Scrollbar */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--bg-800); }
::-webkit-scrollbar-thumb {
  background: var(--bg-500);
  border-radius: 99px;
  border: 3px solid var(--bg-800);
}
::-webkit-scrollbar-thumb:hover { background: var(--red); }

/* --------------------------------------------------------- tipografía -- */
h1, h2, h3, h4, h5 {
  font-family: var(--font-title);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: .01em;
  text-transform: uppercase;
}

h1 { font-size: clamp(2.6rem, 6.4vw, 4.9rem); font-weight: 800; }
h2 { font-size: clamp(2.05rem, 4.4vw, 3.4rem); }
h3 { font-size: clamp(1.4rem, 2.4vw, 1.85rem); }
h4 { font-size: 1.2rem; }

p { text-wrap: pretty; }

strong { font-weight: 600; color: var(--txt); }

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

.section {
  position: relative;
  padding-block: clamp(4rem, 9vw, 7.5rem);
}

.section--tight { padding-block: clamp(3rem, 6vw, 5rem); }

.section--alt { background: var(--bg-800); }

.section__head {
  max-width: 660px;
  margin-bottom: clamp(2.2rem, 4vw, 3.5rem);
}

.section__head--center {
  margin-inline: auto;
  text-align: center;
}

/* Etiqueta superior de sección: barra roja inclinada + texto */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--font-title);
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--red-hi);
  margin-bottom: .85rem;
}

.eyebrow::before {
  content: '';
  width: 30px;
  height: 3px;
  background: linear-gradient(90deg, var(--red-deep), var(--red));
  transform: skewX(-24deg);
  flex: none;
}

.section__head--center .eyebrow::after {
  content: '';
  width: 30px;
  height: 3px;
  background: linear-gradient(90deg, var(--red), var(--red-deep));
  transform: skewX(-24deg);
  flex: none;
}

.section__title { margin-bottom: 1rem; }

.section__text {
  color: var(--txt-2);
  font-size: 1.03rem;
  max-width: 58ch;
}

.section__head--center .section__text { margin-inline: auto; }

/* Palabra destacada dentro de un título.
   El color plano es el valor base; el degradado recortado solo se aplica
   donde el navegador lo soporta, para no dejar el texto invisible. */
.hl { color: var(--red-hi); }

@supports (-webkit-background-clip: text) or (background-clip: text) {
  .hl {
    background-image: var(--grad-red-hi);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

.hl-line {
  position: relative;
  white-space: nowrap;
}

.hl-line::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: .08em;
  height: .16em;
  background: var(--red);
  transform: skewX(-18deg);
  opacity: .85;
  z-index: -1;
}

.text-center { text-align: center; }

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

/* Fondo con retícula sutil, usado en secciones oscuras */
.grid-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 20%, transparent 78%);
  pointer-events: none;
}

/* Franja diagonal de marca, separador entre secciones */
.stripes {
  height: 6px;
  background: repeating-linear-gradient(
    115deg,
    var(--red) 0 14px,
    var(--red-deep) 14px 20px,
    transparent 20px 34px
  );
  opacity: .55;
}

/* ------------------------------------------------- animación de entrada -- */
/* GSAP toma estos elementos; si el JS falla quedan visibles igualmente */
[data-reveal] { will-change: transform, opacity; }

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