/* ═══════════════════════════════════════
   HELIA — hero-loop.css
   3-Scene Hero · Grid Canvas · Animations
═══════════════════════════════════════ */

/* ── HERO CONTAINER ── */
#HL {
  position: relative;
  background: transparent;
  z-index: 2;
  overflow: visible;
}

/* ── GRID CANVAS ── */
#HL-GC {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

/* ── SCENES ── */
.HL-SC {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 140px 52px 60px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .5s ease;
}
.HL-SC.on {
  opacity: 1;
  pointer-events: auto;
}
.HL-SC-IN {
  width: 100%;
  max-width: 1340px;
  margin: 0 auto;
}

/* ── SCENE ARROWS (left/right edge) ── */
.HL-ARR {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(139,92,246,.1);
  background: rgba(255,255,255,.25);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 2px 12px rgba(0,0,0,.04), inset 0 1px 0 rgba(255,255,255,.4);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--m);
  transition: all .25s;
  z-index: 20;
}
.HL-ARR:hover {
  background: #fff;
  border-color: rgba(139,92,246,.3);
  color: var(--p1);
}
.HL-ARR-L { left: 16px; }
.HL-ARR-R { right: 16px; }
.HL-ARR.HL-REPLAY {
  background: var(--p1);
  border-color: var(--p1);
  color: #fff;
}
.HL-ARR.HL-REPLAY:hover {
  background: var(--p2);
  border-color: var(--p2);
  color: #fff;
}

/* ── COUNTER (bottom right) ── */
.HL-CN {
  position: absolute;
  bottom: 24px;
  right: 28px;
  z-index: 20;
  font-family: var(--M);
  font-size: 36px;
  font-weight: 700;
  letter-spacing: .05em;
  line-height: 1;
  background: linear-gradient(to right, rgba(139,92,246,.35) var(--fill, 0%), rgba(13,12,10,.08) calc(var(--fill, 0%) + 8%));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.HL-DOTS {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* ── SCENE NAV DOTS ── */
.HL-DOT {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(13, 12, 10, .12);
  cursor: pointer;
  transition: all .3s cubic-bezier(.16, 1, .3, 1);
}
.HL-DOT.on {
  background: var(--p1);
  box-shadow: 0 0 8px rgba(139, 92, 246, .4);
  transform: scale(1.25);
}
.HL-DOT:hover {
  background: var(--p2);
  transform: scale(1.15);
}

/* Scene counter */

/* ── CLIP REVEAL ── */
.CL {
  overflow: visible;
  line-height: 1.25;
  padding: .12em 0;
}
.CI {
  display: block;
}

/* ── HEADLINES ── */
.HXL {
  font-size: clamp(22px, 3vw, 42px);
  font-weight: 900;
  letter-spacing: -.03em;
  line-height: 1.15;
  color: var(--k);
}
.HXL-G {
  color: var(--p1);
}
.HXL-D {
  color: var(--k);
  font-weight: 900;
}
.HXL-STRIKE {
  text-decoration: line-through;
  text-decoration-thickness: .06em;
  text-decoration-color: rgba(139, 92, 246, .6);
}

/* ── EYEBROW ── */
.HL-EY {
  font-family: var(--M);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .22em;
  color: var(--m2);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

/* ═══════════════════════════════
   SCENE 1 — Partner
═══════════════════════════════ */

/* Grid layout — Desktop: 2 columns */
.S1-GRID {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 32px;
  align-items: center;
}

/* Centered Scene 1 variant — single column, centered text */
.S1-CENTER {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  max-width: 1100px;
  gap: 0;
  transform: translateY(40px);
}
.S1-CENTER .S1-HEAD,
.S1-CENTER .S1-ICONS,
.S1-CENTER .S1-TRUST,
.S1-CENTER .S1-CTAS {
  grid-column: auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.S1-CENTER .HL-EY { justify-content: center; }
.S1-CENTER .S1-ICONS { flex-direction: row; flex-wrap: wrap; justify-content: center; }
.S1-CENTER .S1-TRUST { align-items: center; }
.S1-CENTER .S1-CTAS { flex-direction: row; justify-content: center; }
.S1-CENTER .CL { width: 100%; text-align: center; }

/* Lead paragraph under hero title */
.S1-LEAD {
  font-family: var(--S);
  font-size: clamp(15px, 1.25vw, 19px);
  font-weight: 400;
  line-height: 1.6;
  color: var(--m);
  max-width: 620px;
  margin-top: 22px;
  text-align: center;
}
.S1-LEAD strong {
  color: var(--k);
  font-weight: 600;
}
/* On desktop: left-column items span col 1, loop spans col 2 */
.S1-HEAD  { grid-column: 1; min-width: 0; }
.S1-ICONS { grid-column: 1; }
.S1-BODY  { grid-column: 1; }
.S1-CTAS  { grid-column: 1; }
.S1-LOOP  { grid-column: 2; grid-row: 1 / span 4; }

.S1-LEFT {
  grid-column: 1;
  position: relative;
  z-index: 2;
}

/* Tech icon pills */
.S1-ICONS {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 20px;
}
.S1-IC {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 8px;
  background: rgba(244, 242, 236, .6);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(13, 12, 10, .06);
  font-family: var(--M);
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--m);
  transition: all .25s cubic-bezier(.16, 1, .3, 1);
  cursor: default;
}
.S1-IC svg {
  width: 14px;
  height: 14px;
  opacity: .5;
}
.S1-IC:hover {
  background: rgba(139, 92, 246, .06);
  border-color: rgba(139, 92, 246, .15);
  color: var(--p1);
}
.S1-IC:hover svg {
  opacity: .8;
}
.S1-IC.feat {
  background: rgba(139, 92, 246, .06);
  border-color: rgba(139, 92, 246, .12);
  color: var(--p1);
}
.S1-IC.feat svg {
  opacity: .7;
}

/* Body text */
.S1-BODY {
  font-size: clamp(14px, 1.2vw, 17px);
  color: var(--m);
  max-width: 520px;
  margin-top: 16px;
  line-height: 1.7;
  font-weight: 300;
}

/* Trust rows (green checks) */
.S1-TRUST {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 18px;
}
.S1-TR {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--M);
  font-size: 11px;
  color: var(--k);
  letter-spacing: .2px;
  font-weight: 500;
}
.S1-TRC {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: rgba(34, 197, 94, .12);
  color: #22c55e;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
}

/* CTA buttons row */
.S1-CTAS {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  align-items: center;
}

/* ── BUTTONS ── */
.BF {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--k);
  color: #fff;
  font-family: var(--M);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .15em;
  text-transform: uppercase;
  padding: 14px 28px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: color .3s;
}
.BF::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--p1);
  transform: translateX(-101%);
  transition: transform .4s cubic-bezier(.16, 1, .3, 1);
}
.BF:hover::before {
  transform: translateX(0);
}
.BF span {
  position: relative;
  z-index: 1;
}
.BG {
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  color: var(--m);
  font-family: var(--M);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .15em;
  text-transform: uppercase;
  padding: 14px 28px;
  text-decoration: none;
  border: 1px solid var(--c3);
  cursor: pointer;
  transition: all .25s;
}
.BG:hover {
  border-color: var(--k);
  color: var(--k);
}

