/* =========================================================
   VUDUX — retro-modern software company
   Mobile-first. Dark / terminal estetika.
   ========================================================= */

:root {
  /* Brend boje */
  --blue:        #2685c9;   /* iz logoa */
  --blue-bright: #3aa6ee;   /* neon akcenat na tamnom */
  --blue-soft:   rgba(58, 166, 238, 0.12);
  --green:       #3fb950;   /* terminal ok */

  /* Pozadine */
  --bg:        #0a0c10;
  --bg-2:      #0e1117;
  --panel:     #12161d;
  --panel-2:   #161b24;
  --border:    #222a35;
  --border-2:  #2c3644;

  /* Tekst */
  --text:      #d6dde6;
  --text-dim:  #8b95a3;
  --text-mut:  #626d7c;

  /* Tipografija */
  --sans: "Space Grotesk", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --maxw: 1160px;
  --radius: 10px;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
  overflow-x: hidden;
  position: relative;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-bright); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: #7cc6f5; }

::selection { background: var(--blue); color: #fff; }

/* ---------- CRT / scanline overlay (suptilno) ---------- */
.crt-overlay {
  position: fixed; inset: 0; pointer-events: none; z-index: 9999;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0.015) 0px,
    rgba(255,255,255,0.015) 1px,
    transparent 1px,
    transparent 3px
  );
  mix-blend-mode: overlay;
  opacity: .5;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 10000;
  background: var(--blue); color: #fff; padding: 10px 16px; font-family: var(--mono);
}
.skip-link:focus { left: 8px; top: 8px; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

.section { padding: 72px 0; position: relative; }
.section-alt { background: var(--bg-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.section-tag {
  font-family: var(--mono); font-size: .8rem; color: var(--blue-bright);
  letter-spacing: .04em; margin-bottom: 12px;
}
.section-title {
  font-size: clamp(1.6rem, 4.5vw, 2.5rem); font-weight: 700; line-height: 1.15;
  letter-spacing: -0.02em; margin-bottom: 18px; max-width: 22ch;
}
.section-lead { color: var(--text-dim); max-width: 60ch; font-size: 1.05rem; margin-bottom: 40px; }

/* ---------- Dugmad ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--mono); font-weight: 500; font-size: .92rem;
  padding: 13px 22px; border-radius: 8px; border: 1px solid transparent;
  cursor: pointer; transition: all .22s var(--ease); position: relative;
  white-space: nowrap; letter-spacing: .01em;
}
.btn-primary {
  background: var(--blue); color: #fff;
  border-color: var(--blue-bright);
  box-shadow: 0 0 0 0 var(--blue-soft);
}
.btn-primary:hover {
  background: var(--blue-bright); color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 26px -8px rgba(58,166,238,.6);
}
.btn-ghost {
  background: transparent; color: var(--text);
  border-color: var(--border-2);
}
.btn-ghost:hover { border-color: var(--blue-bright); color: var(--blue-bright); background: var(--blue-soft); }
.btn-block { width: 100%; }
.btn-nav { padding: 9px 16px; font-size: .85rem; background: var(--blue); color:#fff; border-color: var(--blue-bright); }
.btn-nav:hover { background: var(--blue-bright); color:#fff; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(10,12,16,.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand-logo { height: 36px; width: auto; }

.main-nav .nav-list { list-style: none; display: flex; align-items: center; gap: 6px; }
.main-nav a {
  color: var(--text-dim); font-family: var(--mono); font-size: .9rem;
  padding: 8px 12px; border-radius: 6px; transition: all .2s var(--ease);
}
.main-nav a:not(.btn):hover { color: var(--text); background: var(--panel); }
.nav-ext { color: var(--blue-bright) !important; }
.ext-arrow { font-size: .8em; }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px; background: none; border: 0;
  cursor: pointer; padding: 8px;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--text); transition: all .25s var(--ease); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 56px 0 36px; overflow: hidden; }
.grid-bg {
  position: absolute; inset: 0; z-index: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 30%, transparent 75%);
  opacity: .5;
}
.hero-inner { position: relative; z-index: 1; display: grid; gap: 40px; align-items: center; }

.eyebrow { font-family: var(--mono); color: var(--blue-bright); font-size: .9rem; margin-bottom: 18px; }
.blink { animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.hero-title {
  font-size: clamp(2.1rem, 8vw, 3.6rem); font-weight: 700; line-height: 1.08;
  letter-spacing: -0.03em; margin-bottom: 20px;
}
.hero-title .accent { color: var(--blue-bright); }
.hero-sub { color: var(--text-dim); font-size: 1.1rem; max-width: 52ch; margin-bottom: 30px; }

.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 40px; }

.hero-stats {
  list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 18px;
  border-top: 1px solid var(--border); padding-top: 22px; max-width: 560px;
}
.hero-stats li { display: flex; flex-direction: column; }
.hero-stats strong {
  font-family: var(--mono); color: var(--text);
  font-size: clamp(.78rem, 1.4vw, .9rem); white-space: nowrap; letter-spacing: -0.01em;
}
.hero-stats span { color: var(--text-mut); font-size: .82rem; font-family: var(--mono); }

/* ---------- Terminal ---------- */
.terminal {
  background: var(--panel); border: 1px solid var(--border-2);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 24px 60px -24px rgba(0,0,0,.8), 0 0 0 1px rgba(58,166,238,.06);
  font-family: var(--mono);
}
.term-bar {
  display: flex; align-items: center; gap: 8px;
  background: var(--panel-2); padding: 11px 14px; border-bottom: 1px solid var(--border);
}
.term-dot { width: 11px; height: 11px; border-radius: 50%; }
.term-dot.red { background: #ff5f56; } .term-dot.yellow { background: #ffbd2e; } .term-dot.green { background: #27c93f; }
.term-title { margin-left: 10px; color: var(--text-mut); font-size: .78rem; }
.term-body { padding: 18px; font-size: .86rem; line-height: 1.9; }
.term-line .prompt { color: var(--green); margin-right: 8px; }
.term-line .cmd { color: var(--text); }
.term-out { color: var(--text-dim); }
.term-out .ok { color: var(--green); }
.term-line.success { color: var(--green); margin-top: 6px; }
.cursor { color: var(--blue-bright); animation: blink 1.1s steps(1) infinite; }

/* ---------- Cards (Šta radimo) ---------- */
.cards-3 { display: grid; gap: 18px; }
.card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; transition: all .25s var(--ease);
}
.card:hover { border-color: var(--blue-bright); transform: translateY(-3px); box-shadow: 0 16px 40px -20px rgba(58,166,238,.4); }
.card-ico {
  display: inline-flex; align-items:center; justify-content:center;
  width: 44px; height: 44px; border-radius: 8px;
  background: var(--blue-soft); color: var(--blue-bright);
  font-family: var(--mono); font-size: 1.2rem; margin-bottom: 16px;
}
.card h3 { font-size: 1.2rem; margin-bottom: 8px; }
.card p { color: var(--text-dim); font-size: .96rem; }

/* ---------- Za koga ---------- */
.audience-grid { display: grid; gap: 16px; }
.aud-item {
  background: var(--panel); border: 1px solid var(--border); border-left: 3px solid var(--blue);
  border-radius: 8px; padding: 22px;
}
.aud-num { font-family: var(--mono); color: var(--blue-bright); font-size: .85rem; }
.aud-item h3 { font-size: 1.12rem; margin: 6px 0 8px; }
.aud-item p { color: var(--text-dim); font-size: .95rem; }

/* ---------- Usluge ---------- */
.services { display: grid; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.svc { background: var(--bg); padding: 26px; transition: background .22s var(--ease); }
.svc:hover { background: var(--panel); }
.svc h3 { font-size: 1.1rem; margin-bottom: 8px; display: flex; align-items: baseline; gap: 10px; }
.svc-idx { font-family: var(--mono); color: var(--blue-bright); font-size: .85rem; }
.svc p { color: var(--text-dim); font-size: .95rem; }

/* ---------- Zašto ---------- */
.why-grid { display: grid; gap: 18px; }
.why-item { padding: 22px; border: 1px dashed var(--border-2); border-radius: 8px; background: var(--panel); }
.why-item h3 { font-size: 1.1rem; margin-bottom: 8px; color: var(--text); }
.why-item h3::before { content: "✓ "; color: var(--green); font-family: var(--mono); }
.why-item p { color: var(--text-dim); font-size: .95rem; }

/* ---------- Proces ---------- */
.process { list-style: none; display: grid; gap: 0; counter-reset: step; }
.proc-step {
  position: relative; padding: 24px 0 24px 64px; border-left: 2px solid var(--border);
  margin-left: 22px;
}
.proc-step:last-child { border-left-color: transparent; }
.proc-num {
  position: absolute; left: -22px; top: 22px;
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--panel); border: 1px solid var(--blue); color: var(--blue-bright);
  font-family: var(--mono); font-size: .9rem; font-weight: 700;
}
.proc-step h3 { font-size: 1.18rem; margin-bottom: 6px; }
.proc-step p { color: var(--text-dim); font-size: .98rem; max-width: 60ch; }

/* ---------- Fiskalizacija teaser ---------- */
.fisk-card {
  display: grid; gap: 30px; align-items: center;
  background: linear-gradient(135deg, var(--panel) 0%, var(--panel-2) 100%);
  border: 1px solid var(--border-2); border-radius: 14px; padding: 38px;
  position: relative; overflow: hidden;
}
.fisk-card::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 100% 0%, var(--blue-soft), transparent 50%);
  pointer-events: none;
}
.fisk-copy { position: relative; z-index: 1; }
.fisk-copy .section-title { font-size: clamp(1.5rem, 4vw, 2rem); }
.fisk-copy p { color: var(--text-dim); margin-bottom: 26px; max-width: 52ch; }
.fisk-code {
  font-family: var(--mono); font-size: .85rem; line-height: 1.9;
  background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
  padding: 20px; color: var(--text-dim); overflow-x: auto; position: relative; z-index: 1;
}

/* code highlight tokens */
.c-com { color: var(--text-mut); }
.c-key { color: var(--blue-bright); }
.c-str { color: #9ece6a; }
.c-ok  { color: var(--green); }

/* ---------- O nama ---------- */
.about { display: grid; gap: 30px; align-items: center; }
.about-copy p { color: var(--text-dim); margin-bottom: 16px; max-width: 60ch; }
.about-sign { font-family: var(--mono); color: var(--blue-bright) !important; font-style: normal; }
.about-panel { }
.about-code {
  font-family: var(--mono); font-size: .85rem; line-height: 1.85;
  background: var(--bg); border: 1px solid var(--border-2); border-radius: 10px;
  padding: 24px; overflow-x: auto; color: var(--text-dim);
  box-shadow: 0 18px 50px -28px rgba(0,0,0,.8);
}

/* ---------- Kontakt ---------- */
.kontakt-grid { display: grid; gap: 30px; }
.kontakt-form { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; }
.field { margin-bottom: 18px; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.field label { display: block; font-family: var(--mono); font-size: .82rem; color: var(--text-dim); margin-bottom: 7px; }
.field input, .field textarea {
  width: 100%; background: var(--bg); border: 1px solid var(--border-2); border-radius: 7px;
  color: var(--text); padding: 12px 14px; font-family: var(--mono); font-size: .92rem;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease); resize: vertical;
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--blue-bright); box-shadow: 0 0 0 3px var(--blue-soft);
}
.form-note { font-family: var(--mono); font-size: .85rem; margin-top: 12px; min-height: 1.2em; }
.form-note.ok { color: var(--green); }
.form-note.err { color: #ff6b6b; }

.kontakt-info { display: flex; flex-direction: column; gap: 22px; }
.info-block { border-left: 2px solid var(--blue); padding-left: 16px; }
.info-label { font-family: var(--mono); font-size: .8rem; color: var(--text-mut); display: block; margin-bottom: 4px; }
.info-block a { font-family: var(--mono); font-size: 1rem; }
.info-block p { color: var(--text-dim); font-size: .92rem; }
.kontakt-ascii {
  font-family: var(--mono); font-size: .82rem; color: var(--green); line-height: 1.7;
  background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 16px;
}

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-2); border-top: 1px solid var(--border); padding: 44px 0 24px; }
.footer-inner { display: grid; gap: 26px; }
.footer-brand img { height: 34px; width: auto; margin-bottom: 12px; }
.footer-brand p { color: var(--text-mut); font-family: var(--mono); font-size: .88rem; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 16px; }
.footer-nav a { color: var(--text-dim); font-family: var(--mono); font-size: .9rem; }
.footer-nav a:hover { color: var(--blue-bright); }
.footer-bottom {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between;
  border-top: 1px solid var(--border); margin-top: 26px; padding-top: 20px;
}
.footer-bottom span { color: var(--text-mut); font-family: var(--mono); font-size: .8rem; }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.visible { opacity: 1; transform: none; }

