/* ============================================================
   Luciano Vignolo — Portafolio · Editor de Video
   Negro + violeta · liquid glass · motion design
   ============================================================ */

:root {
  --bg: #050508;
  --bg-2: #0a0a12;
  --violet: #8b5cf6;
  --violet-2: #a78bfa;
  --violet-deep: #6d28d9;
  --violet-glow: rgba(139, 92, 246, 0.55);
  --text: #f4f2ff;
  --text-dim: #a7a2bd;
  --glass-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
  --glass-border: rgba(255, 255, 255, 0.1);
  --font-display: "Space Grotesk", sans-serif;
  --font-body: "Inter", sans-serif;
  --radius: 24px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--violet); color: #fff; }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #2a2440; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--violet-deep); }

.container {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
}

/* ============ FONDO: ORBES + GRANO ============ */
.bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(109, 40, 217, 0.22), transparent 60%),
    var(--bg);
}

.orb {
  position: absolute;
  border-radius: 50%;
  opacity: 0.85;
  will-change: transform;
}

.orb-1 {
  width: 820px; height: 820px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.30), rgba(139, 92, 246, 0.08) 45%, transparent 70%);
  top: -280px; left: -220px;
  animation: float-1 22s ease-in-out infinite;
}

.orb-2 {
  width: 720px; height: 720px;
  background: radial-gradient(circle, rgba(109, 40, 217, 0.26), rgba(109, 40, 217, 0.07) 45%, transparent 70%);
  top: 35%; right: -280px;
  animation: float-2 26s ease-in-out infinite;
}

.orb-3 {
  width: 780px; height: 780px;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.18), rgba(167, 139, 250, 0.05) 45%, transparent 70%);
  bottom: -320px; left: 30%;
  animation: float-3 30s ease-in-out infinite;
}

@keyframes float-1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(90px, 70px) scale(1.12); }
}
@keyframes float-2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-110px, -60px) scale(0.92); }
}
@keyframes float-3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-70px, -90px) scale(1.08); }
}

.grain {
  position: absolute;
  inset: 0;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.cursor-glow {
  position: fixed;
  width: 480px; height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.09), transparent 65%);
  pointer-events: none;
  z-index: -1;
  transform: translate(-50%, -50%);
  transition: opacity 0.4s;
  opacity: 0;
}

/* ============ GLASS ============ */
.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  border-radius: var(--radius);
  position: relative;
}

.glass::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.25), transparent 30%, transparent 70%, rgba(139, 92, 246, 0.25));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* ============ NAV ============ */
.nav-wrap {
  position: fixed;
  top: 18px;
  left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  padding: 0 24px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 10px 12px 10px 22px;
  border-radius: 999px;
  width: min(680px, 100%);
  justify-content: space-between;
  transition: box-shadow 0.4s;
}

.nav.scrolled { box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(139, 92, 246, 0.12); }

.nav-logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav-logo span { color: var(--violet-2); }

.nav-links { display: flex; gap: 22px; }

.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: color 0.25s;
}

.nav-links a:hover { color: var(--text); }

/* ============ BOTONES ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  text-decoration: none;
  border-radius: 999px;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.3, 1.2), box-shadow 0.3s, background 0.3s;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--violet), var(--violet-deep));
  color: #fff;
  box-shadow: 0 4px 24px rgba(139, 92, 246, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 36px rgba(139, 92, 246, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.btn-ghost {
  color: var(--text);
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(10px);
}

.btn-ghost:hover {
  background: rgba(139, 92, 246, 0.12);
  border-color: rgba(139, 92, 246, 0.4);
  transform: translateY(-2px);
}

.btn-small { padding: 9px 18px; font-size: 0.85rem; }
.btn-lg { padding: 15px 28px; font-size: 1rem; }
.btn-xl { padding: 18px 36px; font-size: 1.1rem; }

/* ============ HERO ============ */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 140px 0 80px;
  text-align: center;
}

