/* ==========================================================================
   Centar Ideja — stylesheet
   Design: blackout stage background, tungsten-amber signature accent,
   cool LED-blue as rare contrast. Mono type for technical/rider-style
   labels, display type for headings, humanist sans for body copy.
   ========================================================================== */

:root {
  /* Brand colors sampled from the mark: equalizer bars run
     cyan → violet → magenta, mapping to Audio → Video → Light. */
  --bg: #0a0818;
  --surface: #14121f;
  --surface-2: #1c1a2b;
  --surface-3: #242238;
  --border: rgba(238, 236, 250, 0.09);
  --border-strong: rgba(238, 236, 250, 0.17);
  --text: #f3f1fa;
  --text-muted: #9895ab;
  --text-dim: #656279;

  --audio: #20dffc;
  --audio-soft: rgba(32, 223, 252, 0.13);
  --video: #8d7cda;
  --video-soft: rgba(141, 124, 218, 0.15);
  --light: #f022bc;
  --light-soft: rgba(240, 34, 188, 0.13);

  --accent: var(--video);
  --accent-soft: var(--video-soft);
  --cool: var(--audio);
  --cool-soft: var(--audio-soft);
  --brand-gradient: linear-gradient(90deg, var(--audio), var(--video), var(--light));

  /* Type */
  --font-display: "Space Grotesk", "Inter", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;

  /* Layout */
  --container: 1160px;
  --radius-s: 3px;
  --radius-m: 6px;
  --nav-h: 76px;
}

/* ---------- Cross-page transitions ----------
   Native View Transitions for full-page nav (Chromium only — other
   browsers just navigate normally). No JS involved, so it can't get
   stuck mid-transition or break modifier-key clicks. */
@view-transition {
  navigation: auto;
}
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.25s;
  animation-timing-function: ease;
}
/* The nav underline gets its own slower group animation — the browser
   slides it from the old page's active link to the new one. */
::view-transition-group(nav-underline) {
  animation-duration: 0.3s;
  animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
}
/* ---------- Language switch: fade ----------
   Toggled by main.js: fades the page out, swaps every [data-hr]/
   [data-ph-hr] node's text while invisible, fades back in — simpler
   and more robust than animating individual text nodes. */
body.lang-fading {
  opacity: 0;
}
@media (prefers-reduced-motion: reduce) {
  @view-transition {
    navigation: none;
  }
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  /* [data-reveal] ships hidden directly in the HTML so JS can't cause
     a flash-of-visible-then-hide — needs this escape hatch or a
     reduced-motion visitor would never get .is-visible and stay
     invisible forever. */
  [data-reveal] {
    opacity: 1 !important;
    translate: 0 !important;
    filter: none !important;
  }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: opacity 0.25s ease;
}
img { max-width: 100%; display: block; }
/* The browser's default tap-highlight is redundant (we style hover/
   focus already) and read as a stray blue box on the mobile nav. */
a, button { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0; }
button { font: inherit; cursor: pointer; }
input, textarea, select { font: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------- Eyebrow / channel label ----------
   Styled after a lighting-desk channel strip: sections are numbered
   like cues on a rider. */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}
.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: rgba(10, 8, 24, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.01em;
}
.brand-mark {
  width: 32px;
  height: 32px;
  object-fit: contain;
  display: block;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
}
.nav-links a {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  padding: 6px 2px;
  position: relative;
  transition: color 0.15s ease, text-shadow 0.25s ease;
}
.nav-links a:hover { color: var(--text); }
.nav-links a[aria-current="page"] {
  color: var(--text);
  /* Soft colour wash off the underline below — reads as lit from
     underneath rather than merely marked. */
  text-shadow: 0 3px 12px var(--accent-soft);
}
.nav-links a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 1px;
  background: var(--accent);
  /* Tight glow on the line, plus a softer one offset upward so light
     visibly spills toward the text. */
  box-shadow: 0 0 6px 1px var(--accent), 0 -10px 16px -4px var(--accent-soft);
  /* Same name on every page — the view transition (see above) glides
     this between the old and new active link instead of popping in. */
  view-transition-name: nav-underline;
}
.nav-right { display: flex; align-items: center; gap: 18px; }

