/* =========================================================================
   Homepage only (body.home). Layout follows the reference design;
   colours, type and tokens come from style.css.
   Same layer as the shared components, so the utilities layer still wins.
   ========================================================================= */

@layer components {

  .home { --bg: var(--white); background: var(--bg); }
  .home :where(h1, h2, h3) { font-weight: 600; letter-spacing: -0.035em; }
  .home h2 { font-size: clamp(2rem, 1.3rem + 2.6vw, 3.4rem); line-height: 1.04; }
  .home .eyebrow { font-size: .7rem; padding: .5em 1.1em; }
  .home .on-dark .eyebrow { background: rgb(255 255 255 / .08); color: var(--white); border-color: rgb(255 255 255 / .22); }

  /* ---------- Header: sits inside the hero; transparent at the top,
     solid white pill once the page scrolls (.is-scrolled from main.js) */
  .home .site-header {
    top: 24px;
    width: min(100% - 56px, 1680px);
    margin: 24px auto calc(-1 * var(--nav-h) - 12px);
  }
  .home .nav {
    box-shadow: 0 10px 30px rgb(22 24 26 / .12);
    transition: background-color 350ms var(--ease), border-color 350ms, box-shadow 350ms, backdrop-filter 350ms;
  }
  .home .nav__link { white-space: nowrap; padding-inline: .7rem; transition: background-color 200ms, color 300ms; }
  .home :where(.brand, .brand__name span, .nav__call, .nav__call span) { transition: color 300ms; }
  @media (max-width: 1400px) { .home .nav__call { display: none; } }

  .home .site-header:not(.is-scrolled) .nav:not(:has(.nav__menu.is-open)) {
    background: transparent; border-color: rgb(255 255 255 / .22); box-shadow: none; backdrop-filter: none;
  }
  .home .site-header:not(.is-scrolled) .nav:not(:has(.nav__menu.is-open)) :where(.brand, .nav__call, .nav__call span) { color: var(--white); }
  .home .site-header:not(.is-scrolled) .nav:not(:has(.nav__menu.is-open)) .brand__name span { color: rgb(255 255 255 / .7); }
  .home .site-header:not(.is-scrolled) .nav__toggle { background: var(--white); color: var(--ink-950); }
  @media (min-width: 1021px) {
    .home .site-header:not(.is-scrolled) .nav__menu > li > .nav__link { color: var(--white); }
    .home .site-header:not(.is-scrolled) .nav__menu > li > .nav__link:hover { background: rgb(255 255 255 / .12); }
    .home .site-header:not(.is-scrolled) .nav__menu > li > .nav__link[aria-current="page"] { background: rgb(255 255 255 / .16); color: var(--white); }
  }

  /* ---------- Hero: one full-screen photo, headline bottom-left, cards right */
  .hx {
    position: relative; isolation: isolate; overflow: hidden;
    height: calc(100svh - 24px); min-height: 680px; margin: 0 12px var(--sp-4);
    border-radius: var(--r-xl); background: var(--ink-950); color: rgb(255 255 255 / .8);
  }
  .hx__bg { position: absolute; inset: 0; z-index: -1; margin: 0; }
  .hx__bg img { width: 100%; height: 100%; object-fit: cover; object-position: 40% 35%; animation: hx-zoom 1.8s var(--ease) both; }
  .hx__bg img { filter: saturate(.92) contrast(1.04); }
  .hx__bg::after {
    content: ""; position: absolute; inset: 0;
    background:
      linear-gradient(90deg, rgb(22 24 26 / .78) 0%, rgb(22 24 26 / .45) 45%, rgb(22 24 26 / .15) 75%),
      linear-gradient(180deg, rgb(22 24 26 / .55) 0%, transparent 22%, transparent 55%, rgb(22 24 26 / .7) 100%),
      rgb(14 15 16 / .38);
  }
  /* Fine film grain: hides the softness of the upscaled photo */
  .hx__bg::before {
    content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: .22; mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  }
  .hx__bg figcaption {
    position: absolute; z-index: 1; right: 20px; top: calc(var(--nav-h) + 36px);
    padding: .2rem .65rem; border-radius: var(--r-pill); background: rgb(22 24 26 / .45);
    color: rgb(255 255 255 / .8); font-size: .72rem;
  }

  .hx__inner {
    height: 100%; display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
    align-items: end; gap: var(--sp-6) clamp(2rem, 1rem + 4vw, 6rem);
    padding: calc(var(--nav-h) + 4rem) clamp(1.5rem, .5rem + 3.5vw, 4.5rem) clamp(1.5rem, 1rem + 2vw, 3.5rem);
  }
  .hx__main { display: grid; gap: var(--sp-6); justify-items: start; }
  .hx__main .btn-row { gap: var(--sp-4); }
  .hx__eyebrow {
    display: inline-flex; align-items: center; gap: .65rem; padding: .5rem 1rem .5rem .75rem;
    border: 1px solid rgb(255 255 255 / .25); border-radius: var(--r-pill);
    background: rgb(255 255 255 / .1); backdrop-filter: blur(10px);
    color: var(--white); font-size: .85rem; font-weight: 600;
  }
  .hx__pulse { position: relative; width: 9px; height: 9px; border-radius: 50%; background: var(--rust-500); }
  .hx__pulse::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--rust-500); animation: hx-pulse 2s ease-out infinite; }
  .hx h1 {
    color: var(--white); max-width: none;
    font-size: clamp(3.2rem, .8rem + 7.2vw, 10rem); line-height: .9; letter-spacing: -0.055em;
  }
  .hx h1 > span { display: block; animation: hx-rise 900ms var(--ease) both; }
  .hx h1 > span:nth-child(2) { animation-delay: 120ms; }
  .hx h1 > span:nth-child(3) { animation-delay: 240ms; }
  .hx__accent { color: var(--rust-500); }
  .hx__lead { max-width: 38ch; font-size: clamp(1rem, .95rem + .3vw, 1.2rem); line-height: 1.6; color: rgb(255 255 255 / .82); }
  .hx :where(.hx__eyebrow, .hx__lead, .btn-row, .hx__side) { animation: hx-rise 900ms var(--ease) 360ms both; }

  .btn--glass {
    --btn-bg: rgb(255 255 255 / .1); --btn-fg: var(--white); --btn-bd: rgb(255 255 255 / .32);
    --badge-bg: var(--white); --badge-fg: var(--ink-950);
    backdrop-filter: blur(10px);
  }

  .hx__side { display: grid; gap: 12px; }
  .hx-svc { display: grid; gap: 12px; list-style: none; padding: 0; }
  .hx-svc a {
    display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1.1rem;
    padding: .75rem .75rem .75rem 1.4rem; border-radius: var(--r-pill);
    border: 1px solid rgb(255 255 255 / .18); background: rgb(22 24 26 / .35); backdrop-filter: blur(14px) saturate(1.2);
    color: var(--white); text-decoration: none;
    transition: background-color 300ms var(--ease), color 300ms, transform 300ms var(--ease);
  }
  .hx-svc__n { font-size: .78rem; font-weight: 600; color: rgb(255 255 255 / .55); font-variant-numeric: tabular-nums; }
  .hx-svc__t { display: grid; line-height: 1.25; }
  .hx-svc__t b { font-size: 1.08rem; font-weight: 600; letter-spacing: -0.01em; }
  .hx-svc__t span { font-size: .82rem; color: rgb(255 255 255 / .65); transition: color 300ms; }
  .hx-svc__a { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: rgb(255 255 255 / .12); transition: background-color 300ms, transform 300ms var(--ease); }
  .hx-svc__a svg { width: 16px; height: 16px; }
  .hx-svc a:hover { background: var(--white); color: var(--ink-950); transform: translateX(-4px); }
  .hx-svc a:hover :where(.hx-svc__n, .hx-svc__t span) { color: var(--body-600); }
  .hx-svc a:hover .hx-svc__a { background: var(--rust-500); transform: rotate(45deg); }

  .hx__card {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: 1rem 1rem 1rem 1.2rem; border-radius: var(--r-lg); background: var(--cream-100); color: var(--ink-950);
  }
  .hx__card .watch { min-width: 0; min-height: 56px; padding: 0 1.3rem; font-size: .92rem; }

  .years { display: flex; align-items: center; gap: var(--sp-3); }
  .years__fig { position: relative; display: inline-flex; align-items: center; min-width: 78px; height: 68px; padding-left: 24px; }
  .years__dot {
    position: absolute; left: 0; top: 50%; translate: 0 -50%;
    width: 68px; height: 68px; border-radius: 50%; background: var(--rust-500);
  }
  .years__fig b { position: relative; color: var(--ink-950); font-weight: 600; line-height: 1; font-size: 3.1rem; letter-spacing: -0.05em; }
  .years__label { font-size: .9rem; }

  .watch {
    position: relative; isolation: isolate; overflow: hidden;
    display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
    border-radius: var(--r-pill); background: var(--ink-950); color: var(--white); font-weight: 600; text-decoration: none;
  }
  .watch img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; transition: transform 600ms var(--ease); }
  .watch::after { content: ""; position: absolute; inset: 0; z-index: -1; background: rgb(22 24 26 / .58); }
  .watch svg { width: 14px; height: 14px; }
  .watch:hover img { transform: scale(1.08); }

  @keyframes hx-zoom { from { transform: scale(1.08); } to { transform: scale(1); } }
  @keyframes hx-rise { from { opacity: 0; translate: 0 28px; } to { opacity: 1; translate: 0 0; } }
  @keyframes hx-pulse { from { opacity: .8; scale: .6; } to { opacity: 0; scale: 1.8; } }

  @media (max-width: 1200px) { .home .nav__cta { display: none; } }
  @media (max-width: 1100px) {
    .hx { height: auto; min-height: calc(100svh - 24px); }
    .hx__inner { grid-template-columns: 1fr; align-content: end; min-height: calc(100svh - 24px); }
    .hx__side { grid-template-columns: repeat(3, 1fr); }
    .hx-svc { display: contents; }
    .hx__card { grid-column: 1 / -1; }
  }
  @media (max-width: 900px) {
    .home .site-header { width: calc(100% - 44px); }
    .hx { margin-inline: 10px; }
    .hx__inner { padding-top: calc(var(--nav-h) + 5rem); }
    .hx__side { display: none; }
  }
  @media (max-width: 520px) {
    .hx__card { flex-wrap: wrap; }
    .hx__card .watch { flex: 1; }
  }

  /* ---------- Eyebrow left, heading right */
  .head-split {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.75fr);
    gap: var(--sp-4) var(--sp-5); align-items: start; margin-bottom: var(--sp-7);
  }
  .head-split > .eyebrow { margin-top: .7rem; }
  .head-split p { margin-top: var(--sp-4); max-width: 56ch; }
  .head-split--stack { grid-template-columns: 1fr; }
  .head-split--stack > .eyebrow { margin-top: 0; }
  @media (max-width: 760px) { .head-split { grid-template-columns: 1fr; } .head-split > .eyebrow { margin-top: 0; } }

  /* ---------- 01 / 02 / 03 cards with a cut-out corner */
  .tcards { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-4); }
  .tcard {
    --pad: clamp(1.5rem, 1.2rem + 1vw, 2rem);
    position: relative; isolation: isolate; overflow: hidden;
    display: flex; flex-direction: column; min-height: clamp(440px, 36vw, 520px); padding: var(--pad);
    border-radius: var(--r-xl); background: var(--ink-950); color: rgb(255 255 255 / .72); text-decoration: none;
    transition: transform 320ms var(--ease);
  }
  .tcard:hover { transform: translateY(-4px); }
  .tcard__num { display: block; padding-bottom: .9rem; border-bottom: 1px solid rgb(255 255 255 / .2); font-size: .85rem; font-weight: 600; color: var(--white); }
  .tcard__body { display: grid; gap: .55rem; margin-top: auto; padding-right: 3.75rem; }
  .tcard h3 { color: var(--white); font-size: clamp(1.6rem, 1.2rem + 1vw, 2.1rem); }
  .tcard p { font-size: var(--fs-sm); line-height: 1.55; }
  .tcard__link {
    width: fit-content; margin-top: .5rem; font-weight: 600; color: var(--white);
    text-decoration: underline; text-underline-offset: .3em; text-decoration-color: color-mix(in srgb, currentColor 45%, transparent);
  }
  .tcard__media { flex: 1 1 auto; min-height: 150px; margin-top: 1.25rem; overflow: hidden; border-radius: var(--r-lg); }
  .tcard__media img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.9); transition: transform 700ms var(--ease); }
  .tcard:hover .tcard__media img { transform: scale(1.05); }
  .tcard__media + .tcard__body { margin-top: 1.5rem; }
  .tcard--accent { background: var(--rust-500); color: rgb(22 24 26 / .78); }
  .tcard--accent .tcard__num { color: var(--ink-950); border-color: rgb(22 24 26 / .22); }
  .tcard--accent :where(h3, .tcard__link) { color: var(--ink-950); }
  .tcard--accent .tcard__body { margin-top: 1.75rem; padding-right: 0; }
  .tcard__figure {
    display: block; margin: auto calc(-1 * var(--pad)) calc(-1 * var(--pad)); padding-top: 1.5rem;
    height: 46%; min-height: 170px;
  }
  .tcard__figure img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--r-lg) var(--r-lg) 0 0; }
  .tcard--photo > img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; transition: transform 700ms var(--ease); }
  .tcard--photo::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgb(22 24 26 / .6), rgb(22 24 26 / .1) 40%, rgb(22 24 26 / .88)); }
  .tcard--photo:hover > img { transform: scale(1.04); }
  .tcard:hover .notch__badge { transform: rotate(45deg); }
  @media (max-width: 960px) { .tcards { grid-template-columns: 1fr; } .tcard { min-height: 400px; } }

  /* The notch: a page-coloured square in the corner with two inverted fillets */
  .notch {
    --r: 20px;
    position: absolute; right: 0; bottom: 0; z-index: 2;
    display: grid; place-items: center; width: 78px; height: 78px; padding: 10px 0 0 10px;
    background: var(--bg); border-top-left-radius: var(--r);
  }
  .notch::before, .notch::after {
    content: ""; position: absolute; width: var(--r); height: var(--r);
    background: radial-gradient(circle at 0 0, transparent calc(var(--r) - .5px), var(--bg) var(--r));
  }
  .notch::before { right: 0; bottom: 100%; }
  .notch::after { right: 100%; bottom: 0; }
  .notch__badge {
    display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%;
    background: var(--rust-500); color: var(--ink-950); transition: transform 300ms var(--ease);
  }
  .notch__badge svg { width: 20px; height: 20px; }

  /* ---------- Stats: full-bleed, figures set at different heights */
  .stats--sky {
    height: clamp(560px, 80vh, 740px); padding: 0; border-radius: 0;
    color: rgb(255 255 255 / .75);
  }
  .stats--sky .stats__bg { opacity: .6; filter: grayscale(.9) contrast(1.05); }
  .stats--sky::after { background: linear-gradient(180deg, rgb(22 24 26 / .65) 0%, rgb(22 24 26 / .2) 45%, rgb(22 24 26 / .92) 100%); }
  .stats--sky .wrap { height: 100%; }
  .sky { display: grid; grid-template-columns: repeat(4, 1fr); height: 100%; list-style: none; padding: 0; }
  .sky__item { position: relative; }
  .sky__item::before {
    content: ""; position: absolute; left: 0; top: var(--y); bottom: 0; width: 1px;
    background: linear-gradient(180deg, rgb(255 255 255 / .7), rgb(255 255 255 / .12));
    transform-origin: top; transition: scale 1400ms var(--ease);
  }
  .sky__item::after {
    content: ""; position: absolute; left: -5px; top: calc(var(--y) - 5px); width: 11px; height: 11px;
    border-radius: 50%; border: 1.5px solid var(--white); background: var(--rust-500);
  }
  .sky__item:nth-child(2)::before { transition-delay: 150ms; }
  .sky__item:nth-child(3)::before { transition-delay: 300ms; }
  .sky__item:nth-child(4)::before { transition-delay: 450ms; }
  @media (scripting: enabled) { .stats--sky:not(.is-drawn) .sky__item::before { scale: 1 0; } }
  .sky__content { position: absolute; top: calc(var(--y) - .35rem); left: 0; padding-left: 1.4rem; }
  .stats--sky .stats__fig { font-weight: 600; font-variant-numeric: normal; }
  .stats--sky .stats__cap { max-width: 17ch; color: rgb(255 255 255 / .75); }
  @media (max-width: 860px) {
    .stats--sky { height: auto; padding-block: var(--sp-8); }
    .sky { grid-template-columns: 1fr 1fr; row-gap: var(--sp-7); }
    .sky__item { --y: 0% !important; }
    .sky__content { position: static; padding-top: 0; }
  }

  /* ---------- Što nas razlikuje: 3 columns */
  .diff {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    grid-template-areas: "intro feat" "media feat" "head feat";
    grid-template-rows: auto auto 1fr;
    gap: var(--sp-5) clamp(2rem, 1rem + 4vw, 5rem);
  }
  .diff__intro { grid-area: intro; }
  .diff__media { grid-area: media; border-radius: var(--r-xl); overflow: hidden; }
  .diff__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
  .diff__head { grid-area: head; align-self: end; display: grid; gap: var(--sp-5); justify-items: start; }
  .diff__head h2 { font-size: clamp(1.9rem, 1.4rem + 1.8vw, 2.9rem); }
  .diff__features { grid-area: feat; display: grid; grid-template-columns: 1fr 1fr; column-gap: clamp(1.5rem, 1rem + 2.5vw, 3.5rem); }
  .dfeat { display: grid; gap: .55rem; align-content: start; padding-block: 1.9rem; border-top: 1px solid var(--line); }
  .dfeat:nth-child(-n + 2) { padding-top: 0; border-top: 0; }
  .dfeat__icon { display: grid; place-items: center; width: 50px; height: 50px; margin-bottom: .5rem; border-radius: 50%; background: var(--rust-500); color: var(--ink-950); }
  .dfeat__icon svg { width: 22px; height: 22px; }
  .dfeat h3 { font-size: 1.25rem; letter-spacing: -0.02em; }
  .dfeat p { font-size: var(--fs-sm); line-height: 1.6; }
  @media (max-width: 960px) {
    .diff { grid-template-columns: 1fr; grid-template-areas: "intro" "head" "media" "feat"; grid-template-rows: none; }
    .diff__features { margin-top: var(--sp-5); }
  }
  @media (max-width: 600px) {
    .diff__features { grid-template-columns: 1fr; }
    .dfeat:nth-child(2) { padding-top: 1.9rem; border-top: 1px solid var(--line); }
  }

  /* ---------- Usluge: dark band with an expanding photo accordion */
  .svc-dark { background: var(--ink-950); color: rgb(255 255 255 / .7); padding-block: var(--sp-8); }
  .acc { display: flex; gap: 10px; height: clamp(460px, 44vw, 580px); }
  .acc__panel {
    position: relative; isolation: isolate; overflow: hidden; flex: 1 1 0; min-width: 0;
    border-radius: var(--r-lg); cursor: pointer; background: var(--ink-800);
    transition: flex-grow 650ms var(--ease);
  }
  .acc__panel.is-active { flex-grow: 5.5; cursor: default; }
  .acc__panel > img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; transition: transform 900ms var(--ease); }
  .acc__panel::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgb(22 24 26 / .25), rgb(22 24 26 / .35) 45%, rgb(22 24 26 / .9)); }
  .acc__panel:not(.is-active):hover > img { transform: scale(1.06); }
  .acc__label {
    position: absolute; left: 50%; bottom: 1.6rem; translate: -50% 0; rotate: 180deg;
    writing-mode: vertical-rl; white-space: nowrap; color: var(--white);
    font-size: 1.15rem; font-weight: 600; letter-spacing: -0.01em; transition: opacity 250ms;
  }
  .acc__panel.is-active .acc__label { opacity: 0; }
  .acc__body {
    position: absolute; left: 0; bottom: 0; width: max(100%, 380px);
    display: grid; gap: .75rem; justify-items: start; padding: clamp(1.25rem, 1rem + 1.5vw, 2.25rem);
    opacity: 0; translate: 0 14px; pointer-events: none;
    transition: opacity 250ms, translate 450ms var(--ease);
  }
  .acc__panel.is-active .acc__body { opacity: 1; translate: 0 0; pointer-events: auto; transition-delay: 220ms; }
  .acc__body h3 { font-size: clamp(1.7rem, 1.2rem + 1.5vw, 2.5rem); }
  .acc__body p { max-width: 40ch; font-size: var(--fs-sm); color: rgb(255 255 255 / .82); }
  .acc .track-tag { background: rgb(255 255 255 / .14); color: var(--white); backdrop-filter: blur(6px); }
  .svc-dark__more { justify-content: center; margin-top: var(--sp-6); }
  @media (max-width: 860px) {
    .acc { flex-direction: column; height: auto; }
    .acc__panel { flex: none; height: 76px; transition: height 550ms var(--ease); }
    .acc__panel.is-active { height: 430px; }
    .acc__label { writing-mode: horizontal-tb; rotate: none; left: 1.25rem; top: 50%; bottom: auto; translate: 0 -50%; }
    .acc__body { width: 100%; }
  }

  /* ---------- Naš bager: three portrait cards + access check */
  .crew { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-4); }
  /* 4:3 matches the client's photos, so the whole frame shows (no crop) */
  .crew__media { position: relative; overflow: hidden; aspect-ratio: 4 / 3; border-radius: var(--r-xl); background: var(--cream-100); }
  .crew__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 700ms var(--ease); }
  .crew__card:hover .crew__media img { transform: scale(1.04); }
  .crew__tag {
    position: absolute; left: 14px; bottom: 14px; padding: .5em 1.1em; border-radius: var(--r-pill);
    background: var(--white); color: var(--ink-950); font-size: .8rem; font-weight: 600;
  }
  .crew__fig {
    margin-top: 1.2rem; color: var(--ink-950); line-height: 1; font-weight: 600;
    font-size: clamp(2.2rem, 1.7rem + 1.6vw, 3rem); letter-spacing: -0.045em; font-variant-numeric: tabular-nums;
  }
  .crew__fig small { margin-left: .12em; font-size: .5em; color: var(--rust-600); letter-spacing: 0; }
  .crew__card > p:last-child { margin-top: .5rem; font-size: var(--fs-sm); line-height: 1.6; }
  .checker {
    display: grid; grid-template-columns: 1fr 1.15fr auto; align-items: center; gap: var(--sp-5) var(--sp-6);
    margin-top: var(--sp-7); padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
    border-radius: var(--r-xl); background: var(--ink-950); color: rgb(255 255 255 / .72);
  }
  .checker h3 { margin-bottom: .5rem; font-size: clamp(1.4rem, 1.2rem + .8vw, 1.9rem); }
  .checker p { font-size: var(--fs-sm); }
  .checker .access__check { margin: 0; padding: 0; border: 0; }
  .checker .access__result { min-height: 1.6em; }
  .checker .btn-row { flex-direction: column; align-items: stretch; }
  .checker .btn-row .btn { justify-content: space-between; }
  .home #kako-radimo { padding-top: 0; }
  @media (max-width: 1080px) { .checker { grid-template-columns: 1fr; } .checker .btn-row { flex-direction: row; } }
  @media (max-width: 860px) { .crew { grid-template-columns: 1fr; } .crew__media { aspect-ratio: 4 / 3; } }

  /* ---------- Kako radimo */
  .flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-5); list-style: none; padding: 0; }
  .flow li { display: grid; gap: .6rem; align-content: start; }
  .flow__num {
    display: flex; align-items: center; gap: .7rem; margin-bottom: .6rem; padding-bottom: 1rem;
    border-bottom: 1px solid var(--line); color: var(--ink-950); font-size: .9rem; font-weight: 600;
  }
  .flow__num::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--rust-500); }
  .flow h3 { font-size: 1.3rem; letter-spacing: -0.02em; }
  .flow p { font-size: var(--fs-sm); line-height: 1.6; }
  @media (max-width: 960px) { .flow { grid-template-columns: 1fr 1fr; row-gap: var(--sp-6); } }
  @media (max-width: 560px) { .flow { grid-template-columns: 1fr; } }

  /* ---------- Područje rada: large map with the text card on top */
  .area-map { position: relative; isolation: isolate; }
  .map--home { height: clamp(520px, 46vw, 660px); min-height: 0; border: 0; border-radius: var(--r-xl); z-index: 0; }
  .area-map__card {
    position: absolute; z-index: 2; top: 24px; left: 24px; bottom: 24px;
    display: flex; flex-direction: column; justify-content: flex-end; gap: var(--sp-4);
    width: min(440px, 42%); padding: clamp(1.5rem, 1rem + 1.5vw, 2.5rem);
    border-radius: var(--r-lg); background: var(--white); box-shadow: var(--shadow-lg);
  }
  .area-map__card .eyebrow { margin-bottom: auto; }
  .area-map__card h2 { font-size: clamp(1.9rem, 1.4rem + 1.6vw, 2.8rem); }
  .area-map__card p { font-size: var(--fs-sm); line-height: 1.65; }
  .area-map__card .btn-row { margin-top: var(--sp-3); }
  .area-map__legend {
    position: absolute; z-index: 2; right: 20px; bottom: 34px;
    display: inline-flex; align-items: center; gap: .55rem; padding: .45rem .9rem;
    border-radius: var(--r-pill); background: var(--white); box-shadow: var(--shadow-md);
    color: var(--ink-950); font-size: .8rem; font-weight: 600;
  }
  /* Map consent prompt sits in the part of the map the card doesn't cover */
  @media (min-width: 901px) { .map--home .map__fallback { padding-left: calc(min(440px, 42%) + 48px); } }
  .area-map__legend span { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--rust-600); background: rgb(187 94 40 / .15); }
  @media (max-width: 900px) {
    .area-map { display: flex; flex-direction: column; gap: 12px; }
    .map--home { height: 380px; }
    .area-map__card { position: static; width: auto; box-shadow: none; background: var(--cream-100); }
    .area-map__card .eyebrow { margin-bottom: 0; }
    .area-map__legend { top: 16px; left: 16px; right: auto; bottom: auto; }
  }

  /* ---------- Česta pitanja: list + photo */
  .qa { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: clamp(2rem, 1rem + 4vw, 5rem); align-items: start; }
  .qa .head-split { margin-bottom: var(--sp-6); }
  .home .faq { max-width: none; margin: 0; }
  .home .faq details { border-color: transparent; border-radius: var(--r-lg); background: var(--cream-50); }
  .home .faq details[open] { background: var(--cream-100); }
  .home .faq summary { padding: 1.2rem 1.4rem; }
  .home .faq details > div { padding: 0 1.4rem 1.3rem; }
  .qa__media { position: sticky; top: calc(var(--nav-h) + 48px); overflow: hidden; aspect-ratio: 4 / 5; border-radius: var(--r-xl); }
  .qa__media img { width: 100%; height: 100%; object-fit: cover; }
  .qa__card {
    position: absolute; left: 16px; right: 16px; bottom: 16px; display: grid; gap: .2rem;
    padding: 1.2rem 1.4rem; border-radius: var(--r-lg); background: var(--white); box-shadow: var(--shadow-md);
    font-size: .88rem;
  }
  .qa__card a { color: var(--ink-950); font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); font-weight: 650; letter-spacing: -0.03em; text-decoration: none; font-variant-numeric: tabular-nums; }
  .qa__card a:hover { color: var(--rust-600); }
  @media (max-width: 900px) { .qa { grid-template-columns: 1fr; } .qa__media { position: relative; top: auto; aspect-ratio: 4 / 3; } }

  /* ---------- Radovi: bento gallery of the client's own photos */
  .gal { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: clamp(180px, 16vw, 250px); grid-auto-flow: dense; gap: 12px; }
  .gal__item { position: relative; overflow: hidden; margin: 0; border-radius: var(--r-lg); background: var(--ink-900); }
  .gal__item--wide { grid-column: span 2; }
  .gal__item--tall { grid-row: span 2; }
  .gal__item a { display: block; height: 100%; cursor: zoom-in; }
  .gal__item img { width: 100%; height: 100%; object-fit: cover; transition: transform 700ms var(--ease); }
  .gal__item figcaption {
    position: absolute; inset: auto 0 0; padding: 2.5rem 1rem .9rem; pointer-events: none;
    background: linear-gradient(180deg, transparent, rgb(22 24 26 / .82));
    color: var(--white); font-size: .85rem; font-weight: 600; line-height: 1.35;
    opacity: 0; translate: 0 8px; transition: opacity 300ms, translate 300ms var(--ease);
  }
  .gal__item:hover img { transform: scale(1.05); }
  .gal__item:is(:hover, :focus-within) figcaption { opacity: 1; translate: 0 0; }
  @media (hover: none) { .gal__item figcaption { opacity: 1; translate: none; } }
  @media (max-width: 900px) { .gal { grid-template-columns: 1fr 1fr; grid-auto-rows: 170px; } }

  /* Lightbox (main.js): the original photo at full size */
  .lightbox { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgb(14 15 16 / .94); }
  .lightbox::backdrop { background: transparent; }
  .lightbox figure { height: 100%; margin: 0; display: grid; grid-template-rows: 1fr auto; place-items: center; gap: .75rem; padding: 64px 16px 20px; }
  .lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 10px; }
  .lightbox figcaption { color: rgb(255 255 255 / .85); font-size: .95rem; text-align: center; }
  .lightbox__close { position: absolute; top: 16px; right: 16px; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--white); color: var(--ink-950); font-size: 1.6rem; line-height: 1; }

  .crew__fig--name { font-size: clamp(1.6rem, 1.3rem + 1vw, 2.1rem); }

  /* ---------- Closing image band; the footer card overlaps its lower part */
  .finale {
    --overlap: 280px;
    position: relative; isolation: isolate; overflow: hidden;
    padding: var(--sp-9) 0 calc(var(--sp-8) + var(--overlap));
    background: var(--ink-950); color: rgb(255 255 255 / .8); text-align: center;
  }
  .finale > img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; opacity: .62; }
  .finale::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgb(22 24 26 / .55), rgb(22 24 26 / .35) 50%, rgb(22 24 26 / .8)); }
  .finale__inner { display: grid; justify-items: center; gap: var(--sp-5); }
  .finale h2 { max-width: 15ch; font-size: clamp(2.5rem, 1.4rem + 4.2vw, 5.2rem); line-height: .98; letter-spacing: -0.045em; }
  .finale p { margin-inline: auto; }
  .finale .btn-row { justify-content: center; }

  .home .site-footer {
    position: relative; z-index: 1;
    width: min(100% - 2 * var(--gutter), var(--wrap));
    margin: calc(-1 * 280px) auto var(--gutter);
    padding: clamp(2rem, 1.5rem + 2vw, 3.5rem) clamp(1.25rem, 1rem + 2vw, 3rem) 0;
    border-radius: var(--r-xl); background: var(--white); color: var(--body-600); box-shadow: var(--shadow-lg);
  }
  .home .site-footer > .wrap { width: 100%; }
  .home .site-footer a { color: var(--ink-900); }
  .home .site-footer a:hover { color: var(--rust-600); }
  .home .footer__h { color: var(--ink-950); }
  .home .footer__brand img { background: var(--cream-100); }
  .home .socials a { border-color: var(--line); }
  .home .legal-bar { border-top-color: var(--line); }
  .home .site-footer :focus-visible { outline-color: var(--ink-950); }

  /* ---------- Back to top */
  .to-top {
    position: fixed; right: 24px; bottom: 24px; z-index: 60;
    display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%;
    background: var(--rust-500); color: var(--ink-950); box-shadow: var(--shadow-md);
    opacity: 0; translate: 0 12px; pointer-events: none; transition: opacity 300ms, translate 300ms var(--ease);
  }
  .to-top.is-visible { opacity: 1; translate: 0 0; pointer-events: auto; }
  .to-top svg { width: 20px; height: 20px; }
  @media (max-width: 767px) { .to-top { display: none; } }
}


/* Leaflet's stylesheet is injected later and unlayered, so map overrides live outside the layer */
.map--home .leaflet-tile-pane { filter: grayscale(1) sepia(.18) contrast(.92) brightness(1.04); }
.map--home .leaflet-tooltip.map-label {
  padding: 2px 8px; border: 0; border-radius: 999px; box-shadow: 0 2px 8px rgb(22 24 26 / .15);
  background: #fff; color: #16181a; font: 600 12px/1.4 "Inter Tight", system-ui, sans-serif;
}
.map--home .leaflet-tooltip.map-label::before { display: none; }
.map--home .leaflet-control-zoom { border: 0; box-shadow: 0 4px 14px rgb(22 24 26 / .15); }
.map--home .leaflet-control-zoom a { width: 36px; height: 36px; line-height: 36px; }
.map--home .leaflet-top.leaflet-left { left: auto; right: 0; }
.map--home .leaflet-top.leaflet-left .leaflet-control { margin: 16px 16px 0 0; float: right; }
