/* =========================================================
   Brodarsko jahtni servis - prijedlog redizajna 2026.
   Koncept: pomorske signalne zastave. BJS = Bravo, Juliett, Sierra.
   Stranica je "hoist": lijevi rub je konop (halyard), a svaka sekcija
   nosi zastavu svog početnog slova (S, M, P, D, Z, O, K).
   Svijetla tema, oštri rubovi, boje zastava: crvena, plava, žuta.
   ========================================================= */

:root {
  --paper: oklch(97.6% 0.003 250);
  --paper-2: oklch(94.5% 0.006 250);
  --white: oklch(99.3% 0.002 250);
  --flag-white: oklch(99.3% 0.002 250);
  --ink: oklch(19% 0.03 262);
  --ink-2: oklch(38% 0.025 260);
  --ink-3: oklch(50% 0.02 258);
  --hair: oklch(86% 0.008 255);

  --red: oklch(55% 0.2 31);
  --red-deep: oklch(48% 0.19 30);
  --blue: oklch(40% 0.16 263);
  --yellow: oklch(86% 0.165 91);

  --f-display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --f-stencil: "Big Shoulders Stencil Display", "Big Shoulders Display", "Arial Narrow", sans-serif;
  --f-body: "IBM Plex Sans", ui-sans-serif, system-ui, "Segoe UI", sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", monospace;

  --g: clamp(16px, 3.4vw, 48px);
  --max: 1400px;
  --hdr-h: 72px;
  --rail: 88px;
  --rail-gap: clamp(20px, 2.6vw, 44px);
  --line-x: 11px;
  /* Udaljenost od ruba sadržaja do ruba prozora, za slike koje izlaze desno */
  --bleed: calc((min(100vw - 2 * var(--g), var(--max)) - 100vw) / 2);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--hdr-h) + 24px);
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
body.menu-locked { overflow: hidden; }

img { display: block; max-width: 100%; height: auto; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; border-radius: 0; }
input, select, textarea { font: inherit; color: inherit; }
figure { margin: 0; }
p { text-wrap: pretty; }
:lang(hr) p, :lang(hr) li { hyphens: auto; -webkit-hyphens: auto; }

::selection { background: var(--yellow); color: var(--ink); }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.dm :focus-visible { outline-color: var(--ink); }

.sr-only {
  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: fixed; top: 10px; left: 10px; z-index: 100;
  padding: 12px 18px; background: var(--ink); color: var(--paper); font-weight: 600;
  transform: translateY(-160%); transition: transform 0.25s var(--ease);
}
.skip-link:focus { transform: none; }