.lang-toggle {
  display: flex;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-s);
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 12px;
}
.lang-toggle button {
  background: transparent;
  border: none;
  color: var(--text-dim);
  padding: 7px 11px;
  letter-spacing: 0.05em;
}
.lang-toggle button.active { background: var(--surface-3); color: var(--accent); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  width: 30px; height: 24px;
  position: relative;
}
.nav-toggle span, .nav-toggle::before, .nav-toggle::after {
  content: "";
  position: absolute; left: 0; right: 0;
  height: 1.5px; background: currentColor;
}
.nav-toggle::before { top: 2px; }
.nav-toggle span { top: 11px; }
.nav-toggle::after { top: 20px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.03em;
  padding: 12px 22px;
  border-radius: var(--radius-s);
  border: 1px solid transparent;
  transition: all 0.15s ease;
}
.btn-primary { background: var(--brand-gradient); color: #0a0818; font-weight: 600; border: none; }
.btn-primary:hover { filter: brightness(1.1); }
.btn-ghost { border-color: var(--border-strong); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Homepage splash intro ----------
   Pure CSS animation: logo + name + tagline flash in, hold, fade out
   before the hero's own entrance. Plays once per session — decided
   server-side (ci_splash_seen cookie, index.php) rather than a
   client-side check, so it can't flash on repeat visits. Reduced
   motion collapses it via the global override above. */
.splash {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  pointer-events: none;
  animation: splash-panel 4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.splash-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  opacity: 0;
  animation: splash-content 4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.splash-logo {
  width: 136px;
  height: 136px;
  object-fit: contain;
}
.splash-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 30px;
  letter-spacing: -0.01em;
  color: var(--text);
}
.splash-tagline {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--text);
  text-align: center;
  max-width: 300px;
}
@keyframes splash-panel {
  0%   { opacity: 1; }
  40%  { opacity: 1; }
  100% { opacity: 0; visibility: hidden; }
}
@keyframes splash-content {
  0%   { opacity: 0; translate: 0 10px; }
  45%  { opacity: 1; translate: 0 0; }
  55%  { opacity: 1; }
  100% { opacity: 0; }
}

/* ---------- Hero / spotlight signature ---------- */
.hero {
  position: relative;
  min-height: calc(100vh - var(--nav-h));
  margin-bottom: -1px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--bg);
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url("../images/Hero-img.JPG");
  background-size: cover;
  background-position: center 32%;
  background-repeat: no-repeat;
  opacity: 0.4;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, black 68%, black 88%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0%, black 68%, black 88%, transparent 100%);
  pointer-events: none;
}
.hero::before {
  /* the spotlight — position driven by JS via --mx/--my, falls back
     to a fixed centered glow if JS/motion is unavailable */
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(
    620px circle at var(--mx, 70%) var(--my, 32%),
    var(--accent-soft),
    transparent 60%
  );
  pointer-events: none;
  transition: background-position 0.2s ease;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 70% 30%, black, transparent 75%);
  opacity: 0.5;
  pointer-events: none;
}
.hero .container { position: relative; z-index: 2; max-width: 880px; }
.hero .eyebrow { text-shadow: 0 1px 10px rgba(2, 1, 8, 0.9); }
.hero .btn-ghost { background: rgba(10, 8, 24, 0.5); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.hero .btn-ghost:hover { background: rgba(10, 8, 24, 0.65); }
.hero h1 {
  font-size: clamp(38px, 5.4vw, 66px);
  line-height: 1.06;
  margin-bottom: 26px;
  text-shadow: 0 2px 24px rgba(2, 1, 8, 0.7);
}
.hero h1 em {
  font-style: normal;
  color: var(--accent);
}
.hero p.lead {
  font-size: 18px;
  color: #fff;
  max-width: 540px;
  margin-bottom: 36px;
  white-space: pre-line;
  text-shadow: 0 3px 26px rgba(0, 0, 0, 0.95), 0 1px 4px rgba(0, 0, 0, 1), 0 0 2px rgba(0, 0, 0, 1);
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 46px; }
.hero-specs {
  display: flex;
  gap: 36px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.88);
  border-top: 1px solid var(--border);
  padding-top: 20px;
  flex-wrap: wrap;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.95), 0 1px 3px rgba(0, 0, 0, 1);
}
.hero-specs strong { display: block; color: var(--text); font-size: 20px; font-family: var(--font-display); margin-bottom: 2px; text-shadow: 0 2px 16px rgba(0, 0, 0, 0.95), 0 1px 3px rgba(0, 0, 0, 1); }
.hero-specs .count-suffix { opacity: 0; transition: opacity 0.3s ease; }
.hero-specs .count-suffix.is-visible { opacity: 1; }

/* ---------- Hero scroll cue ----------
   Invisible/unclickable until JS reveals it, once the hero-specs wave
   has played and the visitor is still at the top — see initScrollCue
   in main.js. */
.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--text-dim);
  opacity: 0;
  pointer-events: none;
  translate: -50% 0;
  transition: opacity 0.6s ease, color 0.2s ease;
}
.scroll-cue.is-visible {
  opacity: 1;
  pointer-events: auto;
}
.scroll-cue:hover,
.scroll-cue:focus-visible {
  color: var(--text);
}
.scroll-cue-icon {
  width: 20px;
  height: 20px;
  filter: drop-shadow(0 0 7px var(--accent-soft));
}
.scroll-cue.is-visible .scroll-cue-icon {
  animation: scroll-cue-bounce 2.2s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}
