/* =====================================================================
   SAJT: crni tech / swiss stil (početna, work, case study)
   ===================================================================== */
:root {
  --bg: #E9E9E5;
  --fg: #0F0F0F;
  --dim: #6E6E69;
  --line: rgba(15,15,15,0.16);
  --acc: #D9FF3F;
  --ease: cubic-bezier(.76,0,.24,1);
  --ease-out: cubic-bezier(.16,1,.3,1);
  --pad: 24px;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--fg); }
body.t { font-family: 'Inter Tight', 'Helvetica Neue', Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
.t a { color: inherit; text-decoration: none; }
.t ::selection { background: var(--fg); color: var(--bg); }
.mono { font-family: 'Geist Mono', ui-monospace, monospace; font-size: 11px; line-height: 1.45; letter-spacing: 0.02em; text-transform: uppercase; }
sup { font-size: 0.5em; vertical-align: top; position: relative; top: 0.35em; }

/* ---------- LAYOUT: jedan ekran ---------- */
.screen {
  height: 100vh; height: 100svh; min-height: 640px;
  display: grid; grid-template-rows: auto auto minmax(0,1fr) auto auto;
  gap: 20px; padding: 18px var(--pad);
}

/* ---------- NAV ---------- */
.tnav { display: flex; justify-content: space-between; align-items: center; }
.tnav .mark { display: inline-block; line-height: 0; }
.tnav .mark img { height: 24px; width: auto; display: block; filter: invert(1); }
.tnav-links { display: flex; gap: 32px; justify-content: flex-end; font-size: 13px; }
.tnav a { position: relative; }
.tnav a::after, .foot a::after, .more span::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform .5s var(--ease);
}
.tnav a:hover::after, .foot a:hover::after, .more:hover span::after { transform: scaleX(1); transform-origin: left; }

/* ---------- HERO ---------- */
.hero { display: grid; grid-template-columns: 1fr; align-items: end; gap: 24px; border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.big {
  margin: 0; font-weight: 500; text-transform: uppercase;
  font-size: clamp(44px, min(8.2vw, 13vh), 160px); line-height: 0.86; letter-spacing: -0.055em;
}
.big .line { display: block; overflow: hidden; padding-bottom: 0.04em; }
.big .line > span { display: inline-block; }
.big sup { font-size: 11px; letter-spacing: 0.02em; top: 1.2em; margin-left: 0.4em; color: var(--dim); }

/* ---------- INTRO ---------- */
.mid { display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); gap: 20px; min-height: 0; }
.intro { grid-column: 1 / span 4; margin: 0; max-width: 380px; text-align: justify; text-indent: 4em; }
.cv { grid-column: 6 / span 3; margin: 0; display: grid; gap: 14px; align-content: start; }
.cv div { display: grid; grid-template-columns: 80px 1fr; }
.cv dt { color: var(--dim); }
.cv dd { margin: 0; }
.photo { grid-column: 10 / span 3; justify-self: end; margin: 0; height: 100%; min-height: 0; position: relative; display: flex; flex-direction: column; align-items: flex-end; }
.photo img { height: 100%; width: auto; max-width: 100%; aspect-ratio: 928 / 1136; object-fit: cover; display: block; }

/* ---------- WORK ---------- */
.work-head { display: flex; align-items: flex-end; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 12px; margin-bottom: 12px; }
.work-head h2 { margin: 0; font-weight: 500; font-size: clamp(28px, 3vw, 48px); line-height: 0.9; letter-spacing: -0.05em; }
.work-head h2 sup { font-size: 11px; top: 0; margin-right: 6px; color: var(--dim); }
.work-head h2 > span { font-size: 11px; color: var(--dim); vertical-align: top; letter-spacing: 0.02em; }
.more { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--fg); padding: 9px 14px; transition: background .3s ease, color .3s ease; }
.more span { position: relative; }
.more i { font-style: normal; transition: transform .4s var(--ease); }
.more:hover { background: var(--fg); color: var(--bg); }
.more:hover i { transform: translateX(4px); }

.grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.card { display: block; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.card-img { height: clamp(150px, 32vh, 400px); overflow: hidden; background: #DADAD5; }
.card-img img { width: 100%; height: 100%; object-fit: cover; display: block; transform: scale(1.02); transition: transform 1s var(--ease-out); }
@media (max-height: 800px) { .card-img { height: clamp(150px, 27vh, 400px); } }
.card:hover .card-img img { transform: scale(1.07); }
.card-meta { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 8px; padding: 10px 12px; position: relative; transition: color .35s ease; }
.card-meta span:first-child { font-size: 13px; }
.card-meta span:last-child { color: var(--dim); transition: color .35s ease; }
.card-meta::before { content: ''; position: absolute; inset: 0; background: var(--fg); transform: scaleY(0); transform-origin: bottom; transition: transform .45s var(--ease); z-index: -1; }
.card-meta { z-index: 0; }
.card:hover .card-meta { color: var(--bg); }
.card:hover .card-meta span { color: var(--bg); }
.card:hover .card-meta::before { transform: scaleY(1); }

/* ---------- FOOTER LINE ---------- */
.foot { display: grid; grid-template-columns: repeat(4, auto); justify-content: space-between; color: var(--dim); }
.foot a { position: relative; color: var(--fg); }

/* ---------- GRAIN + CURSOR ---------- */
.grain {
  position: fixed; inset: -50%; pointer-events: none; z-index: 50; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain .8s steps(4) infinite;
}
@keyframes grain { 0%{transform:translate(0,0)} 25%{transform:translate(-3%,2%)} 50%{transform:translate(2%,-3%)} 75%{transform:translate(-2%,-1%)} 100%{transform:translate(0,0)} }
.cursor { display: none; }
@media (pointer: fine) {
  .cursor {
    display: block; position: fixed; left: 0; top: 0; width: 12px; height: 12px; margin: -6px 0 0 -6px;
    background: #fff; border-radius: 50%; pointer-events: none; z-index: 100; mix-blend-mode: difference;
    transition: width .35s var(--ease-out), height .35s var(--ease-out), margin .35s var(--ease-out); opacity: 0;
  }
  .cursor.on { opacity: 1; }
  .cursor.big { width: 64px; height: 64px; margin: -32px 0 0 -32px; }
}

/* ---------- PRELOADER ---------- */
.loader { display: none; }
.js .loader {
  position: fixed; inset: 0; z-index: 200; background: var(--fg); color: var(--bg);
  display: flex; flex-direction: column; justify-content: flex-end; padding: 18px var(--pad);
  font-family: 'Geist Mono', ui-monospace, monospace; font-size: 11px; text-transform: uppercase;
  transition: transform 1s var(--ease);
}
.loader-row { display: flex; justify-content: space-between; align-items: flex-end; }
.loader-count { font-family: 'Inter Tight', sans-serif; font-weight: 500; font-size: clamp(80px, 18vw, 260px); line-height: .8; letter-spacing: -0.06em; }
.loader-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; }
.loader-bar i { display: block; height: 100%; width: 100%; background: var(--bg); transform: scaleX(0); transform-origin: left; }
.loader.done { transform: translateY(-100%); }
.skip-loader .loader { display: none; }

/* ---------- REVEAL ANIMACIJE ---------- */
.js .big .line > span { transform: translateY(110%); transition: transform 1.1s var(--ease-out); }
.js .big .line:nth-child(2) > span { transition-delay: .08s; }
.js .rv { opacity: 0; transform: translateY(10px); transition: opacity .8s ease, transform .8s var(--ease-out); transition-delay: calc(.35s + var(--i, 0) * .04s); }
.js .photo { clip-path: inset(100% 0 0 0); transition: clip-path 1.3s var(--ease); transition-delay: .25s; }
.js .card { clip-path: inset(0 0 100% 0); transition: clip-path 1.1s var(--ease); transition-delay: calc(.45s + var(--i, 0) * .09s); }
.js .hero, .js .work-head { border-color: transparent; }
.js .hero::after { content: none; }
.is-in .big .line > span { transform: none; }
.is-in .rv { opacity: 1; transform: none; }
.is-in .photo { clip-path: inset(0 0 0 0); }
.is-in .card { clip-path: inset(0 0 0 0); }
.is-in .hero, .is-in .work-head { border-color: var(--line); transition: border-color 1s ease .6s; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1100px) {
  .intro { grid-column: 1 / span 5; }
  .cv { grid-column: 6 / span 4; }
  .photo { grid-column: 10 / span 3; }
}
@media (max-width: 760px), (max-height: 600px) and (max-width: 1000px) {
  :root { --pad: 16px; }
  .screen { height: auto; min-height: 0; display: flex; flex-direction: column; gap: 28px; }
  .tnav .mark img { height: 18px; }
  .tnav-links { gap: 20px; font-size: 12px; }
  .hero { grid-template-columns: 1fr; }
  .big { font-size: 13.5vw; }
  .mid { grid-template-columns: 1fr 1fr; gap: 24px 16px; }
  .intro { grid-column: 1 / -1; max-width: none; }
  .cv { grid-column: 1 / 2; }
  .photo { grid-column: 2 / 3; height: auto; }
  .photo img { height: auto; width: 100%; }
  .grid { grid-template-columns: minmax(0,1fr); }
  .card-img { height: auto; aspect-ratio: 4 / 3; }
  .foot { grid-template-columns: 1fr 1fr; row-gap: 8px; padding-bottom: 8px; }
  .intro { text-align: left; }
  .card-meta { grid-template-columns: 1fr; }
  .card-meta span:last-child { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .js .loader { display: none; }
  .grain { animation: none; }
  .js .big .line > span, .js .rv, .js .photo, .js .card { transform: none !important; opacity: 1 !important; clip-path: none !important; transition: none !important; }
}

/* =====================================================================
   PODSTRANICE (work + case study): skrolaju se normalno
   ===================================================================== */
.page { padding: 18px var(--pad) 20px; display: flex; flex-direction: column; min-height: 100vh; }
.page > main { flex: 1; }
.page .foot { margin-top: 96px; padding-top: 14px; border-top: 1px solid var(--line); }
.tnav a.is-active::after { transform: scaleX(1); }

/* zajednički naslov stranice */
.p-head { padding: 64px 0 18px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 24px; }
.p-head .big sup { top: 1em; }
.p-head-meta { text-align: right; color: var(--dim); }
.p-head-meta b { color: var(--fg); font-weight: 400; }

/* ---------- WORK: grid projekata ---------- */
.w-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px 16px; }
.w-card { display: block; }
.w-thumb { aspect-ratio: 4 / 3; overflow: hidden; background: #DADAD5; }
.w-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transform: scale(1.02); transition: transform 1s var(--ease-out); }
.w-card:hover .w-thumb img { transform: scale(1.06); }
.w-title { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 16px; padding: 12px 0 8px; border-bottom: 1px solid var(--line); }
.w-card h2 { margin: 0; font-weight: 500; text-transform: uppercase; font-size: clamp(18px, 1.6vw, 26px); line-height: .9; letter-spacing: -0.05em; transition: transform .5s var(--ease-out); }
.w-card:hover h2 { transform: translateX(8px); }
.w-cat { color: var(--dim); white-space: nowrap; }
.w-arrow { display: inline-block; margin-left: 10px; font-style: normal; color: var(--fg); transition: transform .45s var(--ease); }
.w-card:hover .w-arrow { transform: translateX(4px); }
.w-desc { margin: 0; padding-top: 8px; max-width: 52ch; color: var(--dim); }
@media (max-width: 1000px) { .w-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* lista: red sa sličicom (skloni klasu w-list u work.html za grid) */
.w-grid.w-list { grid-template-columns: minmax(0, 1fr); gap: 0; margin-top: 48px; border-top: 1px solid var(--line); }
.w-list .w-card { display: grid; grid-template-columns: 168px minmax(0, 1fr) minmax(0, 1.3fr) 140px; gap: 28px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); position: relative; isolation: isolate; }
.w-list .w-card::before { content: ''; position: absolute; inset: 0 calc(var(--pad) * -1); background: var(--fg); transform: scaleY(0); transform-origin: bottom; transition: transform .5s var(--ease); z-index: -1; }
.w-list .w-card:hover::before { transform: scaleY(1); transform-origin: top; }
.w-list .w-card:hover, .w-list .w-card:hover .w-cat, .w-list .w-card:hover .w-desc, .w-list .w-card:hover .w-arrow { color: var(--bg); }
.w-list .w-title { display: contents; }
.w-list .w-card h2 { font-size: clamp(22px, 2.4vw, 36px); }
.w-list .w-cat { grid-column: 4; grid-row: 1; justify-self: end; transition: color .3s ease; }
.w-list .w-desc { grid-column: 3; grid-row: 1; padding: 0; transition: color .3s ease; }
@media (max-width: 900px) {
  .w-list .w-card { grid-template-columns: 112px minmax(0, 1fr) auto; gap: 8px 16px; }
  .w-list .w-thumb { grid-row: span 2; }
  .w-list .w-cat { grid-column: 3; }
  .w-list .w-desc { grid-column: 2 / -1; grid-row: 2; }
}
@media (max-width: 560px) {
  .w-list .w-card { grid-template-columns: 88px minmax(0, 1fr); }
  .w-list .w-thumb { grid-row: span 3; }
  .w-list .w-cat { justify-self: start; grid-column: 2; grid-row: 2; }
  .w-list .w-desc { grid-row: 3; }
}

/* ---------- CASE STUDY ---------- */
.cs-top { display: flex; justify-content: space-between; align-items: center; padding-top: 48px; color: var(--dim); }
.cs-top a { color: var(--fg); position: relative; }
.cs-top + .p-head { padding-top: 10px; }
.cs-name { padding: 10px 0 18px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 24px; }
.cs-name .big { font-size: clamp(52px, 11vw, 200px); }
.btn-t { display: inline-flex; align-items: center; gap: 10px; border: 1px solid var(--fg); padding: 11px 16px; white-space: nowrap; transition: background .3s ease, color .3s ease; }
.btn-t i { font-style: normal; transition: transform .4s var(--ease); }
.btn-t:hover { background: var(--fg); color: var(--bg); }
.btn-t:hover i { transform: translateX(4px); }

.cs-lede { margin: 0; padding: 40px 0 56px; max-width: 1000px; font-size: clamp(22px, 2.3vw, 36px); line-height: 1.18; letter-spacing: -0.03em; font-weight: 400; }
.cs-lede + .cs-sub { margin: -36px 0 56px; max-width: 560px; color: var(--dim); font-size: 15px; line-height: 1.6; }

.cs-body { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 40px; align-items: start; }
.cs-info { position: sticky; top: 24px; display: grid; gap: 36px; }
.cs-info .btn-t { justify-self: start; margin-top: -12px; background: var(--fg); color: var(--bg); }
.cs-info .btn-t:hover { background: transparent; color: var(--fg); }
.spec { margin: 0; border-top: 1px solid var(--line); }
.spec div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.spec dt { color: var(--dim); }
.spec dd { margin: 0; }
.cs-text h3 { margin: 0 0 10px; font-weight: 400; color: var(--dim); }
.cs-text h3 span { color: var(--fg); }
.cs-text p { margin: 0; font-size: 14.5px; line-height: 1.65; color: #2E2E2B; }
.cs-text + .cs-text { margin-top: -8px; }

.cs-media { display: grid; gap: 20px; }
.cs-media figure { margin: 0; }
.cs-media img { width: 100%; height: auto; display: block; background: #DADAD5; }
.cs-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.cs-pair img { aspect-ratio: 9 / 10; height: 100%; object-fit: cover; }

.cs-next { display: block; margin-top: 120px; border-top: 1px solid var(--line); padding-top: 14px; position: relative; }
.cs-next .mono { color: var(--dim); }
.cs-next-row { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 24px; padding-top: 18px; }
.cs-next .big { font-size: clamp(48px, 10vw, 180px); transition: transform .6s var(--ease-out); }
.cs-next:hover .big { transform: translateX(16px); }
.cs-next-img { width: clamp(140px, 18vw, 280px); aspect-ratio: 4 / 3; overflow: hidden; }
.cs-next-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 1s var(--ease-out); }
.cs-next:hover .cs-next-img img { transform: scale(1.06); }

/* otkrivanje na skrol */
.js .sr { opacity: 0; transform: translateY(12px); transition: opacity .5s ease, transform .6s var(--ease-out); }
.js .sr.in { opacity: 1; transform: none; }
.js .sf { opacity: 0; transform: translateY(16px); transition: opacity .9s ease, transform .9s var(--ease-out); }
.js .sf.in { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .cs-body { grid-template-columns: minmax(0, 1fr); }
  .cs-info { position: static; }
}
@media (max-width: 700px) {
  .w-grid { grid-template-columns: minmax(0, 1fr); row-gap: 36px; }
}
@media (max-width: 760px) {
  .p-head, .cs-name, .cs-next-row { grid-template-columns: minmax(0, 1fr); }
  .p-head-meta { text-align: left; }
  .page .foot { grid-template-columns: 1fr 1fr; row-gap: 8px; }
  .cs-top { padding-top: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  .js .sr, .js .sf { clip-path: none !important; opacity: 1 !important; transform: none !important; transition: none !important; }
}
.cs-next .big { display: block; }

/* ---------- LAB: masonry mreža eksperimenata ---------- */
.lab-tabs { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 32px; font-size: 13px; }
.lab-tab { font: inherit; letter-spacing: inherit; text-transform: inherit; color: var(--dim); background: none; border: 1px solid var(--line); padding: 8px 14px; cursor: pointer; transition: color .3s ease, background .3s ease, border-color .3s ease; }
.lab-tab:hover { color: var(--fg); border-color: var(--fg); }
.lab-tab.is-active { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.lab-tab sup { margin-left: 4px; font-size: 9px; top: 0; }
.lab-tab[hidden], .lab-item[hidden] { display: none; }
.lab-desc { margin: 0; padding-top: 24px; max-width: 560px; color: var(--dim); font-size: 15px; line-height: 1.6; }
.lab-empty { margin: 0; padding: 48px 0 24px; color: var(--dim); font-size: 13px; }
.lab-empty[hidden] { display: none; }
.lab-desc + .lab-empty + .lab-grid { padding-top: 28px; }
.lab-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 20px; align-items: start; padding-top: 40px; }
.lab-item { display: block; margin: 0 0 28px; color: inherit; text-decoration: none; }
.lab-item figure { margin: 0; }
.lab-media { position: relative; overflow: hidden; border-radius: 6px; background: #DADAD5; }
.lab-media img, .lab-ph { display: block; width: 100%; transition: transform 1s var(--ease-out); }
.lab-media img { height: auto; }
.lab-item:hover .lab-media img, .lab-item:hover .lab-ph { transform: scale(1.04); }
.lab-item figcaption { display: flex; justify-content: space-between; gap: 12px; padding-top: 10px; }
.lab-item figcaption span:last-child { color: var(--dim); }

/* privremeni placeholderi */
.lab-ph { position: relative; }
.lab-ph::after { content: 'PLACEHOLDER'; position: absolute; left: 10px; bottom: 8px; font: 10px 'Geist Mono', monospace; letter-spacing: .04em; opacity: .55; }
.ph-1 { background: radial-gradient(120% 80% at 30% 20%, #3a3a3a 0, #0d0d0d 60%), #000; color: #fff; }
.ph-2 { background: linear-gradient(135deg, #f6d1b8, #b9c6f2 45%, #e9b7c9 70%, #fff); color: #000; }
.ph-3 { background: linear-gradient(90deg, #2b2bd9 0 62%, #d24dd9 62% 100%); color: #fff; }
.ph-4 { background: radial-gradient(40% 25% at 50% 70%, #1a1a1a 0 60%, transparent 62%), #e6e6e3; color: #000; }
.ph-5 { background: repeating-linear-gradient(90deg, #9a9a9a 0 2px, transparent 2px 25%), repeating-linear-gradient(0deg, #9a9a9a 0 2px, #f2f2ee 2px 33%); color: #000; }
.ph-6 { background: #fff; color: #000; }
.ph-7 { background: repeating-linear-gradient(60deg, transparent 0 18px, #ff5a1f 18px 19px), repeating-linear-gradient(-60deg, transparent 0 18px, #ff5a1f 18px 19px), #0b1416; color: #fff; }
.ph-8 { background: linear-gradient(180deg, var(--acc), #1f6b3a); color: #000; }

@media (max-width: 1100px) { .lab-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .lab-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; padding-top: 24px; }
  .lab-tabs { font-size: 11px; padding-top: 24px; }
  .lab-tab { padding: 7px 10px; }
  .lab-item { margin-bottom: 20px; }
  .lab-item figcaption span:last-child { display: none; }
}
.ph-site, .ph-site-2 { color: #000; background-color: #f2f2ee; background-repeat: no-repeat; }
.ph-site {
  background-image: linear-gradient(#111,#111), linear-gradient(#bdbdb8,#bdbdb8), linear-gradient(#111,#111), linear-gradient(#111,#111), linear-gradient(135deg,#d9d9d4,#b9c6f2);
  background-size: 14% 2.5%, 30% 1.5%, 62% 9%, 44% 9%, 88% 42%;
  background-position: 6% 5%, 94% 5.5%, 6% 20%, 6% 31%, 50% 82%;
}
.ph-site-2 {
  background-image: linear-gradient(#111,#111), linear-gradient(#d9d9d4,#d9d9d4), linear-gradient(#d9d9d4,#d9d9d4), linear-gradient(#d9d9d4,#d9d9d4), linear-gradient(#111,#111);
  background-size: 40% 6%, 27% 36%, 27% 36%, 27% 36%, 88% 18%;
  background-position: 6% 8%, 6% 42%, 50% 42%, 94% 42%, 50% 88%;
}

/* badge na karticama sa više slika */
.lab-media { cursor: pointer; }
.lab-badge { position: absolute; top: 10px; right: 10px; z-index: 1; padding: 4px 7px; border-radius: 3px; background: var(--bg); color: var(--fg); }
.lab-item:focus-visible { outline: 1px solid var(--fg); outline-offset: 4px; }

/* ---------- LAB: lightbox ---------- */
.lab-lb {
  position: fixed; inset: 0; z-index: 90; --fg: #F2F2EE; --dim: #8A8A85; color: var(--fg); background: rgba(10,10,10,.97); display: grid; grid-template-rows: auto minmax(0,1fr);
  opacity: 0; visibility: hidden; transition: opacity .45s ease, visibility 0s linear .45s;
}
.lab-lb.open { opacity: 1; visibility: visible; transition: opacity .45s ease; }
.lab-lb-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 18px var(--pad); }
.lab-lb-count { color: var(--dim); }
.lab-lb button { font: inherit; color: var(--fg); background: none; border: 0; padding: 0; cursor: pointer; }
.lab-lb-close { justify-self: end; position: relative; }
.lab-lb-stage { position: relative; min-height: 0; padding: 0 var(--pad) 24px; }

/* slajd režim */
.lab-lb-stage > .lab-slide {
  position: absolute; inset: 0 calc(var(--pad) + 56px) 24px; display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: scale(.97); transition: opacity .5s ease, transform .7s var(--ease-out); pointer-events: none;
}
.lab-lb-stage > .lab-slide.on { opacity: 1; transform: none; pointer-events: auto; }
.lab-slide img, .lab-slide .lab-ph { max-width: 100%; max-height: 100%; border-radius: 6px; }
.lab-slide img { width: auto; height: auto; object-fit: contain; }
.lab-slide .lab-ph { height: 100%; width: auto; aspect-ratio: 4 / 3; }
.lab-lb-nav { position: absolute; top: 50%; font-size: 22px !important; width: 48px; height: 48px; transition: transform .4s var(--ease), opacity .3s ease; }
.lab-lb-prev { left: var(--pad); }
.lab-lb-next { right: var(--pad); }
.lab-lb-prev:hover { transform: translateX(-4px); }
.lab-lb-next:hover { transform: translateX(4px); }
.lab-lb.single .lab-lb-nav, .lab-lb.scroll .lab-lb-nav { display: none; }

/* scroll režim (koncept sajta) */
.lab-lb.scroll .lab-lb-stage { overflow-y: auto; overscroll-behavior: contain; }
.lab-lb.scroll .lab-scroll { max-width: 1100px; margin: 0 auto; display: grid; gap: 0; border-radius: 6px; overflow: hidden; }
.lab-scroll img { width: 100%; height: auto; display: block; }
.lab-scroll .lab-ph { width: 100%; aspect-ratio: 16 / 10; }
.lab-scroll .lab-ph::after { content: none; }
body.lb-lock { overflow: hidden; }

@media (max-width: 760px) {
  .lab-lb-stage > .lab-slide { inset: 0 var(--pad) 24px; }
  .lab-slide .lab-ph { width: 100%; height: auto; }
  .lab-lb-nav { top: auto; bottom: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .lab-lb, .lab-lb-stage > .lab-slide { transition: none !important; transform: none !important; }
}
.lab-soon { margin: 0; padding: 120px 0; text-align: center; color: var(--dim); }

