/* =====================================================================================
   Neuron Tech - home hero (home page and the style tile only).
   It follows the theme: cool paper, a blue aurora and the dark leaning slab with a red core in light; ink and glow in dark. All colours are tokens
   from site.css. The signal pieces (.core, .sig-*, .bead) live in motion.css because the inner page heroes use them too.
   Sizes inside the stage are in cqi (1 % of the stage's width), so the whole picture scales as one.
   ===================================================================================== */
.hero {
  --pad-t: clamp(28px, 1.2rem + 2vw, 52px);
  position: relative; z-index: 5; isolation: isolate; overflow-x: clip; padding-top: var(--pad-t); color: var(--text); background: var(--bg);
}   /* z-index: the search card and its suggestions hang over the sections below */
.site-header ~ main > .hero:first-child { padding-top: calc(var(--head-h) + var(--pad-t)); }

/* ── Background: two slow auroras, a dot grid that fades out under the words, the neural canvas ── */
.hero__bg {   /* fades out before the lower edge, so the aurora is never cut off in a straight line */
  position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  -webkit-mask: linear-gradient(black calc(100% - 220px), transparent); mask: linear-gradient(black calc(100% - 220px), transparent);
}
.hero__aurora { position: absolute; border-radius: 50%; }
.hero__aurora--a { right: -14%; top: -30%; width: 72%; aspect-ratio: 1; background: radial-gradient(closest-side, var(--aurora-1), transparent); animation: nt-aurora 18s ease-in-out infinite alternate; }
.hero__aurora--b { left: -20%; bottom: -50%; width: 60%; aspect-ratio: 1; background: radial-gradient(closest-side, var(--aurora-2), transparent); animation: nt-aurora 24s ease-in-out -8s infinite alternate-reverse; }
.hero__dots {
  position: absolute; inset: 0; background: radial-gradient(circle at 1px 1px, var(--dot) 1px, transparent 0) 0 0 / 22px 22px;
  -webkit-mask: radial-gradient(62% 86% at 80% 42%, black 12%, transparent 82%); mask: radial-gradient(62% 86% at 80% 42%, black 12%, transparent 82%);
}
.hero__net { position: absolute; inset: 0; width: 100%; height: 100%; }
@keyframes nt-aurora { from { transform: none; } to { transform: translate(-5%, 7%) scale(1.14); } }

/* ── Words ── */
.hero__grid { display: grid; gap: clamp(32px, 2vw + 1rem, 56px); align-items: center; }
@media (min-width: 1000px) { .hero__grid { grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr); } }
.hero__badge {
  display: inline-flex; align-items: center; gap: 11px; margin: 0 0 var(--s-4); padding: 7px 16px 7px 13px; border: 1px solid var(--line); border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 86%, transparent); box-shadow: var(--shadow-1); color: var(--text); font-size: .84rem; font-weight: 700; line-height: 1.4;
  animation: nt-rise .6s var(--ease) backwards;
}
html[lang="bn"] .hero__badge { font-size: .92rem; }
.hero__led { position: relative; width: 9px; height: 9px; flex: none; border-radius: 50%; background: var(--led-on); box-shadow: 0 0 0 3px color-mix(in srgb, var(--led-on) 20%, transparent); }
.hero__led::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--led-on); animation: nt-ping 2.2s ease-out infinite; }
@keyframes nt-ping { 0% { opacity: .7; transform: none; } 75%, 100% { opacity: 0; transform: scale(3.2); } }

.hero__title { margin: 0 0 var(--s-4); font-size: var(--fs-hero); line-height: 1.06; letter-spacing: -.02em; }
html[lang="bn"] .hero__title { line-height: 1.32; letter-spacing: 0; }
.hero__title .w { animation: nt-word .8s var(--ease) backwards; animation-delay: calc(.1s + var(--w) * 70ms); }
/* The marked words: brand red, with a quiet grey marker drawn word by word in light */
.hl .w { position: relative; isolation: isolate; color: var(--hl-fg); }
.hl .w::before {
  content: ""; position: absolute; z-index: -1; left: -.04em; right: -.3em; bottom: .08em; height: .36em; border-radius: .06em; background: var(--hl-mark);
  transform: skewX(var(--lean)); transform-origin: 0 50%; animation: nt-mark .36s ease-out backwards; animation-delay: calc(.62s + var(--w) * 110ms);
}
.hl .w:last-child::before { right: -.06em; }
html[lang="bn"] .hl .w::before { bottom: .24em; }
[data-theme="dark"] .hl { text-shadow: 0 0 34px var(--brand-glow); }
@keyframes nt-mark { from { transform: skewX(var(--lean)) scaleX(0); } }

