/* aprentialabs.com — paleta del kit (Aprentia-Paleta.svg):
   280659 índigo profundo · 341671 índigo · 660F56 vino · 422680 violeta · AE2D68 frambuesa · F54952 coral */
:root {
  --indigo-950: #280659;
  --indigo-900: #341671;
  --vino: #660f56;
  --violeta: #422680;
  --frambuesa: #ae2d68;
  --coral: #f54952;

  --fondo: #ffffff;
  --fondo-alt: #f6f4fb;
  --superficie: #ffffff;
  --texto: #1d1530;
  --texto-suave: #564d6b;
  --linea: #e6e1f0;
  --acento: #ae2d68;
  --acento-texto: #8e2355;
  --enlace: #422680;
  --ficha: #ffffff;
  --ficha-linea: #ece8f4;
  --sombra: 0 1px 2px rgb(40 6 89 / 6%), 0 8px 24px -12px rgb(40 6 89 / 18%);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --fondo: #120a24;
    --fondo-alt: #190f31;
    --superficie: #1e1338;
    --texto: #f3effa;
    --texto-suave: #b9b0cc;
    --linea: #33264f;
    --acento: #f2708f;
    --acento-texto: #f58aa4;
    --enlace: #c9b8ff;
    --ficha: #ffffff;
    --ficha-linea: transparent;
    --sombra: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px -12px rgb(0 0 0 / 60%);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --fondo: #120a24;
  --fondo-alt: #190f31;
  --superficie: #1e1338;
  --texto: #f3effa;
  --texto-suave: #b9b0cc;
  --linea: #33264f;
  --acento: #f2708f;
  --acento-texto: #f58aa4;
  --enlace: #c9b8ff;
  --ficha: #ffffff;
  --ficha-linea: transparent;
  --sombra: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px -12px rgb(0 0 0 / 60%);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--fondo);
  color: var(--texto);
  font: 400 1rem/1.6 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: var(--enlace); }
h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
.ancho { width: min(1160px, 100% - 2rem); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.saltar { position: absolute; left: -999px; top: 0.5rem; z-index: 10; background: var(--superficie); padding: 0.5rem 1rem; border-radius: 8px; }
.saltar:focus { left: 1rem; }
:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; border-radius: 6px; }

/* Barra */
.barra {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--fondo) 85%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--linea);
}
.barra-int { display: flex; align-items: center; gap: 1.5rem; height: 4rem; }
.marca { display: flex; align-items: center; text-decoration: none; color: var(--texto); margin-left: -1.05rem; }
.marca img { height: 78px; width: auto; margin-block: -7px; }
.logo-oscuro { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-claro { display: none; }
  :root:not([data-theme="light"]) .logo-oscuro { display: block; }
}
:root[data-theme="dark"] .logo-claro { display: none; }
:root[data-theme="dark"] .logo-oscuro { display: block; }
.barra nav { margin-left: auto; }
.barra nav ul { display: flex; gap: 1.75rem; }
.barra nav a, .idioma { color: var(--texto-suave); text-decoration: none; font-size: 0.94rem; font-weight: 500; }
.barra nav a:hover, .idioma:hover { color: var(--texto); }
.idioma { border: 1px solid var(--linea); border-radius: 999px; padding: 0.3rem 0.8rem; }
@media (max-width: 760px) {
  .barra nav { display: none; }
  .idioma { margin-left: auto; }
}