.mono {
  font-family: var(--f-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.5;
}

.wrap { width: min(100% - 2 * var(--g), var(--max)); margin-inline: auto; }

.flag { display: block; width: 60px; height: 44px; overflow: visible; }

/* ---------- Typography ---------- */
h1, h2, h3 {
  font-family: var(--f-display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.002em;
  text-wrap: balance;
}
h2 { font-size: clamp(2.6rem, 1.2rem + 4.3vw, 5.9rem); line-height: 0.92; }
h3 { font-size: clamp(1.55rem, 1.15rem + 1.1vw, 2.25rem); line-height: 0.95; font-weight: 750; }

.lead {
  margin-top: 22px;
  max-width: 50ch;
  font-size: clamp(1.06rem, 1rem + 0.3vw, 1.25rem);
  line-height: 1.55;
  color: var(--ink-2);
}

.signal {
  display: inline-block;
  max-width: 62ch;
  padding: 2px 0 2px 14px;
  border-left: 3px solid var(--blue);
  color: var(--ink-2);
  text-transform: none;
  letter-spacing: 0.01em;
  margin-bottom: 22px;
}

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 56px;
  padding: 0 26px;
  border: 2px solid transparent;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.btn i { font-size: 1.15em; transition: transform 0.3s var(--ease); }
.btn:hover i { transform: translateX(4px); }
.btn:active { transform: translateY(1px); }
.btn-sm { height: 42px; padding: 0 16px; font-size: 0.8125rem; }

.btn-red { background: var(--red); color: var(--white); }
.btn-red:hover { background: var(--red-deep); }
.btn-line { border-color: var(--ink); color: var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--paper); }
.btn-ink { background: var(--ink); color: var(--yellow); }
.btn-ink:hover { background: var(--blue); color: var(--white); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 5px;
  border-bottom: 2px solid var(--red);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.link-arrow i { transition: transform 0.3s var(--ease); }
.link-arrow:hover { color: var(--red); }
.link-arrow:hover i { transform: translateX(4px); }
.link-sm { font-size: 0.8125rem; border-bottom-width: 1.5px; padding-bottom: 3px; }

/* ---------- Header ---------- */
.hdr {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  background: color-mix(in oklch, var(--paper) 92%, transparent);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.hdr.is-solid, .hdr.menu-open { border-bottom-color: var(--ink); }
.hdr-in { height: var(--hdr-h); display: flex; align-items: center; gap: 28px; }

.logo { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.logo-flags { display: flex; gap: 3px; }
.logo-flags .flag { width: 24px; height: 18px; }
.logo-word {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 1.4rem;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.nav { margin-left: auto; }
.nav ul { display: flex; gap: clamp(14px, 1.5vw, 26px); }
.nav a {
  position: relative;
  display: block;
  padding-block: 8px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink-2);
  white-space: nowrap;
  transition: color 0.2s;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.nav a:hover, .nav a.is-active { color: var(--ink); }
.nav a:hover::after, .nav a.is-active::after { transform: scaleX(1); }

.hdr-act { display: flex; align-items: center; gap: 14px; }
.hdr-tel { display: none; align-items: center; gap: 10px; font-weight: 600; font-size: 0.9375rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.hdr-tel-tag { font-family: var(--f-mono); font-size: 0.6875rem; font-weight: 500; padding: 3px 6px; background: var(--ink); color: var(--paper); }
.hdr-tel:hover span:last-child { color: var(--red); }

.lang { display: inline-flex; border: 1.5px solid var(--ink); }
.lang-btn {
  min-width: 40px;
  height: 32px;
  padding: 0 8px;
  font-family: var(--f-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  transition: background-color 0.2s, color 0.2s;
}
.lang-btn[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.lang-btn:not([aria-pressed="true"]):hover { background: var(--paper-2); }

.menu-toggle { display: none; width: 46px; height: 46px; align-items: center; justify-content: center; border: 1.5px solid var(--ink); }
.menu-bars, .menu-bars::before { display: block; width: 20px; height: 2px; background: currentColor; transition: transform 0.3s var(--ease); }
.menu-bars { position: relative; transform: translateY(-4px); }
.menu-bars::before { content: ""; position: absolute; left: 0; top: 8px; }
.menu-toggle[aria-expanded="true"] .menu-bars { transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-bars::before { transform: translateY(-8px) rotate(-90deg); }

@media (min-width: 1380px) { .hdr-tel { display: inline-flex; } }
@media (max-width: 1139px) {
  .nav, .hdr-act > .lang { display: none; }
  .menu-toggle { display: inline-flex; }
  .hdr-act { margin-left: auto; gap: 10px; }
}
@media (max-width: 600px) {
  :root { --hdr-h: 64px; }
  .hdr-cta { display: none; }
  .logo-word { font-size: 1.15rem; }
  .logo-flags .flag { width: 20px; height: 15px; }
}
@media (max-width: 370px) { .logo-word { font-size: 1rem; } }

/* ---------- Mobile menu ---------- */
.mmenu {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  padding: calc(var(--hdr-h) + 20px) var(--g) max(28px, env(safe-area-inset-bottom));
  background: var(--paper);
  overflow-y: auto;
  opacity: 0;
  transition: opacity 0.25s var(--ease);
}
.mmenu.is-open { opacity: 1; }
.mmenu li { border-bottom: 1px solid var(--hair); }
.mmenu nav a {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(1.9rem, 1.3rem + 3vw, 2.6rem);
  line-height: 1;
  text-transform: uppercase;
  transform: translateX(-12px);
  opacity: 0;
  transition: transform 0.5s var(--ease), opacity 0.5s var(--ease);
  transition-delay: calc(var(--i, 0) * 35ms + 40ms);
}
.mmenu.is-open nav a { transform: none; opacity: 1; }
.mmenu nav .flag { width: 40px; height: 29px; flex-shrink: 0; }
.mmenu-foot { display: grid; gap: 4px; }
.mmenu-foot a { font-family: var(--f-display); font-weight: 800; font-size: 1.7rem; line-height: 1.1; }
.mmenu-foot .mono { color: var(--ink-3); }
.lang-lg { margin-top: 20px; justify-self: start; }
.lang-lg .lang-btn { height: 44px; padding: 0 16px; font-size: 0.8125rem; }

/* ---------- Rail (halyard) ---------- */
.railed {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  column-gap: var(--rail-gap);
}
/* Jedan neprekinuti konop kroz cijelu stranicu, poravnat s lijevim stupcem .wrap */
main { position: relative; }
main::before {
  content: "";
  position: absolute;
  z-index: 1;
  top: 0;
  bottom: 0;
  left: calc(max(var(--g), (100% - var(--max)) / 2) + var(--line-x));
  width: 2px;
  background: var(--ink);
  pointer-events: none;
}
.rail { position: relative; z-index: 2; }

.marker {
  position: sticky;
  top: calc(var(--hdr-h) + 28px);
  display: grid;
  justify-items: start;
  padding-left: calc(var(--line-x) + 2px);
}
.marker .flag { width: 58px; height: 42px; }
.marker-code {
  margin-top: 10px;
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 1.7rem;
  line-height: 1;
}
.marker-code, .marker-name { margin-left: 6px; }
.marker-name { font-family: var(--f-mono); font-size: 0.6875rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }

/* ---------- Hero ---------- */
.hero { padding-top: calc(var(--hdr-h) + clamp(28px, 4vw, 56px)); padding-bottom: clamp(56px, 7vw, 104px); }
.rail-hero { padding-top: 6px; }
.hoist { display: grid; gap: 6px; padding-left: calc(var(--line-x) + 2px); }
.flag-lg { width: 70px; height: 51px; }

.hero-meta { display: flex; flex-wrap: wrap; gap: 6px 28px; color: var(--ink-2); }
.hero-title {
  margin-top: 18px;
  font-size: clamp(3rem, 0.4rem + 6.6vw, 7.4rem);
  line-height: 0.95;
  max-width: 24ch;
}
.hero-row {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(24px, 3vw, 48px);
  align-items: end;
  margin-top: clamp(28px, 3.4vw, 52px);
}
.hero-sub { font-size: clamp(1.06rem, 1rem + 0.3vw, 1.22rem); line-height: 1.55; color: var(--ink-2); max-width: 34ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.hero-photo {
  margin-right: var(--bleed);
  aspect-ratio: 16 / 7.4;
  overflow: hidden;
  background: var(--ink);
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 55% 62%; }

/* ---------- Intro ---------- */
.intro { padding-block: clamp(24px, 3vw, 40px) clamp(8px, 2vw, 24px); }
.statement {
  max-width: 30ch;
  font-size: clamp(1.55rem, 0.95rem + 2.1vw, 2.75rem);
  line-height: 1.22;
  letter-spacing: -0.012em;
}
.statement .muted { color: var(--ink-3); }

.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: clamp(48px, 6vw, 88px);
  border-top: 3px solid var(--ink);
}
.fact {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  gap: 12px;
  padding: 22px clamp(16px, 2.4vw, 32px) 0;
  border-left: 1px solid var(--hair);
}
.fact:first-child { padding-left: 0; border-left: 0; }
.fact dd {
  font-family: var(--f-stencil);
  font-weight: 800;
  font-size: clamp(4rem, 1.6rem + 7vw, 9.5rem);
  line-height: 0.82;
  letter-spacing: -0.005em;
}
.fact dt { font-family: var(--f-mono); font-size: 0.8125rem; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-2); max-width: 24ch; }

/* ---------- Sections ---------- */
.sec { padding-block: clamp(80px, 9vw, 140px); }
.sec-tint { background: var(--paper-2); }

/* Square tick list */
.ticks li { position: relative; padding-left: 24px; line-height: 1.45; }
.ticks li + li { margin-top: 10px; }
.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 9px;
  height: 9px;
  background: var(--tick, var(--ink));
}

/* ---------- S: Servis ---------- */
.svc-layout {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(32px, 4vw, 72px);
  align-items: start;
}
.svc-head { align-self: stretch; }
.svc-sticky { position: sticky; top: calc(var(--hdr-h) + 40px); }
.svc-sticky .link-arrow { margin-top: 30px; }
.svc-photo {
  margin-right: var(--bleed);
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--paper-2);
}
.svc-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }

.svc-rows { margin-top: clamp(40px, 4.4vw, 68px); }
.svc-row {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 18px 36px;
  padding-block: 26px 34px;
  border-top: 2px solid var(--ink);
}
.svc-row-head { display: flex; align-items: center; gap: 14px; align-self: start; }
.wire { flex-shrink: 0; width: 30px; height: 12px; }
.wire-red { background: var(--red); }
.wire-blue { background: var(--blue); }
.wire-yellow { background: var(--yellow); box-shadow: inset 0 0 0 1px oklch(19% 0.03 262 / 0.25); }
.svc-row:nth-child(1) .ticks { --tick: var(--red); }
.svc-row:nth-child(2) .ticks { --tick: var(--blue); }
.svc-row:nth-child(3) .ticks { --tick: var(--yellow); }
.svc-row .ticks { padding-top: 4px; }
.svc-row-img { grid-column: 1; max-width: 260px; aspect-ratio: 4 / 3; overflow: hidden; }
.svc-row-img img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- M: Yacht management ---------- */
.ym-top {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
  gap: clamp(28px, 4vw, 72px);
  align-items: end;
}
.ym-photo { margin-right: var(--bleed); aspect-ratio: 3 / 2; overflow: hidden; background: var(--paper); }
.ym-photo img { width: 100%; height: 100%; object-fit: cover; }

.route {
  --dot: 18px;
  --when-h: 22px;
  --row-gap: 14px;
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 28px;
  margin-top: clamp(56px, 6vw, 96px);
}
.route::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: calc(var(--when-h) + var(--row-gap) + var(--dot) / 2 - 1px);
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--ink) 0 12px, transparent 12px 20px);
  transform-origin: left;
}
.wp { position: relative; display: grid; grid-template-rows: var(--when-h) auto auto auto; row-gap: var(--row-gap); align-content: start; }
.wp-when { color: var(--ink-2); white-space: nowrap; }
.wp-dot {
  position: relative;
  width: var(--dot);
  height: var(--dot);
  border-radius: 50%;
  background: var(--paper-2);
  box-shadow: inset 0 0 0 2px var(--ink);
}
.wp-dot::after { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--ink); }
.wp-dot-alert { background: var(--red); box-shadow: inset 0 0 0 2px var(--red); }
.wp-dot-alert::after { background: var(--white); }
.wp h3 { font-size: clamp(1.35rem, 1.1rem + 0.6vw, 1.75rem); margin-top: 4px; }
.wp h3 + p { color: var(--ink-2); font-size: 0.975rem; line-height: 1.5; }

/* ---------- P: Proizvodnja ---------- */
.pro-head { max-width: 980px; }
.pro-a {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(28px, 4vw, 64px);
  align-items: start;
  margin-top: clamp(44px, 5vw, 72px);
}
.pro-a-img { aspect-ratio: 4 / 3; overflow: hidden; background: var(--paper-2); }
.pro-a-img img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 88%; }
.pro-a-copy h3 + p { margin-top: 14px; color: var(--ink-2); max-width: 44ch; }
.swatch-label { margin-top: 32px; padding-top: 18px; border-top: 2px solid var(--ink); color: var(--ink-2); }
.swatches { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.swatches li { display: grid; gap: 10px; font-size: 0.9rem; font-weight: 500; line-height: 1.3; }
.swatch {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.swatches li:hover .swatch { transform: translateY(-4px); box-shadow: 0 10px 0 -4px oklch(19% 0.03 262 / 0.18); }
.swatch-wood {
  background:
    radial-gradient(140% 60% at 20% 10%, oklch(62% 0.08 58 / 0.5), transparent 60%),
    repeating-linear-gradient(97deg, oklch(37% 0.07 48) 0 3px, oklch(45% 0.08 52) 3px 7px, oklch(33% 0.06 45) 7px 9px, oklch(41% 0.075 50) 9px 14px);
}
.swatch-pvc { background: oklch(27% 0.012 255); }
.swatch-pvc span {
  font-family: var(--f-stencil);
  font-weight: 800;
  font-size: clamp(1.3rem, 0.9rem + 1.2vw, 2rem);
  letter-spacing: 0.06em;
  color: oklch(88% 0.004 255);
  text-shadow: 0 1px 0 oklch(15% 0.01 255);
}
.swatch-carbon {
  background:
    linear-gradient(135deg, oklch(100% 0 0 / 0.12), transparent 55%),
    repeating-conic-gradient(oklch(19% 0.006 255) 0 25%, oklch(30% 0.01 255) 0 50%) 0 0 / 8px 8px;
}
.swatch-note { margin-top: 16px; font-size: 0.9rem; color: var(--ink-3); }

.pro-b {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(28px, 4vw, 64px);
  align-items: center;
  width: min(100%, 980px);
  margin: clamp(64px, 8vw, 128px) 0 0 auto;
}
.pro-b-copy h3 + p { margin-top: 14px; color: var(--ink-2); }
.tag { display: inline-block; margin-bottom: 18px; padding: 5px 10px; background: var(--yellow); color: var(--ink); }
.pro-b-img { aspect-ratio: 4 / 5; overflow: hidden; background: var(--paper-2); }
.pro-b-img img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- D: Dockmate ---------- */
.dm { background: var(--yellow); padding-block: clamp(80px, 9vw, 140px); }
.dm .marker-name { color: var(--ink-2); }
.dm-main {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  grid-template-areas: "copy remote" "specs specs";
  column-gap: clamp(28px, 4vw, 72px);
  align-items: center;
}
.dm-copy { grid-area: copy; }
.dm-badge { display: inline-block; padding: 6px 10px; background: var(--ink); color: var(--yellow); margin-bottom: 24px; }
.dm-copy h2 { max-width: 12ch; }
.dm-copy .signal { margin-top: 26px; margin-bottom: 0; border-left-color: var(--ink); color: var(--ink); }
.dm-copy .lead { color: var(--ink); }
.dm-copy .btn { margin-top: 32px; }

.remote { grid-area: remote; display: flex; justify-content: center; }
.remote-device {
  --reach: clamp(96px, 10vw, 150px);
  position: relative;
  width: clamp(150px, 14vw, 200px);
  margin-inline: var(--reach);
}
.remote-device img {
  width: 100%;
  filter: drop-shadow(0 30px 30px oklch(30% 0.08 80 / 0.45));
  -webkit-mask-image: linear-gradient(180deg, #000 64%, transparent 92%);
  mask-image: linear-gradient(180deg, #000 64%, transparent 92%);
}
.callouts { position: absolute; inset: 0; }
.callout {
  position: absolute;
  top: var(--y);
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.2;
  transform: translateY(-50%);
}
.callout::after { content: ""; flex: 1; min-width: 16px; height: 1.5px; background: var(--ink); }
.callout-l { right: calc(100% - var(--x)); width: calc(var(--x) + var(--reach)); }
.callout-l::after { transform-origin: right; }
.callout-r { left: var(--x); width: calc(100% - var(--x) + var(--reach)); flex-direction: row-reverse; text-align: right; }
.callout-r::after { transform-origin: left; }
@media (min-width: 481px) { .callout { white-space: nowrap; } }

.specs {
  grid-area: specs;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: clamp(48px, 5vw, 80px);
  border-top: 3px solid var(--ink);
}
.spec {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  gap: 10px;
  padding: 20px clamp(14px, 2vw, 28px) 0;
  border-left: 1px solid oklch(19% 0.03 262 / 0.3);
}
.spec:first-child { padding-left: 0; border-left: 0; }
.spec dd { font-family: var(--f-stencil); font-weight: 800; font-size: clamp(2.4rem, 1.4rem + 3vw, 4.6rem); line-height: 0.85; white-space: nowrap; }
.spec dt { font-family: var(--f-mono); font-size: 0.8125rem; font-weight: 500; letter-spacing: 0.03em; text-transform: uppercase; color: var(--ink); max-width: 22ch; }

/* ---------- Z: Zastupstva ---------- */
.brands-head { max-width: 900px; }
.brand-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: clamp(40px, 5vw, 64px);
  border-top: 3px solid var(--ink);
}
.brand { border-bottom: 1px solid var(--ink); }
.brand:not(:nth-child(4n)) { border-right: 1px solid var(--hair); }
.brand a {
  position: relative;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 32px;
  height: 100%;
  min-height: 200px;
  padding: clamp(18px, 2vw, 28px);
  transition: background-color 0.25s, color 0.25s;
}
.brand-name {
  padding-right: 34px;
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(1.9rem, 1.1rem + 1.7vw, 2.9rem);
  line-height: 0.9;
  text-transform: uppercase;
}
.brand-desc { font-family: var(--f-mono); font-size: 0.75rem; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-2); line-height: 1.45; transition: color 0.25s; }
.brand-arrow { position: absolute; top: clamp(18px, 2vw, 28px); right: clamp(16px, 1.8vw, 24px); font-size: 1.35rem; transition: transform 0.3s var(--ease), color 0.25s; }
.brand-featured a { background: var(--yellow); }
.brand a:hover { background: var(--ink); color: var(--paper); }
.brand a:hover .brand-desc { color: oklch(85% 0.01 255); }
.brand a:hover .brand-arrow { color: var(--yellow); transform: translate(3px, -3px); }
.brand-featured a:hover .brand-arrow { transform: translateY(-3px); }

/* ---------- O: O nama ---------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(32px, 5vw, 96px);
  align-items: start;
}
.about-title { display: grid; justify-items: start; }
.about-od { font-size: clamp(2.2rem, 1.4rem + 2.4vw, 4rem); line-height: 0.9; }
.about-year {
  font-family: var(--f-stencil);
  font-size: clamp(6.4rem, 2rem + 13.5vw, 16rem);
  line-height: 0.8;
  letter-spacing: -0.01em;
  margin-top: 4px;
}
.about-copy .lead { margin-top: clamp(28px, 3vw, 44px); color: var(--ink); }
.about-text { margin-top: 16px; color: var(--ink-2); max-width: 56ch; }
.speciality { margin-top: clamp(36px, 4vw, 56px); padding-top: 18px; border-top: 2px solid var(--ink); }
.speciality .mono { color: var(--ink-2); }
.ticks-2 { margin-top: 16px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 28px; --tick: var(--red); }
.ticks-2 li + li { margin-top: 0; }

.about-side { padding-top: clamp(0px, 7vw, 120px); }
.about-photo { aspect-ratio: 4 / 4.6; overflow: hidden; background: var(--paper-2); }
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.log { margin-top: 28px; border-top: 3px solid var(--ink); }
.log li {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 16px;
  align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px solid var(--hair);
  font-size: 0.975rem;
  color: var(--ink-2);
  line-height: 1.45;
}
.log-year { font-family: var(--f-display); font-weight: 800; font-size: 1.6rem; line-height: 1; color: var(--ink); text-transform: uppercase; }

/* ---------- K: Kontakt ---------- */
.contact { padding-bottom: clamp(96px, 10vw, 160px); }
.contact-head h2 { max-width: 19ch; }
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(36px, 5vw, 96px);
  align-items: start;
  margin-top: clamp(40px, 5vw, 64px);
}
.phones li { display: grid; gap: 4px; padding: 16px 0 18px; border-top: 2px solid var(--ink); }
.phones li:last-child { border-bottom: 2px solid var(--ink); }
.phones .mono { color: var(--ink-2); }
.phones a {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(2.1rem, 1.3rem + 2.4vw, 3.3rem);
  line-height: 1;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: color 0.2s;
}
.phones a:hover { color: var(--red); }
.mail {
  display: inline-block;
  margin-top: 22px;
  padding-bottom: 4px;
  border-bottom: 2px solid var(--red);
  font-size: 1.25rem;
  font-weight: 500;
  transition: color 0.2s;
}
.mail:hover { color: var(--red); }
.addresses { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 44px; }
.addresses .mono { color: var(--ink-3); margin-bottom: 6px; }
.addresses p:not(.mono) { line-height: 1.5; }
.addresses .link-arrow { margin-top: 12px; }

.form {
  background: var(--white);
  border: 2px solid var(--ink);
  box-shadow: 10px 10px 0 var(--blue);
  padding: clamp(22px, 3vw, 44px);
}
.form-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 18px; }
.field-full { grid-column: 1 / -1; }
.field label { display: block; margin-bottom: 8px; font-size: 0.9375rem; font-weight: 600; }
.optional { font-weight: 400; color: var(--ink-3); }
.field input, .field select, .field textarea {
  width: 100%;
  height: 52px;
  padding: 0 14px;
  border: 1.5px solid var(--ink-3);
  border-radius: 0;
  background: var(--white);
  color: var(--ink);
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { height: auto; min-height: 150px; padding: 12px 14px; resize: vertical; line-height: 1.5; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--ink); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--blue); }
.field [aria-invalid="true"] { border-color: var(--red); }
.field [aria-invalid="true"]:focus { box-shadow: 0 0 0 3px var(--red); }
.field-error { margin-top: 7px; font-size: 0.875rem; font-weight: 600; color: var(--red-deep); }
.field-hint { margin-top: 7px; font-size: 0.875rem; color: var(--ink-3); }
.select-wrap { position: relative; }
.select-wrap select { appearance: none; -webkit-appearance: none; padding-right: 44px; cursor: pointer; }
.select-wrap i { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 4px; }
.form-legal { font-size: 0.875rem; color: var(--ink-3); max-width: 34ch; line-height: 1.45; }
.btn[aria-busy="true"] { opacity: 0.75; pointer-events: none; }