@keyframes scroll-cue-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}
@media (prefers-reduced-motion: reduce) {
  .scroll-cue { transition: opacity 0.3s ease; }
  .scroll-cue.is-visible .scroll-cue-icon { animation: none; }
}

/* ---------- Inner page head (no spotlight, lighter than .hero) ---------- */
.page-head { position: relative; z-index: 0; padding: 72px 0 20px; border-bottom: 1px solid var(--border); overflow: hidden; }
.page-head::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 70% 30%, black, transparent 75%);
  opacity: 0.5;
  pointer-events: none;
}
/* usluge.php only (.page-head--photo): "see-through glass" via
   backdrop-filter — .spec-section is pulled up underneath it
   (negative margin-top, desktop only, see the responsive section) so
   the blur has a real photo behind it to work with, not a copy. */
.page-head--photo {
  z-index: 2;
  background: rgba(10, 8, 24, 0.18);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
}
/* Title fades in slightly after the photo/blur, overriding the
   shared .page-head/.hero timing below. */
.page-head--photo .eyebrow { animation-delay: 0.65s; }
.page-head--photo h1 { animation-delay: 0.7s; }
.page-head--photo p.lead { animation-delay: 0.75s; }

/* kontakt.php only (.page-head--contact): same "see-through glass"
   trick as .page-head--photo, pulled up under .contact-section. The
   tint/blur lives on ::after (not the element) so it can fade in on
   load without also fading the title sitting on top of it. */
.page-head--contact { z-index: 2; }
.page-head--contact::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(10, 8, 24, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  pointer-events: none;
  /* Fades in instead of appearing at full strength instantly ("blue flash"). */
  opacity: 0;
  animation: above-fold-in 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: 0.25s;
}
.page-head .container { position: relative; z-index: 1; }
.page-head h1 { font-size: clamp(32px, 4.4vw, 48px); margin-bottom: 16px; max-width: 680px; white-space: pre-line; }
.page-head p.lead { color: var(--text-muted); font-size: 17px; max-width: 560px; }

/* kontakt.php only (.contact-section): Kontakt.jpg carries on as a
   backdrop behind the form/info panels, pulled up under .page-head--
   contact (negative margin-top, desktop only) so its backdrop-filter
   has this same real photo to blur. padding-top keeps the panels from
   crowding the title above them. */
.contact-section {
  position: relative;
  z-index: 0;
  overflow: hidden;
  margin-top: -260px;
  padding-top: 400px;
}
.contact-section::before {
  content: "";
  display: block;
  position: absolute;
  inset: -60px;
  z-index: -1;
  background-color: transparent;
  background-image: linear-gradient(180deg, rgba(10, 8, 24, 0.55), rgba(10, 8, 24, 0.7)), url('/images/Kontakt.jpg');
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center 35%;
  filter: blur(22px);
  mask-image: none;
  -webkit-mask-image: none;
  /* Already in the initial viewport (head/section overlap), so fades
     in on load instead of via scroll-reveal (which read as "just
     appears" here). */
  opacity: 0;
  animation: contact-bg-in 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: 0.5s;
  pointer-events: none;
}
@keyframes contact-bg-in {
  from { opacity: 0; }
  to { opacity: 0.75; }
}
.contact-section .container { position: relative; z-index: 1; }

/* ---------- Category group (Audio / Video / Light) ---------- */
.category-group { margin-bottom: 64px; }
.category-group:last-child { margin-bottom: 0; }
.category-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 24px; }
.category-head h2 { font-size: 24px; }
.category-head .category-num { font-family: var(--font-mono); font-size: 13px; color: var(--accent); }

/* ---------- Sections ---------- */
section { padding: 108px 0; border-bottom: 1px solid var(--border); }
section:last-of-type { border-bottom: none; }
/* Scroll target for the hero's scroll cue, offset under the sticky nav. */
#services { scroll-margin-top: var(--nav-h); }
.section-head { max-width: 620px; margin-bottom: 56px; }
.section-head h2 { font-size: clamp(26px, 3.4vw, 38px); margin-bottom: 16px; }
.section-head p { color: var(--text-muted); font-size: 16.5px; }

/* ---------- Above-the-fold reveal: hero / page-head ----------
   Pure CSS (delay + fill-mode "both"), not JS/IntersectionObserver —
   the latter's first callback races the initial paint and can flash
   content visible-then-hidden-then-back. This can't glitch and can't
   get stuck invisible if a script fails to load. */
