/* ============================================================
   Bekal d.o.o. — Homepage stylesheet
   Vanilla CSS3, mobile-first.
   ============================================================ */

/* ---------- 1. Design tokens --------------------------------- */
:root {
  /* Brand palette (sampled from the logo) */
  --accent:      #1FB5EA;
  --accent-600:  #159BCB;
  --accent-100:  #E6F6FD;
  --ink:         #16191C;
  --ink-700:    #2A2F35;
  --muted:       #6B7480;
  --bg:          #FFFFFF;
  --bg-soft:     #F5F8FA;
  --line:        #E7ECF0;

  /* Type */
  --font-display: "Sora", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body:    "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Fluid sizes */
  --fs-display: clamp(2.5rem, 6.4vw, 5.5rem);
  --fs-h2:      clamp(1.9rem, 3.6vw, 3.25rem);
  --fs-h2-sm:   clamp(1.5rem, 2.6vw, 2.25rem);
  --fs-h3:      clamp(1.15rem, 1.6vw, 1.35rem);
  --fs-body:    clamp(0.98rem, 1.05vw, 1.05rem);
  --fs-lede:    clamp(1.05rem, 1.25vw, 1.2rem);
  --fs-small:   0.85rem;
  --fs-eyebrow: 0.78rem;

  /* Spacing scale (8px base) */
  --s-1: 0.5rem;     /* 8 */
  --s-2: 1rem;       /* 16 */
  --s-3: 1.5rem;     /* 24 */
  --s-4: 2rem;       /* 32 */
  --s-5: 3rem;       /* 48 */
  --s-6: 4rem;       /* 64 */
  --s-7: 6rem;       /* 96 */

  /* Section vertical rhythm */
  --section-y: clamp(6rem, 11vw, 10rem); /* 96–160px */

  /* Layout */
  --container-max: 1280px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);

  /* Shapes */
  --radius-sm: 6px;
  --radius:    12px;
  --radius-lg: 18px;
  --radius-pill: 999px;

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --t-fast: 180ms;
  --t-base: 320ms;
  --t-slow: 520ms;

  /* Effects */
  --shadow-sm: 0 1px 2px rgba(22,25,28,0.04), 0 2px 6px rgba(22,25,28,0.04);
  --shadow:    0 6px 24px rgba(22,25,28,0.07), 0 2px 8px rgba(22,25,28,0.04);
  --shadow-lg: 0 18px 60px rgba(22,25,28,0.14), 0 4px 14px rgba(22,25,28,0.06);

  /* Mobile viewport unit fallback (set in JS) */
  --vh: 1vh;
}