/* ═══════════════════════════════
   SCENE 1 — Hero Animation (.S1-LOOP)
═══════════════════════════════ */
.S1-LOOP {
  position: relative;
  height: 480px;
}
#HA-CANVAS {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

/* ── Background App Icons (HA-BG) ── */
.HA-BG {
  position: absolute;
  width: 34px;
  height: 34px;
  padding: 7px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(0, 0, 0, .04);
  opacity: .65;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .04), 0 0 0 .5px rgba(255,255,255,.5) inset;
  transition: all .4s cubic-bezier(.34, 1.56, .64, 1);
  z-index: 1;
  animation: HA-FLOAT var(--float-dur, 5s) ease-in-out var(--float-delay, 0s) infinite;
}
@keyframes HA-FLOAT {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(var(--float-y, -4px)); }
}
.HA-BG1  { --float-dur: 4.5s; --float-delay: 0s;   --float-y: -5px; }
.HA-BG2  { --float-dur: 5.2s; --float-delay: .3s;  --float-y: -3px; }
.HA-BG3  { --float-dur: 4.8s; --float-delay: .6s;  --float-y: -6px; }
.HA-BG4  { --float-dur: 5.5s; --float-delay: .9s;  --float-y: -4px; }
.HA-BG5  { --float-dur: 4.3s; --float-delay: 1.2s; --float-y: -5px; }
.HA-BG6  { --float-dur: 5.8s; --float-delay: .4s;  --float-y: -3px; }
.HA-BG7  { --float-dur: 4.6s; --float-delay: .7s;  --float-y: -4px; }
.HA-BG8  { --float-dur: 5.1s; --float-delay: 1.0s; --float-y: -5px; }
.HA-BG9  { --float-dur: 4.9s; --float-delay: .2s;  --float-y: -3px; }
.HA-BG10 { --float-dur: 5.4s; --float-delay: .5s;  --float-y: -6px; }
.HA-BG11 { --float-dur: 4.7s; --float-delay: .8s;  --float-y: -4px; }
.HA-BG12 { --float-dur: 5.3s; --float-delay: 1.1s; --float-y: -3px; }
.HA-BG13 { --float-dur: 4.4s; --float-delay: .1s;  --float-y: -5px; }
.HA-BG14 { --float-dur: 5.6s; --float-delay: .6s;  --float-y: -4px; }

.HA-BG:hover {
  opacity: 1;
  transform: scale(1.15) translateY(-2px);
  box-shadow: 0 8px 24px rgba(109, 40, 217, .08), 0 0 0 1px rgba(139, 92, 246, .12);
  border-color: rgba(139, 92, 246, .15);
}
/* Agent hit glow — big pulse */
.HA-BG.hit {
  opacity: 1;
  transform: scale(1.25);
  box-shadow: 0 0 28px rgba(139, 92, 246, .4), 0 0 0 1px rgba(139, 92, 246, .2);
  border-color: rgba(139, 92, 246, .35);
  background: rgba(139, 92, 246, .08);
}