@keyframes above-fold-in {
  from { opacity: 0; translate: 0 14px; }
  to { opacity: 1; translate: 0 0; }
}
.hero .eyebrow, .hero h1, .hero p.lead, .hero-actions,
.page-head .eyebrow, .page-head h1, .page-head p.lead {
  animation: above-fold-in 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: 0.4s;
}
.page-head h1, .hero h1 { animation-delay: 0.35s; }
.page-head p.lead, .hero p.lead { animation-delay: 0.4s; }
.hero-actions { animation-delay: 0.45s; }
/* Each spec item fades in 0.3s after the previous one — a small wave
   running left to right instead of the row appearing as one block. */
.hero-specs > div {
  animation: above-fold-in 1.1s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(0.5s + ((var(--wave-i, 0) + 1) * 0.3s));
}
.hero-specs > div:nth-child(1) { --wave-i: 0; }
.hero-specs > div:nth-child(2) { --wave-i: 1; }
.hero-specs > div:nth-child(3) { --wave-i: 2; }
.hero-specs > div:nth-child(4) { --wave-i: 3; }
/* Only waits for the splash intro (body.has-splash, set server-side
   in index.php) when it actually played — repeat visits within the
   same session use the same quick timing as any other page. */
body.has-splash .hero .eyebrow,
body.has-splash .hero h1,
body.has-splash .hero p.lead,
body.has-splash .hero-actions {
  animation-delay: 1.9s;
}
body.has-splash .hero-specs > div {
  animation-delay: calc(1.9s + ((var(--wave-i, 0) + 1) * 0.3s));
}

@media (hover: hover) and (pointer: fine) {
  @keyframes above-fold-in {
    from { opacity: 0; translate: 0 14px; filter: blur(4px); }
    to { opacity: 1; translate: 0 0; filter: blur(0px); }
  }
}

/* ---------- Module motion: scroll reveal + hover spotlight ----------
   Shared by every "module" (cards, spec sheets, steps, CTA band,
   contact panels) and the headings between them:
   1. Scroll reveal — JS tags each item [data-reveal] and flips it to
      .is-visible via IntersectionObserver on first viewport entry.
   2. Hover spotlight (modules only) — hovering one blurs/dims its
      siblings within the same parent.
   Both degrade to a static layout without JS, and are neutralised for
   prefers-reduced-motion by the global override above. */
.card, .spec-block, .ref-card, .step, .cta-band,
.contact-info, .contact-form-wrap,
.section-head, .category-head {
  transition:
    translate 0.6s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.5s ease;
}

[data-reveal] {
  opacity: 0;
  translate: 0 28px;
}
[data-reveal="text"] {
  translate: 0 14px;
}
[data-reveal].is-visible {
  opacity: 1;
  translate: 0 0;
}

/* Blur (reveal + spotlight) and the hover lift are scoped to real
   hover/precise-pointer devices — filter is expensive to animate and
   can freeze scroll on phones, and touch has no hover to trigger the
   spotlight anyway; touch still gets the fade/slide reveal. */
@media (hover: hover) and (pointer: fine) {
  .card, .spec-block, .ref-card, .step, .cta-band,
  .contact-info, .contact-form-wrap {
    transition:
      translate 0.6s cubic-bezier(0.16, 1, 0.3, 1),
      scale 0.4s cubic-bezier(0.16, 1, 0.3, 1),
      opacity 0.5s ease,
      filter 0.4s ease,
      border-color 0.25s ease,
      box-shadow 0.35s ease,
      background 0.35s ease,
      backdrop-filter 0.35s ease;
  }
  .section-head, .category-head {
    transition:
      translate 0.6s cubic-bezier(0.16, 1, 0.3, 1),
      opacity 0.5s ease,
      filter 0.4s ease;
  }

  [data-reveal] { filter: blur(8px); }
  [data-reveal="text"] { filter: blur(4px); }
  [data-reveal].is-visible { filter: blur(0px); }

  .spotlight-group.is-active [data-spotlight-item]:not(.is-focused) {
    filter: blur(3px);
    opacity: 0.55;
    scale: 0.98;
  }

  /* After .is-visible so the lift wins the specificity tie on :hover. */
  .card:hover, .spec-block:hover, .ref-card:hover, .step:hover, .cta-band:hover {
    border-color: var(--border-strong);
    translate: 0 -4px;
    box-shadow: 0 20px 44px -20px rgba(0, 0, 0, 0.5);
  }
}

/* ---------- Cards ---------- */
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  padding: 30px;
}
.card .card-index {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 18px;
  display: block;
}
.card h3 { font-size: 19px; margin-bottom: 10px; }
.card p { color: var(--text-muted); font-size: 14.5px; }
.card ul { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.card ul li {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-dim);
  padding-left: 16px;
  position: relative;
}
.card ul li::before {
  content: "";
  position: absolute; left: 0; top: 7px;
  width: 6px; height: 1px;
  background: var(--accent);
}

