/* ==========================================================================
   Hero: tekst levo, demo interfejs desno (glavni ekran + povezani paneli)
   ========================================================================== */

.hero { position: relative; overflow: hidden; overflow: clip; isolation: isolate; border-bottom: 1px solid var(--line); }
.hero__glow {
  position: absolute; inset: -20% -10% auto auto; width: min(900px, 90vw); aspect-ratio: 1; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(46, 123, 255, .22), rgba(46, 123, 255, .06) 55%, transparent 75%);
}
.hero__grid {
  display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.18fr); gap: clamp(32px, 4vw, 64px);
  align-items: center; padding-block: clamp(48px, 7vw, 96px) clamp(48px, 6vw, 88px);
}
.hero__copy { display: grid; gap: var(--s-5); align-content: center; }
.hero__title { font-size: clamp(2.6rem, 1.2rem + 4.4vw, 5rem); font-weight: 800; line-height: .98; letter-spacing: -.04em; text-transform: uppercase; }
.hero__title-accent { display: block; color: transparent; background: linear-gradient(92deg, #fff 0%, #9CCBFF 45%, var(--c-cyan) 100%); -webkit-background-clip: text; background-clip: text; }
.hero__lead { font-size: var(--fs-md); color: var(--c-text-2); max-width: 32em; }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-2); }

/* ---- Demo okvir ---- */
.hero__demo { display: grid; gap: var(--s-4); min-width: 0; }
.demo-bar { display: flex; justify-content: flex-start; }
.demo-tabs {
  display: inline-grid; grid-auto-flow: column; gap: 4px; padding: 4px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-pill); background: rgba(7, 14, 34, .7);
  max-width: 100%;
}
.demo-tab {
  display: grid; justify-items: start; gap: 1px; min-height: 44px; padding: .45rem 1.05rem; text-align: left;
  border: 0; border-radius: var(--radius-pill); background: transparent; cursor: pointer; color: var(--c-muted);
  transition: background-color var(--t-fast), color var(--t-fast), box-shadow var(--t);
  -webkit-tap-highlight-color: transparent;
}
.demo-tab__area { font-weight: 700; font-size: .86rem; line-height: 1.15; }
.demo-tab__product { font-family: var(--f-mono); font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; opacity: .8; }
.demo-tab:hover { color: var(--c-text); background: rgba(110, 160, 255, .08); }
.demo-tab[aria-selected="true"] { color: #fff; background: var(--grad-blue); box-shadow: var(--glow-blue); }
.demo-tab[aria-selected="true"] .demo-tab__product { opacity: .9; }

.demo-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; }
.demo-pause {
  display: inline-flex; align-items: center; gap: .55rem; min-height: 40px; padding: .4rem .9rem;
  font: 600 .82rem var(--f-body); color: var(--c-text-2);
  background: transparent; border: 1px solid var(--line); border-radius: var(--radius-pill); cursor: pointer;
  transition: border-color var(--t-fast), color var(--t-fast);
}
.demo-pause:hover { border-color: var(--c-cyan); color: var(--c-text); }
.demo-pause__icon { position: relative; width: 10px; height: 12px; }
.demo-pause__icon::before, .demo-pause__icon::after { content: ""; position: absolute; top: 0; width: 3px; height: 12px; border-radius: 1px; background: currentColor; }
.demo-pause__icon::before { left: 0; } .demo-pause__icon::after { right: 0; }
.demo-pause[aria-pressed="true"] .demo-pause__icon::before { left: 1px; width: 0; height: 0; border-radius: 0; background: none; border-style: solid; border-width: 6px 0 6px 10px; border-color: transparent transparent transparent currentColor; }
.demo-pause[aria-pressed="true"] .demo-pause__icon::after { display: none; }

/* ---- Scena ---- */
.stage { position: relative; height: 560px; }
.stage__orbit { position: absolute; inset: -4% -3% -2% -6%; width: 109%; height: 106%; pointer-events: none; overflow: visible; }
.stage__orbit path { fill: none; vector-effect: non-scaling-stroke; }
.stage__orbit-path { stroke: rgba(34, 211, 238, .28); stroke-width: 1; }
.stage__orbit-flow { stroke: var(--c-cyan); stroke-width: 1.5; stroke-dasharray: 3 14; opacity: .55; }
@media (prefers-reduced-motion: no-preference) {
  .stage__orbit-flow { animation: orbit-flow var(--t-orbit) linear infinite; }
  .stage.is-paused .stage__orbit-flow { animation-play-state: paused; }
}

