/* Produktna strana E-Invoice Lens. Tokeni i fontovi dolaze iz app/lens.css (jedan sistem). */
body.site { background: var(--canvas); }
.site h2 { font: 600 clamp(28px, 3.4vw, 44px)/1.08 var(--f-disp); letter-spacing: -0.025em; margin: 0 0 14px; max-width: 22ch; }
.site h3 { font: 600 19px/1.25 var(--f-disp); letter-spacing: -0.01em; margin: 0 0 8px; }
.site main > section { padding: clamp(64px, 10vw, 128px) clamp(16px, 5vw, 72px); max-width: 1360px; margin: 0 auto; }
.site main > section > p, .map-intro p, .sample-head p { color: var(--ink-2); font-size: 17px; max-width: 60ch; margin: 0 0 24px; }
.code { font: 400 12.5px/1.6 var(--f-mono); background: var(--code-bg); color: var(--code-ink); border-radius: 10px; padding: 14px 16px; margin: 0; overflow-x: auto; white-space: pre; }

/* Navigacija */
.nav { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 28px; height: 64px; padding: 0 clamp(16px, 5vw, 72px); padding-top: env(safe-area-inset-top, 0px); background: color-mix(in oklch, var(--canvas) 86%, transparent); backdrop-filter: saturate(140%) blur(12px); border-bottom: 1px solid color-mix(in oklch, var(--line) 70%, transparent); }
.nav nav { display: flex; gap: 22px; margin-left: auto; }
.nav nav a { color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 15px; }
.nav nav a:hover { color: var(--ink); }

/* Hero */
.hero { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 4vw, 64px); align-items: center; padding-top: clamp(40px, 6vw, 88px) !important; padding-bottom: clamp(56px, 8vw, 104px) !important; min-height: min(calc(100dvh - 64px), 820px); }
.hero h1 { font: 600 clamp(40px, 5.2vw, 72px)/1.02 var(--f-disp); letter-spacing: -0.035em; margin: 0 0 22px; max-width: 12ch; }
.hero-sub { font-size: clamp(17px, 1.4vw, 19px); color: var(--ink-2); max-width: 40ch; margin: 0 0 30px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; }

.lens { margin: 0; }
.lens-frame { position: relative; height: clamp(440px, 62vh, 600px); border-radius: 14px; overflow: hidden; background: var(--code-bg); box-shadow: 0 30px 60px -30px oklch(25% 0.05 170 / .55), 0 0 0 1px oklch(30% 0.03 175 / .4); touch-action: pan-y; cursor: ew-resize; user-select: none; }
.lens-layer { position: absolute; inset: 0; overflow: hidden; }
.lens-xml { padding-top: 18px; color: var(--code-ink); }
.lens-xml .xml { font-size: 12px; }
.lens-doc { right: auto; width: max(100%, 640px); background: var(--paper); box-shadow: -18px 0 40px -18px oklch(10% 0.03 175 / .7); will-change: transform; }
.lens-doc .paper { box-shadow: none; max-width: none; border-radius: 0; padding: 34px 40px 24px; font-size: 14px; pointer-events: none; }
.lens-doc .p-type { font-size: 32px; }
.lens-handle { position: absolute; top: 0; bottom: 0; left: 0; width: 0; pointer-events: none; }
.lens-handle::before { content: ""; position: absolute; top: 0; bottom: 0; left: -1px; width: 2px; background: var(--marker); box-shadow: 0 0 0 1px oklch(40% 0.06 95 / .25); }
.lens-handle span { position: absolute; top: 50%; left: -22px; width: 44px; height: 44px; margin-top: -22px; border-radius: 50%; background: var(--paper); border: 2px solid var(--ink); box-shadow: 0 6px 18px -6px oklch(25% 0.05 170 / .5); }
.lens-handle span::before { content: ""; position: absolute; inset: 9px; border-radius: 50%; border: 2px solid var(--accent); }
.lens-handle span::after { content: ""; position: absolute; width: 9px; height: 2px; background: var(--accent); right: 6px; bottom: 9px; transform: rotate(45deg); border-radius: 2px; }
.lens-cap { display: flex; align-items: center; gap: 16px; margin-top: 14px; color: var(--ink-3); font-size: 13px; }
.lens-cap label { flex: 0 1 auto; }
.lens-cap input[type="range"] { flex: 1; accent-color: var(--accent); min-height: 32px; }