/* ---------- Spec sheet (equipment) ----------
   Whole-section photo, full-bleed behind all three cards. Two stacked
   layers (see initSpecBg in main.js) crossfade between category
   photos on hover; layer A ships with Audio pre-set in the HTML.
   Cards go glassy on hover so the photo reads through. */
/* Pulled up under .page-head--photo (usluge.php) so that section's
   blur has a real photo — bigger overlap shows through more of the
   header but also drags the Audio card up, so padding-top adds the
   air back (decoupling the two). Reset on mobile below. */
.spec-section {
  position: relative;
  overflow: hidden;
  margin-top: -650px;
  padding-top: 800px;
  /* Same trick, mirrored, for the .cta-section--photo that follows —
     see #services on index.php for the full reasoning. margin-bottom
     is how deep the overlap reaches, padding-bottom is the runway
     that absorbs it without displacing the actual card content. */
  padding-bottom: 450px;
  margin-bottom: -340px;
}
.spec-bg-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  /* "center" crops more off the top of the shot than intended —
     --spec-bg-pos lets Audio override the position per-instance (set
     inline in usluge.php and by switchTo in main.js). */
  background-position: var(--spec-bg-pos, center 20%);
  /* Fixed attachment holds the photo still while cards scroll over it,
     like a blind rolling up, instead of it sliding past normally. */
  background-attachment: fixed;
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}
.spec-bg-layer.is-active { opacity: 1; }
.spec-section .container { position: relative; z-index: 1; }
.spec-block {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  overflow: hidden;
  margin-bottom: 22px;
}
/* Cards sit lightly glassy at rest in the photo section already, so
   hovering only deepens the look instead of jumping opaque→glass. */
.spec-section .spec-block {
  background: rgba(20, 18, 31, 0.78);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}
@media (hover: hover) and (pointer: fine) {
  .spec-section .spec-block:hover {
    background: rgba(20, 18, 31, 0.4);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.7);
  }
}
/* ---------- Homepage services: same whole-section photo treatment as
   usluge.php's spec-section (.spec-bg-layer reused as-is), applied to
   #services/.card instead. ---------- */
#services {
  position: relative;
  overflow: hidden;
  /* Overlaps the CTA section after it (desktop only, see responsive
     section) the same way .spec-section pulls itself up on usluge.php.
     margin-bottom controls how much photo shows through into the CTA;
     padding-bottom (matching .spec-section's own) is the runway that
     absorbs the overlap without displacing the card row. */
  padding-bottom: 450px;
  margin-bottom: -340px;
}
#services .container { position: relative; z-index: 1; }
#services .card {
  position: relative;
  background: rgba(20, 18, 31, 0.78);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}
@media (hover: hover) and (pointer: fine) {
  #services .card:hover {
    background: rgba(20, 18, 31, 0.4);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.7);
  }
}
/* Lighten + shadow the card text for readability over the photo. */
#services .card p { color: rgba(238, 236, 250, 0.94); text-shadow: 0 1px 8px rgba(0, 0, 0, 0.9); }
#services .card ul li { color: rgba(238, 236, 250, 0.82); text-shadow: 0 1px 8px rgba(0, 0, 0, 0.9); }
.spec-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 30px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 10px;
}
.spec-head h3 { font-size: 20px; }
.spec-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cool);
  background: var(--cool-soft);
  padding: 5px 10px;
  border-radius: var(--radius-s);
}
.spec-body { padding: 24px 30px; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 18px 30px; }
.spec-row dt {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 6px;
}
.spec-row dd { margin: 0; font-size: 14.5px; color: var(--text); }
/* Same contrast fix as #services .card above, scoped to usluge.php's photo section. */
.spec-section .spec-row dt { color: rgba(238, 236, 250, 0.85); text-shadow: 0 1px 8px rgba(0, 0, 0, 0.9); }
.spec-note { padding: 18px 30px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 14px; background: var(--surface-2); }
.spec-section .spec-note { color: rgba(238, 236, 250, 0.85); text-shadow: 0 1px 8px rgba(0, 0, 0, 0.9); background: rgba(20, 18, 31, 0.55); }
.category-intro { color: var(--text-muted); font-size: 14.5px; margin: -8px 0 20px; max-width: 60ch; }

/* ---------- Process / steps (real sequence -> numbered is justified) ---------- */
.steps { counter-reset: step; display: flex; flex-direction: column; }
.step {
  counter-increment: step;
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 24px;
  padding: 28px 0;
  border-top: 1px solid var(--border);
}
.step:last-child { border-bottom: 1px solid var(--border); }
.step::before {
  content: "0" counter(step);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  grid-column: 1;
  align-self: start;
  padding-top: 3px;
}
/* Pins h4/p to column 2 so grid auto-placement doesn't squeeze the
   paragraph into the narrow number column under ::before. */
