/* NDD Media — moderan, profesionalan finiš (ui-ux: suptilno, bez pretrpanosti) */

html {
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

::selection {
  background-color: rgba(251, 191, 36, 0.28);
  color: #fafafa;
}

.site-header {
  background: rgba(9, 9, 11, 0.78);
  box-shadow:
    0 1px 0 0 rgba(251, 191, 36, 0.07),
    0 8px 32px -8px rgba(0, 0, 0, 0.4);
}

/* Hero spotlight — mekani zlatni sjaj prati kursor (samo desktop; JS) */
[data-hero-spotlight] {
  isolation: isolate;
  --spot-x: 50%;
  --spot-y: 30%;
}

/* Suptilan film grain — iznad pozadinskih slojeva, ispod teksta (z-10) */
.hero-grain {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 9;
  display: block;
  width: 100%;
  height: 100%;
  mix-blend-mode: overlay;
  opacity: 0.55;
}

/* Početno stanje parallax slike (scale kompenzuje pomeraj pri skrolu) */
.hero-parallax-img {
  transform: translate3d(0, 0, 0) scale(1.065);
}

.hero-spotlight {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 3;
  background: radial-gradient(
    520px circle at var(--spot-x) var(--spot-y),
    rgba(251, 191, 36, 0.2),
    rgba(251, 191, 36, 0.06) 34%,
    transparent 56%
  );
  mix-blend-mode: screen;
  opacity: 0.72;
}

@media (prefers-reduced-motion: reduce) {
  .hero-grain {
    opacity: 0.28;
    mix-blend-mode: soft-light;
  }

  .hero-spotlight {
    mix-blend-mode: normal;
    opacity: 0.4;
    background: radial-gradient(
      ellipse 90% 70% at 50% 28%,
      rgba(251, 191, 36, 0.09),
      transparent 68%
    );
  }

  .hero-grid-overlay {
    animation: none !important;
  }

  .btn-primary-ndd::after {
    display: none;
  }

  .btn-primary-ndd:hover {
    box-shadow: none;
  }

  .glass-card:hover,
  .hero-figure:hover {
    box-shadow: none;
  }
}

/* Suptilna mreža u hero dijelu */
.hero-grid-overlay {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, black 0%, black 40%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 0%, black 40%, transparent 100%);
}

.text-gradient-gold {
  background: linear-gradient(120deg, #fef3c7 0%, #fbbf24 42%, #b45309 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Primarni CTA — blaga dubina + sjaj pri hoveru */
.btn-primary-ndd {
  position: relative;
  overflow: hidden;
  transition:
    transform 0.2s ease,
    box-shadow 0.3s ease,
    background-color 0.2s ease;
}
.btn-primary-ndd:hover {
  box-shadow:
    0 4px 24px -4px rgba(251, 191, 36, 0.45),
    0 0 0 1px rgba(253, 230, 138, 0.12);
}
.btn-primary-ndd::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 35%,
    rgba(255, 255, 255, 0.22) 50%,
    transparent 65%
  );
  transform: translateX(-120%);
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
.btn-primary-ndd:hover::after {
  transform: translateX(120%);
}

.btn-outline-ndd {
  transition:
    border-color 0.2s ease,
    color 0.2s ease,
    background-color 0.2s ease,
    box-shadow 0.25s ease;
}
.btn-outline-ndd:hover {
  box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.12);
  background-color: rgba(251, 191, 36, 0.04);
}

/* Kartice — blagi glass + ivica */
.glass-card {
  background: linear-gradient(
    155deg,
    rgba(39, 39, 42, 0.42) 0%,
    rgba(24, 24, 27, 0.78) 100%
  );
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}
.glass-card:hover {
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.05) inset,
    0 20px 40px -24px rgba(0, 0, 0, 0.5);
}

/* Hero slika — finiji okvir pri hoveru */
.hero-figure {
  transition:
    border-color 0.35s ease,
    box-shadow 0.35s ease;
}
.hero-figure:hover {
  border-color: rgba(251, 191, 36, 0.22);
  box-shadow:
    0 25px 50px -12px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(251, 191, 36, 0.1);
}

