/* ==========================================================================
   Home / Index Styles
   File: assets/css/home.css
   ========================================================================== */

:root {
  --black: #080a0c;
  --dark-surface: #11151a;
  --paper: #fafafa;
  --white: #ffffff;
  --ink: #0d1117;
  --slate: #657585;
  --mist: #e2e8f0;

  /* Paleta Digital Way */
  --orange: #fc782d;
  --orange-bright: #ff6010;
  --orange-dim: rgba(252, 120, 45, 0.12);
  --blue: #5473f7;
  --blue-deep: #1c48d3;
  --green: #59ef3f;
  --green-deep: #6db526;

  --display: 'Poppins', system-ui, -apple-system, sans-serif;
  --max: 1180px;
  --nav-h: 76px;
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: var(--display);
  background: var(--black);
  color: var(--paper);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: var(--display);
}

::selection {
  background: var(--orange);
  color: var(--black);
}

/* Structural Layout */
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

h1,
h2,
h3 {
  letter-spacing: -0.025em;
  line-height: 1.15;
  font-weight: 800;
}

h2 {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
}

.lead {
  font-size: 1.12rem;
  color: #a0aec0;
  max-width: 640px;
}

section {
  padding: clamp(72px, 9vw, 110px) 0;
  position: relative;
}

/* Eyebrow & Animations */
.eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--slate);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  font-weight: 600;
}

.eyebrow .pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--orange);
  flex: none;
  animation: pulse 2.4s ease infinite;
}

@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(252, 120, 45, 0.5);
  }
  50% {
    box-shadow: 0 0 0 7px rgba(252, 120, 45, 0);
  }
}

.eyebrow .line {
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}

.eyebrow b {
  color: var(--orange);
  font-weight: 700;
}

/* Scroll Reveal */
.rv {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.rv.in {
  opacity: 1;
  transform: none;
}

/* Navigation */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000 !important;
  background: rgba(8, 10, 12, 0.85);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: border-color 0.3s;
}

.nav-in {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  font-size: 1.2rem;
  color: var(--white);
}

.nav-logo svg {
  height: 36px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 12px;
  align-items: center;
}

.nav-links a {
  font-size: 0.92rem;
  font-weight: 500;
  padding: 9px 16px;
  border-radius: 10px;
  color: #a0aec0;
  transition: color 0.2s, background-color 0.2s;
}

.nav-links a:hover {
  color: var(--white);
  background: var(--orange-dim);
}

/* Mayor especificidad para eliminar !important */
.nav-links a.nav-cta {
  background: var(--orange);
  color: var(--black);
  border-radius: 999px;
  padding: 10px 24px;
  font-weight: 700;
  transition: transform 0.2s, background-color 0.2s;
}

.nav-links a.nav-cta:hover {
  background: var(--orange-bright);
  color: var(--black);
  transform: translateY(-2px);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-h) + 60px) 0 60px;
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 85% 20%, rgba(252, 120, 45, 0.08), transparent 40%);
}

#dotgrid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero-in {
  position: relative;
  display: grid;
  grid-template-columns: 56px 1fr;
  width: 100%;
}

.hero-rail {
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 0;
}

.hero-rail .v {
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  color: var(--slate);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-weight: 600;
}

.hero-body {
  padding-left: clamp(20px, 4vw, 44px);
}

.hero h1 {
  font-size: clamp(2.5rem, 5.8vw, 4.8rem);
  margin: 8px 0 24px;
  font-weight: 900;
  color: var(--white);
}

.hero h1 .orange {
  color: var(--orange);
}

.hero-sub {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  max-width: 580px;
  margin-bottom: 36px;
}

.hero-sub .bar {
  width: 3px;
  background: var(--orange);
  border-radius: 2px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 32px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  transition: all 0.25s;
  border: 1.5px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: var(--orange);
  color: var(--black);
}

.btn-primary:hover {
  background: var(--orange-bright);
  box-shadow: 0 12px 30px rgba(252, 120, 45, 0.3);
  transform: translateY(-2px);
}

.btn-ghost {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.03);
  color: var(--white);
}

.btn-ghost:hover {
  border-color: var(--orange);
  background: var(--orange-dim);
  color: var(--orange);
}

/* Hero Stats */
.hero-stats {
  display: flex;
  margin-top: clamp(40px, 7vh, 70px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  flex-wrap: wrap;
}

.hstat {
  flex: 1;
  min-width: 150px;
  padding: 24px 26px 0 0;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  margin-right: 26px;
}

.hstat:last-child {
  border: none;
  margin: 0;
}

.hstat .n {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 800;
  line-height: 1;
  color: var(--white);
}

.hstat .n b {
  color: var(--orange);
}

.hstat .l {
  font-size: 0.85rem;
  color: var(--slate);
  margin-top: 8px;
  font-weight: 500;
}

/* Pain Points vs Transformation */
.pain-section {
  background: var(--dark-surface);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.pain-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 40px;
}

.pain-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  padding: 32px;
}