/* ---------- 2. Reset / base ---------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
body.is-locked { overflow: hidden; }

img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 700; letter-spacing: -0.01em; line-height: 1.08; color: var(--ink); }
p { margin: 0; }

::selection { background: var(--accent); color: #fff; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0; padding: 0; margin: -1px;
}

/* Focus-visible (subtle but clear) */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- 3. Layout primitives ----------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  position: relative;
  padding-block: var(--section-y);
  background: var(--bg);
}
.section--soft  { background: var(--bg-soft); }
.section--light { background: var(--bg); }
.section--dark  { background: var(--ink); color: #fff; }
.section--cta   { background: linear-gradient(180deg, var(--bg) 0%, var(--accent-100) 100%); }

.section-head { max-width: 760px; margin-bottom: clamp(2.5rem, 5vw, 4.5rem); }
.section-head--centered { margin-inline: auto; text-align: center; }
.section-head--on-dark .section-sub,
.section-head--on-dark .lede { color: #c4ccd5; }

.section-title {
  font-size: var(--fs-h2);
  margin-bottom: var(--s-2);
}
.section-title--sm { font-size: var(--fs-h2-sm); }
.section-title--on-dark { color: #fff; }

.section-sub {
  font-size: var(--fs-lede);
  color: var(--muted);
  max-width: 64ch;
}
.section-head--centered .section-sub { margin-inline: auto; }

.lede {
  font-size: var(--fs-lede);
  color: var(--muted);
  max-width: 60ch;
  margin-bottom: var(--s-3);
}

/* Eyebrow */
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-body);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-600);
  margin-bottom: var(--s-2);
}
.eyebrow__dot {
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(31,181,234,0.18);
}
.eyebrow--light { color: #cfeefb; }
.eyebrow--light .eyebrow__dot { box-shadow: 0 0 0 4px rgba(31,181,234,0.32); }

/* Text link */
.text-link {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-weight: 600;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  padding-bottom: 4px;
  transition: color var(--t-base) var(--ease-out), border-color var(--t-base) var(--ease-out), gap var(--t-base) var(--ease-out);
}
.text-link svg { transition: transform var(--t-base) var(--ease-out); }
.text-link:hover { color: var(--accent-600); border-color: var(--accent); gap: 0.8rem; }
.text-link:hover svg { transform: translateX(3px); }
.text-link--on-dark { color: #fff; border-color: rgba(255,255,255,0.18); }
.text-link--on-dark:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- 4. Buttons --------------------------------------- */
.btn {
  --btn-bg: var(--ink);
  --btn-fg: #fff;
  --btn-bd: var(--ink);
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  padding: 0.95rem 1.5rem;
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 1.5px solid var(--btn-bd);
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--t-base) var(--ease-out), background var(--t-base) var(--ease-out), border-color var(--t-base) var(--ease-out), color var(--t-base) var(--ease-out), box-shadow var(--t-base) var(--ease-out);
  will-change: transform;
}
.btn__label { position: relative; z-index: 1; }
.btn--primary { --btn-bg: var(--accent); --btn-fg: #fff; --btn-bd: var(--accent); box-shadow: 0 8px 24px -8px rgba(31,181,234,0.55); }
.btn--primary:hover { --btn-bg: var(--accent-600); --btn-bd: var(--accent-600); box-shadow: 0 12px 30px -8px rgba(21,155,203,0.6); }
.btn--ghost   { --btn-bg: transparent; --btn-fg: var(--ink); --btn-bd: rgba(22,25,28,0.18); }
.btn--ghost:hover { --btn-bg: var(--ink); --btn-fg: #fff; --btn-bd: var(--ink); }

/* On dark band override */
.section--dark .btn--ghost,
.section--cta .btn--ghost { color: var(--ink); }
.section--dark .btn--ghost { color: #fff; --btn-bd: rgba(255,255,255,0.25); }
.section--dark .btn--ghost:hover { --btn-bg: #fff; --btn-fg: var(--ink); --btn-bd: #fff; }

/* Magnetic inner translate (JS-driven via CSS vars) */
.btn--magnetic { --mx: 0; --my: 0; transform: translate3d(var(--mx), var(--my), 0); }

/* ---------- 5. Preloader ------------------------------------- */
.preloader {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
  z-index: 200;
  pointer-events: all;
}
.preloader__inner {
  display: flex; flex-direction: column; align-items: center; gap: 1.25rem;
  color: var(--accent);
}
.preloader__pane {
  width: 64px; height: 80px;
}
.preloader__pane rect,
.preloader__pane line {
  stroke-dasharray: 260;
  stroke-dashoffset: 260;
  animation: paneDraw 1.1s var(--ease-out) forwards;
}
.preloader__pane line:nth-of-type(1) { animation-delay: 0.35s; }
.preloader__pane line:nth-of-type(2) { animation-delay: 0.55s; }
@keyframes paneDraw {
  to { stroke-dashoffset: 0; }
}
.preloader__curtain {
  position: absolute; inset: 0;
  background: var(--ink);
  transform: translateY(100%);
  transition: transform 0.8s var(--ease-in-out);
}
.preloader.is-leaving .preloader__curtain { transform: translateY(0); }
.preloader.is-gone {
  pointer-events: none;
  transform: translateY(-100%);
  transition: transform 0.7s var(--ease-in-out);
}

/* ---------- 6. Film grain ------------------------------------ */
.grain {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 150;
  opacity: 0.045;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 180px 180px;
}

/* ---------- 7. Custom cursor --------------------------------- */
.cursor { display: none; }
@media (hover: hover) and (pointer: fine) and (min-width: 1024px) {
  .cursor {
    position: fixed; top: 0; left: 0;
    pointer-events: none;
    z-index: 180;
    display: block;
    mix-blend-mode: normal;
  }
  body.use-cursor { cursor: none; }
  body.use-cursor a, body.use-cursor button, body.use-cursor input, body.use-cursor textarea, body.use-cursor [role="button"] { cursor: none; }
  .cursor__dot {
    position: absolute; top: 0; left: 0;
    width: 6px; height: 6px;
    background: var(--accent);
    border-radius: 50%;
    transform: translate3d(-50%, -50%, 0);
    transition: width var(--t-fast), height var(--t-fast), opacity var(--t-fast);
  }
  .cursor__ring {
    position: absolute; top: 0; left: 0;
    width: 38px; height: 38px;
    border: 1.5px solid var(--ink);
    border-radius: 50%;
    transform: translate3d(-50%, -50%, 0);
    transition: width var(--t-base) var(--ease-out), height var(--t-base) var(--ease-out), background var(--t-base), border-color var(--t-base), color var(--t-base);
    display: grid; place-items: center;
    color: #fff;
  }
  .cursor__label {
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0;
    transition: opacity var(--t-fast);
    white-space: nowrap;
  }
  .cursor.is-hover .cursor__ring {
    width: 56px; height: 56px;
    background: rgba(31,181,234,0.92);
    border-color: var(--accent);
  }
  .cursor.is-hover .cursor__dot { opacity: 0; }
  .cursor.has-label .cursor__ring { width: 84px; height: 84px; }
  .cursor.has-label .cursor__label { opacity: 1; }
  .cursor.is-down .cursor__ring { transform: translate3d(-50%, -50%, 0) scale(0.85); }
}

/* ---------- 8. Scroll progress bar --------------------------- */
.scroll-progress {
  position: fixed; top: 0; left: 0;
  height: 2px; width: 100%;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: var(--accent);
  z-index: 160;
  pointer-events: none;
}

/* ---------- 9. Header / navbar ------------------------------- */
/* Sentinel — invisible 1px marker the IntersectionObserver watches. */
.hero-sentinel {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  pointer-events: none;
  opacity: 0;
}

.site-header {
  --nav-ease: cubic-bezier(0.16, 1, 0.3, 1);
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 120;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition:
    transform 320ms var(--nav-ease),
    box-shadow 420ms var(--nav-ease),
    border-color 420ms var(--nav-ease);
  will-change: transform;
}
/* Glass overlay — opacity 0→1 morph carries the blur + white in smoothly. */
.site-header::before {
  content: "";
  position: absolute; inset: 0;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  opacity: 0;
  transition: opacity 420ms var(--nav-ease);
  pointer-events: none;
  z-index: -1;
}
.site-header__inner {
  display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.5rem);
  min-height: 92px;
  transition: min-height 420ms var(--nav-ease);
}
.brand { display: inline-flex; align-items: center; flex-shrink: 0; }
.brand__logo {
  height: 44px; width: auto;
  transform-origin: left center;
  transition: transform 420ms var(--nav-ease), opacity var(--t-base);
}
.brand:hover .brand__logo { opacity: 0.85; }

.primary-nav { margin-left: auto; }
.primary-nav__list {
  display: flex; align-items: center; gap: clamp(1rem, 2.2vw, 2rem);
}
.nav-link {
  position: relative;
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-weight: 500;
  font-size: 0.95rem;
  color: #fff;
  padding: 0.5rem 0;
  transition: color 420ms var(--nav-ease);
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 2px;
  height: 1.5px; width: 100%;
  background: var(--accent);
  transform-origin: right center;
  transform: scaleX(0);
  transition: transform var(--t-base) var(--ease-out);
}
.nav-link:hover::after { transform-origin: left center; transform: scaleX(1); }
.nav-link__chev { transition: transform var(--t-base); }
.has-dropdown.is-open .nav-link__chev { transform: rotate(-180deg); }

.site-header__cta { margin-left: var(--s-1); }
.hamburger { display: none; }

/* Scrolled state — morphs smoothly from transparent/large to glass/compact. */
.site-header.is-scrolled::before { opacity: 1; }
.site-header.is-scrolled {
  box-shadow: 0 8px 30px rgba(20, 25, 28, 0.08);
  border-bottom-color: var(--line);
}
.site-header.is-scrolled .site-header__inner { min-height: 66px; }
.site-header.is-scrolled .brand__logo { transform: scale(0.9); }
.site-header.is-scrolled .nav-link { color: var(--ink); }
.site-header.is-scrolled .nav-link:hover { color: var(--accent-600); }
.site-header.is-scrolled .site-header__cta {
  box-shadow: 0 6px 18px -6px rgba(31, 181, 234, 0.45);
}

/* Auto-hide on fast scroll-down (only valid once scrolled). */
.site-header.is-hidden { transform: translateY(-100%); }

/* Mega menu */
.has-dropdown { position: relative; }
.mega {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  min-width: 320px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 0.75rem;
  opacity: 0; visibility: hidden;
  transform: translateY(-8px) scale(0.98);
  transform-origin: top right;
  transition: opacity var(--t-base) var(--ease-out), transform var(--t-base) var(--ease-out), visibility var(--t-base);
}
.has-dropdown.is-open .mega {
  opacity: 1; visibility: visible; transform: translateY(0) scale(1);
}
.mega__list { display: grid; gap: 2px; }
.mega__item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius);
  color: var(--ink);
  font-weight: 500;
  font-size: 0.95rem;
  transition: background var(--t-base), color var(--t-base), transform var(--t-base);
  opacity: 0;
  transform: translateX(-6px);
}
.has-dropdown.is-open .mega__item {
  opacity: 1; transform: translateX(0);
  transition-delay: calc(var(--i, 0) * 22ms);
}
.mega__item:hover { background: var(--accent-100); color: var(--accent-600); }
.mega__icon {
  width: 22px; height: 28px;
  color: var(--accent);
  flex-shrink: 0;
}

/* Hamburger (mobile) */
.hamburger {
  display: none;
  width: 44px; height: 44px;
  position: relative;
  border-radius: 50%;
  margin-left: auto;
  border: 1px solid transparent;
  transition: border-color var(--t-base);
}
.hamburger span {
  position: absolute;
  left: 12px; right: 12px;
  height: 2px;
  background: #fff;
  transition: transform var(--t-base) var(--ease-out), opacity var(--t-base), top var(--t-base) var(--ease-out);
}
.hamburger span:nth-child(1) { top: 16px; }
.hamburger span:nth-child(2) { top: 21px; }
.hamburger span:nth-child(3) { top: 26px; }
.site-header.is-scrolled .hamburger span { background: var(--ink); }
.hamburger.is-open span { background: #fff; }
.hamburger.is-open span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; }
.hamburger.is-open span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  position: fixed; inset: 0;
  background: var(--ink);
  color: #fff;
  z-index: 110;
  padding: 6rem var(--gutter) 2rem;
  display: flex; flex-direction: column;
  visibility: hidden;
  opacity: 0;
  transform: translateY(-100%);
  transition: opacity var(--t-base) var(--ease-out), transform 0.5s var(--ease-in-out), visibility 0.5s;
  overflow-y: auto;
}
.mobile-menu.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.mobile-menu__inner { max-width: 720px; width: 100%; margin: 0 auto; }
.mobile-menu__list { display: flex; flex-direction: column; gap: 0; }
.mobile-menu__list > li { border-bottom: 1px solid rgba(255,255,255,0.07); }
.mobile-menu__link, .mobile-menu__link--toggle {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.5rem, 5.5vw, 2.5rem);
  color: #fff;
  padding: 1.05rem 0;
  letter-spacing: -0.01em;
  text-align: left;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--t-base), transform var(--t-base) var(--ease-out), color var(--t-base);
}
.mobile-menu.is-open .mobile-menu__link,
.mobile-menu.is-open .mobile-menu__link--toggle {
  opacity: 1; transform: translateY(0);
  transition-delay: calc(var(--i, 0) * 50ms + 80ms);
}
.mobile-menu__link:hover, .mobile-menu__link--toggle:hover { color: var(--accent); }
.mobile-menu__group.is-open .mobile-menu__link--toggle svg { transform: rotate(-180deg); }
.mobile-menu__sub {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.45s var(--ease-in-out);
  padding-left: 1rem;
}
.mobile-menu__group.is-open .mobile-menu__sub { max-height: 700px; }
.mobile-menu__sub li a {
  display: block;
  padding: 0.55rem 0;
  color: rgba(255,255,255,0.7);
  font-size: 1rem;
  border-bottom: 1px dashed rgba(255,255,255,0.07);
}
.mobile-menu__sub li:last-child a { border-bottom: 0; }
.mobile-menu__sub li a:hover { color: var(--accent); }
.mobile-menu__cta { margin-top: 2rem; align-self: flex-start; }
.mobile-menu__meta {
  margin-top: auto;
  padding-top: 2rem;
  display: flex; flex-direction: column; gap: 0.5rem;
  color: rgba(255,255,255,0.55);
  font-size: 0.95rem;
}
.mobile-menu__meta a { display: inline-flex; align-items: center; gap: 0.5rem; }
.mobile-menu__meta a:hover { color: var(--accent); }

