/* IOplat - estilos de la portada (antes en linea en index.php).
   Se carga solo en / via $pageStylesHref, despues de /css/style.css. */
/* --- Nav override for dark hero --- */
.nav:not(.scrolled) { background: transparent !important; box-shadow: none !important; }
.nav:not(.scrolled) .nav__link,
.nav:not(.scrolled) .nav__dropdown-trigger { color: rgba(255,255,255,0.85) !important; }
.nav:not(.scrolled) .nav__link:hover,
.nav:not(.scrolled) .nav__dropdown-trigger:hover { color: #fff !important; }
.nav:not(.scrolled) .nav__cta { background: rgba(255,255,255,0.12) !important; color: #fff !important; border: 1px solid rgba(255,255,255,0.2) !important; }
.nav:not(.scrolled) .nav__cta:hover { background: rgba(255,255,255,0.2) !important; }
.nav:not(.scrolled) .nav__hamburger span { background: #fff !important; }

/* --- Hero base --- */
.hero-dark {
  position: relative;
  min-height: 100vh;
  background: #0f172a;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 120px 0 60px;
}

/* --- Animated gradient mesh --- */
.hero-dark__bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(15,118,110,0.3), transparent),
    radial-gradient(ellipse 60% 40% at 80% 60%, rgba(6,182,212,0.15), transparent),
    radial-gradient(ellipse 50% 50% at 20% 80%, rgba(16,185,129,0.12), transparent);
  animation: heroMesh 12s ease-in-out infinite alternate;
  z-index: 0;
}
@keyframes heroMesh {
  0%   { opacity: 1; transform: scale(1) rotate(0deg); }
  50%  { opacity: 0.8; transform: scale(1.08) rotate(1deg); }
  100% { opacity: 1; transform: scale(1.02) rotate(-0.5deg); }
}

/* --- Floating orbs --- */
.hero-dark__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.35;
  z-index: 0;
  will-change: transform;
}
.hero-dark__orb--1 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(20,184,166,0.6), transparent 70%);
  top: -10%; left: 10%;
  animation: orbFloat1 18s ease-in-out infinite;
}
.hero-dark__orb--2 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(6,182,212,0.5), transparent 70%);
  top: 30%; right: -5%;
  animation: orbFloat2 22s ease-in-out infinite;
}
.hero-dark__orb--3 {
  width: 250px; height: 250px;
  background: radial-gradient(circle, rgba(16,185,129,0.5), transparent 70%);
  bottom: 10%; left: 20%;
  animation: orbFloat3 20s ease-in-out infinite;
}
.hero-dark__orb--4 {
  width: 180px; height: 180px;
  background: radial-gradient(circle, rgba(99,102,241,0.4), transparent 70%);
  top: 15%; right: 25%;
  animation: orbFloat4 16s ease-in-out infinite;
}
.hero-dark__orb--5 {
  width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(45,212,191,0.35), transparent 70%);
  bottom: 25%; right: 15%;
  animation: orbFloat5 24s ease-in-out infinite;
}
.hero-dark__orb--6 {
  width: 160px; height: 160px;
  background: radial-gradient(circle, rgba(52,211,153,0.4), transparent 70%);
  top: 50%; left: -3%;
  animation: orbFloat6 19s ease-in-out infinite;
}

@keyframes orbFloat1 { 0%,100%{transform:translate(0,0)} 33%{transform:translate(40px,-30px)} 66%{transform:translate(-20px,40px)} }
@keyframes orbFloat2 { 0%,100%{transform:translate(0,0)} 33%{transform:translate(-50px,30px)} 66%{transform:translate(30px,-40px)} }
@keyframes orbFloat3 { 0%,100%{transform:translate(0,0)} 33%{transform:translate(30px,40px)} 66%{transform:translate(-40px,-20px)} }
@keyframes orbFloat4 { 0%,100%{transform:translate(0,0)} 33%{transform:translate(-30px,-40px)} 66%{transform:translate(40px,20px)} }
@keyframes orbFloat5 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(-35px,35px)} }
@keyframes orbFloat6 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(25px,-30px)} }

