/* ============================================
   FUNN — Design System & Styles
   Ultra-minimal · Dark · Premium · SaaS
   ============================================ */

/* --- RESET & BASE --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --black: #0B0D10;
  --black-light: #111318;
  --gray-dark: #1F1F1F;
  --gray-mid: #2A2A2E;
  --gray-text: #8A8A8F;
  --gray-light: #B0B0B5;
  --white: #FFFFFF;
  --accent: #7C3AED;
  --accent-dim: #6326C4;
  --accent-glow: rgba(124, 58, 237, 0.15);
  --accent-glow-strong: rgba(124, 58, 237, 0.25);

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Outfit', 'Inter', sans-serif;
  --container: 1200px;
  --radius: 8px;
  --radius-lg: 16px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  background-color: var(--black);
  color: var(--white);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

/* --- CONTAINER --- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* --- SECTION --- */
.section {
  padding: 120px 0;
}

.section__header {
  max-width: 680px;
  margin-bottom: 72px;
}

.section__label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.section__title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--white);
  margin-bottom: 16px;
}

.section__desc {
  font-size: 17px;
  color: var(--gray-light);
  line-height: 1.7;
  max-width: 560px;
}

/* --- ACCENT --- */
.accent {
  color: var(--accent);
}

/* --- BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  background-color: var(--accent);
  color: var(--white);
  letter-spacing: 0.01em;
}

.btn:hover {
  background-color: var(--accent-dim);
  transform: translateY(-1px);
  box-shadow: 0 8px 32px var(--accent-glow-strong);
}

.btn--ghost {
  background: transparent;
  border: 1px solid var(--gray-mid);
  color: var(--gray-light);
}

.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--white);
  background: transparent;
  box-shadow: none;
}

.btn--sm {
  padding: 10px 24px;
  font-size: 14px;
}

.btn--lg {
  padding: 18px 40px;
  font-size: 16px;
}

.btn--full {
  width: 100%;
  padding: 16px 32px;
}

/* ===========================================
   NAVIGATION
   =========================================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 20px 0;
  transition: var(--transition);
  background: transparent;
}

.nav--scrolled {
  background: rgba(11, 13, 16, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.nav__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--white);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 40px;
}

.nav__links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-light);
  transition: var(--transition);
  letter-spacing: 0.01em;
}

.nav__links a:hover {
  color: var(--white);
}

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: var(--transition);
}

/* ===========================================
   HERO
   =========================================== */
.hero {
  padding: 180px 0 100px;
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero__video-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0.5;
  /* Muted opacity so text remains legible */
  pointer-events: none;
}

.hero__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(11, 13, 16, 0.3) 0%, rgba(11, 13, 16, 0.8) 80%, rgba(11, 13, 16, 1) 100%);
  z-index: 1;
  pointer-events: none;
}

/* Parallax background glow orb */
.hero__parallax-bg {
  position: absolute;
  top: -150px;
  right: -150px;
  width: 700px;
  height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%,
      rgba(124, 58, 237, 0.25) 0%,
      rgba(124, 58, 237, 0.12) 25%,
      rgba(99, 102, 241, 0.06) 45%,
      transparent 65%);
  filter: blur(60px);
  pointer-events: none;
  will-change: transform;
  z-index: 0;
  animation: orb-float-main 8s ease-in-out infinite;
}

@keyframes orb-float-main {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.8;
  }

  50% {
    transform: translate(-30px, 20px) scale(1.05);
    opacity: 1;
  }
}

.hero__parallax-container {
  position: relative;
  z-index: 2;
}

/* Title line-by-line reveal */
.hero__title-line {
  display: block;
  overflow: hidden;
}

.hero__title-line>* {
  display: inline;
}

.hero__content {
  max-width: 720px;
  margin-bottom: 80px;
}

.hero__label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(40px, 6.5vw, 72px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 28px;
}

.hero__sub {
  font-size: 18px;
  color: var(--gray-light);
  line-height: 1.7;
  max-width: 520px;
  margin-bottom: 40px;
}

.hero__actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  padding-top: 48px;
  border-top: 1px solid var(--gray-mid);
}

.stat__number {
  display: block;
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--white);
  margin-bottom: 6px;
}

.stat__label {
  font-size: 14px;
  color: var(--gray-text);
  line-height: 1.5;
}

/* ===========================================
   SISTEMA (Pipeline)
   =========================================== */
.sistema {
  background-color: var(--black-light);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.pipeline {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 0;
  align-items: start;
}

.pipeline__step {
  padding: 40px;
  background: var(--black);
  border: 1px solid var(--gray-mid);
  border-top: 2px solid var(--accent);
  border-radius: var(--radius-lg);
  transition: var(--transition);
  position: relative;
}

.pipeline__step:hover {
  border-color: var(--accent);
  border-top-color: var(--accent);
  box-shadow: 0 0 40px var(--accent-glow);
}

.pipeline__num {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 20px;
  letter-spacing: 0.04em;
}

.pipeline__title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}