/* ---------- 10. Hero ----------------------------------------- */
.hero {
  position: relative;
  width: 100%;
  /* True full viewport on every device — svh / dvh + JS --vh fallback */
  height: calc(var(--vh, 1vh) * 100);
  height: 100svh;
  min-height: 100dvh;
  min-height: calc(var(--vh, 1vh) * 100);
  overflow: hidden;
  color: #fff;
  isolation: isolate;
  background: var(--ink);
}
.hero__slider { position: absolute; inset: 0; }
.hero__slide {
  position: absolute; inset: 0;
  /* Gradient fallback under the <img>, so missing photos still look intentional. */
  background: linear-gradient(135deg, var(--ink) 0%, var(--ink-700) 60%, var(--accent-600) 130%);
  opacity: 0;
  transition: opacity 1.4s var(--ease-in-out);
  overflow: hidden;
  will-change: opacity;
}
.hero__slide.is-active { opacity: 1; }
.hero__img {
  display: block;
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  will-change: transform;
}
.hero__slide.is-active .hero__img { animation: kenBurns 8s var(--ease-in-out) forwards; }
@keyframes kenBurns {
  0%   { transform: scale(1.04) translate(0, 0); }
  100% { transform: scale(1.12) translate(-1.5%, -1%); }
}
.hero__scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(22,25,28,0.55) 0%, rgba(22,25,28,0.25) 30%, rgba(22,25,28,0.65) 100%),
    radial-gradient(ellipse at 20% 80%, rgba(31,181,234,0.18), transparent 60%);
  z-index: 2;
}

.hero__pane-decor {
  position: absolute;
  bottom: 6%;
  right: 6%;
  width: clamp(60px, 9vw, 110px);
  color: rgba(31,181,234,0.6);
  z-index: 3;
  pointer-events: none;
  animation: floatPane 6s ease-in-out infinite alternate;
}
@keyframes floatPane {
  to { transform: translateY(-12px) rotate(-3deg); }
}