.form-success { padding-block: clamp(8px, 3vw, 40px); }
.form-success:focus { outline: none; }
.flag-ok { width: 72px; height: 53px; }
.form-success h3 { margin-top: 22px; }
.form-success p { margin-top: 12px; color: var(--ink-2); max-width: 44ch; }
.form-success .link-arrow { margin-top: 24px; }

/* ---------- Footer ---------- */
.ftr { background: var(--paper-2); border-top: 3px solid var(--ink); padding-block: clamp(56px, 6vw, 88px) 28px; }
.ftr-top { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: 40px; }
.ftr-flags { display: flex; gap: 4px; }
.ftr-flags .flag { width: 44px; height: 32px; }
.ftr-word { margin-top: 18px; font-family: var(--f-display); font-weight: 800; font-size: clamp(1.8rem, 1.3rem + 1.2vw, 2.5rem); line-height: 0.95; text-transform: uppercase; }
.ftr-tag { margin-top: 10px; color: var(--ink-2); }
.ftr-col .mono { color: var(--ink-3); margin-bottom: 14px; }
.ftr-col li + li { margin-top: 8px; }
.ftr-col a { transition: color 0.2s; }
.ftr-col a:hover { color: var(--red); }
.ftr-col p:not(.mono) { color: var(--ink-2); font-size: 0.9375rem; line-height: 1.6; }
.ftr-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: clamp(44px, 5vw, 72px);
  padding-top: 20px;
  border-top: 1px solid var(--ink);
  font-size: 0.875rem;
  color: var(--ink-3);
}