/* Héroe */
.heroe {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(60rem 30rem at 85% 10%, rgb(245 73 82 / 38%), transparent 60%),
    radial-gradient(50rem 30rem at 70% 90%, rgb(174 45 104 / 45%), transparent 65%),
    radial-gradient(40rem 30rem at 0% 0%, rgb(66 38 128 / 70%), transparent 70%),
    var(--indigo-950);
  padding: clamp(3.5rem, 8vw, 6.5rem) 0 2.5rem;
}
.heroe-int { display: grid; grid-template-columns: 1.15fr 1fr; gap: 3rem; align-items: center; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.8rem; font-weight: 600; color: #ffc2cb; margin-bottom: 1rem; }
.heroe h1 { font-size: clamp(2.3rem, 5.2vw, 3.9rem); font-weight: 700; max-width: 16ch; }
.sub { margin-top: 1.4rem; font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: #e4dcf5; max-width: 38rem; }
.ctas { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.boton {
  display: inline-flex; align-items: center; justify-content: center; min-height: 3rem; padding: 0 1.4rem;
  border-radius: 999px; font-weight: 600; text-decoration: none; transition: transform .15s ease, background .15s ease;
}
.boton:hover { transform: translateY(-1px); }
.primario { background: #fff; color: var(--indigo-950); }
.primario:hover { background: #ffe9ec; }
.secundario { color: #fff; border: 1px solid rgb(255 255 255 / 45%); }
.secundario:hover { background: rgb(255 255 255 / 10%); }
.estado { display: flex; align-items: center; gap: 0.55rem; margin-top: 1.6rem; font-size: 0.9rem; color: #d5cbea; }
.punto { width: 8px; height: 8px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 4px rgb(245 73 82 / 25%); }

.mosaico {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.85rem;
  transform: rotate(-8deg) translateX(1rem);
}
.tesela {
  aspect-ratio: 1; display: grid; place-items: center; border-radius: 22%;
  background: #fff; box-shadow: 0 10px 30px -12px rgb(0 0 0 / 55%);
  animation: flotar 7s ease-in-out infinite; animation-delay: calc(var(--i) * -0.37s);
}
.tesela:nth-child(odd) { transform: translateY(0.6rem); }
.tesela img { width: 58%; height: 58%; object-fit: contain; }
@keyframes flotar { 50% { translate: 0 -6px; } }
@media (prefers-reduced-motion: reduce) { .tesela { animation: none; } }

.cifras {
  display: grid; grid-template-columns: repeat(4, 1fr); margin: clamp(3rem, 6vw, 4.5rem) 0 0;
  border-top: 1px solid rgb(255 255 255 / 18%); padding-top: 1.5rem;
}
.cifras div { padding-right: 1rem; }
.cifras dt { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 700; letter-spacing: -0.02em; }
.cifras dd { margin: 0.2rem 0 0; color: #d5cbea; font-size: 0.92rem; }

@media (max-width: 900px) {
  .heroe-int { grid-template-columns: 1fr; }
  .mosaico { grid-template-columns: repeat(7, 1fr); transform: rotate(-6deg); margin: 0 -2rem; gap: 0.6rem; }
}
@media (max-width: 560px) {
  .mosaico { grid-template-columns: repeat(6, 1fr); }
  .tesela:nth-child(n + 19) { display: none; }
  .cifras { grid-template-columns: repeat(2, 1fr); row-gap: 1.25rem; }
}

/* Secciones */
.seccion { padding: clamp(4rem, 8vw, 6rem) 0; }
.alterna { background: var(--fondo-alt); border-block: 1px solid var(--linea); }
.seccion h2 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); font-weight: 700; }
.seccion-sub { margin-top: 0.8rem; color: var(--texto-suave); font-size: 1.1rem; max-width: 42rem; }

.ficha {
  flex: none; width: 52px; height: 52px; display: grid; place-items: center;
  background: var(--ficha); border: 1px solid var(--ficha-linea); border-radius: 14px;
}
.ficha img { width: 34px; height: 34px; object-fit: contain; }
.ficha.grande { width: 72px; height: 72px; border-radius: 20px; }
.ficha.grande img { width: 46px; height: 46px; }
.mono {
  display: grid; place-items: center; width: 100%; height: 100%; font-weight: 800; font-size: 1rem;
  color: var(--indigo-900); letter-spacing: -0.02em;
}
.funcion { font-size: 0.86rem; color: var(--texto-suave); margin-top: 0.1rem; }
.visitar { font-weight: 600; font-size: 0.92rem; text-decoration: none; color: var(--enlace); }
.visitar:hover { text-decoration: underline; text-underline-offset: 3px; }

.ws { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; margin-top: 2.5rem; }
.ws-tarjeta {
  display: flex; flex-direction: column; gap: 0.6rem; padding: 2rem;
  background: var(--superficie); border: 1px solid var(--linea); border-radius: 22px; box-shadow: var(--sombra);
}
.ws-tarjeta h3 { font-size: 1.45rem; margin-top: 0.6rem; }
.ws-tarjeta > p:not(.funcion) { color: var(--texto-suave); }
.ws-tarjeta .visitar, .etiqueta { margin-top: auto; padding-top: 0.6rem; }
.etiqueta { font-size: 0.85rem; font-weight: 600; color: var(--acento-texto); }
@media (max-width: 720px) { .ws { grid-template-columns: 1fr; } }

.principios { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; margin-top: 2.5rem; }
.principios li { border-top: 2px solid var(--linea); padding-top: 1.25rem; }
.num { font-size: 0.85rem; font-weight: 700; color: var(--acento-texto); }
.principios h3 { font-size: 1.15rem; margin: 0.5rem 0 0.5rem; }
.principios p { color: var(--texto-suave); font-size: 0.97rem; }
@media (max-width: 900px) { .principios { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .principios { grid-template-columns: 1fr; } }

.contacto {
  color: #fff; padding: clamp(3rem, 6vw, 4.5rem) 0;
  background: linear-gradient(110deg, var(--indigo-950) 0%, var(--violeta) 45%, var(--frambuesa) 100%);
}
.contacto-int { display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.contacto h2 { font-size: clamp(1.7rem, 3.2vw, 2.3rem); }
.contacto p { margin-top: 0.5rem; color: #eee6fb; }
.claro { background: #fff; color: var(--indigo-950); }
.claro:hover { background: #ffe9ec; }

.pie { border-top: 1px solid var(--linea); }
.pie-int { display: flex; align-items: center; gap: 0.85rem; padding: 1.4rem 0; font-size: 0.9rem; color: var(--texto-suave); }
.pie-int a { margin-left: auto; color: var(--texto-suave); }

/* ── Productos: explorador en órbita ── */
@property --giro { syntax: "<angle>"; inherits: true; initial-value: 0deg; }

.explorador-sec { position: relative; overflow: hidden; }
.explorador { margin-top: 2.5rem; }
/* Sin JS: lista de fichas */
.explorador:not(.js) .orbita-caja, .explorador:not(.js) .controles, .explorador:not(.js) .pestanas { display: none; }
.explorador:not(.js) .detalles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.explorador:not(.js) .detalle { padding: 1.25rem; border: 1px solid var(--linea); border-radius: 18px; background: var(--superficie); }

.explorador.js { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }

.orbita-caja { container-type: inline-size; width: min(100%, 560px); justify-self: center; }
.orbita {
  --tam: 100cqi;
  --astro: clamp(46px, 11.5cqi, 64px);
  --radio: calc(var(--tam) / 2 - var(--astro) / 2 - 6px);
  position: relative; width: var(--tam); aspect-ratio: 1;
  transition: --giro 0.9s cubic-bezier(.65, 0, .25, 1);
}
.anillo {
  position: absolute; inset: calc(var(--astro) / 2 + 6px); border-radius: 50%;
  border: 1.5px dashed color-mix(in srgb, var(--violeta) 30%, transparent);
}
.orbita::before {
  content: ""; position: absolute; inset: 18%; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--coral) 22%, transparent), color-mix(in srgb, var(--violeta) 14%, transparent) 55%, transparent 72%);
  filter: blur(6px);
}
.astro {
  position: absolute; left: 50%; top: 50%; width: var(--astro); height: var(--astro);
  margin: calc(var(--astro) / -2); padding: 0; border: 0; background: none; cursor: pointer; border-radius: 16px;
  transform:
    rotate(calc(var(--a) + var(--giro))) translateY(calc(var(--radio) * -1))
    rotate(calc(-1 * (var(--a) + var(--giro))));
  transition: opacity .4s ease, filter .4s ease;
}
.astro .ficha {
  width: 100%; height: 100%; border-radius: 28%; box-shadow: var(--sombra);
  transition: transform .35s cubic-bezier(.3, 1.4, .5, 1), box-shadow .35s ease;
}
.astro .ficha img { width: 62%; height: 62%; }
.astro:hover .ficha { transform: scale(1.1); }
.astro.otro-grupo { opacity: .38; filter: saturate(.4); }
.astro.otro-grupo:hover { opacity: .8; filter: none; }
.astro.activo .ficha {
  transform: scale(1.22);
  box-shadow: 0 0 0 3px var(--fondo), 0 0 0 6px var(--acento), 0 14px 30px -10px rgb(174 45 104 / 55%);
}

.nucleo { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.nucleo-halo {
  position: absolute; width: 34%; aspect-ratio: 1; border-radius: 50%;
  background: conic-gradient(from 0deg, var(--violeta), var(--frambuesa), var(--coral), var(--violeta));
  opacity: .9; animation: halo 12s linear infinite; filter: blur(.5px);
}
.nucleo-halo::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--fondo); }
.nucleo-ficha { position: relative; width: 22%; aspect-ratio: 1; }
.nucleo-ficha .ficha { width: 100%; height: 100%; border-radius: 28%; box-shadow: var(--sombra); }
.nucleo-ficha .ficha img { width: 64%; height: 64%; }
.nucleo-ficha .mono { font-size: 1.6rem; }
.nucleo-ficha.entra { animation: entra .55s cubic-bezier(.3, 1.4, .5, 1); }
@keyframes halo { to { rotate: 360deg; } }
@keyframes entra { from { opacity: 0; scale: .6; } }

.pestanas { display: flex; flex-wrap: wrap; gap: .5rem; }
.pestana {
  display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .9rem; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--linea); background: var(--superficie); color: var(--texto-suave); font: inherit; font-size: .9rem; font-weight: 600;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.pestana:hover { color: var(--texto); border-color: color-mix(in srgb, var(--acento) 40%, var(--linea)); }
.pestana[aria-pressed="true"] { background: var(--indigo-950); border-color: var(--indigo-950); color: #fff; }
.cuenta { font-size: .75rem; opacity: .7; }

.detalles { margin-top: 1.75rem; min-height: 15.5rem; }
.explorador.js .detalle { animation: aparece .45s ease; }
.detalle[hidden] { display: none; }
.grupo-eti { font-size: .78rem; text-transform: uppercase; letter-spacing: .14em; font-weight: 700; color: var(--acento-texto); }
.detalle-cab { display: flex; align-items: center; gap: 1rem; margin-top: .9rem; }
.detalle h3 { font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 700; }
.detalle .desc { color: var(--texto-suave); margin-top: 1rem; font-size: 1.12rem; max-width: 30rem; }
.explorador:not(.js) .detalle .desc { font-size: .97rem; }
.acento { margin-top: 1.5rem; background: var(--indigo-950); color: #fff; }
.acento:hover { background: var(--violeta); }
:root[data-theme="dark"] .acento, :root[data-theme="dark"] .pestana[aria-pressed="true"] { background: #fff; color: var(--indigo-950); border-color: #fff; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .acento, :root:not([data-theme="light"]) .pestana[aria-pressed="true"] { background: #fff; color: var(--indigo-950); border-color: #fff; }
}
@keyframes aparece { from { opacity: 0; translate: 0 8px; } }

.controles { display: flex; align-items: center; gap: .75rem; margin-top: 2rem; }
.flecha {
  width: 2.6rem; height: 2.6rem; border-radius: 50%; border: 1px solid var(--linea); background: var(--superficie);
  color: var(--texto); font-size: 1.05rem; cursor: pointer;
}
.flecha:hover { border-color: var(--acento); }
.contador { font-variant-numeric: tabular-nums; color: var(--texto-suave); font-size: .92rem; min-width: 3.6rem; text-align: center; }
.contador b { color: var(--texto); }
.progreso { flex: 1; height: 3px; border-radius: 3px; background: var(--linea); overflow: hidden; max-width: 12rem; }
.progreso span { display: block; height: 100%; width: 100%; transform-origin: left; transform: scaleX(0); background: linear-gradient(90deg, var(--violeta), var(--coral)); }
@keyframes avance { from { transform: scaleX(0); } to { transform: scaleX(1); } }

@media (max-width: 900px) {
  .explorador.js { grid-template-columns: 1fr; }
  .orbita-caja { width: min(100%, 420px); }
  .detalles { min-height: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .orbita, .astro, .astro .ficha { transition: none; }
  .nucleo-halo, .nucleo-ficha.entra, .explorador.js .detalle { animation: none; }
}
