/* ============================================================
   MATESS.SK – Brainit.es štýl
   Čierny immersive web, fullscreen particle slider,
   glass UI, konštelácia služieb, card-stream sekcie.
   ============================================================ */

:root {
  --bg: #000;
  --text: #fff;
  --muted: #9aa0ae;
  --glass: rgba(25, 30, 50, 0.35);
  --glass-card: rgba(15, 23, 42, 0.75);
  --line: rgba(255, 255, 255, 0.12);
  --accent: #3b82f6;
  --accent-2: #06b6d4;
  --accent-primary: #6366f1;
  --accent-secondary: #ec4899;
  --accent-final: #fbbf24;
  --container: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: Arial, "Helvetica Neue", Helvetica, system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
}

h1, h2 { font-weight: 700; letter-spacing: 0.04em; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); text-transform: uppercase; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.accent { color: var(--accent); }

.container { width: min(var(--container), 92%); margin-inline: auto; }
.container.narrow { width: min(860px, 92%); }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 1001;
  background: var(--accent); color: #fff; padding: 0.6rem 1rem;
}
.skip-link:focus { left: 0; }

/* ---------- Preloader ---------- */
.preloader {
  position: fixed; inset: 0; z-index: 2000;
  background: #000;
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.8s var(--ease), visibility 0.8s;
  overflow: hidden;
}
.preloader.done { opacity: 0; visibility: hidden; pointer-events: none; }

.preloader-canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

/* Aurora glow in background */
.preloader__aurora {
  position: absolute; inset: 0; pointer-events: none;
  overflow: hidden;
}
.preloader__aurora span {
  position: absolute; border-radius: 50%;
  filter: blur(80px); opacity: 0.18;
  animation: pl-aurora 6s ease-in-out infinite;
}
.preloader__aurora span:nth-child(1) {
  width: 55vw; height: 55vw; top: -20%; left: -10%;
  background: radial-gradient(circle, var(--accent-primary), transparent 70%);
  animation-delay: 0s;
}
.preloader__aurora span:nth-child(2) {
  width: 45vw; height: 45vw; bottom: -15%; right: -5%;
  background: radial-gradient(circle, var(--accent-2), transparent 70%);
  animation-delay: -2s;
}
.preloader__aurora span:nth-child(3) {
  width: 35vw; height: 35vw; top: 30%; left: 45%;
  background: radial-gradient(circle, var(--accent-secondary), transparent 70%);
  animation-delay: -4s;
}
@keyframes pl-aurora {
  0%, 100% { transform: scale(1) translate(0, 0); opacity: 0.18; }
  50%       { transform: scale(1.12) translate(3%, 2%); opacity: 0.28; }
}

/* Central content */
.preloader__content {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; gap: 1.6rem;
  text-align: center;
}

/* Logo */
.preloader__logo {
  font-size: clamp(2.6rem, 8vw, 5rem);
  font-weight: 700; letter-spacing: 0.04em; line-height: 1;
  color: #fff;
  text-shadow: 0 0 40px rgba(99, 102, 241, 0.6), 0 0 80px rgba(6, 182, 212, 0.3);
  animation: pl-pulse 2.4s ease-in-out infinite;
}
.preloader__logo .accent {
  color: var(--accent-primary);
  text-shadow: 0 0 30px rgba(99, 102, 241, 0.9);
}
@keyframes pl-pulse {
  0%, 100% { opacity: 1; text-shadow: 0 0 40px rgba(99, 102, 241, 0.6), 0 0 80px rgba(6, 182, 212, 0.3); }
  50%       { opacity: 0.85; text-shadow: 0 0 60px rgba(99, 102, 241, 0.9), 0 0 120px rgba(6, 182, 212, 0.5); }
}

/* Tagline */
.preloader__tagline {
  color: var(--muted); letter-spacing: 0.18em;
  text-transform: uppercase; font-size: clamp(0.65rem, 1.5vw, 0.8rem);
  animation: pl-fadein 1s ease forwards;
}
@keyframes pl-fadein { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* Progress bar + percentage */
.preloader__bar-wrap {
  display: flex; flex-direction: column; align-items: center; gap: 0.6rem;
  width: min(340px, 72vw);
}
.progress-track {
  width: 100%; height: 2px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px; overflow: hidden;
}
.progress-track span {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-2), var(--accent-secondary));
  background-size: 200% 100%;
  border-radius: 999px;
  transition: width 0.28s ease;
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.7), 0 0 24px rgba(6, 182, 212, 0.4);
  animation: pl-shimmer 1.8s linear infinite;
}
@keyframes pl-shimmer {
  0%   { background-position: 200% center; }
  100% { background-position: -200% center; }
}
.preloader__pct {
  font-size: 0.72rem; letter-spacing: 0.14em;
  color: var(--accent-primary); font-weight: 700; font-variant-numeric: tabular-nums;
}

/* Animated dots */
.preloader__dots {
  display: flex; gap: 0.5rem; align-items: center;
}
.preloader__dots span {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent-primary); opacity: 0.3;
  animation: pl-dot 1.4s ease-in-out infinite;
}
.preloader__dots span:nth-child(2) { animation-delay: 0.2s; }
.preloader__dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes pl-dot {
  0%, 80%, 100% { opacity: 0.25; transform: scale(0.85); }
  40%           { opacity: 1;    transform: scale(1.3); }
}

