/* ============================================================
   BOXO v2 — "RACE MODE"
   Inspirado en landonorris.com: tipografía bold, transiciones
   cinematográficas, scroll horizontal pinned, reveals laterales.
   ============================================================ */

/* activate only when body has .v2 */
body.v2 {
  background: #0B0B0F;
  color: #F5F2ED;
}

/* --- Type overrides: bigger, heavier, tighter --- */
body.v2 .hero-title,
body.v2 .section-title {
  letter-spacing: -0.035em;
  line-height: 0.92;
  font-weight: 700;
}
body.v2 .section-title {
  font-size: clamp(44px, 6.5vw, 108px);
  text-wrap: balance;
}
body.v2 .hero-title {
  font-size: clamp(48px, 7.2vw, 128px);
}

/* Nav: blacked out, thicker borders */
body.v2 .nav {
  background: rgba(11,11,15,0.72);
  backdrop-filter: blur(18px) saturate(1.2);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
body.v2 .nav .logo span,
body.v2 .nav-links a {
  color: #F5F2ED;
}
body.v2 .nav-links a:hover { color: #FF6B35; }
body.v2 .theme-toggle { color: #F5F2ED; }
body.v2 .btn-ghost {
  color: #F5F2ED;
  border-color: rgba(255,255,255,0.18);
  background: transparent;
}
body.v2 .btn-ghost:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.35);
}

/* --- HERO --- */
body.v2 .hero {
  background: #0B0B0F;
  color: #F5F2ED;
  padding-top: 0;
}
body.v2 .hero-canvas { opacity: 0.35; mix-blend-mode: screen; }
body.v2 .hero-eyebrow {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: #F5F2ED;
}
body.v2 .hero-eyebrow .dot { background: #FF6B35; }

/* Hero title: reveal-by-word from below */
body.v2 .hero-title .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(60%) rotate(3deg);
  transition: opacity 0.8s cubic-bezier(0.2, 0.9, 0.3, 1),
              transform 0.9s cubic-bezier(0.2, 0.9, 0.3, 1);
}
body.v2.v2-ready .hero-title .word {
  opacity: 1;
  transform: translateY(0) rotate(0deg);
}
body.v2 .hero-title .word:nth-child(1) { transition-delay: 0.05s; }
body.v2 .hero-title .word:nth-child(2) { transition-delay: 0.12s; }
body.v2 .hero-title .word:nth-child(3) { transition-delay: 0.19s; }
body.v2 .hero-title .word:nth-child(4) { transition-delay: 0.26s; }
body.v2 .hero-title .word:nth-child(5) { transition-delay: 0.33s; }
body.v2 .hero-title .word:nth-child(6) { transition-delay: 0.40s; }
body.v2 .hero-title .word:nth-child(7) { transition-delay: 0.47s; }
body.v2 .hero-title .word:nth-child(8) { transition-delay: 0.54s; }
body.v2 .hero-title .word:nth-child(9) { transition-delay: 0.61s; }

body.v2 .hero-title .serif,
body.v2 .serif { color: #FF6B35; font-style: italic; }

body.v2 .hero-sub { color: rgba(245,242,237,0.72); }
body.v2 .hero-sub strong { color: #FF6B35; }

body.v2 .stat-num { color: #F5F2ED; }
body.v2 .stat-lbl { color: rgba(245,242,237,0.55); }

body.v2 .btn-primary {
  background: #FF6B35;
  color: #0B0B0F;
  border: none;
}
body.v2 .btn-primary:hover { background: #FF8A5E; }

/* --- Ticker bands between sections --- */
.v2-ticker {
  display: none;
  overflow: hidden;
  background: #FF6B35;
  color: #0B0B0F;
  padding: 22px 0;
  border-top: 1px solid rgba(0,0,0,0.2);
  border-bottom: 1px solid rgba(0,0,0,0.2);
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(28px, 4vw, 56px);
  letter-spacing: -0.02em;
  text-transform: uppercase;
  white-space: nowrap;
  position: relative;
  z-index: 3;
}
body.v2 .v2-ticker { display: block; }
.v2-ticker-track {
  display: inline-flex;
  gap: 48px;
  animation: v2-ticker-slide 30s linear infinite;
  padding-left: 48px;
}
.v2-ticker-track span { display: inline-flex; align-items: center; gap: 48px; }
.v2-ticker-track .dot {
  width: 18px; height: 18px; border-radius: 50%;
  background: #0B0B0F;
  display: inline-block;
}
@keyframes v2-ticker-slide {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.v2-ticker.alt { background: #F5F2ED; color: #0B0B0F; }
.v2-ticker.alt .dot { background: #FF6B35; }
.v2-ticker.dark { background: #0B0B0F; color: #F5F2ED; }
.v2-ticker.dark .dot { background: #FF6B35; }

/* --- Brands section on dark --- */
body.v2 .brands-section {
  background: #0B0B0F;
  border-color: rgba(255,255,255,0.08);
  color: rgba(245,242,237,0.5);
}
body.v2 .brands-section .section-eyebrow {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.1);
  color: rgba(245,242,237,0.75);
}

/* --- Section shells (dark) --- */
body.v2 section,
body.v2 #tipos,
body.v2 #como,
body.v2 #demo,
body.v2 #dashboard,
body.v2 #caracteristicas,
body.v2 #precios,
body.v2 #faq {
  background: #0B0B0F;
  color: #F5F2ED;
  position: relative;
}
body.v2 .section-eyebrow {
  background: rgba(255,107,53,0.12);
  border: 1px solid rgba(255,107,53,0.35);
  color: #FF6B35;
}
body.v2 .section-title,
body.v2 h2, body.v2 h3 { color: #F5F2ED; }
body.v2 .section-sub,
body.v2 p { color: rgba(245,242,237,0.7); }

/* Section number backdrop */
body.v2 section[data-v2-num]::before {
  content: attr(data-v2-num);
  position: absolute;
  top: 30px;
  right: 32px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: clamp(120px, 20vw, 280px);
  color: rgba(255,255,255,0.04);
  line-height: 0.8;
  pointer-events: none;
  z-index: 0;
  letter-spacing: -0.04em;
}
body.v2 section .wrap { position: relative; z-index: 1; }

/* --- TIPOS: horizontally-pinned scroll --- */
body.v2 #tipos {
  padding: 0;
  overflow: visible;
}
body.v2 #tipos .wrap {
  max-width: none;
  padding: 0;
}
body.v2 #tipos .v2-tipos-intro {
  padding: 120px 40px 80px;
  max-width: 1200px;
  margin: 0 auto;
}
body.v2 #tipos .v2-pin-stage {
  height: 500vh; /* 5x viewport = 4 panel slides */
  position: relative;
}
body.v2 #tipos .v2-pin-inner {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
}
body.v2 #tipos .v2-pin-track {
  display: flex;
  gap: 48px;
  padding: 0 8vw;
  height: 82vh;
  will-change: transform;
}
body.v2 #tipos .v2-pin-panel {
  flex: 0 0 auto;
  width: min(84vw, 1100px);
  border-radius: 32px;
  padding: 56px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
}
body.v2 #tipos .v2-pin-panel[data-kind="lealtad"] {
  background: linear-gradient(135deg, #FF6B35 0%, #C4441A 100%);
  color: #FFF8F3;
}
body.v2 #tipos .v2-pin-panel[data-kind="cupones"] {
  background: linear-gradient(135deg, #2020C4 0%, #0A0A6E 100%);
  color: #E3E3FF;
}
body.v2 #tipos .v2-pin-panel[data-kind="giftcard"] {
  background: linear-gradient(135deg, #2BC48F 0%, #0E6E4A 100%);
  color: #DDF6EC;
}
body.v2 #tipos .v2-pin-panel[data-kind="membership"] {
  background: linear-gradient(135deg, #B87B00 0%, #6E4700 100%);
  color: #FFF3D2;
}
body.v2 #tipos .v2-pin-panel .v2-kind {
  position: absolute;
  top: 36px;
  left: 56px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.7;
}
body.v2 #tipos .v2-pin-panel .v2-num {
  position: absolute;
  top: 36px;
  right: 56px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 22px;
  opacity: 0.55;
}
body.v2 #tipos .v2-pin-panel h3 {
  font-size: clamp(40px, 4.6vw, 80px);
  line-height: 0.95;
  letter-spacing: -0.03em;
  font-weight: 700;
  color: inherit;
  margin: 40px 0 24px;
}
body.v2 #tipos .v2-pin-panel p {
  font-size: clamp(16px, 1.2vw, 20px);
  line-height: 1.5;
  color: inherit;
  opacity: 0.85;
  max-width: 48ch;
}
body.v2 #tipos .v2-pin-panel .v2-bens {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
  display: grid;
  gap: 14px;
}
body.v2 #tipos .v2-pin-panel .v2-bens li {
  display: flex;
  gap: 12px;
  font-size: 15px;
  line-height: 1.35;
  padding: 12px 16px;
  background: rgba(255,255,255,0.12);
  border-radius: 12px;
  backdrop-filter: blur(10px);
}
body.v2 #tipos .v2-pin-panel .v2-bens strong { display: block; font-size: 16px; }
body.v2 #tipos .v2-pin-panel .v2-bens span { opacity: 0.75; font-size: 13px; }
body.v2 #tipos .v2-pin-panel .v2-ico {
  width: 36px; height: 36px; border-radius: 10px;
  background: rgba(255,255,255,0.2);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
}
body.v2 #tipos .v2-pin-visual {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
body.v2 #tipos .v2-pin-visual img.v2-phone {
  max-width: 100%;
  max-height: 78%;
  object-fit: contain;
  filter: drop-shadow(0 30px 60px rgba(0,0,0,0.35));
}
body.v2 #tipos .v2-pin-visual .v2-duo {
  position: relative;
  width: 100%;
  height: 100%;
}
body.v2 #tipos .v2-pin-visual .v2-duo img {
  position: absolute;
  height: 72%;
  filter: drop-shadow(0 30px 60px rgba(0,0,0,0.4));
}
body.v2 #tipos .v2-pin-visual .v2-duo img:first-child {
  left: 8%; top: 4%;
  transform: rotate(-6deg);
  z-index: 2;
}
body.v2 #tipos .v2-pin-visual .v2-duo img:last-child {
  right: 8%; bottom: 4%;
  transform: rotate(6deg);
  z-index: 1;
  height: 68%;
}