.hero__lead { margin: 0 0 var(--s-5); max-width: 32em; font-size: var(--fs-lead); color: var(--text-2); animation: nt-rise .7s var(--ease) .42s backwards; }
.hero .btn--ghost { --btn-bg: color-mix(in srgb, var(--surface) 80%, transparent); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px 16px; margin-bottom: var(--s-6); animation: nt-rise .7s var(--ease) .54s backwards; }
.proof { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; max-width: 36rem; list-style: none; }
.proof li {
  display: flex; align-items: center; gap: 12px; padding: 9px 14px 9px 9px; border: 1px solid var(--line); border-radius: var(--r-2);
  background: color-mix(in srgb, var(--surface) 82%, transparent); font-size: var(--fs-small); font-weight: 600; line-height: 1.35;
  transition: border-color .25s, transform .25s var(--ease); animation: nt-rise .6s var(--ease) backwards; animation-delay: calc(.66s + var(--i) * 80ms);
}
.proof__icon { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 9px; background: var(--ichip-bg); color: var(--ichip-fg); font-size: 1.05rem; transition: transform .35s var(--ease-pop); }
@media (hover: hover) { .proof li:hover { border-color: var(--edge); transform: translateY(-2px); } .proof li:hover .proof__icon { transform: rotate(-8deg) scale(1.08); } }

/* ── Stage ── */
.stage { position: relative; container: stage / inline-size; width: 100%; max-width: clamp(480px, calc((100svh - 250px) * 1.0714), 620px); aspect-ratio: 600 / 560; margin-inline: auto; }
.stage__svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.stage__slab {
  position: absolute; left: 22.5%; top: 1.5%; width: 55%; height: 97%; border-radius: 5.5cqi; transform: skewX(var(--lean));
  translate: calc(var(--px, 0) * -9px) calc(var(--py, 0) * -7px);
  background: radial-gradient(circle at 1px 1px, var(--slab-dot) 1px, transparent 0) 0 0 / 18px 18px, linear-gradient(200deg, var(--slab-1), var(--slab-2) 54%, var(--slab-3));
  box-shadow: inset 0 0 0 1px var(--slab-edge);
  animation: nt-slab-up .9s var(--ease) backwards, nt-slab-float 8s ease-in-out .9s infinite alternate;
}
.stage__slab--line {
  left: 28.5%; top: -2.5%; background: none; box-shadow: inset 0 0 0 2px var(--slab-edge); translate: calc(var(--px, 0) * -17px) calc(var(--py, 0) * -13px);
  animation: nt-slab-down .9s var(--ease) .1s backwards, nt-slab-float 10s ease-in-out 1s infinite alternate-reverse;
}
@keyframes nt-slab-up { from { opacity: 0; transform: skewX(var(--lean)) translateY(90px); } }
@keyframes nt-slab-down { from { opacity: 0; transform: skewX(var(--lean)) translateY(-90px); } }
@keyframes nt-slab-float { to { transform: skewX(var(--lean)) translateY(-10px); } }
.stage__core {
  left: 35.33%; top: 34.29%; width: 29.33%; translate: calc(var(--px, 0) * 5px) calc(var(--py, 0) * 5px);
  animation: nt-core-in .75s var(--ease-pop) .2s backwards;
}
.stage__core .core__body { box-shadow: 0 0 0 1px var(--core-edge), var(--core-halo), inset 0 1px 0 color-mix(in srgb, var(--white) 34%, transparent); }
@keyframes nt-core-in { from { opacity: 0; transform: scale(.55) rotate(-10deg); } }
/* First visit of a session: the mark's two halves slide together (html.boot, set by the head script) */
html.boot .hero .slab--l { animation: nt-slab-l .8s var(--ease) .5s backwards; }
html.boot .hero .slab--r { animation: nt-slab-r .8s var(--ease) .58s backwards; }
@keyframes nt-slab-l { from { opacity: 0; transform: translate(-8px, 78px); } }
@keyframes nt-slab-r { from { opacity: 0; transform: translate(8px, -78px); } }

