/* =====================================================================
   BELT CO — styles.css
   Organized: TOKENS · RESET/BASE · LAYOUT · BUTTONS · [components per task]
   ===================================================================== */

/* ---------- DESIGN TOKENS ---------- */
:root {
  /* Brand (sampled from logo) */
  --navy: #1B2A6B; --navy-900: #141F52;
  --blue: #2E6DB4; --blue-400: #6BA3D8;
  --accent: #3A4658;                 /* steel graphite — primary CTAs / accents on light */
  --accent-hover: #2C3646;           /* darker on hover/press */
  --ink: #111827; --muted: #6B7280;
  --line: #E5E9F0; --bg: #FFFFFF; --bg-soft: #F5F7FA;

  /* Fonts (system fallbacks keep offline correct) */
  --font-display: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono: "Space Mono", ui-monospace, "Cascadia Code", "Courier New", monospace;

  /* Fluid type scale */
  --fs-h1: clamp(2.5rem, 1.6rem + 4.5vw, 4.75rem);
  --fs-h2: clamp(1.75rem, 1.2rem + 2.4vw, 2.75rem);
  --fs-h3: clamp(1.15rem, 1rem + 0.7vw, 1.4rem);
  --fs-lead: clamp(1.05rem, 0.98rem + 0.5vw, 1.3rem);
  --fs-body: 1rem;
  --fs-small: 0.875rem;
  --fs-mono: 0.78rem;

  /* 8px spacing system (4px half-step) */
  --space-1: 4px; --space-2: 8px; --space-3: 16px; --space-4: 24px;
  --space-5: 32px; --space-6: 40px; --space-7: 48px; --space-8: 64px;
  --space-9: 80px; --space-10: 96px; --space-11: 120px; --space-12: 160px;

  /* Radii / layout / motion / elevation */
  --radius-sm: 4px; --radius: 6px; --radius-lg: 8px;
  --container: 1240px; --gutter: clamp(16px, 4vw, 40px);
  --dur-fast: 150ms; --dur: 280ms; --dur-slow: 600ms;
  --ease: cubic-bezier(.4, 0, .2, 1);
  --ease-signature: cubic-bezier(0.16, 1, 0.3, 1); /* one signature easing across the page */
  --shadow-sm: 0 1px 2px rgba(20, 31, 82, .06), 0 1px 3px rgba(20, 31, 82, .08);
  --shadow: 0 6px 24px rgba(20, 31, 82, .10);
  --shadow-lg: 0 24px 60px -12px rgba(20, 31, 82, .28);

  /* Technical-drawing language */
  --blueprint: rgba(46, 109, 180, .07);   /* faint blueprint grid line */
  --tick: var(--blue-400);                /* corner ticks / crosshairs */
  --grain-opacity: .05;                   /* film-grain strength (3-5%) */

  /* Real hero photos — optimized WebP with JPG fallback via image-set; PNGs kept as source */
  --hero-1: image-set(url("../assets/images/hero/beltco-1.webp") type("image/webp"), url("../assets/images/hero/beltco-1.jpg") type("image/jpeg"));
  --hero-2: image-set(url("../assets/images/hero/beltco-2.webp") type("image/webp"), url("../assets/images/hero/beltco-2.jpg") type("image/jpeg"));
  --hero-3: image-set(url("../assets/images/hero/beltco-3.webp") type("image/webp"), url("../assets/images/hero/beltco-3.jpg") type("image/jpeg"));
  /* Plain-JPG fallback for engines without image-set support */
  --hero-1-fb: url("../assets/images/hero/beltco-1.jpg");
  --hero-2-fb: url("../assets/images/hero/beltco-2.jpg");
  --hero-3-fb: url("../assets/images/hero/beltco-3.jpg");

  --header-h: 72px;
}

/* ---------- RESET / BASE ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body); font-size: var(--fs-body); line-height: 1.6;
  color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased;
}
body.no-scroll { overflow: hidden; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; }
input { font: inherit; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.1; font-weight: 800; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: var(--radius-sm); }

/* Branded selection + thin brand-tinted scrollbar */
::selection { background: var(--navy); color: #fff; }
html { scrollbar-width: thin; scrollbar-color: var(--blue-400) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--blue-400); border-radius: 999px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--blue); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: var(--space-3); top: -60px; z-index: 200;
  background: var(--navy); color: #fff; padding: var(--space-2) var(--space-3);
  border-radius: var(--radius); transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: var(--space-3); }