/* Progress indicator for pinned section */
body.v2 #tipos .v2-pin-progress {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 5;
}
body.v2 #tipos .v2-pin-progress span {
  width: 40px; height: 3px;
  background: rgba(255,255,255,0.15);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}
body.v2 #tipos .v2-pin-progress span::after {
  content: '';
  position: absolute;
  inset: 0;
  background: #FF6B35;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}
body.v2 #tipos .v2-pin-progress span.active::after { transform: scaleX(1); }

/* Hide v1 tipos grid in v2 */
body.v2 #tipos .tipos-grid { display: none; }

/* --- Scroll-reveal primitive (used everywhere in v2) --- */
body.v2 [data-v2-reveal] {
  opacity: 0;
  transform: translateX(80px);
  transition: opacity 0.9s cubic-bezier(0.2,0.9,0.3,1),
              transform 0.9s cubic-bezier(0.2,0.9,0.3,1);
}
body.v2 [data-v2-reveal="up"] { transform: translateY(60px); }
body.v2 [data-v2-reveal="left"] { transform: translateX(-80px); }
body.v2 [data-v2-reveal].v2-in { opacity: 1; transform: none; }

body.v2 [data-v2-stagger] > * {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2,0.9,0.3,1);
}
body.v2 [data-v2-stagger].v2-in > * {
  opacity: 1;
  transform: none;
}
body.v2 [data-v2-stagger].v2-in > *:nth-child(1) { transition-delay: 0.05s; }
body.v2 [data-v2-stagger].v2-in > *:nth-child(2) { transition-delay: 0.12s; }
body.v2 [data-v2-stagger].v2-in > *:nth-child(3) { transition-delay: 0.19s; }
body.v2 [data-v2-stagger].v2-in > *:nth-child(4) { transition-delay: 0.26s; }
body.v2 [data-v2-stagger].v2-in > *:nth-child(5) { transition-delay: 0.33s; }
body.v2 [data-v2-stagger].v2-in > *:nth-child(6) { transition-delay: 0.40s; }