/* Od XML-a do fakture */
.map-intro { max-width: 760px; margin-bottom: 40px; }
.map-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.map-row { display: grid; grid-template-columns: minmax(0, 1.05fr) 56px minmax(0, 1fr); align-items: center; gap: 0; }
.map-row:nth-child(even) .map-xml { margin-left: 6%; }
.map-xml { min-height: 100%; display: flex; align-items: center; }
.map-arrow { justify-self: center; width: 28px; height: 2px; background: var(--ink-3); position: relative; }
.map-arrow::after { content: ""; position: absolute; right: -1px; top: -4px; width: 8px; height: 8px; border-top: 2px solid var(--ink-3); border-right: 2px solid var(--ink-3); transform: rotate(45deg); }
.map-out { background: var(--paper); border-radius: 10px; padding: 16px 20px; border: 1px solid var(--line); color: oklch(21% 0.024 172); }
.map-label { margin: 0; font-size: 12.5px; font-weight: 600; color: oklch(55% 0.016 172); }
.map-value { margin: 4px 0 6px; font: 600 18px/1.35 var(--f-disp); letter-spacing: -0.01em; }
.map-why { margin: 0; font-size: 13.5px; color: oklch(43% 0.02 172); }
.js-reveal .map-row .map-out, .js-reveal .map-row .map-arrow { opacity: 0; transform: translateX(-14px); transition: opacity 520ms var(--ease), transform 620ms var(--ease); }
.js-reveal .map-row .map-xml { opacity: .35; transition: opacity 400ms ease; }
.js-reveal .map-row.in .map-out, .js-reveal .map-row.in .map-arrow { opacity: 1; transform: none; }
.js-reveal .map-row.in .map-arrow { transition-delay: 120ms; }
.js-reveal .map-row.in .map-out { transition-delay: 240ms; }
.js-reveal .map-row.in .map-xml { opacity: 1; }

/* Privatnost */
.proof-lead { max-width: 62ch; }
.proof-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); grid-template-areas: "rule test" "rule self"; gap: 18px; margin-top: 12px; }
.proof-grid article { border-radius: 14px; padding: 24px; }
.proof-rule { grid-area: rule; background: var(--paper); border: 1px solid var(--line); color: oklch(21% 0.024 172); }
.proof-rule p { color: oklch(43% 0.02 172); margin: 0 0 16px; max-width: 54ch; }
.proof-rule .code { white-space: pre-wrap; font-size: 12.5px; }
.proof-test { grid-area: test; background: var(--accent); color: var(--accent-ink); }
.proof-test h3 { color: inherit; }
.proof-nums { margin: 10px 0 12px; display: grid; gap: 14px; }
.pn dt { font: 600 34px/1 var(--f-disp); letter-spacing: -0.02em; }
.pn dd { margin: 4px 0 0; font-size: 14px; opacity: .88; }
.proof-test .muted { color: inherit; opacity: .75; }
.proof-self { grid-area: self; border: 1px dashed var(--ink-3); }
.proof-self ol { margin: 0; padding-left: 20px; color: var(--ink-2); }
.proof-self li + li { margin-top: 6px; }

/* Primer */
.sample { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; }
.sample-head { max-width: 760px; }
.sample-desk { border-radius: 18px; padding: clamp(16px, 4vw, 56px); background: radial-gradient(120% 90% at 20% 0%, color-mix(in oklch, var(--accent-soft) 80%, var(--canvas)), var(--line-2) 70%); }
.sample-paper .paper { margin: 0 auto; }