/* ---------- LAYOUT ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(56px, 8vw, 112px); }
.section--soft { background: var(--bg-soft); }
.section-head { max-width: 60ch; margin-bottom: var(--space-6); }
.section-eyebrow {
  font-family: var(--font-mono); font-size: var(--fs-mono); letter-spacing: .18em;
  text-transform: uppercase; color: var(--blue); margin-bottom: var(--space-2);
}
.section-title { font-size: var(--fs-h2); letter-spacing: -.02em; color: var(--navy); }

/* ---------- BUTTONS ---------- */
.btn {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; gap: var(--space-2);
  padding: 12px 22px; border-radius: var(--radius); font-weight: 600;
  font-family: var(--font-body); border: 1px solid transparent;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease),
              transform var(--dur-fast) var(--ease), box-shadow var(--dur) var(--ease),
              translate var(--dur-fast) var(--ease-signature); /* translate = magnetic offset (JS) */
}
.btn--lg { padding: 15px 28px; font-size: 1.05rem; }
/* Fill-sweep: a shade wipes across from the left on hover/focus — fast, clean, no bounce */
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--dur) var(--ease-signature);
}
.btn:hover::before, .btn:focus-visible::before { transform: scaleX(1); }
/* Hairline edge keeps the grey CTA defined on dark surfaces (hero, navy CTA band); ~invisible on light */
.btn--primary { background: var(--accent); color: #fff; border-color: rgba(255, 255, 255, .22); }
.btn--primary::before { background: var(--accent-hover); }
.btn--primary:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn--primary:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
.btn--ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .55); }
.btn--ghost::before { background: rgba(255, 255, 255, .12); }
.btn--ghost:hover { border-color: #fff; }
.btn--ghost:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

/* ---------- GLOBAL POLISH: grain · tech-drawing language ---------- */
/* Fixed film-grain overlay (inline SVG feTurbulence, non-interactive, subtle) */
.grain {
  position: fixed; inset: 0; z-index: 9998; pointer-events: none;
  opacity: var(--grain-opacity); mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='180'%20height='180'%3E%3Cfilter%20id='n'%3E%3CfeTurbulence%20type='fractalNoise'%20baseFrequency='0.85'%20numOctaves='2'%20stitchTiles='stitch'/%3E%3C/filter%3E%3Crect%20width='180'%20height='180'%20filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

/* Spec-sheet index prefixed into section eyebrows, e.g. "01 / PROIZVODNI PROGRAM" */
.section-index { color: var(--blue); font-weight: 700; }
.section-index::after { content: " / "; color: var(--blue-400); opacity: .55; }

/* Faint blueprint grid background utility (applied to select sections) */
.bp-grid {
  background-image:
    linear-gradient(var(--blueprint) 1px, transparent 1px),
    linear-gradient(90deg, var(--blueprint) 1px, transparent 1px);
  background-size: 32px 32px;
}

@media (prefers-reduced-motion: reduce) { .grain { display: none; } }

/* ---------- HEADER / NAV ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100; height: var(--header-h);
  display: flex; align-items: center;
  background: transparent; border-bottom: 1px solid transparent;
  transition: background var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
              border-color var(--dur) var(--ease);
}
.site-header.is-scrolled { background: #fff; border-bottom-color: var(--line); box-shadow: var(--shadow-sm); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); width: 100%; }
.nav-logo img { height: 40px; width: auto; }
/* Logo is dark; keep it readable on the transparent-over-hero state via a soft chip */
.site-header:not(.is-scrolled) .nav-logo img {
  background: rgba(255, 255, 255, .92); padding: 4px 8px; border-radius: var(--radius-sm);
}
.nav-menu { display: flex; align-items: center; gap: var(--space-5); }
.nav-list { display: flex; align-items: center; gap: var(--space-4); list-style: none; padding: 0; }
.nav-link {
  font-weight: 500; color: var(--navy); padding: var(--space-1) 0; position: relative;
  white-space: nowrap; /* keep multi-word links like "O nama" on one line */
  transition: color var(--dur) var(--ease);
}
.site-header:not(.is-scrolled) .nav-link { color: #fff; }
.nav-link::after {
  content: ""; position: absolute; left: 0; bottom: -4px; height: 2px; width: 0;
  background: var(--accent); transition: width var(--dur) var(--ease-signature);
}
.nav-link:hover::after, .nav-link:focus-visible::after { width: 100%; }
/* Active-section indicator: an understated accent dot under the current link (distinct from the hover underline) */
.nav-link.is-current::before {
  content: ""; position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%);
  width: 4px; height: 4px; border-radius: 50%; background: var(--accent);
}
/* Over the dark hero the grey accent would be muddy — use light azure there (desktop transparent nav only) */
@media (min-width: 901px) {
  .site-header:not(.is-scrolled) .nav-link::after,
  .site-header:not(.is-scrolled) .nav-link.is-current::before { background: var(--blue-400); }
}
.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.nav-toggle-bar { width: 24px; height: 2px; background: var(--navy); transition: background var(--dur) var(--ease); }
.site-header:not(.is-scrolled) .nav-toggle-bar { background: #fff; }
/* Tighten the desktop nav in the crowded range just above the hamburger breakpoint so nothing wraps */
@media (min-width: 901px) and (max-width: 1040px) {
  .nav-menu { gap: var(--space-4); }
  .nav-list { gap: var(--space-3); }
}

@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    position: fixed; inset: var(--header-h) 0 0 0; flex-direction: column; justify-content: flex-start;
    gap: var(--space-4); padding: var(--space-6) var(--gutter);
    background: #fff; transform: translateX(100%); transition: transform var(--dur) var(--ease);
  }
  .nav-menu.is-open { transform: translateX(0); }
  .nav-list { flex-direction: column; align-items: flex-start; gap: var(--space-4); width: 100%; }
  .nav-link { color: var(--navy); font-size: 1.25rem; }
  .site-header:not(.is-scrolled) .nav-link { color: var(--navy); } /* menu bg is white */
  .nav-cta { width: 100%; justify-content: center; }
}

/* ---------- HERO ---------- */
.hero {
  position: relative; height: 100vh; height: 100svh; min-height: 560px;
  margin-top: calc(var(--header-h) * -1); /* pull under transparent header */
  overflow: hidden; isolation: isolate;
  --px: 0; --py: 0;            /* pointer-parallax offsets set by JS */
  --hero-interval: 6s;         /* keep in sync with heroSlider INTERVAL */
}
.hero-slide {
  position: absolute; inset: 0; display: flex; align-items: center; isolation: isolate;
  opacity: 0; visibility: hidden; transition: opacity var(--dur-slow) var(--ease), visibility var(--dur-slow);
}
.hero-slide.is-active { opacity: 1; visibility: visible; }

/* Layered composition: media (Ken-Burns) < overlay < glow < grid < content */
.hero-media {
  position: absolute; inset: -30px; z-index: -4;
  background-image: var(--slide-img-fb);  /* JPG fallback (no image-set) */
  background-image: var(--slide-img);      /* WebP/JPG via image-set (overrides when supported) */
  background-size: cover; background-position: center;
  translate: calc(var(--px) * 16px) calc(var(--py) * 16px);
  transition: translate 500ms var(--ease-signature);
}
.hero-slide.is-active .hero-media { animation: kenburns 14s ease-out forwards; }
.hero-overlay {
  position: absolute; inset: 0; z-index: -3;
  background: linear-gradient(90deg, rgba(10, 14, 36, .88) 0%, rgba(10, 14, 36, .58) 45%, rgba(10, 14, 36, .28) 100%);
}
.hero-glow {
  position: absolute; inset: -60px; z-index: -2; pointer-events: none;
  background: radial-gradient(42% 55% at 32% 42%, rgba(46, 109, 180, .45), transparent 70%);
  background-size: 170% 170%;
  translate: calc(var(--px) * -26px) calc(var(--py) * -26px);
  transition: translate 500ms var(--ease-signature);
  animation: heroGlowDrift 22s ease-in-out infinite;
}
.hero-grid {
  position: absolute; inset: -60px; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(107, 163, 216, .08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(107, 163, 216, .08) 1px, transparent 1px);
  background-size: 56px 56px;
  translate: calc(var(--px) * 30px) calc(var(--py) * 30px);
  transition: translate 500ms var(--ease-signature);
  animation: heroGridDrift 60s linear infinite;
  -webkit-mask-image: radial-gradient(circle at 62% 42%, #000 30%, transparent 78%);
          mask-image: radial-gradient(circle at 62% 42%, #000 30%, transparent 78%);
}
.hero-content {
  padding-top: var(--header-h); max-width: 780px; color: #fff;
  translate: calc(var(--px) * 9px) calc(var(--py) * 9px);
  transition: translate 500ms var(--ease-signature);
}
.hero-eyebrow {
  font-family: var(--font-mono); font-size: var(--fs-mono); letter-spacing: .2em;
  text-transform: uppercase; color: var(--blue-400); margin-bottom: var(--space-3);
}
.hero-title { font-size: var(--fs-h1); letter-spacing: -.03em; margin-bottom: var(--space-3); }
.hero-lead { font-size: var(--fs-lead); color: rgba(255, 255, 255, .9); max-width: 52ch; margin-bottom: var(--space-5); }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }

/* Kinetic headline: words rise from behind a per-word mask (JS drives WAAPI) */
.kin-mask { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .12em; margin-bottom: -.12em; }
.kin-word { display: inline-block; will-change: transform; }

/* Autoplay progress bar (synced to the 6s timer; pauses via .is-playing toggle) */
.hero-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: rgba(255, 255, 255, .14); z-index: 3; }
.hero-progress-fill {
  display: block; height: 100%; width: 100%; transform-origin: left; transform: scaleX(0); background: var(--blue-400);
  animation: heroProgress var(--hero-interval, 6s) linear forwards; animation-play-state: paused;
}
.hero.is-playing .hero-progress-fill { animation-play-state: running; }

.hero-controls {
  position: absolute; left: 0; right: 0; bottom: var(--space-5); z-index: 3;
  display: flex; align-items: center; justify-content: center; gap: var(--space-4);
}
.hero-arrow {
  width: 44px; height: 44px; border-radius: 50%; font-size: 1.5rem; line-height: 1; color: #fff;
  border: 1px solid rgba(255, 255, 255, .5); transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.hero-arrow:hover { background: rgba(255, 255, 255, .15); border-color: #fff; }
.hero-dots { display: flex; gap: var(--space-2); }
.hero-dot {
  width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, .4);
  transition: background var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.hero-dot.is-active { background: var(--blue-400); transform: scale(1.25); }
.hero-counter { font-family: var(--font-mono); font-size: var(--fs-small); color: rgba(255, 255, 255, .6); letter-spacing: .1em; }
.hero-counter-cur { color: #fff; font-weight: 700; }
/* On small screens drop the counter + tighten the gap so controls stay centered clear of the fixed AI launcher */
@media (max-width: 640px) { .hero-counter { display: none; } .hero-controls { gap: var(--space-2); } }

/* Subtle scroll-down cue, bottom-right so it clears the left-aligned content + centered controls (desktop only) */
.hero-scrollcue {
  position: absolute; right: var(--gutter); left: auto; translate: none; bottom: var(--space-6); z-index: 3;
  display: none; flex-direction: column; align-items: center; gap: var(--space-2);
  font-family: var(--font-mono); font-size: var(--fs-mono); letter-spacing: .2em; text-transform: uppercase; color: rgba(255, 255, 255, .55);
  transition: color var(--dur) var(--ease);
}
.hero-scrollcue:hover { color: #fff; }
@media (min-width: 900px) { .hero-scrollcue { display: inline-flex; } }
.hero-scrollcue-line { width: 1px; height: 40px; background: linear-gradient(rgba(255, 255, 255, .5), transparent); position: relative; overflow: hidden; }
.hero-scrollcue-line::after {
  content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 40%;
  background: #fff; animation: scrollcue 1.8s var(--ease-signature) infinite;
}

@keyframes kenburns { from { scale: 1; } to { scale: 1.08; } }
@keyframes heroGlowDrift { 0%, 100% { background-position: 0% 0%; } 50% { background-position: 100% 65%; } }
@keyframes heroGridDrift { from { background-position: 0 0, 0 0; } to { background-position: 96px 96px, 96px 96px; } }
@keyframes heroProgress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes scrollcue { 0% { transform: translateY(-100%); } 100% { transform: translateY(250%); } }

@media (prefers-reduced-motion: reduce) {
  .hero-slide { transition: none; }
  .hero-slide.is-active .hero-media { animation: none; }
  .hero-media, .hero-glow, .hero-grid, .hero-content { translate: none; transition: none; }
  .hero-glow, .hero-grid { animation: none; }
  .hero-progress { display: none; }
  .hero-scrollcue-line::after { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- STATS (data panel) ---------- */
.stats { padding-block: clamp(32px, 5vw, 56px); border-block: 1px solid var(--line); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-5); }
.stat {
  display: flex; flex-direction: column; gap: var(--space-2); text-align: left;
  padding-left: var(--space-5); border-left: 1px solid var(--line); /* hairline divider between figures */
}
.stat:first-child { border-left-color: transparent; } /* dividers sit BETWEEN figures, not at the panel edge */
.stat-num {
  font-family: var(--font-mono); font-weight: 700; font-size: clamp(1.9rem, 1.2rem + 2.4vw, 3rem);
  color: var(--navy); letter-spacing: -.02em; line-height: 1;
  font-variant-numeric: tabular-nums; /* figures don't jitter while counting */
}
.stat-label {
  font-family: var(--font-mono); font-size: var(--fs-mono); letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted);
}
@media (max-width: 768px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-6) var(--space-5); }
  .stat:nth-child(odd) { border-left-color: transparent; } /* left column of the 2-col panel has no leading rule */
}

/* ---------- CARDS (product categories) ---------- */
/* --hl drives a pointer-following highlight; registered so it can fade smoothly */
@property --hl { syntax: "<number>"; inherits: false; initial-value: 0; }
.cards {
  list-style: none; padding: 0; display: grid; gap: var(--space-4);
  grid-template-columns: repeat(3, 1fr);
  counter-reset: card; /* powers the mono spec index 01–06 */
}
.card {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: var(--space-2);
  padding: var(--space-5); border: 1px solid var(--line); border-radius: var(--radius-lg);
  background-color: #fff;
  /* quiet directional highlight — invisible until JS raises --hl on pointer enter */
  background-image: radial-gradient(200px circle at var(--mx, 50%) var(--my, 50%),
                                    rgb(46 109 180 / calc(.10 * var(--hl))), transparent 62%);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
              border-color var(--dur) var(--ease), --hl var(--dur) var(--ease);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--blue-400); }
/* Mono spec index, top-right, like a drawing part number */
.card::before {
  counter-increment: card; content: counter(card, decimal-leading-zero);
  position: absolute; top: var(--space-3); right: var(--space-4);
  font-family: var(--font-mono); font-size: var(--fs-mono); letter-spacing: .12em;
  color: var(--blue-400); opacity: .55;
  transition: color var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.card:hover::before { color: var(--accent); opacity: 1; }
/* Four L-shaped corner ticks, inset like registration marks on a spec sheet */
.card::after {
  content: ""; position: absolute; inset: 10px; pointer-events: none; opacity: .26;
  background:
    linear-gradient(var(--tick), var(--tick)) left top / 7px 1px no-repeat,
    linear-gradient(var(--tick), var(--tick)) left top / 1px 7px no-repeat,
    linear-gradient(var(--tick), var(--tick)) right top / 7px 1px no-repeat,
    linear-gradient(var(--tick), var(--tick)) right top / 1px 7px no-repeat,
    linear-gradient(var(--tick), var(--tick)) left bottom / 7px 1px no-repeat,
    linear-gradient(var(--tick), var(--tick)) left bottom / 1px 7px no-repeat,
    linear-gradient(var(--tick), var(--tick)) right bottom / 7px 1px no-repeat,
    linear-gradient(var(--tick), var(--tick)) right bottom / 1px 7px no-repeat;
  transition: opacity var(--dur) var(--ease);
}
.card:hover::after { opacity: .55; }
.card-icon {
  display: inline-flex; width: 44px; height: 44px; color: var(--blue);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 9px;
}
.card-icon svg { width: 100%; height: 100%; }
/* Icon draw-in: strokes redraw quickly on hover (dash fully covers the short paths at rest) */
.card-icon svg :is(path, circle, rect, line) { stroke-dasharray: 100; stroke-dashoffset: 0; }
.card:hover .card-icon svg :is(path, circle, rect, line) { animation: iconDraw .6s var(--ease-signature); }
@keyframes iconDraw { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }
.card-title { font-size: var(--fs-h3); color: var(--navy); }
.card-desc { color: var(--muted); font-size: var(--fs-small); flex: 1; }
.card-link {
  font-weight: 600; color: var(--navy); position: relative; width: fit-content;
  transition: color var(--dur) var(--ease);
}
.card-link::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0;
  background: var(--accent); transition: width var(--dur) var(--ease-signature);
}
.card:hover .card-link { color: var(--accent); }
.card:hover .card-link::after, .card-link:focus-visible::after { width: 100%; }
@media (max-width: 1024px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .cards { grid-template-columns: 1fr; } }

/* ---------- BRANDS (seamless infinite marquee; static wrapped row without JS) ---------- */
.brands { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-3); }
.brand-chip {
  font-family: var(--font-mono); font-size: var(--fs-small); letter-spacing: .04em;
  padding: 12px 22px; border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; color: var(--muted); filter: grayscale(1);
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease),
              filter var(--dur) var(--ease), transform var(--dur-fast) var(--ease);
}
.brand-chip:hover { color: var(--navy); border-color: var(--blue-400); filter: grayscale(0); transform: translateY(-2px); }