/* ── The four live cards ── */
.lives { margin: 0; padding: 0; list-style: none; }
.live {
  position: absolute; z-index: 3; width: 38.67%; height: 26.79%;
  animation: nt-live-in .7s var(--ease-pop) backwards, nt-float 7s ease-in-out infinite;
  animation-delay: calc(.55s + var(--i) * .12s), calc(var(--i) * -1.9s);
}
.live--a { left: 0; top: 3.93%; }
.live--b { left: 61.33%; top: 0; }
.live--c { left: 0; top: 72.86%; }
.live--d { left: 61.33%; top: 69.29%; }
@keyframes nt-live-in { from { opacity: 0; transform: scale(.8) translateY(18px); } }
@keyframes nt-float { 50% { translate: 0 -8px; } }
.live__card {
  position: relative; display: flex; flex-direction: column; gap: clamp(8px, 1.7cqi, 12px); height: 100%; padding: clamp(10px, 2.3cqi, 15px);
  border: 1px solid var(--line); border-radius: var(--r-2); background: var(--surface); box-shadow: var(--shadow-3); color: var(--text); text-decoration: none;
  transform: translate(calc(var(--px, 0) * 10px), calc(var(--py, 0) * 9px)); transition: translate .3s var(--ease), border-color .25s;
}
.live__card:hover { border-color: var(--edge); translate: 0 -5px; text-decoration: none; }
/* The lit edge: under the pointer, and for a moment when the signal arrives */
.live__card::after {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; box-shadow: 0 0 0 2px var(--edge), 0 0 28px var(--glow-3); opacity: 0; pointer-events: none;
  animation: nt-hit 5.2s linear infinite; animation-delay: calc(1.9s + var(--i) * 1.3s);
}
.live__card:hover::after { opacity: 1; animation: none; }
@keyframes nt-hit { 0%, 23% { opacity: 0; } 27% { opacity: 1; } 52%, 100% { opacity: 0; } }
.live__head { display: flex; align-items: center; gap: clamp(7px, 1.5cqi, 10px); min-height: clamp(26px, 5.4cqi, 34px); font-size: clamp(.76rem, 2.45cqi, .95rem); font-weight: 700; line-height: 1.22; }
.live__icon { display: grid; place-items: center; width: clamp(26px, 5.4cqi, 34px); aspect-ratio: 1; flex: none; border-radius: 9px; background: var(--ichip-bg); color: var(--ichip-fg); font-size: clamp(.86rem, 2.7cqi, 1.05rem); transition: transform .35s var(--ease-pop); }
.live__card:hover .live__icon { transform: rotate(-8deg) scale(1.1); }
.live__view { position: relative; display: block; flex: 1; min-height: 0; }