.pipeline__text {
  font-size: 15px;
  color: var(--gray-light);
  line-height: 1.7;
  margin-bottom: 24px;
}

.pipeline__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pipeline__list li {
  font-size: 14px;
  color: var(--gray-text);
  padding-left: 16px;
  position: relative;
}

.pipeline__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.pipeline__connector {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  align-self: center;
}

.pipeline__connector::before {
  content: '';
  display: block;
  width: 40px;
  height: 1px;
  background: linear-gradient(90deg, var(--gray-mid), var(--accent), var(--gray-mid));
}

/* ===========================================
   SERVICIOS — Horizontal Scroll
   =========================================== */
.servicios {
  padding-bottom: 0;
}

.servicios__header-container {
  padding-bottom: 40px;
}

.hscroll {
  height: 300vh;
  position: relative;
}

.hscroll__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hscroll__track {
  display: flex;
  gap: 24px;
  padding: 0 48px;
  will-change: transform;
}

.service-card {
  flex: 0 0 340px;
  padding: 40px 32px;
  background: var(--black-light);
  border: 1px solid var(--gray-mid);
  border-radius: var(--radius-lg);
  transition: border-color 0.4s ease, box-shadow 0.4s ease, transform 0.4s ease;
}

.service-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 40px var(--accent-glow);
  transform: translateY(-4px);
}

.service-card__icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: transparent;
  border: 1px solid rgba(124, 58, 237, 0.3);
  color: var(--accent);
  margin-bottom: 20px;
  box-shadow: inset 0 0 20px var(--accent-glow);
  transition: var(--transition);
}

.service-card:hover .service-card__icon {
  background: var(--accent-glow);
  border-color: var(--accent);
}

.service-card__title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.service-card__text {
  font-size: 14px;
  color: var(--gray-text);
  line-height: 1.65;
}

/* Scroll progress indicator */
.hscroll__sticky::after {
  content: '';
  position: absolute;
  bottom: 40px;
  left: 48px;
  right: 48px;
  height: 2px;
  background: var(--gray-mid);
  border-radius: 1px;
}

.hscroll__sticky::before {
  content: '';
  position: absolute;
  bottom: 40px;
  left: 48px;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
  width: var(--hscroll-progress, 0px);
  z-index: 1;
  transition: none;
}

/* ===========================================
   CONFÍAN EN NOSOTROS — Client Logos
   =========================================== */