/* Marquee is opt-in via JS (.is-marquee). JS clones the set enough times to overfill the
   viewport and sets --marquee-shift = one set width, so the loop is always seamless. */
.marquee.is-marquee { overflow: hidden; -webkit-mask-image: var(--edge-fade); mask-image: var(--edge-fade); }
.marquee { --edge-fade: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); }
.marquee.is-marquee .marquee-track {
  flex-wrap: nowrap; gap: 0; width: max-content;
  animation: marquee var(--marquee-dur, 30s) linear infinite; will-change: transform;
}
.marquee.is-marquee .brand-chip { flex: 0 0 auto; margin-right: var(--space-3); }
.marquee.is-marquee:hover .marquee-track,
.marquee.is-marquee:focus-within .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(calc(var(--marquee-shift, 50%) * -1)); } }
@media (prefers-reduced-motion: reduce) { .marquee.is-marquee .marquee-track { animation: none; } }

/* ---------- VALUES ---------- */
.values { list-style: none; padding: 0; display: grid; gap: var(--space-5); grid-template-columns: repeat(4, 1fr); }
.value { display: flex; flex-direction: column; gap: var(--space-2); }
.value-icon {
  display: inline-flex; width: 48px; height: 48px; color: var(--blue); padding: 10px;
  border: 1px solid var(--line); border-radius: var(--radius);
}
.value-icon svg :is(path, circle, rect, line) { stroke-dasharray: 100; stroke-dashoffset: 0; }
.value:hover .value-icon svg :is(path, circle, rect, line) { animation: iconDraw .6s var(--ease-signature); }
.value-title { font-size: var(--fs-h3); color: var(--navy); }
.value-text { color: var(--muted); font-size: var(--fs-small); }
@media (max-width: 900px) { .values { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .values { grid-template-columns: 1fr; } }

/* ---------- INDUSTRIES ---------- */
.industries-lead { color: var(--muted); font-size: var(--fs-lead); }
.industries-tags { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-2); }
.industry-tag {
  padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px;
  background: #fff; font-size: var(--fs-small); color: var(--navy);
}

