/* =========================================================
   PROYECTO SOLARIS — Sistema visual "Plano técnico + luz solar"
   ========================================================= */

:root {
  --ink: #0B1F2A;
  --paper: #F7F5EF;
  --paper-dim: #F1EFE6;
  --line: #DEDCD1;
  --blue: #0F3E6D;
  --blue-deep: #0A2D52;
  --green: #48D448;
  --green-deep: #2FAE2F;
  --amber: #F2A93B;
  --amber-deep: #DE9426;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

h1, h2, h3, h4, h5, h6,
.font-display {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  letter-spacing: -0.01em;
}

/* Números tabulares para specs, precios y stats: alineación de dígitos */
.tabular {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

::selection {
  background: var(--green);
  color: white;
}

/* === TEXTURA DE FONDO: PLANO TÉCNICO === */
.bp-grid {
  background-image:
    linear-gradient(to right, rgba(15,62,109,0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15,62,109,0.06) 1px, transparent 1px);
  background-size: 44px 44px;
}

.bp-grid-dark {
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 44px 44px;
}

/* Máscara de desvanecido radial usada bajo la grilla para que no se vea infinita */
.bp-fade {
  mask-image: radial-gradient(ellipse at center, black 40%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 40%, transparent 75%);
}

/* === BOTONES === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.9rem 1.6rem;
  border-radius: 0.75rem;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease, background-color 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
  white-space: nowrap;
}
.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--green);
  color: white;
  box-shadow: 0 8px 20px -8px rgba(72, 212, 72, 0.55);
}
.btn-primary:hover {
  background: var(--green-deep);
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -8px rgba(72, 212, 72, 0.6);
}

.btn-outline {
  background: transparent;
  color: var(--blue);
  border: 1.5px solid var(--blue);
}
.btn-outline:hover {
  background: var(--blue);
  color: white;
  transform: translateY(-2px);
}

.btn-dark {
  background: var(--blue);
  color: white;
}
.btn-dark:hover {
  background: var(--blue-deep);
  transform: translateY(-2px);
}

/* === TARJETA "FICHA TÉCNICA" para comparar sistemas === */
.spec-card {
  position: relative;
  background: white;
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  padding: 2rem;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease, border-color 0.3s ease;
}
.spec-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px -20px rgba(15, 62, 109, 0.25);
}
.spec-card .spec-accent {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  border-radius: 1.25rem 1.25rem 0 0;
}
.spec-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0.6rem 0;
  border-bottom: 1px dashed var(--line);
  font-size: 0.83rem;
}
.spec-row:last-child { border-bottom: none; }
.spec-row .spec-label { color: #64706e; }
.spec-row .spec-value { font-weight: 600; color: var(--ink); text-align: right; }

/* === Marquesina de marcas (ticker) === */
@keyframes brandScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.animate-marquee-brands {
  display: flex;
  width: max-content;
  animation: brandScroll 22s linear infinite;
}
.animate-marquee-brands:hover {
  animation-play-state: paused;
}

/* === Micro interacciones === */
.hover-lift {
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease;
}
.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px -18px rgba(15, 62, 109, 0.28);
}
.hover-lift-sm {
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.hover-lift-sm:hover {
  transform: translateY(-2px);
}

@keyframes flowDashes {
  from { stroke-dashoffset: 40; }
  to { stroke-dashoffset: 0; }
}
.animate-energy-flow {
  stroke-dasharray: 6, 6;
  animation: flowDashes 1.2s linear infinite;
}

@keyframes subtleHop {
  0%, 82%, 100% { transform: translateY(0); }
  87% { transform: translateY(-5px); }
  92% { transform: translateY(0); }
  96% { transform: translateY(-2.5px); }
}
.animate-hop-3s {
  animation: subtleHop 3s ease-in-out infinite;
}

@keyframes sunPulse {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.15); }
}
.animate-sun-pulse {
  animation: sunPulse 2.6s ease-in-out infinite;
}

.custom-scrollbar::-webkit-scrollbar { width: 6px; }
.custom-scrollbar::-webkit-scrollbar-track { background: #f1f5f9; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: var(--green); border-radius: 4px; }

/* === SISTEMA DE ANIMACIONES POR SCROLL (PREMIUM, SUAVE Y ELEGANTE) === */
.reveal-item {
  opacity: 0;
  transform: translateY(38px);
  transition: opacity 1s cubic-bezier(0.22, 1, 0.36, 1),
              transform 1s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}
.reveal-item.is-revealed {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

.split-line-mask {
  display: block;
  overflow: hidden;
  padding-bottom: 0.1em;
}
.split-line-child {
  display: inline-block;
  transform: translateY(115%);
  opacity: 0;
  transition: transform 1.1s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform, opacity;
}
.is-revealed .split-line-child,
.split-line-mask.is-revealed .split-line-child {
  transform: translateY(0) !important;
  opacity: 1 !important;
}

.delay-100 { transition-delay: 100ms; }
.delay-150 { transition-delay: 150ms; }
.delay-200 { transition-delay: 200ms; }
.delay-250 { transition-delay: 250ms; }
.delay-300 { transition-delay: 300ms; }
.delay-400 { transition-delay: 400ms; }
.delay-500 { transition-delay: 500ms; }

.parallax-layer {
  will-change: transform;
  transition: transform 0.15s cubic-bezier(0, 0, 0.2, 1);
}

/* === Barra fija de WhatsApp para mobile (conversión) === */
#mobile-sticky-cta {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 45;
  padding: 0.65rem 0.85rem calc(0.65rem + env(safe-area-inset-bottom));
  background: rgba(247, 245, 239, 0.92);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal-item,
  .split-line-child {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .parallax-layer { transform: none !important; }
  .animate-marquee-brands, .animate-hop-3s, .animate-sun-pulse, .animate-energy-flow {
    animation: none !important;
  }
}
