/* =========================================================
   IAPIPS — Hero "Royal Violet"
   Escenario de diseño 1672×941, escalado con s = min(vw/1672, vh/941)
   ========================================================= */

/* ---------- NAV ---------- */
.nav__inner {
  max-width: 1480px; margin: 0 auto; padding: 0 var(--gutter);
  height: 76px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1.5rem;
}
.nav .logo svg { border-color: rgba(160, 32, 255, .45); stroke: #b46cff; box-shadow: 0 0 18px rgba(147, 18, 255, .35); }
.nav__links {
  display: none; margin: 0; gap: 2px; padding: 4px;
  border: 1px solid rgba(255,255,255,.08); border-radius: 999px;
  background: rgba(255,255,255,.025); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  font-size: .875rem; color: var(--muted);
}
.nav__links a { padding: .5rem 1.05rem; border-radius: 999px; transition: color .3s, background .3s; }
.nav__links a::after { content: none; }
.nav__links a:hover { color: var(--ink); }
.nav__links a.is-active { background: #16131c; color: var(--ink); box-shadow: inset 0 1px 0 rgba(255,255,255,.06); }
.nav__cta { justify-self: end; }
.nav__burger { justify-self: end; grid-column: 3; }
@media (min-width: 900px) { .nav__links { display: flex; } }
@media (max-width: 899px) {
  .nav__inner { grid-template-columns: 1fr auto; }
  .nav__burger { grid-column: 2; }
  .nav.is-open .nav__links { border-radius: 0; border: 0; border-bottom: 1px solid var(--line); padding: 1.5rem var(--gutter) 2rem; gap: .25rem; }
  .nav.is-open .nav__links a { padding: .8rem 0; }
  .nav.is-open .nav__links a.is-active { background: none; box-shadow: none; }
}

/* ---------- BUTTONS (prompt palette) ---------- */
.btn--gold {
  background: linear-gradient(180deg, #a020ff, #7a1cf8); color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 0 0 1px rgba(170, 80, 255, .35), 0 12px 34px -12px rgba(147, 18, 255, .85);
}
.btn--gold:hover {
  filter: brightness(1.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 0 0 1px rgba(196, 140, 255, .6), 0 0 42px rgba(160, 32, 255, .65), 0 16px 40px -12px rgba(147, 18, 255, .9);
}
.btn--dark { background: #0f0d13; color: var(--ink); border: 1px solid rgba(255,255,255,.1); box-shadow: inset 0 1px 0 rgba(255,255,255,.05); }
.btn--dark:hover { border-color: rgba(180, 108, 255, .55); box-shadow: 0 0 30px rgba(147, 18, 255, .35); transform: translateY(-2px); }

/* ---------- HERO ---------- */
.hx { position: relative; height: 100vh; height: 100svh; min-height: 620px; overflow: hidden; background: #000; isolation: isolate; }
.hx__stars { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hx::after { /* funde la base del panel con la siguiente sección */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 120px; z-index: 3; pointer-events: none;
  background: linear-gradient(transparent, #000);
}
.hx__stage {
  --s: 1;
  position: absolute; left: 50%; top: 50%; width: 1672px; height: 941px; z-index: 1;
  transform: translate(-50%, -50%) scale(var(--s)); transform-origin: 50% 50%;
}
.hx__sky { position: absolute; left: 0; top: 0; width: 1672px; height: 717px; pointer-events: none; }
.hx__rim, .hx__video { position: absolute; inset: 0; width: 100%; height: 100%; }
.hx__rim { transition: opacity .8s ease; }
.hx__video { object-fit: cover; mix-blend-mode: screen; opacity: 0; transition: opacity .8s ease; }
.hx.is-video .hx__video { opacity: 1; }
.hx.is-video .hx__rim { opacity: 0; }

.hx__copy { position: absolute; left: 0; right: 0; top: 226px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.hx__title {
  font-family: var(--serif); font-weight: 700; font-size: 84px; line-height: 1.02; letter-spacing: -0.04em; color: #f7f7f8;
}
.hx__line { display: block; overflow: hidden; padding: 0 .04em .07em; }
.hx__line > span { display: inline-block; }
.vgrad {
  background: linear-gradient(100deg, #e2c2ff 0%, #b45bff 38%, #9312ff 70%, #c77dff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 24px rgba(147, 18, 255, .45));
}
.hx__lede { margin-top: 24px; max-width: 900px; font-size: 18px; line-height: 1.6; color: var(--muted); font-weight: 400; }
.hx__ctas { margin-top: 34px; display: flex; gap: 14px; justify-content: center; }
.hx__ctas .btn--lg { --h: 54px; padding-inline: 1.9rem; font-size: 15px; }

.hx__dashglow { position: absolute; left: 234px; top: 560px; width: 1204px; height: 120px; mix-blend-mode: screen; pointer-events: none; opacity: .9; }

/* ---------- DASHBOARD ---------- */
.dash {
  position: absolute; left: 234px; top: 651px; width: 1204px; height: 640px;
  display: grid; grid-template-columns: 228px 1fr;
  border-radius: 14px; overflow: hidden;
  background: linear-gradient(180deg, rgba(22, 14, 36, .9), rgba(8, 6, 13, .96) 40%);
  border: 1px solid rgba(160, 32, 255, .38);
  box-shadow: 0 -30px 90px -30px rgba(147, 18, 255, .55), inset 0 1px 0 rgba(255,255,255,.06);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  font-size: 13px; color: var(--ink); text-align: left;
}
.dash::before { /* línea de luz superior */
  content: ""; position: absolute; top: -1px; left: 8%; right: 8%; height: 1.5px; z-index: 2;
  background: linear-gradient(90deg, transparent, #9312ff 18%, #e9d4ff 50%, #9312ff 82%, transparent);
  box-shadow: 0 0 14px 2px rgba(160, 32, 255, .8), 0 0 40px 6px rgba(147, 18, 255, .35);
}
.dash svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.dash__side { padding: 18px 14px; border-right: 1px solid rgba(255,255,255,.06); display: flex; flex-direction: column; gap: 14px; background: rgba(255,255,255,.012); }
.dash__brand { display: flex; align-items: center; gap: 9px; font-weight: 600; letter-spacing: .08em; font-size: 13px; padding: 2px 6px; }
.dash__mark { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; background: linear-gradient(180deg, #a020ff, #7a1cf8); box-shadow: 0 0 16px rgba(147,18,255,.6); }
.dash__mark svg { width: 15px; stroke: #fff; stroke-width: 3; }
.dash__gear { width: 15px; margin-left: auto; color: var(--muted); }
.dash__search { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 9px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.06); color: var(--dim); }
.dash__search svg { width: 14px; }
.dash__nav { display: grid; gap: 2px; }
.dash__nav span { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; color: var(--muted); }
.dash__nav span svg { width: 15px; }
.dash__nav .is-on { background: linear-gradient(180deg, rgba(160, 32, 255, .28), rgba(122, 28, 248, .18)); color: #fff; box-shadow: inset 0 0 0 1px rgba(180, 108, 255, .35); }
.dash__nav--2 { padding-top: 12px; border-top: 1px solid rgba(255,255,255,.06); }
.dash__promo { margin-top: 4px; padding: 14px; border-radius: 12px; background: radial-gradient(120% 100% at 0% 0%, rgba(160, 32, 255, .35), rgba(160, 32, 255, .06)); border: 1px solid rgba(180, 108, 255, .3); }
.dash__promo b { font-size: 13px; }
.dash__promo p { color: var(--muted); font-size: 11.5px; line-height: 1.45; margin: 4px 0 10px; }
.dash__upgrade { display: inline-block; padding: 5px 12px; border-radius: 99px; font-size: 11.5px; font-weight: 500; background: linear-gradient(180deg, #a020ff, #7a1cf8); color: #fff; }

.dash__main { padding: 0 20px 20px; display: flex; flex-direction: column; min-width: 0; }
.dash__top { height: 56px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(255,255,255,.06); margin: 0 -20px 18px; padding: 0 20px; }
.dash__crumb { color: var(--muted); } .dash__crumb i { font-style: normal; margin: 0 6px; color: var(--dim); }
.dash__icons { display: flex; align-items: center; gap: 14px; color: var(--muted); }
.dash__icons > svg { width: 16px; }
.dash__user { display: flex; align-items: center; gap: 9px; padding-left: 14px; border-left: 1px solid rgba(255,255,255,.08); }
.dash__user i { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 11px; font-weight: 600; color: #fff; background: linear-gradient(135deg, #a020ff, #3b0b7a); }
.dash__user span { display: grid; line-height: 1.25; } .dash__user b { color: var(--ink); font-weight: 500; font-size: 12.5px; } .dash__user small { font-size: 11px; color: var(--dim); font-family: var(--mono); }

.dash__grid { display: grid; grid-template-columns: 1fr 330px; gap: 16px; min-height: 0; }
.dash__stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-content: start; }
.stat2, .dash__chart, .dash__report { border: 1px solid rgba(255,255,255,.07); border-radius: 12px; background: rgba(255,255,255,.02); padding: 14px 16px; }
.stat2 p { color: var(--muted); font-size: 12px; } .stat2 p small { color: var(--dim); }
.stat2 > div { display: flex; align-items: baseline; gap: 10px; margin-top: 6px; }
.stat2 b { font-family: var(--serif); font-weight: 600; font-size: 30px; letter-spacing: -.03em; }
.up, .dn { font-style: normal; font-size: 11px; font-weight: 500; padding: 2px 7px; border-radius: 99px; }
.dash .up { color: #45b558; background: rgba(69, 181, 88, .12); }
.dash .dn { color: #f03b2a; background: rgba(240, 59, 42, .12); }
.dash__chart { grid-column: 1 / -1; }
.dash__charthead { display: flex; justify-content: space-between; align-items: center; }
.dash__charthead p { font-size: 12.5px; font-weight: 500; }
.dash__charthead span { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.dash__chart svg { width: 100%; height: 150px; margin-top: 10px; overflow: visible; }
.dash__months { display: flex; justify-content: space-between; color: var(--dim); font-size: 11px; margin-top: 6px; }
.dash__rhead { display: grid; gap: 2px; } .dash__rhead b { font-weight: 500; font-size: 13px; } .dash__rhead span { color: var(--muted); font-size: 11.5px; }
.dash__range { margin: 12px 0 6px; font-family: var(--mono); font-size: 10.5px; color: #c58bff; padding: 6px 9px; border-radius: 8px; background: rgba(160, 32, 255, .1); border: 1px solid rgba(160, 32, 255, .25); }
.dash__report ul { display: grid; }
.dash__report li { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,.05); }
.dash__report li span { color: var(--muted); } .dash__report li b { font-weight: 500; font-family: var(--mono); font-size: 12px; }
.dash__apps { margin-top: 10px; color: var(--dim); font-size: 11.5px; } .dash__apps b { color: var(--muted); font-weight: 500; }

/* ---------- ENTRADA (una sola línea de tiempo) ---------- */
@keyframes hxNav { from { opacity: 0; transform: translateY(-18px); } }
@keyframes hxWipe { from { transform: translateY(105%); } }
@keyframes hxFade { from { opacity: 0; transform: translateY(16px); } }
@keyframes hxRise { from { opacity: 0; transform: translateY(140px); } }
@keyframes hxGlow { from { opacity: 0; } }
.hx-anim:not(.hx-go) .nav, .hx-anim:not(.hx-go) .hx__lede, .hx-anim:not(.hx-go) .hx__ctas,
.hx-anim:not(.hx-go) .dash, .hx-anim:not(.hx-go) .hx__dashglow { opacity: 0; }
.hx-anim:not(.hx-go) .hx__line > span { transform: translateY(105%); }
.hx-go .nav { animation: hxNav .9s var(--ease) .1s both; }
.hx-go .hx__line > span { animation: hxWipe 1.1s cubic-bezier(.2,.8,.2,1) both; }
.hx-go .hx__line:nth-child(1) > span { animation-delay: .3s; }
.hx-go .hx__line:nth-child(2) > span { animation-delay: .45s; }
.hx-go .hx__lede { animation: hxFade 1s var(--ease) .8s both; }
.hx-go .hx__ctas { animation: hxFade 1s var(--ease) .95s both; }
.hx-go .dash { animation: hxRise 1.4s cubic-bezier(.16,.84,.24,1) 1.05s both; }
.hx-go .hx__dashglow { animation: hxGlow 1.4s ease 1.6s both; }
.hx-go .dash__side { animation: hxFade .9s var(--ease) 1.55s both; }
.hx-go .dash__top { animation: hxFade .9s var(--ease) 1.65s both; }
.hx-go .stat2:nth-child(1) { animation: hxFade .9s var(--ease) 1.75s both; }
.hx-go .stat2:nth-child(2) { animation: hxFade .9s var(--ease) 1.83s both; }
.hx-go .dash__chart { animation: hxFade .9s var(--ease) 1.92s both; }
.hx-go .dash__report { animation: hxFade .9s var(--ease) 2.02s both; }

/* ---------- TELÉFONOS / VERTICAL ---------- */
@media (max-width: 899px), (orientation: portrait) {
  .hx { height: auto; min-height: 0; padding-bottom: 40px; }
  .hx::after { height: 80px; }
  .hx__stage { position: relative; left: auto; top: auto; width: 100%; height: auto; transform: none; }
  .hx__sky { width: 190vw; height: calc(190vw * 717 / 1672); left: 50%; transform: translateX(-50%); top: 44px; }
  .hx__video { display: none; }
  .hx__copy { position: relative; top: auto; padding: calc(30vw + 96px) var(--gutter) 0; }
  .hx__title { font-size: clamp(2.2rem, 9.4vw, 4.2rem); }
  .hx__title .vgrad { display: block; }
  .hx__lede { font-size: 1rem; margin-top: 18px; }
  .hx__ctas { flex-direction: column; width: 100%; max-width: 360px; margin-top: 28px; }
  .hx__dashglow { display: none; }
  .dash {
    position: relative; left: auto; top: auto; width: calc(100% - 2 * var(--gutter)); height: auto;
    margin: 48px auto 0; display: flex; flex-direction: column;
  }
  .dash__side { flex-direction: row; align-items: center; overflow-x: auto; gap: 8px; padding: 12px; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.06); scrollbar-width: none; }
  .dash__side::-webkit-scrollbar { display: none; }
  .dash__brand { flex: none; } .dash__gear, .dash__search, .dash__promo { display: none; }
  .dash__nav { display: flex; gap: 6px; } .dash__nav--2 { padding-top: 0; border-top: 0; }
  .dash__nav span { white-space: nowrap; border: 1px solid rgba(255,255,255,.08); border-radius: 99px; padding: 6px 12px; }
  .dash__main { padding: 0 14px 14px; }
  .dash__top { margin: 0 -14px 14px; padding: 0 14px; }
  .dash__icons > svg, .dash__user small { display: none; }
  .dash__crumb { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .dash__grid { grid-template-columns: 1fr; }
  .dash__stats { grid-template-columns: 1fr; }
}
@media (max-width: 899px) and (min-width: 600px), (orientation: portrait) and (min-width: 600px) {
  .dash__stats { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) { .hx__video { display: none; } }