.clientes-logos {
  background: var(--black-light);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.logos-marquee {
  position: relative;
  width: 100%;
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.logos-marquee__track {
  display: flex;
  gap: 64px;
  align-items: center;
  width: max-content;
  animation: marquee-scroll 30s linear infinite;
}

.logos-marquee:hover .logos-marquee__track {
  animation-play-state: paused;
}

@keyframes marquee-scroll {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

.logo-item {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 60px;
  min-width: 140px;
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--gray-mid);
  border-radius: var(--radius);
  transition: var(--transition);
}

.logo-item:hover {
  border-color: var(--accent);
  box-shadow: 0 0 30px var(--accent-glow);
  background: rgba(255, 255, 255, 0.06);
}

.logo-item img {
  max-height: 36px;
  max-width: 120px;
  object-fit: contain;
  filter: grayscale(1) brightness(0.7);
  opacity: 0.6;
  transition: all 0.4s ease;
}

.logo-item:hover img {
  filter: grayscale(0) brightness(1);
  opacity: 1;
}

/* ===========================================
   CLIENTES — TEASER
   =========================================== */
.clientes-teaser {
  text-align: center;
  background: var(--black);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.clientes-teaser__content {
  max-width: 600px;
  margin: 0 auto;
}

.clientes-teaser .section__header {
  margin-bottom: 0;
}

.clientes-teaser .section__desc {
  max-width: 100%;
}


/* ===========================================
   CTA SECTION
   =========================================== */
.cta-section {
  padding: 100px 0;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse, var(--accent-glow-strong) 0%, var(--accent-glow) 30%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.cta-block {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.cta-block__title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.cta-block__text {
  font-size: 17px;
  color: var(--gray-light);
  line-height: 1.7;
  margin-bottom: 36px;
}

/* ===========================================
   CONTACTO
   =========================================== */
.contacto {
  background-color: var(--black-light);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.contact-info__text {
  font-size: 17px;
  color: var(--gray-light);
  line-height: 1.7;
  margin-bottom: 32px;
  max-width: 400px;
}

.contact-info__details {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 15px;
  color: var(--gray-text);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gray-text);
}

.form-group input,
.form-group textarea {
  background: var(--black);
  border: 1px solid var(--gray-mid);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 15px;
  font-family: var(--font);
  color: var(--white);
  transition: var(--transition);
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--gray-text);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

/* ===========================================
   FOOTER
   =========================================== */
.footer {
  padding: 40px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer__logo {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.footer__copy {
  font-size: 13px;
  color: var(--gray-text);
}

.footer__links {
  display: flex;
  gap: 24px;
}

.footer__links a {
  font-size: 13px;
  color: var(--gray-text);
  transition: var(--transition);
}

.footer__links a:hover {
  color: var(--white);
}

.footer__social {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer__social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--gray-mid);
  border-radius: 10px;
  color: var(--gray-text);
  transition: var(--transition);
}

.footer__social-link:hover {
  color: var(--white);
  border-color: var(--accent);
  box-shadow: 0 0 20px var(--accent-glow);
  background: rgba(124, 58, 237, 0.08);
}

/* ===========================================
   WHATSAPP FLOATING ICON
   =========================================== */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  max-width: 60px;
  height: 60px;
  background-color: var(--black-light);
  border: 1px solid #25D366;
  color: #25D366;
  border-radius: 30px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.3);
  transition: max-width 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s, color 0.3s, border-color 0.3s;
  overflow: hidden;
  text-decoration: none;
}

.whatsapp-float::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(37, 211, 102, 0.2) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 0;
}

.whatsapp-float:hover {
  max-width: 320px;
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 8px 30px rgba(37, 211, 102, 0.4);
  background-color: #25D366;
  color: var(--white);
  border-color: #25D366;
}

.whatsapp-float:hover::before {
  opacity: 1;
}

.whatsapp-float svg {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  margin-left: 13px;
  transition: transform 0.3s ease;
}

.whatsapp-float:hover svg {
  transform: scale(1.1);
}

.whatsapp-float__text {
  position: relative;
  z-index: 1;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 600;
  margin-left: 12px;
  margin-right: 20px;
  opacity: 0;
  transform: translateX(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  font-family: var(--font);
}

.whatsapp-float:hover .whatsapp-float__text {
  opacity: 1;
  transform: translateX(0);
  transition-delay: 0.1s;
}

/* ===========================================
   ANIMATIONS (Scroll Reveal)
   =========================================== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal--visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.reveal-stagger>* {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal-stagger--visible>* {
  opacity: 1;
  transform: translateY(0);
}

.reveal-stagger--visible>*:nth-child(1) {
  transition-delay: 0s;
}

.reveal-stagger--visible>*:nth-child(2) {
  transition-delay: 0.08s;
}

.reveal-stagger--visible>*:nth-child(3) {
  transition-delay: 0.16s;
}

.reveal-stagger--visible>*:nth-child(4) {
  transition-delay: 0.08s;
}

.reveal-stagger--visible>*:nth-child(5) {
  transition-delay: 0.16s;
}

.reveal-stagger--visible>*:nth-child(6) {
  transition-delay: 0.24s;
}

.reveal-stagger--visible>*:nth-child(7) {
  transition-delay: 0.16s;
}

.reveal-stagger--visible>*:nth-child(8) {
  transition-delay: 0.24s;
}

/* ===========================================
   RESPONSIVE
   =========================================== */
@media (max-width: 1024px) {
  .pipeline {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .pipeline__connector {
    display: none;
  }

  .hscroll {
    height: auto;
  }

  .hscroll__sticky {
    position: relative;
    height: auto;
    flex-wrap: wrap;
  }

  .hscroll__track {
    flex-wrap: wrap;
    padding: 0 24px;
  }

  .hscroll__sticky::after,
  .hscroll__sticky::before {
    display: none;
  }

  .service-card {
    flex: 0 0 calc(50% - 12px);
  }



  .contact-layout {
    grid-template-columns: 1fr;
    gap: 48px;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 80px 0;
  }

  .section__header {
    margin-bottom: 48px;
  }

  .hero {
    padding: 140px 0 80px;
    min-height: auto;
  }

  .hero__video-bg {
    opacity: 0.35;
  }

  .hero__overlay {
    background: linear-gradient(to bottom, rgba(11, 13, 16, 0.4) 0%, rgba(11, 13, 16, 0.8) 75%, rgba(11, 13, 16, 1) 100%);
  }

  .hero__content {
    margin-bottom: 48px;
  }



  .nav__toggle {
    display: flex;
  }

  .nav__links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--black-light);
    flex-direction: column;
    align-items: flex-start;
    padding: 100px 40px;
    gap: 28px;
    transition: var(--transition);
    border-left: 1px solid var(--gray-mid);
  }

  .nav__links--open {
    right: 0;
  }

  .nav__links a {
    font-size: 18px;
  }

  .service-card {
    flex: 1 1 100%;
  }

  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .testimonials {
    grid-template-columns: 1fr;
  }

  .footer__inner {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }

  .footer__links {
    justify-content: center;
  }
}

/* Grain texture overlay removed — it was a common AI-generated pattern */