/* =========================================================
   RESPONSIVE — tablet i desktop
   ========================================================= */
@media (min-width: 640px) {
  .cards-3 { grid-template-columns: repeat(3, 1fr); }
  .audience-grid { grid-template-columns: repeat(2, 1fr); }
  .services { grid-template-columns: repeat(2, 1fr); }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-stats { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 900px) {
  .section { padding: 96px 0; }
  .hero { padding: 72px 0 44px; }
  .hero-inner { grid-template-columns: 1.05fr .95fr; gap: 56px; }
  .services { grid-template-columns: repeat(3, 1fr); }
  .fisk-card { grid-template-columns: 1.1fr .9fr; padding: 48px; }
  .about { grid-template-columns: 1fr 1fr; }
  .kontakt-grid { grid-template-columns: 1.2fr .8fr; }
  .footer-inner { grid-template-columns: 1fr auto; align-items: center; }
}

/* ---------- Mobilna navigacija ---------- */
@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .main-nav {
    position: fixed; inset: 64px 0 auto 0;
    background: var(--bg-2); border-bottom: 1px solid var(--border);
    max-height: 0; overflow: hidden; transition: max-height .35s var(--ease);
  }
  .main-nav.open { max-height: 70vh; }
  .main-nav .nav-list { flex-direction: column; align-items: stretch; gap: 0; padding: 8px 16px 20px; }
  .main-nav .nav-list li { width: 100%; }
  .main-nav a { display: block; padding: 14px 8px; border-bottom: 1px solid var(--border); font-size: 1rem; }
  .main-nav .btn-nav { margin-top: 12px; text-align: center; border-bottom: 0; }
}

/* ---------- Reduce motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