/* Products: three real ones turn over */
.lv-shop__item { position: absolute; inset: 0; display: flex; align-items: center; gap: clamp(8px, 1.8cqi, 12px); opacity: 0; }
.lv-shop__item:first-child { opacity: 1; }
.lv-shop--turn .lv-shop__item { animation: nt-turn 12s infinite; animation-delay: calc(var(--k) * 4s - .6s); }
@keyframes nt-turn { 0% { opacity: 0; transform: translateY(9px); } 5%, 31% { opacity: 1; transform: none; } 36%, 100% { opacity: 0; transform: translateY(-9px); } }
.lv-shop__pic { width: 41%; flex: none; box-shadow: none; }
.lv-shop__text { display: grid; gap: 3px; min-width: 0; line-height: 1.28; }
.lv-shop__name { display: -webkit-box; overflow: hidden; color: var(--text-2); font-size: clamp(.68rem, 2.05cqi, .8rem); font-weight: 600; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.lv-shop__text b { overflow: hidden; font-family: var(--font-display); font-size: clamp(.8rem, 2.6cqi, 1rem); text-overflow: ellipsis; white-space: nowrap; }
/* Icon row: products without photos, or the PC builder's parts */
.lv-icons { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(6px, 1.4cqi, 9px); align-items: center; }
.lv-icons > span { display: grid; place-items: center; aspect-ratio: 1; border-radius: 9px; background: var(--surface-2); color: var(--accent-text); font-size: clamp(1rem, 3.2cqi, 1.25rem); animation: nt-hop 4.8s ease-in-out infinite; }
.lv-icons > span:nth-child(2) { animation-delay: .35s; } .lv-icons > span:nth-child(3) { animation-delay: .7s; } .lv-icons > span:nth-child(4) { animation-delay: 1.05s; }
@keyframes nt-hop { 0%, 22%, 100% { transform: none; background: var(--surface-2); color: var(--accent-text); } 11% { transform: translateY(-5px); background: var(--brand); color: var(--on-brand); } }
/* Repair: the stages light up along the line */
.lv-rep { display: grid; align-content: center; }
.lv-rep__row { --dot-d: clamp(13px, 2.9cqi, 17px); position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-inline: -6px; }
.lv-rep__row::before, .lv-rep__row::after { content: ""; position: absolute; left: 12.5%; right: 12.5%; top: calc(var(--dot-d) / 2 - 1px); height: 2px; border-radius: 2px; background: var(--line-strong); }
.lv-rep__row::after { background: var(--led-on); transform-origin: 0 50%; animation: nt-rep-line 8s linear infinite; }
.lv-rep__stop { position: relative; z-index: 1; display: grid; justify-items: center; gap: 6px; color: var(--text-2); font-size: clamp(.6rem, 1.8cqi, .7rem); font-weight: 700; letter-spacing: -.01em; line-height: 1.2; white-space: nowrap; }
.lv-rep__stop i { position: relative; width: var(--dot-d); height: var(--dot-d); border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 2px var(--line-strong); }
.lv-rep__stop i::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--led-on); box-shadow: 0 0 0 4px color-mix(in srgb, var(--led-on) 18%, transparent); animation: nt-rep-1 8s linear infinite; }
.lv-rep__stop:nth-child(2) i::after { animation-name: nt-rep-2; }
.lv-rep__stop:nth-child(3) i::after { animation-name: nt-rep-3; }
.lv-rep__stop:nth-child(4) i::after { animation-name: nt-rep-4; }
@keyframes nt-rep-line { 0%, 4% { transform: scaleX(0); opacity: 1; } 70%, 90% { transform: none; opacity: 1; } 95%, 100% { transform: none; opacity: 0; } }
@keyframes nt-rep-1 { 0%, 2% { opacity: 0; } 5%, 90% { opacity: 1; } 95%, 100% { opacity: 0; } }
@keyframes nt-rep-2 { 0%, 24% { opacity: 0; } 27%, 90% { opacity: 1; } 95%, 100% { opacity: 0; } }
@keyframes nt-rep-3 { 0%, 46% { opacity: 0; } 49%, 90% { opacity: 1; } 95%, 100% { opacity: 0; } }
@keyframes nt-rep-4 { 0%, 68% { opacity: 0; } 71%, 90% { opacity: 1; } 95%, 100% { opacity: 0; } }
@container stage (max-width: 530px) { .lv-rep__stop:nth-child(2) span { visibility: hidden; } }   /* four words do not fit in a small card */
/* CCTV: a small feed whose camera sweeps */
.lv-cam { display: block; width: 100%; height: 100%; overflow: hidden; border-radius: 8px; }
.lv-cam__bg { fill: var(--ink); }
.lv-cam__grid { fill: none; stroke: var(--graphite); stroke-width: 1; }
.lv-cam__cone { fill: color-mix(in srgb, var(--blue-on-ink) 30%, transparent); stroke: var(--blue-on-ink); stroke-width: 1; transform-origin: 14px 10px; animation: nt-sweep 5s ease-in-out infinite alternate; }
.lv-cam__aim { fill: none; stroke: var(--white); stroke-width: 2; stroke-linecap: round; transform-box: fill-box; transform-origin: center; animation: nt-aim 2.6s ease-in-out infinite; }
.lv-cam__dot { fill: var(--ink); stroke: var(--blue-on-ink); stroke-width: 3; }
.lv-cam__rec { fill: var(--red); animation: nt-blink 1.4s steps(2, jump-none) infinite; }
@keyframes nt-sweep { from { transform: rotate(-10deg); } to { transform: rotate(13deg); } }
@keyframes nt-aim { 50% { transform: scale(.84); opacity: .65; } }
@keyframes nt-blink { from { opacity: 1; } to { opacity: .2; } }
/* Software: bars that breathe */
.lv-bars { display: flex; align-items: flex-end; gap: 6%; border-bottom: 2px solid var(--line-strong); }
.lv-bars i { flex: 1; height: var(--h); border-radius: 4px 4px 0 0; background: var(--line-strong); transform-origin: 50% 100%; animation: nt-bar 2.6s ease-in-out infinite alternate; animation-delay: calc(var(--k) * -.62s); }
.lv-bars i:nth-child(3n) { background: var(--text-3); }
.lv-bars i:nth-child(4n+2) { background: var(--sig); box-shadow: inset 0 0 0 1px var(--edge); }
@keyframes nt-bar { from { transform: scaleY(.5); } to { transform: none; } }