.scene { position: absolute; inset: 0; }
.scene[hidden] { display: none; }

.screen, .panel {
  position: absolute; border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: linear-gradient(165deg, rgba(18, 36, 80, .96), rgba(8, 15, 36, .97));
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .8);
}
.screen { left: 0; top: 34px; width: 76%; min-height: 330px; overflow: hidden; z-index: 1; }
.screen__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.screen__app { display: inline-flex; align-items: center; gap: 8px; font-family: var(--f-display); font-weight: 700; font-size: .84rem; }
.screen__logo { width: 14px; height: 14px; border-radius: 4px; background: linear-gradient(135deg, var(--c-cyan), var(--c-blue)); }
.screen__meta { font-size: .68rem; color: var(--c-muted); padding: 3px 9px; border: 1px solid var(--line); border-radius: 6px; }

.panel { width: 38%; padding: 12px 14px; display: grid; gap: 7px; z-index: 2; font-size: .74rem; transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease), opacity var(--t) var(--ease), transform var(--t) var(--ease); }
.panel--a { right: 0; top: 0; }
.panel--b { right: -1%; top: 214px; width: 34%; }
.panel--c { left: 14%; top: 352px; width: 42%; }
.panel__head { display: flex; align-items: center; gap: 8px; font-family: var(--f-display); font-weight: 700; font-size: .8rem; }
.panel__head .dot { background: var(--c-muted); box-shadow: none; opacity: .6; transition: background var(--t), box-shadow var(--t), opacity var(--t); }
.panel__row { display: flex; justify-content: space-between; gap: 10px; color: var(--c-text-2); }
.panel__row b { color: var(--c-text); font-weight: 600; white-space: nowrap; }
.panel__row b.ok { color: var(--c-ok); }
.panel__foot { color: var(--c-muted); font-size: .68rem; min-height: 1.1em; }
/* Selektivno osvetljenje: samo panel aktivnog koraka */
.panel.is-active { border-color: rgba(34, 211, 238, .75); box-shadow: 0 0 0 1px rgba(34, 211, 238, .25), 0 0 34px -6px rgba(34, 211, 238, .45), 0 30px 70px -30px rgba(0, 0, 0, .8); }
.panel.is-active .panel__head .dot { background: var(--c-cyan); box-shadow: var(--glow-cyan); opacity: 1; }

/* Elementi koji se pojavljuju u koraku */
.js [data-at] { opacity: 0; transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease); }
.js [data-at].is-on { opacity: 1; }
.js .tkt[data-at] { transform: translateY(8px) scale(.97); }
.js .tkt[data-at].is-on { transform: none; }

/* Sklapanje pri učitavanju */
.js .stage .screen, .js .stage .panel, .js .stage .stage__orbit { opacity: 0; transform: translateY(16px) scale(.985); }
.js .stage .stage__orbit { transform: none; }
.js .stage.is-ready .screen, .js .stage.is-ready .panel, .js .stage.is-ready .stage__orbit { opacity: 1; transform: none; transition: opacity var(--t-draw) var(--ease) var(--d, 0s), transform var(--t-draw) var(--ease) var(--d, 0s), border-color var(--t), box-shadow var(--t); }
.stage .screen { --d: .05s; } .stage .panel--a { --d: .25s; } .stage .panel--b { --d: .4s; } .stage .panel--c { --d: .55s; } .stage .stage__orbit { --d: .7s; }

