/* ==========================================================================
   KATIC — MK Katić Interijeri d.o.o.
   One stylesheet, four cascade layers. Every colour, radius, space and shadow
   is a custom property in :root — no hex values below that block.
   ========================================================================== */

@layer reset, base, components, utilities;

/* ---------- Fonts (self-hosted, latin + latin-ext for č ć đ š ž) ---------- */
@font-face {
  font-family: "Figtree";
  src: url("../fonts/figtree-latin-wght-normal.202cfb54d4e6.woff2") format("woff2-variations");
  font-weight: 300 900; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Figtree";
  src: url("../fonts/figtree-latin-ext-wght-normal.eca8d8b337ff.woff2") format("woff2-variations");
  font-weight: 300 900; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("../fonts/cormorant-garamond-latin-500-normal.efeea72c7a42.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("../fonts/cormorant-garamond-latin-ext-500-normal.60704cc35ffe.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Tokens ---------- */
:root {
  /* Red sampled from the supplied card scan (core of the rule under the phone number ≈ rgb(182 41 57)). */
  --red-700: #9A1F2E;
  --red-600: #B8293A;   /* THE accent. White on it = 6.1 : 1 (AA for all text sizes) */
  --red-500: #E0485A;   /* on dark backgrounds only */
  --red-100: #F6E1E3;
  --red-50:  #FCF4F5;

  --ink-950: #171412;   /* dark sections, footer */
  --ink-900: #221E1B;
  --ink-800: #37302C;
  --ink-700: #4A423D;
  --body-600: #655C57;  /* body copy: 6.3 : 1 on white, 5.7 : 1 on stone-50 */
  --stone-50: #F6F3EE;  /* page paper */
  --stone-100: #EDE7DF; /* tinted sections */
  --stone-200: #E2DAD0;
  --line: #E3DCD3;
  --white: #FFFFFF;
  --black: #000000;

  --text: var(--ink-950);
  --text-muted: var(--body-600);
  --accent: var(--red-600);
  --accent-hover: var(--red-700);
  --on-dark: var(--white);
  --on-dark-muted: color-mix(in oklab, var(--white) 70%, var(--ink-950));
  --on-dark-line: color-mix(in srgb, var(--white) 14%, transparent);
  --focus: var(--red-600);

  /* Type */
  --font-sans: "Figtree", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-serif: "Cormorant Garamond", "EB Garamond", Garamond, "Times New Roman", serif;
  --fs-xs: 0.78rem;
  --fs-sm: 0.9375rem;
  --fs-base: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  --fs-lg: clamp(1.1rem, 1.02rem + 0.4vw, 1.3rem);
  --fs-h4: clamp(1.15rem, 1.05rem + 0.4vw, 1.35rem);
  --fs-h3: clamp(1.35rem, 1.15rem + 0.8vw, 1.8rem);
  --fs-h2: clamp(2.1rem, 1.4rem + 3vw, 4rem);
  --fs-h1: clamp(2.6rem, 1.3rem + 4.4vw, 5.1rem);
  --fs-stat: clamp(2.8rem, 2rem + 3vw, 4.4rem);

  /* Space */
  --sp-1: 0.25rem; --sp-2: 0.5rem; --sp-3: 0.75rem; --sp-4: 1rem; --sp-5: 1.5rem;
  --sp-6: 2rem; --sp-7: 3rem; --sp-8: 4rem;
  --section-y: clamp(4.5rem, 3rem + 6vw, 8.5rem);
  --gutter: clamp(1rem, 0.6rem + 2vw, 2.5rem);
  --page-max: 78rem;
  --frame: clamp(0.5rem, 0.2rem + 1vw, 1rem);   /* inset of the rounded dark bands */

  /* Radii */
  --r-xl: 32px;
  --r-lg: 24px;
  --r-card: 20px;
  --r-img: 16px;
  --r-sm: 12px;
  --r-pill: 999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px color-mix(in srgb, var(--ink-950) 6%, transparent);
  --shadow-md: 0 14px 34px -14px color-mix(in srgb, var(--ink-950) 24%, transparent);
  --shadow-lg: 0 30px 70px -24px color-mix(in srgb, var(--ink-950) 38%, transparent);

  /* Motion */
  --ease: cubic-bezier(.2, .7, .2, 1);
  --dur: 520ms;

  --header-h: 4.25rem;
  --header-top: 0.75rem;
  --scroll-offset: 6.5rem;
}

/* ==========================================================================
   RESET
   ========================================================================== */
@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  * { margin: 0; }
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  body { min-height: 100svh; line-height: 1.65; -webkit-font-smoothing: antialiased; }
  img, picture, svg, video { display: block; max-width: 100%; }
  img { height: auto; }
  input, button, textarea, select { font: inherit; color: inherit; }
  button { cursor: pointer; background: none; border: 0; padding: 0; }
  ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
  a { color: inherit; }
  dialog { padding: 0; border: 0; margin: auto; }   /* restore UA centring removed by the margin reset */
}

/* ==========================================================================
   BASE
   ========================================================================== */
@layer base {
  @media (prefers-reduced-motion: no-preference) {
    html:not(.lenis) { scroll-behavior: smooth; }
  }
  body {
    font-family: var(--font-sans);
    font-size: var(--fs-base);
    color: var(--text-muted);
    background: var(--stone-50);
    overflow-x: clip;
  }
  h1, h2, h3, h4 {
    font-family: var(--font-sans);
    color: var(--text);
    font-weight: 600;
    line-height: 1.08;
    letter-spacing: -0.035em;
    text-wrap: balance;
  }
  h2 { font-size: var(--fs-h2); }
  h3 { font-size: var(--fs-h3); letter-spacing: -0.025em; line-height: 1.15; }
  h4 { font-size: var(--fs-h4); }
  p { text-wrap: pretty; max-width: 68ch; }
  strong { color: var(--text); font-weight: 650; }
  a { text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
  :focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
  .on-dark :focus-visible { outline-color: var(--white); }
  ::selection { background: var(--red-100); color: var(--ink-950); }
  section[id], [id].anchor { scroll-margin-top: var(--scroll-offset); }   /* Lenis honours this too */
}

/* ==========================================================================
   COMPONENTS
   ========================================================================== */
@layer components {

  /* ---------- Layout ---------- */
  .container { width: min(100% - 2 * var(--gutter), var(--page-max)); margin-inline: auto; }
  .section { padding-block: var(--section-y); }
  .section--tint { background: var(--stone-100); }
  .section--dark {
    background: var(--ink-950); color: var(--on-dark-muted);
    margin-inline: var(--frame); border-radius: var(--r-xl);
  }
  .section--dark h2, .section--dark h3 { color: var(--white); }
  .section--dark strong { color: var(--white); }

  .section__head { display: grid; gap: var(--sp-4); margin-bottom: clamp(2.25rem, 1.5rem + 3vw, 4.5rem); }
  .section__head--center { justify-items: center; text-align: center; }
  .section__head--center p { margin-inline: auto; }
  .section__head--split { gap: var(--sp-5) var(--sp-7); align-items: end; }
  .section__head--split > div { display: grid; gap: var(--sp-4); justify-items: start; }
  @media (min-width: 56em) {
    .section__head--split { grid-template-columns: 1.4fr 1fr; }
    .section__head--split .lead { padding-bottom: 0.4em; }
  }
  .lead { font-size: var(--fs-lg); line-height: 1.55; }

  /* Serif accent words inside sans headlines */
  .serif {
    font-family: var(--font-serif); font-weight: 500;
    font-size: 1.1em; letter-spacing: -0.01em; line-height: 0.9;
  }

  /* ---------- Skip link ---------- */
  .skip-link {
    position: absolute; left: var(--sp-4); top: -100px; z-index: 1000;
    background: var(--ink-950); color: var(--white); padding: var(--sp-3) var(--sp-5);
    border-radius: var(--r-pill); font-weight: 600; text-decoration: none;
  }
  .skip-link:focus { top: var(--sp-4); }

  /* ---------- Eyebrow with asterisk ---------- */
  .eyebrow {
    display: inline-flex; align-items: center; gap: 0.55em;
    font-size: var(--fs-xs); font-weight: 650; text-transform: uppercase;
    letter-spacing: 0.16em; color: var(--text);
  }
  .eyebrow svg { width: 0.95rem; height: 0.95rem; color: var(--accent); flex: none; }
  .on-dark .eyebrow { color: var(--on-dark); }
  .on-dark .eyebrow svg { color: var(--red-500); }

  /* ---------- Buttons ---------- */
  .btn {
    --btn-bg: var(--accent); --btn-fg: var(--white);
    display: inline-flex; align-items: center; justify-content: center; gap: 0.6em;
    min-height: 48px; padding: 0.7em 1.2em 0.7em 1.45em;
    border-radius: var(--r-pill); background: var(--btn-bg); color: var(--btn-fg);
    font-weight: 600; font-size: var(--fs-sm); text-decoration: none; line-height: 1.2;
    transition: background-color 200ms var(--ease), color 200ms var(--ease), box-shadow 200ms var(--ease), transform 200ms var(--ease);
    border: 1px solid transparent;
  }
  .btn:hover { background: var(--accent-hover); }
  .btn:active { transform: translateY(1px); }
  .btn__arrow { width: 1.05em; height: 1.05em; flex: none; transition: transform 250ms var(--ease); }
  .btn:hover .btn__arrow, .btn:focus-visible .btn__arrow { transform: translateX(3px); }
  .btn--ghost { --btn-bg: transparent; --btn-fg: var(--text); border-color: color-mix(in srgb, var(--ink-950) 18%, transparent); padding-inline: 1.45em; }
  .btn--ghost:hover { background: var(--white); border-color: var(--ink-950); }
  .on-dark .btn--ghost { --btn-fg: var(--white); border-color: color-mix(in srgb, var(--white) 30%, transparent); }
  .on-dark .btn--ghost:hover { background: color-mix(in srgb, var(--white) 10%, transparent); }
  .btn--dark { --btn-bg: var(--ink-950); }
  .btn--dark:hover { background: var(--ink-800); }
  .btn--light { --btn-bg: var(--white); --btn-fg: var(--ink-950); }
  .btn--light:hover { background: var(--stone-100); }
  .btn--sm { min-height: 42px; padding: 0.55em 1em 0.55em 1.25em; }
  .btn--lg { font-size: var(--fs-base); min-height: 56px; padding-inline: 1.6em 1.35em; }
  .btn-row { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center; }
  .btn .count { opacity: 0.6; font-variant-numeric: tabular-nums; }
  .btn svg.icon { width: 1.2em; height: 1.2em; }

  /* ---------- Placeholder marker (visible until the client supplies the value) ---------- */
  .ph {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.82em; font-weight: 600;
    color: var(--red-700); background: var(--red-50);
    outline: 1px dashed color-mix(in srgb, var(--red-600) 55%, transparent);
    padding: 0.05em 0.35em; border-radius: 4px; white-space: nowrap;
  }
  .on-dark .ph, .stat-card--accent .ph { color: var(--white); background: color-mix(in srgb, var(--white) 14%, transparent); outline-color: color-mix(in srgb, var(--white) 55%, transparent); }

  /* ==========================================================================
     HEADER — transparent and full-width over the hero; once the page scrolls
     it tightens into the floating glass pill. main.js toggles .is-top.
     ========================================================================== */
  .header-slot { height: calc(var(--header-h) + var(--header-top)); }
  .site-header {
    position: fixed; z-index: 90; top: var(--header-top);
    left: 50%; translate: -50% 0; width: min(100% - 2 * var(--frame), var(--page-max) + 2rem);
    height: var(--header-h);
    display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4);
    padding: 0 0.6rem 0 1.25rem;
    border-radius: var(--r-pill);
    background: color-mix(in srgb, var(--white) 88%, transparent);
    border: 1px solid color-mix(in srgb, var(--ink-950) 8%, transparent);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4);
    transition:
      width 600ms var(--ease), top 600ms var(--ease), padding 600ms var(--ease),
      background-color 400ms var(--ease), border-color 400ms var(--ease), box-shadow 500ms var(--ease),
      backdrop-filter 400ms var(--ease), -webkit-backdrop-filter 400ms var(--ease);
  }
  /* At the very top: no surface at all, spread to the page gutters */
  .site-header.is-top {
    top: calc(var(--header-top) + 0.5rem); width: calc(100% - 2 * var(--gutter)); padding-inline: 0;
    background-color: transparent; border-color: transparent; box-shadow: none;
    backdrop-filter: none; -webkit-backdrop-filter: none;
  }
  /* The pill "lands" when it appears: a short drop with a slight squash */
  .site-header.is-landing { animation: header-land 600ms var(--ease); }
  @keyframes header-land {
    0%   { translate: -50% -10px; scale: 0.98; }
    60%  { translate: -50% 2px; }
    100% { translate: -50% 0; scale: 1; }
  }
  .brand-lockup__mark { transition: scale 600ms var(--ease); transform-origin: left center; }
  .site-header.is-top .brand-lockup__mark { scale: 1.12; }

  .brand-lockup { display: inline-flex; align-items: center; gap: 0.65rem; text-decoration: none; color: var(--text); }
  .brand-lockup__mark { width: 2.4rem; height: auto; color: var(--red-600); }
  .brand-lockup__word { font-family: var(--font-serif); font-weight: 500; font-size: 1.5rem; letter-spacing: 0.2em; line-height: 1; }

  .main-nav ul { display: flex; gap: 0.25rem; list-style: none; padding: 0; }
  .main-nav a {
    display: block; color: var(--body-600); text-decoration: none; font-size: var(--fs-sm); font-weight: 550;
    padding: 0.55rem 0.9rem; border-radius: var(--r-pill); transition: color 200ms, background-color 200ms;
  }
  .main-nav a:hover { color: var(--text); background: color-mix(in srgb, var(--ink-950) 5%, transparent); }
  .main-nav a[aria-current="true"] { color: var(--white); background: var(--ink-950); }
  /* Six links + phone + CTA: tighten the pills until there is room */
  @media (max-width: 79.99em) { .main-nav ul { gap: 0; } .main-nav a { padding-inline: 0.6rem; } }
  .header-cta { display: flex; align-items: center; gap: var(--sp-2); }
  .header-phone {
    display: inline-flex; align-items: center; gap: 0.45em; padding: 0 0.9rem; min-height: 42px;
    font-weight: 600; font-size: var(--fs-sm); color: var(--text); text-decoration: none; font-variant-numeric: tabular-nums;
  }
  .header-phone svg { width: 1rem; height: 1rem; color: var(--accent); }
  .header-phone:hover { color: var(--accent); }

  .nav-toggle {
    display: none; width: 48px; height: 48px; border-radius: 50%;
    background: var(--ink-950); align-items: center; justify-content: center; color: var(--white);
  }
  .nav-toggle svg { width: 22px; height: 22px; }

  @media (max-width: 63.99em) {
    .main-nav, .header-phone { display: none; }
  }
  @media (max-width: 47.99em) {
    .header-cta .btn { display: none; }
    .nav-toggle { display: inline-flex; }
  }
  @media (min-width: 48em) and (max-width: 63.99em) {
    .nav-toggle { display: inline-flex; }
  }

  .mobile-nav {
    position: fixed; inset: 0; z-index: 120; background: var(--ink-950); color: var(--white);
    padding: var(--sp-5) var(--gutter); width: 100%; height: 100%; max-width: none; max-height: none;
  }
  .mobile-nav::backdrop { background: transparent; }
  .mobile-nav .brand-lockup { color: var(--white); }
  .mobile-nav .brand-lockup__mark { color: var(--red-500); }
  .mobile-nav .nav-toggle { background: color-mix(in srgb, var(--white) 10%, transparent); }
  .mobile-nav__top { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--sp-7); }
  .mobile-nav ul { list-style: none; padding: 0; display: grid; }
  .mobile-nav ul a { display: block; padding: var(--sp-3) 0; font-size: clamp(1.6rem, 1.2rem + 2vw, 2.2rem); font-weight: 600; letter-spacing: -0.03em; text-decoration: none; border-bottom: 1px solid var(--on-dark-line); }
  .mobile-nav ul a[aria-current="true"] { color: var(--red-500); }
  .mobile-nav .btn { margin-top: var(--sp-6); width: 100%; }

  /* Open: the panel grows as a circle from the hamburger (top right), then the links rise in one by one.
     Close: main.js adds .is-closing, plays the reverse, then calls close(). */
  @media (prefers-reduced-motion: no-preference) {
    .mobile-nav[open] { animation: nav-reveal 620ms cubic-bezier(.7, 0, .2, 1) both; }
    .mobile-nav[open] .mobile-nav__top,
    .mobile-nav[open] li,
    .mobile-nav[open] > .btn { animation: nav-item 560ms var(--ease) both; animation-delay: calc(240ms + var(--n, 0) * 55ms); }
    .mobile-nav[open] .mobile-nav__top { --n: -2; }
    .mobile-nav[open] li:nth-child(1) { --n: 0; }
    .mobile-nav[open] li:nth-child(2) { --n: 1; }
    .mobile-nav[open] li:nth-child(3) { --n: 2; }
    .mobile-nav[open] li:nth-child(4) { --n: 3; }
    .mobile-nav[open] li:nth-child(5) { --n: 4; }
    .mobile-nav[open] li:nth-child(6) { --n: 5; }
    .mobile-nav[open] li:nth-child(7) { --n: 6; }
    .mobile-nav[open] > .btn { --n: 7; }
    .mobile-nav[open] .nav-toggle svg { animation: nav-x 500ms var(--ease) 300ms both; }
    .mobile-nav.is-closing { animation: nav-conceal 420ms cubic-bezier(.7, 0, .3, 1) both; }
    .mobile-nav.is-closing .mobile-nav__top, .mobile-nav.is-closing li, .mobile-nav.is-closing > .btn { animation: nav-item-out 220ms ease both; }
  }
  @keyframes nav-reveal { from { clip-path: circle(0 at calc(100% - 2.6rem) 2.6rem); } to { clip-path: circle(150vmax at calc(100% - 2.6rem) 2.6rem); } }
  @keyframes nav-conceal { from { clip-path: circle(150vmax at calc(100% - 2.6rem) 2.6rem); } to { clip-path: circle(0 at calc(100% - 2.6rem) 2.6rem); } }
  @keyframes nav-item { from { opacity: 0; transform: translateY(22px); } }
  @keyframes nav-item-out { to { opacity: 0; transform: translateY(-10px); } }
  @keyframes nav-x { from { transform: rotate(-90deg) scale(0.4); opacity: 0; } }

  /* ==========================================================================
     HERO — the page as a wall of tile joints; a few cells are "laid" with square
     crops of real materials from our sites. Everything is sized from one cell:
     --cell = hero width / --cols, so joints, tiles and the headline stay aligned.
     ========================================================================== */
  .hero {
    --cols: 6; --cell: calc(100cqi / var(--cols)); --joint: 3px;
    container-type: inline-size;
    margin-top: calc(-1 * (var(--header-h) + var(--header-top)));   /* runs up under the floating header */
  }
  @media (min-width: 64em) { .hero { --cols: 12; } }

  .hero__inner {
    position: relative; isolation: isolate; overflow: hidden;
    background-color: var(--stone-50);
    background-image:
      linear-gradient(90deg, color-mix(in srgb, var(--ink-950) 7%, transparent) 1px, transparent 1px),
      linear-gradient(color-mix(in srgb, var(--ink-950) 7%, transparent) 1px, transparent 1px);
    background-size: var(--cell) var(--cell);
    /* mobile: header over rows 0–1, tiles on row 2, the copy block is exactly --rows cells tall from row 3,
       and two more rows of tiles sit below it — so every tile stays on a joint whatever the text length */
    --rows: 7;
    padding: calc(3 * var(--cell) + var(--sp-4)) var(--gutter) calc(2 * var(--cell) + var(--sp-5));
  }
  @media (max-width: 63.99em) {
    /* joints fade out under the floating header instead of running into it */
    .hero__inner::before {
      content: ""; position: absolute; inset: 0 0 auto; height: calc(2 * var(--cell)); z-index: -1; pointer-events: none;
      background: linear-gradient(var(--stone-50) 35%, transparent);
    }
    .hero .tile { border-radius: 6px; box-shadow: 0 10px 24px -14px color-mix(in srgb, var(--ink-950) 45%, transparent), 0 1px 2px color-mix(in srgb, var(--ink-950) 10%, transparent); }
    .hero .tile--brand { box-shadow: 0 14px 30px -14px color-mix(in srgb, var(--red-600) 70%, transparent); }
    .hero .hero__content h1 { font-size: calc(var(--cell) * 1.05); }
    .hero .hero__sub { font-size: 1.08rem; max-width: 24rem; }
    .hero .btn-row { display: grid; width: 100%; gap: var(--sp-2); }
    .hero .btn-row .btn { justify-content: center; }
  }
  /* narrow phones: smaller cells, so the copy needs one more row before the lower tiles */
  @media (max-width: 23.99em) { .hero__inner { --rows: 8; } }
  /* tablets: 6 wide cells make the mosaic too tall — use 8 columns there */
  @media (min-width: 40em) and (max-width: 63.99em) { .hero { --cols: 8; } .hero__inner { --rows: 6; } .hero .hero__content h1 { font-size: calc(var(--cell) * 1.3); } }
  @media (min-width: 64em) {
    .hero__inner {
      min-height: max(100svh, 6 * var(--cell)); display: grid; align-items: center;
      padding: calc(var(--header-h) + var(--header-top)) 0 var(--sp-6) var(--cell);   /* copy starts on column 1 */
    }
  }
  /* soft fade so the joints don't end in a hard line */
  .hero__inner::after {
    content: ""; position: absolute; inset: auto 0 0; height: 30%; z-index: -1; pointer-events: none;
    background: linear-gradient(transparent, var(--stone-50));
  }

  /* Laid tiles — placed on the joint grid by column / row / span */
  .hero__wall { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
  .tile {
    position: absolute; aspect-ratio: 1;
    left: calc(var(--c) * var(--cell) + var(--joint));
    top: calc(var(--r) * var(--cell) + var(--joint));
    width: calc(var(--s, 1) * var(--cell) - 2 * var(--joint) + 1px);
    background: var(--stone-200) center / cover no-repeat; border-radius: 3px;
    box-shadow: 0 1px 2px color-mix(in srgb, var(--ink-950) 12%, transparent);
    animation: tile-lay 700ms var(--ease) both; animation-delay: calc(150ms + var(--i) * 90ms);
  }
  @media (max-width: 63.99em) {
    .tile {
      left: calc(var(--mc) * var(--cell) + var(--joint)); top: calc(var(--mr) * var(--cell) + var(--joint));
      width: calc(var(--ms, var(--s, 1)) * var(--cell) - 2 * var(--joint) + 1px);
    }
    .tile[style*="--mb"] { top: calc((3 + var(--rows) + var(--mb)) * var(--cell) + var(--joint)); }
    .hero__content { min-height: calc(var(--rows) * var(--cell) - var(--sp-4)); align-content: start; }
    .hero .btn-row { margin-top: var(--sp-3); }   /* a little air under the subtitle */
    .hero__inner::after { height: 8%; }
    .tile:not([style*="--mc"]) { display: none; }
  }
  .tile--brand { background: var(--accent); display: grid; place-items: center; color: var(--white); }
  .tile--brand svg { width: 58%; aspect-ratio: 283 / 211; }
  @keyframes tile-lay { from { opacity: 0; transform: translateY(-14px) scale(1.05); } }

  .hero__content { display: grid; gap: clamp(1.25rem, 1rem + 1vw, 2rem); justify-items: start; position: relative; }
  .hero h1 {
    font-size: min(calc(var(--cell) * 1.1), 11rem); line-height: 0.9; letter-spacing: -0.055em; font-weight: 600;
    display: grid;   /* "Katić" over "Interijeri" */
  }
  .hero h1 .serif { color: var(--accent); font-size: 1.08em; letter-spacing: -0.02em; line-height: 0.95; }
  .hero__sub { font-size: var(--fs-lg); line-height: 1.55; max-width: 30rem; margin-top: 0.5em; }

  /* ==========================================================================
     O NAMA — statement + bento of photos and honest stat cards
     ========================================================================== */
  .about { display: grid; gap: var(--sp-5) clamp(2rem, 1rem + 4vw, 6rem); margin-bottom: clamp(2.5rem, 1.5rem + 3vw, 4.5rem); }
  @media (min-width: 56em) { .about { grid-template-columns: 1.25fr 1fr; align-items: end; } }
  .about__intro { display: grid; gap: var(--sp-4); justify-items: start; }
  .about__body { display: grid; gap: var(--sp-5); }
  .about__lead { font-size: var(--fs-lg); line-height: 1.55; }
  .check-list { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
  .check-list li {
    display: inline-flex; gap: 0.5em; align-items: center; padding: 0.45em 0.95em 0.45em 0.7em;
    border-radius: var(--r-pill); background: var(--white); border: 1px solid var(--line);
    font-size: var(--fs-sm); font-weight: 600; color: var(--text);
  }
  .check-list svg { width: 1rem; height: 1rem; color: var(--accent); flex: none; }

  /* Mobile: photo slider on top, then the two stat cards stacked. */
  .about-grid {
    display: grid; gap: clamp(0.6rem, 0.4rem + 0.8vw, 1rem);
    grid-template-columns: 1fr;
    grid-template-areas: "sl" "s1" "s3";
  }
  .about-slider { grid-area: sl; }
  .about-slider > :nth-child(1) { grid-area: p1; }
  .about-slider > :nth-child(2) { grid-area: p2; }
  .about-grid > .stat-card--dark { grid-area: s1; }
  .about-grid > .stat-card--accent { grid-area: s3; }
  @media (max-width: 39.99em) {
    .about-slider {
      display: flex; gap: var(--sp-3); overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
      margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter);
      scrollbar-width: none; -webkit-overflow-scrolling: touch;
    }
    .about-slider::-webkit-scrollbar { display: none; }
    .about-slider .about-grid__photo { flex: 0 0 86%; aspect-ratio: 3 / 4; min-height: 0; scroll-snap-align: start; box-shadow: var(--shadow-md); }
    .about-slider .about-grid__photo figcaption { font-size: var(--fs-sm); }
  }
  @media (min-width: 40em) {
    .about-slider { display: contents; }
    .about-grid { grid-template-columns: 1fr 1fr; grid-template-areas: "p1 s1" "p2 s3"; }
  }
  @media (min-width: 64em) {
    .about-grid { grid-template-columns: 1fr 1fr 1fr; grid-template-areas: "p1 s1 p2" "p1 s3 p2"; }
  }
  .about-grid__photo { position: relative; overflow: hidden; border-radius: var(--r-lg); min-height: 16rem; background: var(--stone-200); }
  .about-grid__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
  .about-grid__photo figcaption {
    position: absolute; inset: auto var(--sp-3) var(--sp-3); padding: var(--sp-3) var(--sp-4);
    border-radius: var(--r-sm); background: color-mix(in srgb, var(--ink-950) 72%, transparent);
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    color: var(--white); font-size: var(--fs-xs); line-height: 1.45; font-weight: 500;
  }
  @media (min-width: 64em) { .about-grid__photo { min-height: 0; } }

  .stat-card {
    display: grid; gap: var(--sp-2); align-content: end; justify-items: start;
    padding: clamp(1.25rem, 1rem + 1vw, 2rem); border-radius: var(--r-lg);
    background: var(--white); border: 1px solid var(--line); min-height: 14rem;
  }
  .stat-card__figure { font-size: var(--fs-stat); font-weight: 600; color: var(--text); line-height: 1; letter-spacing: -0.05em; font-variant-numeric: tabular-nums; }
  .stat-card__figure--text { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem); }
  .stat-card__figure .ph { font-size: 0.4em; letter-spacing: 0; }
  .stat-card__label { font-weight: 650; color: var(--text); line-height: 1.3; }
  .stat-card p { font-size: var(--fs-sm); }
  .stat-card--dark { background: var(--ink-950); border-color: var(--ink-950); color: var(--on-dark-muted); }
  .stat-card--dark .stat-card__figure, .stat-card--dark .stat-card__label { color: var(--white); }
  .stat-card--dark .ph { color: var(--white); background: color-mix(in srgb, var(--white) 14%, transparent); outline-color: color-mix(in srgb, var(--white) 50%, transparent); }
  .stat-card--accent { background: var(--red-600); border-color: var(--red-600); color: color-mix(in srgb, var(--white) 85%, var(--red-600)); }
  .stat-card--accent .stat-card__figure, .stat-card--accent .stat-card__label { color: var(--white); }
  .stat-card--accent .btn { margin-top: var(--sp-3); }

  .check-circle {
    display: inline-grid; place-items: center; width: 1.75rem; height: 1.75rem; border-radius: 50%;
    background: var(--accent); color: var(--white); flex: none;
  }
  .check-circle svg { width: 0.95rem; height: 0.95rem; }

  /* ==========================================================================
     USLUGE — photo bento
     ========================================================================== */
  .svc-bento {
    display: grid; gap: clamp(0.6rem, 0.4rem + 0.8vw, 1rem);
    grid-template-columns: 1fr; grid-auto-rows: 24rem;
  }
  /* Phones: one row of cards, swiped left/right; the next card peeks in */
  @media (max-width: 39.99em) {
    .svc-bento {
      display: flex; gap: var(--sp-3); overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
      margin-inline: calc(-1 * var(--gutter)); padding: 0 var(--gutter) var(--sp-2); scroll-padding-inline: var(--gutter);
      list-style: none; scrollbar-width: none;
    }
    .svc-bento::-webkit-scrollbar { display: none; }
    .svc-bento > .svc { flex: 0 0 84%; height: 28rem; scroll-snap-align: start; box-shadow: var(--shadow-md); }
  }
  @media (min-width: 40em) {
    .svc-bento { grid-template-columns: 1fr 1fr; grid-auto-rows: 22rem; }
    .svc--xl, .svc--wide { grid-column: span 2; }
  }
  @media (min-width: 64em) {
    .svc-bento { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 20rem; }
    .svc--xl { grid-column: span 2; grid-row: span 2; }
    .svc--wide { grid-column: span 4; }
  }
  .svc {
    position: relative; overflow: hidden; border-radius: var(--r-lg); background: var(--ink-900);
    isolation: isolate; color: var(--white);
  }
  .svc > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 900ms var(--ease); }
  .svc:hover > img { transform: scale(1.05); }
  .svc::after {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(180deg, color-mix(in srgb, var(--ink-950) 30%, transparent) 0%, transparent 28%, color-mix(in srgb, var(--ink-950) 55%, transparent) 55%, color-mix(in srgb, var(--ink-950) 92%, transparent) 100%);
  }
  .svc__body { position: absolute; inset: 0; display: grid; grid-template-rows: auto 1fr auto auto; padding: clamp(1.1rem, 0.9rem + 1vw, 1.75rem); gap: var(--sp-3); }
  .svc__num {
    justify-self: start; padding: 0.3em 0.75em; border-radius: var(--r-pill);
    background: color-mix(in srgb, var(--white) 18%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    font-size: var(--fs-xs); font-weight: 650; letter-spacing: 0.08em; font-variant-numeric: tabular-nums;
  }
  .svc h3 { grid-row: 3; color: var(--white); font-size: var(--fs-h3); }
  .svc--xl h3 { font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.6rem); }
  .svc ul { grid-row: 4; display: grid; gap: 0.3rem; font-size: var(--fs-sm); color: color-mix(in srgb, var(--white) 82%, transparent); line-height: 1.45; }
  .svc li { padding-left: 1.1em; position: relative; }
  .svc li::before { content: ""; position: absolute; left: 0; top: 0.68em; width: 0.5em; height: 1.5px; background: var(--red-500); }
  .svc a { color: var(--white); }

  .cta-band {
    margin-top: clamp(1rem, 0.6rem + 1vw, 1.5rem); display: flex; flex-wrap: wrap; gap: var(--sp-4) var(--sp-6); align-items: center; justify-content: space-between;
    background: var(--white); border: 1px solid var(--line); padding: var(--sp-4) var(--sp-4) var(--sp-4) clamp(1.25rem, 1rem + 1vw, 2rem); border-radius: var(--r-lg);
  }
  .cta-band p { font-size: var(--fs-lg); color: var(--text); }

  /* ==========================================================================
     ADAPTACIJA — ključ u ruke: intro + prije/nakon pair, numbered scope cards
     ========================================================================== */
  .reno { display: grid; gap: clamp(2rem, 1rem + 3vw, 5rem); margin-bottom: clamp(2.5rem, 1.5rem + 3vw, 4.5rem); }
  @media (min-width: 56em) { .reno { grid-template-columns: 1.1fr 1fr; align-items: center; } }
  .reno__head { display: grid; gap: var(--sp-4); justify-items: start; }
  .reno__cta { display: flex; justify-content: center; margin-top: clamp(2rem, 1.5rem + 2vw, 3rem); }
  .reno__photos { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); align-items: start; }
  .reno__photos figure { position: relative; border-radius: var(--r-lg); overflow: hidden; background: var(--stone-200); }
  .reno__photos figure:last-child { margin-top: clamp(1.5rem, 1rem + 3vw, 4rem); }
  .reno__photos img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
  .reno__photos figcaption {
    position: absolute; inset: auto var(--sp-3) var(--sp-3); padding: var(--sp-2) var(--sp-3); border-radius: var(--r-sm);
    background: color-mix(in srgb, var(--white) 88%, transparent); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    color: var(--text); font-size: var(--fs-xs); font-weight: 550;
  }
  .reno__photos figcaption strong { display: block; color: var(--accent); text-transform: uppercase; letter-spacing: 0.08em; }
  /* Single-row infinite marquee; the track holds the list twice, so -50% lands exactly on the copy */
  /* Without JS or with reduced motion it stays a plain swipeable row; main.js adds .is-looping */
  .reno__marquee { overflow-x: auto; scroll-snap-type: x mandatory; padding-block: var(--sp-2); }
  .reno__marquee .reno__scope li { scroll-snap-align: start; }
  .reno__track { display: flex; width: max-content; }
  .reno__marquee.is-looping {
    overflow: hidden;
    mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  }
  .is-looping .reno__track { animation: reno-marquee 45s linear infinite; }
  .is-looping:hover .reno__track, .is-looping:focus-within .reno__track, .is-looping.is-paused .reno__track { animation-play-state: paused; }
  @keyframes reno-marquee { to { transform: translateX(-50%); } }
  .reno__scope { list-style: none; padding: 0 var(--sp-3) 0 0; margin: 0; counter-reset: r; display: flex; gap: var(--sp-3); }
  .reno__scope li {
    flex: none; width: clamp(15rem, 13rem + 6vw, 19rem);
    display: grid; gap: var(--sp-2); align-content: start; padding: var(--sp-5); border-radius: var(--r-card);
    background: var(--stone-100); border: 1px solid var(--line);
  }
  .reno__scope li::before {
    counter-increment: r; content: "0" counter(r);
    font-size: var(--fs-sm); font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums;
  }
  .reno__scope h3 { font-size: var(--fs-base); letter-spacing: -0.01em; }
  .reno__scope p { font-size: var(--fs-sm); }

  /* ==========================================================================
     NAŠI RADOVI — dark band, photo cards
     ========================================================================== */
  .filters { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-bottom: var(--sp-3); list-style: none; padding: 0; }
  .chip {
    min-height: 44px; padding: 0.5em 1.1em; border-radius: var(--r-pill);
    border: 1px solid var(--line); background: var(--white); color: var(--text);
    font-size: var(--fs-sm); font-weight: 600; transition: background-color 200ms, border-color 200ms, color 200ms;
  }
  .chip:hover { border-color: var(--ink-700); }
  .chip[aria-pressed="true"] { background: var(--ink-950); color: var(--white); border-color: var(--ink-950); }
  .chip .count { opacity: 0.55; font-weight: 500; margin-left: 0.35em; font-variant-numeric: tabular-nums; }

  /* On the dark band: one frosted segmented bar; the active filter is a red pill with a soft glow,
     counts sit in small round badges. Phones: a single row you swipe, faded at the right edge. */
  .on-dark .filters {
    display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 5px; margin-bottom: var(--sp-3);
    border-radius: calc(var(--r-pill) + 5px); background: color-mix(in srgb, var(--white) 5%, transparent);
    border: 1px solid var(--on-dark-line); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  }
  .on-dark .chip {
    display: inline-flex; align-items: center; gap: 0.5em; min-height: 42px; padding: 0.45em 0.6em 0.45em 1.05em;
    background: transparent; border-color: transparent; color: color-mix(in srgb, var(--white) 72%, transparent);
    transition: background-color 250ms, color 250ms, box-shadow 300ms, transform 200ms var(--ease);
  }
  .on-dark .chip:hover { color: var(--white); background: color-mix(in srgb, var(--white) 8%, transparent); }
  .on-dark .chip:active { transform: scale(0.96); }
  .on-dark .chip[aria-pressed="true"] {
    background: var(--red-600); color: var(--white); border-color: var(--red-600);
    box-shadow: 0 10px 24px -10px color-mix(in srgb, var(--red-600) 90%, transparent), inset 0 1px 0 color-mix(in srgb, var(--white) 22%, transparent);
  }
  .on-dark .chip .count {
    display: inline-grid; place-items: center; min-width: 1.6rem; height: 1.6rem; padding: 0 0.4rem; margin: 0;
    border-radius: var(--r-pill); font-size: 0.72rem; font-weight: 650; opacity: 1;
    background: color-mix(in srgb, var(--white) 10%, transparent); color: inherit;
  }
  .on-dark .chip[aria-pressed="true"] .count { background: color-mix(in srgb, var(--white) 24%, transparent); }
  @media (max-width: 47.99em) {
    .filters-wrap { position: relative; margin-inline: calc(-1 * var(--gutter)); }
    .on-dark .filters {
      display: flex; flex-wrap: nowrap; width: max-content; max-width: calc(100% - 2 * var(--gutter)); margin-inline: var(--gutter);
      overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity;
      mask-image: linear-gradient(90deg, #000 85%, transparent); -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent);
    }
    .on-dark .filters::-webkit-scrollbar { display: none; }
    .on-dark .filters li { flex: none; scroll-snap-align: start; }
    .filters-wrap .filter-status { padding-inline: var(--gutter); }
  }
  .filters-wrap .filter-status { font-size: var(--fs-sm); margin-bottom: var(--sp-4); min-height: 1.7em; }

  .projects { display: grid; gap: clamp(0.6rem, 0.4rem + 0.8vw, 1rem); grid-template-columns: 1fr; list-style: none; padding: 0; }
  /* Phones: projects and the Kako radimo steps become a row of cards swiped left/right */
  @media (max-width: 39.99em) {
    ul.projects, ol.steps {
      display: flex; gap: var(--sp-3); overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
      margin-inline: calc(-1 * var(--gutter)); padding: 0 var(--gutter) var(--sp-2); scroll-padding-inline: var(--gutter);
      scrollbar-width: none;
    }
    .projects::-webkit-scrollbar, .steps::-webkit-scrollbar { display: none; }
    .projects > .project { flex: 0 0 84%; scroll-snap-align: start; }
    .projects > .project[hidden] { display: none; }
    .projects > .projects__empty { flex: 1 0 100%; }
    ol.steps > .step { flex: 0 0 78%; scroll-snap-align: start; }
  }
  @media (min-width: 40em) {
    .projects { grid-template-columns: 1fr 1fr; }
    .project--featured { grid-column: span 2; }
  }
  @media (min-width: 64em) { .projects { grid-template-columns: repeat(4, 1fr); } }
  .project[hidden] { display: none; }
  .project__btn {
    position: relative; display: block; width: 100%; height: clamp(22rem, 18rem + 10vw, 28rem);
    text-align: left; border-radius: var(--r-lg); overflow: hidden; isolation: isolate; color: var(--white);
    background: var(--ink-900);
  }
  .project__img { position: absolute; inset: 0; z-index: -2; }
  .project__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 900ms var(--ease); }
  .project__btn:hover .project__img img { transform: scale(1.05); }
  .project__btn::after {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(180deg, color-mix(in srgb, var(--ink-950) 35%, transparent) 0%, transparent 25%, transparent 45%, color-mix(in srgb, var(--ink-950) 92%, transparent) 100%);
  }
  .project__body { position: absolute; inset: auto 0 0; padding: clamp(1rem, 0.8rem + 1vw, 1.6rem); display: grid; gap: 0.35rem; }
  .project__kat { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.14em; font-weight: 650; color: var(--red-500); }
  .project__title { font-size: var(--fs-h4); font-weight: 600; color: var(--white); line-height: 1.2; letter-spacing: -0.02em; }
  .project--featured .project__title { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.9rem); letter-spacing: -0.03em; }
  .project__count { font-size: var(--fs-xs); color: color-mix(in srgb, var(--white) 72%, transparent); }
  .project__meta { display: flex; flex-wrap: wrap; gap: 0.35em 1em; font-size: var(--fs-xs); color: color-mix(in srgb, var(--white) 78%, transparent); }
  .project__meta span { display: inline-flex; gap: 0.35em; align-items: center; }
  .project__meta svg { width: 1em; height: 1em; }
  .project__phases { position: absolute; top: var(--sp-3); left: var(--sp-3); display: flex; gap: var(--sp-1); }
  .phase-tag {
    background: color-mix(in srgb, var(--white) 88%, transparent); color: var(--ink-950);
    font-size: 0.7rem; font-weight: 650; padding: 0.3em 0.7em; border-radius: var(--r-pill);
  }
  .project__open {
    position: absolute; top: var(--sp-3); right: var(--sp-3); width: 2.75rem; height: 2.75rem; border-radius: 50%;
    display: grid; place-items: center; background: var(--white); color: var(--ink-950);
    transition: transform 300ms var(--ease), background-color 200ms;
  }
  .project__open svg { width: 1.1rem; height: 1.1rem; }
  .project__btn:hover .project__open { transform: rotate(45deg); background: var(--red-600); color: var(--white); }
  .ribbon {
    position: absolute; top: 1.15rem; right: -2.75rem; width: 10rem; transform: rotate(40deg);
    background: var(--accent); color: var(--white); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.16em;
    padding: 0.3em 0; text-align: center; box-shadow: var(--shadow-sm);
  }
  .projects__empty { padding: var(--sp-6); border: 1px dashed var(--on-dark-line); border-radius: var(--r-card); text-align: center; grid-column: 1 / -1; }
  .projects__more { display: flex; justify-content: center; margin-top: var(--sp-6); }
  .projects__more .btn[hidden] { display: none; }

  /* ---------- Project dialog ---------- */
  /* Mobile: bottom sheet with the cover on top. Desktop (56em+): split — cover left, content right. */
  .project-dialog {
    width: 100%; max-width: 100%; height: min(94svh, 100%); max-height: 94svh; margin: auto 0 0;
    border-radius: var(--r-xl) var(--r-xl) 0 0; background: var(--white); color: var(--body-600);
    box-shadow: var(--shadow-lg); overflow: hidden; padding: 0;
  }
  .project-dialog::backdrop { background: color-mix(in srgb, var(--ink-950) 78%, transparent); backdrop-filter: blur(10px) saturate(0.8); -webkit-backdrop-filter: blur(10px) saturate(0.8); }
  .project-dialog[open] { display: grid; grid-template-rows: 32svh minmax(0, 1fr); }
  @media (min-width: 56em) {
    .project-dialog { width: min(100% - 3rem, 78rem); height: min(88svh, 54rem); margin: auto; border-radius: var(--r-xl); }
    .project-dialog[open] { grid-template-rows: minmax(0, 1fr); grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
  }
  @media (prefers-reduced-motion: no-preference) {
    .project-dialog[open] { animation: pd-in 520ms var(--ease) both; }
    .project-dialog[open]::backdrop { animation: pd-fade 360ms ease both; }
    .project-dialog[open] .pd__cover img { animation: pd-zoom 1400ms var(--ease) both; }
    .project-dialog[open] .pd__pair li { animation: pd-rise 560ms var(--ease) both; animation-delay: calc(180ms + var(--i, 0) * 60ms); }
    .project-dialog.is-instant[open], .project-dialog.is-instant[open]::backdrop,
    .project-dialog.is-instant[open] .pd__cover img, .project-dialog.is-instant[open] .pd__pair li { animation: none; }
  }
  /* Shown non-modally beneath the lightbox (radovi.js): mimic the modal position and backdrop */
  .project-dialog.is-under { position: fixed; inset: 0; z-index: 9990; box-shadow: 0 0 0 100vmax color-mix(in srgb, var(--ink-950) 78%, transparent); }
  @keyframes pd-in { from { opacity: 0; transform: translateY(40px) scale(0.985); } }
  @keyframes pd-fade { from { opacity: 0; } }
  @keyframes pd-zoom { from { transform: scale(1.08); } }
  @keyframes pd-rise { from { opacity: 0; transform: translateY(14px); } }

  /* Cover panel */
  .pd__media { position: relative; overflow: hidden; background: var(--ink-950); }
  .pd__cover { position: absolute; inset: 0; display: block; width: 100%; cursor: zoom-in; }
  .pd__cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 900ms var(--ease); }
  .pd__cover:hover img { transform: scale(1.03); }
  .pd__cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, color-mix(in srgb, var(--ink-950) 35%, transparent), transparent 30%, transparent 60%, color-mix(in srgb, var(--ink-950) 70%, transparent)); pointer-events: none; }
  .pd__cover-phases { position: absolute; z-index: 1; top: var(--sp-4); left: var(--sp-4); display: flex; flex-wrap: wrap; gap: var(--sp-1); }
  .pd__cover-cta {
    position: absolute; z-index: 1; left: var(--sp-4); bottom: var(--sp-4); display: inline-flex; align-items: center; gap: 0.55em;
    padding: 0.6em 1.05em 0.6em 0.8em; border-radius: var(--r-pill); font-size: var(--fs-sm); font-weight: 600; color: var(--white);
    background: color-mix(in srgb, var(--white) 16%, transparent); border: 1px solid color-mix(in srgb, var(--white) 30%, transparent);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); transition: background-color 250ms, color 250ms;
  }
  .pd__cover-cta svg { width: 1.1rem; height: 1.1rem; }
  .pd__cover:hover .pd__cover-cta, .pd__cover:focus-visible .pd__cover-cta { background: var(--white); color: var(--ink-950); }

  /* Content column */
  .pd__main { display: grid; grid-template-rows: auto minmax(0, 1fr); min-height: 0; }
  .project-dialog .project__kat { color: var(--accent); }
  .pd__head { display: flex; justify-content: space-between; gap: var(--sp-4); align-items: start; padding: clamp(1.25rem, 1rem + 1vw, 2rem) clamp(1.25rem, 1rem + 1.5vw, 2.5rem) var(--sp-4); }
  .pd__head > div { display: grid; gap: var(--sp-2); }
  .pd__head h2 { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.4rem); line-height: 1.08; letter-spacing: -0.03em; color: var(--text); text-wrap: balance; }
  .pd__close {
    width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; flex: none; color: var(--text);
    background: var(--stone-100); border: 1px solid var(--line); transition: background-color 200ms, color 200ms, transform 300ms var(--ease);
  }
  .pd__close:hover { background: var(--ink-950); color: var(--white); transform: rotate(90deg); }
  .pd__close svg { width: 18px; height: 18px; }
  .pd__scroll {
    overflow-y: auto; overscroll-behavior: contain; display: grid; gap: clamp(1.5rem, 1.2rem + 1vw, 2.25rem); align-content: start;
    padding: 0 clamp(1.25rem, 1rem + 1.5vw, 2.5rem) clamp(1.25rem, 1rem + 1.5vw, 2.5rem);
    scrollbar-width: thin; scrollbar-color: var(--stone-200) transparent;
  }
  .pd__specs { display: flex; flex-wrap: wrap; border-block: 1px solid var(--line); margin: 0; }
  .pd__specs div { flex: 1 1 9rem; padding: var(--sp-3) var(--sp-4) var(--sp-3) 0; display: grid; gap: 0.15rem; align-content: start; }
  .pd__specs div + div { padding-left: var(--sp-4); border-left: 1px solid var(--line); }
  .pd__specs dt { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.14em; font-weight: 650; }
  .pd__specs dd { color: var(--text); font-weight: 600; font-size: var(--fs-sm); margin: 0; }
  .pd__lead { font-size: var(--fs-lg); line-height: 1.6; color: var(--text); max-width: 60ch; }
  .pd__group { display: grid; gap: var(--sp-3); }
  .pd__group h3 { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.16em; color: var(--text); }
  .pd__group h3::after { content: ""; flex: 1; height: 1px; background: var(--line); }
  .pd__group-count { display: inline-grid; place-items: center; min-width: 1.6rem; height: 1.6rem; padding: 0 0.4rem; border-radius: var(--r-pill); background: var(--red-50); color: var(--accent); font-size: 0.7rem; letter-spacing: 0; }
  .pd__pair { display: grid; gap: var(--sp-2); grid-template-columns: repeat(auto-fill, minmax(min(100%, 9.5rem), 1fr)); list-style: none; padding: 0; }
  .pd__thumb { display: block; width: 100%; border-radius: var(--r-img); overflow: hidden; position: relative; cursor: zoom-in; isolation: isolate; }
  .pd__thumb img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; transition: transform 700ms var(--ease), filter 400ms; }
  .pd__thumb::after { content: ""; position: absolute; inset: 0; background: color-mix(in srgb, var(--ink-950) 38%, transparent); opacity: 0; transition: opacity 300ms; }
  .pd__thumb:hover img, .pd__thumb:focus-visible img { transform: scale(1.07); }
  .pd__thumb:hover::after, .pd__thumb:focus-visible::after { opacity: 1; }
  .pd__zoom {
    position: absolute; z-index: 1; left: 50%; top: 50%; width: 44px; height: 44px; border-radius: 50%; background: var(--white); color: var(--ink-950);
    display: grid; place-items: center; opacity: 0; transform: translate(-50%, -50%) scale(0.6); transition: opacity 300ms, transform 400ms var(--ease);
  }
  .pd__thumb:hover .pd__zoom, .pd__thumb:focus-visible .pd__zoom { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  @media (hover: none) { .pd__zoom { opacity: 1; transform: none; left: auto; top: auto; right: var(--sp-2); bottom: var(--sp-2); width: 34px; height: 34px; } }
  .pd__zoom svg { width: 18px; height: 18px; }
  .pd__cta {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-4);
    padding: var(--sp-5); border-radius: var(--r-lg); background: var(--ink-950); color: var(--on-dark-muted);
    background-image: radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--red-600) 32%, transparent), transparent 55%);
  }
  .pd__cta > div:first-child { display: grid; gap: 0.2rem; font-size: var(--fs-sm); }
  .pd__cta strong { color: var(--white); font-size: var(--fs-lg); letter-spacing: -0.01em; }
  .pd__cta-btns { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3); }
  .pd__cta-phone { display: inline-flex; align-items: center; gap: 0.45em; color: var(--white); font-weight: 600; font-size: var(--fs-sm); text-decoration: none; font-variant-numeric: tabular-nums; }
  .pd__cta-phone svg { width: 1rem; height: 1rem; color: var(--red-500); }
  .pd__cta-phone:hover { text-decoration: underline; text-underline-offset: 0.2em; }
  .pd__demo { font-size: var(--fs-sm); background: var(--red-50); color: var(--red-700); padding: var(--sp-3) var(--sp-4); border-radius: var(--r-sm); }

  /* ==========================================================================
     KAKO RADIMO — numbered timeline
     ========================================================================== */
  .steps { display: grid; gap: var(--sp-3); grid-template-columns: 1fr; list-style: none; padding: 0; counter-reset: s; }
  @media (min-width: 40em) { .steps { grid-template-columns: 1fr 1fr; } }
  @media (min-width: 64em) { .steps { grid-template-columns: repeat(4, 1fr); } }
  /* Step card: big outlined number top-right, short red rule, title, text. Hover lifts it and inks the number. */
  .step {
    position: relative; overflow: hidden; isolation: isolate; display: grid; gap: var(--sp-3); align-content: start;
    min-height: 16rem; padding: clamp(1.4rem, 1.1rem + 1vw, 2rem); padding-top: clamp(4.5rem, 4rem + 2vw, 5.5rem);
    border-radius: var(--r-lg); background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
    transition: transform 400ms var(--ease), box-shadow 400ms var(--ease), border-color 300ms;
  }
  .step::before {
    counter-increment: s; content: "0" counter(s);
    position: absolute; z-index: -1; top: 0.4rem; right: 1rem;
    font-size: clamp(4.5rem, 3.8rem + 2vw, 6rem); font-weight: 700; line-height: 1; letter-spacing: -0.06em; font-variant-numeric: tabular-nums;
    color: transparent; -webkit-text-stroke: 1.5px var(--stone-200); transition: -webkit-text-stroke-color 300ms, color 300ms;
  }
  .step::after { content: ""; position: absolute; top: clamp(1.4rem, 1.1rem + 1vw, 2rem); left: clamp(1.4rem, 1.1rem + 1vw, 2rem); width: 2.25rem; height: 4px; border-radius: 4px; background: var(--accent); }
  .step:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: transparent; }
  .step:hover::before { -webkit-text-stroke-color: var(--accent); }
  .step:first-child { background: var(--ink-950); border-color: var(--ink-950); color: var(--on-dark-muted); }
  .step:first-child h3 { color: var(--white); }
  .step:first-child::before { -webkit-text-stroke-color: color-mix(in srgb, var(--white) 22%, transparent); }
  .step h3 { font-size: var(--fs-h4); letter-spacing: -0.02em; }
  .step p { font-size: var(--fs-sm); line-height: 1.6; }

  /* ==========================================================================
     PRIJE DOLASKA
     ========================================================================== */
  .prep { display: grid; gap: clamp(2rem, 1rem + 3vw, 5rem); }
  @media (min-width: 56em) { .prep { grid-template-columns: 1fr 1.1fr; align-items: start; } }
  .prep__head { display: grid; gap: var(--sp-4); justify-items: start; }
  .prep__photo { position: relative; margin-top: var(--sp-4); border-radius: var(--r-lg); overflow: hidden; width: 100%; }
  .prep__photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
  .prep__photo figcaption {
    position: absolute; inset: auto var(--sp-3) var(--sp-3); padding: var(--sp-3) var(--sp-4); border-radius: var(--r-sm);
    background: color-mix(in srgb, var(--white) 88%, transparent); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    color: var(--text); font-size: var(--fs-xs); font-weight: 550;
  }
  .prep__list { list-style: none; padding: 0; display: grid; gap: var(--sp-3); }
  .prep__list li {
    display: grid; grid-template-columns: auto 1fr; gap: var(--sp-4); align-items: start;
    padding: var(--sp-5); border-radius: var(--r-card); background: var(--white); border: 1px solid var(--line);
    transition: transform 300ms var(--ease), box-shadow 300ms var(--ease);
  }
  .prep__list li:hover { transform: translateX(4px); box-shadow: var(--shadow-md); }
  .prep__icon { display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: var(--r-sm); background: var(--red-50); color: var(--accent); }
  .prep__icon svg { width: 1.4rem; height: 1.4rem; }
  .prep__list strong { display: block; margin-bottom: 0.15rem; }
  .prep__list span { font-size: var(--fs-sm); }

  /* ==========================================================================
     TESTIMONIALS (component kept for later — section is commented out in HTML)
     ========================================================================== */
  .reviews { display: grid; gap: var(--sp-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); }
  .review { background: var(--white); border-radius: var(--r-lg); padding: var(--sp-5); border: 1px solid var(--line); display: grid; gap: var(--sp-3); }

  /* ==========================================================================
     FAQ — native <details>
     ========================================================================== */
  .faq-wrap { display: grid; gap: clamp(2rem, 1rem + 3vw, 5rem); }
  @media (min-width: 60em) {
    .faq-wrap { grid-template-columns: 0.85fr 1.15fr; align-items: start; }
    .faq-wrap__head { position: sticky; top: calc(var(--header-h) + var(--header-top) + 2rem); }
  }
  .faq-wrap__head { display: grid; gap: var(--sp-4); justify-items: start; }
  .faq { display: grid; gap: var(--sp-2); }
  .faq details { border-radius: var(--r-card); background: var(--white); border: 1px solid transparent; transition: border-color 200ms, box-shadow 200ms; }
  .faq details:has(> summary:hover) { border-color: var(--stone-200); }
  .faq details[open] { border-color: var(--ink-950); box-shadow: var(--shadow-md); }
  .faq summary {
    list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: var(--sp-4);
    padding: var(--sp-4) var(--sp-4) var(--sp-4) var(--sp-5); min-height: 64px; font-weight: 600; color: var(--text); font-size: var(--fs-base); letter-spacing: -0.01em;
  }
  .faq summary::-webkit-details-marker { display: none; }
  .faq summary .plus { width: 2.25rem; height: 2.25rem; border-radius: 50%; background: var(--stone-100); display: grid; place-items: center; flex: none; transition: transform 300ms var(--ease), background-color 200ms; }
  .faq summary .plus svg { width: 14px; height: 14px; }
  .faq details[open] .plus { transform: rotate(45deg); background: var(--accent); color: var(--white); }
  .faq .answer { padding: 0 var(--sp-5) var(--sp-5); display: grid; gap: var(--sp-3); }
  .faq .answer p { font-size: var(--fs-base); }

  /* ==========================================================================
     KONTAKT — dark info card + form card
     ========================================================================== */
  .contact { display: grid; gap: clamp(0.75rem, 0.5rem + 1vw, 1.25rem); }
  @media (min-width: 60em) { .contact { grid-template-columns: 0.95fr 1.05fr; align-items: stretch; } }
  /* Stacked (mobile/tablet): the enquiry form comes first, phone/address/map below it */
  @media (max-width: 59.99em) {
    /* One joined card: white form on top, dark direct-contact part below, an "ili" badge on the seam. */
    .contact { gap: 0; border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--shadow-lg); }
    .contact > .reveal { animation: none; }   /* the two halves must not slide in separately */
    .contact > .form-card { order: -1; border-radius: var(--r-xl) var(--r-xl) 0 0; border: 0; padding: var(--sp-6) var(--sp-5) calc(var(--sp-6) + 1rem); }
    .form-card h3 { font-size: 1.9rem; letter-spacing: -0.03em; }
    .form-actions { display: grid; gap: var(--sp-2); justify-items: center; text-align: center; }
    .form-actions .btn { width: 100%; justify-content: center; }

    .contact > .contact__info {
      position: relative; border-radius: 0; padding: calc(var(--sp-7) + 0.5rem) var(--sp-5) var(--sp-5);
      gap: var(--sp-4); justify-items: stretch; text-align: center;
      background: radial-gradient(120% 60% at 50% 0%, color-mix(in srgb, var(--red-600) 22%, transparent), transparent 70%), var(--ink-950);
    }
    .contact__info::before {
      content: "ili"; position: absolute; top: 0; left: 50%; transform: translate(-50%, -50%);
      display: grid; place-items: center; width: 3.25rem; height: 3.25rem; border-radius: 50%;
      background: var(--red-600); color: var(--white); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
      box-shadow: 0 0 0 6px var(--white), 0 12px 24px -8px color-mix(in srgb, var(--red-600) 80%, transparent);
    }
    .contact__info .eyebrow { justify-self: center; }
    .contact__info h2 { font-size: 1.75rem; line-height: 1.15; text-wrap: balance; }
    /* quick actions: a big red call button, then WhatsApp + Viber side by side */
    .contact__info .big-phone {
      justify-self: stretch; justify-content: center; padding: 1rem 1.25rem; margin-top: var(--sp-2);
      border-radius: var(--r-lg); background: var(--red-600); font-size: 1.6rem; letter-spacing: -0.02em;
      box-shadow: 0 14px 28px -14px color-mix(in srgb, var(--red-600) 90%, transparent);
    }
    .contact__info .big-phone svg { color: var(--white); }
    .contact__info .big-phone:hover { color: var(--white); background: var(--red-700); }
    .contact__info .msg-btns { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-2); }
    .contact__info .msg-btns .btn { justify-content: center; padding-inline: 0.75rem; font-size: var(--fs-sm); min-height: 52px; }
    .contact__info .msg-btns__long { display: none; }   /* "Fotografija na WhatsApp" → "WhatsApp" so both buttons fit one line */
    .contact__info .btn--wa { --btn-bg: #1fa855; --btn-fg: var(--white); }
    .contact__info .btn--viber { --btn-bg: #7360f2; --btn-fg: var(--white); border-color: transparent; }
    /* details as tidy rows */
    .contact__info .contact-list { margin-top: var(--sp-3); padding: 0; gap: 0; border-top: 0; text-align: left; }
    .contact__info .contact-list li {
      grid-template-columns: 2.5rem 1fr; align-items: center; padding: var(--sp-3) 0;
      border-bottom: 1px solid var(--on-dark-line);
    }
    .contact__info .contact-list li:last-child { border-bottom: 0; }
    .contact__info .contact-list svg {
      width: 2.5rem; height: 2.5rem; padding: 0.65rem; margin: 0; border-radius: 50%;
      background: color-mix(in srgb, var(--white) 8%, transparent);
    }
    .contact__info .map { height: 15rem; margin-top: var(--sp-2); }
    /* phone, e-mail and address are already in that card just above — don't repeat them in the footer */
    .footer-grid > :last-child { display: none; }
    /* Usluge left, Tvrtka right — the pair centred in the footer rather than hugging the left edge */
    .site-footer .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-grid > nav { min-width: 0; justify-self: center; }
  }
  .contact__info {
    display: grid; gap: var(--sp-5); align-content: start;
    background: var(--ink-950); border-radius: var(--r-xl); padding: clamp(1.5rem, 1rem + 2.5vw, 3rem);
  }
  .contact__info h2 { color: var(--white); font-size: clamp(1.9rem, 1.3rem + 2.2vw, 3rem); }
  .big-phone {
    font-size: clamp(2rem, 1.4rem + 3vw, 3.4rem); font-weight: 650; color: var(--white); text-decoration: none;
    letter-spacing: -0.04em; line-height: 1.05; display: inline-flex; align-items: center; gap: 0.35em;
    font-variant-numeric: tabular-nums; justify-self: start;
  }
  .big-phone svg { width: 0.62em; height: 0.62em; color: var(--red-500); }
  .big-phone:hover { color: var(--red-500); }
  .msg-btns { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
  .btn--wa { --btn-bg: var(--white); --btn-fg: var(--ink-950); }
  .btn--wa:hover { background: var(--stone-100); }
  .btn--viber { --btn-bg: transparent; --btn-fg: var(--white); border-color: color-mix(in srgb, var(--white) 30%, transparent); }
  .btn--viber:hover { background: color-mix(in srgb, var(--white) 10%, transparent); }
  .contact-list { list-style: none; padding: var(--sp-5) 0 0; display: grid; gap: var(--sp-4); border-top: 1px solid var(--on-dark-line); }
  @media (min-width: 36em) { .contact-list { grid-template-columns: 1fr 1fr; } }
  .contact-list li { display: grid; grid-template-columns: 1.5rem 1fr; gap: var(--sp-3); align-items: start; font-size: var(--fs-sm); }
  .contact-list svg { width: 1.2rem; height: 1.2rem; color: var(--red-500); margin-top: 0.2rem; }
  .contact-list a { color: var(--white); font-weight: 600; word-break: break-word; }
  .contact-list small { display: block; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.12em; font-weight: 650; color: var(--on-dark-muted); }
  .map { height: 16rem; border-radius: var(--r-lg); overflow: hidden; background: var(--ink-900); position: relative; z-index: 0; color: var(--on-dark-muted); }
  .map__fallback { display: grid; place-items: center; height: 100%; text-align: center; padding: var(--sp-5); font-size: var(--fs-sm); }
  /* click-to-load: the map (OpenStreetMap) loads only when the visitor asks for it */
  .map__consent { display: grid; justify-items: center; gap: var(--sp-3); max-width: 24rem; }
  .map__consent > svg { width: 1.75rem; height: 1.75rem; color: var(--red-500); }
  .map__consent p { font-size: var(--fs-xs); line-height: 1.55; }
  .map__consent a { color: var(--white); }
  .map__consent > a { font-size: var(--fs-xs); opacity: 0.8; }
  .map-pin { width: 28px; height: 28px; border-radius: 50% 50% 50% 0; background: var(--accent); transform: rotate(-45deg); border: 3px solid var(--white); box-shadow: var(--shadow-md); }

  .form-card { background: var(--white); border-radius: var(--r-xl); padding: clamp(1.25rem, 0.8rem + 2.2vw, 3rem); border: 1px solid var(--line); }
  .form-card h3 { font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.3rem); margin-bottom: var(--sp-2); }
  .form-grid { display: grid; gap: var(--sp-4); grid-template-columns: 1fr; margin-top: var(--sp-5); }
  @media (min-width: 36em) { .form-grid { grid-template-columns: 1fr 1fr; } .field--full { grid-column: 1 / -1; } }
  .field { display: grid; gap: 0.4rem; align-content: start; }
  .field label, .field legend { font-size: var(--fs-sm); font-weight: 600; color: var(--text); }
  .field .req { color: var(--accent); }
  .field .hint, .form-actions .hint { font-size: var(--fs-xs); }
  .field input, .field select, .field textarea {
    width: 100%; min-height: 52px; padding: 0.75rem 1rem;
    border: 1px solid transparent; border-radius: var(--r-sm);
    background: var(--stone-50); color: var(--text); font-size: 1rem;
    transition: border-color 200ms, box-shadow 200ms, background-color 200ms;
  }
  .field input:hover, .field select:hover, .field textarea:hover { border-color: var(--stone-200); }
  .field textarea { min-height: 7.5rem; resize: vertical; }
  .field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
    outline: none; background: var(--white); border-color: var(--ink-950); box-shadow: 0 0 0 4px color-mix(in srgb, var(--red-600) 22%, transparent);
  }
  /* :has() — style the whole field when its control is flagged invalid */
  .field:has([aria-invalid="true"]) input, .field:has([aria-invalid="true"]) select, .field:has([aria-invalid="true"]) textarea { border-color: var(--red-600); border-width: 2px; background: var(--red-50); }
  .field__error { display: none; align-items: center; gap: 0.4em; font-size: var(--fs-sm); font-weight: 600; color: var(--red-700); }
  .field__error svg { width: 1em; height: 1em; flex: none; }
  .field:has([aria-invalid="true"]) .field__error { display: flex; }
  .upload {
    border: 2px dashed color-mix(in srgb, var(--ink-950) 18%, transparent); border-radius: var(--r-card);
    padding: var(--sp-5); background: var(--stone-50); display: grid; gap: var(--sp-2); justify-items: start;
  }
  .upload:has(input:focus-visible) { border-color: var(--accent); }
  .upload strong { font-size: var(--fs-base); }
  .upload input[type="file"] { border: 0; padding: 0; min-height: 44px; background: transparent; }
  .upload__list { font-size: var(--fs-sm); list-style: none; padding: 0; }
  .check-field { display: grid; grid-template-columns: auto 1fr; gap: var(--sp-3); align-items: start; font-size: var(--fs-sm); }
  .check-field input { width: 1.35rem; height: 1.35rem; min-height: 0; margin-top: 0.2rem; accent-color: var(--red-600); }
  .form-actions { margin-top: var(--sp-5); display: flex; flex-wrap: wrap; gap: var(--sp-3) var(--sp-5); align-items: center; }
  .form-privacy { margin-top: var(--sp-4); font-size: var(--fs-xs); line-height: 1.55; }
  .form-privacy a { color: var(--text); }
  .form-error { margin-top: var(--sp-5); padding: var(--sp-3) var(--sp-4); border-radius: var(--r-sm); background: var(--red-50); color: var(--red-700); font-size: var(--fs-sm); font-weight: 600; }
  .form-error[hidden] { display: none; }
  .form-success { display: grid; gap: var(--sp-3); padding: var(--sp-6); text-align: center; justify-items: center; }
  .form-success[hidden] { display: none; }
  .form-success .check-circle { width: 3.5rem; height: 3.5rem; }
  .form-success .check-circle svg { width: 1.6rem; height: 1.6rem; }

  /* ==========================================================================
     FOOTER — compact dark band
     ========================================================================== */
  /* Full-bleed: edge to edge, content runs from the left gutter to the right gutter */
  .site-footer { background: var(--ink-950); color: var(--on-dark-muted); padding-top: clamp(2rem, 1.5rem + 2vw, 3rem); font-size: var(--fs-sm); }
  .site-footer > .container { width: calc(100% - 2 * var(--gutter)); max-width: none; margin-inline: auto; }
  @media (min-width: 64em) { .site-footer > .container { width: 80%; } }
  /* Logo block on its own row, then Usluge and Kontakt side by side */
  /* Phones/tablets: logo block on its own row, Usluge | Tvrtka below (Kontakt hidden — see the KONTAKT block).
     60em+: the original layout — 2 columns, then 4 in one row from 64em. */
  .footer-grid { display: grid; gap: var(--sp-5) var(--sp-4); grid-template-columns: 1fr 1fr; padding-bottom: var(--sp-5); }
  @media (max-width: 59.99em) { .footer-grid > :first-child { grid-column: 1 / -1; } }
  .footer-grid a { overflow-wrap: break-word; }
  /* first column hugs the left edge, last column ends on the right edge */
  @media (min-width: 64em) {
    .footer-grid { grid-template-columns: repeat(4, auto); justify-content: space-between; column-gap: var(--sp-6); }
  }
  .site-footer .footer-logo { color: var(--white); display: grid; gap: var(--sp-3); justify-items: start; text-decoration: none; }
  .footer-logo svg { width: 3.25rem; height: auto; aspect-ratio: 283 / 211; color: var(--red-500); }
  .footer-logo .tag { font-size: 0.72rem; letter-spacing: 0.34em; text-transform: uppercase; color: var(--on-dark-muted); }
  .site-footer h2 { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.16em; color: var(--white); margin-bottom: var(--sp-4); font-weight: 650; }
  .site-footer ul { list-style: none; padding: 0; display: grid; gap: var(--sp-1); }
  .site-footer a { color: var(--on-dark-muted); text-decoration: none; display: inline-block; padding-block: 0.2rem; }
  .site-footer a:hover { color: var(--white); text-decoration: underline; }
  .socials { display: flex; gap: var(--sp-2); margin-top: var(--sp-4); }
  .socials a { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--on-dark-line); display: grid; place-items: center; padding: 0; }
  .socials svg { width: 18px; height: 18px; }
  .legal-bar { border-top: 1px solid var(--on-dark-line); padding-block: var(--sp-4); font-size: var(--fs-xs); line-height: 1.8; display: grid; gap: var(--sp-3); position: relative; }
  @media (min-width: 64em) { .legal-bar { grid-template-columns: 1fr auto; align-items: end; } }
  /* Legal bar: registered data + copyright, and the legal links separated by a subtle "·" */
  .site-footer .legal-bar__links { display: flex; flex-wrap: wrap; gap: 0.25rem 0; list-style: none; padding: 0; }
  .legal-bar__links li + li::before { content: "·"; margin-inline: 0.6em; color: color-mix(in srgb, var(--white) 35%, transparent); }
  .site-footer .legal-bar__links a { padding-block: 0; }
  @media (max-width: 47.99em) {
    .legal-bar { text-align: center; justify-items: center; }
    .site-footer .legal-bar__links { justify-content: center; }
  }

  /* ==========================================================================
     STICKY MOBILE BAR (no cookie notice: the site only sets a strictly necessary CSRF cookie)
     ========================================================================== */
  .mobile-bar { display: none; }
  @media (max-width: 47.99em) {
    .mobile-bar {
      position: fixed; z-index: 80; left: var(--sp-2); right: var(--sp-2); bottom: calc(var(--sp-2) + env(safe-area-inset-bottom)); display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-2);
      padding: var(--sp-2); border-radius: var(--r-pill);
      background: color-mix(in srgb, var(--white) 82%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
      border: 1px solid var(--line); box-shadow: var(--shadow-lg);
    }
    .mobile-bar .btn { width: 100%; }
    body { padding-bottom: 5.5rem; }
  }

  /* ==========================================================================
     LEGAL PAGES — Pravne informacije, Politika privatnosti, Politika kolačića
     ========================================================================== */
  .legal-page { padding-top: calc(var(--header-h) + var(--header-top) + clamp(2rem, 1rem + 4vw, 4.5rem)); padding-bottom: clamp(3rem, 2rem + 4vw, 6rem); }
  .legal-page__head { display: grid; gap: var(--sp-4); justify-items: start; max-width: 48rem; margin-bottom: clamp(2rem, 1.5rem + 2vw, 3.5rem); }
  .legal-page__head h1 { font-size: clamp(2.2rem, 1.6rem + 2.6vw, 3.6rem); line-height: 1.05; letter-spacing: -0.04em; }
  .legal-page__meta { font-size: var(--fs-sm); }
  .legal-layout { display: grid; gap: clamp(2rem, 1rem + 3vw, 4rem); }
  .legal-layout > *, .prose > *, .prose section > * { min-width: 0; }   /* wide tables scroll inside .table-wrap instead of widening the page */
  .legal-dl dd { overflow-wrap: anywhere; }
  @media (min-width: 64em) { .legal-layout { grid-template-columns: 15rem minmax(0, 48rem); align-items: start; } }
  .legal-toc { display: none; }
  @media (min-width: 64em) {
    .legal-toc { display: block; position: sticky; top: calc(var(--header-h) + var(--header-top) + var(--sp-5)); font-size: var(--fs-sm); }
    .legal-toc strong { display: block; margin-bottom: var(--sp-3); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.14em; color: var(--text); }
    .legal-toc ol { list-style: none; padding: 0; display: grid; gap: 0.15rem; border-left: 1px solid var(--line); }
    .legal-toc a { display: block; padding: 0.35rem 0 0.35rem var(--sp-3); margin-left: -1px; border-left: 2px solid transparent; color: var(--body-600); text-decoration: none; }
    .legal-toc a:hover { color: var(--text); border-left-color: var(--accent); }
  }
  .prose { display: grid; gap: var(--sp-4); font-size: var(--fs-base); line-height: 1.7; }
  .prose section { display: grid; gap: var(--sp-3); scroll-margin-top: calc(var(--header-h) + var(--header-top) + var(--sp-4)); }
  .prose section + section { margin-top: var(--sp-5); padding-top: var(--sp-6); border-top: 1px solid var(--line); }
  .prose h2 { font-size: clamp(1.35rem, 1.15rem + 0.8vw, 1.7rem); letter-spacing: -0.02em; color: var(--text); }
  .prose h3 { font-size: var(--fs-base); color: var(--text); margin-top: var(--sp-2); }
  .prose ul, .prose ol { padding-left: 1.25rem; display: grid; gap: 0.35rem; }
  .prose a { color: var(--accent); text-underline-offset: 0.18em; }
  .prose strong { color: var(--text); }
  .prose .ph { font-size: 0.85em; white-space: normal; }
  .legal-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(1.25rem, 1rem + 1vw, 2rem); }
  .legal-dl { display: grid; gap: 0; margin: 0; }
  .legal-dl > div { display: grid; gap: 0.15rem; padding: var(--sp-3) 0; border-bottom: 1px solid var(--line); }
  .legal-dl > div:last-child { border-bottom: 0; }
  @media (min-width: 40em) { .legal-dl > div { grid-template-columns: 14rem 1fr; gap: var(--sp-4); } }
  .legal-dl dt { font-size: var(--fs-sm); font-weight: 600; color: var(--text); }
  .legal-dl dd { margin: 0; }
  .table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--white); }
  .legal-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); line-height: 1.5; min-width: 40rem; }
  .legal-table th, .legal-table td { padding: var(--sp-3) var(--sp-4); text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
  .legal-table th { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.1em; color: var(--text); background: var(--stone-100); }
  .legal-table tr:last-child td { border-bottom: 0; }
  .legal-table code { font-size: 0.9em; background: var(--stone-100); padding: 0.1em 0.35em; border-radius: 4px; color: var(--text); }

  /* ---------- Image fallback (if a photo ever fails to load) ---------- */
  img.img-missing { background: repeating-linear-gradient(45deg, var(--stone-100) 0 12px, var(--stone-50) 12px 24px); color: transparent; }

}

