:root {
  --bg: #000;
  --fg: #f4f4f4;
  --dim: #8c8c8c;
  --line: #222;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Consolas, monospace;
  --sans: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
#net { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; opacity: .55; }
main, footer, .nav { position: relative; z-index: 1; }
a { color: inherit; }
.mono { font-family: var(--mono); }
.wrap { width: min(1120px, 100% - 48px); margin-inline: auto; }

/* nav */
.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px max(24px, calc((100% - 1120px) / 2));
  background: rgba(0,0,0,.88); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.brand { font-family: var(--mono); font-weight: 400; text-decoration: none; font-size: 18px; letter-spacing: -.02em; }
.brand b { font-weight: 700; }
.brand { display: inline-flex; align-items: center; line-height: 0; }
.brand img { display: block; height: 30px; width: auto; }
.foot .brand img { height: 26px; }
.brand .cur { align-self: flex-start; width: 12px; height: 3px; margin: 23px 0 0 0; background: #B48AFF; vertical-align: 0; border-radius: 1px; }
.cur { display: inline-block; width: 8px; height: 1.05em; background: var(--fg); margin-left: 3px; vertical-align: -3px; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.nav nav { display: flex; align-items: center; gap: 26px; font-size: 15px; }
.nav nav a { text-decoration: none; color: var(--dim); transition: color .15s; }
.nav nav a:hover, .nav nav a:focus-visible { color: var(--fg); }
.lang { display: flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.nav nav .lang a {
  font: 600 12px var(--mono); color: var(--dim); padding: 7px 10px; min-height: 32px; display: inline-flex; align-items: center;
}
.nav nav .lang a:hover { color: var(--fg); }
html[lang="bs"] .lang a[data-lang="bs"], html[lang="en"] .lang a[data-lang="en"] { background: var(--fg); color: #000; }

/* hero */
.hero { padding: clamp(72px, 14vh, 150px) 0 clamp(60px, 10vh, 110px); }
.tag { color: var(--dim); font-size: 14px; margin: 0 0 22px; }
h1 {
  font-size: clamp(36px, 6.4vw, 82px);
  line-height: 1.05;
  letter-spacing: -.035em;
  font-weight: 700;
  margin: 0 0 28px;
  max-width: none;
  text-wrap: balance;
}
h1 .dim { color: var(--dim); }
.lead { max-width: 52ch; font-size: clamp(18px, 2vw, 22px); color: #cfcfcf; margin: 0 0 36px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 24px; border-radius: 8px;
  border: 1px solid #3a3a3a; font: 600 15px var(--sans); text-decoration: none; color: var(--fg);
  background: transparent; cursor: pointer; transition: background .15s, color .15s, border-color .15s;
}
.btn:hover, .btn:focus-visible { border-color: var(--fg); }
.btn.solid { background: var(--fg); color: #000; border-color: var(--fg); }
.btn.solid:hover, .btn.solid:focus-visible { background: #fff; }
:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* sections */
.sec { padding: clamp(56px, 9vw, 110px) 0; border-top: 1px solid var(--line); }
.rows { list-style: none; margin: 0; padding: 0; }
.rows li {
  display: grid; grid-template-columns: 70px minmax(180px, 1fr) minmax(0, 1.4fr);
  gap: 16px 24px; align-items: baseline;
  padding: 28px 0; border-top: 1px solid var(--line);
}
.rows li:first-child { border-top: 0; padding-top: 6px; }
.rows .num { color: var(--dim); font-size: 14px; }
.rows h2 { margin: 0; font-size: clamp(24px, 3vw, 34px); letter-spacing: -.02em; line-height: 1.15; }
.rows p { margin: 0; color: #bdbdbd; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.big { margin: 0; font-size: clamp(30px, 4.6vw, 56px); letter-spacing: -.03em; line-height: 1.08; text-wrap: balance; }
.who p { margin: 0 0 18px; color: #bdbdbd; max-width: 46ch; }
.who .list { color: var(--fg); display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.list span { border: 1px solid #333; border-radius: 999px; padding: 4px 14px; font-size: 14px; }

.work {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap;
  border: 1px solid #2c2c2c; border-radius: 14px; padding: clamp(24px, 4vw, 44px);
}
.work h2 { font-size: clamp(26px, 3.4vw, 40px); letter-spacing: -.025em; margin: 14px 0 10px; line-height: 1.12; }
.work p { margin: 0; color: #bdbdbd; max-width: 56ch; }
.badge { font-size: 12px; border: 1px solid #fff; border-radius: 999px; padding: 3px 12px; }
.work-list { display: flex; flex-direction: column; gap: 16px; }
.work-link { font-size: 13px; color: var(--dim); text-decoration: none; white-space: nowrap; transition: color .15s; }
.work-link:hover { color: #fff; }
.more { color: var(--dim); font-size: 14px; margin: 0; }

/* contact */
.mail {
  display: inline-block; font-size: clamp(22px, 5.2vw, 64px); font-weight: 700; letter-spacing: -.03em;
  text-decoration: none; border-bottom: 2px solid #444; padding-bottom: 4px; margin: 4px 0 40px; word-break: break-all;
  transition: border-color .15s;
}
.mail:hover, .mail:focus-visible { border-color: var(--fg); }
.form { display: grid; gap: 16px; max-width: 560px; }
.form label { display: grid; gap: 6px; font-size: 14px; color: var(--dim); }
.form input, .form textarea {
  font: 16px var(--sans); color: var(--fg); background: #0b0b0b; border: 1px solid #2f2f2f;
  border-radius: 8px; padding: 12px 14px; width: 100%; resize: vertical;
}
.form input:focus, .form textarea:focus { outline: 0; border-color: #fff; }
.form .btn { justify-self: start; }
.hint { color: var(--dim); font-size: 12px; margin: 0; }
.hint.ok { color: #7ee2a8; font-size: 14px; }
.hint.err { color: #ff8a8a; font-size: 14px; }
.form input.bad, .form textarea.bad { border-color: #ff8a8a; }
.form .btn:disabled { opacity: .6; cursor: wait; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }


@media (max-width: 760px) {
  .menu-btn { display: inline-flex; }
  .nav nav .links {
    display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0;
    background: #000; border-bottom: 1px solid var(--line); padding: 4px 24px 12px;
  }
  .nav nav .links.open { display: flex; }
  .nav nav .links a { padding: 14px 0; font-size: 18px; color: var(--fg); border-top: 1px solid var(--line); }
  .nav nav .links a:first-child { border-top: 0; }
  .rows li { grid-template-columns: 44px 1fr; }
  .rows li p { grid-column: 2; }
  .split { grid-template-columns: 1fr; gap: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cur { animation: none; }
}

/* work: screenshots in device frames */
.work.has-shot { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.25fr); align-items: center; gap: clamp(24px, 4vw, 56px); }
.work-text .work-link { display: inline-block; margin-top: 20px; }
.shots { position: relative; display: block; padding: 0 0 8% 0; text-decoration: none; }
.browser {
  display: block; border: 1px solid #333; border-radius: 10px; overflow: hidden; background: #111;
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.9); transition: transform .5s cubic-bezier(.2,.7,.2,1), border-color .3s;
}
.browser .bar { display: flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; background: #161616; border-bottom: 1px solid #262626; }
.browser .bar i { width: 8px; height: 8px; border-radius: 50%; background: #3a3a3a; }
.browser .bar em { font: 11px var(--mono); color: #777; font-style: normal; margin-left: 10px; }
.browser img, .phone img { display: block; width: 100%; height: auto; }
.phone {
  position: absolute; right: -2%; bottom: 0; width: 24%; border: 4px solid #1d1d1d; outline: 1px solid #3a3a3a;
  border-radius: 18px; overflow: hidden; background: #000; box-shadow: -18px 24px 50px -10px rgba(0,0,0,.85);
  transition: transform .5s cubic-bezier(.2,.7,.2,1);
}
.shots:hover .browser { transform: translateY(-4px); border-color: #555; }
.shots:hover .phone { transform: translateY(-10px); }

/* about */
.about { display: grid; grid-template-columns: minmax(220px, .7fr) 1.3fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.portrait { margin: 0 auto; position: relative; width: 64%; max-width: 272px; }
.portrait img { display: block; width: 100%; height: auto; border-radius: 14px; border: 1px solid #2c2c2c; filter: grayscale(.15) contrast(1.03); }
.portrait::after { content: ""; position: absolute; inset: 12px -12px -12px 12px; border: 1px solid #2c2c2c; border-radius: 14px; z-index: -1; }
.about .big { margin-bottom: 22px; }
.about-text p { margin: 0 0 14px; color: #bdbdbd; max-width: 58ch; }
.facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; }

/* contact: direct chat */
.direct-h { color: var(--dim); margin: 0 0 12px; font-size: 15px; }
.direct { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 40px; }
.chip {
  display: inline-flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 18px; border: 1px solid #333; border-radius: 999px;
  text-decoration: none; font-weight: 600; font-size: 15px; transition: border-color .15s, background .15s;
}
.chip svg { width: 20px; height: 20px; }
.chip:hover, .chip:focus-visible { border-color: var(--fg); }
.chip.viber svg { color: #9b7bf5; }
.chip.wa svg { color: #3fd27a; }
.privacy { color: var(--dim); font-size: 13px; margin: 0; max-width: 60ch; }

/* floating chat buttons */
.fab { position: fixed; right: 18px; bottom: 18px; z-index: 20; display: flex; flex-direction: column; gap: 10px; }
.fab-btn {
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,.5); transition: transform .15s;
}
.fab-btn svg { width: 26px; height: 26px; }
.fab-btn.viber { background: #7360f2; }
.fab-btn.wa { background: #25d366; }
.fab-btn:hover, .fab-btn:focus-visible { transform: scale(1.08); }

/* footer */
.foot { position: relative; z-index: 1; border-top: 1px solid var(--line); padding: 48px 0 0; color: var(--dim); font-size: 14px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; gap: 32px; padding-bottom: 36px; }
.foot .brand { color: var(--fg); }
.foot p { margin: 10px 0 0; }
.foot-h { color: var(--fg); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; margin: 0 0 12px !important; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot a { text-decoration: none; color: var(--dim); transition: color .15s; }
.foot a:hover, .foot a:focus-visible { color: var(--fg); }
.foot-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--line); padding: 20px 0 32px; font-size: 12px; }
.dimtxt { font-size: 13px; }

/* scroll reveal (only when JS adds .anim and motion is allowed) */
.anim .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.anim .reveal.in { opacity: 1; transform: none; }
.anim .rows .reveal:nth-child(2) { transition-delay: .08s; }
.anim .rows .reveal:nth-child(3) { transition-delay: .16s; }
.anim .rows .reveal:nth-child(4) { transition-delay: .24s; }

/* 404 */
.nf { min-height: 70vh; display: flex; flex-direction: column; justify-content: center; }
.nf .code { font: 700 clamp(80px, 18vw, 200px)/1 var(--mono); letter-spacing: -.05em; margin: 0 0 10px; color: #222; -webkit-text-stroke: 1px #555; }

@media (max-width: 900px) {
  .work.has-shot { grid-template-columns: 1fr; }
  .work.has-shot .shots { order: -1; }
}
@media (max-width: 760px) {
  .about { grid-template-columns: 1fr; }
  .portrait { max-width: 300px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
  .fab { right: 14px; bottom: 14px; }
  .fab-btn { width: 48px; height: 48px; }
  .foot-bottom { padding-bottom: 90px; }
}
@media (prefers-reduced-motion: reduce) {
  .browser, .phone, .fab-btn { transition: none; }
  .shots:hover .browser, .shots:hover .phone { transform: none; }
}

/* nav links + mobile menu */
.nav nav .links { display: flex; align-items: center; gap: 26px; }
.menu-btn {
  display: none; flex-direction: column; justify-content: center; gap: 6px; width: 44px; height: 40px; padding: 0 11px;
  background: none; border: 1px solid var(--line); border-radius: 6px; cursor: pointer;
}
.menu-btn span { display: block; height: 2px; background: var(--fg); transition: transform .2s; }
.menu-btn[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }
.nav nav { gap: 14px; }

/* skip link */
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: #fff; color: #000; padding: 10px 14px; border-radius: 6px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }
main:focus { outline: none; }

/* long words (email) never overflow */
.foot a, .about-text, .work p { overflow-wrap: anywhere; }

/* floating buttons hide near the contact section */
.fab { transition: opacity .25s, transform .25s; }
.fab.hide { opacity: 0; transform: translateY(16px); pointer-events: none; }

/* mobile overrides (must stay last so they win over the base rules above) */
@media (max-width: 760px) {
  .menu-btn { display: inline-flex; }
  .nav nav .links {
    display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: #000; border-bottom: 1px solid var(--line); padding: 4px 24px 12px;
  }
  .nav nav .links.open { display: flex; }
  .foot-grid > div:last-child { grid-column: 1 / -1; }
  .fab-btn { width: 46px; height: 46px; }
  .fab-btn svg { width: 24px; height: 24px; }
}

/* cijene */
.prices { list-style: none; margin: 36px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.price { border: 1px solid var(--line); border-radius: 10px; padding: 26px 24px; background: rgba(10,10,10,.75); display: flex; flex-direction: column; gap: 10px; }
.price .num { color: var(--dim); font-size: 14px; }
.price h3 { margin: 0; font-size: 22px; letter-spacing: -.01em; line-height: 1.2; }
.price .amt { margin: 4px 0 0; color: var(--dim); font-size: 15px; }
.price .amt b { color: var(--fg); font-size: 40px; letter-spacing: -.03em; font-weight: 700; }
.price .per { margin: -6px 0 0; color: #B48AFF; font-size: 14px; }
.price p:last-child { margin: 0; color: #bdbdbd; font-size: 15px; }
.price:last-child { border-color: #3d2a66; }
.price-notes { margin-top: 26px; color: var(--dim); font-size: 15px; max-width: 72ch; }
.price-notes p { margin: 0 0 8px; }
@media (max-width: 860px) { .prices { grid-template-columns: 1fr; } }

/* AI asistent (dugme + panel) */
.fab-btn.ai { background: #0b0b0f; border: 1px solid #3d2a66; color: #B48AFF; cursor: pointer; font: 700 15px var(--mono); letter-spacing: .02em; }
.fab-btn.ai:hover, .fab-btn.ai:focus-visible { border-color: #8B3DFF; }
.ai-on .fab { opacity: 0; pointer-events: none; }
.aichat { position: fixed; right: 18px; bottom: 18px; z-index: 30; width: min(370px, calc(100vw - 24px)); height: min(540px, calc(100vh - 100px)); display: flex; flex-direction: column;
  background: #0a0a0c; border: 1px solid #2a2a2a; border-radius: 14px; box-shadow: 0 24px 60px rgba(0,0,0,.7); overflow: hidden; }
.aichat[hidden] { display: none; }
.ai-head { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 14px; border-bottom: 1px solid #1e1e1e; }
.ai-head > div { flex: 1; min-width: 0; line-height: 1.25; }
.ai-head b { display: block; font-size: 15px; }
.ai-head small { color: var(--dim); font-size: 11px; }
.ai-dot { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #1a1030; color: #B48AFF; font-size: 12px; font-weight: 700; flex: none; }
.ai-x, .ai-r { background: none; border: 0; color: var(--dim); font-size: 22px; line-height: 1; width: 34px; height: 34px; border-radius: 8px; cursor: pointer; }
.ai-r { font-size: 17px; }
.ai-x:hover, .ai-r:hover, .ai-x:focus-visible, .ai-r:focus-visible { color: var(--fg); background: #161616; }
.ai-body { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.ai-b { max-width: 86%; padding: 9px 12px; border-radius: 12px; font-size: 14.5px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.ai-b.bot { background: #151518; color: #e6e6e6; border-top-left-radius: 4px; align-self: flex-start; }
.ai-b.me { background: #f4f4f4; color: #000; border-top-right-radius: 4px; align-self: flex-end; }
.ai-b a { color: #B48AFF; }
.ai-b.me a { color: #5a1fd1; }
.ai-b.typing { display: flex; gap: 4px; padding: 12px; }
.ai-b.typing i { width: 6px; height: 6px; border-radius: 50%; background: #777; animation: aidot 1s infinite; }
.ai-b.typing i:nth-child(2) { animation-delay: .15s; } .ai-b.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes aidot { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }
.ai-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px; }
.ai-chips:empty { display: none; }
.ai-chips button { background: none; border: 1px solid #333; color: #cfcfcf; border-radius: 999px; padding: 6px 11px; font: 13px var(--sans); cursor: pointer; }
.ai-chips button:hover, .ai-chips button:focus-visible { border-color: #8B3DFF; color: var(--fg); }
.ai-in { display: flex; gap: 8px; padding: 12px 14px 6px; }
.ai-in input { flex: 1; min-width: 0; background: #111; border: 1px solid #2f2f2f; border-radius: 10px; padding: 10px 12px; color: var(--fg); font: 15px var(--sans); }
.ai-in input:focus { outline: 0; border-color: #8B3DFF; }
.ai-in button { width: 42px; border: 0; border-radius: 10px; background: #8B3DFF; color: #fff; font-size: 18px; cursor: pointer; }
.ai-note { margin: 0; padding: 0 14px 10px; color: #666; font-size: 10.5px; }
@media (max-width: 560px) {
  .aichat { right: 8px; left: 8px; bottom: 8px; width: auto; height: min(78vh, calc(100vh - 70px)); }
}
@media (prefers-reduced-motion: reduce) { .ai-b.typing i { animation: none; } }

/* Video demo za 48 h */
.demo48 { margin-top: 22px; border: 1px solid #3d2a66; border-radius: 10px; padding: 26px 24px; background: linear-gradient(135deg, rgba(139,61,255,.12), rgba(10,10,10,.8) 60%); }
.demo48 .tag { margin-bottom: 10px; color: #B48AFF; }
.demo48 h3 { margin: 0 0 8px; font-size: clamp(22px, 2.6vw, 30px); letter-spacing: -.02em; }
.demo48 p { margin: 0 0 18px; color: #bdbdbd; max-width: 68ch; }

/* prilog u formi */
.form .file input[type=file] { padding: 10px; font: 14px var(--sans); color: var(--dim); }
.form .file input[type=file]::file-selector-button { font: 600 13px var(--sans); background: #1a1a1a; color: var(--fg); border: 1px solid #3a3a3a; border-radius: 6px; padding: 7px 12px; margin-right: 10px; cursor: pointer; }
.form .file .hint { font-size: 12px; }
.ai-body { scrollbar-width: thin; scrollbar-color: #333 transparent; }
.ai-head small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }

/* faq */
.faq-list { display: grid; gap: 10px; max-width: 820px; margin-top: 8px; }
.faq-i { border: 1px solid #2c2c2c; border-radius: 12px; padding: 0 18px; background: rgba(255,255,255,.02); }
.faq-i summary { cursor: pointer; list-style: none; padding: 16px 28px 16px 0; font-weight: 600; position: relative; }
.faq-i summary::-webkit-details-marker { display: none; }
.faq-i summary::after { content: "+"; position: absolute; right: 0; top: 13px; font-size: 20px; color: #B48AFF; transition: transform .2s; }
.faq-i[open] summary::after { transform: rotate(45deg); }
.faq-i p { margin: 0 0 16px; color: #bdbdbd; max-width: 70ch; }

/* preporuke */
.ref-card { margin: 0; display: grid; grid-template-columns: 1.4fr .6fr; gap: clamp(24px, 4vw, 56px); align-items: center; }
.ref-card blockquote { margin: 0; border-left: 3px solid #8B3DFF; padding-left: clamp(16px, 2.5vw, 28px); }
.ref-card blockquote p { margin: 0 0 16px; font-size: clamp(18px, 2vw, 23px); line-height: 1.45; color: #f4f4f4; }
.ref-card figcaption { display: flex; flex-direction: column; gap: 12px; }
.ref-card figcaption > span { display: flex; flex-direction: column; gap: 4px; color: #bdbdbd; font-size: 14px; }
.ref-card figcaption b { color: #fff; font-size: 16px; }
.ref-doc img { display: block; width: 100%; max-width: 220px; height: auto; border-radius: 8px; border: 1px solid #2c2c2c; transform: rotate(-2deg); transition: transform .2s; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.ref-doc:hover img { transform: rotate(0) scale(1.02); }
@media (max-width: 760px) { .ref-card { grid-template-columns: 1fr; } .ref-doc img { max-width: 170px; } }

/* prečica na početnom ekranu */
.foot-app { margin-top: 28px; }