.step h4 { grid-column: 2; font-size: 17px; margin-bottom: 6px; }
.step p { grid-column: 2; color: var(--text-muted); font-size: 14.5px; }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  padding: 56px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(420px circle at 90% 0%, var(--accent-soft), transparent 65%);
  pointer-events: none;
}
.cta-band h2 { font-size: 27px; margin-bottom: 8px; position: relative; }
.cta-band p { color: var(--text-muted); position: relative; }
.cta-band .btn { position: relative; }

/* index.php only (.cta-section--photo): same "see-through" trick as
   .page-head--photo — #services carries the overlap above. */
.cta-section--photo {
  position: relative;
  z-index: 1;
  background: rgba(20, 18, 31, 0.18);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}
/* Own darker tint + extra blur so the band reads as a distinct card
   sitting on the glass, matching #services .card / .spec-block. */
.cta-section--photo .cta-band {
  background: rgba(20, 18, 31, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-color: var(--border-strong);
}
/* Lighten + shadow, same contrast fix as elsewhere over a photo. */
.cta-section--photo .cta-band p { color: rgba(238, 236, 250, 0.85); text-shadow: 0 1px 8px rgba(0, 0, 0, 0.9); }

/* ---------- Reference / portfolio ---------- */
.ref-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  overflow: hidden;
}
.ref-visual {
  aspect-ratio: 16/9;
  background:
    radial-gradient(circle at 30% 20%, var(--accent-soft), transparent 55%),
    radial-gradient(circle at 75% 70%, var(--cool-soft), transparent 55%),
    var(--surface-2);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 0.06em;
  text-align: center;
  padding: 20px;
}
.ref-body { padding: 24px 26px; }
.ref-meta { display: flex; gap: 14px; font-family: var(--font-mono); font-size: 11.5px; color: var(--text-dim); margin-bottom: 12px; flex-wrap: wrap; }
.ref-meta span { padding: 3px 8px; border: 1px solid var(--border-strong); border-radius: var(--radius-s); }
.ref-body h3 { font-size: 18px; margin-bottom: 8px; }
.ref-body p { color: var(--text-muted); font-size: 14px; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 50px; }
.contact-info h3 { font-size: 15px; font-family: var(--font-mono); letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 14px; }
.contact-info .info-row { padding: 18px 0; border-top: 1px solid var(--border); }
.contact-info .info-row:last-child { border-bottom: 1px solid var(--border); }
.contact-info .info-row a, .contact-info .info-row p { font-size: 16px; }
.contact-info .info-label { font-family: var(--font-mono); font-size: 11px; color: var(--accent); text-transform: uppercase; letter-spacing: 0.06em; display: block; margin-bottom: 6px; }