/* --- Hero content --- */
.hero-dark__content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 820px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Animated badge */
.hero-dark__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px 6px 12px;
  border-radius: 100px;
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.7);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 32px;
  animation: badgeFadeIn 0.8s ease-out both;
}
.hero-dark__badge-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #10b981;
  animation: dotPulse 2s ease-in-out infinite;
}
@keyframes dotPulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(16,185,129,0.5); }
  50%     { box-shadow: 0 0 0 6px rgba(16,185,129,0); }
}
@keyframes badgeFadeIn {
  from { opacity:0; transform:translateY(10px); }
  to   { opacity:1; transform:translateY(0); }
}

/* Main heading */
.hero-dark__title {
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 800;
  line-height: 1.08;
  color: #fff;
  letter-spacing: -0.03em;
  margin: 0 0 24px;
  animation: titleFadeIn 0.9s ease-out 0.15s both;
}
.hero-dark__title-gradient {
  background: linear-gradient(135deg, #14b8a6, #10b981, #06b6d4, #14b8a6);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 6s ease-in-out infinite;
}
@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes titleFadeIn {
  from { opacity:0; transform:translateY(20px); }
  to   { opacity:1; transform:translateY(0); }
}

/* Subtitle */
.hero-dark__sub {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: rgba(255,255,255,0.55);
  line-height: 1.65;
  max-width: 620px;
  margin: 0 auto 40px;
  animation: subFadeIn 0.9s ease-out 0.3s both;
}
@keyframes subFadeIn {
  from { opacity:0; transform:translateY(15px); }
  to   { opacity:1; transform:translateY(0); }
}

/* CTA Buttons */
.hero-dark__actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  animation: actionsFadeIn 0.9s ease-out 0.45s both;
}
@keyframes actionsFadeIn {
  from { opacity:0; transform:translateY(15px); }
  to   { opacity:1; transform:translateY(0); }
}
.hero-dark__btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: linear-gradient(135deg, #0d9488, #14b8a6);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 12px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 0 20px rgba(20,184,166,0.3), 0 4px 12px rgba(0,0,0,0.2);
  animation: glowPulse 3s ease-in-out infinite;
}
.hero-dark__btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(20,184,166,0.5), 0 8px 24px rgba(0,0,0,0.3);
}
@keyframes glowPulse {
  0%,100% { box-shadow: 0 0 20px rgba(20,184,166,0.3), 0 4px 12px rgba(0,0,0,0.2); }
  50%     { box-shadow: 0 0 35px rgba(20,184,166,0.45), 0 4px 12px rgba(0,0,0,0.2); }
}
.hero-dark__btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 12px;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.15);
  cursor: pointer;
  transition: all 0.3s ease;
}
.hero-dark__btn-outline:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.3);
  transform: translateY(-2px);
}

/* Trust text */
.hero-dark__trust {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 28px;
  color: rgba(255,255,255,0.35);
  font-size: 0.85rem;
  animation: trustFadeIn 0.9s ease-out 0.6s both;
}
.hero-dark__trust span { white-space: nowrap; }
@keyframes trustFadeIn {
  from { opacity:0; }
  to   { opacity:1; }
}