/* Koraci (natpis ispod scene) */
.steps-cap { position: absolute; left: 0; right: 0; bottom: 0; display: flex; gap: 6px 14px; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; counter-reset: cap; z-index: 3; }
.steps-cap li { counter-increment: cap; display: inline-flex; align-items: center; gap: 6px; font-size: .72rem; color: var(--c-muted); opacity: .55; transition: opacity var(--t), color var(--t); }
.steps-cap li::before { content: counter(cap); display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--line-strong); font-family: var(--f-mono); font-size: .6rem; }
.steps-cap li.is-done { opacity: .85; }
.steps-cap li.is-on { opacity: 1; color: var(--c-text); }
.steps-cap li.is-on::before { border-color: var(--c-cyan); background: rgba(34, 211, 238, .18); color: #fff; box-shadow: var(--glow-cyan); }

/* ---- Orderlia ---- */
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 12px; }
.board__col { display: grid; gap: 8px; align-content: start; min-height: 240px; padding: 8px; border-radius: 10px; background: rgba(4, 8, 22, .45); }
.board__head { font-family: var(--f-mono); font-size: .6rem; letter-spacing: .16em; text-transform: uppercase; color: var(--c-muted); padding: 2px 2px 4px; }
.tkt { display: grid; gap: 2px; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 9px; background: rgba(46, 123, 255, .1); font-size: .68rem; color: var(--c-text-2); }
.tkt b { font-family: var(--f-display); font-size: .74rem; color: var(--c-text); }
.tkt--dim { opacity: .55; background: transparent; border-color: var(--line); }
.tkt--live { border-color: rgba(34, 211, 238, .7); background: rgba(34, 211, 238, .1); }
.tkt__done { color: var(--c-ok); font-weight: 700; }
.tkt > span[data-at] + .tkt__done { margin-top: -1.35em; }
.meter { height: 6px; border-radius: 6px; background: rgba(110, 160, 255, .15); overflow: hidden; }
.meter__fill { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--c-blue), var(--c-cyan)); transition: width 1.6s var(--ease), opacity .3s !important; }
.meter__fill.is-on { width: 72%; }
.dmap { position: relative; height: 92px; border-radius: 8px; overflow: hidden; background: rgba(4, 10, 30, .8); border: 1px solid var(--line); }
.dmap svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.dmap__road { stroke: rgba(110, 160, 255, .16); stroke-width: 5; fill: none; }
.dmap__route { stroke: var(--c-cyan); stroke-width: 1.5; stroke-dasharray: 4 4; fill: none; }
.dmap__home { fill: var(--c-text); }
.dmap__driver { position: absolute; left: 11%; top: 78%; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--c-gold); box-shadow: 0 0 0 4px rgba(255, 195, 41, .22), 0 0 12px rgba(255, 195, 41, .7); }
@media (prefers-reduced-motion: reduce) {
  .dmap__driver.is-on { left: 84%; top: 21%; }
}
@media (prefers-reduced-motion: no-preference) {
  .dmap__driver.is-on { animation: drive 3.4s var(--ease) forwards; }
  .stage.is-paused .dmap__driver { animation-play-state: paused; }
}
@keyframes drive { 0% { left: 11%; top: 78%; } 35% { left: 38%; top: 40%; } 60% { left: 55%; top: 25%; } 100% { left: 84%; top: 21%; } }