.form-row { margin-bottom: 20px; }
.form-row label {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 8px;
}
.form-row input, .form-row select, .form-row textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-s);
  color: var(--text);
  padding: 13px 14px;
  transition: border-color 0.15s ease;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  border-color: var(--accent);
  outline: none;
}
.form-row input[type="date"] {
  color-scheme: dark;
}
.form-row input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
}
.form-row textarea { resize: vertical; min-height: 120px; }
.form-row.has-error input, .form-row.has-error select, .form-row.has-error textarea {
  border-color: #e08a80;
  box-shadow: 0 0 0 3px rgba(200, 90, 80, 0.15);
}
.form-row.has-error label { color: #e08a80; }
.field-error-msg { display: block; margin-top: 6px; font-size: 12px; color: #e08a80; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-note { font-size: 13px; color: var(--text-dim); margin-top: 10px; }
.form-status { margin-top: 18px; padding: 14px 16px; border-radius: var(--radius-s); font-size: 14px; display: none; }
.form-status.ok { display: block; background: rgba(97, 176, 110, 0.12); color: #7fd08d; border: 1px solid rgba(97, 176, 110, 0.3); }
.form-status.err { display: block; background: rgba(200, 90, 80, 0.12); color: #e08a80; border: 1px solid rgba(200, 90, 80, 0.3); }

/* ---------- Toast (form submit feedback) ----------
   Fixed to the viewport — the inline .form-status above can sit below
   the fold, so a successful submit (which also clears the form) could
   otherwise look like nothing happened. */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 200;
  max-width: min(92vw, 420px);
  padding: 14px 18px;
  border-radius: var(--radius-s);
  font-size: 14px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.7);
  opacity: 0;
  translate: -50% 16px;
  pointer-events: none;
  transition: opacity 0.3s ease, translate 0.3s ease;
}
.toast.is-visible { opacity: 1; translate: -50% 0; pointer-events: auto; }
.toast.ok { background: rgba(97, 176, 110, 0.16); color: #7fd08d; border-color: rgba(97, 176, 110, 0.35); }
.toast.err { background: rgba(200, 90, 80, 0.16); color: #e08a80; border-color: rgba(200, 90, 80, 0.35); }
@media (max-width: 700px) {
  .toast { left: 16px; right: 16px; bottom: 16px; max-width: none; translate: 0 16px; }
  .toast.is-visible { translate: 0 0; }
}

/* ---------- Footer ---------- */
footer {
  padding: 60px 0 32px;
  border-top: 1px solid var(--border);
}
.footer-top { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; margin-bottom: 40px; }
.footer-col h4 { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 16px; }
.footer-col a, .footer-col p { font-size: 14px; color: var(--text-muted); display: block; margin-bottom: 10px; }
.footer-col a:hover { color: var(--accent); }
/* Lines up under the brand name next to the logo mark, not the icon itself. */
.footer-col .footer-tagline {
  padding-left: 30px;
  color: var(--text);
  opacity: 0.8;
  font-size: 14px;
  line-height: 1.5;
}
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 24px; border-top: 1px solid var(--border);
  font-family: var(--font-mono); font-size: 11.5px; color: var(--text-dim);
  flex-wrap: wrap; gap: 10px;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  /* Cancels the desktop head/spec-section overlap — would otherwise
     push the Audio card into the header's own title text. */
  .spec-section { margin-top: 0; padding-top: 72px; margin-bottom: 0; padding-bottom: 72px; }
  /* Same cancellation for kontakt.php's header/contact-section overlap. */
  .contact-section { margin-top: 0; padding-top: 72px; }
  /* No CTA overlap wanted on mobile — back to plain, un-glassed defaults. */
  #services { margin-bottom: 0; padding-bottom: 72px; }
  .cta-section--photo {
    background: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .cta-section--photo .cta-band {
    background: var(--surface);
    border-color: var(--border);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  /* Without the desktop overlap, these headers' backdrop-filter has
     nothing real behind it to blur — give each a direct blurred copy
     of its own section's photo instead of a flat blurred box. */
  .page-head--photo::after {
    content: "";
    display: block;
    position: absolute;
    inset: -60px;
    z-index: -1;
    background-color: transparent;
    background-image: linear-gradient(180deg, rgba(10, 8, 24, 0.5), rgba(10, 8, 24, 0.72)), url('/images/Usluge-audio.jpg');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center 50%;
    filter: blur(18px);
    opacity: 0;
    animation: above-fold-in 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: 0.25s;
    pointer-events: none;
  }
  .page-head--contact::after {
    content: "";
    display: block;
    position: absolute;
    inset: -60px;
    z-index: -1;
    background-color: transparent;
    background-image: linear-gradient(180deg, rgba(10, 8, 24, 0.5), rgba(10, 8, 24, 0.72)), url('/images/Kontakt.jpg');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center 35%;
    filter: blur(18px);
    mask-image: none;
    -webkit-mask-image: none;
    opacity: 0;
    animation: above-fold-in 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: 0.5s;
    pointer-events: none;
  }
  .contact-section::before {
    opacity: 0;
    animation: contact-bg-in 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: 0.5s;
  }
  /* Kept in the layout (fixed dropdown) at all times, just faded/slid
     out of view — lets opening it transition instead of jumping. */
  .nav-links {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 24px 28px 32px;
    gap: 20px;
    opacity: 0;
    translate: 0 -12px;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.28s ease, translate 0.32s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s linear 0.28s;
  }
  .nav-right .btn { display: none; }
  .nav-toggle { display: block; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .form-grid-2 { grid-template-columns: 1fr; }
  section { padding: 72px 0; }
  .cta-band { padding: 36px 26px; }
  .step { grid-template-columns: 40px 1fr; }
  /* hero-specs wraps to two lines on mobile, and the address-bar
     chrome eats into "100vh" — anchor to the top and tighten the gap
     instead of vertically centering, so the bottom row stays clear. */
  .hero { align-items: flex-start; padding-top: 32px; }
  .hero-specs { gap: 22px 28px; }
  /* Narrower portrait crop loses the stage/crowd — shift the photo down. */
  .hero-bg { background-position: 80% 60%; }
  /* The full-section crossfade photo gets over-cropped on a tall
     mobile layout — swap it for a per-card photo instead, as a
     ::before *inside* each .spec-block (a sibling layer would sit
     behind the card's own glass fill and stay hidden). Feathered
     top/bottom via mask, fades in with the card's own scroll reveal. */
  .spec-bg-layer { display: none; }
  .spec-block::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, black 20%, black 80%, transparent 100%);
    mask-image: linear-gradient(180deg, transparent 0%, black 20%, black 80%, transparent 100%);
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
  }
  .spec-block.is-visible::before { opacity: 1; }
  .spec-block--audio::before {
    background-image: linear-gradient(180deg, rgba(10, 8, 24, 0.4), rgba(10, 8, 24, 0.65)), url('/images/Usluge-audio.jpg');
    /* "cover" can't leave a gap the way a fixed % can — push the
       position toward the bottom instead of relying on extra zoom. */
    background-size: cover;
    background-position: center 100%;
  }
  .spec-block--video::before {
    background-image: linear-gradient(180deg, rgba(10, 8, 24, 0.4), rgba(10, 8, 24, 0.65)), url('/images/Usluge-video.jpg');
    /* Same cover-has-no-slack issue, horizontal this time — extra
       zoom so the shift toward the sign actually moves something. */
    background-size: 150%;
    background-position: 60% center;
  }
  .spec-block--light::before { background-image: linear-gradient(180deg, rgba(10, 8, 24, 0.4), rgba(10, 8, 24, 0.65)), url('/images/Usluge-light.jpg'); }
  .spec-head, .spec-body { position: relative; z-index: 1; }
  /* Scroll-driven stand-in for the desktop hover spotlight (see
     initMobileCardFocus in main.js). Restates the full transition
     list rather than adding to it — a partial list here would win the
     cascade and silently drop translate, breaking the reveal. */
  .spec-block {
    transition:
      translate 0.6s cubic-bezier(0.16, 1, 0.3, 1),
      opacity 0.5s ease,
      filter 0.4s ease,
      scale 0.4s ease,
      background 0.35s ease,
      backdrop-filter 0.35s ease;
  }
  /* .is-visible required — without it this (higher specificity than
     [data-reveal] { opacity: 0 }) fires the instant ANY card enters
     the center band, yanking not-yet-revealed siblings early. */
  .spec-section .spotlight-group.is-active [data-spotlight-item].is-visible:not(.is-focused),
  #services .spotlight-group.is-active [data-spotlight-item].is-visible:not(.is-focused),
  .contact-grid .spotlight-group.is-active [data-spotlight-item].is-visible:not(.is-focused) {
    filter: blur(2.5px);
    opacity: 0.5;
    scale: 0.97;
  }
  /* Same restated-transition-list fix as .spec-block above, so the
     mobile spotlight dim/undim on contact panels transitions too. */
  .contact-info, .contact-form-wrap {
    transition:
      translate 0.6s cubic-bezier(0.16, 1, 0.3, 1),
      opacity 0.5s ease,
      filter 0.4s ease,
      scale 0.4s ease,
      background 0.35s ease,
      backdrop-filter 0.35s ease;
  }
  /* Homepage services — same per-card photo treatment as .spec-block above. */
  #services .card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, black 20%, black 80%, transparent 100%);
    mask-image: linear-gradient(180deg, transparent 0%, black 20%, black 80%, transparent 100%);
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
  }
  #services .card.is-visible::before { opacity: 1; }
  #services .card--audio::before {
    background-image: linear-gradient(180deg, rgba(10, 8, 24, 0.4), rgba(10, 8, 24, 0.65)), url('/images/Usluge-audio.jpg');
    background-size: cover;
    background-position: center 100%;
  }
  #services .card--video::before {
    background-image: linear-gradient(180deg, rgba(10, 8, 24, 0.4), rgba(10, 8, 24, 0.65)), url('/images/Usluge-video.jpg');
    background-size: 150%;
    background-position: 60% center;
  }
  #services .card--light::before { background-image: linear-gradient(180deg, rgba(10, 8, 24, 0.4), rgba(10, 8, 24, 0.65)), url('/images/Usluge-light.jpg'); }
  #services .card > * { position: relative; z-index: 1; }
  #services .card {
    transition:
      translate 0.6s cubic-bezier(0.16, 1, 0.3, 1),
      opacity 0.5s ease,
      filter 0.4s ease,
      scale 0.4s ease,
      background 0.35s ease,
      backdrop-filter 0.35s ease;
  }
}
/* svh (static), not dvh (dynamic) — dvh recalculates live as the
   address bar collapses/expands, visibly resizing the hero mid-scroll. */
@supports (height: 100svh) {
  @media (max-width: 700px) {
    .hero { min-height: calc(100svh - var(--nav-h)); }
  }
}

/* body.nav-open mobile menu */
body.nav-open .nav-links {
  opacity: 1;
  translate: 0 0;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.28s ease, translate 0.32s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s linear 0s;
}
/* No rule hiding .nav-right here — .nav-right .btn is already hidden
   above at this breakpoint, leaving only .lang-toggle, which should
   stay visible/usable while the menu is open. */
