/* Jilance Neon – cinematic hero, scroll reveal and card tilt.
   All motion is wrapped in prefers-reduced-motion: no-preference.
   With reduced motion the hero shows a calm, static final state. */

.hero.cine {
  --dur: 5200ms;
  --cy: #78f8ff;
  --vi: #b39bff;
  --pk: #ff9de6;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  align-items: stretch;
  min-height: 600px;
  background:
    radial-gradient(ellipse 60% 70% at 78% 45%, #3a1670 0%, transparent 62%),
    radial-gradient(ellipse 50% 60% at 8% 100%, #0f2c5a 0%, transparent 60%),
    #0b0618;
}

/* ---------- ambient effects ---------- */
.fx {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.fx-beams i {
  position: absolute;
  top: -30%;
  left: var(--x);
  width: 22%;
  height: 150%;
  transform-origin: 50% 0;
  transform: rotate(var(--r));
  background: linear-gradient(180deg, #9fe9ff55, #b39bff22 45%, transparent 75%);
  filter: blur(14px);
  mix-blend-mode: screen;
  opacity: .5;
}
.fx-beams i:nth-child(1) { --x: 36%; --r: 18deg; }
.fx-beams i:nth-child(2) { --x: 56%; --r: -14deg; background: linear-gradient(180deg, #ff9de655, #b39bff22 45%, transparent 75%); }
.fx-beams i:nth-child(3) { --x: 70%; --r: 6deg; }
.fx-grid {
  inset: auto -25% 0 -25%;
  height: 46%;
  background-image:
    linear-gradient(#b39bff33 1px, transparent 1px),
    linear-gradient(90deg, #b39bff33 1px, transparent 1px);
  background-size: 48px 48px;
  transform: perspective(380px) rotateX(62deg);
  transform-origin: 50% 100%;
  -webkit-mask-image: linear-gradient(0deg, #000 0%, transparent 88%);
  mask-image: linear-gradient(0deg, #000 0%, transparent 88%);
}
.fx-dust {
  width: 100%;
  height: 100%;
}

/* ---------- copy ---------- */
.cine-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 52px 3% 92px 5.5%;
}
.slides { position: relative; display: grid; }
.slide {
  grid-area: 1 / 1;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}
.slide.is-active { visibility: visible; opacity: 1; pointer-events: auto; }
.cine .headline {
  margin: 18px 0 18px;
  max-width: 11ch;
  color: #fff;
  font-size: clamp(46px, 5.6vw, 86px);
  font-weight: 850;
  line-height: .94;
  letter-spacing: -.06em;
  text-wrap: balance;
  text-shadow: 0 0 28px #8c5cff66;
}
.cine .headline em { font-style: normal; }
.cine .headline em .w,
.cine .headline em {
  background: linear-gradient(100deg, #c6b0ff 0%, #ff9de6 60%, #ffc095 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
}
.cine .headline .w { display: inline-block; }
.cine .slide p { max-width: 36ch; color: #eee0fb; line-height: 1.6; }

/* ---------- slide navigation ---------- */
.cine-nav {
  position: absolute;
  z-index: 3;
  left: 2.7%;
  bottom: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.segs { display: flex; gap: 8px; flex-wrap: wrap; }
.seg, .pause {
  position: relative;
  min-height: 44px;
  padding: 6px 13px 10px;
  overflow: hidden;
  border: 1px solid #ffffff2e;
  border-radius: 10px;
  background: #1a0d3066;
  color: #cdbbe6;
  font-size: .8125rem;
  font-weight: 700;
  text-align: left;
}
.pause { padding: 6px 14px 10px; }
.seg span { opacity: .6; margin-right: 4px; }
.seg:hover, .pause:hover { border-color: #b39bffaa; color: #fff; }
.seg.is-active { color: #fff; border-color: #b39bffaa; background: #2a1450aa; }
.seg .fill {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--cy), var(--pk));
  transform: scaleX(0);
  transform-origin: left;
}
.seg.is-active .fill { transform: scaleX(1); }
.pause[hidden] { display: none; }

/* ---------- stage ---------- */
.stage {
  position: relative;
  z-index: 2;
  min-height: 460px;
  --px: 0;
  --py: 0;
}
.stage .defs { position: absolute; width: 0; height: 0; }
.stage-glow {
  position: absolute;
  inset: 10% 8%;
  border-radius: 50%;
  background: radial-gradient(closest-side, #9a5cff66, #ff5fd233 55%, transparent 74%);
  filter: blur(10px);
}
.scene {
  position: absolute;
  inset: 0;
  visibility: hidden;
  opacity: 0;
  transition: opacity .5s, visibility 0s .5s;
}
.scene.is-active {
  visibility: visible;
  opacity: 1;
  transition: opacity .4s, visibility 0s;
}
.par {
  position: absolute;
  inset: 7% 4% 11%;
  display: grid;
  place-items: center;
  transform: translate3d(calc(var(--px) * -18px), calc(var(--py) * -12px), 0);
  transition: transform .25s ease-out;
}
.float { display: grid; place-items: center; width: 100%; height: 100%; }
.prod {
  display: block;
  height: 100%;
  width: auto;
  max-width: 100%;
  max-height: 520px;
  aspect-ratio: 1;
  object-fit: cover;
  -webkit-mask-image: radial-gradient(closest-side, #000 58%, transparent 98%);
  mask-image: radial-gradient(closest-side, #000 58%, transparent 98%);
}

/* light trails */
.trail {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.arc {
  fill: none;
  stroke-linecap: round;
  stroke-dasharray: 1 1;
  opacity: .8;
}
.arc-a { stroke: url(#jn-trail); stroke-width: 3; filter: drop-shadow(0 0 6px #78f8ff); }
.arc-b { stroke: #ffd6f6; stroke-width: 4; stroke-dasharray: .16 2; stroke-dashoffset: -1; opacity: 0; filter: drop-shadow(0 0 7px #ff7be5); }

/* HUD panels */
.hud { position: absolute; inset: 0; }
.chip {
  position: absolute;
  top: var(--t);
  right: var(--r, auto);
  left: var(--l, auto);
  min-width: 156px;
  padding: 10px 14px 13px;
  border: 1px solid #7ee6ff88;
  border-radius: 10px;
  background: linear-gradient(160deg, #0f1f3ccc, #1b0d3acc);
  box-shadow: 0 0 22px #4fd0ff2e, inset 0 0 18px #7ee6ff14;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.chip small {
  display: inline-block;
  margin: -10px 0 7px -14px;
  padding: 2px 10px 2px 14px;
  border-radius: 0 0 8px 0;
  background: linear-gradient(90deg, var(--cy), #9be3ff);
  color: #06101e;
  font-size: .6875rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.chip b { display: block; color: #fff; font-size: 1.35rem; font-weight: 850; letter-spacing: -.02em; white-space: nowrap; }
.meter { display: block; height: 4px; margin-top: 9px; overflow: hidden; border-radius: 4px; background: #ffffff1f; }
.meter u {
  display: block;
  width: calc(var(--v) * 100%);
  height: 100%;
  background: linear-gradient(90deg, var(--cy), var(--pk));
  transform-origin: left;
}
.ring {
  position: absolute;
  top: var(--t);
  left: var(--l);
  display: grid;
  place-items: center;
  width: 118px;
  height: 118px;
}
.ring svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; transform: rotate(-90deg); }
.ring .bg { fill: #0d1a3399; stroke: #ffffff22; stroke-width: 5; }
.ring .fg {
  fill: none;
  stroke: var(--cy);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: var(--v) 1;
  filter: drop-shadow(0 0 6px var(--cy));
}
.ring div { position: relative; text-align: center; line-height: 1.1; }
.ring b { display: block; color: #fff; font-size: 1.6rem; font-weight: 850; }
.ring small { color: #bfeaff; font-size: .6875rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }

/* product callout (like the "hawk-eye" label in the video) */
.callout {
  position: absolute;
  left: 2%;
  bottom: 14%;
  padding: 9px 14px 10px;
  border-left: 3px solid var(--cy);
  border-radius: 0 10px 10px 0;
  background: #0d1a33d9;
  box-shadow: 0 0 20px #4fd0ff25;
}
.callout small { display: block; color: #8fdcff; font-size: .6875rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.callout b { display: block; margin: 2px 0; color: #fff; font-size: 1.05rem; }
.callout .price { color: #8ff7ff; font-weight: 800; }

/* spark burst */
.burst { position: absolute; left: 50%; top: 42%; width: 0; height: 0; z-index: 4; pointer-events: none; }
.burst b {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  transform: translate(-50%, -50%) scale(.2) rotate(-6deg);
  color: #fff;
  font-size: clamp(34px, 5vw, 64px);
  font-weight: 900;
  letter-spacing: -.04em;
  text-transform: uppercase;
  white-space: nowrap;
  text-shadow: 0 0 12px #78f8ff, 0 0 34px #b39bff, 0 0 60px #ff5fd2;
}
.burst .rays {
  position: absolute;
  left: -190px;
  top: -190px;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  opacity: 0;
  background: repeating-conic-gradient(#cdf9ffcc 0 4deg, transparent 4deg 15deg);
  -webkit-mask-image: radial-gradient(closest-side, transparent 18%, #000 32%, transparent 100%);
  mask-image: radial-gradient(closest-side, transparent 18%, #000 32%, transparent 100%);
}
.burst.mini .rays { transform: scale(.55); }
.spark {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  opacity: 0;
  background: #fff;
  box-shadow: 0 0 8px 2px #8ff7ff, 0 0 14px 4px #ff7be5aa;
}

/* ---------- motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .fx-beams i { animation: jn-beam 7s ease-in-out infinite alternate; }
  .fx-beams i:nth-child(2) { animation-duration: 9s; animation-delay: -3s; }
  .fx-beams i:nth-child(3) { animation-duration: 11s; animation-delay: -6s; }
  .fx-grid { animation: jn-grid 2.6s linear infinite; }

  .slide.is-active .w { animation: jn-word .8s cubic-bezier(.2, .8, .2, 1) calc(var(--i, 0) * 90ms + 150ms) both; }
  .slide.is-active .eyebrow,
  .slide.is-active p,
  .slide.is-active .actions { animation: jn-rise .7s ease-out both; }
  .slide.is-active p { animation-delay: .55s; }
  .slide.is-active .actions { animation-delay: .75s; }

  .seg.is-active .fill { transform: scaleX(0); animation: jn-fill var(--dur) linear forwards; }
  .hero.is-paused .seg .fill { animation-play-state: paused; }

  .scene.is-active .prod { animation: jn-shot 1.1s cubic-bezier(.2, .7, .2, 1) both; }
  .scene.is-active .float { animation: jn-float 6s ease-in-out 1.1s infinite alternate; }
  .scene.is-active .arc-a { animation: jn-draw 1.3s cubic-bezier(.3, .6, .2, 1) .15s both, jn-pulse 3s ease-in-out 1.5s infinite alternate; }
  .scene.is-active .arc-b { animation: jn-comet 3.2s cubic-bezier(.45, .1, .3, 1) .5s infinite; }

  .scene.is-active .chip,
  .scene.is-active .ring,
  .scene.is-active .callout { animation: jn-chip .6s cubic-bezier(.2, .8, .2, 1) calc(var(--d, 0) * 160ms + 700ms) both; }
  .scene.is-active .callout { animation-delay: 1.15s; }
  .scene.is-active .chip { animation: jn-chip .6s cubic-bezier(.2, .8, .2, 1) calc(var(--d, 0) * 160ms + 700ms) both, jn-bob 4.2s ease-in-out calc(var(--d, 0) * 160ms + 1500ms) infinite alternate; }
  .scene.is-active .meter u { animation: jn-meter .9s ease-out calc(var(--d, 0) * 160ms + 1000ms) both; }
  .scene.is-active .ring .fg { animation: jn-ring 1.3s ease-out .8s both; }
  .scene.is-active .type { animation: jn-type .8s steps(14, end) calc(var(--d, 0) * 160ms + 1000ms) both; }

  .hero.cine .burst.go .rays { animation: jn-rays .9s ease-out both; }
  .hero.cine .burst.go b { animation: jn-pop 1.5s cubic-bezier(.2, .9, .25, 1.2) both; }
  .burst.go .spark { animation: jn-spark var(--t) cubic-bezier(.1, .8, .3, 1) var(--delay) both; }

  .reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease-out, transform .7s ease-out; }
  .reveal.in { opacity: 1; transform: none; }
}
@keyframes jn-beam { to { transform: rotate(calc(var(--r) + 9deg)); opacity: .85; } }
@keyframes jn-grid { to { background-position: 0 48px; } }
@keyframes jn-word {
  from { opacity: 0; transform: translateY(.55em) rotateX(-40deg); filter: blur(8px); }
  to { opacity: 1; transform: none; filter: none; }
}
@keyframes jn-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes jn-fill { to { transform: scaleX(1); } }
@keyframes jn-shot {
  from { opacity: 0; transform: scale(1.28) translateX(9%) rotate(-3deg); filter: blur(10px) brightness(1.9); }
  to { opacity: 1; transform: none; filter: none; }
}
@keyframes jn-float { to { transform: translateY(-12px); } }
@keyframes jn-draw {
  0% { stroke-dashoffset: 1; opacity: 0; }
  12% { opacity: 1; }
  100% { stroke-dashoffset: 0; opacity: .85; }
}
@keyframes jn-pulse { from { opacity: .5; } to { opacity: 1; } }
@keyframes jn-comet {
  0% { stroke-dashoffset: .16; opacity: 1; }
  55% { stroke-dashoffset: -1; opacity: 1; }
  56%, 100% { stroke-dashoffset: -1; opacity: 0; }
}
@keyframes jn-chip {
  from { opacity: 0; transform: translateX(26px) scale(.94); filter: blur(5px); }
  to { opacity: 1; transform: none; filter: none; }
}
@keyframes jn-bob { to { transform: translateY(-6px); } }
@keyframes jn-meter { from { transform: scaleX(0); } }
@keyframes jn-ring { from { stroke-dasharray: 0 1; } }
@keyframes jn-type { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes jn-rays {
  0% { opacity: 0; transform: scale(.2) rotate(0); }
  25% { opacity: 1; }
  100% { opacity: 0; transform: scale(1.15) rotate(24deg); }
}
@keyframes jn-pop {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.2) rotate(-6deg); }
  22% { opacity: 1; transform: translate(-50%, -50%) scale(1.18) rotate(-4deg); }
  38% { transform: translate(-50%, -50%) scale(1) rotate(-4deg); }
  80% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.06) rotate(-4deg); }
}
@keyframes jn-spark {
  0% { opacity: 1; transform: rotate(var(--a)) translateX(0) scale(1); }
  100% { opacity: 0; transform: rotate(var(--a)) translateX(var(--d)) scale(.2); }
}

/* product card tilt (pointer devices only) */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .product { transition: border-color .2s, box-shadow .2s, transform .12s ease-out; }
  .product:hover { transform: perspective(800px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-4px); }
}

/* ---------- tablet / mobile ---------- */
@media (max-width: 1050px) {
  .hero.cine { min-height: 560px; }
  .cine .headline { font-size: clamp(42px, 6.4vw, 72px); }
  .chip { min-width: 138px; }
  .chip b { font-size: 1.15rem; }
}
@media (max-width: 700px) {
  .hero.cine {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    min-height: 0;
    border-radius: 20px;
    align-items: start;
  }
  .stage { order: 1; min-height: 0; height: 300px; }
  .cine-copy { order: 2; padding: 6px 18px 14px; }
  .cine-nav { order: 3; position: relative; left: auto; bottom: auto; padding: 0 18px 20px; z-index: 3; }
  .cine .headline { max-width: none; font-size: clamp(40px, 11.5vw, 56px); margin: 12px 0; }
  .par { inset: 4% 8% 14%; }
  .chip { min-width: 112px; padding: 8px 10px 10px; }
  .chip small { margin: -8px 0 5px -10px; padding-left: 10px; }
  .chip b { font-size: 1rem; }
  .chip + .chip,
  .hide-sm,
  .ring { display: none; }
  .callout { left: 0; bottom: 6%; padding: 6px 10px 7px; }
  .callout b { font-size: .9rem; }
  .callout small { font-size: .625rem; }
  .seg { font-size: .75rem; padding-inline: 10px; }
  .burst { top: 46%; }
}
