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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--fuente-base);
  color: var(--color-texto-principal);
  background: var(--color-fondo-claro);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  background: var(--color-morado-profundo);
  transform-origin: top;
  animation: halcaPageIn 0.75s var(--easing) forwards;
}

@keyframes halcaPageIn {
  0% { transform: scaleY(1); }
  100% { transform: scaleY(0); }
}

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

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }

h1, h2, h3, h4 {
  font-family: var(--fuente-titulos);
  line-height: 1.04;
  letter-spacing: -0.035em;
  margin: 0 0 var(--espacio-sm);
}

p { margin: 0 0 var(--espacio-sm); color: var(--color-texto-secundario); }
button, input { font: inherit; }

.contenedor {
  width: 100%;
  max-width: var(--ancho-maximo);
  margin: 0 auto;
  padding: 0 clamp(1.1rem, 3vw, 2rem);
}

.seccion {
  position: relative;
  padding: var(--espacio-2xl) 0;
}

.seccion--oscura {
  background: var(--color-morado-profundo);
  color: var(--color-texto-invertido);
}

.seccion--oscura p { color: rgba(251, 250, 255, 0.72); }

.seccion--gris {
  background:
    radial-gradient(circle at 85% 15%, rgba(143, 125, 240, 0.11), transparent 28%),
    var(--color-lavanda-suave);
}

.encabezado-seccion {
  max-width: 760px;
  margin: 0 auto clamp(2rem, 5vw, 3.4rem);
  text-align: center;
}

.encabezado-seccion h2 { font-size: var(--texto-3xl); }

.encabezado-seccion p {
  max-width: 620px;
  margin: 0 auto;
  font-size: 1.03rem;
}

.etiqueta {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: var(--texto-xs);
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--color-morado-vivo);
  margin-bottom: 0.75rem;
}

.etiqueta::before {
  content: "";
  width: 22px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.seccion--oscura .etiqueta,
.hero .etiqueta,
.catalogo-hero .etiqueta { color: var(--color-violeta-luz); }

.boton {
  --boton-x: 0px;
  --boton-y: 0px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-height: 50px;
  padding: 0.86rem 1.5rem;
  border-radius: 999px;
  font-weight: 750;
  font-size: var(--texto-sm);
  border: 1px solid transparent;
  cursor: pointer;
  overflow: hidden;
  transform: translate(var(--boton-x), var(--boton-y));
  transition: transform 0.32s var(--easing), background 0.25s ease, border-color 0.25s ease, box-shadow 0.32s var(--easing), color 0.25s ease;
}

.boton::after {
  content: "";
  position: absolute;
  width: 70px;
  height: 160%;
  top: -30%;
  left: -90px;
  transform: rotate(22deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.26), transparent);
  transition: left .55s var(--easing);
}

.boton:hover::after { left: calc(100% + 35px); }
.boton:hover { transform: translate(var(--boton-x), calc(var(--boton-y) - 2px)); }

.boton--primario {
  background: linear-gradient(135deg, var(--color-morado-vivo), var(--color-morado));
  color: var(--color-blanco);
  box-shadow: 0 14px 35px rgba(58, 41, 142, 0.28);
}

.boton--primario:hover {
  background: linear-gradient(135deg, #6953dc, #2f207a);
  box-shadow: 0 20px 45px rgba(58, 41, 142, 0.38);
}

.boton--secundario {
  background: rgba(255,255,255,.7);
  border-color: rgba(58, 41, 142, 0.2);
  color: var(--color-morado);
  backdrop-filter: blur(12px);
}

.boton--secundario:hover {
  background: var(--color-lavanda-claro);
  border-color: rgba(58, 41, 142, .4);
}

.seccion--oscura .boton--secundario,
.hero .boton--secundario,
.catalogo-hero .boton--secundario {
  color: #fff;
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.2);
}

.boton--whatsapp {
  background: #25d366;
  color: var(--color-blanco);
  box-shadow: 0 14px 30px rgba(37, 211, 102, .2);
}

.boton--whatsapp:hover { background: #1fbd59; }

.imagen-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, var(--color-lavanda-suave), var(--color-lavanda-claro));
  color: var(--color-morado);
  font-size: var(--texto-sm);
  text-align: center;
  padding: var(--espacio-sm);
  border-radius: var(--radio-borde);
  min-height: 220px;
}

/* Apariciones al scroll */
.revelar {
  --reveal-y: 36px;
  opacity: 0;
  transform: translate3d(0, var(--reveal-y), 0) scale(.985);
  filter: blur(8px);
  transition: opacity .85s var(--easing), transform .85s var(--easing), filter .85s var(--easing);
}