/* ── Search card: hangs over the lower edge ── */
.hero__search { position: relative; z-index: 2; margin-top: clamp(30px, 3.2vw, 46px); padding: 10px 10px 10px 20px; transform: translateY(50%); box-shadow: var(--shadow-3); animation: nt-fade .7s ease-out .8s backwards; }
.hero + .after-hero { padding-top: calc(var(--sec-pad) + 40px); }
.hero + .ticker { padding-top: 44px; border-top: 0; }   /* the search card hangs over the band */

/* ── Sizes ── */
@media (min-width: 1000px) and (max-height: 780px) { .hero { --fs-hero: clamp(2.25rem, 1.1rem + 2.9vw, 3.4rem); --pad-t: 16px; } .hero__actions, .hero__lead { margin-bottom: var(--s-4); } .hero__search { margin-top: 24px; } }
@media (min-width: 1000px) and (max-width: 1099px) { .hero { --fs-hero: 3rem; } }   /* tablets on their side: two columns */
@media (max-width: 999px) { .hero__aurora--a { right: -30%; top: 24%; width: 120%; } .hero__dots { -webkit-mask: linear-gradient(transparent 12%, black 60%); mask: linear-gradient(transparent 12%, black 60%); } }
@media (min-width: 720px) and (max-width: 999px) { .proof { grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: none; } .proof li { gap: 9px; padding: 8px 10px 8px 8px; font-size: .82rem; } .proof__icon { width: 32px; height: 32px; } }
/* Phones: the cards in two columns, the chip in the cross between them, plain lines instead of the PCB tracks */
@media (max-width: 575px) {
  .hero__badge { font-size: .78rem; }
  html[lang="bn"] .hero__badge { font-size: .86rem; }
  .hero__actions .btn { flex: 1 1 100%; }
  .proof { gap: 8px; }
  .proof li { gap: 9px; padding: 8px 9px 8px 8px; font-size: .8rem; }
  .proof__icon { width: 30px; height: 30px; font-size: .95rem; }
  .stage { max-width: none; aspect-ratio: auto; }
  .stage__svg { display: none; }
  .stage::before {
    content: ""; position: absolute; z-index: 1; left: 25%; right: 25%; top: 50%; height: 136px; transform: translateY(-50%);   /* the ends run on under the cards */
    border-inline: 2px solid var(--trace-c); background: linear-gradient(var(--trace-c), var(--trace-c)) center / 100% 2px no-repeat;
  }
  .stage__slab { left: 20%; width: 60%; top: 5%; height: 90%; border-radius: 26px; }
  .stage__slab--line { left: 26%; top: 2%; }
  .stage__core { left: calc(50% - 42px); top: calc(50% - 42px); width: 84px; }
  .lives { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 112px 12px; }
  .live--a, .live--b, .live--c, .live--d { position: relative; inset: auto; width: auto; height: auto; }
  .live__card { padding: 12px; box-shadow: var(--shadow-2); }
  .live__head { font-size: .84rem; min-height: 36px; }
  .live__icon { width: 30px; }
  .live__view { min-height: 64px; }
  .lv-bars { flex: none; height: 64px; }   /* the bars are % of it */
  .hero__search { padding: 8px 8px 8px 14px; }
}
@media (max-width: 359px) { .live__icon { display: none; } }