/* ---------- Fullscreen hero (brainit.es layout) ---------- */
.hero { position: relative; height: 100svh; overflow: hidden; background: #000; z-index: 2; }
#webglCanvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 1; transition: filter 1.4s ease; }
.logo .accent { color: var(--ui-glow-2, var(--accent)); transition: color 1.4s ease; }

/* žiara horizontu ako spodná lišta (brainit.es štýl) */
.hero-bar::before {
  content: "";
  position: absolute;
  left: -16%;
  bottom: -40px;
  width: 132%;
  height: clamp(55px, 7vh, 85px);
  border-radius: 50% 50% 0 0;
  background-color: #000;
  background: radial-gradient(ellipse farthest-side at bottom, #000 70%, transparent 100%);
  filter: drop-shadow(0 0 15px var(--ui-glow-1))
          drop-shadow(0 5px 25px var(--ui-glow-2))
          drop-shadow(0 -5px 45px var(--ui-glow-3))
          drop-shadow(0 0 55px var(--ui-glow-4));
  z-index: -1;
  pointer-events: none;
  animation: planetPulse 9s ease-in-out infinite;
}
@keyframes planetPulse {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 1.0; }
}

/* padajúce svetelné línie */
.hero-lines {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  display: flex; justify-content: space-around;
  width: 88%; margin: 0 auto; left: 0; right: 0; opacity: 0.7;
}
.hero-lines span {
  position: relative; width: 1px; height: 100%;
  background: rgba(255, 255, 255, 0.05); overflow: hidden;
}
.hero-lines span::after {
  content: ""; position: absolute; left: 0; top: 0;
  width: 100%; height: 14vh;
  background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.9));
  transform: translateY(-100%);
  animation: drop 7s linear infinite;
}
.hero-lines span:nth-child(2)::after { animation-delay: 2.6s; }
.hero-lines span:nth-child(3)::after { animation-delay: 5.1s; }
.hero-lines span:nth-child(4)::after { animation-delay: 1.3s; }
.hero-lines span:nth-child(5)::after { animation-delay: 3.8s; }
.hero-lines span:nth-child(6)::after { animation-delay: 6s; }
.hero-lines span:nth-child(7)::after { animation-delay: 0.7s; }
.hero-lines span:nth-child(8)::after { animation-delay: 4.4s; }
@keyframes drop { 0% { transform: translateY(-100%); } 100% { transform: translateY(800%); } }

/* horný stredový glass „info" panel */
.hero-info {
  position: absolute; top: clamp(1.4rem, 4vh, 2.6rem); left: 50%; z-index: 6;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 0.6rem;
  background: var(--glass);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--line); border-radius: 999px;
  box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.06);
  padding: 0.5rem 0.8rem;
  width: min(560px, 90%);
  transition: opacity 0.4s ease, translate 0.4s var(--ease);
}
.hero-info.switching { opacity: 0; translate: 0 -10px; }
.hero-info-text { flex: 1; text-align: center; min-width: 0; }
.hero-info-text h1 {
  font-size: clamp(1rem, 2.4vw, 1.45rem);
  text-transform: uppercase; letter-spacing: 0.14em; line-height: 1.2;
  color: #ffffff;
  text-shadow: 0 0 15px rgba(255, 255, 255, 0.45), 0 0 30px var(--ui-glow-3, rgba(99, 102, 241, 0.55));
}
.hero-info-text p {
  color: var(--muted); font-size: clamp(0.72rem, 1.4vw, 0.85rem);
  margin-top: 0.15rem; letter-spacing: 0.02em;
}

/* šípky slidera (vo vnútri info panela) */
.slide-arrow {
  flex: 0 0 auto;
  width: 38px; height: 38px;
  background: rgba(0, 255, 234, 0.05);
  border: 1px solid rgba(106, 117, 130, 0.51); border-radius: 50%;
  color: #a5c1e9; font-size: 1rem; cursor: pointer;
  transition: background 0.25s, transform 0.25s var(--ease), color 0.25s;
  display: grid; place-items: center;
}
.slide-arrow:hover { background: rgba(0, 255, 234, 0.14); color: #fff; transform: scale(1.08); }

/* dolná lišta */
.hero-bar {
  position: absolute; bottom: clamp(1.4rem, 4vh, 2.4rem); left: 0; right: 0; z-index: 6;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0 clamp(1.2rem, 4vw, 3rem);
}
.logo { font-weight: 700; font-size: 1.6rem; letter-spacing: 0.01em; line-height: 1; }
.logo .accent { color: var(--ui-glow-2, var(--accent)); }

.glass-nav {
  display: flex; gap: 0.4rem;
  background: var(--glass);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.05);
  padding: 0.4rem 0.5rem;
}
.glass-nav a {
  font-size: 0.82rem; font-weight: 700; letter-spacing: 0.04em;
  color: #a5c1e9;
  background: rgba(0, 255, 234, 0.05);
  border: 1px solid rgba(106, 117, 130, 0.51);
  padding: 0.55rem 1rem; border-radius: 8px;
  transition: color 0.25s, background 0.25s, border-color 0.25s;
}
.glass-nav a:hover, .glass-nav a.active {
  color: #fff; background: rgba(0, 255, 234, 0.14); border-color: rgba(160, 200, 255, 0.6);
}

/* Nav Dropdown Styling */
.nav-dropdown {
  position: relative;
  display: inline-block;
}
.nav-dropdown .dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.nav-dropdown .dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: var(--glass-card);
  backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
  border: 1px solid var(--line);
  border-radius: 12px;
  min-width: 230px;
  display: flex;
  flex-direction: column;
  padding: 0.5rem;
  gap: 0.25rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0.3s;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), inset 0 0 10px rgba(255, 255, 255, 0.05);
  z-index: 100;
}
.nav-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(6px);
}
/* Roll upwards on homepage since navbar is at the bottom */
.hero-bar .nav-dropdown .dropdown-menu {
  top: auto;
  bottom: 100%;
  transform: translateX(-50%) translateY(-12px);
}
.hero-bar .nav-dropdown:hover .dropdown-menu {
  transform: translateX(-50%) translateY(-6px);
}
.glass-nav .nav-dropdown .dropdown-menu a {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  text-align: left;
  color: #a5c1e9;
  background: transparent;
  border: none;
  border-radius: 6px;
  padding: 0.6rem 1rem;
  transition: color 0.25s, background 0.25s;
  white-space: nowrap;
}
.glass-nav .nav-dropdown .dropdown-menu a:hover {
  color: #fff;
  background: rgba(0, 255, 234, 0.1);
}

.hero-aside { display: flex; justify-content: flex-end; min-width: 90px; }
.slide-progress { display: flex; gap: 8px; }
.slide-progress button {
  width: 26px; height: 3px; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, 0.2);
  transition: background 0.3s;
}
.slide-progress button.active { background: linear-gradient(90deg, var(--accent), var(--accent-2)); }

.scroll-cue {
  position: absolute; left: 50%; bottom: 5.4rem; z-index: 5; translate: -50% 0;
  width: 22px; height: 34px; border: 1.5px solid var(--muted); border-radius: 999px;
  opacity: 0.7;
}
.scroll-cue span {
  position: absolute; left: 50%; top: 6px; translate: -50% 0;
  width: 3px; height: 7px; border-radius: 3px; background: var(--accent);
  animation: cue 1.8s ease-in-out infinite;
}
@keyframes cue { 0% { opacity: 1; top: 6px; } 70% { opacity: 0; top: 17px; } 100% { opacity: 0; top: 6px; } }