/* Staggered positions for 14 icons — always visible */
.HA-BG1  { top: 4%;   left: 3%; }
.HA-BG2  { top: 8%;   right: 6%; }
.HA-BG3  { top: 52%;  left: 0%; }
.HA-BG4  { top: 72%;  right: 3%; }
.HA-BG5  { top: 28%;  left: 8%; }
.HA-BG6  { top: 82%;  left: 15%; }
.HA-BG7  { top: 2%;   left: 32%; }
.HA-BG8  { top: 88%;  right: 18%; }
.HA-BG9  { top: 38%;  right: 0%; }
.HA-BG10 { top: 18%;  left: 22%; }
.HA-BG11 { top: 62%;  right: 12%; }
.HA-BG12 { top: 86%;  left: 38%; }
.HA-BG13 { top: 6%;   right: 28%; }
.HA-BG14 { top: 48%;  left: 5%; }

/* Agents are now canvas-drawn (see hero-loop.js) */

/* ── Code Window (HA-CODE) ── */
.HA-CODE {
  position: absolute;
  top: 38%;
  left: 34%;
  transform: translate(-55%, -50%) scale(.92);
  width: 320px;
  background: rgba(12, 11, 8, .94);
  border-radius: 12px;
  border: 1px solid rgba(139, 92, 246, .2);
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(12, 11, 8, .3);
  z-index: 3;
  opacity: 0;
  transition: opacity .7s cubic-bezier(.16, 1, .3, 1), transform .7s cubic-bezier(.16, 1, .3, 1);
}
.HA-CODE.visible {
  opacity: 1;
  transform: translate(-55%, -50%) scale(1);
  animation: HA-CODE-FLOAT 6s ease-in-out infinite;
}
@keyframes HA-CODE-FLOAT {
  0%, 100% { transform: translate(-55%, -50%) scale(1) rotate(-.3deg); }
  50% { transform: translate(-55%, calc(-50% - 6px)) scale(1) rotate(.3deg); }
}
.HA-CLINES {
  min-height: 140px;
  padding-bottom: 4px;
}
/* Typing cursor after last line */
.HA-CLINES .HA-CL:last-child::after {
  content: '';
  display: inline-block;
  width: 1px;
  height: 11px;
  background: var(--p1);
  animation: HAblink 1s steps(1) infinite;
  vertical-align: middle;
  margin-left: 1px;
}

.HA-CBAR {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(139, 92, 246, .1);
  background: rgba(139, 92, 246, .04);
}
.HA-CBAR span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.HA-CBAR span:nth-child(1) { background: #FF5F57; }
.HA-CBAR span:nth-child(2) { background: #FFBD2E; }
.HA-CBAR span:nth-child(3) { background: #28C840; }
.HA-CBAR em {
  font-style: normal;
  font-family: var(--M);
  font-size: 8px;
  color: rgba(244, 242, 236, .25);
  letter-spacing: .5px;
  margin-left: 6px;
}

.HA-CL {
  font-family: var(--M);
  font-size: 9px;
  color: rgba(244, 242, 236, .4);
  padding: 0 12px;
  line-height: 1.8;
  letter-spacing: .3px;
}
.HA-CL i {
  font-style: normal;
  color: var(--p1);
}
.HA-CL b {
  display: inline-block;
  width: 1px;
  height: 10px;
  background: var(--p1);
  animation: HAblink 1s steps(1) infinite;
  vertical-align: middle;
}
@keyframes HAblink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0; }
}

/* Code progress bar */
.HA-CPROG {
  height: 2px;
  background: rgba(139, 92, 246, .08);
  margin: 6px 12px 10px;
  border-radius: 1px;
  overflow: hidden;
}
.HA-CPFILL {
  height: 100%;
  background: var(--p1);
  width: 0;
  transition: width .3s linear;
}

/* ── App Window (HA-APP) — UI mockup + deploy ── */
.HA-APP {
  position: absolute;
  top: 58%;
  left: 66%;
  transform: translate(-50%, -50%) translateY(20px) scale(.88);
  width: 220px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 14px;
  border: 1.5px solid rgba(200, 200, 200, .3);
  overflow: visible;
  box-shadow:
    0 20px 60px rgba(12, 11, 8, .1),
    0 0 0 .5px rgba(255,255,255,.5) inset,
    0 1px 0 rgba(255,255,255,.7) inset;
  z-index: 5;
  opacity: 0;
  transition: opacity .8s cubic-bezier(.16, 1, .3, 1), transform .8s cubic-bezier(.34, 1.56, .64, 1);
}
.HA-APP::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 40%;
  background: linear-gradient(180deg, rgba(255,255,255,.15), transparent);
  pointer-events: none; z-index: 1; border-radius: inherit;
}
.HA-APP.visible {
  opacity: 1;
  transform: translate(-50%, -50%) translateY(0) scale(1);
  animation: HA-APP-FLOAT 5s ease-in-out .5s infinite;
}
@keyframes HA-APP-FLOAT {
  0%, 100% { transform: translate(-50%, -50%) rotate(.5deg); }
  50% { transform: translate(-50%, calc(-50% - 5px)) rotate(-.5deg); }
}
.HA-APP:hover {
  box-shadow:
    0 24px 70px rgba(109, 40, 217, .1),
    0 0 0 .5px rgba(139, 92, 246, .15) inset,
    0 1px 0 rgba(255,255,255,.7) inset;
  border-color: rgba(139, 92, 246, .15);
}