/* Živi demo */
.live-frame { border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--canvas); box-shadow: 0 24px 50px -32px oklch(25% 0.05 170 / .5); }
.live-frame iframe { display: block; width: 100%; height: 860px; border: 0; }
.live-mobile { display: none; margin-top: 16px; }

/* Granice */
.limits { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); grid-template-areas: "h h" "t n"; gap: 20px 40px; }
.limits h2 { grid-area: h; }
.limits-tbl { grid-area: t; }
.limits-tbl table { background: var(--paper); border-radius: 14px; overflow: hidden; color: oklch(21% 0.024 172); }
.limits-tbl th { text-align: left; font-size: 12.5px; color: oklch(55% 0.016 172); padding: 14px 16px; border-bottom: 1px solid oklch(88.5% 0.01 170); }
.limits-tbl td { padding: 14px 16px; vertical-align: top; border-bottom: 1px solid oklch(92.5% 0.008 170); font-size: 14.5px; }
.limits-tbl td:last-child { color: oklch(43% 0.02 172); font-size: 13.5px; }
.limits-tbl tr:last-child td { border-bottom: 0; }
.limits-tbl .chip { white-space: nowrap; }
.limits-not { grid-area: n; }
.limits-not ul { margin: 0 0 14px; padding-left: 18px; color: var(--ink-2); }
.limits-not li + li { margin-top: 6px; }

/* Film */
.film { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 40px; align-items: center; }
.film-video { width: 100%; aspect-ratio: 16 / 9; border-radius: 14px; background: var(--code-bg); }

.foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 20px; padding: 40px clamp(16px, 5vw, 72px) calc(40px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); max-width: 1360px; margin: 0 auto; }
.foot p { margin: 10px 0 0; color: var(--ink-2); max-width: 52ch; }

@media (max-width: 1080px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero h1 { max-width: 14ch; }
  .film { grid-template-columns: 1fr; }
  .limits { grid-template-columns: 1fr; grid-template-areas: "h" "t" "n"; }
}
@media (max-width: 760px) {
  .nav nav { display: none; }
  .nav .btn { margin-left: auto; }
  .hero h1 { font-size: 40px; }
  .lens-frame { height: 420px; }
  .lens-doc .paper { padding: 22px 18px; font-size: 13px; }
  .lens-doc .p-type { font-size: 26px; }
  .lens-doc .p-head { grid-template-columns: 1fr; }
  .lens-doc .p-parties { grid-template-columns: 1fr; }
  .lens-cap label { display: none; }
  .lens-doc .paper > * { max-width: 258px; }
  .map-row { grid-template-columns: 1fr; gap: 10px; }
  .map-row:nth-child(even) .map-xml { margin-left: 0; }
  .map-arrow { width: 2px; height: 22px; justify-self: start; margin-left: 22px; }
  .map-arrow::after { right: auto; left: -4px; top: auto; bottom: -1px; transform: rotate(135deg); }
  .js-reveal .map-row .map-out, .js-reveal .map-row .map-arrow { transform: translateY(-10px); }
  .proof-grid { grid-template-columns: 1fr; grid-template-areas: "test" "rule" "self"; }
  .live-frame iframe { height: 640px; }
  .live-mobile { display: inline-flex; width: 100%; }
  .limits-tbl table, .limits-tbl tbody, .limits-tbl tr, .limits-tbl td { display: block; }
  .limits-tbl thead { display: none; }
  .limits-tbl tr { padding: 12px 0; border-bottom: 1px solid oklch(92.5% 0.008 170); }
  .limits-tbl td { border: 0; padding: 4px 16px; }
  .site main > section { padding-block: 64px; }
}
@media (prefers-reduced-motion: reduce) {
  .js-reveal .map-row .map-out, .js-reveal .map-row .map-arrow, .js-reveal .map-row .map-xml { opacity: 1; transform: none; }
}