/* ---------- Tablet ---------- */
@media (max-width: 1139px) {
  :root { --rail: 72px; }
  .flag-lg { width: 56px; height: 41px; }
  .marker .flag { width: 48px; height: 35px; }
  .route { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 44px; }
  .route::before { display: none; }
  .brand-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .brand:not(:nth-child(4n)) { border-right: 0; }
  .brand:nth-child(odd) { border-right: 1px solid var(--hair); }
  .ftr-top { grid-template-columns: 1fr 1fr; }
}

/* ---------- Mobile ---------- */
@media (max-width: 899px) {
  .railed { grid-template-columns: minmax(0, 1fr); }
  main::before { display: none; }
  .rail-hero { display: none; }
  .marker {
    position: static;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-left: 0;
    margin-bottom: 22px;
  }
  .marker .flag { width: 44px; height: 32px; }
  .marker-code { margin-top: 0; font-size: 1.5rem; }
  .intro .rail { display: none; }

  .hero-row { grid-template-columns: minmax(0, 1fr); }
  .hero-photo { order: -1; margin-inline: calc(-1 * var(--g)); aspect-ratio: 4 / 3; }
  .hero-sub { max-width: none; }

  .svc-layout, .ym-top, .pro-a, .pro-b, .about-grid, .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .svc-sticky { position: static; }
  .svc-photo, .ym-photo { margin-right: calc(-1 * var(--g)); }
  .pro-b { width: 100%; }
  .pro-b-img { aspect-ratio: 4 / 3; }
  .about-side { padding-top: 0; }
  .about-photo { aspect-ratio: 3 / 2; }

  .dm-main { grid-template-columns: minmax(0, 1fr); grid-template-areas: "copy" "remote" "specs"; }
  .remote { margin-top: 48px; }
  .specs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .spec { padding: 18px 16px 18px 0; border-left: 0; }
  .spec:nth-child(even) { padding-left: 16px; border-left: 1px solid oklch(19% 0.03 262 / 0.3); }
  .spec:nth-child(n+3) { border-top: 1px solid oklch(19% 0.03 262 / 0.3); }
}