.HA-ABAR {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 7px 10px;
  border-bottom: 1px solid rgba(13, 12, 10, .05);
  background: rgba(244, 242, 236, .4);
  border-radius: 14px 14px 0 0;
}
.HA-ABAR span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.HA-ABAR span:nth-child(1) { background: #FF5F57; }
.HA-ABAR span:nth-child(2) { background: #FFBD2E; }
.HA-ABAR span:nth-child(3) { background: #28C840; }
.HA-ABAR em {
  font-style: normal;
  font-family: var(--M);
  font-size: 7px;
  color: var(--m2);
  letter-spacing: .5px;
  margin-left: 5px;
}

/* App body — UI skeleton hints */
.HA-ABODY {
  padding: 10px 12px 12px;
}
.HA-AH {
  height: 8px;
  width: 70%;
  background: rgba(13, 12, 10, .07);
  border-radius: 3px;
  margin-bottom: 5px;
}
.HA-AH2 {
  height: 5px;
  width: 45%;
  background: rgba(13, 12, 10, .04);
  border-radius: 2px;
  margin-bottom: 10px;
}

/* Table-like rows */
.HA-AROW {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 0;
  border-bottom: 1px solid rgba(13, 12, 10, .03);
}
.HA-ADOT {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(139, 92, 246, .25);
  flex-shrink: 0;
}
.HA-ADOT.ok {
  background: rgba(62, 122, 80, .4);
  box-shadow: 0 0 6px rgba(62, 122, 80, .2);
}
.HA-ALINE {
  height: 4px;
  flex: 1;
  background: rgba(13, 12, 10, .05);
  border-radius: 2px;
}
.HA-ALINE.short { width: 60%; flex: none; }
.HA-ALINE.med { width: 75%; flex: none; }
.HA-ABADGE {
  width: 28px;
  height: 10px;
  border-radius: 4px;
  background: rgba(139, 92, 246, .08);
  border: 1px solid rgba(139, 92, 246, .1);
  flex-shrink: 0;
}
.HA-ABADGE.ok {
  background: rgba(62, 122, 80, .08);
  border-color: rgba(62, 122, 80, .12);
}

/* Mini grid blocks */
.HA-AGRID {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 3px;
  margin: 8px 0;
}
.HA-AGRID > div {
  height: 18px;
  background: rgba(139, 92, 246, .04);
  border-radius: 4px;
  border: 1px solid rgba(139, 92, 246, .06);
}

/* Deploy area */
.HA-ADIN {
  display: flex;
  justify-content: center;
  padding-top: 4px;
}
.HA-ADBTN {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 28px;
  border-radius: 6px;
  background: var(--p1);
  color: #fff;
  cursor: pointer;
  transition: all .35s cubic-bezier(.34, 1.56, .64, 1);
  box-shadow: 0 4px 16px rgba(139, 92, 246, .25);
}
.HA-ADBTN:hover,
.HA-ADBTN.hovering {
  transform: scale(1.04);
  box-shadow: 0 6px 24px rgba(139, 92, 246, .4);
}
.HA-ADBTN.deploying {
  transform: scale(.95);
  box-shadow: 0 0 36px rgba(139, 92, 246, .6);
  background: #6D28D9;
}

/* Flash + agents now canvas-drawn */

/* ═══════════════════════════════
   SCENE 2 — Konkurrent
═══════════════════════════════ */
/* S2 now uses S1-GRID layout */

#s1 .HXL {
  font-size: clamp(38px, 5.8vw, 88px);
  line-height: 1.02;
}
#s2 .HXL {
  font-size: clamp(28px, 3.8vw, 56px);
}
#s3 .HXL {
  font-size: clamp(28px, 3.8vw, 56px);
}

/* Live counter */
.S2-LIVE {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 28px;
  padding: 16px 20px;
  background: rgba(139, 92, 246, .04);
  border: 1px solid rgba(139, 92, 246, .1);
  border-radius: 8px;
}
.S2-LN {
  font-family: var(--M);
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 700;
  color: var(--p1);
  letter-spacing: -1px;
  line-height: 1;
}
.S2-LR { flex: 1; }
.S2-LT {
  font-family: var(--M);
  font-size: 10px;
  color: var(--k);
  letter-spacing: .5px;
  margin-bottom: 2px;
}
.S2-LS {
  font-family: var(--M);
  font-size: 8px;
  color: var(--m2);
  letter-spacing: .5px;
}