/* Hero list: uvek jedna kolona da početak fakture bude vidljiv pored ručice */
.lens-doc .paper > * { max-width: 318px; }
.lens-doc .p-head, .lens-doc .p-parties, .lens-doc .p-sums { grid-template-columns: minmax(0, 1fr); gap: 16px; }
.lens-doc .p-head { padding-bottom: 18px; }
.lens-doc .p-dates { min-width: 0; }
.lens-doc .ribbon { right: auto; left: 40px; }

/* Asset Studio ploče (aktivne samo kad je slot APPROVED_FOR_LAB) */
.lens.has-plate { padding: clamp(18px, 3vw, 40px); border-radius: 18px; background-size: cover; background-position: center; }
.proof-scene { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 14px; margin: 8px 0 22px; }
.map-xml { white-space: pre-wrap; overflow-wrap: anywhere; }
.live-frame iframe { height: 740px; }
@media (max-width: 760px) { .live-frame iframe { height: 620px; } }
.asset-preview-note { position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 30; margin: 0; max-width: min(92vw, 640px); padding: 10px 16px; border-radius: 10px; background: oklch(94% 0.06 85); color: oklch(36% 0.08 70); font-size: 13.5px; font-weight: 600; box-shadow: 0 10px 30px -12px oklch(25% 0.05 170 / .5); }
/* Kadriranje odobrenih ploča: lupa ostaje vidljiva gore desno, prikaz levo-dole */
.lens.has-plate { padding: clamp(64px, 9vw, 132px) clamp(84px, 12vw, 176px) clamp(22px, 3vw, 40px) clamp(18px, 2.4vw, 32px); background-size: cover; background-position: 100% 0%; }
.lens.has-plate .lens-cap { color: oklch(88% 0.02 168); }
.proof-scene { aspect-ratio: 21 / 8; object-position: 78% 62%; }
@media (max-width: 760px) {
  .lens.has-plate { padding: 72px 14px 14px; background-size: auto 100%; background-position: 92% 0%; }
  .proof-scene { aspect-ratio: 4 / 3; object-position: 82% 60%; }
}
.lens.has-plate { padding-right: clamp(64px, 9vw, 140px); }
.lens.has-plate .lens-doc .paper > * { max-width: 232px; }
.lens.has-plate .lens-frame { height: clamp(420px, 56vh, 540px); }
@media (max-width: 760px) {
  .asset-preview-note { top: calc(72px + env(safe-area-inset-top, 0px)); bottom: auto; font-size: 12px; padding: 8px 12px; }
  .lens.has-plate .lens-doc .paper > * { max-width: 240px; }
}

