/* ==========================================================================
   videodemo.p9tech.es — sistema de diseño heredado de p9tech.ai / apps.p9tech.es
   ========================================================================== */

:root {
  --bg:            #07070b;
  --surface:       rgba(255, 255, 255, 0.035);
  --surface-2:     rgba(255, 255, 255, 0.06);
  --border:        rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.18);
  --text:          #f5f6f8;
  --text-2:        rgba(245, 246, 248, 0.72);
  --text-3:        rgba(245, 246, 248, 0.5);
  --text-4:        rgba(245, 246, 248, 0.32);

  --accent:        #7dd3fc;
  --accent-2:      #a78bfa;

  --ok:            #6ee7b7;
  --warn:          #fbbf24;
  --off:           rgba(245, 246, 248, 0.32);

  --grad-accent:   linear-gradient(120deg, #7dd3fc 0%, #a78bfa 50%, #f0abfc 100%);
  --grad-text:     linear-gradient(180deg, #ffffff 0%, #b8c0cc 100%);

  --maxw:          1240px;
  --pad-x:         clamp(20px, 4vw, 56px);
  --radius:        18px;
  --radius-lg:     26px;

  --ease-out:      cubic-bezier(.16, 1, .3, 1);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}

img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--accent); color: #07070b; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ==========================================================================
   Fondo
   ========================================================================== */
.bg-stage {
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(1200px 800px at 80% -10%, rgba(167, 139, 250, .14), transparent 60%),
    radial-gradient(1000px 700px at -10% 30%, rgba(125, 211, 252, .10), transparent 55%),
    radial-gradient(900px 700px at 50% 110%, rgba(96, 165, 250, .10), transparent 55%),
    linear-gradient(180deg, #06060a 0%, #08080f 50%, #06060a 100%);
  overflow: hidden;
}

.bg-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 20%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 20%, #000 30%, transparent 75%);
}

.bg-canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .5; }

.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .5;
  pointer-events: none;
  will-change: transform;
}
.bg-orb--a {
  width: 520px; height: 520px;
  background: radial-gradient(circle, rgba(125,211,252,.55), transparent 70%);
  top: -140px; left: -120px;
  animation: floatA 22s ease-in-out infinite;
}
.bg-orb--b {
  width: 620px; height: 620px;
  background: radial-gradient(circle, rgba(167,139,250,.45), transparent 70%);
  bottom: -220px; right: -160px;
  animation: floatB 26s ease-in-out infinite;
}
@keyframes floatA { 0%,100% { transform: translate(0,0); } 50% { transform: translate(120px, 80px); } }
@keyframes floatB { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-90px,-60px); } }

.bg-noise {
  position: absolute; inset: 0; pointer-events: none;
  opacity: .045;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ==========================================================================
   Reveal
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s var(--ease-out), transform .8s var(--ease-out);
}
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .bg-orb { animation: none !important; }
  html { scroll-behavior: auto; }
}

/* ==========================================================================
   Nav
   ========================================================================== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--pad-x);
  border-bottom: 1px solid transparent;
  transition: background .3s, border-color .3s, padding .3s, backdrop-filter .3s;
}
.nav.is-scrolled {
  background: rgba(7, 7, 11, 0.72);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom-color: var(--border);
  padding-top: 12px; padding-bottom: 12px;
}

.nav__brand { display: inline-flex; align-items: center; gap: 12px; }
.nav__mark {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px;
  border-radius: 9px;
  background: #fff; color: #07070b;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700; font-size: 15px;
  letter-spacing: -.02em;
  box-shadow: 0 0 0 1px rgba(255,255,255,.1), 0 8px 24px rgba(125,211,252,.18);
}
.nav__wordmark {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600; letter-spacing: -.02em;
  font-size: 17px;
}
.nav__dot { color: var(--accent); }

.nav__cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  font-size: 14px; font-weight: 500;
  color: var(--text-2);
  transition: color .2s, border-color .2s, gap .2s, background .2s;
}
.nav__cta:hover { color: var(--text); border-color: #fff; background: var(--surface-2); gap: 11px; }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(130px, 18vh, 180px) var(--pad-x) clamp(32px, 5vw, 52px);
}
.hero--center {
  text-align: center;
  display: flex; flex-direction: column; align-items: center;
  min-height: 78vh; justify-content: center;
}
.hero--center .hero__sub { margin-left: auto; margin-right: auto; }

.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 14px 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 12px; color: var(--text-2);
  letter-spacing: .14em; text-transform: uppercase;
  font-weight: 500;
  width: max-content; max-width: 100%;
  margin-bottom: 30px;
  backdrop-filter: blur(8px);
}
.hero__eyebrow .dot {
  flex-shrink: 0;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(125,211,252,.18);
  animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 4px rgba(125,211,252,.18); }
  50%     { box-shadow: 0 0 0 8px rgba(125,211,252,.06); }
}

.hero__title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: clamp(38px, 6vw, 76px);
  line-height: 1.05;
  letter-spacing: -.035em;
  margin-bottom: 26px;
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__title span { display: block; padding-bottom: .06em; }
.hero__title--accent {
  background: var(--grad-accent);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-style: italic; font-weight: 500;
  font-size: .5em;
  letter-spacing: -.01em;
}

.hero__sub {
  font-size: clamp(16px, 1.4vw, 18px);
  color: var(--text-2);
  max-width: 640px;
  line-height: 1.65;
  margin-bottom: 32px;
}
.hero__sub strong { color: var(--text); font-weight: 600; }

/* Mensaje personalizado para el cliente */
.note {
  display: flex; gap: 14px; align-items: flex-start;
  max-width: 640px;
  padding: 18px 22px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  border-left: 2px solid var(--accent);
  background: var(--surface);
}
.note svg { flex-shrink: 0; margin-top: 3px; color: var(--accent); }
.note p { color: var(--text-2); font-size: 15px; line-height: 1.6; }