@media (max-width: 640px) {
  .facts { grid-template-columns: minmax(0, 1fr); }
  .fact {
    display: grid;
    grid-template-columns: 7.2rem minmax(0, 1fr);
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    border-left: 0;
    border-top: 1px solid var(--hair);
  }
  .fact:first-child { border-top: 0; }
  .fact dt { order: 2; }
  .fact dd { order: 1; font-size: 3.6rem; }

  .svc-row { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .svc-row-img { grid-column: auto; max-width: none; aspect-ratio: 16 / 9; }

  .route { grid-template-columns: minmax(0, 1fr); row-gap: 0; padding-left: 34px; }
  .route::before {
    display: block;
    left: 8px;
    right: auto;
    top: 6px;
    bottom: 6px;
    width: 2px;
    height: auto;
    background: repeating-linear-gradient(180deg, var(--ink) 0 12px, transparent 12px 20px);
  }
  .wp { grid-template-rows: auto auto auto; row-gap: 6px; padding-bottom: 32px; }
  .wp-dot { position: absolute; left: -34px; top: 1px; }

  .swatches { gap: 8px; }
  .ticks-2 { grid-template-columns: minmax(0, 1fr); }
  .brand a { min-height: 156px; gap: 22px; }
  .brand-name { font-size: 1.65rem; }
  .addresses { grid-template-columns: minmax(0, 1fr); }
  .form { box-shadow: 6px 6px 0 var(--blue); }
  .form-fields { grid-template-columns: minmax(0, 1fr); }
  .form-foot .btn { width: 100%; }
  .ftr-top { grid-template-columns: minmax(0, 1fr); gap: 32px; }

  .remote-device { --reach: 96px; width: 130px; }
  .callout { font-size: 0.6875rem; gap: 6px; letter-spacing: 0.02em; }
  .callout::after { min-width: 10px; }
}

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .mmenu, .mmenu nav a { transition: none; }
  .mmenu nav a { transform: none; opacity: 1; }
}

