/* ================================================================
   CreaVinci — Web cinematográfica
   Paleta: #7B2FBE (purple) · #9B4FE8 (indigo) · #C9A840 (gold)
================================================================= */

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

:root {
  --purple: #7B2FBE;
  --indigo: #9B4FE8;
  --gold: #C9A840;
  --black: #000;
  --muted: rgba(255,255,255,0.60);
  --glass: rgba(255,255,255,0.04);
  --glass-border: rgba(255,255,255,0.10);
  --grad: linear-gradient(135deg, #9B4FE8 0%, #C9A840 50%, #7B2FBE 100%);
}

html {
  background: var(--black);
  scroll-behavior: smooth;
  overflow-x: clip; /* clip en vez de hidden para no romper position:sticky */
}
html::-webkit-scrollbar { width: 0; }

body {
  font-family: 'Space Grotesk', 'Helvetica Neue', sans-serif;
  background: var(--black);
  color: #fff;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img { max-width: 100%; display: block; }

/* Canvas de estrellas fijo detrás de todo el contenido */
#cosmos {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  width: 100%;
  height: 100%;
}

/* ================================================================
   HERO CINEMATOGRÁFICO
================================================================= */
#cinematic {
  position: relative;
  z-index: 1;
  /* Scroll total: lo setea app.js en runtime para mantener fluidez (≈2000vh) */
  background: #000;
}

.cine-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  overflow: hidden;
}

/* Overlay suave en el borde inferior del hero. Termina con el mismo morado
   que el halo superior del landing, así el cambio entre secciones no "corta". */
.cine-sticky::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 38vh;
  pointer-events: none;
  z-index: 5;
  background: linear-gradient(to bottom,
    transparent 0%,
    rgba(123, 47, 190, 0.10) 40%,
    rgba(123, 47, 190, 0.32) 78%,
    rgba(123, 47, 190, 0.55) 100%);
}

.cine-stage {
  position: relative;
  width: 100%;
  height: 100%;
  background: #000;
  overflow: hidden;
}

/* Frame = viewport completo. El canvas llena toda la pantalla (cover,
   recorta los lados en móvil portrait). Textos posicionados dentro con
   unidades cqw para que escalen proporcional al ancho. */
.cine-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #000;
  container-type: size;
  container-name: cineframe;
}

/* Canvas con secuencia de frames (Apple AirPods-style) */
.cine-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
  pointer-events: none;
}

.cine-loader {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  transition: opacity 0.5s ease-out;
  background: radial-gradient(ellipse at center, rgba(123,47,190,0.18), transparent 70%);
  padding: 60px 80px;
}
.cine-loader-logo {
  width: min(220px, 38vw);
  opacity: 0.95;
  filter: drop-shadow(0 0 50px rgba(201, 168, 64, 0.55))
          drop-shadow(0 0 110px rgba(123, 47, 190, 0.4));
  animation: loaderPulse 2.4s ease-in-out infinite;
}
.cine-loader-tagline {
  color: rgba(255,255,255,0.72);
  font-size: clamp(13px, 1.2vw, 16px);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
  margin-top: 4px;
}
.cine-loader-bar {
  width: 220px;
  height: 2px;
  background: rgba(255,255,255,0.09);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 10px;
}
.cine-loader-fill {
  height: 100%;
  width: 0%;
  background: var(--grad);
  transition: width 0.15s linear;
}
.cine-loader-text {
  color: rgba(255,255,255,0.5);
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-weight: 500;
}
@keyframes loaderPulse {
  0%, 100% { transform: scale(1);   opacity: 0.88; }
  50%      { transform: scale(1.04); opacity: 1;    }
}

/* Indicador de scroll (esquina inferior derecha) */
.cine-scroll-hint {
  position: absolute;
  right: 32px;
  bottom: 32px;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 14px;
  color: rgba(255,255,255,0.78);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  transform: translateY(10px);
}
.cine-scroll-hint.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.cine-scroll-hint.is-hidden {
  opacity: 0;
  transform: translateY(14px);
}
.scroll-mouse {
  width: 26px;
  height: 42px;
  border: 2px solid rgba(255,255,255,0.85);
  border-radius: 14px;
  position: relative;
  flex-shrink: 0;
  box-shadow: 0 0 18px rgba(0,0,0,0.6);
}
.scroll-mouse span {
  position: absolute;
  left: 50%;
  top: 8px;
  width: 3px;
  height: 8px;
  margin-left: -1.5px;
  background: #fff;
  border-radius: 2px;
  animation: scrollWheel 1.6s ease-in-out infinite;
}
@keyframes scrollWheel {
  0%   { transform: translateY(0);    opacity: 1; }
  60%  { transform: translateY(14px); opacity: 0; }
  100% { transform: translateY(0);    opacity: 0; }
}
.scroll-hint-label {
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-weight: 600;
  text-shadow: 0 0 14px rgba(0,0,0,0.8);
}