.hero__content {
  position: relative;
  z-index: 4;
  height: 100%;
  display: flex; flex-direction: column; justify-content: center;
  padding-top: 6rem; padding-bottom: 8rem;
  max-width: 1280px;
}
.hero__title {
  font-size: var(--fs-display);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin-bottom: var(--s-3);
  color: #fff;
  max-width: 18ch;
}
/* SplitType-friendly: hide words initially so JS reveal does the rest */
.hero__title .word { display: inline-block; overflow: hidden; }
.hero__sub {
  font-size: clamp(1.05rem, 1.5vw, 1.35rem);
  color: rgba(255,255,255,0.82);
  max-width: 56ch;
  margin-bottom: var(--s-4);
}
.hero__cta { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-2); }
.hero__cta .btn--ghost { color: #fff; --btn-bd: rgba(255,255,255,0.4); }
.hero__cta .btn--ghost:hover { --btn-bg: #fff; --btn-fg: var(--ink); --btn-bd: #fff; }

.hero__controls {
  position: absolute;
  bottom: clamp(2rem, 5vh, 4rem);
  right: var(--gutter);
  display: flex; gap: 0.6rem;
  z-index: 4;
}
.hero__arrow {
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border: 1.5px solid rgba(255,255,255,0.4);
  border-radius: 50%;
  color: #fff;
  background: rgba(22,25,28,0.18);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: background var(--t-base), border-color var(--t-base), transform var(--t-base);
}
.hero__arrow:hover {
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
}
.hero__dots {
  position: absolute;
  bottom: clamp(2rem, 5vh, 4rem);
  left: var(--gutter);
  display: flex; gap: 8px;
  z-index: 4;
}
.hero__dot {
  width: 26px; height: 4px;
  background: rgba(255,255,255,0.35);
  border-radius: 4px;
  transition: background var(--t-base), width var(--t-base);
}
.hero__dot.is-active { background: var(--accent); width: 44px; }

.hero__scroll-cue {
  position: absolute;
  left: 50%; bottom: clamp(1rem, 3vh, 2.5rem);
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: rgba(255,255,255,0.75);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 500;
  z-index: 4;
  transition: opacity var(--t-base);
}
.hero__scroll-mouse {
  width: 22px; height: 36px;
  border: 1.5px solid rgba(255,255,255,0.55);
  border-radius: 12px;
  position: relative;
}
.hero__scroll-mouse span {
  position: absolute;
  left: 50%; top: 6px;
  width: 3px; height: 6px;
  background: var(--accent);
  border-radius: 2px;
  transform: translateX(-50%);
  animation: mouseScroll 2s ease-in-out infinite;
}
@keyframes mouseScroll {
  0%, 100% { opacity: 1; top: 6px; }
  60% { opacity: 0; top: 18px; }
  61% { opacity: 0; top: 6px; }
}

/* ---------- 11. Intro / O nama ------------------------------- */
.intro {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}
.intro__copy .text-link { margin-top: var(--s-3); }
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--s-3);
  margin: var(--s-4) 0 var(--s-3);
  padding: var(--s-3) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stat { display: flex; flex-direction: column; gap: 0.25rem; }
.stat__num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 3.5vw, 3rem);
  color: var(--accent);
  line-height: 1;
}
.stat__num--text { color: var(--ink); }
.stat__label {
  font-size: 0.92rem;
  color: var(--muted);
}

.intro__visual { margin: 0; position: relative; }
.intro__frame {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-soft);
}
.intro__frame img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease-out); }
.intro__frame:hover img { transform: scale(1.04); }
.intro__pane {
  position: absolute;
  width: 24%; aspect-ratio: 4 / 5;
  bottom: -1.2rem; left: -1.2rem;
  color: var(--accent);
  background: #fff;
  padding: 1rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ---------- 12. Product grid --------------------------------- */
.product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.25rem, 2vw, 1.75rem);
}
.product-card { list-style: none; }
.product-card__link {
  display: flex; flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: 100%;
  transition: transform var(--t-base) var(--ease-out), box-shadow var(--t-base) var(--ease-out), border-color var(--t-base);
}
.product-card__link:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(31,181,234,0.4);
}
.product-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  margin: 0;
  background: var(--bg-soft);
  overflow: hidden;
}
.product-card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease-out);
}
.product-card__link:hover .product-card__media img { transform: scale(1.07); }
.product-card__overlay {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background: rgba(22,25,28,0.0);
  transition: background var(--t-base);
}
.product-card__overlay svg {
  width: 48px; height: 60px;
  color: #fff;
  opacity: 0;
  transform: scale(0.88) rotate(-8deg);
  transition: opacity var(--t-base), transform var(--t-base) var(--ease-out);
}
.product-card__link:hover .product-card__overlay { background: rgba(31,181,234,0.45); }
.product-card__link:hover .product-card__overlay svg { opacity: 1; transform: scale(1) rotate(0); }
.product-card__body { padding: 1.25rem 1.25rem 1.4rem; display: flex; flex-direction: column; gap: 0.4rem; flex: 1; }
.product-card__title {
  font-size: var(--fs-h3);
  font-weight: 700;
}
.product-card__teaser { color: var(--muted); font-size: 0.95rem; flex: 1; }
.product-card__more {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--accent-600);
  letter-spacing: 0.04em;
  margin-top: 0.4rem;
}
.product-card__more svg { transition: transform var(--t-base); }
.product-card__link:hover .product-card__more svg { transform: translateX(4px); }

/* ---------- 13. Project gallery ------------------------------ */
.project {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2.5rem, 5vw, 4rem);
  align-items: start;
}
.project__head .text-link { margin-top: var(--s-3); }
.project__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 180px;
  gap: clamp(0.75rem, 1.5vw, 1.25rem);
}
.project__tile {
  position: relative;
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-soft);
}
.project__tile--lg { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
.project__tile img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1s var(--ease-out);
}
.project__tile:hover img { transform: scale(1.05); }
.project__tile::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(22,25,28,0) 50%, rgba(22,25,28,0.32) 100%);
  opacity: 0;
  transition: opacity var(--t-base);
}
.project__tile:hover::after { opacity: 1; }

/* ---------- 14. Features ------------------------------------- */
.features {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-3);
}
.feature {
  position: relative;
  padding: clamp(1.5rem, 2.5vw, 2.25rem);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: transform var(--t-base) var(--ease-out), box-shadow var(--t-base) var(--ease-out), border-color var(--t-base);
}
.feature:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: rgba(31,181,234,0.32);
}
.feature__icon {
  display: inline-grid; place-items: center;
  width: 56px; height: 56px;
  border-radius: var(--radius);
  background: var(--accent-100);
  color: var(--accent-600);
  margin-bottom: var(--s-3);
  transition: transform var(--t-base) var(--ease-out);
}
.feature__icon svg { width: 24px; height: 30px; }
.feature:hover .feature__icon { transform: rotate(-4deg) scale(1.05); }
.feature__title { font-size: var(--fs-h3); margin-bottom: 0.4rem; }
.feature__copy { color: var(--muted); }