@media (prefers-reduced-motion: no-preference) {
  /* Zastave B J S se dižu po konopu */
  .flag-lg { animation: hoist 1s var(--ease) both; animation-delay: calc(0.2s + var(--d, 0) * 0.13s); }
  [data-anim] { animation: rise 0.9s var(--ease) both; }
  .hero-meta { animation-delay: 0.1s; }
  .hero-title { animation-delay: 0.2s; }
  .hero-copy { animation-delay: 0.38s; }
  .hero-photo { animation: curtain 1.4s var(--ease) 0.3s both; }

  .js [data-reveal] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
    transition-delay: calc(var(--i, 0) * 80ms);
  }
  .js .marker[data-reveal] { transform: translateY(-36px); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }

  /* Ruta se iscrtava */
  .js .route::before { transform: scaleX(0); transition: transform 1.6s var(--ease) 0.2s; }
  .js .route.is-in::before { transform: scaleX(1); }
  @media (max-width: 640px) {
    .js .route::before { transform: scaleY(0); transform-origin: top; }
    .js .route.is-in::before { transform: scaleY(1); }
  }

  /* Oznake na Dockmate upravljaču */
  .js .callout { opacity: 0; transition: opacity 0.5s var(--ease); }
  .js .callout::after { transform: scaleX(0); transition: transform 0.8s var(--ease); }
  .js .remote.is-in .callout { opacity: 1; }
  .js .remote.is-in .callout::after { transform: scaleX(1); }
  .js .remote.is-in .callout:nth-child(1), .js .remote.is-in .callout:nth-child(1)::after { transition-delay: 0.3s; }
  .js .remote.is-in .callout:nth-child(2), .js .remote.is-in .callout:nth-child(2)::after { transition-delay: 0.4s; }
  .js .remote.is-in .callout:nth-child(3), .js .remote.is-in .callout:nth-child(3)::after { transition-delay: 0.5s; }
  .js .remote.is-in .callout:nth-child(4), .js .remote.is-in .callout:nth-child(4)::after { transition-delay: 0.6s; }
  .js .remote.is-in .callout:nth-child(5), .js .remote.is-in .callout:nth-child(5)::after { transition-delay: 0.7s; }
  .js .remote.is-in .callout:nth-child(6), .js .remote.is-in .callout:nth-child(6)::after { transition-delay: 0.8s; }
}
@keyframes hoist { from { opacity: 0; transform: translateY(90px); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes curtain { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