/* Logo superpuesto al final del video */
.cine-logo {
  position: absolute;
  top: 18%;
  left: 50%;
  transform: translateX(-50%);
  width: 22cqw;
  max-width: 280px;
  opacity: 0;
  filter: drop-shadow(0 0 40px rgba(201, 168, 64, 0.45))
          drop-shadow(0 0 80px rgba(123, 47, 190, 0.35));
  transition: opacity 0.4s linear;
  pointer-events: none;
  z-index: 5;
}

/* ================================================================
   TEXTOS SUPERPUESTOS (cinematográficos)
================================================================= */
.cine-text {
  position: absolute;
  color: #fff;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.1;
  opacity: 0;
  transition: opacity 0.2s linear;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.95),
               0 0 60px rgba(0, 0, 0, 0.85),
               0 0 120px rgba(0, 0, 0, 0.6);
  z-index: 4;
  pointer-events: none;
  max-width: 40cqw;
  will-change: opacity;
}

/* Variante serif elegante para el opener */
.cine-text--serif {
  font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  font-weight: 500;
  font-style: italic;
  letter-spacing: 0.005em;
  line-height: 1.15;
}

.cine-text--top-left {
  top: 12%;
  left: 8%;
  font-size: clamp(20px, 3.6cqw, 56px);
  max-width: 44cqw;
}

.cine-text--top-right {
  top: 14%;
  right: 8%;
  text-align: right;
  font-size: clamp(22px, 4.2cqw, 68px);
  max-width: 46cqw;
}
.cine-text--serif.cine-text--top-right {
  font-size: clamp(26px, 5cqw, 84px);
}