/* ---------- 15. Marquees ------------------------------------- */
.marquee {
  overflow: hidden;
  position: relative;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
}
.marquee__track {
  display: inline-flex;
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
  white-space: nowrap;
  animation: marqueeLeft 38s linear infinite;
  will-change: transform;
}
.marquee--reverse .marquee__track { animation-name: marqueeRight; }
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marqueeLeft  { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes marqueeRight { from { transform: translateX(-50%); } to { transform: translateX(0); } }

.marquee--brands { margin-top: var(--s-3); }
.brand-chip {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  letter-spacing: -0.01em;
  color: var(--muted);
  text-transform: none;
  transition: color var(--t-base), transform var(--t-base);
  cursor: default;
  display: inline-block;
  filter: grayscale(1) opacity(0.7);
}
.brand-chip:hover {
  color: var(--accent-600);
  filter: grayscale(0) opacity(1);
  transform: translateY(-2px);
}

.marquee--refs { padding-block: clamp(1rem, 2vw, 1.5rem); }
.section--dark .marquee {
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 10%, #000 90%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 10%, #000 90%, transparent 100%);
}
.ref-chip {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.1rem, 2.4vw, 1.85rem);
  color: #fff;
  letter-spacing: -0.005em;
}
.ref-chip--ghost { color: rgba(255,255,255,0.4); font-weight: 500; }
.ref-sep {
  color: var(--accent);
  font-size: 0.9rem;
  opacity: 0.75;
}
.references__more {
  text-align: center;
  margin-top: var(--s-4);
}

/* ---------- 16. CTA band + contact form ---------------------- */
.cta {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2.5rem, 5vw, 4rem);
  align-items: start;
}
.cta__head .eyebrow { color: var(--accent-600); }
.cta__actions {
  display: flex; flex-wrap: wrap; gap: 0.75rem;
  margin-top: var(--s-3);
}
.cta__actions .btn--ghost {
  --btn-bd: rgba(22,25,28,0.18);
  color: var(--ink);
}
.cta__form {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-2);
  box-shadow: var(--shadow);
}
@media (min-width: 576px) {
  .cta__form { grid-template-columns: 1fr 1fr; }
}
.field { display: flex; flex-direction: column; gap: 0.35rem; }
.field--full { grid-column: 1 / -1; }
.field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-700);
  letter-spacing: 0.02em;
}
.field input, .field textarea {
  font: inherit;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  color: var(--ink);
  transition: border-color var(--t-base), background var(--t-base), box-shadow var(--t-base);
  resize: vertical;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(31,181,234,0.16);
}
.cta__form .btn { justify-self: stretch; margin-top: 0.25rem; }
.cta__form-status {
  font-size: 0.9rem; color: var(--muted);
  min-height: 1.2rem;
}
.cta__form-status.is-ok { color: #157A3F; }
.cta__form-status.is-err { color: #C03A4A; }

/* ---------- 17. Footer --------------------------------------- */
.site-footer {
  background: var(--ink);
  color: #c4ccd5;
  padding-block: clamp(3rem, 6vw, 5rem) clamp(1.5rem, 3vw, 2.5rem);
}
.site-footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-4);
}
.footer-col__title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: var(--s-2);
}
.footer-list { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-list a {
  color: #c4ccd5;
  font-size: 0.95rem;
  transition: color var(--t-base);
  display: inline-flex; align-items: center; gap: 0.45rem;
}
.footer-list a:hover { color: var(--accent); }
.footer-list--contact a svg { color: var(--accent); }
.brand--footer {
  display: inline-flex;
  align-items: center;
  background: #fff;
  padding: 10px 16px;
  border-radius: 14px;
  margin-bottom: var(--s-2);
  box-shadow: 0 8px 24px -10px rgba(0,0,0,0.35);
}
.brand--footer .brand__logo {
  height: 44px;
  width: auto;
  margin: 0;
}
.footer-tag { color: #fff; font-weight: 500; margin-bottom: var(--s-1); }
.footer-cert {
  display: inline-flex; align-items: center; gap: 0.5rem;
  color: var(--accent); font-size: 0.9rem;
  margin-top: var(--s-1);
}
.footer-block {
  display: flex; gap: 0.5rem; align-items: flex-start;
  font-size: 0.95rem;
}
.footer-block svg { color: var(--accent); flex-shrink: 0; margin-top: 3px; }
.site-footer__bottom {
  margin-top: clamp(2rem, 4vw, 3rem);
  padding-top: var(--s-3);
  border-top: 1px solid rgba(255,255,255,0.07);
  display: flex; flex-wrap: wrap; justify-content: space-between;
  gap: var(--s-2);
  color: rgba(255,255,255,0.55);
  font-size: 0.85rem;
}
.site-footer__credit a {
  color: inherit;
  border-bottom: 1px solid rgba(255,255,255,0.18);
  padding-bottom: 1px;
  transition: color var(--t-base), border-color var(--t-base);
}
.site-footer__credit a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ---------- 18. AI assistant (bottom-left) ------------------- */
.assistant {
  position: fixed;
  left: clamp(0.85rem, 2vw, 1.5rem);
  bottom: clamp(0.85rem, 2vw, 1.5rem);
  z-index: 170;
}
.assistant__fab {
  position: relative;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 12px 28px -8px rgba(31,181,234,0.6), 0 4px 10px rgba(22,25,28,0.18);
  transition: transform var(--t-base) var(--ease-out), background var(--t-base);
}
.assistant__fab:hover { background: var(--accent-600); transform: scale(1.06); }
.assistant__fab-pane { width: 22px; height: 28px; }
.assistant__pulse {
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 2px solid var(--accent);
  animation: assistantPulse 2.4s ease-out infinite;
  pointer-events: none;
}
@keyframes assistantPulse {
  0% { transform: scale(1); opacity: 0.55; }
  100% { transform: scale(1.6); opacity: 0; }
}

.assistant__panel {
  position: absolute;
  left: 0; bottom: 72px;
  width: min(360px, calc(100vw - 2rem));
  max-height: min(560px, calc(100dvh - 6rem));
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column;
  overflow: hidden;
  transform-origin: bottom left;
  opacity: 0;
  transform: translateY(8px) scale(0.96);
  transition: opacity var(--t-base) var(--ease-out), transform var(--t-base) var(--ease-out);
}
.assistant__panel[hidden] { display: none; }
.assistant.is-open .assistant__panel { opacity: 1; transform: translateY(0) scale(1); }
.assistant__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.5rem;
  padding: 0.9rem 1rem;
  background: linear-gradient(135deg, var(--ink) 0%, var(--ink-700) 100%);
  color: #fff;
}
.assistant__brand { display: flex; align-items: center; gap: 0.65rem; }
.assistant__head-icon { width: 24px; height: 30px; color: var(--accent); }
.assistant__title { font-family: var(--font-display); font-weight: 700; font-size: 0.95rem; margin: 0; }
.assistant__status {
  font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(255,255,255,0.65);
  display: inline-flex; align-items: center; gap: 0.4rem;
  margin-top: 1px;
}
.assistant__dot {
  width: 7px; height: 7px;
  background: #4dd07e;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(77,208,126,0.25);
}
.assistant__close {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: grid; place-items: center;
  color: rgba(255,255,255,0.75);
  transition: background var(--t-base), color var(--t-base);
}
.assistant__close:hover { background: rgba(255,255,255,0.08); color: #fff; }

.assistant__log {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex; flex-direction: column; gap: 0.6rem;
  background: var(--bg-soft);
}
.msg {
  max-width: 86%;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius);
  font-size: 0.92rem;
  line-height: 1.5;
  animation: msgIn 0.4s var(--ease-out) both;
}
@keyframes msgIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.msg--bot {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
  border-top-left-radius: 4px;
  align-self: flex-start;
}
.msg--user {
  background: var(--accent);
  color: #fff;
  border-top-right-radius: 4px;
  align-self: flex-end;
}
.msg--system {
  background: #fff;
  border: 1px dashed var(--line);
  color: var(--muted);
  font-size: 0.85rem;
  align-self: stretch;
  text-align: center;
  max-width: 100%;
}
.msg--typing { display: inline-flex; align-items: center; gap: 4px; }
.msg--typing span {
  width: 6px; height: 6px;
  background: var(--muted);
  border-radius: 50%;
  animation: typingBounce 1s var(--ease-in-out) infinite;
}
.msg--typing span:nth-child(2) { animation-delay: 0.18s; }
.msg--typing span:nth-child(3) { animation-delay: 0.36s; }
@keyframes typingBounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.5; }
  40% { transform: translateY(-4px); opacity: 1; }
}