/* --- Cards / dark section tweaks --- */
body.v2 .card,
body.v2 .pricing-card,
body.v2 .faq-item,
body.v2 .testimonial-card,
body.v2 .dash-tile,
body.v2 .feat-v2 {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: #F5F2ED;
}
body.v2 .card:hover,
body.v2 .pricing-card:hover,
body.v2 .feat-v2:hover {
  border-color: rgba(255,107,53,0.4);
  background: rgba(255,107,53,0.06);
  transform: translateY(-6px);
}
body.v2 .feat-v2 { transition: all 0.4s ease; }
body.v2 .pricing-card.featured {
  background: linear-gradient(135deg, #FF6B35 0%, #C4441A 100%);
  border-color: #FF6B35;
  color: #0B0B0F;
}
body.v2 .pricing-card.featured * { color: #0B0B0F !important; }

/* Dashboard tiles inherit dark */
body.v2 .dashboard-section { background: #0B0B0F; }

/* Demo section */
body.v2 #demo { background: #0B0B0F; }

/* How it works stages */
body.v2 .how-stage {
  background: rgba(255,255,255,0.03);
  border-color: rgba(255,255,255,0.08);
}

/* FAQ */
body.v2 .faq-item { background: rgba(255,255,255,0.03); }
body.v2 .faq-q { color: #F5F2ED; }
body.v2 .faq-a { color: rgba(245,242,237,0.7); }

/* Footer */
body.v2 .footer {
  background: #060608;
  border-top: 1px solid rgba(255,255,255,0.08);
  color: rgba(245,242,237,0.6);
}
body.v2 .footer a { color: rgba(245,242,237,0.8); }
body.v2 .footer a:hover { color: #FF6B35; }

/* --- v2 toggle button --- */
.v2-toggle {
  position: fixed;
  right: 20px;
  bottom: 80px;
  z-index: 9999;
  background: #0B0B0F;
  color: #F5F2ED;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 999px;
  padding: 12px 20px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.35);
  transition: all 0.3s ease;
}
.v2-toggle:hover { transform: translateY(-2px); }
.v2-toggle .v2-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #FF6B35;
  box-shadow: 0 0 10px #FF6B35;
}
body.v2 .v2-toggle {
  background: #FF6B35;
  color: #0B0B0F;
  border-color: #FF6B35;
}
body.v2 .v2-toggle .v2-dot { background: #0B0B0F; box-shadow: none; }

/* --- Mobile: disable horizontal pin, fall back to stack --- */
@media (max-width: 900px) {
  .hide-mobile { display: none !important; }
  body.v2 #tipos .v2-pin-stage {
    height: auto;
  }
  body.v2 #tipos .v2-pin-inner {
    position: static;
    height: auto;
    overflow: visible;
  }
  body.v2 #tipos .v2-pin-track {
    flex-direction: column;
    height: auto;
    padding: 40px 20px;
    gap: 32px;
    transform: none !important;
  }
  body.v2 #tipos .v2-pin-panel {
    width: 100%;
    grid-template-columns: 1fr;
    padding: 32px 24px;
  }
  body.v2 #tipos .v2-pin-panel h3 { font-size: 32px; margin-top: 20px; }
  body.v2 #tipos .v2-pin-visual { min-height: 380px; }
  body.v2 #tipos .v2-pin-progress { display: none; }
  body.v2 section[data-v2-num]::before { font-size: 120px; }
  .v2-ticker { font-size: 22px; padding: 14px 0; }
  body.v2 [data-v2-reveal] { transform: translateX(0) translateY(40px); }
  body.v2 [data-v2-reveal].v2-in { transform: none; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  body.v2 [data-v2-reveal],
  body.v2 [data-v2-stagger] > *,
  body.v2 .hero-title .word {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .v2-ticker-track { animation: none; }
}