/* ---- enrichment R01 (O-7): loupe cutout, real UI callouts, section plates, icons ---- */
.ico { display: inline-block; width: 1.05em; height: 1.05em; flex: none; vertical-align: -0.14em; margin-right: 9px; background: var(--accent); -webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat; }
.lens-stage { position: relative; }
.loupe { position: absolute; z-index: 4; right: -4%; top: -9%; width: clamp(150px, 17vw, 250px); pointer-events: none; filter: drop-shadow(0 26px 30px oklch(15% 0.04 170 / .45)); }
.callout { position: absolute; z-index: 3; margin: 0; }
.callout img { border-radius: 10px; box-shadow: 0 30px 60px -26px oklch(15% 0.04 170 / .6), 0 0 0 1px oklch(30% 0.03 175 / .3); }
.callout figcaption { margin-top: 8px; font-size: 13px; color: var(--ink-3); }
.c-field { left: -11%; bottom: 17%; width: min(330px, 46%); }
@media (max-width: 1080px) { .c-field { left: -2%; } }
.map, .live { position: relative; isolation: isolate; }
.map.has-bg::before { content: ""; position: absolute; z-index: -1; inset: 0; background: var(--bg) center / cover no-repeat; border-radius: 22px; opacity: .22; }
.live.has-bg::before { content: ""; position: absolute; z-index: -1; left: 0; right: 0; top: 0; border-radius: 22px; height: 62%; background: var(--bg) center 35% / cover no-repeat; -webkit-mask: linear-gradient(#000 55%, transparent); mask: linear-gradient(#000 55%, transparent); opacity: .9; }
.live.has-bg > h2, .live.has-bg > p { color: oklch(96% 0.01 168); }
.proof-self { position: relative; overflow: visible; }
.stack { position: absolute; right: -14px; top: -46px; width: 120px; transform: rotate(6deg); pointer-events: none; filter: drop-shadow(0 18px 20px oklch(15% 0.04 170 / .25)); }
.sample-desk { position: relative; }
.sample-desk.has-bg { background: var(--bg) center / cover no-repeat; }
.sample-phone { position: absolute; right: clamp(16px, 4vw, 56px); bottom: -40px; width: clamp(150px, 15vw, 220px); height: clamp(320px, 34vw, 460px); margin: 0; overflow: hidden; border-radius: 28px; border: 7px solid oklch(18% 0.02 172); background: #fff; box-shadow: 0 30px 60px -24px oklch(15% 0.04 170 / .6); }
.sample-phone img { width: 100%; }
.film.has-plate { position: relative; isolation: isolate; padding: clamp(28px, 4vw, 56px) !important; border-radius: 22px; overflow: hidden; color: oklch(96% 0.01 168); }
.film.has-plate::before { content: ""; position: absolute; inset: 0; z-index: -2; background: var(--bg) center / cover no-repeat; }
.film.has-plate::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, oklch(14% 0.03 170 / .92), oklch(14% 0.03 170 / .55) 60%, oklch(14% 0.03 170 / .25)); }
.film.has-plate p { color: oklch(86% 0.02 168); }
.limits-not li { list-style: none; display: flex; align-items: baseline; }
.limits-not ul { padding-left: 0; }
.limits-not .ico { background: var(--ink-3); }
@media (max-width: 760px) {
  .loupe { width: 104px; right: 4px; top: -36px; }
  .callout.c-field { position: static; width: 100%; margin-top: 18px; }
  .sample-phone { display: none; }
  .stack { width: 84px; top: -30px; right: -6px; }
}

.i-gauge { --i: url(assets/icons/gauge.svg); }
.i-lock-key { --i: url(assets/icons/lock-key.svg); }
.i-magnifying-glass { --i: url(assets/icons/magnifying-glass.svg); }
.i-x-circle { --i: url(assets/icons/x-circle.svg); }
.callout img, .sample-phone img { width: 100%; display: block; }
.callout img, .sample-phone img { height: auto !important; max-width: 100%; object-fit: contain; }

/* Finish R01: the privacy plate holds the section's own claim; the folder sits on the right of it */
.proof-hero { position: relative; border-radius: 14px; overflow: hidden; margin: 8px 0 22px; background: oklch(27% 0.05 168); }
.proof-hero .proof-scene { margin: 0; border-radius: 0; }
.proof-hero h2, .proof-hero .proof-lead { color: oklch(96% 0.012 168); }
.proof-hero .proof-lead { opacity: .88; }
.proof-copy { padding: 24px 22px 26px; }
.proof-copy h2 { margin-top: 0; }
@media (min-width: 761px) {
  .proof-hero { min-height: clamp(320px, 30vw, 430px); display: flex; align-items: center; }
  .proof-hero .proof-scene { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; object-position: 78% 62%; }
  .proof-copy { position: relative; max-width: min(560px, 52%); padding: clamp(28px, 4vw, 56px); }
}
.proof-test .ico { background: currentColor; }
.callout figcaption { display: inline-block; padding: 4px 9px; border-radius: 6px; background: oklch(97% 0.008 168 / .94); color: oklch(30% 0.03 172); }
@media (max-width: 760px) { .callout figcaption { padding: 0; background: none; color: var(--ink-3); } }
