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

/* Brand: EVA Knjiga standarda v1.0
   Identity blue #047fd7 · action colours #de0917 / #008938 / #047fd7
   Digital blacks #191919 (base) and #f0f0f0 · Roboto regular / italic / semibold
   Type scale ×1.5 from 16: 16 · 24 · 36 · 54 · 81
   Chamfered 45° corners echo the EVA and A.D.A.M. marks. */
:root {
  --ink: #191919;
  --ink-2: #202020;
  --ink-3: #262626;
  --ink-4: #2e2e2e;
  --line: rgba(240,240,240,.08);
  --line-2: rgba(240,240,240,.16);
  --paper: #f0f0f0;
  --muted: #a6a6a6;
  --dim: #8f8f8f;
  --blue: #047fd7;
  --blue-hi: #3d9fe6;
  --green: #008938;
  --green-hi: #19b55a;
  --red: #de0917;
  --c: 10px;
}

html { scroll-behavior: smooth; }
body {
  background: var(--ink);
  color: var(--paper);
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 55% at 60% 0%, #000 10%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 55% at 60% 0%, #000 10%, transparent 75%);
}

a { color: var(--blue-hi); text-decoration: none; }
a:hover { color: var(--paper); }
img { display: block; }

.spot {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0;
  transition: opacity .4s ease;
  background-image:
    linear-gradient(rgba(61,159,230,.35) 1px, transparent 1px),
    linear-gradient(90deg, rgba(61,159,230,.35) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(180px circle at var(--mx, -999px) var(--my, -999px), #000 0%, transparent 100%);
  -webkit-mask-image: radial-gradient(180px circle at var(--mx, -999px) var(--my, -999px), #000 0%, transparent 100%);
}

.chamfer, .btn, .card, .card-visual, .editor, .wf-node, .contact-inner, .pill {
  clip-path: polygon(var(--c) 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%, 0 var(--c));
}

/* nav */
.nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 36px;
  padding: 18px 48px;
  background: rgba(25,25,25,.72);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-brand img { height: 22px; width: auto; }
.nav-links { display: flex; gap: 32px; margin-left: auto; }
.nav-links a { color: var(--muted); font-size: 14px; }
.nav-links a:hover { color: var(--paper); }

/* buttons */
.btn {
  --c: 9px;
  position: relative;
  display: inline-flex; align-items: center; gap: 12px;
  height: 52px; padding: 0 20px 0 8px;
  font-size: 15px; font-weight: 500; letter-spacing: .005em; white-space: nowrap;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.btn-sm { height: 38px; padding: 0 14px; font-size: 13.5px; gap: 10px; --c: 7px; }
.btn-lg { height: 60px; padding: 0 24px 0 10px; font-size: 16px; }
.btn-light { background: var(--paper); color: var(--ink); }
.btn-light:hover { background: #fff; color: var(--ink); }
.btn-line { background: var(--line-2); color: var(--paper); }
.btn-line::before {
  content: ""; position: absolute; inset: 1px; background: var(--ink); z-index: -1;
  clip-path: polygon(calc(var(--c) - .4px) 0, 100% 0, 100% calc(100% - var(--c) + .4px), calc(100% - var(--c) + .4px) 100%, 0 100%, 0 calc(var(--c) - .4px));
  transition: background .2s ease;
}
.btn-line { isolation: isolate; }
.btn-line:hover { color: #fff; background: rgba(240,240,240,.34); }
.btn-line:hover::before { background: var(--ink-2); }

.btn-icon {
  --c: 6px;
  width: 36px; height: 36px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--ink-3); color: var(--paper);
  clip-path: polygon(var(--c) 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%, 0 var(--c));
}
.btn-lg .btn-icon { width: 42px; height: 42px; }
.btn-light .btn-icon { background: var(--ink); }
.btn-icon.wa { background: var(--green); color: #fff; }

.arr { position: relative; width: 14px; height: 10px; margin-left: 4px; transition: transform .25s cubic-bezier(.16,1,.3,1); }
.arr::before { content: ""; position: absolute; left: 0; right: 1px; top: 4.25px; height: 1.5px; background: currentColor; }
.arr::after { content: ""; position: absolute; right: 0; top: 1px; width: 6px; height: 6px; border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor; transform: rotate(45deg); }
.btn:hover .arr { transform: translateX(4px); }

/* hero */
.hero {
  max-width: 1280px; margin: 0 auto;
  min-height: calc(100vh - 75px);
  display: grid; grid-template-columns: minmax(0,1.1fr) minmax(0,1fr); align-items: center; gap: 48px;
  padding: 64px 48px 96px;
}
.pill {
  --c: 7px;
  display: inline-flex; align-items: center; gap: 10px;
  height: 34px; padding: 0 14px 0 12px;
  background: var(--ink-3); color: var(--paper);
  font-size: 13px; font-weight: 500; letter-spacing: .02em;
  margin-bottom: 32px;
}
.pill img { height: 11px; width: auto; }
.dot-live { width: 7px; height: 7px; border-radius: 50%; background: var(--green-hi); animation: live 2s ease-out infinite; flex-shrink: 0; }
@keyframes live { 0% { box-shadow: 0 0 0 0 rgba(25,181,90,.6); } 100% { box-shadow: 0 0 0 9px rgba(25,181,90,0); } }

h1 {
  font-size: clamp(54px, 7.4vw, 108px);
  font-weight: 600; letter-spacing: -.035em; line-height: .95;
  margin-bottom: 32px; text-wrap: balance;
}
h1 em { font-style: italic; color: var(--blue-hi); font-weight: 600; }
.lede { font-size: 18px; line-height: 1.65; color: var(--muted); max-width: 560px; margin-bottom: 44px; text-wrap: pretty; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.cta-row.center { justify-content: center; }

.hero-graph { position: relative; }
.hero-graph::before {
  content: ""; position: absolute; left: 25%; right: 25%; top: 25%; bottom: 25%;
  background: radial-gradient(circle, rgba(4,127,215,.35), transparent 70%);
  filter: blur(40px); z-index: -1;
}
.graph { width: 100%; height: auto; overflow: visible; }
.edge { fill: none; stroke: rgba(240,240,240,.18); stroke-width: 1.4; stroke-dasharray: 3 5; animation: dash 1s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -16; } }
.pulse { fill: var(--blue-hi); filter: drop-shadow(0 0 5px var(--blue-hi)); }
.pulse-g { fill: var(--green-hi); filter: drop-shadow(0 0 5px var(--green-hi)); }
.graph text { font-family: 'Roboto', sans-serif; font-size: 13px; font-weight: 500; text-anchor: middle; fill: var(--paper); }
.n-in polygon { fill: var(--ink-2); stroke: var(--line-2); }
.n-data .gi { fill: none; stroke: var(--paper); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.graph .data-label { font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; fill: var(--muted); }
.n-out polygon { fill: #13241a; stroke: rgba(25,181,90,.45); }
.n-out text { fill: #bdf0cf; }
.n-core polygon:not(.halo) { fill: var(--blue); }
.n-core .halo { fill: rgba(4,127,215,.16); transform-origin: 280px 234px; animation: halo 2.6s ease-in-out infinite; }
@keyframes halo { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.12); opacity: .4; } }
.graph .core-label { font-weight: 600; letter-spacing: .16em; font-size: 12px; fill: var(--paper); }

/* sections */
.section { max-width: 1280px; margin: 0 auto; padding: 136px 48px 24px; }
.section-head { margin-bottom: 56px; }
.kicker { display: block; font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--blue-hi); margin-bottom: 18px; }
h2 { font-size: clamp(36px, 4.6vw, 54px); font-weight: 600; letter-spacing: -.03em; line-height: 1.05; }
h3 { font-size: 24px; font-weight: 600; letter-spacing: -.01em; margin: 28px 0 12px; }

.pillars { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
.card {
  --c: 16px;
  padding: 16px 16px 30px; background: var(--ink-2);
  transition: background .25s ease, transform .25s ease;
}
.card:hover { background: var(--ink-3); transform: translateY(-4px); }
.card h3, .card p { padding: 0 12px; }
.card p { font-size: 16px; line-height: 1.6; color: var(--muted); }
.card-visual { --c: 12px; height: 196px; background: var(--ink); position: relative; overflow: hidden; }

.mini { width: 100%; height: 100%; display: block; }
.mini .mt { font-family: 'Roboto', sans-serif; font-size: 11.5px; font-weight: 500; text-anchor: middle; fill: var(--paper); }
.mini .mn polygon { fill: var(--ink-2); stroke: var(--line-2); }
.mini .mi { fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mini .mn-core polygon { fill: var(--blue); }
.mini .mn-out polygon { fill: #13241a; stroke: rgba(25,181,90,.5); }
.mini .mn-out .mi { stroke: #9ee6b8; }
.mini .wn polygon { animation: wnode 3s ease-in-out infinite; }
.mini .w2 polygon { animation-delay: .75s; } .mini .w3 polygon { animation-delay: 1.8s; }
@keyframes wnode { 0%, 100% { fill: var(--ink-2); stroke: var(--line-2); } 6%, 22% { fill: rgba(4,127,215,.28); stroke: var(--blue-hi); } }
.mini .ghost { stroke-dasharray: 2 3; }
.mini .add polygon { fill: var(--ink); stroke: var(--line-2); stroke-dasharray: 3 3; }
.mini .add path { stroke: var(--muted); stroke-width: 1.5; stroke-linecap: round; }
.mini .cursor-g { fill: var(--paper); animation: cur 6s ease-in-out infinite; }
@keyframes cur { 0%, 100% { transform: translate(250px, 150px); } 40% { transform: translate(310px, 104px); } 55% { transform: translate(310px, 104px) scale(.9); } 70% { transform: translate(200px, 140px); } }
.mini .stack polygon { fill: var(--ink-2); stroke: var(--line-2); }
.mini .s0 polygon { opacity: .5; } .mini .s1 polygon { opacity: .75; }
.mini .stack-top polygon { fill: #0f2233; stroke: rgba(61,159,230,.6); }
.mini .idx { fill: var(--blue-hi); transform-box: fill-box; transform-origin: left; animation: idx 3s ease-in-out infinite; }
.mini .i2 { animation-delay: .5s; } .mini .i3 { animation-delay: 1s; }
@keyframes idx { 0% { transform: scaleX(.15); opacity: .5; } 50%, 100% { transform: scaleX(1); opacity: 1; } }

/* steps */
.steps { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
.steps li { padding: 28px 0 0; border-top: 1px solid var(--line-2); position: relative; }
.steps li::before { content: ""; position: absolute; top: -1px; left: 0; width: 48px; height: 2px; background: var(--blue); }
.step-n { display: block; font-size: 13px; font-weight: 500; color: var(--blue-hi); letter-spacing: .08em; margin-bottom: 20px; }
.steps h4 { font-size: 24px; font-weight: 600; letter-spacing: -.01em; margin-bottom: 10px; }
.steps p { font-size: 16px; line-height: 1.6; color: var(--muted); max-width: 340px; }

/* workflow editor */
.editor { --c: 18px; background: var(--ink-2); }
.editor-bar { display: flex; align-items: center; gap: 12px; height: 52px; padding: 0 22px; border-bottom: 1px solid var(--line); }
.editor-bar img { height: 14px; width: auto; opacity: .9; }
.editor-name { font-size: 14px; font-weight: 500; }
.editor-chip { display: inline-flex; align-items: center; gap: 7px; height: 24px; padding: 0 9px; background: rgba(0,137,56,.16); color: #9ee6b8; font-size: 12px; font-weight: 500; }
.editor-run { margin-left: auto; font-size: 13px; color: var(--muted); }
.editor-time { font-size: 13px; color: var(--paper); font-variant-numeric: tabular-nums; min-width: 44px; text-align: right; }

.editor-canvas {
  position: relative; height: 440px;
  background-color: var(--ink);
  background-image: radial-gradient(rgba(240,240,240,.09) 1px, transparent 1px);
  background-size: 20px 20px;
}
.wires { position: absolute; inset: 0; width: 100%; height: 100%; }
.wire-base, .wire-fill { fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; }
.wire-base { stroke: rgba(240,240,240,.14); }
.wire-fill { stroke: var(--blue-hi); stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset .5s ease; }
.wire-fill.on { stroke-dashoffset: 0; }
.wire-fill.done { stroke: var(--green-hi); }

.wf-node {
  --c: 12px;
  position: absolute; width: 22%; height: 96px;
  background: var(--line-2); padding: 1px;
  transition: background .3s ease, transform .3s ease;
}
.wf-inner {
  height: 100%; background: var(--ink-2); padding: 14px 16px;
  display: grid; grid-template-columns: 34px 1fr; grid-template-rows: auto auto 1fr; column-gap: 12px; align-items: center;
  clip-path: polygon(calc(var(--c) - .4px) 0, 100% 0, 100% calc(100% - var(--c) + .4px), calc(100% - var(--c) + .4px) 100%, 0 100%, 0 calc(var(--c) - .4px));
  position: relative; overflow: hidden;
}
.wf-icon { grid-row: 1 / 3; width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; background: var(--ink-3); color: var(--muted); clip-path: polygon(6px 0,100% 0,100% calc(100% - 6px),calc(100% - 6px) 100%,0 100%,0 6px); transition: background .3s, color .3s; }
.wf-title { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wf-sub { font-size: 12px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wf-state { grid-column: 1 / 3; align-self: end; display: flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.wf-state i { width: 7px; height: 7px; border-radius: 50%; background: var(--dim); }
.wf-bar { position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: var(--blue-hi); }

.wf-node[data-state="running"] { background: var(--blue); transform: translateY(-2px); box-shadow: 0 0 0 0 transparent; }
.wf-node[data-state="running"] .wf-icon { background: var(--blue); color: #fff; }
.wf-node[data-state="running"] .wf-state { color: var(--blue-hi); }
.wf-node[data-state="running"] .wf-state i { background: var(--blue-hi); animation: blink .8s ease-in-out infinite; }
.wf-node[data-state="running"] .wf-bar { animation: bar var(--dur, 1.4s) linear forwards; }
.wf-node[data-state="done"] { background: rgba(25,181,90,.55); }
.wf-node[data-state="done"] .wf-icon { background: rgba(0,137,56,.3); color: #9ee6b8; }
.wf-node[data-state="done"] .wf-state { color: #9ee6b8; }
.wf-node[data-state="done"] .wf-state i { background: var(--green-hi); }
@keyframes blink { 50% { opacity: .3; } }
@keyframes bar { to { width: 100%; } }

.editor-status { display: flex; align-items: center; gap: 14px; height: 48px; padding: 0 22px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.editor-status .sep { width: 1px; height: 14px; background: var(--line-2); }
#wf-step { color: var(--paper); font-weight: 500; }

/* contact */
.contact { padding: 160px 48px 120px; }
.contact-inner {
  --c: 28px;
  max-width: 1184px; margin: 0 auto; text-align: center;
  padding: 96px 40px;
  background:
    radial-gradient(ellipse 55% 70% at 50% 0%, rgba(4,127,215,.3), transparent 70%),
    var(--ink-2);
}
.contact-mark { height: 56px; width: auto; margin: 0 auto 32px; }
.contact-inner h2 { font-size: clamp(48px, 7vw, 81px); margin-bottom: 48px; }

/* footer */
.footer {
  max-width: 1280px; margin: 0 auto;
  display: flex; align-items: center; gap: 28px;
  padding: 32px 48px 44px; border-top: 1px solid var(--line);
  font-size: 13px; color: var(--dim);
}
.footer > img { height: 16px; width: auto; margin-right: auto; }
.footer-built { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.footer-built img { height: 12px; width: auto; opacity: .7; }
.footer > span { white-space: nowrap; }

/* reveal */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s cubic-bezier(.16,1,.3,1), transform .9s cubic-bezier(.16,1,.3,1); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

@media (max-width: 1040px) {
  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 56px; }
  .hero-graph { max-width: 560px; width: 100%; margin: 0 auto; }
  .pillars, .steps { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .nav .btn { margin-left: auto; }
  .editor-canvas { height: auto; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
  .wires { display: none; }
  .wf-node { position: relative; left: auto !important; top: auto !important; width: 100%; }
}
@media (max-width: 600px) {
  .nav, .hero, .section, .footer { padding-left: 20px; padding-right: 20px; }
  .nav { gap: 16px; }
  .contact { padding: 100px 16px 80px; }
  .contact-inner { padding: 64px 20px; }
  .cta-row .btn { width: 100%; }
  .footer { flex-wrap: wrap; gap: 12px 24px; }
  .footer > img { margin-right: 0; width: 100%; max-width: 60px; }
  .editor-run { display: none; }
}