.assistant__chips {
  display: flex; flex-wrap: wrap; gap: 0.4rem;
  padding: 0.65rem 0.85rem;
  border-top: 1px solid var(--line);
  background: #fff;
}
.chip {
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: #fff;
  font-size: 0.82rem;
  color: var(--ink);
  transition: border-color var(--t-base), background var(--t-base), color var(--t-base);
}
.chip:hover {
  border-color: var(--accent);
  background: var(--accent-100);
  color: var(--accent-600);
}

.assistant__form {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.65rem 0.85rem 0.85rem;
  background: #fff;
  border-top: 1px solid var(--line);
}
.assistant__form input {
  flex: 1;
  font: inherit;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 0.6rem 0.95rem;
  font-size: 0.92rem;
  transition: border-color var(--t-base), background var(--t-base);
}
.assistant__form input:focus {
  outline: none; border-color: var(--accent); background: #fff;
}
.assistant__send {
  width: 40px; height: 40px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: grid; place-items: center;
  flex-shrink: 0;
  transition: background var(--t-base), transform var(--t-base);
}
.assistant__send:hover { background: var(--accent-600); transform: rotate(-8deg); }
.assistant__send:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- 19. Back-to-top (bottom-right) ------------------- */
.to-top {
  position: fixed;
  right: clamp(0.85rem, 2vw, 1.5rem);
  bottom: clamp(0.85rem, 2vw, 1.5rem);
  width: 56px; height: 56px;
  z-index: 170;
  display: grid; place-items: center;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--ink);
  border-radius: 50%;
  box-shadow: 0 8px 20px -6px rgba(22,25,28,0.18), 0 2px 6px rgba(22,25,28,0.08);
  border: 1px solid var(--line);
  opacity: 0;
  transform: translateY(12px) scale(0.92);
  transition: opacity var(--t-base) var(--ease-out), transform var(--t-base) var(--ease-out), background var(--t-base);
  pointer-events: none;
}
.to-top.is-visible {
  opacity: 1; transform: translateY(0) scale(1); pointer-events: auto;
}
.to-top:hover { background: #fff; }
.to-top__ring {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  transform: rotate(0);
}
.to-top__ring-bg { stroke: var(--line); stroke-width: 2; }
.to-top__ring-fg {
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
  transition: stroke-dashoffset 80ms linear;
}
.to-top__arrow { color: var(--ink); }

/* ---------- 20. Image fallback (placeholder) ----------------- */
[data-img-fallback] {
  background: var(--bg-soft);
  transition: opacity var(--t-base);
}
.is-broken {
  position: relative;
  background:
    radial-gradient(120% 80% at 0% 0%, var(--accent-100) 0%, transparent 55%),
    linear-gradient(140deg, var(--bg-soft) 0%, #fff 60%, var(--bg-soft) 100%) !important;
}
.is-broken::after {
  content: "";
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 80' fill='none' stroke='%231FB5EA' stroke-width='3.5' stroke-linejoin='round' stroke-linecap='round'><rect x='4' y='4' width='56' height='72' rx='7'/><line x1='32' y1='4' x2='32' y2='76'/><line x1='4' y1='40' x2='60' y2='40'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
  background-size: auto clamp(60px, 22%, 120px);
  opacity: 0.32;
  pointer-events: none;
}
.is-broken > img[data-img-fallback] { opacity: 0; }

/* ---------- 21. Reveal hooks --------------------------------- */
[data-reveal], [data-reveal-card] {
  opacity: 0;
  transform: translate3d(0, 26px, 0);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}
[data-reveal].is-in, [data-reveal-card].is-in {
  opacity: 1; transform: translate3d(0, 0, 0);
}
/* SplitType wrappers */
.split-line { display: block; overflow: hidden; line-height: inherit; }
.split-line .word {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 0.85s var(--ease-out);
  transition-delay: calc(var(--wi, 0) * 35ms);
}
.is-in .split-line .word, .word.is-revealed { transform: translateY(0); }

/* ---------- 22. Breakpoints ---------------------------------- */
@media (min-width: 576px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .project__grid { grid-auto-rows: 220px; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .site-footer__grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
}
@media (min-width: 768px) {
  .intro { grid-template-columns: 1.05fr 1fr; }
  .project { grid-template-columns: 0.85fr 1.15fr; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .cta { grid-template-columns: 1fr 1fr; align-items: center; }
}
@media (min-width: 992px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .project__grid { grid-auto-rows: 240px; }
  .features { grid-template-columns: repeat(4, 1fr); }
}

/* Header / nav mobile/tablet rules */
@media (max-width: 991.98px) {
  .primary-nav { display: none; }
  .site-header__cta { display: none; }
  .hamburger { display: block; }
}
@media (min-width: 992px) {
  .mobile-menu { display: none; }
}

/* Tweak hero typography spacing on mobile */
@media (max-width: 576px) {
  .hero__content { padding-top: 5.5rem; padding-bottom: 9rem; }
  .hero__title { max-width: 16ch; }
  .hero__dots { left: 50%; transform: translateX(-50%); }
  .hero__scroll-cue { display: none; }
}

/* Smaller assistant panel + to-top tweaks on phones */
@media (max-width: 480px) {
  .assistant__panel { max-height: 70dvh; }
}

/* ---------- 22b. Hard overrides (cascade safety net) -------- */
/* Force exactly 3 product cards per row on desktop, regardless of
   any rule that might come later or be injected. */
#proizvodi .product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.25rem, 2vw, 1.75rem);
}
@media (min-width: 576px) {
  #proizvodi .product-grid { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (min-width: 992px) {
  #proizvodi .product-grid { grid-template-columns: repeat(3, 1fr) !important; }
}

/* Footer logo MUST render in its original colors. Kill any inherited
   or future filter / blend-mode treatment. */
.site-footer .brand--footer,
.site-footer .brand__logo,
.site-footer img.brand__logo {
  filter: none !important;
  -webkit-filter: none !important;
  mix-blend-mode: normal !important;
}

/* ---------- 22c. Inner pages — listing + product detail ----- */

/* Mobile menu: Proizvodi row = link + accordion chevron */
.mobile-menu__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.mobile-menu__row .mobile-menu__link {
  flex: 1;
  border-bottom: 0;
  padding-right: 0;
}
.mobile-menu__chev {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  transition: color var(--t-base), background var(--t-base);
}
.mobile-menu__chev svg { transition: transform 320ms var(--ease-out); }
.mobile-menu__chev:hover { color: var(--accent); background: rgba(255, 255, 255, 0.04); }
.mobile-menu__group.is-open .mobile-menu__chev svg { transform: rotate(180deg); }

/* Active state for current-section nav link */
.nav-link--active::after { transform-origin: left center; transform: scaleX(1); }

/* Page hero — used by proizvodi.html and proizvod.html */
.page-hero {
  position: relative;
  min-height: clamp(440px, 62svh, 640px);
  background: var(--ink);
  color: #fff;
  overflow: hidden;
  isolation: isolate;
  display: flex; align-items: flex-end;
  padding-top: clamp(6.5rem, 12vw, 9rem);
  padding-bottom: clamp(3rem, 6vw, 5rem);
}
.page-hero__media {
  position: absolute; inset: 0;
  z-index: 0;
}
.page-hero__img,
.page-hero__media img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.45;
  transform: scale(1.04);
  animation: heroKenBurnsSlow 14s ease-in-out infinite alternate;
}
@keyframes heroKenBurnsSlow {
  to { transform: scale(1.12) translate(-2%, -1%); }
}
.page-hero::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(22,25,28,0.5) 0%, rgba(22,25,28,0.25) 40%, rgba(22,25,28,0.85) 100%),
    radial-gradient(ellipse at 85% 90%, rgba(31,181,234,0.18), transparent 60%);
  z-index: 1;
}
.page-hero__inner {
  position: relative; z-index: 2;
  max-width: 820px;
}
.page-hero__breadcrumb {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.04em;
  margin-bottom: var(--s-2);
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 0.4rem;
}
.page-hero__breadcrumb a {
  color: rgba(255, 255, 255, 0.75);
  transition: color var(--t-base);
}
.page-hero__breadcrumb a:hover { color: var(--accent); }
.page-hero__breadcrumb span[aria-hidden] { color: rgba(255, 255, 255, 0.35); }
.page-hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.04;
  font-size: clamp(2.25rem, 5vw, 4.25rem);
  margin-bottom: var(--s-3);
  color: #fff;
  max-width: 18ch;
}
.page-hero__sub {
  font-size: clamp(1.05rem, 1.4vw, 1.3rem);
  color: rgba(255, 255, 255, 0.82);
  max-width: 60ch;
  margin-bottom: var(--s-4);
}
.page-hero__cta {
  display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-2);
}
.page-hero__cta .btn--ghost { color: #fff; --btn-bd: rgba(255, 255, 255, 0.4); }
.page-hero__cta .btn--ghost:hover { --btn-bg: #fff; --btn-fg: var(--ink); --btn-bd: #fff; }

/* Subtypes */
.subtypes {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-3);
}
@media (min-width: 768px) { .subtypes { grid-template-columns: repeat(2, 1fr); } }
.subtype {
  position: relative;
  padding: clamp(1.75rem, 3vw, 2.5rem);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: border-color var(--t-base), box-shadow var(--t-base) var(--ease-out), transform var(--t-base) var(--ease-out);
}
.subtype:hover {
  border-color: rgba(31, 181, 234, 0.32);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.subtype__num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--accent);
  letter-spacing: 0.18em;
  display: block;
  margin-bottom: var(--s-2);
}
.subtype__title { font-size: var(--fs-h3); margin-bottom: 0.4rem; }
.subtype__desc { color: var(--muted); }