/* Facts */
.S2-FACTS {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.S2-F {
  font-size: 14px;
  color: var(--m);
  line-height: 1.6;
  font-weight: 300;
  padding-left: 14px;
  border-left: 2px solid rgba(139, 92, 246, .15);
}
.S2-F strong {
  color: var(--k);
  font-weight: 700;
}

/* Right side container */
.S2-R {
  position: relative;
}

/* ═══════════════════════════════
   SCENE 2 — App Icons + Panel + Canvas Agents
═══════════════════════════════ */
.S2-R { position: relative; height: 100%; min-height: 400px; }

/* no canvas for S2 — pure DOM animation */

/* App icons — server-component style (glass white, glow on hit) */
.S2-APP {
  position: absolute; width: 38px; height: 38px; padding: 8px;
  border-radius: 12px;
  background: rgba(255,255,255,.88);
  border: .8px solid rgba(0,0,0,.04);
  box-shadow: 0 6px 16px rgba(0,0,0,.05), 0 1px 3px rgba(0,0,0,.03);
  opacity: .75; z-index: 1;
  transition: all .5s cubic-bezier(.34,1.56,.64,1);
}
/* Server-component matching glow (white → purple tint) */
.S2-APP:hover {
  opacity: 1; transform: scale(1.1) translateY(-2px);
  background: rgba(139,92,246,.04);
  border-color: rgba(139,92,246,.12);
  box-shadow: 0 6px 16px rgba(0,0,0,.05);
}
.S2-APP.hit {
  opacity: 1; transform: scale(1.15);
  background: rgba(139,92,246,.08);
  border-color: rgba(139,92,246,.2);
  box-shadow: 0 0 20px rgba(139,92,246,.25), 0 6px 16px rgba(0,0,0,.05);
}
/* 10 icons — dense ring, close to center window */
.S2-A1  { top: 12%; left: 22%; }
.S2-A2  { top: 6%;  left: 48%; }
.S2-A3  { top: 12%; right: 18%; }
.S2-A4  { top: 36%; left: 6%; }
.S2-A5  { top: 36%; right: 4%; }
.S2-A6  { bottom: 28%; left: 8%; }
.S2-A7  { bottom: 28%; right: 6%; }
.S2-A8  { bottom: 10%; left: 20%; }
.S2-A9  { bottom: 10%; right: 16%; }
.S2-A10 { bottom: 6%;  left: 46%; }
/* Individual float animations */
.S2-A1  { animation: S2-AF 4.5s ease-in-out infinite; }
.S2-A2  { animation: S2-AF 5.2s ease-in-out .2s infinite; }
.S2-A3  { animation: S2-AF 4.8s ease-in-out .4s infinite; }
.S2-A4  { animation: S2-AF 5.5s ease-in-out .6s infinite; }
.S2-A5  { animation: S2-AF 4.6s ease-in-out .8s infinite; }
.S2-A6  { animation: S2-AF 5.1s ease-in-out 1s infinite; }
.S2-A7  { animation: S2-AF 4.9s ease-in-out .3s infinite; }
.S2-A8  { animation: S2-AF 5.3s ease-in-out .5s infinite; }
.S2-A9  { animation: S2-AF 4.7s ease-in-out .7s infinite; }
.S2-A10 { animation: S2-AF 5s ease-in-out .9s infinite; }
@keyframes S2-AF { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-3px)} }

/* ── Status Window — WHITE glass, CENTERED ── */
.S2-DB {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%) scale(.94);
  width: 260px; z-index: 3;
  background: rgba(255,255,255,.93); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-radius: 14px;
  border: 1.5px solid rgba(200,200,200,.3);
  box-shadow: 0 20px 60px rgba(12,11,8,.1), 0 0 0 .5px rgba(255,255,255,.5) inset;
  overflow: hidden; opacity: 0;
  transition: opacity .6s cubic-bezier(.16,1,.3,1), transform .6s cubic-bezier(.34,1.56,.64,1), border-color .5s, box-shadow .5s;
}
.S2-DB::before { content:''; position:absolute; top:0; left:0; right:0; height:40%; background:linear-gradient(180deg,rgba(255,255,255,.2),transparent); pointer-events:none; z-index:1; border-radius:inherit; }
.S2-DB.on { opacity: 1; transform: translate(-50%,-50%) scale(1); animation: S2-DBF 6s ease-in-out infinite; }
.S2-DB.glow { border-color: rgba(139,92,246,.25); box-shadow: 0 20px 60px rgba(12,11,8,.1), 0 0 28px rgba(139,92,246,.12); }
@keyframes S2-DBF { 0%,100%{transform:translate(-50%,-50%) rotate(-.3deg)} 50%{transform:translate(-50%,calc(-50% - 4px)) rotate(.3deg)} }

