/* ==========================================================================
   NEVIS v3 - početna (front-page.php). Samo klase .home-*; tokeni iz base.css.
   ========================================================================== */

.home-show-m { display: none; }

/* ---------- hero ---------- */
/* Desktop: visina ekrana minus header (sadržaj stane u 760px visine), tekst 7 / vizual 5.4; <= 900 vizual ispod teksta. */
.home-hero {
  --hh-head: 77px;
  display: flex; flex-direction: column; justify-content: center;
  min-height: min(calc(100svh - var(--hh-head)), 1000px);
  padding: clamp(24px, 4.5vh, 64px) 0 clamp(24px, 4vh, 48px);
  border-bottom: 1px solid var(--line); overflow: clip;
}
.home-hero__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5.4fr); gap: clamp(32px, 4vw, 72px); align-items: center; }
.home-hero__kicker { display: flex; white-space: nowrap; }
.home-hero__title { display: block; margin-top: clamp(16px, 2.6vh, 28px); font-size: clamp(50px, min(7.2vw, 11.2vh), 120px); line-height: .93; letter-spacing: -.052em; }
.home-hero__lead { margin-top: clamp(18px, 3vh, 32px); max-width: 54ch; }
.home-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(22px, 3.6vh, 40px); }
.home-hero__facts { margin-top: clamp(28px, 4.5vh, 56px); }
.home-hero__facts > * { padding-top: 16px; }


/* vizual: kolaž stvarnih projekata sa dubinom (sjaj, kobalt ploča, 3 sloja, UI čipovi) */
.home-hero__visual { position: relative; }
.hh-stage { position: relative; isolation: isolate; width: 100%; aspect-ratio: 1 / .96; }
.hh-glow {
  position: absolute; z-index: 0; left: 0; right: -10%; top: 4%; bottom: -4%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(30, 61, 255, .2), rgba(30, 61, 255, .07) 55%, rgba(30, 61, 255, 0));
}
.hh-plate {
  position: absolute; z-index: 1; right: 0; top: 21%; width: 80%; aspect-ratio: 1200 / 690; border-radius: 26px;
  background-color: var(--accent);
  background-image: linear-gradient(to right, rgba(255, 255, 255, .09) 1px, transparent 1px), linear-gradient(to bottom, rgba(255, 255, 255, .09) 1px, transparent 1px);
  background-size: 32px 32px; background-position: -1px -1px;
  box-shadow: 0 40px 80px -40px rgba(30, 61, 255, .65);
}
.hh-card {
  position: absolute; margin: 0; padding: 6px; border-radius: 20px; background: var(--white);
  border: 1px solid rgba(12, 12, 13, .08);
  box-shadow: 0 1px 2px rgba(12, 12, 13, .06), 0 18px 36px -18px rgba(12, 12, 13, .28), 0 50px 80px -48px rgba(12, 12, 13, .38);
}
.hh-card__img { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 670; object-fit: cover; object-position: center; border-radius: 14px; background: var(--paper-2); }
.hh-card__tag {
  position: absolute; left: 16px; top: 16px; padding: 5px 10px; border-radius: var(--r-pill);
  background: rgba(12, 12, 13, .82); color: var(--paper); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; line-height: 1.3;
}
.hh-card--3 { z-index: 2; left: 0; top: 0; width: 50%; }
.hh-card--1 { z-index: 3; right: 4%; top: 13%; width: 84%; }
.hh-card--2 { z-index: 4; left: 0; bottom: 3%; width: 56%; }

.hh-chip--lead { top: 4%; right: 0; }
.hh-chip--sent { right: 7%; bottom: 12%; padding: 7px 16px 7px 7px; border-radius: var(--r-pill); background: var(--ink); color: var(--paper); border-color: transparent; }
.hh-chip--sent .hh-chip__ico { width: 28px; height: 28px; border-radius: 50%; }

/* lagani parallax mišem (main.js postavlja --px/--py na .hh-stage; samo fini pokazivač, > 1100px) */
.hh-plate, .hh-card, .hh-chip { translate: calc(var(--px, 0) * var(--dx, 0px)) calc(var(--py, 0) * var(--dy, 0px)); transition: translate .6s var(--ease-out); }
.hh-plate { --dx: 6px; --dy: 5px; }
.hh-card--3 { --dx: 4px; --dy: 3px; }
.hh-card--1 { --dx: -6px; --dy: -5px; }
.hh-card--2 { --dx: -11px; --dy: -8px; }
.hh-chip { --dx: -15px; --dy: -11px; }

.nv-motion .hh-glow { animation: hh-glow-in 1s var(--ease-out) 100ms both; }
.nv-motion .hh-plate { --fx: 24px; animation: hh-rise .8s var(--ease-out) 180ms both; }
.nv-motion .hh-card--3 { --fx: -18px; animation: hh-rise .8s var(--ease-out) 240ms both; }
.nv-motion .hh-card--1 { animation: hh-rise .8s var(--ease-out) 300ms both; }
.nv-motion .hh-card--2 { --fx: -24px; animation: hh-rise .75s var(--ease-out) 400ms both; }
.nv-motion .hh-chip--lead { animation: hh-pop .42s var(--ease-out) 660ms both; }
.nv-motion .hh-chip--sent { animation: hh-pop .42s var(--ease-out) 740ms both; }