/* Gallery — used by proizvod.html */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 200px;
  gap: clamp(0.75rem, 1.5vw, 1.25rem);
}
@media (min-width: 768px) { .gallery { grid-auto-rows: 220px; } }
@media (min-width: 992px) {
  .gallery { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 240px; }
}
.gallery__tile {
  position: relative;
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-soft);
}
.gallery__tile--lg { grid-column: span 2; grid-row: span 2; }
.gallery__tile img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1s var(--ease-out);
}
.gallery__tile:hover img { transform: scale(1.05); }
.gallery__tile::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(22, 25, 28, 0.32) 100%);
  opacity: 0;
  transition: opacity var(--t-base);
}
.gallery__tile:hover::after { opacity: 1; }

/* Related products grid (3-up at desktop without ID specificity) */
.product-grid--related { grid-template-columns: 1fr; }
@media (min-width: 576px) { .product-grid--related { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 992px) { .product-grid--related { grid-template-columns: repeat(3, 1fr); } }

/* Single-button CTA layout (used on sub-pages) */
.cta__main-btn {
  align-self: start;
  font-size: 1rem;
  padding: 1.05rem 1.7rem;
}
@media (min-width: 768px) {
  .cta__main-btn { align-self: center; justify-self: end; }
}

/* ---------- 22d. Static pages (o-nama / kontakt / reference / galerija) -------- */

/* Larger stats variant */
.stats--lg { padding-block: var(--s-4); }
.stats--lg .stat__num { font-size: clamp(2.5rem, 4.5vw, 4rem); }

/* Mobile menu active state */
.mobile-menu__link--active { color: var(--accent) !important; }

/* Check list — used on o-nama + reference */
.check-list {
  display: grid;
  gap: 0.6rem;
  margin-top: var(--s-3);
}
.check-list li {
  display: flex; align-items: flex-start; gap: 0.6rem;
  color: var(--ink);
  font-size: 0.98rem;
}
.check-list li svg {
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 2px;
}

/* Certificate card — aside on o-nama */
.cert-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(2rem, 4vw, 3rem);
  box-shadow: var(--shadow);
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  overflow: hidden;
}
.cert-card::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(140% 80% at 50% 0%, var(--accent-100), transparent 60%);
  pointer-events: none;
}
.cert-card__pane {
  position: relative;
  width: clamp(64px, 8vw, 96px);
  color: var(--accent);
  margin-bottom: var(--s-2);
}
.cert-card__eyebrow {
  position: relative;
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-600);
}
.cert-card__title {
  position: relative;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  letter-spacing: -0.01em;
  color: var(--ink);
}
.cert-card__sub {
  position: relative;
  color: var(--muted);
  max-width: 32ch;
}