/* ---------- PROCESS TIMELINE ---------- */
.timeline {
  position: relative; list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-4);
}
.tl-step {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--space-2);
}
.tl-num {
  display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: var(--space-2);
  font-family: var(--font-mono); font-weight: 700; font-size: var(--fs-small); color: var(--navy);
  background: var(--bg); border: 1px solid var(--line); border-radius: 50%;
}
.tl-title { font-size: var(--fs-h3); color: var(--navy); }
.tl-text { color: var(--muted); font-size: var(--fs-small); max-width: 26ch; }

/* Connector line — positioned by JS to the node centers; draws in via stroke-dashoffset */
.tl-line { position: absolute; z-index: 0; overflow: visible; }
.tl-line--h { height: 2px; }
.tl-line--v { display: none; width: 2px; }
.tl-line line {
  stroke: var(--blue-400); stroke-width: 2; stroke-linecap: round;
  stroke-dasharray: 1; stroke-dashoffset: 1; /* pathLength=1 → normalized draw */
  transition: stroke-dashoffset var(--dur-slow) var(--ease-signature);
}
.timeline.is-drawn .tl-line line { stroke-dashoffset: 0; }

@media (max-width: 720px) {
  .timeline { grid-template-columns: 1fr; gap: var(--space-6); }
  .tl-line--h { display: none; }
  .tl-line--v { display: block; }
}
@media (prefers-reduced-motion: reduce) {
  .tl-line line { transition: none; stroke-dashoffset: 0; } /* shown fully drawn */
}