.cine-text--right {
  top: 48%;
  right: 8%;
  transform: translateY(-50%);
  font-size: clamp(26px, 5cqw, 80px);
  text-align: right;
  max-width: 44cqw;
  background: linear-gradient(135deg, #fff 0%, #C9A840 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.cine-text--left {
  top: 48%;
  left: 8%;
  transform: translateY(-50%);
  font-size: clamp(26px, 5cqw, 80px);
  text-align: left;
  max-width: 44cqw;
  background: linear-gradient(135deg, #fff 0%, #C9A840 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.cine-text--top-center {
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  font-size: clamp(18px, 3.4cqw, 54px);
  text-align: center;
  max-width: 72cqw;
}

.cine-text--center {
  top: 18%;
  left: 50%;
  transform: translateX(-50%);
  font-size: clamp(24px, 4.8cqw, 76px);
  text-align: center;
  max-width: 80cqw;
  background: linear-gradient(135deg, #FFFFFF 0%, #F6E4A0 45%, #C9A840 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
  filter:
    drop-shadow(0 2px 14px rgba(0, 0, 0, 0.85))
    drop-shadow(0 0 35px rgba(201, 168, 64, 0.55))
    drop-shadow(0 0 80px rgba(123, 47, 190, 0.4));
}

/* ================================================================
   LANDING POST-HERO
================================================================= */
#landing {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding: 140px 24px 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse 55% 35% at 50% 18%, rgba(123, 47, 190, 0.45), transparent 70%),
    radial-gradient(ellipse 40% 22% at 50% 12%, rgba(155, 79, 232, 0.3), transparent 75%);
  text-align: center;
}

.landing-inner {
  max-width: 960px;
  width: 100%;
}

.eyebrow {
  display: inline-block;
  font-size: clamp(12px, 1.1vw, 15px);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 24px;
  padding: 8px 18px;
  border: 1px solid rgba(201, 168, 64, 0.3);
  border-radius: 100px;
  background: rgba(201, 168, 64, 0.06);
}

.hero-title {
  font-size: clamp(40px, 6.5vw, 88px);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin-bottom: 28px;
}
.line-static { display: block; color: #fff; }
.line-gradient {
  display: block;
  background: var(--grad);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: gradShift 5s ease-in-out infinite alternate;
}
@keyframes gradShift {
  0%   { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

.hero-subtitle {
  font-size: clamp(16px, 1.5vw, 20px);
  color: var(--muted);
  max-width: 680px;
  margin: 0 auto 40px;
  line-height: 1.5;
  font-weight: 400;
}

/* ================================================================
   BOTONES
================================================================= */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 36px;
  font-family: inherit;
  font-weight: 700;
  font-size: 16px;
  color: #fff;
  text-decoration: none;
  background: var(--grad);
  background-size: 200% 200%;
  border: none;
  border-radius: 100px;
  cursor: pointer;
  box-shadow: 0 0 30px rgba(123, 47, 190, 0.45);
  transition: transform 0.25s, box-shadow 0.25s, background-position 0.4s;
  animation: gradShift 6s ease-in-out infinite alternate;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 50px rgba(201, 168, 64, 0.5);
}
.btn-large {
  padding: 20px 48px;
  font-size: 18px;
}
.btn-primary:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}

/* ================================================================
   LEAD FORM (captura de correo)
================================================================= */
.lead-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  align-items: center;
  justify-content: center;
}
.lead-form input[type="email"] {
  flex: 1 1 260px;
  min-width: 0;
  padding: 16px 22px;
  font-family: inherit;
  font-size: 16px;
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(201, 168, 64, 0.35);
  border-radius: 100px;
  outline: none;
  transition: border-color 0.25s, background 0.25s, box-shadow 0.25s;
}
.lead-form input[type="email"]::placeholder {
  color: rgba(255, 255, 255, 0.5);
}
.lead-form input[type="email"]:focus {
  border-color: var(--gold);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 4px rgba(201, 168, 64, 0.18);
}
.lead-form .btn-primary {
  flex: 0 0 auto;
}
.lead-form--large input[type="email"] {
  padding: 20px 26px;
  font-size: 17px;
}
.lead-form-msg {
  flex: 1 0 100%;
  margin: 4px 0 0;
  min-height: 1.2em;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.75);
  text-align: center;
}
.lead-form-msg.is-error { color: #ff8b8b; }
.lead-form-msg.is-ok    { color: #a8e6a0; }

@media (max-width: 560px) {
  .lead-form { flex-direction: column; }
  .lead-form input[type="email"],
  .lead-form .btn-primary { width: 100%; flex: 1 1 auto; }
}

/* ================================================================
   LANDING — brand (logo + CREAVINCI) + eyebrow gradient + pitch
================================================================= */
.brand-logo {
  width: clamp(90px, 12vw, 140px);
  margin: 0 auto 14px;
  filter: drop-shadow(0 0 40px rgba(201, 168, 64, 0.45)) drop-shadow(0 0 80px rgba(123, 47, 190, 0.35));
}
.brand-name {
  font-size: clamp(20px, 2.2vw, 30px);
  font-weight: 900;
  letter-spacing: 0.28em;
  margin-bottom: 36px;
  background: var(--grad);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: gradShift 5s ease-in-out infinite alternate;
}

.eyebrow--gradient {
  background: linear-gradient(135deg, #9B4FE8 0%, #C9A840 100%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  border: 1px solid rgba(201, 168, 64, 0.4);
  box-shadow: 0 0 24px rgba(123, 47, 190, 0.25);
}

.hero-pitch {
  font-size: clamp(18px, 2vw, 26px);
  line-height: 1.45;
  font-weight: 600;
  color: #fff;
  max-width: 820px;
  margin: 0 auto 44px;
}
.hero-pitch strong {
  font-weight: 900;
  background: var(--grad);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

/* Lead form vertical (nombre + correo + botón apilados) */
.lead-form--stack {
  flex-direction: column;
  max-width: 460px;
  gap: 14px;
}
.lead-form--stack input[type="text"],
.lead-form--stack input[type="email"] {
  width: 100%;
  flex: 1 1 auto;
  padding: 18px 24px;
  font-size: 16px;
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(201, 168, 64, 0.35);
  border-radius: 100px;
  outline: none;
  font-family: inherit;
  transition: border-color 0.25s, background 0.25s, box-shadow 0.25s;
}
.lead-form--stack input[type="text"]::placeholder,
.lead-form--stack input[type="email"]::placeholder {
  color: rgba(255, 255, 255, 0.5);
}
.lead-form--stack input[type="text"]:focus,
.lead-form--stack input[type="email"]:focus {
  border-color: var(--gold);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 4px rgba(201, 168, 64, 0.18);
}
.lead-form--stack .btn-primary {
  width: 100%;
  margin-top: 6px;
}

/* ================================================================
   CASOS DE ÉXITO — marquee infinito
================================================================= */
#casos-marquee {
  background: transparent;
  padding: 60px 0 80px;
  position: relative;
  z-index: 1;
}
.marquee-label {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 28px;
}
.marquee {
  width: 100%;
  overflow: hidden;
  position: relative;
  padding: 18px 0;
  mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
}
.marquee-row {
  display: flex;
  width: max-content;
  animation: marqueeScroll 40s linear infinite;
}
.marquee-track {
  display: flex;
  align-items: center;
  gap: 64px;
  padding-right: 64px;
  flex: 0 0 auto;
}
.marquee-track img {
  height: 64px;
  width: auto;
  opacity: 0.78;
  filter: brightness(1.05) contrast(1.05);
  transition: opacity 0.3s, transform 0.3s;
}
.marquee-track img:hover {
  opacity: 1;
  transform: translateY(-2px);
}
@keyframes marqueeScroll {
  0%   { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-50%, 0, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .marquee-row { animation: none; }
}

/* ================================================================
   CTA FINAL
================================================================= */
#cta-final {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 120px 24px 120px;
  background:
    radial-gradient(ellipse 60% 40% at 50% 92%, rgba(123, 47, 190, 0.55), transparent 70%),
    radial-gradient(ellipse 40% 25% at 50% 92%, rgba(155, 79, 232, 0.35), transparent 75%);
}

.cta-inner {
  max-width: 900px;
  margin: 0 auto;
}

.cta-title {
  font-size: clamp(36px, 6vw, 80px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.035em;
  margin-bottom: 40px;
  color: #fff;
}
.cta-title .line-gradient {
  display: inline;
}

.footer-logo {
  display: block;
  width: 120px;
  margin: 60px auto 0;
  opacity: 0.95;
  filter:
    drop-shadow(0 0 30px rgba(155, 79, 232, 0.55))
    drop-shadow(0 0 60px rgba(123, 47, 190, 0.4))
    drop-shadow(0 0 120px rgba(201, 168, 64, 0.2));
}

/* ================================================================
   RESPONSIVE MOBILE
================================================================= */
/* Mobile: en portrait el canvas llena viewport (cover), cropeando los lados.
   Los textos tienen más ancho y se posicionan arriba/abajo del sujeto central. */
@media (max-width: 768px) {
  .cine-text {
    max-width: 86cqw;
  }
  .cine-text--top-right {
    top: 8%;
    right: 6%;
    font-size: clamp(24px, 6.2cqw, 52px);
    max-width: 86cqw;
  }
  .cine-text--serif.cine-text--top-right {
    font-size: clamp(28px, 7.5cqw, 56px);
  }
  .cine-text--left {
    top: 10%;
    left: 6%;
    transform: none;
    font-size: clamp(32px, 9cqw, 64px);
    max-width: 86cqw;
  }
  .cine-text--right {
    top: 10%;
    right: 6%;
    transform: none;
    font-size: clamp(32px, 9cqw, 64px);
    max-width: 86cqw;
  }
  .cine-text--top-center {
    top: 7%;
    font-size: clamp(22px, 6.2cqw, 44px);
    max-width: 92cqw;
  }
  .cine-text--center {
    top: 8%;
    font-size: clamp(26px, 7.8cqw, 54px);
    max-width: 92cqw;
  }
  .cine-logo {
    width: 46cqw;
    max-width: 240px;
    top: 12%;
  }

  .cine-scroll-hint {
    right: 20px;
    bottom: 120px;
    gap: 12px;
  }
  .scroll-mouse { width: 28px; height: 44px; border-radius: 16px; }
  .scroll-mouse span { top: 10px; width: 3.5px; height: 10px; }
  .scroll-hint-label { font-size: 12px; letter-spacing: 0.26em; }

  .cine-loader { padding: 40px 40px; }
  .cine-loader-logo { width: min(160px, 55vw); }

  #landing { padding: 110px 20px 70px; }
  #cta-final { padding: 80px 20px; }
  .brand-logo { width: clamp(72px, 22vw, 120px); }
  .brand-name { font-size: clamp(16px, 5vw, 22px); margin-bottom: 24px; }
  .hero-pitch { font-size: clamp(15px, 4.2vw, 18px); margin-bottom: 32px; }
  .marquee-track img { height: 48px; }
  .marquee-track { gap: 42px; padding-right: 42px; }
}

/* Preferencia reduced motion */
@media (prefers-reduced-motion: reduce) {
  .cine-frame, .cine-text, .cine-logo {
    transition-duration: 0.2s !important;
  }
  .btn-primary { animation: none; }
}
