/* Final hierarchy. Component selectors retain their established visual roles. */
h1 {
  font-size: clamp(2.5rem, 4.6vw, 5.6rem);
}

h2 {
  font-size: clamp(2rem, 4.5vw, 4.4rem);
}

h3 {
  font-size: clamp(1.125rem, 1.7vw, 1.5rem);
}

h1,
h2,
h3 {
  overflow-wrap: break-word;

  text-wrap: balance;
}

p {
  color: #acbcb2;
  line-height: 1.7;
}

.hero-title {
  font-size: clamp(2.5rem, 4.6vw, 5.6rem);
}

.services-section-heading h2,
.work-heading h2,
.klijenti-title {
  font-size: clamp(2rem, 4.5vw, 4.4rem);
}

#tehnologija .tech-slide-title {
  font-size: clamp(1.85rem, 3.2vw, 3.25rem);
}

#o-nama .editorial-title {
  font-size: clamp(2.3rem, 5.4vw, 5rem);
}

#o-nama .bento-card-title {
  font-size: clamp(1.3rem, 2.2vw, 2rem);
}

#proces .proces-title {
  font-size: clamp(2.25rem, 4.5vw, 4.4rem);
}

#proces .step-title {
  font-size: clamp(1.125rem, 1.7vw, 1.5rem);
}

.service-card h3,
.work-card h3,
.case-summary h3,
.case-gallery h3 {
  font-size: clamp(1.125rem, 1.65vw, 1.5rem);
}

.case-heading h2 {
  font-size: clamp(2rem, 4.8vw, 4.5rem);
}

#kontakt .brief-heading h3 {
  font-size: clamp(1.55rem, 2.8vw, 2.25rem);
}

.hero-offer,
.hero-description,
.services-section-heading > p,
.work-heading > p,
.service-card p,
.work-card-copy p,
.case-summary p,
.case-footer p,
#tehnologija .tech-slide-desc,
#o-nama .bento-card p,
#proces .step-desc,
#kontakt .terminal-subtitle,
#kontakt .brief-heading p,
#kontakt .brief-delivery-note {
  line-height: 1.7;
}

#proces .step-desc {
  font-size: clamp(0.875rem, 0.95vw, 1rem);
  color: #a9bdb0;
}

.hero-offer {
  color: rgba(255, 255, 255, 0.8);
}

.hero-description {
  color: #acbcb2;
}

.header-nav a,
.nav-links a {
  white-space: nowrap;
}

.process-stack-card,
.team-marquee-inner,
.tech-slide-image,
.hero-route-veil {
  will-change: transform, opacity;
}

.hero-grid-matrix {
  inset: -100px 0 0;

  height: calc(100% + 100px);

  animation: heroGridCompositor 35s linear infinite;
  animation-play-state: paused;
  will-change: transform, opacity;
}

@keyframes heroGridCompositor {
  to {
    transform: translateY(100px);
  }
}

#hero[data-ambient="playing"] .hero-grid-matrix {
  animation-play-state: running;
}

@media (max-width: 1360px) and (min-width: 861px) {
  .header-status {
    display: none;
  }
}

@media (max-width: 767px) {
  .hero-title {
    font-size: clamp(2.25rem, 8.8vw, 3.8rem);
  }

  .hero-scene[data-state="static"] {
    position: relative;

    display: flex;
    flex-direction: column;

    height: auto;
    min-height: 0;
    width: 100%;
    margin-top: 12px;
    overflow: visible;
  }

  .hero-scene[data-state="static"] #hero-3d {
    display: none;
  }

  .hero-scene[data-state="static"] .hero-scene-fallback {
    position: static;

    order: 0;
    display: block;

    width: 100%;
    height: clamp(260px, 80vw, 390px);
    max-height: none;
    object-fit: contain;
    transform: none;

    opacity: 1;
    filter: none;
  }

  .hero-scene[data-state="static"] .hero-scene-hint {
    position: static;

    order: 1;

    width: 100%;

    transform: none;

    text-align: center;

    margin: 0 0 14px;
  }

  .hero-scene[data-state="static"] .hero-service-links {
    position: static;

    order: 2;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;

    padding: 0;
    width: 100%;
  }

  .hero-scene[data-state="static"] .hero-service-node {
    position: relative;

    display: flex;
    align-items: center;

    width: 100%;
    min-height: 44px;
    height: auto;
    margin: 0;
    padding: 10px 12px;

    background: #d1ffe508;
    border: 1px solid #a6d8b623;
    border-radius: 8px;

    transform: none !important;
  }

  .hero-scene[data-state="static"] .hero-service-node::before,
  .hero-scene[data-state="static"] .hero-service-node::after {
    display: none;
  }

  .hero-scene[data-state="static"] .hero-service-label {
    position: static;

    display: block;

    opacity: 1;
    visibility: visible;
    transform: none;

    padding: 0;

    border: 0;
    background: none;
    backdrop-filter: none;

    white-space: normal;
    font-size: 11px;
    line-height: 1.5;
  }

  #heroParticles,
  #terminalCanvas,
  #introParticles,
  #cursorSpotlight,
  #cursorDot {
    display: none;
  }

  .hero-content,
  .hero-scene {
    filter: none !important;
  }
}

@media (max-width: 767px), (hover: none), (prefers-reduced-motion: reduce) {
  .hero-grid-matrix,
  .scroll-cue,
  .mouse-wheel,
  .terminal-diode {
    animation: none;
    will-change: auto;
  }
}

/* Touch affordances use persistent labels, without sticky hover transforms. */
@media (hover: none), (prefers-reduced-motion: reduce) {
  #cursorSpotlight,
  #cursorDot,
  #lightFlash,
  #cinemaIntro {
    display: none !important;
  }

  .hero-content,
  .hero-scene {
    filter: none !important;
  }

  .magnetic-btn,
  .bento-card,
  .bento-photo-wrap,
  .service-card,
  .work-card {
    transform: none !important;
  }

  .bento-photo-wrap img,
  .service-card:hover img,
  .work-card:hover img {
    transform: none !important;

    filter: none !important;
  }

  #o-nama .caption-sub {
    opacity: 1;

    max-height: none;

    transform: none;
  }

  .team-marquee-inner {
    will-change: auto;
  }

  .process-stack-card {
    will-change: opacity;
  }
}