/* ---------- CTA BAND ---------- */
.cta-band { background: var(--navy); color: #fff; padding-block: clamp(48px, 7vw, 88px); }
.cta-inner { text-align: center; display: flex; flex-direction: column; align-items: center; gap: var(--space-3); }
.cta-title { font-size: var(--fs-h2); letter-spacing: -.02em; }
.cta-text { color: rgba(255, 255, 255, .85); font-size: var(--fs-lead); }
.cta-inner .btn { margin-top: var(--space-2); }

/* ---------- FOOTER ---------- */
.site-footer { background: var(--navy-900); color: rgba(255, 255, 255, .8); }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: var(--space-6);
  padding-block: var(--space-9) var(--space-7);
}
.footer-logo { display: inline-block; background: #fff; padding: 8px 12px; border-radius: var(--radius); }
.footer-logo img { height: 36px; width: auto; }
.footer-tagline { margin-top: var(--space-3); font-size: var(--fs-small); max-width: 34ch; }
.footer-heading {
  font-family: var(--font-mono); font-size: var(--fs-mono); letter-spacing: .16em;
  text-transform: uppercase; color: var(--blue-400); margin-bottom: var(--space-3);
}
.footer-col ul { list-style: none; padding: 0; display: grid; gap: var(--space-2); }
.footer-col a {
  position: relative; display: inline-block; color: rgba(255, 255, 255, .8);
  transition: color var(--dur) var(--ease);
}
/* Reveal-underline: a hairline wipes in from the left — matches the nav-link signature */
.footer-col a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 1px; width: 0;
  background: var(--blue-400); transition: width var(--dur) var(--ease-signature);
}
.footer-col a:hover, .footer-col a:focus-visible { color: #fff; }
.footer-col a:hover::after, .footer-col a:focus-visible::after { width: 100%; }
.footer-contact address { font-style: normal; line-height: 1.9; font-size: var(--fs-small); }
.footer-social { display: flex; gap: var(--space-2); margin-top: var(--space-3); }
.footer-social a {
  display: inline-flex; width: 40px; height: 40px; padding: 9px; border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, .2); color: #fff; transition: background var(--dur) var(--ease);
}
.footer-social a:hover { background: rgba(255, 255, 255, .12); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .12); }
.footer-bottom-inner {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-2);
  padding-block: var(--space-4); font-size: var(--fs-small);
}
.footer-fineprint { color: rgba(255, 255, 255, .5); }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
/* Reserve bottom space so the fixed floating buttons never overlap footer content on small screens */
@media (max-width: 640px) { .footer-bottom-inner { padding-bottom: 96px; } }

/* ---------- AI ASSISTANT (fixed bottom-left) ---------- */
.assistant { position: fixed; left: var(--space-4); bottom: var(--space-4); z-index: 120; }
.assistant-launcher {
  display: inline-flex; align-items: center; gap: var(--space-2); height: 52px; padding: 0 20px 0 16px;
  border-radius: 999px; background: var(--blue); color: #fff; font-weight: 600; box-shadow: var(--shadow);
  transition: background var(--dur) var(--ease), transform var(--dur-fast) var(--ease);
}
.assistant-launcher:hover { background: var(--navy); transform: translateY(-2px); }
.assistant-launcher svg { width: 22px; height: 22px; }
.assistant-launcher-label { font-size: var(--fs-small); letter-spacing: .06em; }

.assistant-panel {
  position: absolute; left: 0; bottom: 64px; width: min(360px, calc(100vw - 32px));
  display: flex; flex-direction: column; max-height: min(70vh, 560px);
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(8px) scale(.98); transform-origin: bottom left;
  /* visibility switches AFTER the fade when closing (stays visible during the animation) */
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility 0s var(--dur);
}
/* …but becomes visible IMMEDIATELY on open so focus can move into the dialog synchronously */
.assistant-panel.is-open {
  opacity: 1; visibility: visible; transform: translateY(0) scale(1);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility 0s 0s;
}
.assistant-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-3) var(--space-4); background: var(--navy); color: #fff;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.assistant-title { font-size: 0.95rem; font-family: var(--font-display); }
.assistant-close { color: #fff; font-size: 1rem; width: 32px; height: 32px; border-radius: var(--radius-sm); }
.assistant-close:hover { background: rgba(255, 255, 255, .15); }
.assistant-thread {
  list-style: none; margin: 0; padding: var(--space-4); display: flex; flex-direction: column;
  gap: var(--space-2); overflow-y: auto; flex: 1;
}
.bubble { max-width: 85%; padding: 10px 14px; border-radius: var(--radius-lg); font-size: var(--fs-small); line-height: 1.5; }
.bubble--bot {
  background: var(--bg-soft); color: var(--ink); border: 1px solid var(--line); align-self: flex-start;
  border-bottom-left-radius: var(--radius-sm);
}
.bubble--user { background: var(--navy); color: #fff; align-self: flex-end; border-bottom-right-radius: var(--radius-sm); }
.bubble-link { display: inline-block; margin-top: var(--space-1); font-weight: 700; color: var(--accent); }
.bubble-link:hover, .bubble-link:focus-visible { text-decoration: underline; }
.assistant-chips { display: flex; flex-wrap: wrap; gap: var(--space-2); padding: 0 var(--space-4) var(--space-3); }
.assistant-chip {
  font-size: var(--fs-small); padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px;
  color: var(--navy); background: #fff; text-align: left;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.assistant-chip:hover { border-color: var(--blue-400); background: var(--bg-soft); }
.assistant-form { display: flex; gap: var(--space-2); padding: var(--space-3) var(--space-4); border-top: 1px solid var(--line); }
.assistant-input { flex: 1; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); }
.assistant-input:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.assistant-send {
  display: inline-flex; width: 42px; height: 42px; padding: 10px; color: #fff; background: var(--blue);
  border-radius: var(--radius); transition: background var(--dur) var(--ease);
}
.assistant-send:hover { background: var(--navy); }
@media (max-width: 400px) { .assistant-launcher-label { display: none; } .assistant-launcher { padding: 0 14px; } }

/* ---------- BACK TO TOP (fixed bottom-right) ---------- */
.back-to-top {
  position: fixed; right: var(--space-4); bottom: var(--space-4); z-index: 120;
  width: 52px; height: 52px; padding: 14px; border-radius: 50%;
  background: var(--navy); color: #fff; box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease),
              visibility var(--dur), background var(--dur) var(--ease);
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--blue); }

/* ---------- REVEAL ON SCROLL (staggered clip-path wipe) ---------- */
/* Only hide when JS is available to reveal it (see the no-js/js flag in <head>) */
/* Reveal via opacity + transform only. A clip-path hidden state (inset(100%)) clips the
   element to zero area, which pins its IntersectionObserver ratio at 0 — the observer can
   then never detect it entering the viewport, so is-revealed is never added and the content
   stays hidden forever. Opacity/transform keep the element geometrically observable. */
.js [data-reveal] {
  opacity: 0; transform: translateY(16px);
  transition: opacity var(--dur-slow) var(--ease-signature),
              transform var(--dur-slow) var(--ease-signature);
  transition-delay: calc(var(--reveal-i, 0) * 55ms); /* per-parent stagger set by JS */
}
.js [data-reveal].is-revealed { opacity: 1; transform: none; }
.js [data-reveal].reveal-done { transform: none; } /* JS settle() hook; nothing left to unclip */

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 1; transform: none; clip-path: none; transition: none; }
  .back-to-top, .assistant-panel, .btn, .card, .brand-chip { transition: none; }
  .btn::before, .card-link::after, .nav-link::after, .footer-col a::after,
  .card::before, .card::after { transition: none; }
  .card:hover .card-icon svg :is(path, circle, rect, line),
  .value:hover .value-icon svg :is(path, circle, rect, line) { animation: none; }
}

