/* ═══════════════════════════════════════════════
   Kodalium — glavni stilovi
   Paleta: toplo-svijetla, povjerenje + 8-bit šarm
   ═══════════════════════════════════════════════ */

:root {
  --bg: #FBFAF6;
  --surface: #FFFFFF;
  --ink: #22304A;
  --muted: #5B6B82;
  --primary: #2E6BE6;
  --primary-dark: #1E4FC2;
  --primary-soft: #E7EEFC;
  --coral: #E06A45;
  --coral-dark: #B84E2C;
  --px-dots: linear-gradient(90deg, var(--line) 0 4px, transparent 4px 12px);
  --mint: #2AAE8F;
  --mint-soft: #E3F4EF;
  --yellow: #FFC53D;
  --line: #E6E1D5;
  --navy: #152238;
  --navy-2: #1C2C47;
  --shadow-hard: 4px 4px 0 rgba(34, 48, 74, 0.10);
  --shadow-hard-hover: 6px 6px 0 rgba(34, 48, 74, 0.12);
  --radius: 14px;
  --font-head: "Space Grotesk", "Trebuchet MS", sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "Menlo", monospace;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  font-size: 16.5px;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--yellow); color: var(--ink); }

img, svg { max-width: 100%; }

h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; letter-spacing: -0.01em; }

/* width:100% je obavezan — u flex koloni (.snap-page) `margin:0 auto` poništava
   rastezanje, pa bi se kontejner skupljao na širinu sadržaja i mijenjao raspored */
.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: #fff; padding: 10px 18px; z-index: 100;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ── Dugmad ─────────────────────────────── */
.btn {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1rem;
  padding: 13px 26px;
  border-radius: 10px;
  border: 2px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary-dark);
  box-shadow: 4px 4px 0 rgba(30, 79, 194, 0.25);
}
.btn-primary:hover {
  background: var(--primary-dark);
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 rgba(30, 79, 194, 0.25);
}
.btn-primary:active { transform: translate(0, 0); box-shadow: 2px 2px 0 rgba(30, 79, 194, 0.25); }
.btn-ghost {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
  box-shadow: var(--shadow-hard);
}
.btn-ghost:hover { border-color: var(--ink); transform: translate(-2px, -2px); box-shadow: var(--shadow-hard-hover); }
.btn-lg { padding: 15px 32px; font-size: 1.05rem; }

/* ── Header / navigacija ────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
}
.site-header::after {
  content: ""; display: block; height: 4px;
  background-image: var(--px-dots);
  background-size: 12px 4px; background-repeat: repeat-x;
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding-top: 14px; padding-bottom: 14px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark { width: 30px; height: 30px; image-rendering: pixelated; }
.brand-name { font-family: var(--font-head); font-weight: 700; font-size: 1.35rem; letter-spacing: -0.02em; }

.nav-menu { display: flex; align-items: center; gap: 26px; }
.nav-menu > a:not(.btn) {
  color: var(--ink); text-decoration: none; font-weight: 500; font-size: .98rem;
  border-bottom: 2px solid transparent; padding: 2px 0;
}
.nav-menu > a:not(.btn):hover { border-bottom-color: var(--coral); }
.btn-nav { padding: 10px 20px; font-size: .95rem; }

.lang-switch {
  display: flex; border: 2px solid var(--line); border-radius: 8px; overflow: hidden;
  background: var(--surface);
}
.lang-switch button {
  font-family: var(--font-mono); font-size: .82rem; font-weight: 500;
  padding: 6px 10px; border: 0; background: transparent; color: var(--muted); cursor: pointer;
}
.lang-switch button.active { background: var(--ink); color: #fff; }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span {
  display: block; width: 24px; height: 3px; background: var(--ink);
  margin: 5px 0; border-radius: 2px; transition: transform .2s ease, opacity .2s ease;
}

/* ── Hero ───────────────────────────────── */
.hero { padding: 72px 0 84px; overflow: hidden; }
.hero-grid {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: .85rem; color: var(--primary-dark);
  background: var(--primary-soft); border: 1px solid #CFDDF9;
  padding: 7px 14px; border-radius: 999px; margin-bottom: 22px;
}
.eyebrow-bot { width: 18px; height: 11px; }
.hero h1 { font-size: clamp(2.3rem, 5vw, 3.4rem); font-weight: 700; margin-bottom: 20px; }
.hero h1 em {
  font-style: normal; color: var(--primary);
  background: linear-gradient(transparent 62%, var(--yellow) 62%, var(--yellow) 92%, transparent 92%);
}
.lead { font-size: 1.15rem; color: var(--muted); max-width: 52ch; margin-bottom: 30px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 30px; }
.hero-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 30px; }
.hero-chips li {
  display: flex; align-items: center; gap: 9px;
  font-family: var(--font-head); font-weight: 600; font-size: .92rem;
  text-transform: uppercase; letter-spacing: .08em; color: var(--ink);
}
.chip-dot {
  width: 8px; height: 8px; background: var(--mint); display: inline-block;
  box-shadow: 2px 2px 0 rgba(42, 174, 143, .3);
}