/* ==========================================================================
   Secciones
   ========================================================================== */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad-x) clamp(56px, 8vw, 100px);
}
.section--player { padding-bottom: clamp(40px, 6vw, 72px); }
.section--cta    { padding-top: clamp(12px, 3vw, 28px); }

.kicker {
  display: inline-flex; align-items: center; gap: 14px;
  font-size: 12px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--text-2);
  margin-bottom: 20px;
}
.kicker__n {
  display: inline-block; padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--accent);
  font-weight: 600; letter-spacing: .1em;
}

/* ==========================================================================
   Reproductor
   ========================================================================== */
.player {
  position: relative;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  background: #000;
  overflow: hidden;
  box-shadow:
    0 40px 120px rgba(0, 0, 0, .55),
    0 0 0 1px rgba(255, 255, 255, .04);
}
.player::before {
  /* Halo de acento que asoma por detrás del marco */
  content: '';
  position: absolute; inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, var(--accent), transparent 45%, var(--accent-2));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: .5;
  pointer-events: none;
}
.player__video {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  background: #000;
  object-fit: contain;
}
.player__glow {
  position: absolute; inset: auto -10% -60% -10%;
  height: 240px;
  background: radial-gradient(ellipse at center, color-mix(in srgb, var(--accent) 28%, transparent), transparent 70%);
  filter: blur(60px);
  z-index: -1;
  pointer-events: none;
}

.player--empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px;
  aspect-ratio: 16 / 9;
  background: var(--surface);
  border-style: dashed;
  color: var(--text-3);
  text-align: center;
  padding: 32px;
}
.player--empty p { max-width: 380px; font-size: 15px; }

/* ==========================================================================
   Cuerpo: descripción + puntos clave
   ========================================================================== */
.split {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

.prose p {
  color: var(--text-2);
  font-size: 16.5px;
  line-height: 1.75;
  margin-bottom: 18px;
  max-width: 62ch;
}
.prose p:last-child { margin-bottom: 0; }

.highlights {
  padding: 28px 26px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: linear-gradient(165deg, rgba(255,255,255,.045), rgba(255,255,255,0) 60%);
}
.highlights ul { list-style: none; display: grid; gap: 16px; }
.highlights li { display: flex; gap: 12px; align-items: flex-start; }
.highlights svg { flex-shrink: 0; margin-top: 3px; color: var(--accent); }
.highlights span { color: var(--text-2); font-size: 14.5px; line-height: 1.55; }

/* ==========================================================================
   Botones y CTA
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 26px;
  border-radius: 999px;
  font-size: 15px; font-weight: 600;
  white-space: nowrap;
  transition: transform .2s var(--ease-out), gap .2s, box-shadow .2s;
}
.btn--primary {
  background: #fff; color: #07070b;
  box-shadow: 0 12px 36px rgba(255,255,255,.08), 0 0 0 1px rgba(255,255,255,.5);
}
.btn--primary:hover {
  transform: translateY(-2px); gap: 14px;
  box-shadow: 0 20px 60px rgba(125,211,252,.28), 0 0 0 1px rgba(255,255,255,.7);
}

.cta-card {
  display: flex; align-items: center; justify-content: space-between; gap: 36px;
  flex-wrap: wrap;
  padding: 44px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  background:
    radial-gradient(600px 280px at 80% 50%, rgba(167,139,250,.16), transparent 70%),
    radial-gradient(500px 240px at 0% 100%, rgba(125,211,252,.12), transparent 70%),
    linear-gradient(135deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  position: relative; overflow: hidden;
}
.cta-card::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 30px 30px;
  mask: radial-gradient(ellipse at center, #000 30%, transparent 80%);
  -webkit-mask: radial-gradient(ellipse at center, #000 30%, transparent 80%);
  pointer-events: none;
}
.cta-card > * { position: relative; }
.cta-card__eyebrow {
  font-size: 12px; color: var(--accent);
  letter-spacing: .2em; text-transform: uppercase;
  font-weight: 500;
  margin-bottom: 10px;
}
.cta-card__h {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(21px, 2.2vw, 28px);
  font-weight: 600;
  letter-spacing: -.02em;
  max-width: 560px;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.foot {
  border-top: 1px solid var(--border);
  padding: 70px var(--pad-x) 32px;
  max-width: var(--maxw);
  margin: 0 auto;
}
.foot__inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 56px;
}
@media (max-width: 880px) { .foot__inner { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .foot__inner { grid-template-columns: 1fr; gap: 32px; } }

.foot__wordmark {
  display: inline-block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px; font-weight: 600; letter-spacing: -.02em;
  margin-bottom: 14px;
}
.foot__wordmark span { color: var(--accent); }
.foot__brand p { color: var(--text-3); font-style: italic; font-size: 14px; }
.foot__col h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .18em;
  color: var(--accent);
  margin-bottom: 14px;
}
.foot__col p { color: var(--text-2); font-size: 14.5px; }
.foot__col a { transition: color .2s; }
.foot__col a:hover { color: var(--accent); }

.foot__bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  color: var(--text-4);
  font-size: 12.5px;
  letter-spacing: .04em;
  flex-wrap: wrap; gap: 12px;
}
.foot__bottom-r { letter-spacing: .2em; text-transform: uppercase; color: var(--text-3); }

/* ==========================================================================
   Móvil
   ========================================================================== */
@media (max-width: 640px) {
  .hero { padding-top: 116px; }
  .hero__eyebrow { letter-spacing: .1em; line-height: 1.45; }
  .cta-card { padding: 30px 24px; }
  .highlights { padding: 24px 22px; }
}