.S2-DBAR {
  display: flex; align-items: center; gap: 4px; padding: 8px 12px;
  border-bottom: 1px solid rgba(13,12,10,.06); background: rgba(244,242,236,.4);
}
.S2-DBAR span { width: 6px; height: 6px; border-radius: 50%; }
.S2-DBAR span:nth-child(1) { background: #FF5F57; }
.S2-DBAR span:nth-child(2) { background: #FFBD2E; }
.S2-DBAR span:nth-child(3) { background: #28C840; }
.S2-DBAR em { font-style:normal; font-family:var(--M); font-size:7px; color:var(--m); letter-spacing:.5px; margin-left:5px; }
.S2-DBD { padding: 4px 0; }

/* Task rows — light theme */
.S2-RW {
  display: flex; justify-content: space-between; align-items: center;
  padding: 7px 12px; border-bottom: 1px solid rgba(13,12,10,.04);
  transition: background .4s;
}
.S2-RW:last-child { border-bottom: none; }
.S2-RW.done { background: rgba(62,122,80,.06); }
.S2-RN { font-family: var(--M); font-size: 9px; color: var(--m); letter-spacing: .3px; }
.S2-RW.done .S2-RN { color: var(--k); font-weight: 500; }
.S2-RS {
  font-family: var(--M); font-size: 7px; font-weight: 600;
  padding: 3px 10px; border-radius: 4px; letter-spacing: .5px;
  transition: all .4s cubic-bezier(.34,1.56,.64,1);
}
.S2-RED { background: rgba(168,80,36,.08); color: rgba(168,80,36,.6); border: 1px solid rgba(168,80,36,.08); }
.S2-GRN { background: rgba(62,122,80,.1); color: rgba(62,122,80,.85); border: 1px solid rgba(62,122,80,.12); }

/* ── Action popups (DOM elements near app icons) ── */
.S2-POP {
  position: absolute; z-index: 6;
  font-family: var(--M); font-size: 8px; letter-spacing: .3px;
  padding: 6px 11px; border-radius: 7px;
  background: rgba(255,255,255,.92); backdrop-filter: blur(10px);
  border: 1px solid rgba(139,92,246,.12);
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
  color: var(--p1); white-space: nowrap;
  opacity: 0; transform: translateY(6px) scale(.9);
  animation: S2-POP-IN .4s cubic-bezier(.34,1.56,.64,1) forwards;
  pointer-events: none;
}
@keyframes S2-POP-IN {
  0% { opacity: 0; transform: translateY(6px) scale(.9); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.S2-POP.out {
  animation: S2-POP-OUT .3s ease-out forwards;
}
@keyframes S2-POP-OUT {
  0% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-8px) scale(.9); }
}
#S2-POPUPS { position: absolute; inset: 0; z-index: 6; pointer-events: none; overflow: hidden; }

@keyframes LEDpulse { 0%,100%{opacity:1;box-shadow:0 0 0 0 currentColor} 50%{opacity:.4;box-shadow:0 0 6px 2px currentColor} }
.DB-WRAP { position: relative; }
.DB {
  background: rgba(28, 27, 22, .96);
  border-radius: 14px;
  border: 1px solid rgba(139, 92, 246, .12);
  overflow: hidden;
  box-shadow:
    0 20px 60px rgba(12, 11, 8, .3),
    0 0 0 .5px rgba(139, 92, 246, .08) inset;
  animation: DB-FLOAT 6s ease-in-out infinite;
}
@keyframes DB-FLOAT {
  0%, 100% { transform: rotate(-.3deg); }
  50% { transform: translateY(-5px) rotate(.3deg); }
}
.DB-BAR {
  display: flex; align-items: center; gap: 5px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(244, 242, 236, .06);
  background: rgba(244, 242, 236, .02);
}
.DB-DOT { width: 8px; height: 8px; border-radius: 50%; }
.DB-URL {
  font-family: var(--M); font-size: 9px;
  color: rgba(244, 242, 236, .25); letter-spacing: .5px; margin-left: 8px;
  transition: color .5s;
}
.DB-BD { padding: 16px; }

/* Rows — clean, big text */
.DB-ROWS { display: flex; flex-direction: column; gap: 0; }
.DB-RW {
  display: flex; justify-content: center; align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid rgba(244, 242, 236, .04);
  transition: background .5s;
}
.DB-RW.done { background: rgba(62, 122, 80, .04); }
.DB-RW:last-child { border-bottom: none; }
.DB-ST {
  font-family: var(--M); font-size: 11px; padding: 6px 16px;
  border-radius: 6px; letter-spacing: .8px; font-weight: 600;
  transition: all .5s cubic-bezier(.34, 1.56, .64, 1);
}
.DB-STR { background: rgba(168, 80, 36, .1); color: rgba(168, 80, 36, .75); border: 1px solid rgba(168, 80, 36, .15); }
.DB-STG { background: rgba(62, 122, 80, .12); color: rgba(62, 122, 80, .85); border: 1px solid rgba(62, 122, 80, .18); }

/* Badges */
.DB-BDG {
  position: absolute; font-family: var(--M); font-size: 8px; font-weight: 600;
  letter-spacing: 1.5px; text-transform: uppercase; padding: 6px 12px; border-radius: 8px;
  display: flex; align-items: center; gap: 6px; backdrop-filter: blur(10px);
  transition: all .6s cubic-bezier(.34, 1.56, .64, 1);
}
.DB-LIVE { top: -12px; right: -10px; background: rgba(62, 122, 80, .1); border: 1px solid rgba(62, 122, 80, .2); color: rgba(62, 122, 80, .85); }
.DB-LIVE-LED { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); animation: LEDpulse 1.5s infinite; }
.DB-ENEMY { bottom: -12px; left: -10px; background: rgba(168, 80, 36, .08); border: 1px solid rgba(168, 80, 36, .15); color: rgba(168, 80, 36, .75); }
.DB-ENEMY-LED { width: 6px; height: 6px; border-radius: 50%; background: var(--wa); animation: LEDpulse 2s infinite .5s; }
@keyframes LEDpulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 currentColor; }
  50% { opacity: .4; box-shadow: 0 0 6px 2px currentColor; }
}