/* === Dashboard Mockup === */
.hero-dark__mockup-wrap {
  position: relative;
  z-index: 2;
  max-width: 880px;
  margin: 60px auto 0;
  perspective: 1200px;
  animation: mockupFadeIn 1.1s ease-out 0.6s both;
}
@keyframes mockupFadeIn {
  from { opacity:0; transform:translateY(40px); }
  to   { opacity:1; transform:translateY(0); }
}
.hero-dark__mockup {
  background: rgba(30,41,59,0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  overflow: hidden;
  box-shadow:
    0 25px 80px rgba(0,0,0,0.4),
    0 0 40px rgba(20,184,166,0.08);
  transform: rotateX(4deg) rotateY(-1deg);
  animation: mockupFloat 8s ease-in-out infinite;
  position: relative;
}
@keyframes mockupFloat {
  0%,100% { transform: rotateX(4deg) rotateY(-1deg) translateY(0); }
  50%     { transform: rotateX(3deg) rotateY(0.5deg) translateY(-8px); }
}

/* Sheen/reflection */
.hero-dark__mockup::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.03) 45%, rgba(255,255,255,0.06) 50%, rgba(255,255,255,0.03) 55%, transparent 60%);
  background-size: 200% 100%;
  animation: sheen 6s ease-in-out infinite;
  pointer-events: none;
  z-index: 10;
}
@keyframes sheen {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Mockup title bar */
.mockup__titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(15,23,42,0.6);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.mockup__dot {
  width: 10px; height: 10px;
  border-radius: 50%;
}
.mockup__dot--red   { background: #ef4444; }
.mockup__dot--yellow{ background: #eab308; }
.mockup__dot--green { background: #22c55e; }
.mockup__titlebar-text {
  margin-left: auto;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.3);
  font-weight: 500;
}

/* Mockup body layout */
.mockup__body {
  display: flex;
  min-height: 300px;
}

/* Mockup sidebar */
.mockup__sidebar {
  width: 180px;
  background: rgba(15,23,42,0.4);
  border-right: 1px solid rgba(255,255,255,0.06);
  padding: 16px 0;
  flex-shrink: 0;
}
.mockup__sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  color: rgba(255,255,255,0.35);
  font-size: 0.78rem;
  font-weight: 500;
  transition: all 0.2s;
}
.mockup__sidebar-item--active {
  color: #14b8a6;
  background: rgba(20,184,166,0.08);
  border-left: 2px solid #14b8a6;
}
.mockup__sidebar-icon {
  width: 16px; height: 16px;
  border-radius: 4px;
  background: rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.mockup__sidebar-item--active .mockup__sidebar-icon {
  background: rgba(20,184,166,0.25);
}

/* Mockup main area */
.mockup__main {
  flex: 1;
  padding: 20px;
}
.mockup__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.mockup__header-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}
.mockup__header-date {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.05);
  padding: 4px 12px;
  border-radius: 6px;
}

/* Stat cards grid */
.mockup__stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.mockup__stat-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 16px;
  text-align: left;
}
.mockup__stat-label {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.35);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.mockup__stat-value {
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
}
.mockup__stat-change {
  font-size: 0.7rem;
  margin-top: 6px;
  font-weight: 500;
}
.mockup__stat-change--up { color: #10b981; }
.mockup__stat-change--down { color: #ef4444; }

/* Mockup chart area */
.mockup__chart {
  margin-top: 16px;
  height: 80px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 10px;
  position: relative;
  overflow: hidden;
}
.mockup__chart-line {
  position: absolute;
  bottom: 10px;
  left: 5%;
  width: 90%;
  height: 50px;
}
.mockup__chart-line svg {
  width: 100%;
  height: 100%;
}
.mockup__chart-label {
  position: absolute;
  top: 10px;
  left: 14px;
  font-size: 0.7rem;
  color: rgba(255,255,255,0.3);
  font-weight: 500;
}

/* --- Stats bar (below hero) --- */
.stats-bar {
  background: #fff;
  position: relative;
  z-index: 3;
}
.stats-bar__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  max-width: 1000px;
  margin: 0 auto;
  padding: 48px 24px;
  text-align: center;
  gap: 24px;
}
.stats-bar__icon {
  width: 44px; height: 44px;
  margin: 0 auto 12px;
  border-radius: 12px;
  background: rgba(20,184,166,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}
/* El color lo pone `color` en el contenedor (css/style.css, bloque 20). */
.stats-bar__icon svg {
  width: 24px; height: 24px;
}
.stats-bar__number {
  font-size: 2rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}
.stats-bar__label {
  font-size: 0.9rem;
  color: #64748b;
  margin-top: 4px;
}

/* Dark-to-white transition */
.hero-dark__fade {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 120px;
  background: linear-gradient(to bottom, transparent, #fff);
  z-index: 2;
  pointer-events: none;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .hero-dark { padding: 100px 0 120px; min-height: auto; }
  .hero-dark__mockup-wrap { display: none; }
  .hero-dark__trust { flex-direction: column; align-items: center; gap: 8px; }
  .stats-bar__grid { grid-template-columns: repeat(2, 1fr); padding: 32px 24px; }
  .mockup__stats { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 769px) and (max-width: 1024px) {
  .mockup__sidebar { width: 140px; }
  .mockup__stats { grid-template-columns: repeat(2, 1fr); }
}

/* Movil: sin esferas desenfocadas animadas (coste de pintado sin valor en
   pantallas pequenas). */
@media (max-width: 768px) {
  .hero-dark__orb { display: none; }
}

.stats-bar__nota {
  margin: -24px auto 0;
  padding: 0 24px 32px;
  max-width: 1000px;
  text-align: center;
  font-size: 0.8rem;
  color: #5b6b66;
}

/* --- Importe del tablero de escritorio (index.php, .mockup__stat-importe) ---
   Con la moneda y los decimales del pais es mas largo que las otras cifras y no puede partirse en dos lineas: la
   tarjeta creceria y moveria la portada. El div conserva su altura de linea y solo el texto se reduce donde la tarjeta
   es estrecha: su ancho util baja a 88 px entre 1025 y 1199 px y es de 116 px desde 1200. El mas largo, «B/. 12,450.00»,
   cabe en los dos. */
.mockup__stat-importe { white-space: nowrap; }
@media (min-width: 1025px) { .mockup__stat-importe { font-size: 0.85rem; } }
@media (min-width: 1200px) { .mockup__stat-importe { font-size: 1.05rem; } }

/* --- Tablero compacto del telefono (index.php, .hero-movil) ---
   Solo hasta 768 px, donde se oculta el de escritorio. Sin animacion. Colores opacos sobre #1e293b para que
   cada rotulo pase de 4.5:1 sin depender de transparencias. */
.hero-movil { display: none; }
@media (max-width: 768px) {
  .hero-movil {
    display: block;
    max-width: 480px;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 14px;
    overflow: hidden;
    text-align: left;
    margin: 24px 0 0;
  }
  .hero-movil__barra {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #172033;
    border-bottom: 1px solid #334155;
  }
  .hero-movil__punto { width: 8px; height: 8px; border-radius: 50%; background: #ef4444; }
  .hero-movil__punto + .hero-movil__punto { background: #eab308; }
  .hero-movil__punto + .hero-movil__punto + .hero-movil__punto { background: #22c55e; }
  .hero-movil__url { margin-left: auto; font-size: 0.72rem; color: #a3afc2; }
  .hero-movil__cuerpo { display: grid; gap: 10px; padding: 12px 14px; }
  .hero-movil__ventas { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
  .hero-movil__ventas > div { flex: 0 0 auto; }
  .hero-movil__rotulo { display: block; font-size: 0.75rem; font-weight: 500; line-height: 1.35; color: #b4bfcf; }
  .hero-movil__cifra {
    display: block;
    margin: 2px 0;
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
  }
  .hero-movil__alza { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; font-weight: 600; color: #34d399; white-space: nowrap; }
  .hero-movil__alza svg, .hero-movil__sello svg { width: 14px; height: 14px; }
  .hero-movil__linea { flex: 1 1 auto; min-width: 56px; max-width: 132px; height: 44px; color: #2dd4bf; }
  .hero-movil__datos { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .hero-movil__datos > div { padding: 8px 10px; background: #243247; border-radius: 8px; }
  .hero-movil__datos strong { display: block; margin-top: 2px; font-size: 1.05rem; font-weight: 700; color: #fff; }
  .hero-movil__factura {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px 12px;
    padding-top: 10px;
    border-top: 1px solid #334155;
    font-size: 0.8rem;
    line-height: 1.35;
  }
  .hero-movil__num { color: #e2e8f0; white-space: nowrap; font-variant-numeric: tabular-nums; }
  .hero-movil__sello { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: #7cc4b6; white-space: nowrap; }
}
