/* =====================================================================
   Digital Factory – štýly
   Poradie vrstiev: tokens → base → layout → components → effects
   Na desktope sa rozloženie škáluje jednotkou --p = 1 px návrhu (1672 × 941).
   ===================================================================== */

@layer tokens, base, layout, components, effects, utilities;

/* ---------- písmo (Montserrat, OFL, podmnožina so slovenskými znakmi) ---------- */
@font-face {
  font-family: "Montserrat";
  src: url("../assets/fonts/montserrat-norm.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("../assets/fonts/montserrat-ital.woff2") format("woff2");
  font-weight: 800;
  font-style: italic;
  font-display: swap;
}
/* náhradné písmo s podobnými rozmermi – menší posun textu pri načítaní (CLS) */
@font-face {
  font-family: "Montserrat Fallback";
  src: local("Arial");
  size-adjust: 112%;
  ascent-override: 86%;
  descent-override: 22%;
  line-gap-override: 0%;
}

/* monospace (JetBrains Mono, OFL) – podmnožiny iba so znakmi, ktoré sa na stránke používajú.
   Pri zmene textu eyebrow alebo kódu treba podmnožinu pregenerovať (nastroje/README v CLAUDE.md). */
@font-face {
  font-family: "DF Mono";
  src: url("../assets/fonts/jbmono-eyebrow.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "DF Code";
  src: url("../assets/fonts/jbmono-code.woff2") format("woff2");
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}

@property --edge-a {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

/* =====================================================================
   TOKENS
   ===================================================================== */
@layer tokens {
  :root {
    --bg: #05060f;
    --bg-2: #090c1d;
    --ink: #f4f6ff;
    --ink-2: #dfe4f6;
    --mute: #9ea7cc;
    --line: rgba(150, 165, 255, .2);

    --cyan: #22d3ff;
    --blue: #3b7bff;
    --violet: #8b5cff;
    --purple: #a64dff;
    --magenta: #d84dff;

    --grad-word: linear-gradient(95deg, #18c6ff 0%, #2f86ff 26%, #6a5cff 50%, #a24dff 70%, #dc4dff 88%, #e85cff 100%);
    --grad-cta: linear-gradient(90deg, #20c6ff 0%, #4c7dff 42%, #9356ff 78%, #c94dff 100%);
    --grad-edge: linear-gradient(120deg, rgba(160, 90, 255, .95), rgba(70, 130, 255, .85) 55%, rgba(40, 200, 255, .9));
    --glass: rgba(10, 12, 34, .62);

    --font: "Montserrat", "Montserrat Fallback", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --mono: "DF Mono", ui-monospace, "Cascadia Code", "SF Mono", "JetBrains Mono", Menlo, Consolas, "Liberation Mono", monospace;

    --ease-out: cubic-bezier(.2, .75, .15, 1);
    --p: 1px;          /* mobil a tablet: bežné pixely */
    --gutter: 20px;
  }

  /* desktop: 1 px návrhu, obmedzené šírkou aj výškou okna */
  @media (min-width: 1000px) and (min-aspect-ratio: 13/10) {
    :root { --p: min(100vw / 1672, 100svh / 941); }
  }
}

/* =====================================================================
   BASE
   ===================================================================== */
@layer base {
  *, *::before, *::after { box-sizing: border-box; }
  [hidden] { display: none !important; }

  html {
    background: var(--bg);
    color: var(--ink);
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }
  @media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
  }

  body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
  }

  img, svg { display: block; max-width: 100%; }
  a { color: inherit; }
  button, input, textarea { font: inherit; color: inherit; }
  h1, h2, p, ul, figure, fieldset { margin: 0; }
  ul { padding: 0; list-style: none; }

  :focus-visible {
    outline: 2px solid #7fdcff;
    outline-offset: 3px;
    border-radius: 6px;
  }

  ::selection { background: rgba(140, 90, 255, .55); color: #fff; }
}

/* =====================================================================
   LAYOUT
   ===================================================================== */
@layer layout {

  /* ---------- hero (mobil / tablet: stĺpec) ---------- */
  .hero {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100svh;
    overflow: hidden;
    isolation: isolate;
    background:
      radial-gradient(120% 60% at 85% 0%, rgba(70, 60, 220, .22), transparent 60%),
      var(--bg);
  }

  .site-header {
    position: relative;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 22px var(--gutter) 0;
    padding-top: max(22px, env(safe-area-inset-top));
  }

  .hero-main {
    position: relative;
    z-index: 2;
    flex: 1;
    display: flex;
    flex-direction: column;
  }

  .hero-copy {
    position: relative;
    z-index: 3;
    padding: clamp(28px, 7svh, 64px) var(--gutter) 0;
  }

  /* scéna s obrázkom: na mobile pod textom, horný okraj sa stráca do pozadia */
  .hero-visual {
    --stage-w: 250;
    position: relative;
    z-index: 0;
    /* výška = 70 % výšky obrázka (úsek 22–92 %: rameno od horných kĺbov po kocku aj s odrazom) */
    height: clamp(300px, 98vw, 700px);
    margin-top: clamp(4px, 2vw, 14px);
    container-type: size;
    pointer-events: none;
  }
  .stage {
    --W: calc(var(--stage-w) * 1cqw);
    --H: calc(var(--W) * .562799);
    position: absolute;
    width: var(--W);
    height: var(--H);
    left: calc(50cqw - .47 * var(--W));
    top: calc(-.22 * var(--H));
    -webkit-mask-image: linear-gradient(to bottom, transparent 19%, #000 26%, #000 82%, transparent 93%);
    mask-image: linear-gradient(to bottom, transparent 19%, #000 26%, #000 82%, transparent 93%);
  }
  .stage-img, .stage picture { width: 100%; height: 100%; }
  .stage-img { object-fit: cover; }
  .stage-code { display: none; }

  .hero-shade { display: none; }

  .services {
    position: relative;
    z-index: 3;
    padding: 0 var(--gutter) 28px;
    margin-top: clamp(6px, 3vw, 16px);
  }


  @media (min-width: 600px) {
    :root { --gutter: 40px; }
    .hero-visual { --stage-w: 190; height: clamp(300px, 75vw, 640px); }
  }

  /* ---------- desktop: verná kompozícia podľa návrhu ---------- */
  @media (min-width: 1000px) and (min-aspect-ratio: 13/10) {
    .hero {
      height: 100svh;
      min-height: calc(560 * var(--p));
      /* neónové odlesky podlahy pod scénou */
      background: #05060f;
    }

    .site-header {
      gap: 0;
      /* o 9 px návrhu (~10 px pri 1920) nižšie, aby lišta nebola nalepená na horný okraj */
      padding: calc(27 * var(--p)) calc(44 * var(--p)) 0 calc(80 * var(--p));
      height: calc(69 * var(--p));
      align-items: flex-start;
    }

    .hero-main { justify-content: space-between; position: static; }

    .hero-copy {
      padding: calc(45 * var(--p)) 0 0 calc(80 * var(--p));
      /* celý ľavý blok nižšie o 43,6 px návrhu (= 50 px pri 1920 × 1080) – väčší odstup od navigácie.
         translate nemení tok stránky, takže panel služieb ani spodná lišta sa nepohnú. */
      translate: 0 var(--copy-shift, calc(43.6 * var(--p)));
    }

    .hero-visual {
      position: absolute;
      inset: 0;
      height: auto;
      margin: 0;
    }
    .stage {
      /* scéna je 97 % „cover“ šírky, zarovnaná vpravo: oproti návrhu (92 %) je rameno
         ~60 px (pri 1920) bližšie k textu a vpravo nevznikne medzera. Posun nahor (4,4 % výšky)
         drží linku a panel služieb v rovnakej výške. Ľavý a spodný okraj sa strácajú do tmy. */
      --W: calc(max(100cqw, 177.6834cqh) * .97);
      left: calc(100cqw - var(--W));
      top: calc(min(0px, calc((100cqh - var(--H)) * .45)) - .044 * var(--H));
      -webkit-mask-image: linear-gradient(to right, transparent 0, #000 9%), linear-gradient(to bottom, #000 82%, transparent 100%);
      -webkit-mask-composite: source-in;
      mask-image: linear-gradient(to right, transparent 0, #000 9%), linear-gradient(to bottom, #000 82%, transparent 100%);
      mask-composite: intersect;
    }
    .stage-code { display: block; }
    @media (max-aspect-ratio: 3/2) {
      .stage { left: calc((100cqw - var(--W)) * .4); }
      .stage-code { display: none; }
      .hero > .hero-shade {
        background:
          linear-gradient(0deg, #05060f 0%, rgba(5, 6, 15, 0) 6%),
          linear-gradient(90deg, rgba(4, 5, 14, .8) 0%, rgba(4, 5, 14, .6) 30%, rgba(4, 5, 14, 0) 52%),
          linear-gradient(0deg, rgba(4, 5, 14, .94) 0%, rgba(4, 5, 14, .8) 12%, rgba(4, 5, 14, .45) 21%, rgba(4, 5, 14, 0) 33%),
          linear-gradient(180deg, rgba(4, 5, 14, .5) 0%, rgba(4, 5, 14, 0) 14%);
      }
    }

    /* stmavenie len tam, kde pomáha čitateľnosti: ľavý text, hlavička, spodný panel */
    .hero-shade {
      display: block;
      position: absolute;
      inset: 0;
      z-index: 1;
      pointer-events: none;
      background:
        linear-gradient(0deg, #05060f 0%, rgba(5, 6, 15, 0) 6%),
        radial-gradient(30% 7% at 6% 89%, rgba(150, 60, 255, .34), transparent 75%),
        radial-gradient(30% 7% at 94% 89%, rgba(150, 60, 255, .3), transparent 75%),
        radial-gradient(12% 4% at 38% 88%, rgba(40, 150, 255, .32), transparent 72%),
        radial-gradient(12% 4% at 62% 88%, rgba(40, 150, 255, .32), transparent 72%),
        linear-gradient(90deg, rgba(4, 5, 14, .62) 0%, rgba(4, 5, 14, .38) 26%, rgba(4, 5, 14, 0) 46%),
        linear-gradient(0deg, rgba(4, 5, 14, .94) 0%, rgba(4, 5, 14, .8) 12%, rgba(4, 5, 14, .45) 21%, rgba(4, 5, 14, 0) 33%),
        linear-gradient(180deg, rgba(4, 5, 14, .45) 0%, rgba(4, 5, 14, 0) 12%);
    }

    .services {
      margin: 0 0 calc(-3 * var(--p));
      padding: 0;
      display: flex;
      justify-content: center;
    }

  }

  /* ---------- spodná lišta hera (kontakty | znak DF | právne odkazy) ---------- */
  .hero-bar {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 4px var(--gutter) 30px;
    font-size: 14.5px;
  }
  .hero-bar-contacts, .hero-bar-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px 24px;
  }
  .hero-bar-mark { width: 26px; height: 26px; opacity: .8; filter: drop-shadow(0 0 8px rgba(90, 150, 255, .5)); }
  .hero-bar-copy { margin: 0; font-size: .86em; color: rgba(158, 167, 204, .6); }
  /* mobil/tablet: lišta hera sa zdvihne nad cookies kartu. Na desktope sa to NErobí – cookies karta je fixná
     a rozloženie hera (text, panel, lišta) je pred voľbou cookies aj po nej rovnaké. */
  @media not all and (min-width: 1000px) and (min-aspect-ratio: 13/10) {
    html.consent-open .hero-bar { padding-bottom: calc(30px + var(--bar-h, 0px)); }
  }

  @media (min-width: 1000px) and (min-aspect-ratio: 13/10) {
    .hero-bar {
      display: grid;
      grid-template-columns: 1fr auto 1fr;
      align-items: center;
      gap: calc(24 * var(--p));
      margin-top: calc(20 * var(--p));
      padding: 0 calc(80 * var(--p)) calc(21 * var(--p));
      font-size: max(13px, calc(15 * var(--p)));
    }
    .hero-bar-contacts { justify-self: end; flex-wrap: nowrap; gap: calc(34 * var(--p)); margin-right: calc(34 * var(--p)); }
    .hero-bar-links { justify-self: start; flex-wrap: nowrap; gap: 0; margin-left: calc(34 * var(--p)); }
    .hero-bar-mark { width: max(24px, calc(34 * var(--p))); height: max(24px, calc(34 * var(--p))); align-self: center; }
    .hero-bar-copy { position: absolute; right: calc(44 * var(--p)); bottom: calc(21 * var(--p)); }
  }
  @media (min-width: 1000px) and (max-width: 1499px) and (min-aspect-ratio: 13/10) {
    .hero-bar-copy { right: calc(44 * var(--p)); bottom: 4px; font-size: 11px; }
  }
}

/* =====================================================================
   COMPONENTS
   ===================================================================== */
@layer components {

  /* ---------- hlavička ---------- */
  .brand { display: block; flex: none; border-radius: 8px; }
  .brand img {
    height: 30px;
    width: auto;
    filter: drop-shadow(0 0 10px rgba(50, 150, 255, .28));
  }

  .nav { display: none; }
  .nav ul { display: flex; align-items: center; gap: 6px; }
  .nav-link {
    display: inline-flex;
    align-items: center;
    height: 40px;
    padding: 0 18px;
    border-radius: 999px;
    border: 1.5px solid transparent;
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    color: var(--ink);
    transition: border-color .3s, background-color .3s, box-shadow .3s, color .3s;
  }
  .nav-link:hover { border-color: rgba(110, 170, 255, .45); background: rgba(40, 80, 200, .14); }
  .nav-link.is-active {
    border-color: rgba(70, 175, 255, .95);
    background: rgba(20, 50, 140, .28);
    box-shadow: 0 0 14px rgba(40, 150, 255, .45), inset 0 0 12px rgba(40, 150, 255, .22);
  }

  .header-cta { margin-left: auto; }

  @media (min-width: 720px) {
    .nav { display: flex; align-items: center; margin-left: 12px; padding-left: 20px; border-left: 1px solid rgba(255, 255, 255, .22); height: 36px; }
  }
  @media (max-width: 399px) {
    .brand img { height: 26px; }
    .header-cta .ico-arrow { display: none; }
  }

  @media (min-width: 1000px) and (min-aspect-ratio: 13/10) {
    .brand img { height: calc(41 * var(--p)); }
    .nav {
      margin: calc(-1 * var(--p)) 0 0 calc(46 * var(--p));
      padding-left: calc(48 * var(--p));
      height: calc(42 * var(--p));
      border-left-width: max(1px, calc(1.2 * var(--p)));
    }
    .nav ul { gap: calc(22 * var(--p)); }
    .nav-link {
      height: calc(40 * var(--p));
      padding: 0 calc(21 * var(--p));
      font-size: max(14px, calc(17.5 * var(--p)));
      border-width: max(1.5px, calc(1.6 * var(--p)));
    }
  }

  /* ---------- tlačidlá ---------- */
  .btn {
    --btn-h: 52px;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .55em;
    height: var(--btn-h);
    padding: 0 1.35em;
    border: 0;
    border-radius: 999px;
    font-weight: 600;
    font-size: 17px;
    line-height: 1;
    letter-spacing: .005em;
    text-decoration: none;
    white-space: nowrap;
    color: #fff;
    cursor: pointer;
    isolation: isolate;
    transition: transform .35s var(--ease-out), box-shadow .35s, filter .35s, background-color .35s;
    -webkit-tap-highlight-color: transparent;
  }
  .btn .ico { width: 1.15em; height: 1.15em; flex: none; }
  .btn .ico-arrow { width: 1em; height: 1em; transition: transform .35s var(--ease-out); }
  .btn:hover .ico-arrow { transform: translateX(3px); }
  .btn:active { transform: translateY(1px) scale(.99); }

  .btn-primary {
    background: var(--grad-cta);
    box-shadow:
      0 0 18px rgba(60, 140, 255, .45),
      0 0 36px rgba(170, 80, 255, .28),
      inset 0 1px 0 rgba(255, 255, 255, .28);
    text-shadow: 0 1px 6px rgba(20, 0, 60, .35);
  }
  .btn-primary:hover {
    transform: translateY(-2px);
    filter: brightness(1.08) saturate(1.08);
    box-shadow:
      0 0 24px rgba(60, 160, 255, .65),
      0 0 52px rgba(180, 80, 255, .42),
      inset 0 1px 0 rgba(255, 255, 255, .35);
  }

  /* obrys s gradientom (padding-box / border-box) */
  .btn-outline, .btn-glass {
    border: 1.5px solid transparent;
    background:
      linear-gradient(rgba(10, 10, 30, .62), rgba(10, 10, 30, .62)) padding-box,
      var(--grad-edge) border-box;
    box-shadow: 0 0 16px rgba(150, 80, 255, .25), inset 0 0 14px rgba(120, 80, 255, .12);
  }
  .btn-outline {
    padding: 0 1.1em;
    gap: .5em;
    background:
      linear-gradient(rgba(8, 8, 22, .7), rgba(8, 8, 22, .7)) padding-box,
      linear-gradient(110deg, rgba(235, 215, 255, .95), rgba(175, 115, 255, .9) 50%, rgba(140, 120, 255, .85)) border-box;
    box-shadow: 0 0 16px rgba(170, 90, 255, .3), inset 0 0 14px rgba(150, 90, 255, .12);
  }
  .btn-outline .ico { width: 1.25em; height: 1.25em; }
  .btn-outline:hover, .btn-glass:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 22px rgba(150, 80, 255, .45), 0 0 40px rgba(60, 140, 255, .2), inset 0 0 18px rgba(120, 80, 255, .2);
  }

  .header-cta { --btn-h: 40px; font-size: 14px; font-weight: 500; padding: 0 14px; gap: .5em; }

  @media (min-width: 1000px) and (min-aspect-ratio: 13/10) {
    .btn { --btn-h: max(46px, calc(57 * var(--p))); font-size: max(15px, calc(20 * var(--p))); }
    .btn-outline, .btn-glass { border-width: max(1.5px, calc(1.8 * var(--p))); }
    .header-cta {
      --btn-h: max(38px, calc(42 * var(--p)));
      font-size: max(14px, calc(16.5 * var(--p)));
      padding: 0 calc(17 * var(--p));
    }
  }

  /* ---------- hero text ---------- */
  .eyebrow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .2em 0;
    font-family: var(--mono);
    font-size: clamp(10.5px, 2.9vw, 14px);
    letter-spacing: .07em;
    text-transform: uppercase;
    color: #e5e9ff;
  }
  .eyebrow::before {
    content: "";
    width: 32px;
    height: 2px;
    margin-right: 14px;
    border-radius: 2px;
    background: linear-gradient(90deg, #a64dff, #3b7bff);
    box-shadow: 0 0 10px rgba(130, 90, 255, .8);
  }
  .eyebrow .sep { margin: 0 .85em; color: #b9c0e6; }
  @media (max-width: 479px) {
    .eyebrow { letter-spacing: .04em; font-size: clamp(9.8px, 2.75vw, 12px); }
    .eyebrow::before { display: none; }
    .eyebrow .sep { margin: 0 .55em; }
  }

  .hero-title {
    margin-top: 18px;
    font-weight: 720;
    font-size: clamp(2.8rem, 13.4vw, 6rem);
    line-height: 1.02;
    letter-spacing: -.012em;
    color: #fff;
    text-wrap: balance;
    text-shadow: 0 0 .35em rgba(200, 215, 255, .18);
  }
  .hero-title > span { display: block; }
  .hero-title .t2 {
    font-style: italic;
    font-weight: 800;
    letter-spacing: -.01em;
    /* gradient (background-clip: text) sa kreslí iba v boxe prvku; pri nízkom line-height
       by horná časť „f“, „b“, „k“ a bodka nad „i“ ostali priehľadné. Padding zväčší plochu
       gradientu, záporný margin zachová rozloženie. */
    padding: .24em .14em .16em .06em;
    margin: -.24em -.14em -.16em -.06em;
    width: fit-content;
    background: var(--grad-word);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    text-shadow: none;
    filter: drop-shadow(0 0 .16em rgba(110, 100, 255, .5)) drop-shadow(0 0 .03em rgba(170, 120, 255, .45));
  }
  .hero-title .t2 { font-size: 1.34em; line-height: .8; }
  .hero-title .t3 { position: relative; }
  .hero-title .t3 { font-size: .845em; margin-top: .02em; letter-spacing: -.016em; }

  .hero-lead {
    margin-top: 18px;
    max-width: 30em;
    font-size: 16px;
    line-height: 1.5;
    font-weight: 450;
    color: #eceffa;
  }

  .hero-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 26px;
    max-width: 420px;
  }

  @media (min-width: 560px) {
    .hero-actions { flex-direction: row; max-width: none; }
  }
  @media (min-width: 600px) {
    .hero-lead { font-size: 18px; }
  }

  @media (min-width: 1000px) and (min-aspect-ratio: 13/10) {
    .eyebrow { font-size: max(11px, calc(16 * var(--p))); letter-spacing: .06em; }
    .eyebrow::before { width: calc(57 * var(--p)); height: max(2px, calc(3 * var(--p))); margin-right: calc(20 * var(--p)); }
    .eyebrow .sep { margin: 0 calc(15 * var(--p)); }

    .hero-title {
      margin-top: calc(22 * var(--p));
      font-size: calc(88 * var(--p));
      line-height: 1;
      text-wrap: nowrap;
    }
    .hero-title .t2 { font-size: 1.34em; line-height: .74; margin-top: calc(.02em - .24em); }
    .hero-title .t3 { font-size: .845em; line-height: 1.02; margin-top: .01em; letter-spacing: -.016em; }

    .hero-lead {
      margin-top: calc(24 * var(--p));
      max-width: 28.4em;
      font-size: max(15px, calc(18.5 * var(--p)));
      line-height: 1.4;
      padding-left: calc(8 * var(--p));
    }
    /* decentné stmavenie pod podnadpisom (statický gradient, bez blur) – neónové svetlá neprebíjajú text */
    .hero-lead { position: relative; }
    .hero-lead::before {
      content: "";
      position: absolute;
      z-index: -1;
      inset: -34% -9% -40% -6%;
      background: radial-gradient(closest-side, rgba(3, 4, 14, .46) 0%, rgba(3, 4, 14, .34) 55%, rgba(3, 4, 14, 0) 100%);
      pointer-events: none;
    }

    .hero-actions {
      margin-top: calc(34 * var(--p));
      gap: calc(30 * var(--p));
      padding-left: calc(2 * var(--p));
    }
  }

  /* ---------- kód v scéne (živý text) ----------
     Súradnice a perspektíva sú v jednotkách scény (var(--W)), takže kód drží
     na rovnakom mieste obrázka pri každom rozlíšení. */
  .stage-code {
    position: absolute;
    left: var(--code-x, 70.4%);
    top: var(--code-y, 19.8%);
    transform: translate(calc(var(--mx, 0) * -10px), calc(var(--my, 0) * -7px));
    transition: transform .6s var(--ease-out);
  }
  .code {
    position: relative;
    margin: 0;
    font-family: "DF Code", ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
    font-style: italic;
    font-weight: 500;
    font-size: calc(var(--W) * var(--code-fs, .0118));
    line-height: 1.46;
    color: #eef1ff;
    white-space: pre;
    transform-origin: 0 0;
    transform: var(--code-tf, perspective(var(--W)) rotateY(-24deg) rotateX(10deg) rotate(-9deg) skewX(-6deg));
    text-shadow: 0 0 calc(var(--W) * .003) rgba(170, 140, 255, .5);
  }
  /* tmavý podklad (rozostrený obdĺžnik) – oddelí kód od kódu v obrázku */
  .code::before {
    content: "";
    position: absolute;
    inset: -16% -8% -14% -16%;
    z-index: -1;
    border-radius: 22%;
    background: rgba(3, 4, 14, .9);
    filter: blur(calc(var(--W) * .012));
    pointer-events: none;
  }
  .code .ln { display: inline-block; width: 3ch; margin-right: 1.5ch; text-align: right; color: #4cc3ff; text-shadow: 0 0 calc(var(--W) * .005) rgba(40, 170, 255, .8); }
  .code .kw, .code .id { color: #4fdcff; text-shadow: 0 0 calc(var(--W) * .006) rgba(40, 200, 255, .65); }
  .code .key, .code .p { color: #ffffff; }
  .code .str { color: #f07aff; text-shadow: 0 0 calc(var(--W) * .006) rgba(225, 90, 255, .75); }

  /* ---------- panel služieb ---------- */
  .services-list {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-radius: 18px;
    border: 1px solid transparent;
    background:
      linear-gradient(180deg, rgba(10, 12, 32, .86), rgba(5, 6, 18, .92)) padding-box,
      linear-gradient(100deg, rgba(60, 150, 255, .45), rgba(120, 110, 255, .18) 35%, rgba(120, 110, 255, .18) 65%, rgba(190, 80, 255, .45)) border-box;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .06);
  }
  .services-list::before {
    content: "";
    position: absolute;
    left: 12%;
    right: 12%;
    top: -1px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(60, 190, 255, .9), rgba(170, 100, 255, .9), transparent);
    filter: drop-shadow(0 0 5px rgba(90, 160, 255, .8));
    pointer-events: none;
  }
  .svc {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 14px;
    min-width: 0;
  }
  .svc:nth-child(odd) { border-right: 1px solid var(--line); }
  .svc:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .svc-ico {
    flex: none;
    width: 34px;
    height: 34px;
    overflow: visible;
    filter: drop-shadow(0 0 6px rgba(60, 160, 255, .55));
    transition: filter .4s, transform .4s var(--ease-out);
  }
  .svc p { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
  .svc strong { font-weight: 700; font-size: 15px; color: #fff; }
  .svc span { font-size: 13.5px; color: var(--ink-2); }
  .svc:hover .svc-ico { transform: translateY(-2px); filter: drop-shadow(0 0 10px rgba(80, 170, 255, .9)) drop-shadow(0 0 18px rgba(170, 90, 255, .5)); }

  @media (max-width: 459px) {
    .svc { flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px 14px 16px; }
    .svc-ico { width: 30px; height: 30px; }
  }
  @media (max-width: 299px) {
    .services-list { grid-template-columns: 1fr; }
    .svc:nth-child(odd) { border-right: 0; }
    .svc:not(:last-child) { border-bottom: 1px solid var(--line); }
  }
  @media (min-width: 600px) {
    .svc { padding: 20px 22px; gap: 16px; }
    .svc-ico { width: 42px; height: 42px; }
    .svc strong { font-size: 17px; }
    .svc span { font-size: 15px; }
  }

  /* desktop: samostatný sklenený panel – rozloženie ako v návrhu (ikona + dva riadky,
     oddeľovače), tmavá výplň oddelí text od linky a kociek v pozadí */
  @media (min-width: 1000px) and (min-aspect-ratio: 13/10) {
    .services-list {
      position: relative;
      display: grid;
      grid-template-columns: repeat(4, auto);
      align-items: center;
      padding: calc(17 * var(--p)) calc(12 * var(--p));
      border: max(1px, calc(1.1 * var(--p))) solid transparent;
      border-radius: calc(22 * var(--p));
      background:
        linear-gradient(180deg, rgba(10, 12, 32, .84), rgba(5, 6, 18, .9)) padding-box,
        linear-gradient(100deg, rgba(60, 150, 255, .45), rgba(120, 110, 255, .18) 30%, rgba(120, 110, 255, .18) 70%, rgba(190, 80, 255, .45)) border-box;
      -webkit-backdrop-filter: blur(calc(14 * var(--p))) saturate(1.15);
      backdrop-filter: blur(calc(14 * var(--p))) saturate(1.15);
      box-shadow:
        0 calc(24 * var(--p)) calc(60 * var(--p)) rgba(0, 0, 0, .6),
        0 0 calc(40 * var(--p)) rgba(90, 80, 255, .14),
        inset 0 1px 0 rgba(255, 255, 255, .07);
      overflow: visible;
    }
    /* jemná svetelná linka na hornej hrane */
    .services-list::before {
      content: "";
      position: absolute;
      left: 12%;
      right: 12%;
      top: -1px;
      height: max(1px, calc(1.5 * var(--p)));
      background: linear-gradient(90deg, transparent, rgba(60, 190, 255, .9), rgba(170, 100, 255, .9), transparent);
      filter: drop-shadow(0 0 calc(6 * var(--p)) rgba(90, 160, 255, .8));
      pointer-events: none;
    }
    .svc {
      position: relative;
      gap: calc(24 * var(--p));
      padding: calc(4 * var(--p)) calc(40 * var(--p));
      border: 0 !important;
    }
    .svc + .svc::before {
      content: "";
      position: absolute;
      left: 0;
      top: 50%;
      width: max(1px, calc(1.2 * var(--p)));
      height: calc(50 * var(--p));
      transform: translateY(-50%);
      background: linear-gradient(180deg, transparent, rgba(190, 200, 255, .42), transparent);
    }
    .svc-ico { width: calc(50 * var(--p)); height: calc(50 * var(--p)); }
    .svc p { gap: calc(2 * var(--p)); }
    .svc strong { font-size: max(15px, calc(21 * var(--p))); line-height: 1.15; letter-spacing: -.005em; }
    .svc span { font-size: max(13px, calc(18.5 * var(--p))); line-height: 1.2; color: #e2e6f8; }
  }

  /* ---------- spodná lišta: odkazy ---------- */
  .hero-bar li a, .link-btn {
    display: inline-flex;
    align-items: center;
    gap: .6em;
    color: #e6e9f8;
    text-decoration: none;
    border-radius: 6px;
    transition: color .25s, text-shadow .25s;
  }
  .hero-bar li a .ico {
    width: 1.2em;
    height: 1.2em;
    flex: none;
    color: #62c4ff;
    filter: drop-shadow(0 0 5px rgba(60, 170, 255, .6));
  }
  .hero-bar li a:hover, .link-btn:hover { color: #a8e0ff; text-shadow: 0 0 12px rgba(80, 180, 255, .6); }
  .link-btn { padding: 0; border: 0; background: none; cursor: pointer; font: inherit; }
  .hero-bar-links li:has(> [hidden]) { display: none; }
  @media (min-width: 1000px) and (min-aspect-ratio: 13/10) {
    .hero-bar-links li + li {
      margin-left: calc(20 * var(--p));
      padding-left: calc(20 * var(--p));
      border-left: 1px solid rgba(200, 210, 255, .25);
    }
  }

  /* chýbajúce údaje – viditeľne označené, pred nasadením doplniť */
  .todo {
    display: inline-block;
    padding: .15em .5em;
    border: 1px dashed rgba(255, 196, 92, .75);
    border-radius: 6px;
    background: rgba(255, 180, 60, .08);
    color: #ffd27a;
    font-size: .9em;
  }

  /* ---------- modálny formulár ---------- */
  .modal {
    width: min(100% - 20px, 460px);
    max-width: none;
    max-height: none;
    margin: auto;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--ink);
    overflow: visible;
  }
  .modal::backdrop { background: rgba(3, 4, 12, .5); }
  html:not(.js) .modal:target {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 100;
    height: fit-content;
  }

  .modal-card {
    --fs: 15px;
    position: relative;
    max-height: calc(100dvh - 20px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 32px 28px 28px;
    border-radius: 22px;
    border: 1.5px solid transparent;
    background:
      linear-gradient(160deg, rgba(16, 18, 46, .9), rgba(9, 10, 28, .92)) padding-box,
      linear-gradient(150deg, rgba(110, 140, 255, .55), rgba(150, 90, 255, .35) 40%, rgba(200, 80, 255, .85)) border-box;
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    box-shadow:
      0 0 26px rgba(150, 70, 255, .45),
      0 0 70px rgba(80, 90, 255, .22),
      inset 0 0 24px rgba(120, 90, 255, .12);
    font-size: var(--fs);
    scrollbar-width: thin;
  }

  .modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #e8ebff;
    text-decoration: none;
    transition: background-color .25s, transform .3s var(--ease-out);
  }
  .modal-close .ico { width: 20px; height: 20px; }
  .modal-close:hover { background: rgba(255, 255, 255, .08); transform: rotate(90deg); }

  .modal-title { font-size: 1.45em; font-weight: 700; line-height: 1.2; padding-right: 40px; }
  .modal-desc { margin-top: .35em; color: var(--ink-2); font-size: .93em; }

  .form { margin-top: 1.25em; display: grid; gap: .9em; }

  .field { position: relative; }
  .field-ico {
    position: absolute;
    left: .95em;
    top: 1.38em;
    width: 1.15em;
    height: 1.15em;
    transform: translateY(-50%);
    color: #c9cff0;
    pointer-events: none;
  }
  .field input, .field textarea {
    width: 100%;
    min-height: 2.75em;
    padding: .65em .9em .65em 2.65em;
    border-radius: 12px;
    border: 1px solid rgba(160, 175, 255, .26);
    background: rgba(255, 255, 255, .035);
    font-size: 16px;
    line-height: 1.35;
    color: var(--ink);
    transition: border-color .25s, box-shadow .25s, background-color .25s;
  }
  .field textarea { resize: vertical; min-height: 5.6em; max-height: 14em; padding-top: .78em; }
  .field-area .field-ico { top: 1.4em; }
  .field input::placeholder, .field textarea::placeholder { color: #b6bddc; opacity: 1; }
  .field input:hover, .field textarea:hover { border-color: rgba(160, 175, 255, .42); }
  .field input:focus, .field textarea:focus {
    outline: none;
    border-color: rgba(110, 190, 255, .9);
    background: rgba(70, 110, 255, .07);
    box-shadow: 0 0 0 3px rgba(60, 140, 255, .22), 0 0 16px rgba(80, 140, 255, .3);
  }
  .field [aria-invalid="true"] { border-color: #ff6b9a; box-shadow: 0 0 0 3px rgba(255, 80, 140, .18); }
  .field-err { font-size: .82em; color: #ff9cbc; padding: .3em .3em 0; }
  .field-err:empty { display: none; }

  .chips { border: 0; padding: 0; margin: .4em 0 .3em; min-width: 0; }
  .chips legend { padding: 0; font-weight: 600; font-size: .98em; margin-bottom: .7em; }
  .chips-row { display: flex; flex-wrap: wrap; gap: .5em; }
  .chip { position: relative; cursor: pointer; }
  .chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
  .chip span {
    display: inline-flex;
    align-items: center;
    min-height: 2.35em;
    padding: 0 .85em;
    border-radius: 999px;
    border: 1px solid rgba(170, 180, 255, .3);
    background: rgba(255, 255, 255, .03);
    font-size: .84em;
    font-weight: 500;
    transition: border-color .25s, background-color .25s, box-shadow .25s, color .25s;
  }
  .chip:hover span { border-color: rgba(170, 180, 255, .55); }
  .chip input:checked + span {
    border-color: #a865ff;
    background: rgba(140, 80, 255, .22);
    box-shadow: 0 0 12px rgba(160, 80, 255, .55), inset 0 0 10px rgba(160, 90, 255, .25);
    color: #fff;
  }
  .chip input:focus-visible + span { outline: 2px solid #7fdcff; outline-offset: 2px; }

  .form-note { font-size: .78em; line-height: 1.5; color: var(--mute); margin: .4em 0 .5em; }
  .form-note a { color: #a9d8ff; }

  .btn-submit { width: 100%; margin-top: .35em; --btn-h: 50px; font-size: 16.5px; }
  .btn-submit[disabled] { cursor: progress; filter: saturate(.6) brightness(.85); transform: none; }
  .btn-submit[aria-busy="true"] .btn-label::after { content: "…"; }

  .form-status { font-size: .9em; line-height: 1.45; }
  .form-status:empty { display: none; }
  .form-status { padding: .75em .9em; border-radius: 12px; }
  .form-status.is-ok { background: rgba(60, 160, 255, .12); border: 1px solid rgba(80, 180, 255, .5); color: #cfeaff; }
  .form-status.is-err { background: rgba(255, 70, 130, .1); border: 1px solid rgba(255, 90, 150, .45); color: #ffd0de; }
  .form-status a { color: inherit; }

  .hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

  /* desktop: okno vpravo ako v návrhu, škálované s ostatnými prvkami */
  @media (min-width: 1000px) and (min-aspect-ratio: 13/10) {
    .modal {
      width: max(410px, calc(390 * var(--p)));
      margin: auto calc(48 * var(--p)) auto auto;
    }
    .modal-card {
      --fs: max(14px, calc(14.5 * var(--p)));
      max-height: calc(100svh - 24px);
      padding: calc(33 * var(--p)) calc(33 * var(--p)) calc(31 * var(--p));
      border-radius: calc(22 * var(--p));
      border-width: max(1.5px, calc(1.6 * var(--p)));
    }
    .modal-close { top: calc(14 * var(--p)); right: calc(14 * var(--p)); width: max(32px, calc(34 * var(--p))); height: max(32px, calc(34 * var(--p))); }
    .modal-close .ico { width: max(18px, calc(20 * var(--p))); height: max(18px, calc(20 * var(--p))); }
    .field input, .field textarea { font-size: var(--fs); border-radius: calc(11 * var(--p)); }
    .btn-submit { --btn-h: max(44px, calc(44 * var(--p))); font-size: max(15px, calc(16.5 * var(--p))); }
    /* štyri čipy v jednom riadku ako v návrhu */
    .chips-row { flex-wrap: nowrap; gap: .42em; }
    .chip span { font-size: .8em; padding: 0 .68em; white-space: nowrap; }
  }

  /* ---------- súhlas s cookies ---------- */
  .consent {
    position: fixed;
    z-index: 90;
    left: 10px;
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    max-height: calc(100dvh - 20px);
    overflow-y: auto;
    display: grid;
    gap: 12px;
    padding: 16px;
    border-radius: 16px;
    border: 1px solid rgba(150, 165, 255, .28);
    background: rgba(9, 10, 28, .94);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, .5), 0 0 24px rgba(110, 80, 255, .18);
    font-size: 14px;
    line-height: 1.5;
    color: var(--ink-2);
  }
  .consent[hidden] { display: none; }
  .consent-info { display: grid; gap: 8px; margin-top: 10px; font-size: 13px; color: var(--mute); }
  .consent-info code { font-size: .95em; color: #cfd6ff; }
  .consent-more {
    padding: 0;
    border: 0;
    background: none;
    color: #9fd6ff;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
    font-size: inherit;
  }
  .consent-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .consent-btn {
    min-height: 44px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid rgba(160, 175, 255, .45);
    background: rgba(255, 255, 255, .05);
    font-weight: 600;
    font-size: 14px;
    color: #fff;
    cursor: pointer;
    transition: background-color .25s, border-color .25s, box-shadow .25s;
  }
  .consent-btn:hover { background: rgba(100, 120, 255, .16); border-color: rgba(160, 175, 255, .8); box-shadow: 0 0 14px rgba(110, 120, 255, .35); }
  @media (min-width: 600px) {
    .consent { left: 20px; right: auto; bottom: 20px; width: 400px; }
  }
}

/* =====================================================================
   EFFECTS – základné jemné animácie. Ďalšie efekty pridávať sem
   (hooky: data-fx="…" v HTML, js/effects.js). Všetko rešpektuje
   prefers-reduced-motion.
   ===================================================================== */
@layer effects {
  @keyframes fx-rise {
    from { opacity: 0; transform: translate3d(0, 18px, 0); }
    to { opacity: 1; transform: none; }
  }
  @keyframes fx-fade { from { opacity: 0; } to { opacity: 1; } }
  @keyframes fx-glow-word {
    from { opacity: 0; transform: translate3d(0, 18px, 0); filter: drop-shadow(0 0 0 rgba(90, 110, 255, 0)) blur(6px); }
    to { opacity: 1; transform: none; }
  }
  @keyframes fx-pulse {
    0%, 100% { box-shadow: 0 0 18px rgba(60, 140, 255, .45), 0 0 36px rgba(170, 80, 255, .28), inset 0 1px 0 rgba(255, 255, 255, .28); }
    50% { box-shadow: 0 0 26px rgba(60, 160, 255, .7), 0 0 56px rgba(180, 80, 255, .45), inset 0 1px 0 rgba(255, 255, 255, .32); }
  }
  @keyframes fx-sheen { from { transform: translateX(-120%) skewX(-18deg); } to { transform: translateX(220%) skewX(-18deg); } }
  @keyframes fx-edge { to { --edge-a: 360deg; } }
  @keyframes fx-icon-breathe {
    0%, 100% { filter: drop-shadow(0 0 5px rgba(60, 160, 255, .45)); }
    50% { filter: drop-shadow(0 0 10px rgba(80, 170, 255, .8)) drop-shadow(0 0 16px rgba(160, 90, 255, .35)); }
  }
  @keyframes fx-drop { 0% { transform: translateY(-140%); opacity: 0; } 25% { opacity: 1; } 75% { opacity: 1; } 100% { transform: translateY(240%); opacity: 0; } }
  @keyframes fx-modal-in { from { opacity: 0; transform: translate3d(0, 16px, 0) scale(.97); } to { opacity: 1; transform: none; } }
  @keyframes fx-modal-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: translate3d(0, 10px, 0) scale(.98); } }

  @media (prefers-reduced-motion: no-preference) {
    /* nástup po načítaní */
    .site-header > * { animation: fx-fade .9s ease both; animation-delay: .1s; }
    .eyebrow { animation: fx-rise .9s var(--ease-out) both .15s; }
    .hero-title .t1 { animation: fx-rise 1s var(--ease-out) both .25s; }
    .hero-title .t2 { animation: fx-glow-word 1.1s var(--ease-out) both .4s; }
    .hero-title .t3 { animation: fx-rise 1s var(--ease-out) both .55s; }
    .hero-lead { animation: fx-rise 1s var(--ease-out) both .7s; }
    .hero-actions { animation: fx-rise 1s var(--ease-out) both .85s; }
    .services { animation: fx-rise 1s var(--ease-out) both 1s; }
    .hero-bar { animation: fx-fade 1.2s ease both 1.2s; }
    .stage-code { animation: fx-fade 1.6s ease both .6s; }

    /* jemný neónový pulz CTA */
    [data-fx~="pulse"].btn-primary { animation: fx-pulse 3.8s ease-in-out infinite 2s; }

    /* prechod svetla po tlačidle */
    .btn-primary::after {
      content: "";
      position: absolute;
      inset: 0;
      z-index: -1;
      border-radius: inherit;
      overflow: hidden;
      background: linear-gradient(100deg, transparent 0 40%, rgba(255, 255, 255, .38) 50%, transparent 60% 100%) no-repeat;
      background-size: 60% 100%;
      background-position: -80% 0;
      transition: background-position 0s;
      pointer-events: none;
    }
    .btn-primary:hover::after { background-position: 200% 0; transition: background-position .9s var(--ease-out); }

    /* rozsvietenie hrany (obiehajúce svetlo) */
    [data-fx~="edge-light"]::before {
      content: "";
      position: absolute;
      inset: -1.5px;
      border-radius: inherit;
      padding: 1.5px;
      background: conic-gradient(from var(--edge-a), transparent 0deg 230deg, rgba(90, 200, 255, .95) 290deg, #fff 315deg, rgba(200, 110, 255, .95) 335deg, transparent 360deg);
      -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
      -webkit-mask-composite: xor;
      mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
      opacity: 0;
      transition: opacity .4s;
      pointer-events: none;
    }
    [data-fx~="edge-light"]:hover::before,
    [data-fx~="edge-light"]:focus-visible::before { opacity: 1; animation: fx-edge 2.4s linear infinite; }

    /* glow ikon služieb */
    [data-fx~="glow"] .svc-ico { animation: fx-icon-breathe 5s ease-in-out infinite; }
    [data-fx~="glow"]:nth-child(2) .svc-ico { animation-delay: -1.25s; }
    [data-fx~="glow"]:nth-child(3) .svc-ico { animation-delay: -2.5s; }
    [data-fx~="glow"]:nth-child(4) .svc-ico { animation-delay: -3.75s; }
    [data-fx~="glow"]:hover .svc-ico { animation-play-state: paused; }


    /* modálne okno */
    .modal[open] .modal-card { animation: fx-modal-in .42s var(--ease-out) both; }
    .modal[open]::backdrop { animation: fx-fade .35s ease both; }
    .modal.is-closing .modal-card { animation: fx-modal-out .22s ease-in both; }
    .modal.is-closing::backdrop { animation: fx-fade .22s ease-in reverse both; }
  }

  /* =================================================================
     ETAPA 3 – animácie scény a mikroanimácie
     Vrstvy .fx-layer sú v súradniciach scény (.stage, % obrázka 1672 × 941),
     veľkosti cez var(--W) → sedia na rovnakom mieste obrázka pri každom rozlíšení.
     Zobrazia sa iba s triedou html.fx-on (JS, nie pri reduced-motion).
     Intenzita: --fx-k (0–1) na .stage, predvolene 1.
     ================================================================= */
  .fx-layer, .brand-sheen { display: none; }
  .fx-layer { position: absolute; pointer-events: none; opacity: var(--fx-k, 1); }
  .fx-layer span { position: absolute; display: block; pointer-events: none; }
  html.fx-paused .fx-layer, html.fx-paused .fx-layer *, html.fx-paused .brand-sheen::before { animation-play-state: paused !important; }

  @keyframes fx-weld-core {
    0%, 100% { opacity: .7; transform: translate(-50%, -50%) scale(.9); }
    13% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); }
    21% { opacity: .62; transform: translate(-50%, -50%) scale(.86); }
    46% { opacity: .95; transform: translate(-50%, -50%) scale(1.02); }
    58% { opacity: .74; transform: translate(-50%, -50%) scale(.92); }
    81% { opacity: 1; transform: translate(-50%, -50%) scale(1.12); }
  }
  @keyframes fx-weld-halo {
    0%, 100% { opacity: .38; }
    17% { opacity: .62; }
    33% { opacity: .42; }
    61% { opacity: .7; }
    74% { opacity: .46; }
  }
  @keyframes fx-breathe { 0%, 100% { opacity: 0; } 50% { opacity: 1; } }
  @keyframes fx-vortex-pulse {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(.06); }
    7% { opacity: 1; }
    42% { opacity: 0; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(1); }
  }
  @keyframes fx-cubes-sweep {
    0% { opacity: 0; transform: translateX(-130%); }
    4% { opacity: 1; }
    30% { opacity: 1; }
    34% { opacity: 0; transform: translateX(470%); }
    100% { opacity: 0; transform: translateX(470%); }
  }
  @keyframes fx-code-sweep {
    0% { opacity: 0; transform: translateX(-70%); }
    3% { opacity: 1; }
    15% { opacity: 1; }
    18% { opacity: 0; transform: translateX(400%); }
    100% { opacity: 0; transform: translateX(400%); }
  }
  @keyframes fx-caret { 0%, 45% { opacity: 1; } 55%, 100% { opacity: .08; } }
  @keyframes fx-logo-sheen {
    0% { transform: translateX(-130%); }
    11%, 100% { transform: translateX(330%); }
  }
  @keyframes fx-cta-edge {
    0% { opacity: 0; --edge-a: 0deg; }
    5% { opacity: 1; }
    24% { opacity: 1; }
    28% { opacity: 0; --edge-a: 360deg; }
    100% { opacity: 0; --edge-a: 360deg; }
  }

  @media (prefers-reduced-motion: no-preference) {
    html.fx-on .fx-layer, html.fx-on .brand-sheen { display: block; }

    /* ---------- 1. zváranie: bod dotyku nástroja s kockou (1045 × 511 px obrázka) ---------- */
    .fx-weld { left: 62.5%; top: 54.3%; width: 0; height: 0; }
    .fx-weld span { left: 0; top: 0; border-radius: 50%; transform: translate(-50%, -50%); mix-blend-mode: screen; }
    .weld-core {
      width: calc(var(--W) * .026); height: calc(var(--W) * .026);
      background: radial-gradient(circle, #fff 0, rgba(255, 240, 255, .95) 22%, rgba(230, 140, 255, .6) 48%, transparent 72%);
      animation: fx-weld-core 1.9s linear infinite;
    }
    .weld-halo {
      width: calc(var(--W) * .1); height: calc(var(--W) * .1);
      background: radial-gradient(circle, rgba(255, 230, 255, .8), rgba(215, 105, 255, .5) 26%, rgba(130, 90, 255, .16) 50%, transparent 70%);
      animation: fx-weld-halo 3.1s ease-in-out infinite;
    }
    .weld-ambient {
      width: calc(var(--W) * .3); height: calc(var(--W) * .3);
      background: radial-gradient(circle, rgba(205, 115, 255, .5), rgba(115, 105, 255, .2) 36%, transparent 68%);
      opacity: 0;
    }
    .weld-flash {
      width: calc(var(--W) * .09); height: calc(var(--W) * .09);
      background: radial-gradient(circle, #fff 0, rgba(255, 238, 255, .95) 16%, rgba(225, 125, 255, .5) 38%, transparent 70%);
      opacity: 0;
    }
    .fx-weld .weld-rays {
      width: calc(var(--W) * .12); height: calc(var(--W) * .12);
      border-radius: 0;
      background:
        linear-gradient(90deg, transparent, rgba(255, 225, 255, .95) 50%, transparent) center / 100% max(1px, calc(var(--W) * .0011)) no-repeat,
        linear-gradient(180deg, transparent, rgba(255, 225, 255, .8) 50%, transparent) center / max(1px, calc(var(--W) * .0011)) 70% no-repeat;
      opacity: 0;
    }
    .fx-weld .weld-spark {
      width: max(2px, calc(var(--W) * .0019)); height: max(2px, calc(var(--W) * .0019));
      background: radial-gradient(circle, #fff 0, #ffd0ff 45%, rgba(230, 130, 255, 0) 75%);
      opacity: 0;
      will-change: transform, opacity;
    }

    /* ---------- 2. kocky: energia po hranách (maska = svetelné hrany a ikony z obrázka) ---------- */
    .fx-cubes {
      left: 48.684%; top: 50.797%; width: 46.531%; height: 26.78%;   /* výrez 814,478 – 1592,730 */
      overflow: hidden;
      -webkit-mask: url(../assets/img/fx/cubes-mask.webp) 0 0 / 100% 100% no-repeat;
      mask: url(../assets/img/fx/cubes-mask.webp) 0 0 / 100% 100% no-repeat;
      mix-blend-mode: screen;
    }
    .fx-cube {
      background: rgba(120, 200, 255, .42);
      opacity: 0;
      animation: fx-breathe 7.2s ease-in-out infinite;
    }
    .fx-cube:nth-child(1) { left: .8%; top: 2.4%; width: 36%; height: 96%; animation-duration: 6.4s; }
    .fx-cube:nth-child(2) { left: 38.8%; top: 22.6%; width: 22.9%; height: 67%; animation-delay: -1.9s; background: rgba(140, 170, 255, .4); }
    .fx-cube:nth-child(3) { left: 62.7%; top: 31%; width: 18.4%; height: 54.8%; animation-delay: -3.7s; animation-duration: 7.9s; background: rgba(180, 140, 255, .42); }
    .fx-cube:nth-child(4) { left: 82.8%; top: 39.7%; width: 16.2%; height: 42%; animation-delay: -5.2s; }
    .fx-cubes-sweep {
      left: 0; top: 0; width: 22%; height: 100%;
      background: linear-gradient(100deg, transparent 15%, rgba(150, 225, 255, .55) 42%, #fff 50%, rgba(200, 150, 255, .6) 58%, transparent 85%);
      opacity: 0;
      animation: fx-cubes-sweep 10.5s cubic-bezier(.45, .05, .55, .95) infinite 3.2s;
    }

    /* ---------- 3. vír: impulz po prúdoch dát (maska = svetelné prúdy víru) ---------- */
    .fx-vortex {
      left: 35.885%; top: 0; width: 57.416%; height: 36.132%;        /* výrez 600,0 – 1560,340 */
      overflow: hidden;
      -webkit-mask: url(../assets/img/fx/vortex-mask.webp) 0 0 / 100% 100% no-repeat;
      mask: url(../assets/img/fx/vortex-mask.webp) 0 0 / 100% 100% no-repeat;
      mix-blend-mode: screen;
    }
    .fx-vortex-glow { inset: 0; opacity: 0; }
    .fx-vortex-glow.c { background: radial-gradient(55% 90% at 30% 66%, rgba(60, 200, 255, .38), transparent 75%); animation: fx-breathe 11s ease-in-out infinite; }
    .fx-vortex-glow.v { background: radial-gradient(70% 100% at 55% 40%, rgba(170, 90, 255, .34), transparent 75%); animation: fx-breathe 17s ease-in-out infinite -6s; }
    .fx-vortex-pulse {
      left: 28.3%; top: 67%;                                          /* stred víru 872 × 228 px */
      width: calc(var(--W) * 1.05); height: calc(var(--W) * 1.05);
      border-radius: 50%;
      background: radial-gradient(circle, transparent 52%, rgba(120, 215, 255, .5) 60%, rgba(220, 240, 255, .95) 64%, rgba(190, 130, 255, .55) 68%, transparent 74%);
      opacity: 0;
      animation: fx-vortex-pulse 8.5s cubic-bezier(.25, .6, .4, 1) infinite 2.6s;
      will-change: transform, opacity;
    }

    /* ---------- 4. perspektívny kód ---------- */
    .code .str, .code .kw, .code .id { transition: color .7s ease, text-shadow .7s ease; }
    .code .str.is-hot { color: #ffc6ff; text-shadow: 0 0 calc(var(--W) * .008) rgba(240, 120, 255, .95), 0 0 calc(var(--W) * .016) rgba(200, 90, 255, .45); }
    .code .kw.is-hot, .code .id.is-hot { color: #bff3ff; text-shadow: 0 0 calc(var(--W) * .008) rgba(60, 210, 255, .95), 0 0 calc(var(--W) * .016) rgba(60, 160, 255, .45); }
    .code > .p:last-child::after {
      content: "";
      display: inline-block;
      width: .52em; height: 1.02em;
      margin-left: .4em;
      vertical-align: -.16em;
      background: #4fdcff;
      box-shadow: 0 0 calc(var(--W) * .005) rgba(60, 200, 255, .9);
      animation: fx-caret 1.25s ease-in-out infinite;
    }
    .code::after {
      content: "";
      position: absolute;
      top: -4%; bottom: -4%; left: 0;
      width: 24%;
      background: linear-gradient(90deg, transparent, rgba(150, 225, 255, .16) 45%, rgba(210, 150, 255, .13) 60%, transparent);
      mix-blend-mode: screen;
      pointer-events: none;
      opacity: 0;
      animation: fx-code-sweep 12s ease-in-out infinite 5s;
    }

    /* ---------- 5. logo, CTA, fokus ---------- */
    .brand { position: relative; }
    .brand-sheen {
      position: absolute;
      inset: 0;
      overflow: hidden;
      pointer-events: none;
      -webkit-mask: url(../assets/img/logo-df.svg) 0 0 / 100% 100% no-repeat;
      mask: url(../assets/img/logo-df.svg) 0 0 / 100% 100% no-repeat;
    }
    .brand-sheen::before {
      content: "";
      position: absolute;
      top: 0; bottom: 0; left: 0;
      width: 30%;
      background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .7) 50%, transparent);
      transform: translateX(-130%);
      animation: fx-logo-sheen 13s ease-in-out infinite 3.8s;
    }
    /* svetlo občas obehne okraj hlavného CTA (bez zmeny rozmerov) */
    [data-fx~="pulse"].btn-primary::before {
      content: "";
      position: absolute;
      inset: -1.5px;
      border-radius: inherit;
      padding: 1.5px;
      background: conic-gradient(from var(--edge-a), transparent 0deg 250deg, rgba(150, 230, 255, .9) 300deg, #fff 320deg, rgba(220, 150, 255, .9) 338deg, transparent 360deg);
      -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
      -webkit-mask-composite: xor;
      mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
      opacity: 0;
      pointer-events: none;
      animation: fx-cta-edge 9.5s linear infinite 4.5s;
    }
    .nav-link, .hero-bar li a, .link-btn { transition: color .25s, text-shadow .25s, border-color .3s, background-color .3s, box-shadow .3s; }
    .nav-link:focus-visible, .hero-bar li a:focus-visible, .link-btn:focus-visible { box-shadow: 0 0 0 4px rgba(127, 220, 255, .14), 0 0 18px rgba(80, 180, 255, .45); }
    .btn-primary:focus-visible {
      filter: brightness(1.08);
      box-shadow: 0 0 24px rgba(60, 160, 255, .65), 0 0 52px rgba(180, 80, 255, .42), inset 0 1px 0 rgba(255, 255, 255, .35);
    }

    /* ---------- 6. panel služieb: zvýraznenie položky pri hoveri ---------- */
    .svc { position: relative; }
    .svc::after {
      content: "";
      position: absolute;
      inset: 0;
      border-radius: 14px;
      background: radial-gradient(60% 110% at 25% 50%, rgba(70, 150, 255, .16), rgba(150, 90, 255, .06) 55%, transparent 80%);
      opacity: 0;
      transition: opacity .5s ease;
      pointer-events: none;
    }
    .svc:hover::after { opacity: 1; }

    /* mobil a tablet: iba zváranie (+ jemný pulz), bez víru, kociek a lúčov */
    @media (max-width: 999px), (max-aspect-ratio: 13/10) {
      html.fx-on .fx-layer.fx-vortex, html.fx-on .fx-layer.fx-cubes, .fx-weld .weld-rays { display: none; }
      /* úspora výkonu: nepretržité paint animácie (filter, box-shadow) na mobile vypnuté, pokojový stav je rovnaký */
      [data-fx~="glow"] .svc-ico, [data-fx~="pulse"].btn-primary, [data-fx~="pulse"].btn-primary::before { animation: none; }
    }
  }
}

/* =====================================================================
   UTILITIES
   ===================================================================== */
@layer utilities {
  .sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
  .sr-only {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
  }
  .skip-link {
    position: absolute;
    left: 12px;
    top: -60px;
    z-index: 200;
    padding: 10px 16px;
    border-radius: 10px;
    background: #fff;
    color: #05060f;
    font-weight: 600;
    text-decoration: none;
    transition: top .2s;
  }
  .skip-link:focus { top: 12px; }
}