/* niži laptop ekrani: sve stane u visinu */
@media (min-width: 901px) and (max-height: 820px) {
  .home-hero__title { font-size: clamp(50px, min(7vw, 10.6vh), 120px); }
  .home-hero__lead { font-size: 18px; }
}

/* ---------- klijenti ---------- */
.home-clients { padding: 26px 0; border-bottom: 1px solid var(--line); }
.home-clients__row { display: flex; align-items: center; gap: 12px 48px; }
.home-clients__label { color: var(--muted); flex-shrink: 0; }
.home-clients__viewport { flex: 1; min-width: 0; }
.home-clients__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 32px; }
.home-clients__item.is-dup { display: none; }
.home-clients__link { display: flex; align-items: center; height: 48px; color: var(--field); }
/* logo fajlovi su vec sivi (#8C8E94); brightness(.087) ih na hover vodi u --ink (#0C0C0D) */
.home-clients__logo { display: block; width: auto; max-width: none; height: var(--h, 28px); filter: grayscale(1) brightness(0) opacity(.43); transition: filter .25s ease; }
.home-clients__word { font-family: var(--f-display); font-weight: 700; font-size: 20px; letter-spacing: -.02em; white-space: nowrap; transition: color .25s ease; }
a.home-clients__link:hover .home-clients__logo, a.home-clients__link:focus-visible .home-clients__logo { filter: grayscale(1) brightness(0) opacity(.9); }
a.home-clients__link:hover, a.home-clients__link:focus-visible { color: var(--ink); }
@keyframes home-clients-marquee { to { transform: translateX(-50%); } }
@media (max-width: 900px) {
  .home-clients { padding: 18px 0 14px; }
  .home-clients__row { display: block; }
  .home-clients__label { display: block; margin-bottom: 6px; }
  .home-clients__viewport {
    overflow: hidden; margin-inline: calc(-1 * var(--gut));
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
            mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  }
  .home-clients__list { flex-wrap: nowrap; justify-content: flex-start; gap: 0; width: max-content; animation: home-clients-marquee 34s linear infinite; }
  .home-clients__viewport:hover .home-clients__list { animation-play-state: paused; }
  .home-clients__item { padding-right: 40px; }
  .home-clients__item.is-dup { display: block; }
  .home-clients__logo { height: calc(var(--h, 28px) * .9); }
}
@media (max-width: 900px) and (prefers-reduced-motion: reduce) {
  .home-clients__viewport { overflow: visible; margin-inline: 0; -webkit-mask-image: none; mask-image: none; }
  .home-clients__list { width: auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); justify-items: center; gap: 4px 16px; }
  .home-clients__item { padding-right: 0; }
  .home-clients__item.is-dup { display: none; }
}

/* ---------- naslovi sekcija ---------- */
.home-h2 { max-width: var(--m-h2); }



/* ---------- 05 česta pitanja (.faq-item kuka iz main.js) ---------- */
.home-faq__list { margin-top: var(--head-gap); border-top: 1px solid var(--line-strong); }
.home-faq .faq-item { border-bottom: 1px solid var(--line); }
.home-faq__q { margin: 0; font-size: inherit; }
.home-faq .faq-question { display: flex; width: 100%; justify-content: space-between; align-items: center; gap: 16px; min-height: 72px; padding: 20px 0; background: none; border: 0; cursor: pointer; text-align: left; color: var(--ink); font-family: var(--f-display); font-weight: 700; font-size: clamp(18px, 1.8vw, 22px); letter-spacing: -.02em; line-height: 1.25; }
.home-faq .faq-question:hover { color: var(--accent); }
.home-faq__ico { position: relative; flex-shrink: 0; width: 20px; height: 20px; }
.home-faq__ico::before, .home-faq__ico::after { content: ""; position: absolute; left: 2px; right: 2px; top: 9px; height: 2px; background: currentColor; transition: transform .25s var(--ease); }
.home-faq__ico::after { transform: rotate(90deg); }
.home-faq .faq-item.active .home-faq__ico { color: var(--accent); }
.home-faq .faq-item.active .home-faq__ico::after { transform: rotate(0); }
.home-faq .faq-answer { max-height: 0; overflow: hidden; visibility: hidden; transition: max-height .3s var(--ease), visibility 0s linear .3s; }
.home-faq .faq-item.active .faq-answer { visibility: visible; transition: max-height .3s var(--ease), visibility 0s; }
.home-faq .faq-answer p { padding: 0 40px 24px 0; max-width: var(--m-prose); color: var(--ink-2); }