.hero .container { display: flex; flex-direction: column; align-items: center; }

.eyebrow {
  font-family: var(--font-display);
  color: var(--violet-2);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 22px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 7.2vw, 5.4rem);
  line-height: 1.04;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.hero-title .line { display: block; }

.gradient-text {
  font-style: normal;
  background: linear-gradient(100deg, var(--violet-2), var(--violet) 50%, #c4b5fd);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 24px rgba(139, 92, 246, 0.45));
}

.outline-text {
  font-style: normal;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(196, 181, 253, 0.85);
}

.hero-sub {
  max-width: 560px;
  margin-top: 28px;
  color: var(--text-dim);
  font-size: 1.08rem;
}

.hero-sub strong { color: var(--text); }

.hero-cta {
  display: flex;
  gap: 16px;
  margin-top: 36px;
  flex-wrap: wrap;
  justify-content: center;
}

.hero-stats {
  display: flex;
  gap: 18px;
  margin-top: 64px;
  flex-wrap: wrap;
  justify-content: center;
}

.stat {
  padding: 22px 36px;
  text-align: center;
  min-width: 180px;
  transition: transform 0.3s, box-shadow 0.3s;
}

.stat:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4), 0 0 40px rgba(139, 92, 246, 0.15);
}

.stat-num {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 700;
  display: block;
  background: linear-gradient(135deg, #fff, var(--violet-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat-label {
  color: var(--text-dim);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}

/* ============ MARQUEE ============ */
.marquee {
  overflow: hidden;
  border-top: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
  background: rgba(139, 92, 246, 0.05);
  backdrop-filter: blur(10px);
  padding: 16px 0;
  transform: rotate(-1deg) scale(1.02);
  margin: 20px -20px;
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 28s linear infinite;
}

.marquee-track span {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--violet-2);
  white-space: nowrap;
  padding-right: 12px;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ============ SECCIONES ============ */
.section { padding: 120px 0 40px; }

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 14px;
}

.section-sub {
  color: var(--text-dim);
  margin-bottom: 48px;
  max-width: 480px;
}

/* ============ TESTIMONIO ============ */
.testimonial {
  display: flex;
  align-items: center;
  gap: 48px;
  padding: 48px;
  margin-top: 40px;
}

.testimonial-info { flex: 1; }

.quote-mark {
  font-family: var(--font-display);
  font-size: 5rem;
  line-height: 0.6;
  display: block;
  color: var(--violet);
  filter: drop-shadow(0 0 18px var(--violet-glow));
  margin-bottom: 18px;
}

.testimonial-info h3 {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 700;
}

.testimonial-role { color: var(--violet-2); font-size: 0.95rem; margin-top: 4px; }

.testimonial-role a { color: inherit; }

.testimonial-text { color: var(--text-dim); margin-top: 18px; max-width: 420px; }

/* ============ CHIPS ============ */
.chips { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }

.chip {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(139, 92, 246, 0.35);
  background: rgba(139, 92, 246, 0.1);
  color: var(--violet-2);
}

.chip-hl {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.22), rgba(109, 40, 217, 0.12));
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.12);
  color: #d6c9ff;
}

/* ============ PHONE (video vertical) ============ */
.phone {
  flex-shrink: 0;
  width: 270px;
  padding: 10px;
  border-radius: 36px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 50px rgba(139, 92, 246, 0.14);
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.3, 1.1), box-shadow 0.4s;
}

.phone:hover {
  transform: translateY(-6px) rotate(-1deg);
  box-shadow: 0 32px 70px rgba(0, 0, 0, 0.6), 0 0 70px rgba(139, 92, 246, 0.28);
}

.phone-screen {
  position: relative;
  aspect-ratio: 9 / 16;
  border-radius: 28px;
  overflow: hidden;
  background: #000;
}

.phone-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.phone-screen iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.play-btn {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(139, 92, 246, 0.55);
  backdrop-filter: blur(8px);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.3s, background 0.3s, box-shadow 0.3s;
  box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.5);
  animation: pulse 2.4s ease-out infinite;
}