/* Contact cards — kontakt.html */
.contact-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-3);
}
@media (min-width: 576px) { .contact-cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 992px) { .contact-cards { grid-template-columns: repeat(4, 1fr); } }
.contact-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 2.5vw, 2rem);
  transition: border-color var(--t-base), box-shadow var(--t-base) var(--ease-out), transform var(--t-base) var(--ease-out);
}
.contact-card:hover {
  border-color: rgba(31,181,234,0.32);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}
.contact-card__icon {
  display: inline-grid; place-items: center;
  width: 48px; height: 48px;
  border-radius: var(--radius);
  background: var(--accent-100);
  color: var(--accent-600);
  margin-bottom: var(--s-2);
}
.contact-card__title {
  font-size: var(--fs-h3);
  margin-bottom: 0.4rem;
  font-family: var(--font-display);
  font-weight: 700;
}
.contact-card__body {
  color: var(--muted);
  line-height: 1.55;
}
.contact-card__body a {
  color: var(--ink);
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: color var(--t-base), border-color var(--t-base);
}
.contact-card__body a:hover { color: var(--accent-600); border-color: var(--accent); }

/* Field error styling (kontakt form) */
.field__error {
  display: block;
  min-height: 1.1rem;
  font-size: 0.82rem;
  color: #c03a4a;
  margin-top: 4px;
}
.field input.field--error,
.field textarea.field--error {
  border-color: #c03a4a;
  background: #fff5f7;
  box-shadow: 0 0 0 4px rgba(192,58,74,0.1);
}

/* Map */
.map {
  width: 100%;
  height: clamp(320px, 50vh, 520px);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  box-shadow: var(--shadow);
}
.map-note {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  margin-top: var(--s-2);
  font-size: 0.92rem;
  color: var(--muted);
}
.map-note svg { color: var(--accent); }
/* Make Leaflet popups feel native */
.leaflet-popup-content-wrapper {
  border-radius: var(--radius);
  font-family: var(--font-body);
}
.leaflet-popup-content { font-size: 0.92rem; line-height: 1.5; margin: 0.7rem 0.9rem; }

/* Business details */
.section--narrow { padding-block: clamp(2rem, 4vw, 3rem); }
.biz-info {
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
  letter-spacing: 0.02em;
}
.biz-info strong { color: var(--ink); font-weight: 600; }
.biz-info span[aria-hidden] { color: var(--accent); margin: 0 0.35rem; }

/* Featured project — reference.html */
.featured {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2.5rem, 5vw, 4rem);
  align-items: center;
}
@media (min-width: 768px) {
  .featured { grid-template-columns: 1.05fr 1fr; }
}
.featured__media {
  position: relative;
  margin: 0;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-soft);
}
.featured__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1s var(--ease-out);
}
.featured__media:hover img { transform: scale(1.04); }
.featured__pane {
  position: absolute;
  width: 22%; aspect-ratio: 4 / 5;
  bottom: -1.2rem; right: -1.2rem;
  color: var(--accent);
  background: #fff;
  padding: 1rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.featured__copy .check-list { margin-top: var(--s-3); }

/* Reference grid */
.ref-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(0.75rem, 1.5vw, 1.25rem);
}
@media (min-width: 576px) { .ref-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 768px) { .ref-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .ref-grid { grid-template-columns: repeat(4, 1fr); } }
.ref-card {
  display: flex; align-items: center; gap: 1rem;
  padding: 1.25rem 1.4rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color var(--t-base), box-shadow var(--t-base) var(--ease-out), transform var(--t-base) var(--ease-out);
}
.ref-card:hover {
  border-color: rgba(31,181,234,0.4);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.ref-card__pane {
  display: inline-grid; place-items: center;
  width: 36px; height: 44px;
  flex-shrink: 0;
  color: var(--accent);
}
.ref-card__pane svg { width: 100%; height: 100%; }
.ref-card__name {
  font-weight: 500;
  font-size: 0.95rem;
  line-height: 1.35;
  color: var(--ink);
}

/* Masonry / gallery grid — galerija.html */
.masonry {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 180px;
  gap: clamp(0.75rem, 1.5vw, 1.25rem);
}
@media (min-width: 768px) {
  .masonry { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 220px; }
}
@media (min-width: 1100px) {
  .masonry { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 240px; }
}
.masonry__tile {
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-soft);
  cursor: pointer;
}
.masonry__tile--tall { grid-row: span 2; }
.masonry__tile--wide { grid-column: span 2; }
.masonry__tile img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1s var(--ease-out);
}
.masonry__tile:hover img { transform: scale(1.07); }
.masonry__overlay {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background: rgba(22, 25, 28, 0);
  transition: background var(--t-base);
}
.masonry__overlay svg {
  width: 48px; height: 60px;
  color: #fff;
  opacity: 0;
  transform: scale(0.9) rotate(-6deg);
  transition: opacity var(--t-base), transform var(--t-base) var(--ease-out);
}
.masonry__tile:hover .masonry__overlay { background: rgba(31, 181, 234, 0.45); }
.masonry__tile:hover .masonry__overlay svg { opacity: 1; transform: scale(1) rotate(0); }

/* Fancybox active — hide custom cursor + grain so the lightbox owns the layer */
body.fancybox-active .cursor { display: none !important; }
body.fancybox-active.use-cursor,
body.fancybox-active.use-cursor a,
body.fancybox-active.use-cursor button { cursor: auto !important; }
body.fancybox-active .grain { opacity: 0; }
.fancybox__container { z-index: 200000; }
.fancybox__caption { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.005em; }

/* ---------- 23. Reduced motion ------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .hero__slide.is-active .hero__img { animation: none; transform: none; }
  .page-hero__img, .page-hero__media img { animation: none; transform: none; }
  .marquee__track { animation: none; }
  .hero__pane-decor { animation: none; }
  .assistant__pulse { animation: none; opacity: 0; }
  .hero__scroll-mouse span { animation: none; }
  [data-reveal], [data-reveal-card] { opacity: 1; transform: none; }
  .split-line .word { transform: none; }
  .preloader { display: none; }
  .cursor { display: none; }
  body.use-cursor { cursor: auto; }
}