.revelar[data-reveal="left"] { transform: translate3d(-42px, 0, 0); }
.revelar[data-reveal="right"] { transform: translate3d(42px, 0, 0); }
.revelar[data-reveal="scale"] { transform: scale(.94); }

.revelar--visible {
  opacity: 1;
  transform: translate3d(0,0,0) scale(1);
  filter: blur(0);
}

/* Entrada de héroes */
@keyframes entradaHero {
  0% { opacity: 0; transform: translateY(34px); filter: blur(10px); }
  100% { opacity: 1; transform: translateY(0); filter: blur(0); }
}

.hero-entrada > * {
  opacity: 0;
  animation: entradaHero .9s var(--easing) forwards;
}
.hero-entrada > *:nth-child(1) { animation-delay: .08s; }
.hero-entrada > *:nth-child(2) { animation-delay: .16s; }
.hero-entrada > *:nth-child(3) { animation-delay: .24s; }
.hero-entrada > *:nth-child(4) { animation-delay: .32s; }
.hero-entrada > *:nth-child(5) { animation-delay: .40s; }
.hero-entrada > *:nth-child(6) { animation-delay: .48s; }
.hero-entrada > *:nth-child(7) { animation-delay: .56s; }

.texto-degradado {
  background: linear-gradient(105deg, #fff 5%, #d8d1ff 48%, #8f7df0 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Fondo técnico HALCA: cuadrícula + luz morada */
.fondo-tecnico { position: relative; overflow: hidden; }
.fondo-tecnico::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .11;
  background-image:
    linear-gradient(rgba(201, 192, 255, .55) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201, 192, 255, .55) 1px, transparent 1px);
  background-size: 58px 58px;
  -webkit-mask-image: linear-gradient(rgba(0,0,0,.9), transparent 84%);
  mask-image: linear-gradient(rgba(0,0,0,.9), transparent 84%);
  pointer-events: none;
}
.fondo-tecnico::after {
  content: "";
  position: absolute;
  width: min(680px, 65vw);
  aspect-ratio: 1;
  top: -42%;
  left: -10%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(111, 84, 232, .34), rgba(58,41,142,.08) 48%, transparent 70%);
  filter: blur(10px);
  pointer-events: none;
}
.fondo-tecnico--rojo::after {
  top: auto;
  left: auto;
  right: -12%;
  bottom: -52%;
  background: radial-gradient(circle, rgba(143,125,240,.35), rgba(58,41,142,.08) 48%, transparent 70%);
}
.fondo-tecnico > .contenedor,
.fondo-tecnico > * { position: relative; z-index: 2; }

/* Barra de progreso sutil */
.halca-scroll-progress {
  position: fixed;
  left: 0;
  top: 0;
  height: 3px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, var(--color-lavanda), var(--color-morado));
  z-index: 1000;
  pointer-events: none;
}

@media (max-width: 900px) {
  .encabezado-seccion h2 { font-size: clamp(2.1rem, 9vw, 3rem); }
  .seccion { padding: 4.6rem 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  body::before { display: none; }
  .revelar { opacity: 1; transform: none; filter: none; }
  .hero-entrada > * { opacity: 1; animation: none; }
}


/* ===== V17 · SISTEMA TIPOGRÁFICO EDITORIAL HALCA ===== */
h1, h2, h3, h4 {
  font-weight: 800;
  text-wrap: balance;
}

p {
  line-height: 1.68;
}

.encabezado-seccion--editorial {
  max-width: 900px;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.encabezado-seccion--editorial .etiqueta {
  margin-bottom: 1rem;
}

.encabezado-seccion--editorial h2,
.encabezado-seccion h2 {
  letter-spacing: -.055em;
  font-weight: 830;
}

.encabezado-seccion--editorial h2 span,
.encabezado-seccion h2 span {
  color: var(--color-morado-vivo);
}

.seccion--oscura .encabezado-seccion h2 span,
.seccion--oscura .encabezado-seccion--editorial h2 span {
  color: var(--color-violeta-luz);
}

.encabezado-seccion--editorial p {
  margin-top: 1rem;
  max-width: 720px;
  font-size: clamp(.98rem, 1.3vw, 1.08rem);
  color: #777184;
}

.etiqueta {
  padding: .5rem .72rem;
  border-radius: 999px;
  background: rgba(91,69,199,.07);
  border: 1px solid rgba(91,69,199,.10);
  letter-spacing: .145em;
}

.etiqueta::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(91,69,199,.08);
}

.seccion--oscura .etiqueta {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.10);
}

@media (max-width: 640px) {
  .encabezado-seccion--editorial,
  .encabezado-seccion { text-align: left; margin-left: 0; margin-right: 0; }
  .encabezado-seccion--editorial p,
  .encabezado-seccion p { margin-left: 0; }
}