.play-btn svg { margin-left: 3px; }

.play-btn:hover {
  transform: scale(1.12);
  background: rgba(139, 92, 246, 0.85);
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.45); }
  70% { box-shadow: 0 0 0 22px rgba(139, 92, 246, 0); }
  100% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0); }
}

/* ---- Dúo de teléfonos: video + reel viral ---- */
.phone-duo {
  flex-shrink: 0;
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

.phone-duo .phone { width: 225px; }

.phone-viral:hover { transform: translateY(-6px) rotate(1deg); }

/* El screenshot del reel viral conserva su proporción completa
   (el contador de vistas está pegado al borde y no debe recortarse) */
.phone-viral .phone-screen { aspect-ratio: auto; }
.phone-viral .phone-screen img { height: auto; }

.viral-badge {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  padding: 6px 14px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.85), rgba(109, 40, 217, 0.85));
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35), 0 0 22px rgba(139, 92, 246, 0.35);
}

/* ============ CLIENTES ============ */
.client {
  display: flex;
  align-items: center;
  gap: 48px;
  padding: 48px;
  margin-bottom: 36px;
  transition: box-shadow 0.4s, border-color 0.4s;
}

.client:hover {
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45), 0 0 60px rgba(139, 92, 246, 0.1);
}

.client.alt { flex-direction: row-reverse; }

.client-info { flex: 1; min-width: 0; }

.client-index {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--violet);
  letter-spacing: 0.3em;
}

.client-name {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: 6px;
}

.client-desc { color: var(--text-dim); margin-top: 10px; max-width: 440px; }

.ig-card {
  display: block;
  margin-top: 26px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.45);
  max-width: 480px;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.ig-card:hover {
  transform: translateY(-3px);
  border-color: rgba(139, 92, 246, 0.5);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.4), 0 0 34px rgba(139, 92, 246, 0.18);
}

.ig-card img { width: 100%; display: block; }

/* ============ CTA FINAL ============ */
.cta-panel {
  text-align: center;
  padding: 90px 40px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cta-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.28), transparent 65%);
  top: -300px;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}

.cta-title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4.6vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  position: relative;
}

.cta-sub { color: var(--text-dim); margin: 18px 0 34px; position: relative; }

.cta-phone {
  margin-top: 20px;
  color: var(--text-dim);
  font-family: var(--font-display);
  letter-spacing: 0.08em;
  font-size: 0.95rem;
}

/* ============ FOOTER ============ */
.footer {
  border-top: 1px solid var(--glass-border);
  margin-top: 100px;
  padding: 32px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--text-dim);
  font-size: 0.88rem;
}

.footer-tag { color: #6b6584; }

/* ============ REVEAL (scroll animations) ============ */
/* Solo se oculta contenido cuando JS está activo (html.js) */
.js .reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.9s cubic-bezier(0.2, 0.65, 0.3, 1), transform 0.9s cubic-bezier(0.2, 0.65, 0.3, 1);
}

.js .reveal.visible { opacity: 1; transform: translateY(0); }

.d-1 { transition-delay: 0.1s; }
.d-2 { transition-delay: 0.2s; }
.d-3 { transition-delay: 0.3s; }
.d-4 { transition-delay: 0.4s; }
.d-5 { transition-delay: 0.5s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav { width: auto; gap: 18px; }

  .testimonial,
  .client,
  .client.alt {
    flex-direction: column;
    padding: 32px 24px;
    gap: 36px;
  }

  .client-info { width: 100%; }
  .phone { width: min(280px, 78vw); }
  .section { padding: 80px 0 20px; }
  .hero { padding-top: 120px; }
  .stat { min-width: 140px; padding: 18px 22px; flex: 1; }
  .hero-stats { width: 100%; }
  .cta-panel { padding: 64px 24px; }
}
