/* =======================
   Rubiku · Horizontal Hub
   ======================= */

/* ---------- Variables ---------- */
:root {
  --bg-0: #0e1a2b;
  --bg-1: #111c30;
  --bg-2: #15233b;
  --ink: #e7ecf7;
  --muted: #a9b3c7;
  --accent: #ff3366;
  --accent-2: #ffa600;
  --border: rgba(255, 255, 255, .08);
  --shadow: 0 18px 50px rgba(0, 0, 0, .45);
  --radius: 16px;
  --radius-lg: 22px;
  --container: 1200px;
  --gutter: 20px;

  /* Header height (se usa en header y viewport) */
  --header-h: 72px;
}

/* ---------- Reset básico ---------- */
* {
  box-sizing: border-box
}

html,
body {
  height: 100%
}

body {
  margin: 0;
  font-family: "Space Grotesk", system-ui, Segoe UI, Roboto, Inter, Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1000px 600px at 70% -10%, rgba(255, 51, 102, .12), transparent 60%),
    radial-gradient(800px 500px at 10% 110%, rgba(255, 166, 0, .10), transparent 60%),
    var(--bg-0);
  overflow: hidden;
  /* bloquea scroll vertical */
}

img {
  max-width: 100%;
  height: auto;
  display: block
}

a {
  color: inherit
}

/* ---------- Utilidades ---------- */
.container {
  max-width: var(--container);
  margin-inline: auto;
  padding: 0 var(--gutter)
}

.center {
  text-align: center
}

.between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem
}

.grid {
  display: grid;
  gap: 1rem
}

.grid--3 {
  grid-template-columns: 1fr
}

@media(min-width:900px) {
  .grid--3 {
    grid-template-columns: repeat(3, 1fr)
  }
}

.mt-24 {
  margin-top: 1.5rem
}

.max-600 {
  max-width: 600px;
  margin-inline: auto
}

.link {
  color: var(--accent-2);
  text-decoration: none
}

.link:hover {
  text-decoration: underline
}

.txt-accent {
  color: var(--accent)
}

/* ==================
   Header + Navegación
   ================== */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  z-index: 40;
  background: linear-gradient(to bottom, rgba(39, 39, 39, 0.322), rgba(14, 26, 43, .45) 70%, transparent);
  backdrop-filter: blur(8px);
}

.header__bar {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Marca: solo logo (sin texto) */
.brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none
}

.brand__name {
  display: none
}

.brand__logo {
  width: 56px;
  height: 56px;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, .35));
}

@media (min-width:900px) {
  .brand__logo {
    width: 64px;
    height: 64px
  }
}

/* Menú visible en la barra */
.nav {
  display: block
}

.nav__list {
  display: flex;
  gap: .5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.nav__list::-webkit-scrollbar {
  height: 6px
}

.nav__list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, .15);
  border-radius: 8px
}

.nav__link {
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--border);
  cursor: pointer;
  padding: .5rem .8rem;
  border-radius: 999px;
  font: inherit;
  white-space: nowrap;
  transition: background .2s ease, color .2s ease, transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.nav__link:hover {
  background: rgba(255, 255, 255, .08);
  color: var(--ink);
  transform: translateY(-1px)
}

.nav__link.is-active {
  background: rgb(255, 175, 2);
  color: #000000;
  border-color: transparent;
  box-shadow: 0 8px 22px rgba(255, 166, 0, .18);
}

/* =========================
   Viewport / Track / Panels
   ========================= */
.viewport {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  /* debajo del header */
  overflow: hidden;
  z-index: 1;
}

.track {
  height: 100%;
  display: flex;
  will-change: transform;
  transition: transform .7s cubic-bezier(.2, .8, .2, 1);
}

@media (prefers-reduced-motion: reduce) {
  .track {
    transition: none
  }
}

.panel {
  position: relative;
  min-width: 100vw;
  height: 100%;
  padding-top: 32px;
  /* respiro para títulos */
  display: flex;
  align-items: center;
  justify-content: center;
}

.panel--home {
  isolation: isolate
}

.panel__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .28;
  filter: saturate(110%) contrast(110%);
}

.panel__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(11, 21, 37, .45), rgba(11, 21, 37, .8));
}

.panel__content {
  position: relative;
  z-index: 2;
  max-width: var(--container);
  padding: 0 var(--gutter);
}

/* ---------- Tipografías de secciones ---------- */
.hero__title {
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.1;
  margin: .5rem 0 0 0;
  font-weight: 800;
  text-wrap: balance;
}

.hero__subtitle {
  color: var(--muted);
  margin: .75rem 0 1.25rem 0;
  max-width: 720px
}

.hero__actions {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap
}

.section__title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin: 0
}

.lead {
  font-size: 1.1rem;
  color: var(--ink);
  opacity: .95
}

/* ======================
   Cards, KPIs, News, etc.
   ====================== */
.card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem;
  box-shadow: var(--shadow);
  transition: transform .2s ease;
}

.card:hover {
  transform: translateY(-3px)
}

.card__emoji {
  font-size: 1.6rem;
  margin-bottom: .35rem
}

.card__title {
  margin: .1rem 0 .25rem;
  font-size: 1.1rem
}

.card__desc {
  color: var(--muted)
}

.kpis {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1.25rem;
}

@media(min-width:900px) {
  .kpis {
    grid-template-columns: repeat(4, 1fr)
  }
}

.kpi {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
  box-shadow: var(--shadow);
}

.kpi__value {
  font-size: 1.8rem;
  font-weight: 800
}

.kpi__label {
  color: var(--muted)
}

.strip {
  display: flex;
  gap: 1rem;
  overflow: auto;
  padding-bottom: .5rem
}

.strip::-webkit-scrollbar {
  height: 8px
}

