/* Polako RAW v2: dynamic layer on top of neon.css. Same palette, same Bebas, new motion. */
:root { --r-card: 24px; --r-in: 12px; }

/* ---------- pointer light ---------- */
.plight { position: fixed; left: 0; top: 0; width: 520px; height: 520px; margin: -260px 0 0 -260px; border-radius: 50%; z-index: -1; pointer-events: none;
  background: rgba(111, 243, 255, .1); filter: blur(120px); opacity: 0; transition: opacity .6s var(--ease); will-change: transform; }
.plight.on { opacity: 1; }

/* scroll progress */
.sprog { position: fixed; left: 0; top: 0; height: 2px; width: 100%; z-index: 95; background: var(--neon); transform: scaleX(0); transform-origin: 0 50%; box-shadow: 0 0 12px var(--neon); pointer-events: none; }

/* ---------- hero ---------- */
.hero2 { position: relative; padding: 128px 0 0; text-align: center; overflow: hidden; }
.hero2 .orb { position: absolute; border-radius: 50%; filter: blur(110px); pointer-events: none; will-change: transform; }
.hero2 .o1 { width: 640px; height: 640px; left: 50%; top: -80px; margin-left: -520px; background: rgba(111, 243, 255, .16); animation: drift1 16s var(--ease) infinite alternate; }
.hero2 .o2 { width: 560px; height: 560px; left: 50%; top: 120px; margin-left: 0; background: rgba(183, 164, 255, .14); animation: drift2 19s var(--ease) infinite alternate; }
@keyframes drift1 { to { transform: translate(120px, 80px) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-140px, -40px) scale(.9); } }
.hero2-in { position: relative; display: flex; flex-direction: column; align-items: center; }
.hero2-tag { display: inline-flex; align-items: center; gap: 12px; padding: 8px 16px 8px 8px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.hero2-tag img { width: 32px; height: 32px; object-fit: contain; animation: spin 24s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.hero2-tag .pill { padding: 2px 8px; border-radius: 6px; background: var(--neon); color: #001418; font-size: 14px; letter-spacing: .1em; }
.hero2 h1 { font-family: var(--f-d); font-weight: 400; font-size: clamp(64px, 17vw, 280px); line-height: .88; letter-spacing: .01em; margin: 24px 0 0; text-wrap: balance; }
.hero2 .lead { max-width: 680px; margin: 24px auto 32px; color: #b0bac9; font-size: clamp(20px, 2vw, 28px); line-height: 1.35; text-wrap: pretty; }
.rot { position: relative; display: inline-block; vertical-align: top; height: 1.35em; line-height: 1.35; overflow: hidden; color: var(--neon); text-shadow: 0 0 18px rgba(111, 243, 255, .5); transition: width .6s var(--ease); }
.rot span { position: absolute; left: 0; top: 0; white-space: nowrap; opacity: 0; transform: translateY(100%); transition: transform .7s var(--ease), opacity .7s var(--ease); }
.rot span.on { opacity: 1; transform: none; }
.rot span.out { opacity: 0; transform: translateY(-100%); }
.rot-sizer { visibility: hidden; white-space: nowrap; }

/* stage: before / after */
.stage-wrap { position: relative; margin-top: 64px; perspective: 1600px; }
.stage { position: relative; transform-style: preserve-3d; will-change: transform; }
.stage .win { box-shadow: 0 50px 120px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .03), 0 0 120px rgba(111, 243, 255, .18); }
.ba { --p: 50%; position: relative; aspect-ratio: 3 / 2; overflow: hidden; background: #000; cursor: ew-resize; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.ba .ph { position: absolute; inset: 0; background-image: url(../images/montenegro/hero.jpg); background-repeat: no-repeat; background-size: cover; background-position: center; }
.ba .before { filter: saturate(.18) contrast(.62) brightness(1.12); clip-path: inset(0 calc(100% - var(--p)) 0 0); }
.ba .after { clip-path: inset(0 0 0 var(--p)); }
.ba .cut { position: absolute; top: 0; bottom: 0; left: var(--p); width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 24px var(--neon), 0 0 2px #fff; pointer-events: none; }
.ba .knob { position: absolute; top: 50%; left: 50%; width: 48px; height: 48px; margin: -24px 0 0 -24px; border-radius: 50%; background: rgba(8, 10, 18, .7); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid rgba(255, 255, 255, .5); display: grid; place-items: center; box-shadow: var(--glow); }
.ba .knob svg { width: 24px; height: 24px; }
.ba .tagl { position: absolute; top: 16px; padding: 4px 12px; border-radius: 8px; background: rgba(4, 5, 10, .6); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid var(--line); font-size: 16px; letter-spacing: .14em; text-transform: uppercase; pointer-events: none; }
.ba .tagl.l { left: 16px; color: var(--mute); }
.ba .tagl.r { right: 16px; color: var(--neon); }
.ba:focus-visible { outline: 2px solid var(--neon); outline-offset: 4px; }

.fchip { position: absolute; display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: rgba(10, 13, 22, .7); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); font-size: 18px; letter-spacing: .08em; box-shadow: 0 16px 40px rgba(0, 0, 0, .5); will-change: transform; z-index: 3; }
.fchip i { width: 8px; height: 8px; border-radius: 50%; background: var(--neon); box-shadow: 0 0 12px var(--neon); animation: pulse 2s var(--ease) infinite; }
.fchip.v i { background: var(--neon2); box-shadow: 0 0 12px var(--neon2); }
.fc1 { left: -24px; top: 18%; } .fc2 { right: -24px; top: 34%; } .fc3 { left: 6%; bottom: -20px; } .fc4 { right: 8%; bottom: -24px; }
@media (max-width: 900px) { .fc1 { left: 8px; top: -16px; } .fc2 { right: 8px; top: auto; bottom: 40px; } .fc3, .fc4 { display: none; } }

/* ---------- ticker ---------- */
.ticks { padding: 96px 0 0; overflow: hidden; }
.tick { display: flex; width: max-content; animation: tickl 40s linear infinite; }
.tick + .tick { margin-top: 12px; animation-name: tickr; animation-duration: 52s; }
.tick:hover { animation-play-state: paused; }
.tick span { flex: none; display: inline-flex; align-items: center; gap: 24px; padding-right: 24px; font-size: clamp(36px, 5vw, 60px); line-height: 1; letter-spacing: .02em; color: transparent; -webkit-text-stroke: 1px rgba(206, 220, 240, .35); transition: color .4s var(--ease), -webkit-text-stroke-color .4s var(--ease); }
.tick span:hover { color: var(--neon); -webkit-text-stroke-color: var(--neon); }
.tick b { width: 12px; height: 12px; border-radius: 3px; background: var(--neon2); transform: rotate(45deg); flex: none; }
@keyframes tickl { to { transform: translateX(-50%); } }
@keyframes tickr { from { transform: translateX(-50%); } to { transform: none; } }

/* ---------- tagline ---------- */
.tagsec { padding: 160px 0 120px; }
.tagsec .mani { max-width: 18ch; font-size: clamp(40px, 7vw, 96px); line-height: 1.04; }
.tagsec .mono { display: block; margin-bottom: 24px; }

/* ---------- story (sticky) ---------- */
.story { position: relative; padding: 110px 0; }
.story-in { display: flex; align-items: center; }
.story-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: center; }
.story-steps { list-style: none; display: flex; flex-direction: column; gap: 8px; margin-top: 32px; }
.story-steps li { display: flex; align-items: baseline; gap: 16px; padding: 8px 0; color: var(--mute); font-size: 30px; line-height: 1.1; cursor: pointer; transition: color .5s var(--ease), transform .5s var(--ease); }
.story-steps li b { font-weight: 400; font-size: 18px; letter-spacing: .14em; color: #4c5668; transition: color .5s var(--ease); }
.story-steps li.on { color: #fff; transform: translateX(16px); }
.story-steps li.on b { color: var(--neon); }
.story-steps li:hover { color: #cdd6e4; }
.story-cap { position: relative; min-height: 148px; margin-top: 32px; }
.story-cap p { position: absolute; inset: 0 auto auto 0; max-width: 460px; color: #b0bac9; font-size: 22px; line-height: 1.35; opacity: 0; transform: translateY(24px); transition: opacity .6s var(--ease), transform .6s var(--ease); text-wrap: pretty; }
.story-cap p.on { opacity: 1; transform: none; }
.story-bar { height: 2px; margin-top: 32px; background: var(--line); border-radius: 2px; overflow: hidden; max-width: 460px; }
.story-bar i { display: block; height: 100%; will-change: transform; background: var(--neon); transform: scaleX(0); transform-origin: 0 50%; box-shadow: 0 0 12px var(--neon); }
.story-stage { position: relative; }
.story-stage .win { box-shadow: 0 50px 120px rgba(0, 0, 0, .7), 0 0 120px rgba(111, 243, 255, .16); }
.story-imgs { position: relative; aspect-ratio: 16 / 10; background: #0d1018; overflow: hidden; }
.story-imgs img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.06); transition: opacity .8s var(--ease), transform 1.4s var(--ease); }
.story-imgs img.on { opacity: 1; transform: none; }
.story-chip { position: absolute; left: 16px; bottom: 16px; z-index: 3; display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: rgba(10, 13, 22, .72); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); font-size: 18px; letter-spacing: .08em; }
.story-chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--neon); box-shadow: 0 0 12px var(--neon); }
.scan { position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--neon); box-shadow: 0 0 24px var(--neon), 0 0 60px rgba(111, 243, 255, .5); opacity: 0; z-index: 2; pointer-events: none; }
.story-imgs.scanning .scan { animation: scanY 1.4s var(--ease); }
@keyframes scanY { 0% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(var(--sh, 600px)); opacity: 0; } }
@media (max-width: 900px) {
  .story { padding: 64px 0; }
  .story-in { align-items: flex-start; }
  .story-grid { grid-template-columns: 1fr; gap: 16px; }
  .story-stage { order: -1; }
  .story-steps { display: none; }
  .story-cap { margin-top: 8px; min-height: 120px; }
  .story-cap p { font-size: 20px; max-width: none; }
}

/* ---------- bento ---------- */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.bc { --mx: 50%; --my: 50%; position: relative; display: flex; flex-direction: column; padding: 24px; border-radius: var(--r-card); border: 1px solid var(--line); background: #080a12; overflow: hidden; transition: border-color .5s var(--ease), transform .5s var(--ease); }
.bc::before { content: ''; position: absolute; inset: 0; background: radial-gradient(360px circle at var(--mx) var(--my), rgba(111, 243, 255, .12), transparent 60%); opacity: 0; transition: opacity .4s; pointer-events: none; }
.bc:hover { border-color: rgba(111, 243, 255, .4); transform: translateY(-4px); }
.bc:hover::before { opacity: 1; }
.bc .tg { font-size: 16px; letter-spacing: .2em; color: var(--neon); text-transform: uppercase; }
.bc h3 { font-family: var(--f-d); font-weight: 400; font-size: 36px; line-height: 1.05; margin: 12px 0 8px; text-wrap: balance; }
.bc p { color: #98a3b3; font-size: 20px; line-height: 1.35; text-wrap: pretty; }
.bc .vis { position: relative; margin-top: 24px; border-radius: var(--r-in); overflow: hidden; border: 1px solid var(--line); background: #04050a; }
.b-a { grid-column: span 4; } .b-b { grid-column: span 2; } .b-c { grid-column: span 2; } .b-d { grid-column: span 2; } .b-e { grid-column: span 2; } .b-f { grid-column: span 3; } .b-g { grid-column: span 3; }
@media (max-width: 1000px) { .b-a, .b-f, .b-g { grid-column: span 6; } .b-b, .b-c, .b-d, .b-e { grid-column: span 3; } }
@media (max-width: 640px) { .bento > * { grid-column: span 6 !important; } }
.bc .ph2 { position: absolute; inset: 0; background-repeat: no-repeat; background-size: cover; background-position: center; }
.vis.ph-box { aspect-ratio: 3 / 2; width: 100%; }

/* A: xmp log */
.log { padding: 16px; font-size: 20px; line-height: 1.5; color: #98a3b3; min-height: 220px; }
.log .row { display: flex; gap: 16px; align-items: baseline; opacity: 0; transform: translateY(12px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.log .row.on { opacity: 1; transform: none; }
.log .row i { font-style: normal; color: #4c5668; }
.log .row em { font-style: normal; color: var(--neon); }
.log .row .ok { margin-left: auto; color: #5ee69a; font-size: 16px; letter-spacing: .1em; }
.log .file { display: flex; align-items: center; gap: 12px; padding: 8px 12px; margin-bottom: 8px; border-radius: 8px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); color: #fff; }
.log .file small { margin-left: auto; font-size: 16px; letter-spacing: .1em; color: var(--neon2); }
.log .file svg { width: 20px; height: 20px; flex: none; }

/* B: mask sweep */
.m-mask { position: absolute; inset: 0; background: rgba(111, 243, 255, .38); mix-blend-mode: screen; clip-path: inset(0 0 66% 0); animation: maskpulse 5s var(--ease) infinite; }
.m-edge { position: absolute; left: 0; right: 0; top: 34%; height: 2px; background: var(--neon); box-shadow: 0 0 16px var(--neon); animation: edge 5s var(--ease) infinite; }
@keyframes maskpulse { 0% { clip-path: inset(0 0 100% 0); } 45%, 80% { clip-path: inset(0 0 66% 0); } 100% { clip-path: inset(0 0 100% 0); } }
@keyframes edge { 0% { transform: translateY(-110px); opacity: 0; } 45%, 80% { transform: none; opacity: 1; } 100% { transform: none; opacity: 0; } }
.vis .lab { position: absolute; left: 12px; bottom: 12px; padding: 4px 12px; border-radius: 8px; background: rgba(4, 5, 10, .7); border: 1px solid var(--line); font-size: 16px; letter-spacing: .12em; color: var(--neon); }

/* C: denoise */
.m-noise { position: absolute; inset: 0; opacity: .9; mix-blend-mode: overlay; animation: denoise 5s var(--ease) infinite; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='1 0 0 0 0  1 0 0 0 0  1 0 0 0 0  0 0 0 1.4 -.2'/></filter><rect width='220' height='220' filter='url(%23n)'/></svg>"); }
@keyframes denoise { 0%, 25% { opacity: .95; } 55%, 85% { opacity: 0; } 100% { opacity: .95; } }
.m-noise-lab { position: absolute; right: 12px; bottom: 12px; display: grid; }
.m-noise-lab span { grid-area: 1 / 1; padding: 4px 12px; border-radius: 8px; background: rgba(4, 5, 10, .7); border: 1px solid var(--line); font-size: 16px; letter-spacing: .12em; }
.m-noise-lab .a { color: var(--mute); animation: lab1 5s var(--ease) infinite; }
.m-noise-lab .b { color: var(--neon); animation: lab2 5s var(--ease) infinite; }
@keyframes lab1 { 0%, 30% { opacity: 1; } 45%, 90% { opacity: 0; } 100% { opacity: 1; } }
@keyframes lab2 { 0%, 40% { opacity: 0; } 55%, 85% { opacity: 1; } 100% { opacity: 0; } }

/* D: dust */
.dust { position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: rgba(0, 0, 0, .55); box-shadow: 0 0 6px rgba(0, 0, 0, .6); animation: heal 6s var(--ease) infinite; animation-delay: var(--d); }
.dust::after { content: ''; position: absolute; inset: -10px; border-radius: 50%; border: 1.5px solid var(--neon); opacity: 0; animation: ring 6s var(--ease) infinite; animation-delay: var(--d); }
@keyframes heal { 0%, 20% { opacity: 1; transform: scale(1); } 32%, 88% { opacity: 0; transform: scale(.2); } 100% { opacity: 1; transform: scale(1); } }
@keyframes ring { 0%, 18% { opacity: 0; transform: scale(.6); } 26% { opacity: 1; transform: scale(1); } 40%, 100% { opacity: 0; transform: scale(1.5); } }

/* E: relight */
.m-light { position: absolute; width: 70%; aspect-ratio: 1; left: -10%; top: 5%; border-radius: 50%; background: rgba(255, 190, 110, .55); mix-blend-mode: soft-light; filter: blur(30px); animation: relight 6s var(--ease) infinite alternate; }
@keyframes relight { to { transform: translateX(110%); background: rgba(150, 190, 255, .55); } }
.m-dark { position: absolute; inset: 0; background: #000; opacity: .28; }

/* F: auto scene */
.scene { position: relative; display: flex; flex-wrap: wrap; gap: 8px; padding: 16px; min-height: 120px; align-content: flex-start; }
.scene span { padding: 4px 16px; border-radius: 999px; border: 1px solid var(--line); font-size: 20px; color: var(--mute); transition: color .5s var(--ease), border-color .5s var(--ease), box-shadow .5s var(--ease), transform .5s var(--ease); }
.scene span.on { color: #001418; background: var(--neon); border-color: var(--neon); box-shadow: var(--glow); transform: scale(1.06); }
.scene-bar { display: flex; gap: 4px; padding: 0 16px 16px; }
.scene-bar i { flex: 1; height: 8px; border-radius: 2px; background: #1f2433; transition: background .6s var(--ease); }
.scene-bar i.on { background: var(--neon2); }

/* G: layers stack */
.lay { position: relative; height: 200px; perspective: 800px; }
.lay i { position: absolute; left: 50%; top: 50%; width: 56%; height: 60%; margin: -30% 0 0 -28%; border-radius: var(--r-in); border: 1px solid rgba(206, 220, 240, .3); background: rgba(10, 13, 22, .78); backdrop-filter: blur(6px); display: flex; align-items: flex-end; padding: 8px 12px; font-style: normal; font-size: 16px; letter-spacing: .12em; color: var(--mute); transform: rotateX(58deg) rotateZ(-32deg) translateZ(calc(var(--z) * 1px)); animation: layfloat 5s var(--ease) infinite alternate; animation-delay: calc(var(--z) * -.03s); }
.lay i:nth-child(1) { --z: -40; border-color: rgba(183, 164, 255, .55); color: var(--neon2); }
.lay i:nth-child(2) { --z: 0; }
.lay i:nth-child(3) { --z: 40; border-color: rgba(111, 243, 255, .6); color: var(--neon); box-shadow: var(--glow); }
@keyframes layfloat { to { transform: rotateX(58deg) rotateZ(-32deg) translateZ(calc(var(--z) * 2px)); } }

/* mini cards */
.mini { grid-column: span 2; padding: 24px; border-radius: var(--r-card); border: 1px solid var(--line); background: #080a12; transition: border-color .5s var(--ease), transform .5s var(--ease); }
.mini:hover { border-color: rgba(111, 243, 255, .4); transform: translateY(-4px); }
.mini .tg { font-size: 16px; letter-spacing: .2em; color: var(--neon2); text-transform: uppercase; }
.mini h3 { font-family: var(--f-d); font-weight: 400; font-size: 30px; line-height: 1.1; margin: 8px 0; }
.mini p { color: #98a3b3; font-size: 20px; line-height: 1.35; text-wrap: pretty; }
@media (max-width: 1000px) { .mini { grid-column: span 3; } }
@media (max-width: 640px) { .mini { grid-column: span 6; } }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; background: #080a12; }
.stat { padding: 40px 24px; border-right: 1px solid var(--line); text-align: center; }
.stat:last-child { border-right: 0; }
.stat b { display: block; font-weight: 400; font-size: clamp(60px, 7vw, 96px); line-height: .95; letter-spacing: .01em; }
.stat > span { display: block; margin-top: 12px; color: var(--mute); font-size: 20px; line-height: 1.3; }
@media (max-width: 900px) { .stats { grid-template-columns: 1fr 1fr; } .stat:nth-child(2) { border-right: 0; } .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }

/* ---------- pipeline: running light ---------- */
.pipe .pp::after { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--neon); box-shadow: 0 0 12px var(--neon); transform: scaleX(0); transform-origin: 0 50%; animation: ppfill 10s var(--ease) infinite; animation-delay: calc(var(--i) * 2s); }
@keyframes ppfill { 0% { transform: scaleX(0); opacity: 1; } 12% { transform: scaleX(1); opacity: 1; } 20% { transform: scaleX(1); opacity: 0; } 100% { transform: scaleX(1); opacity: 0; } }
@media (max-width: 900px) { .pipe .pp::after { display: none; } }

/* focus + press states */
a:focus-visible, button:focus-visible { outline: 2px solid var(--neon); outline-offset: 4px; border-radius: 8px; }
.btn:active, .bc:active, .mini:active { transform: scale(.98); }
.skip { position: fixed; left: 16px; top: -64px; z-index: 120; padding: 8px 16px; border-radius: 8px; background: var(--neon); color: #001418; transition: transform .4s var(--ease); }
.skip:focus { transform: translateY(80px); }

@media (prefers-reduced-motion: reduce) {
  .rot span, .story-imgs img, .story-cap p, .log .row { transition: opacity .3s linear; transform: none !important; }
  .tick, .orb, .dust, .m-mask, .m-edge, .m-noise, .m-light, .lay i { animation: none !important; }
  .m-mask { clip-path: inset(0 0 66% 0); } .m-noise { opacity: 0; }
}

/* socials */
.socials { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 32px; position: relative; }
.socials a { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); font-size: 20px; letter-spacing: .06em; color: #b3bdcc; transition: color .4s var(--ease), border-color .4s var(--ease), transform .4s var(--ease); }
.socials a:hover { color: var(--neon); border-color: rgba(111, 243, 255, .5); transform: translateY(-2px); }
.socials a:active { transform: scale(.98); }
.foot-g { grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr; }
@media (max-width: 800px) { .foot-g { grid-template-columns: 1fr 1fr; } }

.made { display: inline-flex; align-items: center; gap: 12px; margin-top: 14px; }
.made .flag { display: block; border-radius: 3px; box-shadow: 0 2px 14px rgba(0, 0, 0, .45); }
.made .mono { color: #cdd6e4; font-size: 16px; letter-spacing: .22em; }