/* KPI Row */
.KPI-ROW { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 10px; }
.KP { background: rgba(244, 242, 236, .04); padding: 10px; border-radius: 8px; transition: background .5s, box-shadow .5s; }
.KP.glow { background: rgba(62, 122, 80, .06); box-shadow: 0 0 12px rgba(62, 122, 80, .1); }
.KP-V { font-family: var(--M); font-size: 15px; font-weight: 700; letter-spacing: -.3px; margin-bottom: 2px; transition: all .5s cubic-bezier(.34,1.56,.64,1); }
.KP-L { font-family: var(--M); font-size: 7px; color: rgba(244, 242, 236, .25); letter-spacing: 1px; text-transform: uppercase; }

/* Chat */
.DB-CHAT { background: rgba(244, 242, 236, .03); border-radius: 8px; padding: 10px; margin-top: 8px; }
.DB-MSG { font-family: var(--M); font-size: 10px; padding: 6px 10px; border-radius: 6px; max-width: 85%; line-height: 1.4; }
.DB-MSG-U { background: rgba(244, 242, 236, .06); color: rgba(244, 242, 236, .45); margin-bottom: 6px; }
.DB-MSG-AI { color: rgba(139, 92, 246, .8); min-height: 18px; }
.DB-CUR { display: inline-block; width: 1px; height: 11px; background: var(--p1); animation: HAblink 1s steps(1) infinite; vertical-align: middle; }

/* Rows — readable */
.DB-ROWS { display: flex; flex-direction: column; gap: 0; }
.DB-RW {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px solid rgba(244, 242, 236, .04);
  font-family: var(--M); font-size: 10px; color: rgba(244, 242, 236, .4); letter-spacing: .3px;
  transition: background .5s;
}
.DB-RW:last-child { border-bottom: none; }
.DB-RW.done { background: rgba(62, 122, 80, .04); }

/* ── S2 Canvas for KI agents ── */
#S2-CANVAS {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

/* ═══════════════════════════════
   SCENE 3 — Deine KI
═══════════════════════════════ */
.S3-TOP {
  margin-bottom: 24px;
}

/* Floating tags */
.S3-FT {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--M);
  font-size: 9px;
  letter-spacing: .5px;
  color: var(--m);
  padding: 8px 16px;
  background: rgba(139, 92, 246, .04);
  border: 1px solid rgba(139, 92, 246, .1);
  border-radius: 20px;
  margin: 4px 6px;
  backdrop-filter: blur(6px);
}
.S3-FT-LED {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--p1);
  animation: LEDpulse 2s infinite;
}
.S3-FT1 { position: absolute; top: 52%; right: 8%; }
.S3-FT2 { position: absolute; top: 62%; right: 3%; }
.S3-FT3 { position: absolute; top: 72%; right: 6%; }

/* Server Cards 2x2 grid */
.S3-CARDS {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 32px;
  max-width: 580px;
}
.S3-CD {
  background: rgba(244, 242, 236, .6);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(13, 12, 10, .06);
  border-radius: 10px;
  overflow: hidden;
  cursor: default;
  transition: all .3s cubic-bezier(.16, 1, .3, 1);
}
.S3-CD:hover {
  background: rgba(12, 11, 8, .92);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(12, 11, 8, .12);
}
.S3-CD:hover .S3-TIER,
.S3-CD:hover .S3-NM,
.S3-CD:hover .S3-PR,
.S3-CD:hover .S3-PS {
  color: rgba(244, 242, 236, .8);
}

.S3-CBAR {
  height: 3px;
  transform-origin: left;
}
.S3-CBD {
  padding: 14px 16px;
}
.S3-TIER {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--M);
  font-size: 7px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--m2);
  margin-bottom: 6px;
  transition: color .3s;
}
.S3-LED {
  width: 5px;
  height: 5px;
  border-radius: 50%;
}
.S3-NM {
  font-size: 16px;
  font-weight: 700;
  color: var(--k);
  letter-spacing: -.3px;
  margin-bottom: 4px;
  transition: color .3s;
}
.S3-PR {
  font-family: var(--M);
  font-size: 14px;
  font-weight: 700;
  color: var(--k);
  letter-spacing: -.5px;
  transition: color .3s;
}
.S3-PS {
  font-family: var(--M);
  font-size: 8px;
  color: var(--m2);
  letter-spacing: .5px;
  margin-top: 2px;
  transition: color .3s;
}

/* CTA Card in the grid */
.S3-CTA-CARD {
  background: rgba(139, 92, 246, .06);
  border: 1px solid rgba(139, 92, 246, .12);
  border-radius: 10px;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
}
.S3-CTA-LBL {
  font-size: 15px;
  font-weight: 700;
  color: var(--k);
  line-height: 1.3;
  letter-spacing: -.2px;
}

/* Scene 3 note */
.S3-NOTE {
  font-size: 13px;
  color: var(--m);
  margin-top: 28px;
  font-weight: 300;
  line-height: 1.6;
}
.S3-NOTE strong {
  color: var(--k);
  font-weight: 700;
}

/* NV-* styles moved to network.css */