/* ==========================================================================
   LIGHTBOX (GLightbox restyle) — deliberately unlayered: the vendor CSS is
   unlayered too, and unlayered rules beat anything inside @layer.
   ========================================================================== */
:root .glightbox-container .goverlay { background: color-mix(in srgb, var(--ink-950) 92%, transparent); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
:root .glightbox-container .gslide-image img { border-radius: var(--r-lg); box-shadow: 0 40px 90px -30px #000; }
@media (min-width: 769px) {
  /* GLightbox sets an inline max-height for bottom captions; leave room for the top bar and thumbnail strip */
  :root .glightbox-container .gslide-image img { max-height: calc(100svh - 17rem) !important; }
}

/* Buttons: frosted circles */
:root .glightbox-clean .gclose, :root .glightbox-clean .gnext, :root .glightbox-clean .gprev {
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  background: color-mix(in srgb, #fff 10%, transparent); border: 1px solid color-mix(in srgb, #fff 18%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: #fff; opacity: 1;
  transition: background-color 200ms, color 200ms, transform 300ms var(--ease);
}
:root .glightbox-clean .gclose svg, :root .glightbox-clean .gnext svg, :root .glightbox-clean .gprev svg { width: 22px; height: auto; }
:root .glightbox-clean .gclose path, :root .glightbox-clean .gnext path, :root .glightbox-clean .gprev path { fill: none; }
:root .glightbox-clean .gclose:hover, :root .glightbox-clean .gnext:hover, :root .glightbox-clean .gprev:hover { background: #fff; color: var(--ink-950); }
:root .glightbox-clean .gclose:hover { transform: rotate(90deg); }
:root .glightbox-clean .gnext:hover { transform: translateX(3px); }
:root .glightbox-clean .gprev:hover { transform: translateX(-3px); }
:root .glightbox-clean .gclose { top: 1.1rem; right: 1.25rem; }
:root .glightbox-clean .gnext, :root .glightbox-clean .gprev { top: 50%; margin-top: -26px; }
:root .glightbox-clean .gprev { left: 1.5rem; }
:root .glightbox-clean .gnext { right: 1.5rem; }
:root .glightbox-clean .gbtn.disabled { opacity: 0.25; }

/* Caption: phase pill + photo description, no box */
:root .glightbox-clean .gslide-description { background: transparent; }
:root .glightbox-clean .gdesc-inner { padding: var(--sp-4) 0 0; text-align: center; }
:root .glightbox-clean .gslide-title {
  display: inline-block; margin: 0 0 0.5rem; padding: 0.3em 0.85em; border-radius: var(--r-pill);
  background: var(--red-600); color: #fff; font-family: var(--font-sans); font-size: 0.7rem !important; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; line-height: 1.4;
}
:root .glightbox-clean .gslide-desc { color: color-mix(in srgb, #fff 80%, transparent); font-family: var(--font-sans); font-size: var(--fs-sm); line-height: 1.5; max-width: 60ch; margin-inline: auto; }
:root .glightbox-mobile .glightbox-container .gslide-description { background: linear-gradient(to bottom, transparent, color-mix(in srgb, var(--ink-950) 90%, transparent)); padding-bottom: 6.5rem; }

/* Added by radovi.js: title + counter bar, thumbnail strip */
.lb-top {
  position: absolute; z-index: 10000; top: 1.1rem; left: 1.25rem; right: 5.5rem; display: flex; align-items: center; gap: 0.9rem;
  min-height: 52px; color: #fff; font-family: var(--font-sans); pointer-events: none;
}
.lb-title { font-weight: 600; font-size: var(--fs-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-counter {
  flex: none; padding: 0.3em 0.8em; border-radius: var(--r-pill); font-size: 0.75rem; font-weight: 650; font-variant-numeric: tabular-nums;
  background: color-mix(in srgb, #fff 12%, transparent); border: 1px solid color-mix(in srgb, #fff 18%, transparent);
}
.lb-strip {
  position: absolute; z-index: 10000; left: 50%; bottom: 1.1rem; transform: translateX(-50%); max-width: calc(100% - 2rem);
  display: flex; gap: 0.45rem; padding: 0.45rem; overflow-x: auto; scrollbar-width: none; border-radius: 18px;
  background: color-mix(in srgb, #000 35%, transparent); border: 1px solid color-mix(in srgb, #fff 12%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.lb-strip:empty { display: none; }
.lb-strip::-webkit-scrollbar { display: none; }
.lb-strip button {
  flex: none; width: 56px; height: 56px; padding: 0; border: 0; border-radius: 11px; overflow: hidden; cursor: pointer; background: #222;
  opacity: 0.45; outline: 2px solid transparent; outline-offset: -2px; transition: opacity 200ms, outline-color 200ms, transform 300ms var(--ease);
}
.lb-strip button:hover { opacity: 0.85; transform: translateY(-2px); }
.lb-strip button[aria-current] { opacity: 1; outline-color: #fff; }
.lb-strip img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 768px) {
  :root .glightbox-clean .gnext, :root .glightbox-clean .gprev { display: none; }   /* swipe on touch */
  .lb-strip button { width: 46px; height: 46px; }
  .lb-top { top: 0.85rem; left: 1rem; }
  :root .glightbox-clean .gclose { top: 0.85rem; right: 1rem; width: 46px; height: 46px; }
}

/* ==========================================================================
   UTILITIES
   ========================================================================== */
@layer utilities {
  .visually-hidden {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
  }
  .text-center { text-align: center; }
  .mt-4 { margin-top: var(--sp-4); }
  .mt-6 { margin-top: var(--sp-6); }
  .on-dark { color: var(--on-dark-muted); }

  /* Reveal: CSS scroll-driven where supported; GSAP (motion.js) covers the rest. */
  @media (prefers-reduced-motion: no-preference) {
    @supports (animation-timeline: view()) {
      .reveal {
        animation: reveal-up linear both;
        animation-timeline: view();
        animation-range: entry 0% entry 38%;
      }
    }
  }
  @keyframes reveal-up { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
}

/* ---------- Reduced motion & contrast ---------- */
@media (prefers-reduced-motion: reduce) {
  .tile, .site-header.is-landing { animation: none; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
@media (prefers-contrast: more) {
  :root { --body-600: var(--ink-800); --line: var(--ink-700); --on-dark-muted: var(--white); }
  .btn--ghost, .chip { border-width: 2px; }
}
@media print {
  .site-header, .mobile-bar, .cookie, .map, .filters { display: none !important; }
}