/* Sekcije — tanka zlatna linija ispod naslova (samo vizuelni naglasak) */
.heading-accent {
  position: relative;
  display: inline-block;
}
.heading-accent::after {
  content: '';
  display: block;
  width: 2.5rem;
  height: 3px;
  margin: 0.75rem auto 0;
  border-radius: 9999px;
  background: linear-gradient(90deg, transparent, #fbbf24, transparent);
  opacity: 0.85;
}
.heading-accent-left::after {
  margin-left: 0;
  margin-right: auto;
}

/* Hero H1 uz text-center lg:text-left — crta prati poravnanje teksta */
.heading-accent-hero::after {
  margin-left: auto;
  margin-right: auto;
}
@media (min-width: 1024px) {
  .heading-accent-hero::after {
    margin-left: 0;
    margin-right: auto;
  }
}

/* ---- Scroll progress bar ---- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 60;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, #d97706 0%, #fbbf24 55%, #fef3c7 100%);
  pointer-events: none;
  transform-origin: left;
}

/* ---- Scroll to top ---- */
.scroll-top-btn {
  position: fixed;
  bottom: 1.75rem;
  right: 1.5rem;
  z-index: 40;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: rgba(24, 24, 27, 0.92);
  border: 1px solid rgba(251, 191, 36, 0.28);
  color: rgba(251, 191, 36, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  transform: translateY(0.5rem);
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    transform 0.3s ease,
    visibility 0.3s ease,
    border-color 0.2s ease,
    background-color 0.2s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
}
.scroll-top-btn.is-visible {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}
.scroll-top-btn:hover {
  border-color: rgba(251, 191, 36, 0.55);
  background: rgba(39, 39, 42, 0.96);
}
.scroll-top-btn:focus-visible {
  outline: 2px solid rgba(251, 191, 36, 0.55);
  outline-offset: 2px;
}

/* ---- Stats strip ---- */
.stat-card {
  position: relative;
  overflow: hidden;
  transition: border-color 0.25s ease;
}
.stat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.06) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.stat-card:hover::before { opacity: 1; }
.stat-card:hover { border-color: rgba(251, 191, 36, 0.25); }

.stat-number {
  font-variant-numeric: tabular-nums;
  background: linear-gradient(120deg, #fef3c7 0%, #fbbf24 55%, #d97706 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
  display: inline-block;
}

/* ---- CTA sekcija — radijalni akcenat ---- */
.cta-accent {
  background:
    radial-gradient(ellipse 70% 55% at 50% 100%, rgba(217, 119, 6, 0.1) 0%, transparent 68%),
    radial-gradient(ellipse 38% 40% at 82% 42%, rgba(251, 191, 36, 0.05) 0%, transparent 58%);
}

/* ---- Portfolio card overlay ---- */
.portfolio-img-wrap {
  position: relative;
  overflow: hidden;
}
.portfolio-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(9, 9, 11, 0.78) 0%,
    rgba(9, 9, 11, 0.12) 48%,
    transparent 100%
  );
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 0.875rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.portfolio-card:hover .portfolio-overlay { opacity: 1; }

.portfolio-overlay-icon {
  display: flex;
  width: 2.25rem;
  height: 2.25rem;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(251, 191, 36, 0.92);
  color: #09090b;
  font-size: 0.75rem;
  transform: scale(0.75);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  flex-shrink: 0;
}
.portfolio-card:hover .portfolio-overlay-icon { transform: scale(1); }

/* ---- Service broj (dekorativni) ---- */
.service-num {
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: 4.5rem;
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.05em;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.22) 0%, rgba(251, 191, 36, 0.06) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  user-select: none;
  display: block;
  margin-bottom: 0.35rem;
}

/* ---- Ikona na karticama vrijednosti ---- */
.value-icon {
  display: flex;
  width: 2.5rem;
  height: 2.5rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.625rem;
  background: rgba(251, 191, 36, 0.1);
  color: rgba(251, 191, 36, 0.88);
  margin-bottom: 0.875rem;
  font-size: 0.9375rem;
  flex-shrink: 0;
  transition: background-color 0.2s ease;
}
.motion-hover:hover .value-icon {
  background: rgba(251, 191, 36, 0.17);
}

/* ---- Process step badge ---- */
.process-step-badge {
  display: inline-flex;
  width: 1.625rem;
  height: 1.625rem;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.22);
  color: rgba(251, 191, 36, 0.85);
  font-size: 0.6875rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 0.075rem;
}

@media (prefers-reduced-motion: reduce) {
  .scroll-progress { transition: none; }
  .scroll-top-btn { transition: opacity 0.01ms, visibility 0.01ms; }
  .portfolio-overlay,
  .portfolio-overlay-icon { transition: none; }
  .stat-card::before { transition: none; }
}