.pain-card.before {
  border-left: 4px solid #e53e3e;
}

.pain-card.after {
  border-left: 4px solid var(--green);
  background: rgba(89, 239, 63, 0.02);
}

.pain-card h3 {
  font-size: 1.3rem;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.pain-list li {
  list-style: none;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #cbd5e0;
  font-size: 0.95rem;
  display: flex;
  gap: 12px;
}

.pain-list li:last-child {
  border: none;
}

/* Solutions / Pillars Stack */
.stack {
  display: grid;
  gap: 30px;
  padding-bottom: 80px;
  margin-top: 50px;
}

.pcard {
  position: sticky;
  background: #141920;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 26px;
  padding: clamp(28px, 4vw, 44px);
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: clamp(20px, 3vw, 36px);
  align-items: center;
  box-shadow: 0 -14px 40px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  transform-origin: 50% 0;
}

.pcard h3 {
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  margin-bottom: 6px;
  color: var(--white);
}

.pcard .tags {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--orange);
  margin-bottom: 14px;
  font-weight: 700;
  text-transform: uppercase;
}

.pintro {
  font-size: 1.05rem;
  line-height: 1.5;
  font-weight: 600;
  color: #e2e8f0;
  margin-bottom: 16px;
}

.pbens li {
  list-style: none;
  padding: 8px 0;
  position: relative;
  color: #a0aec0;
  font-size: 0.95rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.pbens li:last-child {
  border: none;
}

.pbens li strong {
  color: var(--white);
}

.pclose {
  margin-top: 16px;
  color: var(--orange);
  font-weight: 700;
  font-size: 1rem;
}

.pviz {
  aspect-ratio: 1;
  max-width: 320px;
  width: 100%;
  margin: 0 auto;
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: grid;
  place-items: center;
  position: relative;
}

/* Contact / Form */
.cta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(34px, 5vw, 70px);
  align-items: center;
}

.form-card {
  background: var(--dark-surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: clamp(24px, 4vw, 36px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: #cbd5e0;
}

.form-control {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 14px 18px;
  color: var(--white);
  font-family: var(--display);
  font-size: 0.95rem;
  transition: border-color 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: var(--orange);
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

/* Footer */
footer {
  background: #040507;
  color: var(--slate);
  padding: 64px 0 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.foot-grid {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.foot-logo {
  font-weight: 900;
  font-size: 1.3rem;
  color: var(--white);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.foot-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.85rem;
}

/* Floating Elements */
.wa-float {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 960;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-radius: 999px;
  background: #25d366;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s;
}

.wa-float:hover {
  transform: translateY(-3px);
}

/* Media Queries */
@media (max-width: 900px) {
  .hero-in {
    grid-template-columns: 1fr;
  }

  .hero-rail {
    display: none;
  }

  .hero-body {
    padding: 0;
  }

  .pain-grid,
  .pcard,
  .cta-grid {
    grid-template-columns: 1fr;
  }

  .pviz {
    display: none;
  }

  .nav-toggle {
    z-index: 1010 !important;
  }    
  
  .nav-links {
    display: none;
  }
}

/* ==========================================================================
   Menú Hamburguesa & Navegación Responsive (Definitivo)
   ========================================================================== */

/* Botón Hamburguesa en Desktop */
.nav-toggle {
  display: none !important;
  background: transparent;
  border: none;
  outline: none;
  color: var(--white);
  cursor: pointer;
  padding: 8px;
  margin: 0;
  z-index: 1010 !important;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.nav-toggle svg,
.nav-toggle svg * {
  width: 28px;
  height: 28px;
  display: block;
  stroke: var(--white);
  pointer-events: none; /* Asegura que el toque en pantalla lo reciba el botón */
}

/* Adaptación a Pantallas Móviles (menos de 900px) */
@media (max-width: 900px) {
  .hero-in {
    grid-template-columns: 1fr;
  }

  .hero-rail,
  .pviz {
    display: none;
  }

  .hero-body {
    padding: 0;
  }

  .pain-grid,
  .pcard,
  .cta-grid {
    grid-template-columns: 1fr;
  }

  /* Hacer visible el botón hamburguesa */
  .nav-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
  }

  /* Estado OCULTO por defecto para evitar espacio/desplazamientos fantasma */
  .nav-links {
    display: none !important;
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    width: 100%;
    background: #080a0c;
    background: rgba(8, 10, 12, 0.98);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 24px;
    gap: 16px;
    z-index: 1000 !important;
    flex-direction: column;
  }

  /* Estado DESPLEGADO al hacer clic (cuando JS suma la clase .active) */
  .nav-links.active {
    display: flex !important;
  }

  .nav-links a {
    width: 100%;
    text-align: center;
    font-size: 1.1rem;
    padding: 12px;
  }
}