/* Raspored: jedna kolona, naizmjence široke snimke zaslona i uži tekst. Žuta je boja samog
   proizvoda (dashboard), pa je i ovdje jedini naglasak; sve ostalo je tamno i mirno. */
:root {
  color-scheme: dark;
  --bg: #0b0e11; --bg-2: #11161a; --panel: #151b20; --line: #26313a;
  --fg: #e9eef1; --muted: #93a1ab; --accent: #ffc928; --accent-ink: #171200;
  --kill: #ff5a4d; --cyan: #38d6ff; --ok: #46d9a0;
  --display: "Chakra Petch", "Arial Narrow", system-ui, sans-serif;
  --body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 17px/1.62 var(--body); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 720px; }
h1, h2, h3 { font-family: var(--display); margin: 0; text-wrap: balance; }
h1 { font-weight: 700; font-size: clamp(44px, 8vw, 92px); line-height: .96; letter-spacing: -.015em; text-transform: uppercase; }
h1 span { background: var(--accent); color: var(--accent-ink); padding: 0 .14em; display: inline-block; transform: skewX(-8deg); }
h1 span i { display: inline-block; font-style: normal; transform: skewX(8deg); }
h2 { font-weight: 600; font-size: clamp(28px, 4vw, 42px); line-height: 1.08; }
h3 { font-weight: 600; font-size: 19px; line-height: 1.25; }
p { margin: 0; }
.eyebrow { font: 500 12.5px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.lead { font-size: clamp(18px, 2.2vw, 22px); line-height: 1.5; color: var(--muted); max-width: 34em; }
.lead b { color: var(--fg); font-weight: 500; }
section { padding: 84px 0; border-top: 1px solid var(--line); }
.stack { display: flex; flex-direction: column; gap: 18px; }
.stack-l { display: flex; flex-direction: column; gap: 34px; }

.hero { padding: 72px 0 0; border-top: 0; background: radial-gradient(1100px 520px at 70% -10%, rgba(255,201,40,.13), transparent 60%), var(--bg); }
.hero .top { display: flex; flex-direction: column; gap: 22px; padding-bottom: 48px; }
.shot { border: 1px solid var(--line); background: #000; box-shadow: 0 30px 80px rgba(0,0,0,.55); }
.hero .shot { border-bottom: 0; }
figure { margin: 0; display: flex; flex-direction: column; gap: 10px; }
figcaption { font-size: 14px; color: var(--muted); max-width: 62ch; }
figcaption b { color: var(--fg); font-weight: 500; }

.nums { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border: 1px solid var(--line); background: var(--bg-2); }
.nums div { padding: 22px 20px; border-right: 1px solid var(--line); min-width: 0; }
.nums div:last-child { border-right: 0; }
.nums b { display: block; font: 700 clamp(26px, 3.4vw, 40px)/1 var(--display); color: var(--accent); font-variant-numeric: tabular-nums; }
.nums span { display: block; margin-top: 8px; font-size: 13.5px; line-height: 1.35; color: var(--muted); }

.feat { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.feat div { background: var(--bg); padding: 22px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.feat p { font-size: 15px; color: var(--muted); line-height: 1.5; }

.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px; align-items: center; }
.split.rev { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.split.rev .txt { order: 2; }
.txt { display: flex; flex-direction: column; gap: 14px; }
.txt p { color: var(--muted); }
.txt p b, li b { color: var(--fg); font-weight: 500; }

.pipe { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; counter-reset: s; }
.pipe div { background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--accent); padding: 16px 16px 18px; display: flex; flex-direction: column; gap: 6px; min-width: 0; counter-increment: s; }
.pipe div::before { content: counter(s, decimal-leading-zero); font: 500 12px/1 var(--mono); color: var(--accent); letter-spacing: .1em; }
.pipe b { font: 600 17px/1.2 var(--display); }
.pipe span { font-size: 14px; line-height: 1.45; color: var(--muted); }
.pipe code { font-size: 12.5px; }

code { font-family: var(--mono); font-size: .88em; background: var(--panel); border: 1px solid var(--line); padding: 1px 6px; border-radius: 3px; white-space: nowrap; }
.rowimg { width: 100%; image-rendering: pixelated; border: 1px solid var(--line); background: #000; }
.icons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.icons figure { background: var(--panel); border: 1px solid var(--line); padding: 14px; gap: 10px; }
.icons .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.icons img { width: 100%; image-rendering: pixelated; border: 1px solid var(--line); }
.icons figcaption { font-size: 13.5px; }
.tag { font: 500 11.5px/1 var(--mono); letter-spacing: .06em; padding: 4px 7px; display: inline-block; }
.tag.k { background: var(--kill); color: #fff; } .tag.d { background: #ffa23a; color: #1a0f00; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.px { image-rendering: pixelated; width: 100%; border: 1px solid var(--line); }

ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; color: var(--muted); }
li::marker { color: var(--accent); }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; padding: 12px 16px 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font: 500 12px/1.2 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
td:first-child { color: var(--fg); font-weight: 500; white-space: nowrap; }
td { color: var(--muted); }
.scroll { overflow-x: auto; }
.quote { border-left: 3px solid var(--accent); padding: 6px 0 6px 20px; font: 500 clamp(20px, 2.6vw, 27px)/1.35 var(--display); max-width: 26em; }
footer { border-top: 1px solid var(--line); padding: 36px 0 60px; color: var(--muted); font-size: 14px; }

@media (max-width: 860px) {
  body { font-size: 16px; }
  section { padding: 56px 0; }
  .wrap { padding: 0 18px; }
  .nums { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nums div { border-bottom: 1px solid var(--line); }
  .nums div:nth-child(2n) { border-right: 0; }
  .nums div:last-child { grid-column: 1 / -1; border-bottom: 0; }
  .feat, .icons, .three { grid-template-columns: minmax(0, 1fr); }
  .split, .split.rev, .two { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .split.rev .txt { order: 0; }
  .pipe { grid-template-columns: minmax(0, 1fr); }
}

.views { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.views figure { background: var(--panel); border: 1px solid var(--line); padding: 12px; gap: 8px; }
.views img { width: 100%; image-rendering: pixelated; border: 1px solid var(--line); }
.views figcaption { font-size: 13.5px; }
.verdict { font: 500 11.5px/1 var(--mono); letter-spacing: .06em; padding: 4px 7px; display: inline-block; margin-right: 6px; }
.verdict.no { background: #3a2226; color: #ff8d84; } .verdict.yes { background: #17352b; color: var(--ok); }
.reads td:first-child, .reads td:nth-child(2) { font-family: var(--mono); font-size: 13.5px; white-space: normal; }
.reads td:nth-child(2) { color: var(--accent); }
.kinds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.kinds div { background: var(--bg); padding: 16px 18px; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.kinds b { font: 600 15.5px/1.25 var(--display); }
.kinds span { font-size: 13.5px; line-height: 1.45; color: var(--muted); }
.kinds i { font: 500 11px/1 var(--mono); font-style: normal; letter-spacing: .1em; text-transform: uppercase; color: var(--cyan); }
.steps { list-style: none; padding: 0; counter-reset: st; gap: 0; border: 1px solid var(--line); }
.steps li { counter-increment: st; display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; gap: 14px; align-items: baseline; padding: 14px 18px; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.steps li:last-child { border-bottom: 0; }
.steps li::before { content: counter(st, decimal-leading-zero); font: 500 12.5px/1 var(--mono); color: var(--accent); letter-spacing: .1em; }
.steps li span { font-size: 15px; line-height: 1.5; }
.steps li em { font: 500 12px/1.2 var(--mono); font-style: normal; color: var(--cyan); white-space: nowrap; }
.rule { background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--cyan); padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.rule b { font: 600 16px/1.25 var(--display); }
.rule span { font-size: 14.5px; line-height: 1.5; color: var(--muted); }
.rule code { font-size: 12.5px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.side { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: 20px; align-items: start; }
.cards { display: flex; flex-direction: column; gap: 22px; max-width: 940px; }
@media (max-width: 860px) { .grid2, .side { grid-template-columns: minmax(0, 1fr); } .steps li { grid-template-columns: 40px minmax(0, 1fr); } .steps li em { grid-column: 2; } }
@media (max-width: 860px) { .views, .kinds { grid-template-columns: minmax(0, 1fr); } }

/* ---------- navigacija na vrhu ---------- */
html { scroll-padding-top: 68px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--accent); color: var(--accent-ink); padding: 10px 14px; z-index: 100; font-weight: 600; }
.skip:focus { left: 8px; top: 8px; }
nav.top { position: sticky; top: 0; z-index: 50; background: rgba(11,14,17,.86); backdrop-filter: blur(12px) saturate(140%); -webkit-backdrop-filter: blur(12px) saturate(140%); border-bottom: 1px solid var(--line); }
nav.top .bar { display: flex; align-items: center; gap: 18px; height: 56px; }
nav.top .brand { font: 700 17px/1 var(--display); letter-spacing: .04em; color: var(--fg); text-decoration: none; white-space: nowrap; }
nav.top .brand b { background: var(--accent); color: var(--accent-ink); padding: 3px 7px; margin-left: 2px; }
nav.top .links { display: flex; align-items: center; gap: 2px; margin-left: auto; min-width: 0; }
nav.top .links a { font: 500 13px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); text-decoration: none; padding: 10px 10px; border-bottom: 2px solid transparent; white-space: nowrap; }
nav.top .links a:hover { color: var(--fg); }
nav.top .links a.on { color: var(--accent); border-bottom-color: var(--accent); }
nav.top .links a.sub { display: none; }
nav.top .here, nav.top .menu { display: none; }
a:focus-visible, button:focus-visible, [data-lb]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- gumb za vrh ---------- */
.to-top { position: fixed; right: max(18px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom)); z-index: 40; width: 46px; height: 46px; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 50%; cursor: pointer; box-shadow: 0 10px 30px rgba(0,0,0,.5); opacity: 0; transform: translateY(10px); transition: opacity .2s, transform .2s; }
.to-top.show { opacity: 1; transform: none; }
.to-top[hidden] { display: none; }

/* ---------- lightbox ---------- */
[data-lb] { cursor: zoom-in; }
dialog.lb { border: 0; padding: 0; margin: 0; width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; background: rgba(5,7,9,.96); color: var(--fg); overflow: hidden; }
dialog.lb::backdrop { background: rgba(5,7,9,.96); }
dialog.lb[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.lb-top { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; }
.lb-count { font: 500 12.5px/1 var(--mono); letter-spacing: .1em; color: var(--muted); }
.lb button { background: rgba(255,255,255,.08); color: var(--fg); border: 1px solid var(--line); cursor: pointer; font: 500 20px/1 var(--body); }
.lb button:hover { background: rgba(255,255,255,.16); }
#lb-close { width: 42px; height: 42px; border-radius: 50%; }
.lb-stage { display: grid; place-items: center; min-height: 0; padding: 0 12px; overflow: auto; touch-action: pan-y pinch-zoom; }
.lb-stage img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.lb-stage img.pixel { image-rendering: pixelated; width: min(100%, var(--pw)); }
.lb-stage.zoom { place-items: start; cursor: zoom-out; }
.lb-stage.zoom img { max-width: none; max-height: none; }
.lb-cap { margin: 0; padding: 12px 64px 18px; text-align: center; font-size: 14.5px; line-height: 1.5; color: var(--muted); max-width: 90ch; justify-self: center; }
.lb-cap b { color: var(--fg); font-weight: 500; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 64px; font-size: 30px !important; border-radius: 4px; }
.lb-nav.prev { left: 10px; } .lb-nav.next { right: 10px; }
body.lb-open { overflow: hidden; }

/* ---------- mobitel ---------- */
@media (max-width: 980px) {
  html { scroll-padding-top: 60px; }
  nav.top .bar { height: 52px; gap: 10px; }
  nav.top .brand { font-size: 15px; }
  nav.top .here { display: block; margin-left: auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 500 11.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
  nav.top .menu { display: grid; grid-template-columns: 18px auto; grid-template-rows: repeat(3, 2px); row-gap: 4px; column-gap: 8px; align-items: center; align-content: center; height: 40px; padding: 0 12px; background: var(--panel); color: var(--fg); border: 1px solid var(--line); cursor: pointer; flex: none; }
  nav.top .menu span { grid-column: 1; height: 2px; background: var(--accent); transition: transform .2s, opacity .2s; }
  nav.top .menu i { grid-column: 2; grid-row: 1 / 4; font: 500 12px/1 var(--mono); font-style: normal; letter-spacing: .08em; text-transform: uppercase; }
  nav.top .menu[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  nav.top .menu[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  nav.top .menu[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  nav.top .links { display: none; position: absolute; left: 0; right: 0; top: 100%; margin: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--bg-2); border-bottom: 1px solid var(--line); max-height: calc(100dvh - 52px); overflow-y: auto; padding: 6px 0 calc(10px + env(safe-area-inset-bottom)); box-shadow: 0 24px 50px rgba(0,0,0,.6); }
  nav.top .links.open { display: flex; }
  nav.top .links a, nav.top .links a.sub { display: block; padding: 15px 18px; font-size: 14px; border-bottom: 0; border-left: 3px solid transparent; }
  nav.top .links a.sub { padding-left: 34px; font-size: 12.5px; color: #7d8b95; }
  nav.top .links a.on { border-left-color: var(--accent); background: rgba(255,201,40,.07); }
  .to-top { width: 52px; height: 52px; }
  .lb-nav { top: auto; bottom: 14px; transform: none; width: 54px; height: 48px; }
  .lb-nav.prev { left: 14px; } .lb-nav.next { right: 14px; }
  .lb-cap { padding: 10px 78px 18px; font-size: 13.5px; min-height: 76px; }
  .hero { padding-top: 40px; }
  .steps li { padding: 12px 14px; }
  table { font-size: 14px; }
  .reads { min-width: 560px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .to-top, nav.top .menu span { transition: none; } }
