/* Fiskalna blagajna, round 2, taste-skill direction "The split stage".
   Colours are the counter's own: its charcoal top bar, its paper ground, the Gotovina green and the Kartica navy. */
:root {
  --dark: #1c1d21;
  --paper: #f3f2ef;
  --surface: #e6e4df;
  --sheet: #fdfdfd;
  --ink: #1c1d21;
  --muted: #53575e;
  --on-dark: #f3f2ef;
  --on-dark-muted: #b8babf;
  --cash: #17614f;
  --cash-deep: #0f4c3e;
  --cash-soft: #d3e6df;
  --card: #1f3354;

  --m: clamp(20px, 2.2vw, 32px);
  --gut: clamp(24px, 4.6vw, 76px);
  --s-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --s-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --s-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --s-head: clamp(1.5rem, 1rem + 2.1vw, 2.875rem);
  --s-mark: clamp(4.25rem, 16vw, 9rem);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --fast: 200ms;
  --mid: 420ms;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Archivo", system-ui, sans-serif;
  font-size: var(--s-body);
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
  overflow-x: clip;
}
h1, h2, h3, p, ol, ul, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--cash); outline-offset: 3px; }
.hero :focus-visible, .stage-col :focus-visible, .bar :focus-visible, .equip :focus-visible, .pilot :focus-visible { outline-color: #8fd1bd; }
.copy-line { display: block; }
.h-big, .h-read, .h-own { font-size: var(--s-head); font-weight: 400; line-height: 1.04; letter-spacing: -0.02em; text-wrap: balance; }

.skip {
  position: absolute; left: var(--m); top: -100px; z-index: 50;
  background: var(--sheet); color: var(--ink); padding: 12px 16px; font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; }

/* Buttons: one shape on the whole page, square, flat. */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 26px; border: 0; border-radius: 0;
  font-weight: 600; font-size: var(--s-body); cursor: pointer; text-decoration: none;
  transition: background-color var(--fast) ease, transform var(--fast) var(--ease-out);
}
.btn:active { transform: scale(0.97); }
.btn-go { background: var(--cash); color: #fff; }
.btn-go:hover { background: var(--cash-deep); }
.btn-paper { background: var(--paper); color: var(--ink); }
.btn-paper:hover { background: #fff; }

/* ---------- top bar ---------- */
.bar {
  position: absolute; inset: 0 0 auto 0; z-index: 5; height: 76px;
  display: grid; grid-template-columns: 1fr 1fr; align-items: center;
  color: var(--on-dark); font-size: var(--s-small);
}
.bar-state { padding: 0 var(--m); display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.preview { background: var(--paper); color: var(--ink); font-weight: 600; padding: 4px 9px; }
.status { color: var(--on-dark); }
.bar-nav { padding: 0 var(--m) 0 var(--gut); display: flex; justify-content: flex-end; gap: 28px; }
.bar-nav a { text-decoration: none; padding: 6px 0; text-underline-offset: 6px; }
.bar-nav a:hover { text-decoration: underline; text-decoration-thickness: 2px; }

/* ---------- the split: the counter holds still, the reading column passes ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; }
.stage-col { background: var(--dark); }
.stage {
  position: sticky; top: 0; height: 100svh;
  padding: 76px var(--m) 20px;
  display: flex; flex-direction: column; gap: 14px;
}
.frame { position: relative; flex: 1; min-height: 0; overflow: hidden; background: var(--dark); }
.shot {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 100% 0;
  opacity: 0; transition: opacity 480ms ease;
}
.shot.is-on { opacity: 1; }
.js .shot:not(.is-ready):not(.is-on) { display: none; }
.shot[data-shot="naplata"] { object-position: 50% 0; }
.shot[data-shot="racun"], .shot[data-shot="bez-interneta"], .shot[data-shot="jir-naknadno"] { object-position: 40% 0; }
.shot[data-shot="dan"] { object-position: 0 0; }
.stage-cap { color: var(--on-dark-muted); font-size: var(--s-small); }

.read { background: var(--paper); min-width: 0; position: relative; z-index: 1; }
.inline-shot { display: none; }

.hero {
  background: var(--dark); color: var(--on-dark);
  min-height: 100svh; padding: 112px var(--m) 36px var(--gut);
  display: grid; grid-template-rows: 1fr auto; gap: 48px;
}
.hero-body { grid-row: 1; align-self: center; max-width: 34rem; }
.mark {
  grid-row: 2;
  font-size: min(var(--s-mark), 9.4vw); font-weight: 400; line-height: 0.9; letter-spacing: -0.045em;
  width: min-content; transform-origin: 0 100%;
}
.hero-title { font-size: var(--s-lead); line-height: 1.25; letter-spacing: -0.01em; }
.hero-text { margin-top: 20px; color: var(--on-dark); max-width: 46ch; }
.hero-act { margin-top: 36px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
.link-go {
  display: inline-flex; align-items: center; gap: 10px; min-height: 52px;
  font-weight: 600; text-decoration: none; color: var(--on-dark);
}
.link-go svg { transition: transform var(--fast) var(--ease-out); }
.link-go:hover span { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
.link-go:hover svg { transform: translateX(4px); }
.hero-note { margin-top: 28px; font-size: var(--s-small); color: var(--on-dark-muted); max-width: 52ch; }

.product { padding: 168px var(--m) 96px var(--gut); }
.h-read { max-width: 22ch; }
.lede { margin-top: 24px; max-width: 46ch; }
.feats { margin-top: 64px; display: grid; gap: 8px; }
.feat { padding: 22px 0 22px 28px; position: relative; }
.feat::before {
  content: ""; position: absolute; left: 0; top: 34px; width: 10px; height: 10px;
  background: var(--surface); transition: background-color var(--mid) ease, transform var(--mid) var(--ease-out);
}
.feat.is-on::before { background: var(--cash); transform: scale(1.3); }
.feat h3 { font-size: var(--s-lead); font-weight: 400; line-height: 1.2; letter-spacing: -0.01em; }
.feat-btn {
  background: none; border: 0; padding: 0; cursor: pointer; text-align: left;
  color: var(--muted); transition: color var(--fast) ease;
}
.feat-btn:hover, .feat.is-on .feat-btn { color: var(--ink); }
.feat p { margin-top: 8px; max-width: 42ch; color: var(--muted); transition: color var(--mid) ease; }
.feat.is-on p { color: var(--ink); }

.offline { padding: 0 var(--m) 40px var(--gut); }
.off-step { min-height: 60svh; display: flex; flex-direction: column; justify-content: center; padding: 64px 0; }
.off-step .lede .copy-line + .copy-line { margin-top: 12px; }
.off-note { max-width: 40ch; font-size: var(--s-lead); line-height: 1.3; letter-spacing: -0.01em; }

/* ---------- equipment: the Kartica navy field, pinned heading, passing rows ---------- */
.equip {
  background: var(--card); color: var(--on-dark);
  padding: 200px var(--m);
  display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px;
}
.equip-head { grid-column: 1 / 6; align-self: start; position: sticky; top: 64px; }
.equip-text { margin-top: 28px; max-width: 40ch; }
.equip-rows { grid-column: 7 / 13; display: grid; gap: 104px; padding-top: 8px; }
.equip-row { display: grid; grid-template-columns: 40px 1fr; column-gap: 24px; align-items: start; }
.equip-row svg { grid-row: 1 / 3; color: var(--cash-soft); margin-top: 2px; }
.equip-row h3 { font-size: var(--s-lead); font-weight: 400; line-height: 1.2; letter-spacing: -0.01em; }
.equip-row p { margin-top: 12px; max-width: 46ch; }
.equip-close { padding-left: 64px; display: grid; gap: 32px; justify-items: start; }
.equip-note { color: var(--on-dark-muted); max-width: 46ch; font-size: var(--s-small); }

/* ---------- setup: the move printed on a slip, the counter's own artefact ---------- */
.setup {
  background: var(--surface);
  padding: 200px var(--m) 112px;
  display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; align-items: start;
}
.setup-head { grid-column: 1 / 6; }
.setup-intro { margin-top: 28px; max-width: 36ch; }
.slip {
  grid-column: 7 / 12; justify-self: start; width: min(100%, 480px);
  background: var(--sheet); padding: 44px 40px 64px;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), 97.5% 100%, 95% calc(100% - 10px), 92.5% 100%, 90% calc(100% - 10px), 87.5% 100%, 85% calc(100% - 10px), 82.5% 100%, 80% calc(100% - 10px), 77.5% 100%, 75% calc(100% - 10px), 72.5% 100%, 70% calc(100% - 10px), 67.5% 100%, 65% calc(100% - 10px), 62.5% 100%, 60% calc(100% - 10px), 57.5% 100%, 55% calc(100% - 10px), 52.5% 100%, 50% calc(100% - 10px), 47.5% 100%, 45% calc(100% - 10px), 42.5% 100%, 40% calc(100% - 10px), 37.5% 100%, 35% calc(100% - 10px), 32.5% 100%, 30% calc(100% - 10px), 27.5% 100%, 25% calc(100% - 10px), 22.5% 100%, 20% calc(100% - 10px), 17.5% 100%, 15% calc(100% - 10px), 12.5% 100%, 10% calc(100% - 10px), 7.5% 100%, 5% calc(100% - 10px), 2.5% 100%, 0% calc(100% - 10px));
}
.slip-list { display: grid; gap: 30px; }
.slip-list h3 { font-size: var(--s-body); font-weight: 600; }
.slip-list p { margin-top: 4px; }
.slip-end { margin: 6px -16px 0; padding: 16px; background: var(--ink); color: var(--sheet); }

/* ---------- independent: the one centred moment ---------- */
.own { padding: 104px var(--m) 120px; text-align: center; }
.h-own { margin: 0 auto; }
.own-text { margin: 28px auto 0; max-width: 44ch; }

/* ---------- questions: answers as reading text ---------- */
.faq {
  padding: 40px var(--m) 200px;
  display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; align-items: start;
}
.h-faq { grid-column: 1 / 5; font-size: var(--s-lead); font-weight: 400; line-height: 1.2; letter-spacing: -0.01em; max-width: 16ch; }
.faq-cols { grid-column: 5 / 13; columns: 2; column-gap: 56px; }
.faq-cols details { break-inside: avoid; margin-bottom: 32px; }
.faq-cols summary { list-style: none; cursor: pointer; font-weight: 600; }
.faq-cols summary::-webkit-details-marker { display: none; }
.faq-cols summary:hover { text-decoration: underline; text-underline-offset: 5px; }
.faq-cols details p { margin-top: 6px; }

/* ---------- pilot: the Gotovina green field, the first step already open ---------- */
.pilot {
  background: var(--cash); color: #fff;
  min-height: 78svh; padding: 120px var(--m) 56px;
  display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px;
}
.pilot-close { grid-column: 1 / 8; align-self: start; }
.pilot-close .h-big { max-width: 20ch; }
.pilot-note { margin-top: 24px; color: var(--cash-soft); max-width: 44ch; font-size: var(--s-small); }
.pilot-sheet {
  grid-column: 8 / 13; align-self: end; justify-self: end; width: min(100%, 460px);
  background: var(--sheet); color: var(--ink); padding: 40px;
}
.pilot-text { font-size: var(--s-lead); line-height: 1.3; letter-spacing: -0.01em; }
.pilot-sheet .btn { margin-top: 32px; width: 100%; }

/* ---------- footer: one quiet line ---------- */
.foot {
  padding: 22svh var(--m) 30px;
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 32px; align-items: end;
  font-size: var(--s-small); color: var(--muted);
}
.foot-brand { color: var(--ink); font-weight: 600; }
.foot-nav { display: flex; gap: 24px; }
.foot-nav a { color: var(--ink); text-decoration: none; }
.foot-nav a:hover { text-decoration: underline; text-underline-offset: 5px; }
.foot-note { text-align: right; justify-self: end; max-width: 40ch; }

/* ---------- dialogs ---------- */
.dlg {
  border: 0; padding: 0; border-radius: 0;
  width: min(1120px, calc(100vw - 32px)); max-height: calc(100svh - 32px);
  background: var(--sheet); color: var(--ink);
  box-shadow: 0 24px 64px rgb(0 0 0 / 0.35); /* taste-skill-ignore: a modal dialog really floats */
}
.dlg::backdrop { background: rgb(28 29 33 / 0.78); }
.dlg-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 28px; }
.dlg-top h2 { font-size: var(--s-lead); font-weight: 400; line-height: 1.2; letter-spacing: -0.01em; }
.btn-close {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px;
  border: 0; border-radius: 0; background: var(--surface); font-weight: 600; font-size: var(--s-small); cursor: pointer;
  transition: background-color var(--fast) ease;
}
.btn-close:hover { background: #ddd8ce; }
.demo-tabs { display: flex; gap: 8px; padding: 0 28px 18px; overflow-x: auto; scrollbar-width: none; }
.chip {
  flex: none; min-height: 40px; padding: 0 16px; border: 0; border-radius: 0;
  background: var(--surface); font-weight: 600; font-size: var(--s-small); cursor: pointer; white-space: nowrap;
  transition: background-color var(--fast) ease, color var(--fast) ease;
}
.chip:hover { background: #ddd8ce; }
.chip.is-on { background: var(--ink); color: var(--sheet); }
.demo-strip {
  display: flex; gap: 16px; padding: 0 28px; overflow-x: auto;
  scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: thin;
}
.slide { flex: 0 0 calc(100% - 64px); scroll-snap-align: start; scroll-margin-left: 28px; }
.slide img { width: 100%; max-height: calc(100svh - 260px); object-fit: contain; background: var(--surface); }
.js .slide { opacity: 0.35; transition: opacity var(--mid) ease; }
.js .slide.is-current { opacity: 1; }
.slide figcaption { margin-top: 10px; font-weight: 600; font-size: var(--s-small); }
.demo-cap { padding: 12px 28px 24px; font-size: var(--s-small); color: var(--muted); }
.dlg-oprema { width: min(560px, calc(100vw - 32px)); }
.dlg-hint { padding: 0 28px 36px; }

/* ---------- motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .hero-body > * { animation: rise 900ms var(--ease-out) both; }
  .js .hero-body > :nth-child(2) { animation-delay: 80ms; }
  .js .hero-body > :nth-child(3) { animation-delay: 160ms; }
  .js .hero-body > :nth-child(4) { animation-delay: 240ms; }
  .js .mark { animation: rise 1100ms var(--ease-out) 120ms both; }
  .js .reveal > *, .js .equip-row.reveal > *, .js .slip-list > li {
    opacity: 0; transform: translateY(24px);
    transition: opacity 700ms ease, transform 900ms var(--ease-out);
  }
  .js .reveal > :nth-child(2) { transition-delay: 80ms; }
  .js .reveal > :nth-child(3) { transition-delay: 160ms; }
  .js .reveal > :nth-child(4) { transition-delay: 240ms; }
  .js .reveal.in > *, .js .slip.in .slip-list > li { opacity: 1; transform: none; }
  .js .slip.in .slip-list > li:nth-child(2) { transition-delay: 90ms; }
  .js .slip.in .slip-list > li:nth-child(3) { transition-delay: 180ms; }
  .js .slip.in .slip-list > li:nth-child(4) { transition-delay: 270ms; }

  /* the signature move: the name settles heavier as the first screen leaves */
  @supports (animation-timeline: scroll()) {
    .js .mark {
      animation: rise 1100ms var(--ease-out) 120ms both, settle linear both;
      animation-timeline: auto, scroll(root);
      animation-range: normal, 0 90svh;
    }
  }
}
@keyframes rise { from { opacity: 0; transform: translateY(28px); } }
@keyframes settle { to { scale: 0.93; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .shot { transition: none; }
}

/* ---------- tablet and phone: the stage becomes a band pinned over the reading ---------- */
@media (max-width: 959px) {
  .bar {
    position: static; height: auto; display: block;
    background: var(--dark); padding: 14px 0 6px;
  }
  .bar-state { gap: 10px; }
  .bar-nav { justify-content: flex-start; gap: 22px; overflow-x: auto; scrollbar-width: none; padding-top: 10px; white-space: nowrap; }
  .split { display: block; }
  .stage-col { position: sticky; top: 0; z-index: 0; height: 42svh; }
  .stage { position: static; height: 100%; padding: 8px var(--m) 10px; gap: 8px; }
  .shot { object-position: 100% 0; }
  .shot[data-shot="naplata"] { object-position: 50% 0; }
  .shot[data-shot="racun"], .shot[data-shot="bez-interneta"], .shot[data-shot="jir-naknadno"] { object-position: 40% 0; }
  .hero { min-height: 0; padding: 24px var(--m) 64px; grid-template-rows: auto auto; gap: 20px; }
  .hero-body { display: flex; flex-direction: column; }
  .hero-title { order: 1; }
  .hero-act { order: 2; margin-top: 24px; }
  .hero-text { order: 3; margin-top: 28px; }
  .hero-note { order: 4; }
  .mark { grid-row: 1; font-size: 16vw; }
  .hero-body { grid-row: 2; }
  .product, .offline { padding-left: var(--m); }
  .product { padding-top: 96px; padding-bottom: 48px; }
  .bar-nav { padding-left: var(--m); }
  .off-step { min-height: 0; padding: 48px 0; }
  .inline-shot { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 100% 0; margin-top: 20px; background: var(--surface); }
  .inline-shot[data-shot="naplata"] { object-position: 50% 0; }
  .inline-shot[data-shot="dan"] { object-position: 0 0; }
  .inline-shot[data-shot="bez-interneta"], .inline-shot[data-shot="jir-naknadno"] { object-position: 36% 0; }
  .feat .inline-shot { margin-left: -28px; width: calc(100% + 28px); }
  .feat-btn, .feat p { color: var(--ink); }
  .feat::before { background: var(--cash); }
  .equip, .setup, .faq, .pilot { grid-template-columns: 1fr; }
  .equip { padding: 112px var(--m); }
  .equip-head, .equip-rows, .setup-head, .slip, .h-faq, .faq-cols, .pilot-close, .pilot-sheet { grid-column: 1; }
  .equip-head { position: static; }
  .equip-rows { margin-top: 72px; gap: 64px; }
  .equip-close { padding-left: 0; }
  .setup { padding: 112px var(--m); }
  .slip { margin-top: 48px; width: 100%; }
  .own { padding: 120px var(--m); }
  .faq { padding: 24px var(--m) 120px; }
  .faq-cols { columns: 1; margin-top: 32px; }
  .pilot { min-height: 0; padding: 96px var(--m) 40px; row-gap: 48px; }
  .pilot-close { order: 0; }
  .pilot-sheet { justify-self: stretch; width: 100%; padding: 28px; }
  .foot { padding: 18svh var(--m) 24px; grid-template-columns: 1fr; gap: 8px; }
  .foot-nav { flex-wrap: wrap; gap: 8px 22px; }
  .foot-note { text-align: left; justify-self: start; }
  .dlg-top { padding: 18px 16px; }
  .demo-tabs { padding: 0 16px 14px; }
  .demo-strip { padding: 0 16px; gap: 12px; }
  .slide { flex-basis: calc(100% - 28px); scroll-margin-left: 16px; }
  .demo-cap { padding: 10px 16px 20px; }
  .dlg-hint { padding: 0 16px 28px; }
}
@media (max-width: 959px) and (min-width: 600px) {
  .stage-col { height: 52svh; }
}