/* ── Terminal ───────────────────────────── */
.hero-visual { position: relative; }
.terminal {
  position: relative;
  background: var(--navy);
  border-radius: var(--radius);
  border: 2px solid var(--navy-2);
  box-shadow: 8px 8px 0 rgba(34, 48, 74, 0.12);
  font-family: var(--font-mono);
  font-size: .92rem;
  margin-top: 26px;
}
.peek-bot {
  position: absolute; top: -42px; right: 34px;
  width: 88px; height: 44px;
  image-rendering: pixelated;
  animation: peek-bob 1.8s steps(1) infinite;
}
/* Dvofrejmna animacija — pravi 8-bit, bez međukoraka koji zamute piksele */
@keyframes peek-bob {
  0%, 49% { transform: translateY(0); }
  50%, 100% { transform: translateY(-4px); }
}
.terminal-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; border-bottom: 1px solid var(--navy-2);
}
.t-dot { width: 11px; height: 11px; border-radius: 50%; }
.t-red { background: #F26D5F; }
.t-yellow { background: #F7BE4F; }
.t-green { background: #59C837; }
.terminal-title { margin-left: 10px; color: #6C7E9C; font-size: .8rem; }
.terminal-body { padding: 18px 20px 22px; min-height: 218px; color: #D8E2F1; }
.t-line { white-space: pre-wrap; word-break: break-word; }
.t-prompt { color: var(--mint); }
.t-cursor {
  display: inline-block; width: 9px; height: 1.15em; vertical-align: text-bottom;
  background: var(--yellow); animation: blink 1s steps(1) infinite; margin-left: 1px;
}
@keyframes blink { 50% { opacity: 0; } }
#t-output .t-line { margin-top: 6px; }
.t-ok { color: #7BD8A8; }
.t-info { color: #8FB2E8; }
.t-warn { color: var(--yellow); }
.t-dim { color: #6C7E9C; }

/* ══════════════════════════════════════════
   Dither prelazi — sekcije se raspadaju jedna
   u drugu kroz 4 nivoa gustoće, kao na Amigi
   ══════════════════════════════════════════ */
:root {
  --d75: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8'%3E%3Cpath fill='%23fff' d='M4 0h4v4H4zM0 4h4v4H0zM4 4h4v4H4z'/%3E%3C/svg%3E");
  --d50: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8'%3E%3Cpath fill='%23fff' d='M0 0h4v4H0zM4 4h4v4H4z'/%3E%3C/svg%3E");
  --d25: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8'%3E%3Cpath fill='%23fff' d='M4 0h4v4H4z'/%3E%3C/svg%3E");
  --d12: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='8'%3E%3Cpath fill='%23fff' d='M8 0h4v4H8z'/%3E%3C/svg%3E");
}

@supports ((mask-image: none) or (-webkit-mask-image: none)) {
  .section, .site-footer { position: relative; }
  .section[data-dither]::before,
  .site-footer::before {
    content: ""; position: absolute; inset: 0 0 auto; height: 32px;
    pointer-events: none; z-index: 1;
    background-color: var(--dither-from, transparent);
    -webkit-mask-image: var(--d75), var(--d50), var(--d25), var(--d12);
            mask-image: var(--d75), var(--d50), var(--d25), var(--d12);
    -webkit-mask-size: 8px 8px, 8px 8px, 8px 8px, 16px 8px;
            mask-size: 8px 8px, 8px 8px, 8px 8px, 16px 8px;
    -webkit-mask-position: 0 0, 0 8px, 0 16px, 0 24px;
            mask-position: 0 0, 0 8px, 0 16px, 0 24px;
    -webkit-mask-repeat: repeat-x;
            mask-repeat: repeat-x;
  }
  /* boja sekcije IZNAD, koja se raspada u ovu */
  #proizvodi::before  { --dither-from: var(--bg); }
  #odluka::before     { --dither-from: var(--surface); }
  #ekspertiza::before { --dither-from: var(--bg); }
  #proces::before     { --dither-from: var(--primary-soft); }
  #zasto::before      { --dither-from: var(--surface); }
  #kontakt::before    { --dither-from: var(--bg); }
  .site-footer::before { --dither-from: var(--mint-soft); height: 40px; }

  /* tačkasti rubovi su suvišni tamo gdje dither preuzima posao */
  .section-alt, .section-exp, .section-contact { background-image: none; }
}

/* ── Pixel razdjelnik (tačkice u boji) ──── */
.px-divider {
  height: 6px;
  background-image:
    linear-gradient(90deg,
      var(--coral) 0 6px, transparent 6px 18px,
      var(--primary) 18px 24px, transparent 24px 36px,
      var(--yellow) 36px 42px, transparent 42px 54px,
      var(--mint) 54px 60px, transparent 60px 72px);
  background-size: 72px 6px;
  background-repeat: repeat-x;
  opacity: .6;
  max-width: 1120px;
  margin: 0 auto;
}

/* ── Sekcije ────────────────────────────── */
.section { padding: 88px 0; scroll-margin-top: 76px; }
.section-alt {
  background-color: var(--surface);
  background-image: var(--px-dots), var(--px-dots);
  background-size: 12px 4px, 12px 4px;
  background-position: left top, left bottom;
  background-repeat: repeat-x, repeat-x;
}
.section-head { max-width: 620px; margin-bottom: 28px; }
.section-head h2 { font-size: clamp(1.8rem, 3.5vw, 2.4rem); margin-bottom: 12px; }
.section-head p { color: var(--muted); font-size: 1.08rem; }

/* ── Kartice usluga ─────────────────────── */
.cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover {
  transform: translate(-3px, -3px);
  box-shadow: var(--shadow-hard-hover);
  border-color: var(--ink);
}
.card-icon { width: 44px; height: 44px; margin-bottom: 18px; image-rendering: pixelated; }
.card h3 { font-size: 1.18rem; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: .96rem; }

/* ── Proizvodi / moduli ─────────────────── */
#proizvodi .section-head { margin-bottom: 14px; }
.modules-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
}
.module-card {
  background: var(--bg);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 17px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.module-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: var(--shadow-hard-hover);
  border-color: var(--ink);
}
.module-icon { width: 38px; height: 34px; image-rendering: pixelated; margin-bottom: 12px; }
.module-card h3 {
  font-family: var(--font-mono); font-weight: 500;
  font-size: .97rem; color: var(--ink); margin-bottom: 7px;
}
.module-card p { color: var(--muted); font-size: .87rem; line-height: 1.5; }

.products-footer {
  margin-top: 24px; display: flex; align-items: center; justify-content: space-between;
  gap: 26px; flex-wrap: wrap;
}
.products-note { color: var(--muted); font-size: .9rem; max-width: 62ch; }

/* ── KodaliumDE — demo motor odluke ─────── */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
#odluka .section-head { margin-bottom: 14px; }
#odluka .section-head h2 { font-size: clamp(1.6rem, 2.8vw, 2rem); margin-bottom: 8px; }
.de-kicker {
  font-family: var(--font-mono); font-size: .78rem; text-transform: uppercase;
  letter-spacing: .12em; color: var(--primary-dark); margin-bottom: 8px;
}
/* tabovi modula */
.de-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.de-tab {
  font-family: var(--font-mono); font-size: .78rem; font-weight: 500;
  padding: 7px 12px; cursor: pointer;
  background: var(--surface); color: var(--muted);
  border: 2px solid var(--line); border-radius: 8px;
  transition: color .12s, border-color .12s;
}
.de-tab:hover { color: var(--ink); border-color: var(--ink); }
.de-tab.active {
  background: var(--ink); color: #fff; border-color: var(--ink);
  box-shadow: 3px 3px 0 rgba(34, 48, 74, .18);
}

/* minmax(0,…) — bez toga sadržaj (dugi redovi traga) gura kolone i mijenja širine */
.de-grid {
  display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  gap: 34px; align-items: start;
}

/* ulazi — fiksna minimalna visina da se ne skače pri promjeni modula */
.de-inputs { display: grid; gap: 15px; align-content: start; min-height: 322px; }
.de-ctrl label, .de-seg-label {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  font-weight: 600; font-size: .89rem; margin-bottom: 7px;
}
.de-ctrl output {
  font-family: var(--font-mono); font-size: .89rem; font-weight: 500;
  color: var(--primary-dark);
}
/* Traka je tanka, ali je sam input visok — dodirna površina, ne samo piksel linije */
.de-ctrl input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 24px; background: transparent;
  border: 0; padding: 0; cursor: pointer;
}
.de-ctrl input[type="range"]:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.de-ctrl input[type="range"]::-webkit-slider-runnable-track {
  height: 8px; background: var(--line);
  border: 2px solid var(--ink); border-radius: 0;
}
.de-ctrl input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 18px; height: 18px; margin-top: -5px;
  background: var(--primary);
  border: 2px solid var(--ink); border-radius: 0; cursor: grab;
}
.de-ctrl input[type="range"]::-moz-range-track {
  height: 8px; background: var(--line);
  border: 2px solid var(--ink); border-radius: 0;
}
.de-ctrl input[type="range"]::-moz-range-thumb {
  width: 16px; height: 16px; background: var(--primary);
  border: 2px solid var(--ink); border-radius: 0; cursor: grab;
}
.de-seg { display: flex; gap: 6px; flex-wrap: wrap; }
.de-seg button {
  font-family: var(--font-body); font-size: .82rem; font-weight: 500;
  padding: 7px 13px; cursor: pointer;
  background: var(--surface); color: var(--muted);
  border: 2px solid var(--line); border-radius: 8px;
}
.de-seg button.active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ishod */
.de-out {
  background: var(--surface); border: 2px solid var(--line);
  border-radius: var(--radius); padding: 16px 20px;
  box-shadow: 6px 6px 0 rgba(34, 48, 74, .08);
}
.de-verdict { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.de-badge {
  font-family: var(--font-head); font-weight: 700; font-size: 1.02rem;
  letter-spacing: .04em; padding: 8px 16px; border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}
.de-badge.de-approve { background: var(--mint); color: #06301F; }
.de-badge.de-warn { background: var(--yellow); color: var(--ink); }
.de-badge.de-decline { background: var(--coral); color: #fff; }
.de-badge.de-info { background: var(--primary); color: #fff; }

.de-metrics {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px 14px; margin-bottom: 8px;
}
.de-metrics dt, .de-metrics dd { overflow: hidden; text-overflow: ellipsis; }
.de-metrics dt { grid-row: 1; font-size: .76rem; color: var(--muted); }
.de-metrics dd {
  grid-row: 2; font-family: var(--font-mono); font-size: 1rem;
  font-weight: 500; color: var(--ink);
}
/* Visina je fiksna da kartica ne poskakuje dok se vuče klizač */
.de-offer {
  font-size: .87rem; color: #7A5200; background: #FFF6DE;
  border: 1px solid #F2DCA4; border-radius: 8px;
  padding: 8px 12px; margin-bottom: 10px;
  min-height: 38px; display: flex; align-items: center;
}
.de-offer.de-offer-ok { color: #16624C; background: var(--mint-soft); border-color: #BFE3D7; }

.de-trace {
  background: var(--navy); border-radius: 10px;
  padding: 10px 12px; margin-bottom: 12px;
}
.de-trace-head {
  font-family: var(--font-mono); font-size: .72rem; text-transform: uppercase;
  letter-spacing: .1em; color: #6C7E9C; margin-bottom: 8px;
}
.de-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1.1fr) minmax(0, 1fr) 74px;
  gap: 10px;
  font-family: var(--font-mono); font-size: .745rem; line-height: 1.5;
  color: #C6D3E6; white-space: nowrap;
}
.de-row .de-id { color: #6C7E9C; }
.de-row .de-rule { overflow: hidden; text-overflow: ellipsis; }
.de-row .de-val { color: #8FB2E8; overflow: hidden; text-overflow: ellipsis; }
.de-row .de-mark { color: #7BD8A8; text-align: right; }
.de-row-fail .de-mark { color: #F28F7A; }
.de-row-fail .de-val { color: #F7BE4F; }
.de-row-empty { visibility: hidden; }
/* Napomena stoji IZNAD demoa — očekivanja se postavljaju prije igranja, ne poslije */
.de-notice {
  display: flex; align-items: flex-start; gap: 11px;
  background: #FFF6DE; border: 1px solid #F2DCA4; border-radius: 10px;
  padding: 10px 14px; margin-bottom: 14px;
  font-size: .83rem; line-height: 1.5; color: #7A5200;
}
.de-notice b { color: #5C3D00; font-weight: 600; }
.de-notice-icon {
  width: 18px; height: 14px; flex-shrink: 0; margin-top: 4px;
  image-rendering: pixelated;
}

/* ── Ekspertiza (finansijski sektor + baze) ── */
.section-exp {
  background-color: var(--primary-soft);
  background-image: linear-gradient(90deg, #C9D8F4 0 4px, transparent 4px 12px),
                    linear-gradient(90deg, #C9D8F4 0 4px, transparent 4px 12px);
  background-size: 12px 4px, 12px 4px;
  background-position: left top, left bottom;
  background-repeat: repeat-x, repeat-x;
}
.exp-banner {
  display: grid; grid-template-columns: .55fr 1.45fr; gap: 48px; align-items: center;
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 48px 44px;
  box-shadow: 8px 8px 0 rgba(34, 48, 74, 0.08);
}
.exp-visual { position: relative; display: flex; justify-content: center; }
.exp-icon { image-rendering: pixelated; }
.exp-icon-bank { width: 168px; height: 126px; }
.exp-icon-db {
  position: absolute; right: 4%; bottom: -22px; width: 60px; height: 66px;
  filter: drop-shadow(3px 3px 0 rgba(34, 48, 74, .12));
}
.exp-kicker {
  font-family: var(--font-mono); font-size: .8rem; text-transform: uppercase;
  letter-spacing: .12em; color: var(--primary-dark); margin-bottom: 10px;
}
.exp-copy h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin-bottom: 12px; }
.exp-desc { color: var(--muted); margin-bottom: 22px; max-width: 58ch; }
.exp-points { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; }
.exp-points li {
  position: relative; padding-left: 24px; font-size: .95rem; font-weight: 500;
}
.exp-points li::before {
  content: ""; position: absolute; left: 0; top: .42em;
  width: 10px; height: 10px; background: var(--mint);
  box-shadow: 2px 2px 0 rgba(42, 174, 143, .3);
}

/* ── Koraci procesa ─────────────────────── */
.steps {
  list-style: none;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px;
  counter-reset: step;
}
.step {
  position: relative;
  background: var(--bg);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 22px;
}
.step-num {
  display: inline-block;
  font-family: var(--font-mono); font-weight: 500; font-size: .85rem;
  color: var(--coral-dark);
  background: #FDEDE8; border: 1px solid #F5CCC0;
  padding: 3px 9px; border-radius: 6px; margin-bottom: 14px;
}
.step h3 { font-size: 1.08rem; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: .93rem; }

/* ── Zašto mi ───────────────────────────── */
.why-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.why-item {
  display: grid; grid-template-columns: 48px 1fr; gap: 18px;
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
}
.why-icon { width: 44px; height: 40px; image-rendering: pixelated; margin-top: 3px; }
.why-item h3 { font-size: 1.12rem; margin-bottom: 7px; }
.why-item p { color: var(--muted); font-size: .95rem; }
.why-item h3, .why-item p { grid-column: 2; }
.why-item h3 { grid-row: 1; }
.why-item .why-icon { grid-column: 1; grid-row: 1 / span 2; }

.tech-strip {
  margin-top: 46px; text-align: center;
  padding-top: 38px;
  background-image: var(--px-dots);
  background-size: 12px 4px;
  background-position: left top;
  background-repeat: repeat-x;
}
.tech-label {
  font-family: var(--font-mono); font-size: .8rem; text-transform: uppercase;
  letter-spacing: .12em; color: var(--muted); margin-bottom: 18px;
}
.tech-list { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.tech-list li {
  font-family: var(--font-mono); font-size: .85rem;
  background: var(--surface); border: 1px solid var(--line);
  padding: 6px 14px; border-radius: 8px; color: var(--ink);
}

/* ── Kontakt ────────────────────────────── */
.section-contact {
  background-color: var(--mint-soft);
  background-image: linear-gradient(90deg, #BFE3D7 0 4px, transparent 4px 12px);
  background-size: 12px 4px;
  background-position: left top;
  background-repeat: repeat-x;
}
/* min-width:0 — bez toga grid element ne smije ispod svoje min-content širine,
   a <select> je širok koliko mu je najduža opcija i razvuče cijelu stranicu */
.contact-grid {
  display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: 56px; align-items: start;
}
.contact-grid > * { min-width: 0; }
.wave-bot { width: 68px; height: 68px; image-rendering: pixelated; margin-bottom: 18px; }
.contact-info h2 { font-size: clamp(1.8rem, 3.5vw, 2.3rem); margin-bottom: 14px; }
.contact-info > p { color: var(--muted); margin-bottom: 28px; }
.contact-list { list-style: none; display: grid; gap: 16px; }
.contact-label {
  display: block; font-family: var(--font-mono); font-size: .78rem;
  text-transform: uppercase; letter-spacing: .1em; color: var(--muted);
}
.contact-value { color: var(--ink); font-weight: 500; text-decoration: none; }
a.contact-value:hover { color: var(--primary); }

.contact-form {
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: 8px 8px 0 rgba(34, 48, 74, 0.08);
}
.form-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.form-field { margin-bottom: 18px; display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.form-field label { font-weight: 600; font-size: .92rem; }
.form-field label small { font-weight: 400; color: var(--muted); }
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%; min-width: 0; max-width: 100%;
  font-family: var(--font-body); font-size: 1rem; color: var(--ink);
  background: var(--bg);
  border: 2px solid var(--line); border-radius: 9px;
  padding: 11px 14px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.form-field textarea { resize: vertical; min-height: 120px; }
/* Nativni select se iscrtava po svojim mjerama — gasimo ga i izjednačavamo s inputima */
.form-field input,
.form-field select { height: 50px; }
.form-field select {
  -webkit-appearance: none; appearance: none;
  padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2322304A' stroke-width='2' fill='none' stroke-linecap='square'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 3px 3px 0 rgba(46, 107, 230, .18);
}
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-footer { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.form-status { font-size: .92rem; font-weight: 500; }
.form-status.ok { color: var(--mint); }
.form-status.err { color: var(--coral-dark); }

/* ── Footer ─────────────────────────────── */
.site-footer { background: var(--navy); color: #B9C6DB; padding: 52px 0 40px; }
.footer-grid {
  display: grid; grid-template-columns: 1.2fr 1fr .9fr; gap: 40px; align-items: start;
}
.site-footer .brand { color: #fff; margin-bottom: 12px; }
.footer-brand p { font-size: .93rem; max-width: 34ch; }
.footer-nav { display: grid; gap: 10px; }
.footer-nav a { color: #B9C6DB; text-decoration: none; font-size: .95rem; }
.footer-nav a:hover { color: #fff; }
.footer-meta { text-align: right; font-size: .9rem; }
.footer-small { color: #6C7E9C; font-size: .82rem; margin-top: 6px; }

/* ── Robot koji prati skrolanje ─────────── */
.scroll-rail {
  position: fixed; top: 92px; bottom: 30px; right: 22px;
  width: 48px; z-index: 40; pointer-events: none;
  display: none;
}
.scroll-rail::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 50%;
  width: 4px; margin-left: -2px;
  background-image: linear-gradient(var(--line) 0 6px, transparent 6px 14px);
  background-size: 4px 14px;
}
.scroll-bot {
  position: absolute; left: 2px; top: 0; width: 44px;
  /* transform umjesto top: ide preko kompozitora, bez repaint tragova pri skrolu */
  will-change: transform;
  transform: translateY(0) translateZ(0);
  /* robot je i kontroler: može se uhvatiti i vući da skrola stranicu */
  pointer-events: auto;
  cursor: grab;
  touch-action: none;          /* bez ovoga bi prst skrolao stranicu umjesto da vuče robota */
  -webkit-user-select: none; user-select: none;
}
.scroll-bot:hover .scroll-bot-svg { transform: scale(1.12); }
.scroll-bot.dragging { cursor: grabbing; }
.scroll-bot.dragging .scroll-bot-svg { animation: none; transform: scale(1.18); }
.scroll-bot-svg {
  width: 44px; height: 44px; image-rendering: pixelated; display: block;
  animation: peek-bob 1.8s steps(1) infinite;
}
/* Korak lijevo-desno umjesto rotacije: rotacija bi razbila piksel mrežu */
.scroll-bot.moving .scroll-bot-svg { animation: bot-step .26s steps(1) infinite; }
@keyframes bot-step {
  0%, 49% { transform: translateX(-2px); }
  50%, 100% { transform: translateX(2px); }
}
@media (min-width: 1180px) { .scroll-rail { display: block; } }

/* ── Scroll-snap: jedna sekcija = jedna stranica (desktop) ── */
@media (min-width: 900px) and (min-height: 620px) {
  html { scroll-snap-type: y mandatory; }
  .snap-page {
    min-height: 100svh;
    display: flex; flex-direction: column; justify-content: center;
    scroll-snap-align: start;
    padding-top: 96px; padding-bottom: 48px;
    scroll-margin-top: 0;
  }
  .hero.snap-page { padding-top: 76px; padding-bottom: 40px; }
  .site-footer { scroll-snap-align: end; }
  .px-divider { display: none; }
}

/* ══════════════════════════════════════════
   Potpis: piksel i SQL komentar kao marker
   ══════════════════════════════════════════ */

/* Inženjerske cifre: prekrižena nula + tabularni razmak */
.exp-kicker, .tech-label, .tech-list li, .module-card h3, .contact-label,
.step-num, .terminal, .eyebrow, .lang-switch button, .footer-small,
.de-kicker, .de-row, .de-metrics dd, .de-ctrl output {
  font-variant-numeric: slashed-zero tabular-nums;
}

/* „--" je SQL komentar — potpis čovjeka koji živi u bazama */
.exp-kicker::before, .tech-label::before, .contact-label::before,
.de-kicker::before {
  content: "-- ";
  opacity: .45;
}

/* Brojevi sekcija, čisti CSS counter (aria-hidden preko ::before nije moguć,
   pa ostaje dekoracija koju čitači preskaču uz speak: never gdje je podržano) */
main { counter-reset: sec; }
.section { counter-increment: sec; }
.section-head h2::before,
.de-head h2::before {
  content: "-- " counter(sec, decimal-leading-zero);
  display: block;
  font-family: var(--font-mono); font-weight: 500; font-size: .76rem;
  letter-spacing: .14em; color: var(--muted); opacity: .7;
  font-variant-numeric: slashed-zero tabular-nums;
  margin-bottom: 5px;
}
.de-head h2::before { content: none; }

/* Potpisni piksel u wordmarku — isti kvadratić od kojeg su ikonice */
.brand-name::after {
  content: ""; display: inline-block;
  width: 5px; height: 5px; margin-left: 4px; vertical-align: 4px;
  background: var(--coral);
}
.site-footer .brand-name::after { background: var(--yellow); }

/* Navigacija: podvlaka se „ukuca" u 4 skoka umjesto da klizne */
.nav-menu > a:not(.btn) { position: relative; border-bottom: 0; padding-bottom: 5px; }
.nav-menu > a:not(.btn)::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: 0;
  background-image: linear-gradient(90deg, var(--coral) 0 3px, transparent 3px 6px);
  background-size: 6px 3px; background-repeat: repeat-x;
  transition: width .18s steps(4, end);
}
.nav-menu > a:not(.btn):hover::after,
.nav-menu > a:not(.btn):focus-visible::after { width: 100%; }

/* Fokus prsten u brend žutoj — vidljiv na svakoj pozadini */
:where(a, button, input, select, textarea):focus-visible {
  outline: 3px dashed var(--yellow);
  outline-offset: 3px;
}

/* Optičko lomljenje teksta */
h1, h2, h3 { text-wrap: balance; }
.lead, .section-head p, .card p, .module-card p, .product-desc { text-wrap: pretty; }

/* ── Reveal animacije ───────────────────── */
/* Kratko i glatko: steps() je uz scroll-snap izgledao kao zastajkivanje,
   jer sekcija sleti odjednom pa animacija tek onda krene */
.reveal {
  opacity: 0; transform: translateY(8px);
  transition: opacity .25s ease-out, transform .25s ease-out;
  transition-delay: calc(var(--i, 0) * 35ms);
}
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; scroll-snap-type: none !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .peek-bot { animation: none; }
  .t-cursor { animation: none; }
  .scroll-bot-svg { animation: none !important; }
}

/* ═══════════ RESPONSIVE ═══════════ */
@media (max-width: 1020px) {
  .modules-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 64px; }
  .hero { padding: 52px 0 64px; }
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .modules-grid { grid-template-columns: repeat(2, 1fr); }
  .de-grid { grid-template-columns: 1fr; gap: 26px; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-meta { text-align: left; grid-column: 1 / -1; }
}

/* Navigacija prelazi u hamburger ranije — puna traka treba ~1000px */
@media (max-width: 1020px) {
  .nav-toggle { display: block; }
  .nav-menu {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    background: var(--surface);
    border-bottom: 2px solid var(--line);
    padding: 16px 24px 20px;
    box-shadow: 0 12px 24px rgba(34, 48, 74, .08);
  }
  .nav-menu.open { display: flex; }
  .nav-menu > a:not(.btn) { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .lang-switch { align-self: flex-start; margin: 12px 0; }
  .btn-nav { text-align: center; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .section { padding: 64px 0; }
  .eyebrow { font-size: .76rem; padding: 6px 12px; gap: 8px; }
  /* najduži naziv modula + labela inače pređu u tri reda */
  .de-kicker { font-size: .7rem; letter-spacing: .07em; }
  .brand { padding: 4px 0; }
  .cards-grid { grid-template-columns: 1fr; }
  .modules-grid { grid-template-columns: 1fr; }
  .de-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .de-out { padding: 18px 16px; }
  /* na uskom ekranu naziv pravila se prelama umjesto da se odsijeca */
  .de-row {
    grid-template-columns: 34px minmax(0, 1fr) 76px;
    font-size: .76rem; gap: 4px 8px; line-height: 1.45;
    white-space: normal; align-items: start; margin-bottom: 3px;
  }
  .de-row .de-rule { overflow: visible; text-overflow: clip; }
  .de-row .de-mark { grid-column: 3; white-space: nowrap; }
  .de-row .de-val { display: none; }
  .de-metrics { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  /* prst traži najmanje 44px — na mobilnom nema snap budžeta pa je prostor slobodan */
  .de-ctrl input[type="range"] { height: 44px; }
  .de-tab, .de-seg button { min-height: 44px; }
  .footer-nav { gap: 2px; }
  .footer-nav a { padding: 10px 0; }
  .contact-value { display: inline-block; padding: 9px 0; }
  .products-footer { flex-direction: column; align-items: stretch; }
  .products-footer .btn { text-align: center; }
  .exp-banner { grid-template-columns: 1fr; gap: 28px; padding: 28px 22px; }
  .exp-icon-bank { width: 128px; height: 96px; }
  .exp-icon-db { width: 46px; height: 50px; bottom: -14px; }
  .exp-points { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .contact-form { padding: 24px 20px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .peek-bot { right: 18px; width: 78px; height: 39px; top: -37px; }
  .terminal-body { min-height: 240px; font-size: .85rem; }
}