/* ---------- INTRO LOADER (JS + motion only; never shown without JS or under reduced-motion) ---------- */
.loader { display: none; }
.js .loader {
  display: grid; place-items: center; position: fixed; inset: 0; z-index: 10000;
  background: var(--navy-900); color: #fff;
  transition: transform var(--dur-slow) var(--ease-signature);
}
.loader.is-lifting { transform: translateY(-100%); }
.loader.is-done { display: none; }
.loader-inner { display: flex; flex-direction: column; align-items: center; gap: var(--space-4); padding: var(--gutter); }
.loader-mark { display: flex; flex-direction: column; gap: 7px; width: 132px; }
.loader-bar { height: 9px; border-radius: 999px; width: 0; }
.loader-bar--1 { background: var(--blue-400); }
.loader-bar--2 { background: var(--blue); }
.loader-count { font-family: var(--font-mono); font-weight: 700; font-size: clamp(2.4rem, 6vw, 3.4rem); letter-spacing: -.03em; line-height: 1; }
.loader-pct { color: var(--blue-400); font-size: .5em; margin-left: 3px; }
.loader-label { font-family: var(--font-mono); font-size: var(--fs-mono); letter-spacing: .22em; text-transform: uppercase; color: rgba(255, 255, 255, .5); }
@media (prefers-reduced-motion: reduce) { .loader { display: none !important; } }

/* =====================================================================
   SUBPAGES — Proizvodi (listing) + Proizvod (detail)
   Reuse tokens + spec-sheet language; shared navbar/footer/widgets.
   ===================================================================== */

/* ---------- COMPACT HERO HEADER ---------- */
.subhero {
  position: relative; margin-top: calc(var(--header-h) * -1);
  min-height: clamp(320px, 50vh, 460px); display: flex; align-items: flex-end;
  overflow: hidden; isolation: isolate; color: #fff;
}
.subhero-bg {
  position: absolute; inset: 0; z-index: -2;
  background-image: var(--slide-img-fb); background-image: var(--slide-img);
  background-size: cover; background-position: center;
}
.subhero-overlay {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(10, 14, 36, .82) 0%, rgba(10, 14, 36, .55) 50%, rgba(10, 14, 36, .86) 100%);
}
.subhero-inner {
  padding-top: calc(var(--header-h) + var(--space-7)); padding-bottom: var(--space-8);
  max-width: 820px;
}
.subhero-eyebrow {
  font-family: var(--font-mono); font-size: var(--fs-mono); letter-spacing: .2em;
  text-transform: uppercase; color: var(--blue-400); margin-bottom: var(--space-3);
}
.subhero-title { font-size: var(--fs-h1); letter-spacing: -.03em; margin-bottom: var(--space-3); }
.subhero-lead { font-size: var(--fs-lead); color: rgba(255, 255, 255, .9); max-width: 56ch; }
/* Product-detail hero: the product name (.pd-title) reads white over the photo */
.subhero .pd-title { color: #fff; }

/* ---------- BREADCRUMB ---------- */
.crumbs {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5em; margin-bottom: var(--space-4);
  font-family: var(--font-mono); font-size: var(--fs-mono); letter-spacing: .06em; color: rgba(255, 255, 255, .72);
}
.crumbs a { color: rgba(255, 255, 255, .72); transition: color var(--dur) var(--ease); }
.crumbs a:hover, .crumbs a:focus-visible { color: #fff; }
.crumbs [aria-current] { color: #fff; }
.crumb-sep { opacity: .45; }

/* ---------- FILTER BAR ---------- */
.filter-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3);
  margin-bottom: var(--space-8); padding-bottom: var(--space-4); border-bottom: 1px solid var(--line);
}
.filter-chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.filter-chip {
  font-family: var(--font-mono); font-size: var(--fs-small); letter-spacing: .02em;
  padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--muted);
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.filter-chip:hover { color: var(--navy); border-color: var(--blue-400); }
.filter-chip.is-active { background: var(--navy); border-color: var(--navy); color: #fff; }
.filter-chip:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.filter-search-wrap { margin-left: auto; position: relative; display: flex; align-items: center; }
.filter-search {
  width: min(280px, 62vw); padding: 10px 12px 10px 36px; border: 1px solid var(--line); border-radius: var(--radius);
  font-size: var(--fs-small); background: #fff no-repeat 11px center / 16px;
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%236B7280'%20stroke-width='2'%3E%3Ccircle%20cx='11'%20cy='11'%20r='7'/%3E%3Cpath%20d='M21%2021l-4-4'/%3E%3C/svg%3E");
}
.filter-search:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
@media (max-width: 560px) { .filter-search-wrap { margin-left: 0; width: 100%; } .filter-search { width: 100%; } }

/* ---------- CATEGORY BLOCKS ---------- */
.catblock { margin-bottom: var(--space-9); }
.catblock[hidden] { display: none; }
.catblock-head {
  display: flex; align-items: baseline; gap: var(--space-3);
  padding-bottom: var(--space-3); border-bottom: 1px solid var(--line); margin-bottom: var(--space-5);
}
.catblock-index { font-family: var(--font-mono); font-weight: 700; font-size: var(--fs-small); color: var(--blue); }
.catblock-title { font-size: var(--fs-h2); letter-spacing: -.02em; color: var(--navy); }

/* ---------- PRODUCT CARDS (drawing cells with a photo) ---------- */
.pcards, .pd-related {
  list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-4);
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 900px) { .pcards, .pd-related { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .pcards, .pd-related { grid-template-columns: 1fr; } }
.pcard {
  position: relative; overflow: hidden; display: flex; flex-direction: column; color: inherit;
  border: 1px solid var(--line); border-radius: var(--radius-lg); background-color: #fff;
  background-image: radial-gradient(200px circle at var(--mx, 50%) var(--my, 50%),
                                    rgb(46 109 180 / calc(.10 * var(--hl))), transparent 62%);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
              border-color var(--dur) var(--ease), --hl var(--dur) var(--ease);
}
.pcard:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--blue-400); }
.pcard:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
/* corner ticks like a spec cell */
.pcard::after {
  content: ""; position: absolute; inset: 8px; pointer-events: none; opacity: .22; z-index: 2;
  background:
    linear-gradient(var(--tick), var(--tick)) left top / 7px 1px no-repeat,
    linear-gradient(var(--tick), var(--tick)) left top / 1px 7px no-repeat,
    linear-gradient(var(--tick), var(--tick)) right top / 7px 1px no-repeat,
    linear-gradient(var(--tick), var(--tick)) right top / 1px 7px no-repeat,
    linear-gradient(var(--tick), var(--tick)) left bottom / 7px 1px no-repeat,
    linear-gradient(var(--tick), var(--tick)) left bottom / 1px 7px no-repeat,
    linear-gradient(var(--tick), var(--tick)) right bottom / 7px 1px no-repeat,
    linear-gradient(var(--tick), var(--tick)) right bottom / 1px 7px no-repeat;
  transition: opacity var(--dur) var(--ease);
}
.pcard:hover::after { opacity: .5; }
.pcard-media { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.pcard-media img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-slow) var(--ease-signature); }
.pcard:hover .pcard-media img { transform: scale(1.04); }
.pcard-body { display: flex; flex-direction: column; gap: var(--space-1); padding: var(--space-4); flex: 1; }
.pcard-title { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-h3); color: var(--navy); }
.pcard-desc { color: var(--muted); font-size: var(--fs-small); flex: 1; }
.pcard-cta { margin-top: var(--space-2); font-weight: 600; font-size: var(--fs-small); color: var(--accent); }
@keyframes pcardEnter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.pcard--enter { animation: pcardEnter 260ms var(--ease-signature); }