/* ═══════════════════════════════
   RESPONSIVE
═══════════════════════════════ */
@media (max-width: 1200px) {
  .S1-GRID {
    gap: 32px;
  }
  .S1-LOOP {
    height: 400px;
  }
  .HA-CODE {
    width: 270px;
  }
  .HA-APP {
    width: 180px;
  }
  .S3-FT1, .S3-FT2, .S3-FT3 {
    position: static;
  }
}

/* ═══════════════════════════════
   RESPONSIVE — Mobile reorder:
   Head → Animation → Icons → Body → CTAs
═══════════════════════════════ */
@media (max-width: 1024px) {
  /* Stack vertically: text left, then animation below */
  .S1-GRID {
    display: flex;
    flex-direction: column;
  }
  /* Reorder: Head(1) → Loop(2) → Icons(3) → Body(4) → CTAs(5) */
  .S1-HEAD   { order: 1; }
  .S1-TRUST  { order: 2; }
  .S2-LIVE   { order: 2; }
  .S2-FACTS  { order: 3; }
  .S2-R      { min-height: 0 !important; height: 300px; }
  .S1-LOOP   { order: 4; height: 340px; margin: 20px 0; width: 100%; }
  .S1-ICONS  { order: 5; }
  .S1-BODY   { order: 6; }
  .S1-CTAS   { order: 7; }

  /* Windows: spread apart more, scale down */
  .HA-CODE {
    width: 220px;
    left: 25%;
    top: 42%;
  }
  .HA-APP {
    width: 170px;
    left: 72%;
    top: 58%;
  }
  /* Icons: smaller on tablet */
  .HA-BG {
    width: 28px;
    height: 28px;
    padding: 5px;
  }
  /* Hide some icons to reduce clutter on smaller screens */
  .HA-BG12, .HA-BG13, .HA-BG14 { display: none; }

  .S2-R { margin-top: 24px; }
  .CMP { animation: none; }
  .HL-SC { padding: 70px 24px 52px 24px; }
  .S3-CARDS { max-width: 100%; }
  .S3-FT1, .S3-FT2, .S3-FT3 { position: static; display: inline-flex; }
}

@media (max-width: 768px) {
  #HL { height: auto; min-height: 100vh; }
  .HL-SC { padding: 70px 24px 40px 24px; }
  .HXL { font-size: clamp(20px, 5vw, 34px); }
  #s1 .HXL, #s2 .HXL, #s3 .HXL { font-size: clamp(26px, 7vw, 44px); }


  .S1-LOOP { height: 280px; margin: 16px 0; }
  .HA-CODE { width: 190px; left: 22%; top: 40%; }
  .HA-APP { width: 150px; left: 74%; top: 60%; }
  .HA-BG { width: 26px; height: 26px; padding: 5px; border-radius: 8px; }
  /* Hide more icons */
  .HA-BG10, .HA-BG11, .HA-BG12, .HA-BG13, .HA-BG14 { display: none; }

  .S2-LIVE { flex-direction: column; align-items: flex-start; gap: 8px; }

  /* S3: reorder — headlines first, then cards */
  #s3 .HL-SC-IN { display: flex; flex-direction: column; }
  .S3-EYE { order: 0; }
  .S3-FT, .S3-FT1, .S3-FT2, .S3-FT3 { display: none !important; }
  .S3-TOP { order: 2; }
  .S3-CARDS { grid-template-columns: 1fr; gap: 6px; order: 3; }
  .S3-NOTE { order: 4; }

  .DB-SP { position: static; margin-top: 12px; }
  .DB-SP1, .DB-SP2 { bottom: auto; left: auto; right: auto; }

  /* Mobile: no appear animations on S2/S3 — force visible */
  #s2 [style*="opacity:0"], #s3 [style*="opacity:0"] { opacity: 1 !important; }
  .S3-CD, .S3-CTA-CARD { opacity: 1 !important; transform: none !important; }
}

@media (max-width: 480px) {
  .HL-SC { padding: 64px 16px 32px; }
  .HXL { font-size: clamp(18px, 5.5vw, 28px); letter-spacing: -.02em; }
  #s1 .HXL, #s2 .HXL, #s3 .HXL { font-size: clamp(22px, 7.5vw, 36px); }
  .HL-EY { font-size: 8px; gap: 8px; }

  .S1-LOOP { height: 240px; margin: 12px 0; }
  .HA-CODE { width: 160px; left: 20%; top: 38%; }
  .HA-CODE .HA-CL { font-size: 7px; }
  .HA-CODE .HA-CBAR em { font-size: 6px; }
  .HA-APP { width: 130px; left: 76%; top: 62%; }
  .HA-APP .HA-ABAR em { font-size: 6px; }
  .HA-BG { width: 22px; height: 22px; padding: 4px; border-radius: 6px; }
  /* Only show 6 icons on small phones */
  .HA-BG7, .HA-BG8, .HA-BG9, .HA-BG10, .HA-BG11, .HA-BG12, .HA-BG13, .HA-BG14 { display: none; }

  .S1-ICONS { gap: 4px; }
  .S1-IC { padding: 6px 10px; font-size: 7px; }
  .S1-CTAS { flex-direction: column; align-items: stretch; }
  .BF, .BG { justify-content: center; text-align: center; }
  .S3-FT { font-size: 8px; padding: 6px 12px; }
}
