/* Base — reset, typography, accessibility primitives */

*,
*::before,
*::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; /* Anchor targets clear the sticky header */ scroll-padding-top: calc(var(--header-h) + 16px); }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-text); font-size: var(--t-body); font-weight: 400; line-height: var(--lh-body); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: hidden; /* room for the mobile tab bar so nothing hides behind it */ padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px)); }

@media (min-width: 1024px) {
body { padding-bottom: 0; }
}

/* Body scroll lock without layout jump (sheets, lightbox) */
body.is-locked { overflow: hidden; padding-right: var(--sbw, 0px); }
img,
svg,
video,
picture { display: block; max-width: 100%; }
/* <picture> is only a wrapper — without an explicit height it stays auto and an inner img:height:100% collapses, leaving a gap inside fixed-ratio frames. */
.frame__media picture, .card__media picture, .project__media picture, .svc-panel__media picture, .srow__media picture, .hero__slide picture, .shot picture, .pnav__peek picture, .lab__stage picture { display: block; width: 100%; height: 100%; }
img { height: auto; border: 0; }
h1, h2, h3, h4, h5, h6 { margin: 0; font-family: var(--font-display); font-weight: 800; line-height: var(--lh-head); letter-spacing: -0.005em; text-wrap: balance; }
h1 { font-size: var(--t-h1); }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); font-weight: 600; }
h4 { font-size: var(--t-h4); font-weight: 600; font-family: var(--font-text); letter-spacing: 0; }
p { margin: 0 0 1em; max-width: var(--measure); text-wrap: pretty; }
p:last-child { margin-bottom: 0; }
a { color: inherit; text-decoration-color: rgba(239, 212, 23, 0.5); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--gold-500); }
ul, ol { margin: 0; padding: 0; }
li { list-style: none; }
button,
input,
select,
textarea { font: inherit; color: inherit; margin: 0; }
button { background: none; border: 0; cursor: pointer; }
hr { border: 0; border-top: 1px solid var(--line-soft); margin: var(--s-8) 0; }
strong, b { font-weight: 700; }
::selection { background: var(--gold-500); color: var(--ink); }

/* --- Focus: gold ring, always visible --- */
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--gold-500); outline-offset: 3px; border-radius: var(--r-frame); }

/* --- Skip link --- */
.skip-link { position: absolute; left: 8px; top: -80px; z-index: 200; padding: 12px 20px; background: var(--gold-500); color: var(--ink); font-weight: 700; text-decoration: none; border-radius: var(--r-frame); transition: top var(--d-fast) var(--e-out); }
.skip-link:focus-visible { top: 8px; }

/* --- Screen-reader only --- */
.vh { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }

/* --- Typographic helpers --- */
.lead { font-size: clamp(1.0625rem, 1rem + 0.5vw, 1.3125rem); color: var(--text-muted); line-height: 1.55; }
.muted { color: var(--text-muted); }
.dim { color: var(--text-dim); }

/* Tabular figures for any number that could shift layout */
.tnum { font-variant-numeric: tabular-nums; }

/* Progressive enhancement gate Hidden-before-animation states apply ONLY when JS is running (html.js). Without JS everything is visible and usable. */
.js [data-anim] { opacity: 0; }
.js [data-anim="up"] { transform: translate3d(0, 28px, 0); }
.js [data-anim="fade"] { transform: none; }
.js [data-anim="scale"] { transform: scale(1.04); }
.js [data-anim].is-in { opacity: 1; transform: none; }

/* Once GSAP has taken control it sets inline styles; this is the CSS fallback used when GSAP fails to load but JS runs. */
.js [data-anim] { transition: opacity 600ms var(--e-out), transform 600ms var(--e-out); }

/* If JS is on but GSAP never loads, reveal everything after a beat. */
.js.no-gsap [data-anim] { opacity: 1 !important; transform: none !important; }

@media (prefers-reduced-motion: reduce) {
html { scroll-behavior: auto; }
.js [data-anim] { opacity: 1 !important; transform: none !important; transition: none !important; }
*,
*::before,
*::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

/* === ROUND 2 === */
/* ROOT-CAUSE FIX (round 2): the UA default `figure { margin: 18px 40px }` was
   shrinking every mosaic tile inside its grid track (298px cell -> 218px tile),
   which is what produced "small images with huge gaps". */
figure { margin: 0; }

/* One button system: same height, radius, padding and icon gap everywhere. */
.btn { min-height: 48px; padding: 12px 22px; border-radius: 2px; gap: 10px; }
.btn--lg { min-height: 52px; padding: 14px 28px; }
@media (min-width: 1024px) {
.btn { min-height: 52px; }
.btn--lg { min-height: 56px; }
}
.btn__icon { width: 18px; height: 18px; }
/* Runda 5 (4.2) — osigurac za ikonice. Ogromna ikonica telefona na mobilnom
   nastala je jer je svg u dugmetu bio bez klase i bez width/height, a nijedno
   pravilo ga nije pokrivalo. Ovo pravilo pokriva svaki svg u a / button / .btn.
   :where() ga drzi na specificnosti obicnog „svg“, pa svako pravilo komponente
   (.fab svg, .btn__icon, .lb__nav svg...) i dalje ima prednost; ovo hvata samo
   ono sto nista drugo ne odredjuje. Izuzete su ilustracije: prsten dugmeta za
   povratak na vrh, natpis u podnozju i crtezi sa role="img". */
.ico { flex: none; }
:where(a, button, .btn) svg:where(:not(.fab__ring):not(.footer__wordmark):not([role="img"])) { width: 1.25em; height: 1.25em; flex: none; }

/* Supporting text is upright — never italic grey. Colour comes from the token,
   not a hardcoded silver: these lines also run inside .on-paper CTA bands, where
   silver on #f0f0f0 measures 1.53:1. */
.lead, .pagehero__desc, .sec-head__intro { font-style: normal; color: var(--text-muted); }
/* === /ROUND 2 === */