/* ---- HoteoSoft ---- */
.cal { display: grid; gap: 6px; padding: 14px 12px; }
.cal__row { display: grid; grid-template-columns: 52px repeat(7, minmax(0, 1fr)); align-items: center; gap: 0; min-height: 40px; border-bottom: 1px solid var(--line); }
.cal__row > span { grid-row: 1; font-size: .68rem; color: var(--c-muted); text-align: center; }
.cal__row > span:first-child { text-align: left; color: var(--c-text-2); }
.cal__row--head { min-height: 24px; }
.cal__row--head > span { font-family: var(--f-mono); font-size: .62rem; }
.bk { grid-row: 1; grid-column: calc(var(--s) + 1) / calc(var(--e) + 1); margin: 0 3px; padding: 5px 8px; border-radius: 7px; font-style: normal; font-size: .64rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--c-text-2); background: rgba(46, 123, 255, .22); border: 1px solid rgba(46, 123, 255, .35); }
.bk--new { color: #fff; background: linear-gradient(90deg, rgba(34, 211, 238, .35), rgba(46, 123, 255, .45)); border-color: var(--c-cyan); box-shadow: 0 0 18px -4px rgba(34, 211, 238, .7); transform-origin: left center; }
.js .bk--new[data-at] { transform: scaleX(.1); transition: opacity var(--t), transform var(--t-draw) var(--ease); }
.js .bk--new[data-at].is-on { transform: none; }

/* ---- Orbit Dispatch ---- */
.list { display: grid; padding: 8px 12px 12px; }
.list__row { display: grid; grid-template-columns: 1fr 1.2fr 1fr; gap: 8px; align-items: center; min-height: 46px; padding: 0 6px; border-bottom: 1px solid var(--line); font-size: .7rem; color: var(--c-text-2); }
.list__row > span:first-child { font-family: var(--f-mono); color: var(--c-text); }
.list__row--head { min-height: 30px; font-family: var(--f-mono); font-size: .58rem; letter-spacing: .14em; text-transform: uppercase; color: var(--c-muted); }
.list__row--head > span:first-child { color: var(--c-muted); }
.list__row--new { border-radius: 8px; background: rgba(34, 211, 238, .08); box-shadow: inset 0 0 0 1px rgba(34, 211, 238, .45); }
.list__row--new > span:last-child { display: grid; }
.list__row--new > span:last-child > * { grid-area: 1 / 1; }
.st { justify-self: start; font-style: normal; font-size: .64rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--c-text-2); }
.st--in { border-color: rgba(34, 211, 238, .6); color: var(--c-cyan); }
.st--go { border-color: rgba(46, 123, 255, .7); color: #9CC2FF; }
.st--ok { border-color: rgba(91, 227, 160, .5); color: var(--c-ok); }
.barcode { position: relative; height: 54px; border-radius: 6px; overflow: hidden;
  background: repeating-linear-gradient(90deg, var(--c-text) 0 2px, transparent 2px 4px, var(--c-text) 4px 5px, transparent 5px 9px, var(--c-text) 9px 12px, transparent 12px 14px);
  opacity: .85; }
.barcode__line { position: absolute; left: -4%; right: -4%; top: 10%; height: 2px; background: var(--c-cyan); box-shadow: 0 0 10px 2px rgba(34, 211, 238, .8); }
@media (prefers-reduced-motion: no-preference) {
  .panel.is-active .barcode__line { animation: scan 1.1s ease-in-out infinite alternate; }
  .stage.is-paused .barcode__line { animation-play-state: paused; }
}
@keyframes scan { from { top: 10%; } to { top: 86%; } }
.sms { padding: 8px 10px; border-radius: 10px 10px 10px 2px; background: rgba(46, 123, 255, .22); border: 1px solid rgba(46, 123, 255, .4); color: var(--c-text); line-height: 1.4; }

/* ---- Prelomne tačke ---- */
@media (max-width: 1099px) and (min-width: 960px) {
  .stage { height: 590px; }
  .screen { width: 80%; }
}
@media (max-width: 959px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr); }
  .hero__copy { max-width: 40rem; }
}
/* Telefon i manji tablet: prikaz ispod teksta, jednostavniji raspored i animacija */
@media (max-width: 719px) {
  .hero__grid { gap: var(--s-6); padding-block: var(--s-7) var(--s-7); }
  .hero__actions .btn { flex: 1 1 auto; }
  .demo-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; width: 100%; border-radius: var(--radius); }
  .demo-tab { border-radius: 10px; padding: .45rem .6rem; }
  .demo-tab__area { font-size: .78rem; }
  .stage { height: auto; }
  .dmap { height: 110px; }
  .stage__orbit { display: none; }
  .scene { position: static; display: grid; gap: 10px; }
  .screen, .panel { position: relative; inset: auto; width: auto; min-height: 0; }
  .screen { top: 0; }
  .panel { display: none; }
  .panel.is-active, .scene:not(:has(.panel.is-active)) .panel--a { display: grid; }
  .js .stage .screen, .js .stage .panel { transform: none; }
  .steps-cap { position: static; }
  .steps-cap li { display: none; }
  .steps-cap li.is-on { display: inline-flex; }
  .board { gap: 6px; padding: 8px; }
  .board__col { min-height: 170px; padding: 6px; }
  .tkt { padding: 6px 7px; font-size: .62rem; }
  .tkt b { font-size: .66rem; }
  .cal__row { grid-template-columns: 44px repeat(7, minmax(0, 1fr)); min-height: 34px; }
  .bk { padding: 4px 5px; font-size: .58rem; margin: 0 1px; }
  .list__row { font-size: .64rem; }
}