.strip::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, .12);
  border-radius: 8px
}

.strip__item {
  min-width: 300px;
  text-decoration: none;
  color: var(--ink)
}

.strip__img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.strip__caption {
  display: block;
  text-align: center;
  color: var(--muted);
  margin-top: .4rem
}

.news {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}

.news__meta {
  color: var(--muted);
  font-size: .85rem
}

.news__title {
  margin: .25rem 0 .35rem;
  font-size: 1.05rem
}

.news__link {
  text-decoration: none
}

.news__link:hover {
  color: var(--accent-2)
}

.news__desc {
  color: var(--muted)
}

/* ===============
   Botones (chips)
   =============== */
.button {
  --btn-bg: rgba(255, 255, 255, .08);
  --btn-ink: var(--ink);
  padding: .7rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--btn-bg);
  color: var(--btn-ink);
  text-decoration: none;
  transition: transform .2s ease, background .2s ease, color .2s ease;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}

.button:hover {
  transform: translateY(-2px)
}

.button--primary {
  --btn-bg: var(--accent-2);
  --btn-ink: #0e1a2b;
  border-color: transparent
}

.button--ghost {
  --btn-bg: transparent
}

/* =========
   FAB (CTA)
   ========= */
.fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 50;
  padding: 1rem 1.25rem;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: .2px;
  background: linear-gradient(135deg, #ff3366 0%, #ffa600 100%);
  color: #fff;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, .25);
  box-shadow: 0 10px 30px rgba(255, 51, 102, .35), 0 18px 50px rgba(0, 0, 0, .45);
  transform: translateZ(0);
  transition: transform .2s ease, filter .2s ease, box-shadow .2s ease;
}

.fab--glow {
  position: fixed;
  overflow: hidden;
  isolation: isolate
}

.fab--glow::before {
  content: "";
  position: absolute;
  inset: -30%;
  background: radial-gradient(closest-side, rgba(255, 166, 0, .55), rgba(255, 51, 102, .25), transparent 70%);
  filter: blur(18px);
  z-index: -1;
  animation: fabPulse 2.6s ease-in-out infinite;
}

.fab--glow::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-120%);
  background: linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, .75) 50%, transparent 100%);
  mix-blend-mode: screen;
  opacity: .6;
  animation: fabShine 2.8s linear infinite;
}

.fab--glow:hover {
  filter: brightness(1.05);
  box-shadow: 0 10px 35px rgba(255, 166, 0, .55), 0 22px 60px rgba(0, 0, 0, .55);
  transform: translateY(-3px)
}

@keyframes fabPulse {

  0%,
  100% {
    opacity: .7;
    transform: scale(.96)
  }

  50% {
    opacity: 1;
    transform: scale(1.04)
  }
}

@keyframes fabShine {
  0% {
    transform: translateX(-120%)
  }

  100% {
    transform: translateX(120%)
  }
}

@media (prefers-reduced-motion:reduce) {

  .fab--glow::before,
  .fab--glow::after {
    animation: none
  }
}

/* ============================
   Personajes (parallax + float)
   ============================ */
.chars {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1
}

.char {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(calc(-50% + var(--x, 0)), calc(-50% + var(--y, 0)));
  width: clamp(120px, 18vw, 280px);
  opacity: .9;
  filter: drop-shadow(0 10px 25px rgba(0, 0, 0, .45));
  animation: float 6s ease-in-out infinite alternate;
}

@keyframes float {
  from {
    transform: translate(calc(-50% + var(--x, 0)), calc(-50% + var(--y, 0))) translateY(-6px)
  }

  to {
    transform: translate(calc(-50% + var(--x, 0)), calc(-50% + var(--y, 0))) translateY(6px)
  }
}

/* =======================
   Panel “Ser parte” (steps)
   ======================= */
.steps {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr
}

@media(min-width:900px) {
  .steps {
    grid-template-columns: repeat(4, 1fr)
  }
}

.step {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  text-align: left;
}

.step__n {
  font-weight: 800;
  color: var(--accent-2);
  margin-bottom: .35rem
}

.panel--marketing .section__title {
  margin-bottom: .2rem
}

/* ============
   Noscript box
   ============ */
.noscript {
  position: fixed;
  left: 1rem;
  bottom: 1rem;
  background: #201a1a;
  color: #ffe9e9;
  padding: 1rem;
  border-radius: .75rem;
  border: 1px solid #5a2b2b;
  z-index: 60;
}

/* ==============================
   Fondo de escarcha (glitter FX)
   ============================== */
.sparkle-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .9;
  mix-blend-mode: screen;
  /* brillo sobre fondo oscuro */
}

/* ===================
   Reduced motion guard
   =================== */
@media (prefers-reduced-motion: reduce) {

  .track,
  .char {
    transition: none;
    animation: none
  }
}













/* ===== Background video (panel home) ===== */
.panel--home {
  position: relative;
  overflow: hidden;
}

.panel--home .panel__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* llena el panel recortando bordes */
  object-position: center;
  z-index: 0;
  /* detrás del scrim y del contenido */
  filter: saturate(1.05);
  /* opcional: leve punch de color */
}

.panel--home .panel__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  /* sobre el video */
  background: radial-gradient(120% 120% at 50% 20%, rgba(0, 0, 0, .25) 0%, rgba(0, 0, 0, .55) 65%, rgba(0, 0, 0, .70) 100%);
  pointer-events: none;
}

.panel--home .panel__content,
.panel--home .chars {
  position: relative;
  z-index: 2;
  /* por encima del scrim */
}

/* Respeto a usuarios con reducción de movimiento */
@media (prefers-reduced-motion: reduce) {
  .panel--home .panel__video {
    display: none;
  }
}