/* ---------- PRODUCT DETAIL ---------- */
.pd { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-7); align-items: start; }
@media (max-width: 800px) { .pd { grid-template-columns: 1fr; gap: var(--space-6); } }
.pd-media {
  position: relative; border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden; background: var(--bg-soft);
}
.pd-media img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.pd-media::after { /* spec-frame corner ticks */
  content: ""; position: absolute; inset: 10px; pointer-events: none; opacity: .3;
  background:
    linear-gradient(var(--tick), var(--tick)) left top / 9px 1px no-repeat,
    linear-gradient(var(--tick), var(--tick)) left top / 1px 9px no-repeat,
    linear-gradient(var(--tick), var(--tick)) right top / 9px 1px no-repeat,
    linear-gradient(var(--tick), var(--tick)) right top / 1px 9px no-repeat,
    linear-gradient(var(--tick), var(--tick)) left bottom / 9px 1px no-repeat,
    linear-gradient(var(--tick), var(--tick)) left bottom / 1px 9px no-repeat,
    linear-gradient(var(--tick), var(--tick)) right bottom / 9px 1px no-repeat,
    linear-gradient(var(--tick), var(--tick)) right bottom / 1px 9px no-repeat;
}
.pd-cat {
  display: inline-block; font-family: var(--font-mono); font-size: var(--fs-mono);
  text-transform: uppercase; letter-spacing: .12em; color: var(--blue);
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; margin-bottom: var(--space-3);
}
.pd-title { font-size: clamp(2rem, 1.4rem + 2.6vw, 3rem); letter-spacing: -.02em; color: var(--navy); }
.pd-desc { color: var(--muted); font-size: var(--fs-lead); margin-block: var(--space-3) var(--space-5); max-width: 46ch; }
.pd-note {
  font-size: var(--fs-small); color: var(--navy); background: var(--bg-soft);
  border-left: 3px solid var(--blue-400); padding: var(--space-2) var(--space-3); margin-bottom: var(--space-5);
}
.spec-wrap { margin-bottom: var(--space-6); }
.spec-caption {
  font-family: var(--font-mono); font-size: var(--fs-mono); text-transform: uppercase;
  letter-spacing: .14em; color: var(--muted); margin-bottom: var(--space-2);
}
.spec-table { width: 100%; border-collapse: collapse; font-family: var(--font-mono); font-size: var(--fs-small); }
.spec-table th, .spec-table td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); }
.spec-table th { font-weight: 400; color: var(--muted); width: 46%; }
.spec-table td { color: var(--navy); }
.spec-table tr:first-child th, .spec-table tr:first-child td { border-top: 1px solid var(--line); }
.spec-note { font-size: var(--fs-mono); color: var(--muted); margin-top: var(--space-2); }
.pd-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.related-section { margin-top: var(--space-10); }
.related-section[hidden] { display: none; }
.related-head { margin-bottom: var(--space-5); padding-bottom: var(--space-3); border-bottom: 1px solid var(--line); }
.related-title { font-size: var(--fs-h3); color: var(--navy); }