/* ---------- 06 blog ---------- */
.home-blog { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px var(--card-gap); margin-top: var(--head-gap); }
.home-post__link { display: block; text-decoration: none; color: var(--ink); }
.home-post__img { display: block; border-radius: var(--r-card); overflow: hidden; background: var(--paper-2); aspect-ratio: 16 / 10; }
.home-post__img img { width: 100%; height: 100%; object-fit: cover; }
.home-post__date { display: block; margin-top: 14px; color: var(--muted); }
.home-post__title { margin-top: 6px; font-size: 20px; letter-spacing: -.02em; line-height: 1.25; transition: color .2s; }
.home-post__link:hover .home-post__title { color: var(--accent); }

/* ---------- CTA (kobalt) + forma ---------- */
.home-cta__grid { display: grid; grid-template-columns: minmax(0, 1fr) var(--aside); gap: var(--col-gap); align-items: center; }
.home-cta__title { margin-top: 20px; color: var(--white); }
.home-cta__links { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 28px; margin-top: 36px; font-weight: 600; }
.home-cta__links a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--white); text-underline-offset: 4px; }
.home-cta__links a:hover { color: var(--accent-soft); }
.home-cta__links svg { width: 18px; height: 18px; }
.home-cta .lead-form { box-shadow: 0 30px 60px -30px rgba(12, 12, 13, .5); border-color: transparent; }
.home-cta .lead-submit { background: var(--ink); }
.home-cta .lead-submit:hover { background: #26272B; }

/* ---------- tablet ---------- */
@media (max-width: 1100px) {
  .home-blog { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- mobitel ---------- */
@media (max-width: 900px) {
  .home-hide-m { display: none !important; }
  span.home-show-m { display: inline; }
  a.home-show-m { display: inline-flex; }

  .home-hero__title { margin-top: 20px; }
  .home-hero__lead { margin-top: 20px; font-size: 17px; }
  .home-hero__actions { flex-direction: column; gap: 10px; margin-top: 28px; }
  .home-hero__actions .btn { width: 100%; min-height: 54px; }
  .home-hero__facts { margin-top: 32px; }
  .home-hero__facts span { display: none; }


  .home-faq .faq-question { min-height: 60px; padding: 16px 0; }
  .home-faq .faq-answer p { padding-right: 0; }
  .home-hero__kicker { white-space: normal; }

  .home-blog { grid-template-columns: minmax(0, 1fr); }
  .home-blog { gap: 0; border-top: 1px solid var(--line-strong); }
  .home-post { border-bottom: 1px solid var(--line); }
  .home-post__link { display: grid; grid-template-columns: 96px minmax(0, 1fr); column-gap: 16px; padding: 16px 0; align-items: start; }
  .home-post__img { grid-row: span 2; aspect-ratio: 1; }
  .home-post__date { margin-top: 0; }
  .home-post__title { font-size: 17px; }

  .home-cta__grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .home-cta__title { margin-top: 12px; font-size: 40px; }
  .home-cta__links { margin-top: 20px; gap: 0 20px; }
  .home-cta .lead-form { padding: 20px; border-radius: var(--r-md); }
}


/* hero, tablet (901-1100): ostaje u dvije kolone, uži vizual */
@media (min-width: 901px) and (max-width: 1100px) {
  .home-hero__grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 32px; }
  .hh-chip__txt small { display: none; }
}

/* hero, mobitel/tablet (<= 900): vizual ispod teksta, puna širina */
@media (max-width: 900px) {
  .home-hero { display: block; min-height: 0; padding: var(--hero-top) 0 var(--hero-bot); }
  .home-hero__grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .home-hero__title { font-size: clamp(40px, 10.4vw, 80px); }
  .hh-stage { aspect-ratio: 1 / .84; max-width: 640px; margin-inline: auto; }
  .hh-card { padding: 4px; border-radius: 14px; }
  .hh-card__img { border-radius: 10px; }
  .hh-card__tag { left: 10px; top: 10px; padding: 4px 8px; font-size: 9.5px; }
  .hh-card--3 { width: 48%; }
  .hh-card--1 { width: 82%; right: 3%; top: 14%; }
  .hh-card--2 { width: 56%; bottom: 2%; }
  .hh-plate { width: 78%; top: 22%; border-radius: 18px; }
  .hh-chip { gap: 8px; padding: 7px 11px 7px 7px; border-radius: 12px; }
  .hh-chip__ico { width: 28px; height: 28px; border-radius: 8px; }
  .hh-chip__ico svg { width: 14px; height: 14px; }
  .hh-chip__txt b { font-size: 12.5px; }
  .hh-chip__txt small { font-size: 9.5px; }
  .hh-chip--lead { top: 2%; }
  .hh-chip--sent { right: 2%; bottom: 7%; padding: 5px 12px 5px 5px; }
  .hh-chip--sent .hh-chip__ico { width: 24px; height: 24px; }

  /* lakši ulaz na mobitelu */
  /* Mobitel: naslov (LCP element) bez animacije riječi, da se prikaže odmah (PSI LCP render delay 2,4 s). */
  .nv-motion .hh-w > span { animation: none; }
  .nv-motion .hh-in { animation-duration: .5s; }
}
@media (max-width: 480px) {
  .hh-card__tag { display: none; }
}