/* ---------- Sekcie ---------- */
.section { padding: clamp(5rem, 12vh, 8.5rem) 0; position: relative; }
.section h2 { text-align: center; margin-bottom: 0.8rem; }
.section-sub { text-align: center; color: var(--muted); max-width: 56ch; margin: 0 auto 3.2rem; }

/* ---------- Služby – Node Constellation Merger (brainit.es) ---------- */
.layer-container {
  width: 100%;
  position: relative;
  overflow-y: visible;
  z-index: 2;
}
#ui-layer {
  width: 100%;
  display: flex;
  flex-direction: column;
}
#game-area {
  position: relative;
  width: 100%;
  height: clamp(440px, 64vh, 660px);
  pointer-events: auto;
  z-index: 1;
}
#connections-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: visible;
}
path.connection-line {
  fill: none;
  stroke-linecap: round;
  transition: all 0.3s ease;
  filter: drop-shadow(0 0 5px currentColor);
  pointer-events: none;
  stroke-dasharray: 10, 10;
  animation: flowLine 60s linear infinite;
}
@keyframes flowLine {
  to {
    stroke-dashoffset: -1000;
  }
}

.node {
  position: absolute;
  width: 150px;
  height: 150px;
  z-index: 10;
  touch-action: none;
  perspective: 600px;
  will-change: transform;
}
.card__translater,
.card__rotator {
  display: grid;
  perspective: 600px;
  transform-origin: center;
  width: 100%;
  height: 100%;
}
.card__translater {
  position: relative;
  transform: translate3d(0, 0, 0.1px);
}
.card__rotator {
  transform: rotateY(var(--rotate-x, 0deg)) rotateX(var(--rotate-y, 0deg));
  transform-style: preserve-3d;
  pointer-events: auto;
}
.card__front {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: visible;
  background: radial-gradient(circle at 50% 50%, rgba(30, 30, 40, 1), rgba(10, 10, 15, 1));
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: grab;
  transform: translate3d(0, 0, 0.1px);
}
.card__front:active {
  cursor: grabbing;
}
.card__content {
  position: relative;
  z-index: 5;
  width: 100%;
  height: 100%;
  padding: 24px 15px 15px 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  text-align: center;
}
.card__shine,
.card__glare {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  z-index: 4;
  pointer-events: none;
}
.card__glare {
  z-index: 6;
  mix-blend-mode: hard-light;
  background-image: radial-gradient(farthest-corner circle at var(--pointer-x, 50%) var(--pointer-y, 50%),
      rgba(255, 255, 255, 0.5) 7%,
      rgba(255, 255, 255, 0.15) 32%,
      rgba(255, 255, 255, 0) 80%);
  opacity: var(--card-opacity, 0);
  transition: opacity 0.15s ease;
  filter: brightness(0.9) contrast(1.5);
}
.card__shine {
  mix-blend-mode: soft-light;
  opacity: var(--card-opacity, 0);
  transition: opacity 0.15s ease;
  background-image:
    radial-gradient(farthest-corner circle at var(--pointer-x, 50%) var(--pointer-y, 50%),
        hsl(0, 0%, 100%) 0%,
        rgba(0, 0, 0, 0) 100%),
    conic-gradient(from calc(var(--hypot, 0) * 360deg),
        #6366f1,
        #ec4899,
        #fbbf24,
        #34d399,
        #6366f1);
  background-blend-mode: soft-light;
}

/* Sinergia farby uzlov */
.node.synergy-level-1 .card__front {
  background: radial-gradient(circle at 50% 50%, rgba(50, 20, 60, 1), rgba(20, 5, 25, 1));
  border: 1px solid rgba(236, 72, 153, 0.5);
}
.node.synergy-silver .card__front {
  background: radial-gradient(circle at 50% 50%, rgba(30, 40, 60, 1), rgba(10, 15, 30, 1));
  border: 1.5px solid rgba(99, 102, 241, 0.65);
}
.node.synergy-final .card__front {
  background: radial-gradient(circle at 50% 50%, rgba(60, 45, 15, 1), rgba(20, 12, 0, 1));
  border: 2px solid rgba(251, 191, 36, 0.85);
  box-shadow: 0 0 30px rgba(251, 191, 36, 0.35);
}

.node-access {
  width: 64px;
  height: 32px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 0 0 32px 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  cursor: pointer;
  pointer-events: auto;
  transition: background 0.25s, border-color 0.25s, transform 0.25s, box-shadow 0.25s;
  font-size: 1.15rem;
  font-weight: bold;
  position: absolute;
  bottom: -16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}
.node-access:hover {
  background: #ffffff;
  color: #000;
  transform: translateX(-50%) translateY(2px);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}
.node-reset-btn {
  padding: 5px 12px;
  background: rgba(251, 191, 36, 0.15);
  border: 1px solid rgba(251, 191, 36, 0.5);
  border-radius: 20px;
  color: #fbbf24;
  font-size: 0.65rem;
  font-weight: bold;
  letter-spacing: 1.5px;
  cursor: pointer;
  pointer-events: auto;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
  display: none;
}
.node-reset-btn.visible {
  display: block;
  opacity: 1;
  transform: translateY(0);
}
.node-reset-btn:hover {
  background: #fbbf24;
  color: #000;
}
.node-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #e2e8f0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.25;
  pointer-events: none;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
  position: relative;
  z-index: 5;
}
.node-icon {
  position: absolute;
  top: 52%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 62px;
  height: 62px;
  opacity: 0.18;
  z-index: 1;
  pointer-events: none;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.08));
  transition: opacity 0.3s ease;
}
.node:hover .node-icon {
  opacity: 0.36;
}
.node-icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
}
.node-count {
  font-size: 2.2rem;
  font-weight: 800;
  background: linear-gradient(135deg, #fff, #818cf8);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
  text-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
  position: relative;
  z-index: 5;
}
.node.synergy-final .node-count {
  font-size: 2.6rem;
  background: linear-gradient(135deg, #fff, #fbbf24);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 20px rgba(251, 191, 36, 0.6);
}

/* detailový modal služby */
.svc-modal {
  position: fixed; inset: 0; z-index: 1500;
  display: grid; place-items: center; padding: 1.2rem;
  background: rgba(0, 0, 0, 0.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; transition: opacity 0.3s ease;
}
.svc-modal[hidden] { display: none; }
.svc-modal.open { opacity: 1; }

.modal-card-wrapper {
  width: 90%;
  max-width: 520px;
  perspective: 1000px;
  z-index: 1001;
  transform: translateY(20px) scale(0.98);
  transition: transform 0.4s var(--ease);
}
.svc-modal.open .modal-card-wrapper {
  transform: translateY(0) scale(1);
}
.modal-card-wrapper .card__front {
  background: rgba(8, 12, 24, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85);
  border-radius: 22px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  cursor: default;
}
.modal-card-wrapper .card__front::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  pointer-events: none;
  background: radial-gradient(farthest-corner circle at var(--pointer-x, 50%) var(--pointer-y, 50%),
      rgba(255, 255, 255, 0.75) 0%,
      rgba(99, 102, 241, 0.45) 20%,
      rgba(255, 255, 255, 0) 60%);
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  z-index: 10;
  opacity: var(--card-opacity, 0);
  transition: opacity 0.15s ease;
}
.modal-content-inner {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 0;
}
.modal-header {
  padding: 2.2rem 2.2rem 0 2.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.modal-title {
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  margin: 0.8rem 0;
  line-height: 1.15;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  text-align: center;
}
.modal-body {
  padding: 0.8rem 2.2rem 2.2rem 2.2rem;
  color: #cbd5e1;
  line-height: 1.6;
  font-size: 0.94rem;
}
.svc-modal-close {
  position: absolute; top: 1rem; right: 1rem; width: 38px; height: 38px;
  display: grid; place-items: center; cursor: pointer;
  background: rgba(255, 255, 255, 0.08); border: 1px solid var(--line); border-radius: 50%;
  color: var(--text); font-size: 1.3rem; line-height: 1; transition: background 0.25s, transform 0.25s;
  z-index: 50;
}
.svc-modal-close:hover { background: rgba(255, 255, 255, 0.18); transform: rotate(90deg); }
.svc-modal-tag {
  display: inline-block; font-size: 0.66rem; letter-spacing: 0.24em; text-transform: uppercase;
  color: #a5b4fc; padding: 0.4rem 1rem; border: 1px solid rgba(165, 180, 252, 0.5); border-radius: 999px;
  margin-bottom: 0.4rem;
  margin-inline: auto;
}
.svc-modal-sub { font-weight: 700; font-size: 1.1rem; margin-bottom: 0.8rem; color: #a5b4fc; text-align: center; }
.svc-modal-intro { color: #cbd5e1; margin-bottom: 1.2rem; }
.svc-modal-list { list-style: none; text-align: left; display: flex; flex-direction: column; gap: 0.8rem; }
.svc-modal-list li { position: relative; padding-left: 1.4rem; color: #e2e8f0; }
.svc-modal-list li::before {
  content: ""; position: absolute; left: 0; top: 0.55em; width: 7px; height: 7px; border-radius: 50%;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
}

/* ---------- Ako pracujem? – scanner efekt (brainit.es) ---------- */
.scan-wrap {
  position: relative; margin-top: 2.8rem; padding: 1.5rem 0; overflow: hidden;
  -webkit-mask: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
/* vertikálny svetelný lúč v strede */
.scan-beam {
  position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; z-index: 4; transform: translateX(-50%);
  background: linear-gradient(180deg, transparent, #a855f7, #6366f1, #a855f7, transparent);
  box-shadow: 0 0 24px 6px rgba(168, 85, 247, 0.6); pointer-events: none;
}
.scan-beam::before {
  content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 120px; transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(168, 85, 247, 0.25), transparent 70%);
}
.scan-track { display: flex; gap: 1.6rem; width: max-content; will-change: transform; padding: 0 1.6rem; }
.scan-card {
  position: relative; flex: 0 0 clamp(280px, 36vw, 420px); aspect-ratio: 16 / 10;
  border-radius: 16px; overflow: hidden; margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.6);
}
.scan-back, .scan-code { position: absolute; inset: 0; }
.scan-back { display: grid; place-items: stretch; background: #0a0f1e; padding: 14px; }
.scan-code {
  margin: 0; padding: 1.3rem 1.4rem; overflow: hidden;
  background: rgba(4, 8, 16, 0.98);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.8rem; line-height: 1.65; color: #cbd5e1; white-space: pre;
  clip-path: inset(0 0 0 0); /* JS upraví zľava doprava */
}
.scan-code .c-com { color: #64748b; }
.scan-code .c-str { color: #fbbf24; }
.scan-code .c-num { color: #ec4899; }
.scan-code .c-key { color: #818cf8; }

/* CSS makety (matess vizuál namiesto obrázkov) */
.mock { width: 100%; height: 100%; border-radius: 10px; overflow: hidden; background: #0e1428; border: 1px solid rgba(255,255,255,0.08); }
.mock-web .mock-bar { height: 26px; display: flex; align-items: center; gap: 6px; padding: 0 10px; background: #161d36; }
.mock-web .mock-bar span { width: 9px; height: 9px; border-radius: 50%; background: #36406a; }
.mock-web .mock-bar span:nth-child(1) { background: #ec4899; } .mock-web .mock-bar span:nth-child(2) { background: #fbbf24; } .mock-web .mock-bar span:nth-child(3) { background: #34d399; }
.mock-web .mock-body { padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.mock-hero { height: 46px; border-radius: 7px; background: linear-gradient(120deg, var(--accent-primary), var(--accent-secondary)); }
.mock-row { height: 9px; border-radius: 5px; background: #2a3357; } .mock-row.short { width: 60%; }
.mock-grid { display: flex; gap: 8px; margin-top: 4px; } .mock-grid i { flex: 1; height: 34px; border-radius: 6px; background: #1d2542; }
.mock-dash { display: flex; }
.mock-dash .mock-side { width: 28%; background: #161d36; padding: 12px 10px; display: flex; flex-direction: column; gap: 9px; }
.mock-dash .mock-side i { height: 9px; border-radius: 5px; background: #2a3357; } .mock-dash .mock-side i:first-child { background: var(--accent-primary); }
.mock-dash .mock-main { flex: 1; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.mock-kpis { display: flex; gap: 8px; } .mock-kpis u { flex: 1; height: 28px; border-radius: 6px; background: #1d2542; }
.mock-chart { flex: 1; display: flex; align-items: flex-end; gap: 8px; }
.mock-chart b { flex: 1; border-radius: 5px 5px 0 0; background: linear-gradient(180deg, var(--accent-secondary), var(--accent-primary)); }
.mock-mobile { display: grid; place-items: center; background: #0e1428; }
.mock-mobile .mock-notch { display: none; }
.mock-mobile .mock-app { width: 46%; height: 88%; border-radius: 16px; background: #11182f; border: 2px solid #2a3357; padding: 10px; display: flex; flex-direction: column; gap: 7px; position: relative; }
.mock-mobile .mock-app::before { content: ""; position: absolute; top: 6px; left: 50%; transform: translateX(-50%); width: 30%; height: 5px; border-radius: 5px; background: #2a3357; }
.mock-mobile .mock-appbar { height: 30px; border-radius: 7px; margin-top: 10px; background: linear-gradient(120deg, var(--accent-primary), var(--accent-secondary)); }
.mock-mobile .mock-tile { height: 40px; border-radius: 7px; background: #1d2542; }
.mock-mobile .mock-line { height: 8px; border-radius: 4px; background: #2a3357; } .mock-mobile .mock-line.short { width: 55%; }
.mock-infra { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 14px; background: #0e1428; }
.mock-infra .mock-server { flex: 1; height: 90%; background: #161d36; border: 1.5px solid #2a3357; border-radius: 8px; display: flex; flex-direction: column; justify-content: space-around; padding: 10px 8px; }
.mock-infra .mock-unit { height: 16px; border-radius: 4px; background: #1d2542; display: flex; align-items: center; justify-content: space-between; padding: 0 6px; }
.mock-infra .mock-unit span { width: 5px; height: 5px; border-radius: 50%; background: #34d399; box-shadow: 0 0 5px #34d399; }
.mock-infra .mock-unit span.alert { background: var(--accent-secondary); box-shadow: 0 0 5px var(--accent-secondary); }
.mock-infra .mock-unit i { width: 28px; height: 4px; border-radius: 2px; background: #2a3357; }

/* statický príbeh pod efektom */
.about-story { max-width: 70ch; margin: 3rem auto 0; text-align: center; }
.about-story p { color: var(--muted); margin-bottom: 1.1rem; }
.about-story strong { color: var(--text); }

/* ---------- Skúsenosti – Experiencia (brainit.es) ---------- */
.exp-counter {
  display: flex; align-items: flex-start; justify-content: center; gap: 0.7rem;
  margin-bottom: 0.4rem;
}
.exp-counter strong {
  font-size: clamp(4rem, 11vw, 7rem); font-weight: 800; line-height: 0.9; color: var(--text);
}
.exp-counter div {
  display: flex; flex-direction: column; font-size: clamp(1.1rem, 2.4vw, 1.7rem);
  font-weight: 700; line-height: 1.1; margin-top: 0.5rem;
}
.exp-tagline {
  text-align: center; font-style: italic; font-weight: 700; color: #cbd5e1;
  font-size: clamp(1rem, 2vw, 1.25rem); margin-bottom: 4rem;
}

.clients-label {
  text-align: center; color: var(--muted);
  letter-spacing: 0.16em; text-transform: uppercase; font-size: 0.85rem;
  margin-bottom: 2rem;
}
.client-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.25rem;
  margin-bottom: 4.5rem;
}
.client-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 140px;
  padding: 1.5rem 1rem;
  border-radius: 16px;
  text-align: center;
  background: var(--glass-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.4s var(--ease), border-color 0.4s, box-shadow 0.4s;
  text-decoration: none;
}
.client-card-image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: top center;
  opacity: 0.18; /* Very subtle default state */
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
  z-index: 1;
}
.client-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5, 5, 8, 0.25) 0%, rgba(5, 5, 8, 0.8) 100%);
  z-index: 2;
  transition: background 0.4s var(--ease);
}
.client-card span {
  position: relative;
  z-index: 3;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
  transition: color 0.3s, text-shadow 0.3s;
}
.client-card:hover {
  transform: translateY(-6px);
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 20px 40px rgba(99, 102, 241, 0.2);
}
.client-card:hover .client-card-image {
  opacity: 0.6; /* Becomes clearly visible on hover */
  transform: scale(1.08); /* Zoom effect */
}
.client-card:hover .client-card-overlay {
  background: linear-gradient(180deg, rgba(5, 5, 8, 0.1) 0%, rgba(5, 5, 8, 0.6) 100%);
}
.client-card:hover span {
  color: #fff;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
}

/* card-stream recenzií (brainit.es) */
.card-stream {
  position: relative; overflow: hidden;
  margin-inline: calc(50% - 50vw); width: 100vw;
  -webkit-mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.card-line {
  display: flex; gap: 1.4rem; width: max-content;
  padding: 0.5rem clamp(1rem, 5vw, 3rem);
  animation: stream 46s linear infinite;
}
.card-stream:hover .card-line { animation-play-state: paused; }
@keyframes stream { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.hcard {
  flex: 0 0 clamp(280px, 32vw, 380px);
  border-radius: 18px; padding: 1px;
}
.hcard-front {
  position: relative; height: 100%; border-radius: 18px; overflow: hidden;
  background: var(--glass-card);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
  padding: 1.6rem 1.7rem;
}
.hcard-front::before {
  content: "“"; position: absolute; top: -0.4rem; right: 1rem;
  font-size: 4rem; line-height: 1; color: rgba(99, 102, 241, 0.35); font-family: Georgia, serif;
}
.hcard-front p { font-size: 0.96rem; margin-bottom: 1rem; color: #e2e8f0; }
.hcard-front figcaption {
  color: var(--muted); font-size: 0.82rem; letter-spacing: 0.06em; font-weight: 700;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

/* ---------- FAQ ---------- */
#faq h2 { margin-bottom: 2.4rem; }
.faq-list { display: flex; flex-direction: column; gap: 0.8rem; }
.faq-item {
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--glass-card);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  overflow: hidden; transition: border-color 0.3s, box-shadow 0.3s;
}
.faq-item[open] { border-color: var(--accent-primary); box-shadow: 0 12px 34px rgba(99, 102, 241, 0.2); }
.faq-item summary {
  list-style: none; cursor: pointer;
  padding: 1.15rem 1.4rem;
  font-weight: 700; font-size: 0.98rem;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.4rem; color: var(--accent); transition: rotate 0.3s; }
.faq-item[open] summary::after { rotate: 45deg; }
.faq-item p { padding: 0 1.4rem 1.2rem; color: var(--muted); }

/* ---------- Kontakt ---------- */
.contact-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.contact-line {
  display: flex; flex-direction: column; gap: 0.1rem;
  padding: 1.1rem 0; border-bottom: 1px solid var(--line);
  transition: padding-left 0.3s var(--ease);
}
.contact-line:not(.nolink):hover { padding-left: 0.6rem; }
.contact-line span {
  font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted);
}
.contact-line strong { font-size: 1.15rem; }
.contact-line:not(.nolink):hover strong { color: var(--accent); }

.contact-form {
  position: relative;
  border: 1px solid var(--line); border-radius: 18px;
  background: var(--glass-card);
  backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
  padding: 2rem;
  display: flex; flex-direction: column; gap: 1rem;
}
.field label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.field input, .field select, .field textarea {
  width: 100%; padding: 0.95rem 1.1rem;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--line); border-radius: 8px;
  color: var(--text); font-family: var(--font); font-size: 0.95rem;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}
.field ::placeholder { color: var(--muted); }
.field select { appearance: none; cursor: pointer; }
.field select option { color: #111; background: #fff; }
.field select:invalid { color: var(--muted); }
.checkbox { display: flex; gap: 0.7rem; align-items: flex-start; font-size: 0.85rem; color: var(--muted); cursor: pointer; }
.checkbox input { margin-top: 3px; accent-color: var(--accent); }

.btn-contact {
  position: relative; overflow: hidden;
  align-self: flex-start;
  font-family: var(--font); font-weight: 700; font-size: 0.9rem;
  letter-spacing: 0.14em; text-transform: uppercase;
  padding: 1rem 2.4rem;
  color: #fff; cursor: pointer;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  border: 0; border-radius: 999px;
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
  transition: transform 0.3s var(--ease), box-shadow 0.3s;
}
.btn-contact:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(236, 72, 153, 0.5); }
.btn-contact::before {
  content: ""; position: absolute; top: 0; left: -120%; width: 60%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: skewX(-20deg); transition: left 0.6s var(--ease);
}
.btn-contact:hover::before { left: 130%; }
.form-status { font-size: 0.9rem; color: var(--accent); min-height: 1.2em; }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--line); padding: 2rem 0;
  background: linear-gradient(180deg, transparent, rgba(99, 102, 241, 0.06));
}
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.footer-logo { font-weight: 700; font-size: 1.25rem; }
.footer-logo .accent { color: var(--ui-glow-2, var(--accent-primary)); }
.footer p { color: var(--muted); font-size: 0.85rem; }
.footer-legal { display: flex; gap: 1.4rem; }
.footer-legal a { color: var(--muted); font-size: 0.85rem; transition: color 0.25s; }
.footer-legal a:hover { color: var(--text); }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s var(--ease); }
.reveal.visible { opacity: 1; transform: none; }
.reveal.from-left { transform: translateX(-40px); }
.reveal.from-right { transform: translateX(40px); }
.reveal.from-scale { transform: scale(0.9); }
.reveal.from-left.visible, .reveal.from-right.visible, .reveal.from-scale.visible { transform: none; }

/* ========== EXTRA ANIMÁCIE ========== */

/* kurzorové svetlo (spotlight) */
.cursor-glow {
  position: fixed; top: 0; left: 0; width: 420px; height: 420px; z-index: 70;
  margin: -210px 0 0 -210px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(99, 130, 246, 0.16), rgba(236, 72, 153, 0.08) 40%, transparent 70%);
  mix-blend-mode: screen; opacity: 0; transition: opacity 0.4s ease;
  will-change: transform;
}
.cursor-glow.on { opacity: 1; }

/* jemné zrno (grain) */
.grain {
  position: fixed; inset: -50%; z-index: 65; pointer-events: none; opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grainShift 0.6s steps(2) infinite;
}
@keyframes grainShift {
  0% { transform: translate(0, 0); } 50% { transform: translate(-4%, 3%); } 100% { transform: translate(3%, -2%); }
}

/* aurora gradientové škvrny v pozadí obsahu */
.aurora { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.aurora span {
  position: absolute; width: 46vw; height: 46vw; border-radius: 50%; filter: blur(90px); opacity: 0.4;
}
.aurora span:nth-child(1) { left: -8vw; top: 30%; background: radial-gradient(circle, #6366f1, transparent 70%); animation: auroraA 22s ease-in-out infinite; }
.aurora span:nth-child(2) { right: -10vw; top: 55%; background: radial-gradient(circle, #ec4899, transparent 70%); animation: auroraB 27s ease-in-out infinite; }
.aurora span:nth-child(3) { left: 40%; bottom: -15vw; background: radial-gradient(circle, #06b6d4, transparent 70%); animation: auroraC 31s ease-in-out infinite; }
@keyframes auroraA { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(8vw,-6vh) scale(1.2); } }
@keyframes auroraB { 0%,100% { transform: translate(0,0) scale(1.1); } 50% { transform: translate(-7vw,5vh) scale(0.9); } }
@keyframes auroraC { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-5vw,-8vh) scale(1.25); } }
/* obsah nad auroru */
.section { position: relative; z-index: 1; }
.footer { position: relative; z-index: 1; }

/* jemný scanline cez vykreslenú maketu */
.scan-back { position: absolute; }
.scan-back::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 30%; z-index: 2;
  background: linear-gradient(180deg, rgba(99, 130, 246, 0.16), transparent);
  pointer-events: none; animation: scanline 3.6s linear infinite;
}
@keyframes scanline { 0% { transform: translateY(-100%); } 100% { transform: translateY(360%); } }

/* animovaný gradient na nadpisoch sekcií */
.section h2 {
  background: linear-gradient(100deg, #fff, #a5b4fc, #fff, #ec4899, #fff);
  background-size: 250% auto;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
  animation: shimmer 9s linear infinite;
}

/* ripple pri kliknutí */
.ripple-host { overflow: hidden; }
.ripple {
  position: absolute; border-radius: 50%; transform: translate(-50%, -50%) scale(0);
  background: rgba(255, 255, 255, 0.35); pointer-events: none;
  animation: ripple 0.6s var(--ease) forwards;
}
@keyframes ripple { to { transform: translate(-50%, -50%) scale(1); opacity: 0; } }

/* stagger karty */
.st { opacity: 0; transform: translateY(24px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.st.st-in { opacity: 1; transform: none; }

/* tlačidlo späť hore */
.to-top {
  position: fixed; right: clamp(1rem, 3vw, 2rem); bottom: clamp(1rem, 3vw, 2rem); z-index: 80;
  width: 48px; height: 48px; display: grid; place-items: center; cursor: pointer;
  font-size: 1.2rem; color: var(--text);
  background: var(--glass); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line); border-radius: 50%;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  opacity: 0; visibility: hidden; transform: translateY(16px) scale(0.8);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease), visibility 0.35s, background 0.25s;
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: rgba(99, 102, 241, 0.4); transform: translateY(-3px); }

/* typewriter kurzor */
.tw-caret { display: inline-block; width: 2px; margin-left: 1px; background: currentColor; animation: caret 0.9s steps(1) infinite; vertical-align: -2px; }
@keyframes caret { 50% { opacity: 0; } }

/* scroll-progress lišta */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 3000;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary), var(--accent-final));
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.7);
  transition: width 0.1s linear;
}

/* shimmer na hero titulku odstránený pre lepšiu čitateľnosť */

/* animovaný podčiarknik pod nadpismi sekcií */
.section h2 { position: relative; }
.section h2::after {
  content: ""; position: absolute; left: 50%; bottom: -0.5rem; transform: translateX(-50%);
  width: 0; height: 3px; border-radius: 3px;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  transition: width 0.8s var(--ease) 0.2s;
}
.section h2.reveal.visible::after { width: 64px; }

/* pulz „+" na uzloch */
.svc-node-plus { animation: plusPulse 2.4s ease-in-out infinite; }
@keyframes plusPulse { 0%, 100% { opacity: 0.5; transform: translateX(-50%) scale(1); } 50% { opacity: 1; transform: translateX(-50%) scale(1.25); } }

/* žiara navigačných odkazov pri hover */
.glass-nav a { position: relative; overflow: hidden; }
.glass-nav a::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; opacity: 0;
  box-shadow: 0 0 18px rgba(0, 255, 234, 0.5) inset; transition: opacity 0.3s;
}
.glass-nav a:hover::after { opacity: 1; }

/* jemné nadnášanie kariet recenzií + proces (cez translate property, nezasahuje do tiltu) */
.hcard, .client-card { transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s; }

/* žiariaci okraj kontaktného formulára */
.contact-form::after {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(130deg, rgba(99,102,241,0.6), transparent 40%, transparent 60%, rgba(236,72,153,0.6));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0.5; animation: borderHue 8s linear infinite;
}
@keyframes borderHue { to { filter: hue-rotate(360deg); } }

/* pomalá rotácia žiary za počítadlom */
.exp-counter { position: relative; }
.exp-counter::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 320px; height: 320px;
  transform: translate(-50%, -50%); z-index: -1; border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,0.22), transparent 65%);
  animation: glowSpin 14s linear infinite;
}
@keyframes glowSpin { to { transform: translate(-50%, -50%) rotate(360deg) scale(1.15); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responzívne ---------- */
@media (max-width: 880px) {
  .glass-nav a { padding: 0.45rem 0.7rem; font-size: 0.72rem; }
  .contact-grid { grid-template-columns: 1fr; }
  /* konštelácia -> mriežka uzlov */
  #game-area { height: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; place-items: center; }
  #connections-svg { display: none; }
  .node { position: static; transform: none !important; width: 100%; max-width: 140px; aspect-ratio: 1; height: auto; margin: 0 auto; }
  .node .card__rotator { transform: none !important; }
  .node-access:hover { transform: translateX(-50%) translateY(2px); }
  .slide-arrow { width: 34px; height: 34px; font-size: 0.9rem; }
  .scroll-cue { display: none; }
  .scan-card { flex-basis: 80vw; }
  .scan-code { font-size: 0.72rem; }
}

@media (max-width: 600px) {
  .hero-bar {
    flex-direction: column; gap: 0.7rem;
    bottom: 1rem;
  }
  .logo { font-size: 1.35rem; }
  .hero-aside { display: none; }
  .glass-nav { flex-wrap: wrap; justify-content: center; }
  .hero-info { top: 1rem; padding: 0.45rem 0.5rem; }
  .section { padding: 4rem 0; }
}

/* ---------- Perf: lazy render sekcií mimo viewportu (rýchlejší prvý render) ---------- */
.section { content-visibility: auto; contain-intrinsic-size: auto 700px; }

/* ---------- Zoom progress indicator (brainit.es layout) ---------- */
#zoom-progress-container {
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 300px;
    opacity: .75;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    z-index: 90;
    pointer-events: none;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

#zoom-progress-container::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: #00ffea;
    border-radius: 50%;
    box-shadow: 0 0 10px #00ffea;
    opacity: .5;
}

#zoom-progress-container::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: #00ffea;
    border-radius: 50%;
    box-shadow: 0 0 10px #00ffea;
    opacity: .5;
}

#zoom-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: scaleY(0);
    transform-origin: bottom;
    background: linear-gradient(to top, #00a2ff, #00ffea);
    border-radius: 4px;
    box-shadow: 0 0 15px rgba(0, 255, 234, 0.6);
    transition: transform 0.1s linear;
    will-change: transform;
}

#zoom-progress-glow {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleY(0);
    transform-origin: bottom;
    width: 10px;
    height: 100%;
    background: rgba(255, 255, 255, 0);
    box-shadow: 0 0 20px rgba(0, 255, 234, 0.4);
    z-index: -1;
    transition: transform 0.1s linear;
    will-change: transform;
}

/* ---------- Toast Notification ---------- */
.toast {
  position: fixed;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(255, 255, 255, 0.95);
  color: #050510;
  padding: 12px 28px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5);
  z-index: 2100;
  opacity: 0;
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}
.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ---------- Contact Widget (Social slider widget) ---------- */
.icons {
  display: flex;
  justify-content: center;
  margin: 1.5rem auto 3rem;
  width: 100%;
}
.contact-me {
  position: relative;
  background-color: #1e293b;
  color: #fff;
  height: 54px;
  width: 240px;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: background-color 0.8s ease, border-color 0.8s ease;
  box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.3), 0 10px 30px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}
.contact-me span.text {
  transition: opacity 0.4s ease, transform 0.5s ease;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  white-space: nowrap;
}
.contact-me a {
  position: absolute;
  opacity: 0;
  width: 54px;
  height: 54px;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #1e293b;
  border-radius: 12px;
  transition: opacity 0.4s ease 0.1s, background-color 0.3s ease, transform 0.4s ease;
}
.contact-me a.wa {
  left: 0;
}
.contact-me a.fa {
  left: 50%;
  transform: translateX(-50%);
}
.contact-me a.mail {
  right: 0;
}
.contact-me a svg {
  width: 24px;
  height: 24px;
  opacity: 0;
  transition: opacity 0.5s ease 0.2s;
  fill: #cbd5e1;
  stroke: none;
}
.contact-me a.fa svg {
  fill: none;
  stroke: #cbd5e1;
}
.contact-me:hover {
  background-color: transparent;
  border-color: rgba(99, 102, 241, 0.45);
}
.contact-me:hover span.text {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.25);
}
.contact-me:hover a {
  opacity: 1;
}
.contact-me:hover a svg {
  opacity: 1;
}
.contact-me a:hover {
  background-color: #3b82f6;
}
.contact-me a:hover svg {
  fill: #fff;
  stroke: none;
}
.contact-me a.fa:hover svg {
  fill: none;
  stroke: #fff;
}

@media (max-width: 768px) {
  /* On mobile trigger reveal immediately when scroll reveal is visible */
  .revealed .contact-me {
    background-color: transparent;
    border-color: rgba(99, 102, 241, 0.45);
  }
  .revealed .contact-me span.text {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.25);
  }
  .revealed .contact-me a {
    opacity: 1;
  }
  .revealed .contact-me a svg {
    opacity: 1;
  }
}

/* ============================================================
   Services Grid & Switcher (Premium Redesign)
   ============================================================ */

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.2rem;
  width: 100%;
  max-width: 1200px;
  margin: 3.5rem auto 0;
}

.svc-card {
  position: relative;
  border-radius: 20px;
  background: var(--glass-card);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  padding: 2.5rem 2.2rem;
  transition: transform 0.4s var(--ease), border-color 0.4s ease, box-shadow 0.4s ease;
  cursor: pointer;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.svc-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent 40%, transparent 60%, rgba(255, 255, 255, 0.05));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  z-index: 2;
  transition: background 0.4s ease;
}

.svc-card:hover {
  transform: translateY(-12px) scale(1.02);
}

.svc-card[data-service="web"]:hover {
  border-color: rgba(6, 182, 212, 0.4);
  box-shadow: 0 20px 50px rgba(6, 182, 212, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.svc-card[data-service="web"]:hover::before {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.4), transparent 60%);
}

.svc-card[data-service="udrzba"]:hover {
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 20px 50px rgba(99, 102, 241, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.svc-card[data-service="udrzba"]:hover::before {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.4), transparent 60%);
}

.svc-card[data-service="it"]:hover {
  border-color: rgba(245, 158, 11, 0.4);
  box-shadow: 0 20px 50px rgba(245, 158, 11, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.svc-card[data-service="it"]:hover::before {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.4), transparent 60%);
}

.svc-card[data-service="optim"]:hover {
  border-color: rgba(236, 72, 153, 0.4);
  box-shadow: 0 20px 50px rgba(236, 72, 153, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.svc-card[data-service="optim"]:hover::before {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.4), transparent 60%);
}

.svc-card[data-service="design"]:hover {
  border-color: rgba(139, 92, 246, 0.4);
  box-shadow: 0 20px 50px rgba(139, 92, 246, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.svc-card[data-service="design"]:hover::before {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.4), transparent 60%);
}

.svc-card[data-service="devops"]:hover {
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 20px 50px rgba(16, 185, 129, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.svc-card[data-service="devops"]:hover::before {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.4), transparent 60%);
}

.svc-card-inner {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  height: 100%;
  flex-grow: 1;
}

.svc-icon-box {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  margin-bottom: 1.8rem;
  color: #fff;
  transition: transform 0.4s var(--ease);
}

.svc-card:hover .svc-icon-box {
  transform: scale(1.1) rotate(4deg);
}

.svc-icon-box svg {
  width: 28px;
  height: 28px;
  stroke: currentColor;
}

/* Glow styles for each card icon */
.web-glow {
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.3);
  color: #06b6d4;
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.2);
}
.udrzba-glow {
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #6366f1;
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.2);
}
.it-glow {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #f59e0b;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.2);
}
.optim-glow {
  background: rgba(236, 72, 153, 0.12);
  border: 1px solid rgba(236, 72, 153, 0.3);
  color: #ec4899;
  box-shadow: 0 0 15px rgba(236, 72, 153, 0.2);
}
.design-glow {
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: #8b5cf6;
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.2);
}
.devops-glow {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #10b981;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
}

.svc-card h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.9rem;
  color: #fff;
  letter-spacing: 0.02em;
}

.svc-card p {
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.65;
  margin-bottom: 1.8rem;
  flex-grow: 1;
}

.svc-card-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.68rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 1.4rem;
  margin-top: auto;
}

.svc-card-bullets li {
  position: relative;
  padding-left: 1.4rem;
  font-size: 0.88rem;
  color: #d1d5db;
  transition: color 0.3s ease;
}

.svc-card-bullets li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: -1px;
  font-weight: 700;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

/* Specific glows for checkmarks */
.svc-card[data-service="web"] .svc-card-bullets li::before {
  color: rgba(6, 182, 212, 0.7);
}
.svc-card[data-service="web"]:hover .svc-card-bullets li::before {
  color: #06b6d4;
  text-shadow: 0 0 8px rgba(6, 182, 212, 0.6);
}

.svc-card[data-service="udrzba"] .svc-card-bullets li::before {
  color: rgba(99, 102, 241, 0.7);
}
.svc-card[data-service="udrzba"]:hover .svc-card-bullets li::before {
  color: #6366f1;
  text-shadow: 0 0 8px rgba(99, 102, 241, 0.6);
}

.svc-card[data-service="it"] .svc-card-bullets li::before {
  color: rgba(245, 158, 11, 0.7);
}
.svc-card[data-service="it"]:hover .svc-card-bullets li::before {
  color: #f59e0b;
  text-shadow: 0 0 8px rgba(245, 158, 11, 0.6);
}

.svc-card[data-service="optim"] .svc-card-bullets li::before {
  color: rgba(236, 72, 153, 0.7);
}
.svc-card[data-service="optim"]:hover .svc-card-bullets li::before {
  color: #ec4899;
  text-shadow: 0 0 8px rgba(236, 72, 153, 0.6);
}

.svc-card[data-service="design"] .svc-card-bullets li::before {
  color: rgba(139, 92, 246, 0.7);
}
.svc-card[data-service="design"]:hover .svc-card-bullets li::before {
  color: #8b5cf6;
  text-shadow: 0 0 8px rgba(139, 92, 246, 0.6);
}

.svc-card[data-service="devops"] .svc-card-bullets li::before {
  color: rgba(16, 185, 129, 0.7);
}
.svc-card[data-service="devops"]:hover .svc-card-bullets li::before {
  color: #10b981;
  text-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.8rem;
  }
}

@media (max-width: 768px) {
  .services-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .svc-card {
    padding: 2rem 1.6rem;
  }
}