/* ---------- CATALOG GROUPS (proizvodi.html: Remenje → Klinasto / Zupčasto → subcategories) ---------- */
.catgroup { margin-bottom: var(--space-8); scroll-margin-top: calc(var(--header-h) + var(--space-4)); }
.catgroup[hidden], .subgroup[hidden] { display: none; }
.catgroup-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--space-2) var(--space-3); margin-bottom: var(--space-3); }
.catgroup-index, .subgroup-index { font-family: var(--font-mono); font-weight: 700; font-size: var(--fs-mono); letter-spacing: .08em; color: var(--blue); }
.catgroup-title { font-size: var(--fs-h3); letter-spacing: -.01em; color: var(--navy); }
.catgroup-intro { color: var(--muted); max-width: 72ch; margin-bottom: var(--space-5); }
.brand-badge, .pcard-brand {
  display: inline-block; font-family: var(--font-mono); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--navy); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; background: var(--bg-soft);
}
.pcard-brand { align-self: flex-start; margin-bottom: var(--space-1); }
.subgroup { margin-bottom: var(--space-6); }
.subgroup-head {
  display: grid; grid-template-columns: auto 1fr; gap: var(--space-1) var(--space-3); align-items: baseline;
  padding-top: var(--space-3); border-top: 1px solid var(--line); margin-bottom: var(--space-4);
}
.subgroup-title { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; color: var(--navy); }
.subgroup-en { font-family: var(--font-mono); font-weight: 400; font-size: var(--fs-mono); color: var(--muted); letter-spacing: .04em; }
.subgroup-desc { grid-column: 2; color: var(--muted); font-size: var(--fs-small); max-width: 80ch; }
@media (max-width: 560px) { .subgroup-head { grid-template-columns: 1fr; } .subgroup-desc { grid-column: 1; } }
/* supplier product photos are cut-outs on white: show the whole belt instead of cropping */
.pcard-media--contain { background: #fff; }
.pcard-media--contain img { object-fit: contain; padding: var(--space-3); }

/* ---------- SUPPLIER SPEC SHEET (proizvod.html: imported Megadyne products) ---------- */
.pd-media--contain { background: #fff; }
.pd-media--contain img { object-fit: contain; padding: var(--space-4); }
.pd-sections { margin-top: var(--space-9); display: grid; gap: var(--space-8); }
.pd-sections[hidden], .pd-source[hidden] { display: none; }
.pd-sec { display: grid; grid-template-columns: minmax(180px, 1fr) 3fr; gap: var(--space-3) var(--space-7); padding-top: var(--space-4); border-top: 1px solid var(--line); scroll-margin-top: calc(var(--header-h) + var(--space-4)); }
@media (max-width: 800px) { .pd-sec { grid-template-columns: 1fr; } }
.pd-sec-head { display: flex; flex-direction: column; gap: var(--space-1); }
.pd-sec-index { font-family: var(--font-mono); font-weight: 700; font-size: var(--fs-mono); letter-spacing: .14em; color: var(--blue); }
.pd-sec-title { font-size: var(--fs-h3); color: var(--navy); letter-spacing: -.01em; }
.pd-sec-body { min-width: 0; color: var(--ink); }
.pd-sec-body > p + p, .pd-sec-body > p + .pd-sec-sub { margin-top: var(--space-3); }
.pd-sec-sub {
  font-family: var(--font-mono); font-size: var(--fs-mono); font-weight: 400; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); margin-bottom: var(--space-2);
}
.pd-list { list-style: none; padding: 0; margin: 0; }
.pd-list li { position: relative; padding: 10px 0 10px 22px; border-bottom: 1px solid var(--line); }
.pd-list li:first-child { border-top: 1px solid var(--line); }
.pd-list li::before { content: ""; position: absolute; left: 4px; top: 1.15em; width: 8px; height: 1px; background: var(--blue-400); }
.pd-components { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--space-4); }
.pd-component { position: relative; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-4); background: #fff; }
.pd-component img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; margin-bottom: var(--space-3); }
.pd-component-index { display: block; font-family: var(--font-mono); font-size: var(--fs-mono); letter-spacing: .12em; color: var(--blue); margin-bottom: var(--space-2); }
.pd-component p { font-size: var(--fs-small); color: var(--muted); }
.pd-component .pd-list li { font-size: var(--fs-small); color: var(--muted); padding-block: 6px; }
.pd-component .pd-list { margin-top: var(--space-2); }
.pd-temp { font-family: var(--font-mono); font-weight: 700; font-size: clamp(1.6rem, 1.1rem + 2vw, 2.4rem); color: var(--navy); letter-spacing: -.02em; }
.pd-chips { display: flex; flex-wrap: wrap; gap: var(--space-2); list-style: none; padding: 0; margin: 0; }
.pd-chips li { font-size: var(--fs-small); padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg-soft); color: var(--navy); }
.pd-profiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: var(--space-3); list-style: none; padding: 0; margin: 0; }
.pd-profile { position: relative; display: flex; flex-direction: column; align-items: center; gap: var(--space-2); padding: var(--space-3); border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.pd-profile::after { /* corner ticks like a spec cell */
  content: ""; position: absolute; inset: 5px; pointer-events: none; opacity: .5;
  background:
    linear-gradient(var(--tick), var(--tick)) left top / 6px 1px no-repeat,
    linear-gradient(var(--tick), var(--tick)) left top / 1px 6px no-repeat,
    linear-gradient(var(--tick), var(--tick)) right top / 6px 1px no-repeat,
    linear-gradient(var(--tick), var(--tick)) right top / 1px 6px no-repeat,
    linear-gradient(var(--tick), var(--tick)) left bottom / 6px 1px no-repeat,
    linear-gradient(var(--tick), var(--tick)) left bottom / 1px 6px no-repeat,
    linear-gradient(var(--tick), var(--tick)) right bottom / 6px 1px no-repeat,
    linear-gradient(var(--tick), var(--tick)) right bottom / 1px 6px no-repeat;
}
.pd-profile img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.pd-profile-code { font-family: var(--font-mono); font-weight: 700; color: var(--navy); }
.pd-profile-desc { font-size: var(--fs-mono); color: var(--muted); text-align: center; }
.pd-downloads { list-style: none; padding: 0; margin: 0; }
.pd-downloads a {
  display: flex; justify-content: space-between; align-items: center; gap: var(--space-3);
  padding: 14px 4px; border-bottom: 1px solid var(--line); color: var(--navy); font-weight: 600;
  transition: color var(--dur-fast) var(--ease), padding var(--dur) var(--ease-signature);
}
.pd-downloads li:first-child a { border-top: 1px solid var(--line); }
.pd-downloads a:hover { color: var(--blue); padding-left: 10px; }
.pd-downloads a:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.pd-dl-meta { flex-shrink: 0; font-family: var(--font-mono); font-weight: 400; font-size: var(--fs-mono); letter-spacing: .08em; color: var(--muted); }
.pd-quote {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-4);
  padding: var(--space-5); border: 1px solid var(--line); border-left: 3px solid var(--blue-400); border-radius: var(--radius-lg); background: var(--bg-soft);
}
.pd-quote-text { max-width: 60ch; color: var(--navy); }
.pd-source { margin-top: var(--space-6); font-family: var(--font-mono); font-size: var(--fs-mono); color: var(--muted); overflow-wrap: anywhere; }
.pd-source a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .pd-downloads a { transition: none; } .pd-downloads a:hover { padding-left: 4px; } }
