/* ═══════════════════════════════════════════════
   COMPANY NAME — Corporate Tech Stylesheet
   ═══════════════════════════════════════════════ */

@property --angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

/* ── Variables ── */
:root {
  --bg:    #080810;
  --bg2:   #0d0d1e;
  --surface:  rgba(255,255,255,0.035);
  --surface2: rgba(255,255,255,0.06);
  --border:   rgba(255,255,255,0.07);
  --border-glow: rgba(99,102,241,0.45);

  --indigo: #6366f1;
  --violet: #8b5cf6;
  --blue:   #3b82f6;
  --slate:  #94a3b8;

  --grad1: linear-gradient(135deg, #6366f1, #3b82f6);
  --grad2: linear-gradient(135deg, #8b5cf6, #6366f1);
  --grad3: linear-gradient(135deg, #6366f1, #8b5cf6);

  --text:       #e2e8f0;
  --text-muted: #94a3b8;
  --text-dim:   #475569;

  --font-head: 'Orbitron', monospace;
  --font-body: 'Inter', sans-serif;

  --radius:    12px;
  --radius-lg: 20px;
  --nav-h:     72px;
  --transition: 0.35s cubic-bezier(0.4,0,0.2,1);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
  cursor: none;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img, svg { display: block; }
input, textarea, select, button { font-family: inherit; cursor: none; }

/* ── Canvas background ── */
#particles-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.35;
}

/* ── Container ── */
.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--indigo); border-radius: 4px; }

/* ══════════════════════════════════════
   LOADER
══════════════════════════════════════ */
#loader {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}
#loader.loaded { opacity: 0; visibility: hidden; }

/* ── INTRO SPLASH (click logo to enter) ── */
#splash {
  position: fixed; inset: 0; z-index: 100000;   /* above the dev ⚙ buttons (z 10000) so they're hidden here */
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);                          /* same dark base as the hero/robot */
  overflow: hidden;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}
/* blue "nebula" glow behind the logo — a plain painted layer (NO mix-blend-mode,
   which re-rendered on every mouse move and made the light flicker/brighten) */
#splash::before {
  content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(ellipse 58% 70% at 50% 46%,
    rgba(24, 82, 210, 0.18) 0%, rgba(14, 22, 74, 0.08) 48%, transparent 72%);
}
.splash-inner { position: relative; z-index: 1; opacity: 0; transition: opacity 0.7s ease; }
#splash.ready .splash-inner { opacity: 1; }
/* the site's own INITIALIZING loader sits above the intro splash and runs first */
#loader { z-index: 100002 !important; }

/* entrance animations, played once the visitor enters from the intro splash */
body.entered #navbar { animation: hdrEnter 3.5s cubic-bezier(0.23,1,0.32,1) both; }
body.entered .hero-content { animation: heroEnter 4s cubic-bezier(0.23,1,0.32,1) 0.9s both; }
/* завръщане от друга страница — без splash и без бавните входни анимации */
body.entered-instant #navbar, body.entered-instant .hero-content { animation: none; }
@keyframes hdrEnter  { from { opacity: 0; transform: translateY(-110%); } to { opacity: 1; transform: translateY(0); } }
@keyframes heroEnter { from { opacity: 0; transform: translateY(34px);  } to { opacity: 1; transform: translateY(0); } }
#splash.gone { opacity: 0; visibility: hidden; pointer-events: none; }
.splash-inner {
  position: absolute; inset: 0;                  /* канвасът е на цял екран */
  animation: splash-in 0.9s cubic-bezier(0.23,1,0.32,1) both;
}
.splash-logo { height: auto; display: block; }   /* size is set by JS (full-screen canvas) */
#splash-canvas { position: absolute; inset: 0; cursor: none; }
.splash-hint {
  position: absolute; left: 50%; bottom: 15%; transform: translateX(-50%);
  font-size: 1.1rem; letter-spacing: 0.28em; text-transform: uppercase;
  color: #8b93b8; animation: splash-pulse 1.8s ease-in-out infinite;
  white-space: nowrap;
}
.splash-logo { filter: drop-shadow(0 0 60px rgba(99,102,241,0.8)); }  /* постоянно сияние — не зависи от позицията на мишката */
@keyframes splash-float { 0%,100%{ transform: translateY(0); } 50%{ transform: translateY(-9px); } }
@keyframes splash-pulse { 0%,100%{ opacity: 0.35; } 50%{ opacity: 1; } }
@keyframes splash-in { from{ opacity: 0; transform: scale(0.94); } to{ opacity: 1; transform: scale(1); } }

.loader-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.loader-logo {
  font-family: var(--font-head);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  display: flex;
  align-items: center;
  gap: 6px;
}
.loader-label {
  background: var(--grad3);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: loader-pulse 1.2s ease-in-out infinite;
}
@keyframes loader-pulse { 0%,100%{opacity:1} 50%{opacity:0.4} }

.loader-bar-wrap { width: 260px; }
.loader-bar {
  height: 2px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  overflow: hidden;
}
.loader-progress {
  height: 100%;
  width: 0%;
  background: var(--grad1);
  border-radius: 2px;
  transition: width 0.12s ease;
  box-shadow: 0 0 10px rgba(99,102,241,0.6);
}
.loader-percent {
  font-family: var(--font-head);
  font-size: 0.72rem;
  color: var(--indigo);
  letter-spacing: 0.1em;
}
.loader-lines {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-family: var(--font-head);
  font-size: 0.62rem;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  margin-top: 6px;
}
.loader-lines span { animation: fadeUp 0.4s ease both; }
.loader-lines span:nth-child(2) { animation-delay: 0.25s; }
.loader-lines span:nth-child(3) { animation-delay: 0.6s; }

/* ══════════════════════════════════════
   SCROLL PROGRESS
══════════════════════════════════════ */
#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: var(--grad1);
  z-index: 1001;
  box-shadow: 0 0 6px rgba(99,102,241,0.5);
  pointer-events: none;
}

/* ══════════════════════════════════════
   CUSTOM CURSOR
══════════════════════════════════════ */
#cursor-ring {
  position: fixed;
  width: 34px; height: 34px;
  border: 1.5px solid rgba(99,102,241,0.55);
  border-radius: 50%;
  pointer-events: none;
  z-index: 100001;   /* above the intro splash so the custom cursor shows there too */
  top: 0; left: 0;
  transform: translate(-50%, -50%);
  transition: width 0.22s, height 0.22s, border-color 0.22s, background 0.22s;
  will-change: transform;
}
#cursor-ring.expanded {
  width: 52px; height: 52px;
  border-color: var(--indigo);
  background: rgba(99,102,241,0.06);
}
#cursor-dot {
  position: fixed;
  width: 5px; height: 5px;
  background: var(--indigo);
  border-radius: 50%;
  pointer-events: none;
  z-index: 100002;   /* above the intro splash */
  top: 0; left: 0;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 6px rgba(99,102,241,0.8);
  will-change: transform;
}

/* The custom cursor replaces the native one EVERYWHERE.
   `cursor` IS inherited, but the UA stylesheet sets cursor:pointer on links,
   text on inputs, etc. — those beat the inherited body value, so the native
   arrow kept popping back on nav links, footer links and list options.
   Hence a universal selector. The class is added by initCursor only when the
   custom cursor is actually running (not on mobile / coarse pointers).
   `:not(.show-native-cursor)` keeps the dev-panel escape hatch below working
   without an ordering fight — it makes that rule set win on specificity. */
html.custom-cursor:not(.show-native-cursor) *,
html.custom-cursor:not(.show-native-cursor) *::before,
html.custom-cursor:not(.show-native-cursor) *::after { cursor: none !important; }

/* When a dev panel is open, bring back the real mouse cursor */
html.show-native-cursor,
html.show-native-cursor * { cursor: auto !important; }
html.show-native-cursor a,
html.show-native-cursor button { cursor: pointer !important; }
html.show-native-cursor input[type=range] { cursor: ew-resize !important; }
html.show-native-cursor #cursor-ring,
html.show-native-cursor #cursor-dot { display: none !important; }

/* ══════════════════════════════════════
   NAVBAR
══════════════════════════════════════ */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-h);
  transition: background var(--transition), backdrop-filter var(--transition), border-color var(--transition);
  border-bottom: 1px solid transparent;
}
#navbar.scrolled {
  background: rgba(8,8,16,0.75);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border-color: var(--border);
}
.nav-container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 32px;
}
.logo {
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 3px;
  transition: opacity var(--transition);
}
.logo:hover { opacity: 0.75; }
.logo-bracket { color: var(--indigo); }
.logo-img {
  display: block;
  height: 34px;
  width: auto;
}
.logo-img-lg { height: 42px; }
.logo-text {
  background: var(--grad1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}
.nav-links a {
  padding: 6px 14px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: 8px;
  transition: color var(--transition), background var(--transition);
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 2px; left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 14px; height: 2px;
  background: var(--indigo);
  border-radius: 2px;
  transition: transform var(--transition);
}
.nav-links a:hover { color: var(--text); background: var(--surface); }
.nav-links a:hover::after { transform: translateX(-50%) scaleX(1); }

.nav-right { display: flex; align-items: center; gap: 12px; }

.lang-btn {
  display: flex; align-items: center; gap: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.8rem; font-weight: 600;
  cursor: none;
  transition: border-color var(--transition), background var(--transition);
  color: var(--text);
}
.lang-btn:hover { border-color: var(--indigo); background: var(--surface2); }
.lang-active   { color: var(--indigo); }
.lang-inactive { color: var(--text-dim); }
.lang-sep      { color: var(--border); }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: none;
  border: none;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.23,1,0.32,1), box-shadow var(--transition);
}
.btn::before {
  content: '';
  position: absolute; inset: 0;
  background: rgba(255,255,255,0.1);
  opacity: 0;
  transition: opacity var(--transition);
}
.btn:hover::before { opacity: 1; }

.btn-primary {
  background: var(--grad1);
  color: #fff;
  box-shadow: 0 4px 24px rgba(99,102,241,0.3);
}
.btn-primary:hover {
  box-shadow: 0 8px 40px rgba(99,102,241,0.45);
}
.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  border-color: var(--indigo);
  color: var(--indigo);
}
.btn-sm  { padding: 8px 18px; font-size: 0.82rem; }
.btn-full { width: 100%; justify-content: center; }

/* Magnetic */
.magnetic { transition: transform 0.4s cubic-bezier(0.23,1,0.32,1); }

/* Hamburger */
.hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: none; padding: 4px;
}
.hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition);
}

/* ══════════════════════════════════════
   HERO
══════════════════════════════════════ */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: var(--nav-h) 0 80px;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.hero-content {
  flex: 0 0 auto;
  width: 430px;
  padding-left: 64px;
  padding-right: 24px;
  z-index: 2;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(99,102,241,0.09);
  border: 1px solid rgba(99,102,241,0.22);
  border-radius: 100px;
  padding: 6px 16px;
  font-size: 0.8rem;
  color: var(--indigo);
  font-weight: 500;
  margin-bottom: 28px;
  animation: fadeUp 0.8s ease both;
}
.badge-dot {
  width: 7px; height: 7px;
  background: var(--indigo);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%,100% { box-shadow: 0 0 0 0 rgba(99,102,241,0.5); }
  50%      { box-shadow: 0 0 0 6px rgba(99,102,241,0); }
}

.hero-title {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  animation: fadeUp 0.8s 0.1s ease both;
}
.gradient-text {
  background: var(--grad3);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}
.typewriter-wrap {
  display: inline-flex;
  align-items: center;
  min-height: 1.2em;
}
#typewriter { color: var(--text); }
.cursor-blink {
  color: var(--indigo);
  animation: blink 0.8s step-end infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

.hero-sub {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 560px;
  margin-bottom: 36px;
  animation: fadeUp 0.8s 0.2s ease both;
  line-height: 1.75;
}
.hero-ctas {
  display: flex; gap: 14px; flex-wrap: wrap;
  margin-bottom: 36px;
  animation: fadeUp 0.8s 0.3s ease both;
}
.hero-stats {
  display: flex; align-items: center; gap: 28px;
  animation: fadeUp 0.8s 0.4s ease both;
}
.stat { display: flex; flex-direction: column; align-items: flex-start; }
.stat-num {
  font-family: var(--font-head);
  font-size: 2rem; font-weight: 700;
  color: var(--indigo); line-height: 1;
}
.stat-suffix { font-size: 1.4rem; color: var(--indigo); font-weight: 700; }
.stat-num + .stat-suffix { margin-left: 2px; }
.stat-label { font-size: 0.78rem; color: var(--text-muted); margin-top: 4px; font-weight: 500; }
.stat-divider { width: 1px; height: 40px; background: var(--border); }

/* Hero visual */
.hero-visual {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  animation: fadeIn 1.2s 0.5s ease both;
  isolation: isolate;
  -webkit-mask-image:
    linear-gradient(to right, transparent 0%, rgba(0,0,0,0.25) 22%, black 48%);
  mask-image:
    linear-gradient(to right, transparent 0%, rgba(0,0,0,0.25) 22%, black 48%);
}

/* Nebula ambient glow — screen-blend over canvas, additive blue around robot */
.hero-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 55% 70% at 68% 52%,
    rgba(0, 50, 195, 0.40) 0%,
    rgba(8, 4, 55,  0.18) 50%,
    transparent 72%
  );
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: 2;
}

@keyframes heroLogoFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}

/* Canvas — filter brightness/contrast/saturate + cyan/indigo drop-shadow */
#hero-3d,
.hero-robot {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  filter:
    brightness(0.9)
    contrast(1.1)
    saturate(1.05)
    drop-shadow(0  10px 40px rgba(0, 245, 255, 0.22))
    drop-shadow(0 -10px 60px rgba(0,  45, 200, 0.16));
}

/* Vignette + top-half darkness — sits above canvas */
.hero-robot-shade {
  position: absolute;
  inset: 0;
  background:
    /* Vignette edges — deep indigo corners */
    radial-gradient(
      ellipse at 60% 50%,
      transparent 28%,
      rgba(2, 1, 10, 0.52) 65%,
      rgba(1, 0,  6, 0.88) 100%
    ),
    /* Top-half darkening over robot head */
    linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.32)  0%,
      rgba(0, 0, 0, 0.08) 35%,
      transparent          55%
    );
  pointer-events: none;
  z-index: 3;
}

/* HUD decorations stay on top */
.hud-corner,
.hud-version,
.hud-readout { position: relative; z-index: 5; }

/* HUD brackets */
.hud-corner {
  position: absolute;
  width: 16px; height: 16px;
  z-index: 10;
  transition: width 0.3s, height 0.3s, opacity 0.3s;
}
.hero-visual:hover .hud-corner { width: 22px; height: 22px; }
.hud-tl { top:0; left:0;   border-top:  1.5px solid var(--indigo); border-left:  1.5px solid var(--indigo); }
.hud-tr { top:0; right:0;  border-top:  1.5px solid var(--indigo); border-right: 1.5px solid var(--indigo); }
.hud-bl { bottom:0; left:0;  border-bottom:1.5px solid var(--indigo); border-left: 1.5px solid var(--indigo); }
.hud-br { bottom:0; right:0; border-bottom:1.5px solid var(--indigo); border-right:1.5px solid var(--indigo); }

.hud-readout {
  position: absolute;
  bottom: -26px; left: 0; right: 0;
  display: flex; justify-content: space-between;
  font-family: var(--font-head);
  font-size: 0.58rem; color: var(--text-dim); letter-spacing: 0.08em;
}
.hud-val { color: var(--indigo); }

/* Hero title subtitle line */
.hero-title-sub {
  display: inline-flex;
  align-items: center;
  min-height: 1.2em;
  font-size: clamp(1rem, 2vw, 1.5rem);
  font-weight: 400;
  color: var(--text-muted);
  font-family: var(--font-body);
}

/* Hero gauge (circular progress) */
.hero-gauge {
  display: flex;
  align-items: center;
  gap: 14px;
  animation: fadeUp 0.8s 0.4s ease both;
}
.gauge-ring {
  position: relative;
  width: 80px;
  height: 80px;
  flex-shrink: 0;
}
.gauge-ring svg { display: block; }
.gauge-arc {
  filter: drop-shadow(0 0 5px rgba(99,102,241,0.6));
}
.gauge-value {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--indigo);
}
.gauge-label {
  font-family: var(--font-head);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  text-transform: uppercase;
  line-height: 1.5;
}

/* HUD version badge */
.hud-version {
  position: absolute;
  top: -22px;
  right: 0;
  font-family: var(--font-head);
  font-size: 0.6rem;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 8px;
  background: rgba(0,0,0,0.5);
}

/* Glitch */
.glitch { position: relative; display: inline-block; }
@keyframes glitch-anim {
  0%,100% { transform:none; filter:none; }
  20%  { transform:skew(-1.5deg); filter:hue-rotate(20deg); }
  40%  { transform:translate(2px,-1px); }
  60%  { transform:translate(-2px,1px); filter:hue-rotate(-15deg); }
  80%  { transform:skew(0.5deg); filter:none; }
}
.glitch.glitching { animation: glitch-anim 0.3s ease; }

/* ══════════════════════════════════════
   SECTIONS GENERAL
══════════════════════════════════════ */
section { position: relative; z-index: 1; padding: 100px 0; }

.section-tag {
  display: inline-block;
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--indigo); margin-bottom: 12px;
}
.section-header { text-align: center; margin-bottom: 64px; }
.section-header h2 {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700; letter-spacing: -0.02em; margin-bottom: 14px;
}
.section-header p { color: var(--text-muted); font-size: 1.05rem; }

/* ── Base reveal (fade + Y) ── */
.reveal {
  opacity: 0;
  transform: translateY(35px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── 3D card reveal (flip from X axis) ── */
.reveal-3d {
  opacity: 0;
  transform: perspective(700px) rotateX(25deg) translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.23,1,0.32,1);
}
.reveal-3d.visible { opacity: 1; transform: perspective(700px) rotateX(0deg) translateY(0); }

/* ── Slide from left ── */
.reveal-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.23,1,0.32,1);
}
.reveal-left.visible { opacity: 1; transform: translateX(0); }

/* ── Slide from right ── */
.reveal-right {
  opacity: 0;
  transform: translateX(50px);
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.23,1,0.32,1);
}
.reveal-right.visible { opacity: 1; transform: translateX(0); }

/* ── Scale up reveal ── */
.reveal-scale {
  opacity: 0;
  transform: scale(0.92) translateY(20px);
  transition: opacity 0.85s ease, transform 0.85s cubic-bezier(0.23,1,0.32,1);
}
.reveal-scale.visible { opacity: 1; transform: scale(1) translateY(0); }

@keyframes fadeUp  { from{opacity:0;transform:translateY(20px)} to{opacity:1;transform:translateY(0)} }
@keyframes fadeIn  { from{opacity:0} to{opacity:1} }

/* ══════════════════════════════════════
   SERVICES
══════════════════════════════════════ */
#services {
  padding-top: 60px;
  background:
    radial-gradient(ellipse 90% 60% at 50% 0%, rgba(99,102,241,0.08), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg2) 100%);
  overflow: hidden;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
  perspective: 1600px;
  perspective-origin: 50% 30%;
}

/* ── Holographic service module ── */
.service-card {
  --accent: #6366f1;
  --accent-soft: rgba(99,102,241,0.16);
  position: relative;
  background:
    linear-gradient(160deg, rgba(255,255,255,0.05), rgba(255,255,255,0.012));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0 0 30px;
  cursor: none;
  transform-style: preserve-3d;
  will-change: transform;
  overflow: hidden;
  isolation: isolate;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.service-card[data-svc="web"] { --accent: #6366f1; --accent-soft: rgba(99,102,241,0.16); }
.service-card[data-svc="crm"] { --accent: #8b5cf6; --accent-soft: rgba(139,92,246,0.16); }
.service-card[data-svc="erp"] { --accent: #3b82f6; --accent-soft: rgba(59,130,246,0.16); }

.service-card:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  box-shadow:
    0 30px 80px rgba(0,0,0,0.5),
    0 0 0 1px color-mix(in srgb, var(--accent) 18%, transparent),
    0 0 60px color-mix(in srgb, var(--accent) 14%, transparent);
}

/* faint tech grid inside each card */
.card-grid-bg {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(color-mix(in srgb, var(--accent) 24%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--accent) 24%, transparent) 1px, transparent 1px);
  background-size: 26px 26px;
  opacity: 0.06;
  -webkit-mask-image: radial-gradient(ellipse 75% 60% at 50% 22%, #000 0%, transparent 72%);
  mask-image: radial-gradient(ellipse 75% 60% at 50% 22%, #000 0%, transparent 72%);
  transition: opacity var(--transition);
}
.service-card:hover .card-grid-bg { opacity: 0.16; }

/* scanline sweep on hover */
.card-scan {
  position: absolute; left: 0; right: 0; top: 0; height: 26%; z-index: 1;
  pointer-events: none; opacity: 0;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 22%, transparent), transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 60%, transparent);
}
.service-card:hover .card-scan { opacity: 1; animation: card-scan 2.4s linear infinite; }
@keyframes card-scan { 0% { transform: translateY(-30%); } 100% { transform: translateY(430%); } }

/* specular highlight following the mouse (set in JS) */
.card-shine {
  position: absolute; inset: 0; border-radius: inherit;
  pointer-events: none; opacity: 0; z-index: 4;
  transition: opacity 0.3s;
}
.service-card:hover .card-shine { opacity: 1; }

/* HUD corner brackets */
.hud-c {
  position: absolute; width: 14px; height: 14px; z-index: 5;
  border: 1.5px solid color-mix(in srgb, var(--accent) 70%, transparent);
  opacity: 0; transition: opacity var(--transition), width 0.3s, height 0.3s;
}
.hud-c-tl { top: 12px; left: 12px; border-right: 0; border-bottom: 0; }
.hud-c-tr { top: 12px; right: 12px; border-left: 0; border-bottom: 0; }
.hud-c-bl { bottom: 12px; left: 12px; border-right: 0; border-top: 0; }
.hud-c-br { bottom: 12px; right: 12px; border-left: 0; border-top: 0; }
.service-card:hover .hud-c { opacity: 0.9; width: 18px; height: 18px; }

/* giant ghost number watermark */
.svc-number {
  position: absolute; top: 4px; right: 14px; z-index: 1;
  font-family: var(--font-head); font-size: 6.2rem; font-weight: 900; line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255,255,255,0.06);
  pointer-events: none; user-select: none;
  transition: -webkit-text-stroke-color var(--transition), transform 0.5s cubic-bezier(0.23,1,0.32,1);
}
.service-card:hover .svc-number {
  -webkit-text-stroke-color: color-mix(in srgb, var(--accent) 35%, transparent);
  transform: translateY(-4px);
}

/* badge */
.card-badge {
  position: absolute; top: 18px; right: 18px; z-index: 6;
  font-size: 0.64rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  border-radius: 100px; padding: 3px 11px;
  backdrop-filter: blur(4px);
}

/* ── 3D OBJECT STAGE ── */
.svc-stage {
  position: relative; z-index: 2;
  height: 200px; margin: 14px 0 4px;
  display: flex; align-items: center; justify-content: center;
  perspective: 620px;
}
.obj {
  position: relative; width: 110px; height: 110px;
  transform-style: preserve-3d;
  transition: transform 0.4s cubic-bezier(0.23,1,0.32,1);
}

/* glow puddle under each object */
.svc-stage::after {
  content: ''; position: absolute; bottom: 24px; left: 50%;
  width: 130px; height: 26px; transform: translateX(-50%);
  background: radial-gradient(ellipse, color-mix(in srgb, var(--accent) 45%, transparent), transparent 70%);
  filter: blur(8px); opacity: 0.5; z-index: 0;
  transition: opacity var(--transition);
}
.service-card:hover .svc-stage::after { opacity: 0.9; }

/* WEB — wireframe globe (rotating rings) */
.obj-globe { transform: rotateX(16deg); }
.obj-globe .ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 1.5px solid color-mix(in srgb, var(--accent) 65%, transparent);
  box-shadow: 0 0 14px color-mix(in srgb, var(--accent) 25%, transparent) inset;
}
.obj-globe .ring-1 { animation: spin-y 7s linear infinite; }
.obj-globe .ring-2 { transform: rotateY(60deg);  animation: spin-y 9s linear infinite reverse; }
.obj-globe .ring-3 { transform: rotateY(-60deg); animation: spin-y 11s linear infinite; }
.obj-globe .globe-core {
  position: absolute; top: 50%; left: 50%; width: 16px; height: 16px;
  margin: -8px 0 0 -8px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, var(--accent));
  box-shadow: 0 0 18px var(--accent);
}
.obj-globe .globe-sat {
  position: absolute; top: 50%; left: 50%; width: 8px; height: 8px;
  margin: -4px 0 0 -4px; border-radius: 50%; background: #fff;
  box-shadow: 0 0 10px #fff;
  transform-origin: 4px 4px;
  animation: sat-orbit 4s linear infinite;
}
@keyframes spin-y { to { transform: rotateY(360deg); } }
.obj-globe .ring-2 { animation-name: spin-y2; }
.obj-globe .ring-3 { animation-name: spin-y3; }
@keyframes spin-y2 { from { transform: rotateY(60deg);  } to { transform: rotateY(420deg); } }
@keyframes spin-y3 { from { transform: rotateY(-60deg); } to { transform: rotateY(300deg); } }
@keyframes sat-orbit {
  from { transform: rotate(0deg) translateX(58px) rotate(0deg); }
  to   { transform: rotate(360deg) translateX(58px) rotate(-360deg); }
}

/* CRM — GLB model on canvas */
.svc-canvas {
  position: relative; z-index: 2;
  width: 100%; height: 100%;
  display: block;
  object-fit: contain;
}

/* ── Rim light за черния монитор (WEB карта) ──
   Канвасът е прозрачен, затова drop-shadow очертава силуета на монитора,
   без да го оцветява. Мониторът остава черен, ръбът вече се чете. */
.service-card[data-svc="web"] .svc-canvas {
  filter:
    drop-shadow(0 0 1px rgba(245,166,35,0.85))
    drop-shadow(0 0 7px rgba(245,166,35,0.42))
    drop-shadow(0 6px 16px rgba(0,0,0,0.5));
  transition: filter var(--transition);
}
.service-card[data-svc="web"]:hover .svc-canvas {
  filter:
    drop-shadow(0 0 1.5px rgba(245,166,35,1))
    drop-shadow(0 0 12px rgba(245,166,35,0.55))
    drop-shadow(0 8px 20px rgba(0,0,0,0.55));
}
/* топъл спот зад монитора, за да не потъва в тъмния фон */
.service-card[data-svc="web"] .svc-stage::before {
  content: ''; position: absolute; top: 42%; left: 50%;
  width: 158px; height: 124px; transform: translate(-50%, -50%);
  background: radial-gradient(50% 46% at 50% 46%,
    rgba(245,166,35,0.18), rgba(99,102,241,0.10) 46%, transparent 72%);
  filter: blur(18px); z-index: 0; opacity: 0.9;
  pointer-events: none;
  transition: opacity var(--transition);
}
.service-card[data-svc="web"]:hover .svc-stage::before { opacity: 1; }

/* ── Glow за CRM иконата (виолетов, в тона на картата) ── */
.service-card[data-svc="crm"] .svc-canvas {
  filter:
    drop-shadow(0 0 1px rgba(139,92,246,0.85))
    drop-shadow(0 0 8px rgba(139,92,246,0.45))
    drop-shadow(0 6px 16px rgba(0,0,0,0.5));
  transition: filter var(--transition);
}
.service-card[data-svc="crm"]:hover .svc-canvas {
  filter:
    drop-shadow(0 0 1.5px rgba(139,92,246,1))
    drop-shadow(0 0 14px rgba(139,92,246,0.6))
    drop-shadow(0 8px 20px rgba(0,0,0,0.55));
}
.service-card[data-svc="crm"] .svc-stage::before {
  content: ''; position: absolute; top: 44%; left: 50%;
  width: 180px; height: 150px; transform: translate(-50%, -50%);
  background: radial-gradient(50% 46% at 50% 46%,
    rgba(139,92,246,0.20), rgba(99,102,241,0.10) 48%, transparent 74%);
  filter: blur(20px); z-index: 0; opacity: 0.9;
  pointer-events: none;
  transition: opacity var(--transition);
}
.service-card[data-svc="crm"]:hover .svc-stage::before { opacity: 1; }

/* CRM — orbiting nodes around a core (legacy CSS object) */
.obj-orbit { transform: rotateX(60deg); }
.obj-orbit .node-core {
  position: absolute; top: 50%; left: 50%; width: 18px; height: 18px;
  margin: -9px 0 0 -9px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, var(--accent));
  box-shadow: 0 0 22px var(--accent);
  transform: rotateX(-60deg);
}
.obj-orbit .orbit {
  position: absolute; inset: 0; border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
}
.obj-orbit .orbit-1 { inset: 6px;  animation: spin-z 4.5s linear infinite; }
.obj-orbit .orbit-2 { inset: 26px; animation: spin-z 3s linear infinite reverse; }
.obj-orbit .orbit-3 { inset: 44px; animation: spin-z 6s linear infinite; }
.obj-orbit .node {
  position: absolute; top: -5px; left: 50%; width: 10px; height: 10px;
  margin-left: -5px; border-radius: 50%; background: #fff;
  box-shadow: 0 0 12px var(--accent), 0 0 4px #fff;
}
@keyframes spin-z { to { transform: rotate(360deg); } }

/* ERP — rotating data cube */
.obj-cube { transform: rotateX(-18deg); }
.obj-cube .cube {
  position: absolute; top: 50%; left: 50%; width: 72px; height: 72px;
  margin: -36px 0 0 -36px;
  transform-style: preserve-3d;
  animation: cube-spin 11s linear infinite;
}
.obj-cube .face {
  position: absolute; width: 72px; height: 72px;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 60%, transparent);
  box-shadow: 0 0 22px color-mix(in srgb, var(--accent) 18%, transparent) inset;
  background-image:
    linear-gradient(color-mix(in srgb, var(--accent) 30%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--accent) 30%, transparent) 1px, transparent 1px);
  background-size: 18px 18px;
}
.obj-cube .f-front  { transform: translateZ(36px); }
.obj-cube .f-back   { transform: rotateY(180deg) translateZ(36px); }
.obj-cube .f-right  { transform: rotateY(90deg)  translateZ(36px); }
.obj-cube .f-left   { transform: rotateY(-90deg) translateZ(36px); }
.obj-cube .f-top    { transform: rotateX(90deg)  translateZ(36px); }
.obj-cube .f-bottom { transform: rotateX(-90deg) translateZ(36px); }
@keyframes cube-spin {
  from { transform: rotateX(-20deg) rotateY(0deg); }
  to   { transform: rotateX(-20deg) rotateY(360deg); }
}

/* ── CARD BODY ── */
.svc-body { position: relative; z-index: 3; padding: 0 30px; }
.svc-kicker {
  display: inline-block; font-size: 0.66rem; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 8px; opacity: 0.85;
}
.service-card h3 {
  font-family: var(--font-head); font-size: 1.2rem; font-weight: 700;
  margin-bottom: 12px; letter-spacing: -0.01em;
  transition: color var(--transition);
}
.service-card:hover h3 { color: var(--accent); }
.service-card p {
  font-size: 0.9rem; color: var(--text-muted);
  margin-bottom: 22px; line-height: 1.7;
}
.service-features {
  margin-bottom: 26px;
  display: flex; flex-direction: column; gap: 9px;
  padding-top: 18px; border-top: 1px solid var(--border);
}
.service-features li {
  font-size: 0.83rem; color: var(--text-muted);
  padding-left: 18px; position: relative;
  transition: color var(--transition), transform 0.3s ease;
}
.service-features li::before {
  content: '▸'; position: absolute; left: 0;
  color: var(--accent); font-size: 0.7rem;
}
.service-card:hover .service-features li {
  transform: translateX(3px);
  color: rgba(226,232,240,0.8);
}
.card-cta {
  font-size: 0.84rem; font-weight: 600; color: var(--accent);
  transition: letter-spacing var(--transition); display: inline-flex; gap: 4px;
  position: relative; z-index: 3;
}
.card-cta:hover { letter-spacing: 0.04em; }

/* Featured card — animated conic border, content stays dark + readable */
.service-card--featured {
  background:
    linear-gradient(160deg, rgba(139,92,246,0.10), rgba(99,102,241,0.03));
  border-color: color-mix(in srgb, var(--accent) 30%, transparent);
}
.service-card--featured::after {
  content: '';
  position: absolute; inset: 0; z-index: 5; pointer-events: none;
  border-radius: inherit;
  padding: 1.5px;
  background: conic-gradient(from var(--angle), #6366f1, #8b5cf6, #3b82f6, #6366f1);
  -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, linear-gradient(#000 0 0);
          mask-composite: exclude;
  animation: border-rotate 6s linear infinite;
  opacity: 0.6; transition: opacity var(--transition);
}
.service-card--featured:hover::after { opacity: 1; }
@keyframes border-rotate { to { --angle: 360deg; } }

/* ══════════════════════════════════════
   TECH MARQUEE
══════════════════════════════════════ */
#tech {
  padding: 26px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.tech-marquee {
  overflow: hidden;
  /* лек тъмен fade в двата края, за да не се "отрязват" думите рязко;
     маската изтрива към прозрачно, така че фонът на секцията прозира */
  --fade: 12%;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 var(--fade), #000 calc(100% - var(--fade)), transparent);
          mask-image: linear-gradient(90deg, transparent, #000 var(--fade), #000 calc(100% - var(--fade)), transparent);
}
.marquee-track {
  display: flex; gap: var(--marquee-gap, 48px);
  animation: marquee 32s linear infinite;
  white-space: nowrap; width: max-content;
}
.marquee-track span {
  font-family: var(--font-head); font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.1em; color: var(--text-dim); text-transform: uppercase;
  transition: color var(--transition);
}
.marquee-track span:hover { color: var(--indigo); }
/* Списъкът е дублиран, но -50% НЕ е точната точка на повторение: половината
   ширина включва и половин gap повече, отколкото има между двата комплекта.
   Затова цикълът се затваряше с лек подскок — оттук идва корекцията. */
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(calc(-50% - var(--marquee-gap, 48px) / 2)); }
}

/* ══════════════════════════════════════
   ABOUT
══════════════════════════════════════ */
#about { background: var(--bg2); }
.about-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 80px; align-items: start;
}
/* margin-top drops the stack past the "ЗА НАС" kicker so its top lines up with
   the "Технология с характер" heading */
.about-card-stack { position: relative; height: 470px; margin-top: 32px; perspective: 900px; }

.acard {
  position: absolute;
  display: flex; align-items: center; gap: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 30px; width: 390px;
  transition: transform 0.4s cubic-bezier(0.23,1,0.32,1),
              box-shadow var(--transition), border-color var(--transition);
  cursor: none; backdrop-filter: blur(6px);
}
.acard:hover {
  transform: translateY(-5px) scale(1.02) rotateX(3deg);
  box-shadow: 0 18px 45px rgba(0,0,0,0.45);
  border-color: rgba(99,102,241,0.3); z-index: 10;
}
.acard-1 { top: 0;     left: 0;   z-index: 3; }
.acard-2 { top: 160px; left: 72px; z-index: 2; border-color: rgba(99,102,241,0.15); }
.acard-3 { top: 320px; left: 24px; z-index: 1; }

.acard-icon {
  width: 66px; height: 66px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  color: var(--indigo);
}
.acard-icon svg { width: 26px; height: 26px; }
/* 3D GLB icon — the canvas fills the slot, model is fitted by the renderer */
.acard-canvas { width: 100%; height: 100%; display: block; }
.acard-title { font-weight: 700; font-size: 1.12rem; margin-bottom: 3px; }
.acard-sub   { font-size: 0.9rem; color: var(--text-muted); }

.about-text h2 {
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700; letter-spacing: -0.02em; margin-bottom: 18px;
}
.about-text p { color: var(--text-muted); margin-bottom: 16px; font-size: 0.97rem; line-height: 1.75; }
.about-values { margin-top: 28px; display: flex; flex-direction: column; gap: 16px; }
.value-item {
  display: flex; align-items: flex-start; gap: 14px;
  transition: transform var(--transition);
}
.value-item:hover { transform: translateX(6px); }
.value-icon { color: var(--indigo); font-size: 0.8rem; margin-top: 3px; flex-shrink: 0; }
.value-item strong { display: block; font-size: 0.9rem; margin-bottom: 2px; }
.value-item span   { font-size: 0.82rem; color: var(--text-muted); }

/* ══════════════════════════════════════
   PORTFOLIO
══════════════════════════════════════ */
#portfolio { background: var(--bg); padding-bottom: 40px; }
.portfolio-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 24px; perspective: 1400px;
}
.portfolio-item { border-radius: var(--radius-lg); overflow: hidden; cursor: none; }
.portfolio-inner {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: border-color var(--transition),
              transform 0.45s cubic-bezier(0.23,1,0.32,1),
              box-shadow var(--transition);
  will-change: transform;
}
.portfolio-item:hover .portfolio-inner {
  border-color: rgba(99,102,241,0.3);
  transform: translateY(-8px) rotateX(4deg);
  box-shadow: 0 28px 70px rgba(0,0,0,0.5);
}
.portfolio-img {
  overflow: hidden; position: relative;
  aspect-ratio: 16 / 10; background: #0a0a1e;
}
.pf-cover {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  display: block;
  transition: transform 0.5s ease;
}
.portfolio-item:hover .pf-cover { transform: scale(1.05); }
/* Scan line on hover */
.portfolio-img::after {
  content: ''; position: absolute; left: 0; right: 0; top: -4px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--indigo), transparent);
  opacity: 0; transition: opacity 0.3s;
  animation: scan 2.5s linear infinite paused;
  z-index: 2; pointer-events: none;
}
.portfolio-item:hover .portfolio-img::after {
  opacity: 1;
  animation-play-state: running;
}
@keyframes scan { 0%{top:-4px} 100%{top:102%} }
/* Hover overlay */
.pf-overlay {
  position: absolute; inset: 0; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  background: rgba(8,8,16,0.35);
  opacity: 0; transition: opacity var(--transition);
}
.portfolio-item:hover .pf-overlay { opacity: 1; }
.pf-view {
  font-family: var(--font-head); font-size: 0.7rem;
  letter-spacing: 0.18em; text-transform: uppercase; color: #fff;
  padding: 10px 20px; border: 1px solid rgba(255,255,255,0.35);
  border-radius: 999px; background: rgba(8,8,16,0.45);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.portfolio-info { padding: 20px; position: relative; }
.pf-num {
  position: absolute; right: 20px; top: 50%; transform: translateY(-50%);
  font-family: var(--font-head); font-size: 0.8rem; color: var(--text-dim);
}
.pf-more { display: none; }
/* големи десктоп монитори: 4 колони и още 2 проекта (общо 8 = 2 пълни реда).
   Лаптопите (вкл. 1920px при 125% scaling ≈ 1536px CSS) остават на 3 колони с 6 видеа */
@media (min-width: 1900px) {
  .portfolio-grid { grid-template-columns: repeat(4, 1fr); }
  .portfolio-grid > .portfolio-item:nth-child(7),
  .portfolio-grid > .portfolio-item:nth-child(8) { display: block; }
  /* на широки монитори съдържанието диша — не стои сбито в центъра */
  .container, .nav-container { max-width: 1560px; }
  .services-grid  { gap: 64px; }
  .portfolio-grid { gap: 52px; }
  .process-grid   { gap: 44px; }
}
.pf-more-wrap { text-align: center; margin-top: 40px; }
.portfolio-tag {
  display: inline-block; font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--indigo); margin-bottom: 6px;
}
.portfolio-info h4 {
  font-family: var(--font-head); font-size: 0.95rem; font-weight: 600;
  transition: color var(--transition);
}
.portfolio-item:hover .portfolio-info h4 { color: var(--indigo); }

/* ══════════════════════════════════════
   PORTFOLIO PAGE (portfolio.html)
══════════════════════════════════════ */
.page-portfolio { background: var(--bg); }
.pf-page-hero {
  position: relative; z-index: 1;
  padding: calc(var(--nav-h) + 72px) 0 40px;
  text-align: center;
}
.pf-page-hero::after {
  content: ''; position: absolute; left: 50%; bottom: 0;
  transform: translateX(-50%);
  width: 200px; height: 1px; background: var(--grad1); opacity: 0.6;
}
.pf-back {
  display: block; width: fit-content; margin: 0 auto 26px;
  font-size: 0.82rem; color: var(--text-muted);
  letter-spacing: 0.04em;
  transition: color var(--transition), transform var(--transition);
}
.pf-back:hover { color: var(--indigo); transform: translateX(-4px); }
.pf-page-title {
  font-family: var(--font-head);
  font-size: clamp(2.4rem, 7vw, 4.6rem);
  font-weight: 900; letter-spacing: -0.02em; line-height: 1.02;
  margin: 6px 0 18px;
  background: linear-gradient(120deg, #fff 20%, var(--violet) 55%, var(--indigo) 90%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.pf-page-sub {
  max-width: 640px; margin: 0 auto;
  color: var(--text-muted); font-size: 1.05rem; line-height: 1.7;
}
.pf-page-stats {
  display: flex; justify-content: center; gap: 48px;
  margin-top: 38px; flex-wrap: wrap;
}
.pf-stat { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.pf-stat b {
  font-family: var(--font-head); font-size: 1.9rem; font-weight: 700;
  background: var(--grad1); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.pf-stat span {
  font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-dim);
}

.pf-page-section { position: relative; z-index: 1; padding: 40px 0 100px; }

/* filter chips */
.pf-filters {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;
  margin-bottom: 44px;
}
.pf-chip {
  font-family: var(--font-body);
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.02em;
  color: var(--text-muted);
  padding: 9px 18px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border);
  cursor: none;
  transition: color var(--transition), border-color var(--transition),
              background var(--transition), transform var(--transition);
}
.pf-chip:hover { color: var(--text); border-color: rgba(99,102,241,0.4); transform: translateY(-2px); }
.pf-chip.active {
  color: #fff; border-color: transparent;
  background: var(--grad1);
  box-shadow: 0 8px 24px rgba(99,102,241,0.28);
}

/* full-page responsive grid */
.pf-page-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px; perspective: 1400px;
}
.pf-page-grid .portfolio-item.pf-hidden { display: none; }

/* ── Portfolio lightbox ── */
body.plb-open { overflow: hidden; }
.plb {
  position: fixed; inset: 0; z-index: 5000;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.4s ease;
}
.plb[aria-hidden="false"] { opacity: 1; pointer-events: auto; }
.plb-backdrop {
  position: absolute; inset: 0;
  background: rgba(5,5,12,0.8);
  backdrop-filter: blur(14px) saturate(130%);
  -webkit-backdrop-filter: blur(14px) saturate(130%);
}
.plb-panel {
  position: relative;
  width: 100%; max-width: 1080px; max-height: 92svh;
  display: flex; flex-direction: column;
  border-radius: var(--radius-lg);
  background: var(--bg2);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: 0 40px 120px rgba(0,0,0,0.6), 0 0 80px rgba(99,102,241,0.12);
  transform: translateY(24px) scale(0.97); opacity: 0;
  transition: transform 0.5s cubic-bezier(0.23,1,0.32,1), opacity 0.4s ease;
}
.plb[aria-hidden="false"] .plb-panel { transform: none; opacity: 1; }
.plb-close {
  position: absolute; top: 12px; right: 12px; z-index: 6;
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(8,8,16,0.6); color: var(--text);
  font-size: 1.4rem; line-height: 1;
  transition: transform var(--transition), border-color var(--transition);
}
.plb-close:hover { transform: rotate(90deg); border-color: var(--border-glow); }
.plb-stage {
  position: relative; width: 100%;
  aspect-ratio: 16 / 10; max-height: 66svh;
  background: #050508; overflow: hidden;
  touch-action: pan-y pinch-zoom;
  user-select: none; -webkit-user-select: none;
}
.plb-track {
  display: flex; height: 100%;
  will-change: transform;
  transition: transform 0.6s cubic-bezier(0.23,1,0.32,1);
}
.plb-track.no-transition { transition: none; }
.plb-slide {
  flex: 0 0 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
}
.plb-slide img, .plb-slide video {
  width: 100%; height: 100%;
  object-fit: contain;
  pointer-events: none; -webkit-user-drag: none;
}
.plb-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(8,8,16,0.55); color: var(--text);
  font-size: 1.5rem; line-height: 1;
  opacity: 0;
  transition: opacity var(--transition), border-color var(--transition), background var(--transition);
}
.plb-stage:hover .plb-arrow { opacity: 1; }
.plb-arrow:hover { border-color: var(--border-glow); background: rgba(99,102,241,0.2); }
.plb-arrow-prev { left: 14px; }
.plb-arrow-next { right: 14px; }
.plb-progress {
  position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: rgba(255,255,255,0.08); z-index: 4;
  transition: opacity 0.25s;
}
.plb-progress.hidden { opacity: 0; }
.plb-progress span { display: block; height: 100%; width: 0%; background: var(--grad1); }
.plb-dots {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%);
  display: flex; gap: 6px; z-index: 5;
  padding: 7px 11px; border-radius: 999px;
  background: rgba(8,8,16,0.5);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.plb-dot {
  width: 7px; height: 7px; border-radius: 4px;
  background: rgba(255,255,255,0.25);
  transition: width 0.35s cubic-bezier(0.23,1,0.32,1), background 0.35s;
}
.plb-dot.active { width: 24px; background: var(--indigo); }
.plb-meta {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 20px;
  border-top: 1px solid var(--border);
}
.plb-num { font-family: var(--font-head); font-size: 1.05rem; color: var(--indigo); }
.plb-titles { flex: 1; min-width: 0; }
.plb-tag {
  display: block; font-size: 0.66rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 2px;
}
.plb-name { font-family: var(--font-head); font-size: 0.98rem; font-weight: 600; }
.plb-count { font-family: var(--font-head); font-size: 0.78rem; color: var(--text-dim); }
@media (max-width: 768px) {
  .plb { padding: 10px; }
  .plb-stage { aspect-ratio: 4 / 3; }
  .plb-arrow { display: none; }
  .plb-meta { padding: 12px 14px; gap: 10px; }
}

/* ══════════════════════════════════════
   CONTACT
══════════════════════════════════════ */
#contact { background: linear-gradient(180deg, var(--bg2) 0%, var(--bg) 100%); }
.contact-grid {
  display: grid; grid-template-columns: 1fr 1.4fr;
  gap: 80px; align-items: start;
}
.contact-info h2 {
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700; letter-spacing: -0.02em; margin-bottom: 16px;
}
.contact-info p { color: var(--text-muted); margin-bottom: 32px; line-height: 1.7; }
.contact-details { display: flex; flex-direction: column; gap: 14px; }
.contact-item {
  display: flex; align-items: center; gap: 14px;
  font-size: 0.9rem; color: var(--text-muted);
  transition: color var(--transition), transform var(--transition);
}
.contact-item:hover { transform: translateX(5px); color: var(--text); }
/* имейлът и телефонът са линкове — да наследяват цвета вместо синьото по подразбиране */
.contact-item a { color: inherit; text-decoration: none; }
.ci-icon {
  width: 36px; height: 36px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; color: var(--indigo);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.ci-icon svg { width: 15px; height: 15px; }
.contact-item:hover .ci-icon {
  border-color: rgba(99,102,241,0.4);
  box-shadow: 0 0 14px rgba(99,102,241,0.15);
}
.contact-form-wrap {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 40px;
  backdrop-filter: blur(10px);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.contact-form-wrap:focus-within {
  border-color: rgba(99,102,241,0.2);
  box-shadow: 0 0 40px rgba(99,102,241,0.04);
}
.contact-form { display: flex; flex-direction: column; gap: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
/* телефонът има фиксирана нужда от място (код + номер), бизнесът печели остатъка */
.form-row.row-phone { grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr); }
/* без min-width:0 grid колоните не могат да се свият под ширината на input-а
   и fr стойностите горе се игнорират */
.form-row > .form-group { min-width: 0; }
/* 110px е горе-долу десетцифрен номер — под това става нечетимо */
.phone-field { min-width: 0; }
.phone-field .phone-num { min-width: 125px; flex: 1 1 auto; }
.form-group { display: flex; flex-direction: column; gap: 8px; position: relative; }

/* ── phone field: country flag + dial code + number ── */
.phone-field { position: relative; display: flex; align-items: stretch; gap: 8px; }
.phone-pick {
  display: flex; align-items: center; gap: 7px; flex-shrink: 0;
  padding: 0 11px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text); font-size: 0.9rem;
  transition: border-color var(--transition), background var(--transition);
}
.phone-pick:hover,
.phone-field.open .phone-pick { border-color: var(--indigo); background: var(--surface2); }
.phone-pick svg { width: 14px; height: 14px; color: var(--text-dim); transition: transform var(--transition); }
.phone-field.open .phone-pick svg { transform: rotate(180deg); color: var(--indigo); }
.phone-flag {
  width: 21px; height: 15px; object-fit: cover;
  border-radius: 2px; box-shadow: 0 0 0 1px rgba(255,255,255,0.12);
}
.phone-dial { font-variant-numeric: tabular-nums; }
.phone-num { flex: 1; min-width: 0; }

.phone-drop {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 30;
  padding: 8px;
  background: #0a0a16; border: 1px solid var(--border);
  border-radius: 12px; box-shadow: 0 18px 40px rgba(0,0,0,0.6);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
}
.phone-field.open .phone-drop { opacity: 1; visibility: visible; transform: translateY(0); }
.phone-search { width: 100%; margin-bottom: 6px; font-size: 0.85rem !important; padding: 9px 12px !important; }
.phone-list { max-height: 220px; overflow-y: auto; }
.phone-list li {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 7px;
  font-size: 0.86rem; color: var(--text);
  transition: background var(--transition);
}
.phone-list li:hover,
.phone-list li.active { background: rgba(99,102,241,0.16); }
.phone-list li[hidden] { display: none; }
.phone-list li img { width: 21px; height: 15px; object-fit: cover; border-radius: 2px; flex-shrink: 0; box-shadow: 0 0 0 1px rgba(255,255,255,0.12); }
.phone-list li .pl-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.phone-list li .pl-dial { color: var(--text-muted); font-variant-numeric: tabular-nums; }
.phone-list::-webkit-scrollbar { width: 8px; }
.phone-list::-webkit-scrollbar-track { background: transparent; }
.phone-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 4px; }

/* ── validation bubble (replaces the unstylable native one) ── */
.form-group input.invalid,
.form-group textarea.invalid { border-color: rgba(239,68,68,0.6); box-shadow: 0 0 0 3px rgba(239,68,68,0.12); }
.field-error {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 25;
  max-width: 100%; padding: 9px 13px 9px 34px;
  background: #0a0a16; border: 1px solid rgba(239,68,68,0.45);
  border-radius: 10px; box-shadow: 0 12px 30px rgba(0,0,0,0.6);
  font-size: 0.76rem; font-weight: 500; line-height: 1.45; color: #fecaca;
  opacity: 0; transform: translateY(-5px);
  transition: opacity var(--transition), transform var(--transition);
}
.field-error.show { opacity: 1; transform: translateY(0); }
.field-error::before {
  content: '!'; position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  display: grid; place-items: center;
  width: 15px; height: 15px; border-radius: 50%;
  background: #ef4444; color: #fff;
  font-size: 0.65rem; font-weight: 800; line-height: 1;
}
/* pointer up toward the field it belongs to */
.field-error::after {
  content: ''; position: absolute; bottom: 100%; left: 18px;
  margin-bottom: -4px; width: 8px; height: 8px;
  background: #0a0a16;
  border-left: 1px solid rgba(239,68,68,0.45); border-top: 1px solid rgba(239,68,68,0.45);
  transform: rotate(45deg);
}
.form-group label { font-size: 0.8rem; font-weight: 600; color: var(--text-muted); }

/* ── field help: "?" bubble next to a label, toggled by click ── */
.label-with-help { display: flex; align-items: center; gap: 7px; }
.field-help { position: relative; display: inline-flex; }
.field-help-btn {
  display: grid; place-items: center;
  width: 16px; height: 16px; padding: 0;
  background: none; border: none; cursor: none;
  color: var(--text-dim); transition: color var(--transition), transform var(--transition);
}
.field-help-btn svg { width: 16px; height: 16px; }
.field-help-btn:hover,
.field-help[data-open] .field-help-btn { color: var(--indigo); transform: scale(1.12); }

.field-help-bubble {
  position: absolute; left: 50%; bottom: calc(100% + 10px);
  transform: translate(-50%, 4px);
  width: max-content; max-width: 260px;
  padding: 10px 13px;
  /* opaque, NOT var(--surface) — that token is a translucent white film, so
     whatever sits behind the bubble bleeds through and kills readability */
  background: #0a0a16; border: 1px solid rgba(255,255,255,0.14);
  border-radius: 10px; box-shadow: 0 14px 34px rgba(0,0,0,0.65);
  font-size: 0.76rem; font-weight: 400; line-height: 1.5;
  color: var(--text); text-align: left;
  opacity: 0; visibility: hidden; pointer-events: none; z-index: 20;
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
}
.field-help[data-open] .field-help-bubble {
  opacity: 1; visibility: visible; transform: translate(-50%, 0);
}
/* little pointer under the bubble */
.field-help-bubble::after {
  content: ''; position: absolute; top: 100%; left: 50%;
  margin: -4px 0 0 -4px; width: 8px; height: 8px;
  background: #0a0a16;
  border-right: 1px solid rgba(255,255,255,0.14); border-bottom: 1px solid rgba(255,255,255,0.14);
  transform: rotate(45deg);
}
/* narrow screens: pin to the left edge so it can't overflow the card */
@media (max-width: 560px) {
  .field-help-bubble { left: 0; transform: translate(0, 4px); max-width: 70vw; }
  .field-help[data-open] .field-help-bubble { transform: translate(0, 0); }
  .field-help-bubble::after { left: 12px; }
}
.form-group input,
.form-group select,
.form-group textarea {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 16px; color: var(--text); font-size: 0.9rem;
  outline: none; resize: none; -webkit-appearance: none;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--indigo);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
  background: rgba(99,102,241,0.03);
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-dim); }
select option { background: #0d0d1a; }

/* ── Combobox: текстово поле със стилизиран падащ списък ── */
.combo { position: relative; display: flex; flex-direction: column; }
.combo input { width: 100%; padding-right: 40px; }
.combo-arrow {
  position: absolute; right: 14px; top: 50%; width: 16px; height: 16px;
  transform: translateY(-50%); pointer-events: none;
  color: var(--text-dim); transition: transform var(--transition), color var(--transition);
}
.combo.open .combo-arrow { transform: translateY(-50%) rotate(180deg); color: var(--indigo); }

.combo-list {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 30;
  margin: 0; padding: 6px; list-style: none;
  max-height: 232px; overflow-y: auto;
  background: #12122a;
  border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(99,102,241,0.08);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
}
.combo.open .combo-list { opacity: 1; visibility: visible; transform: translateY(0); }

.combo-list li {
  padding: 10px 12px; border-radius: 7px; cursor: pointer;
  font-size: 0.88rem; color: var(--text);
  transition: background var(--transition), color var(--transition);
}
.combo-list li:hover,
.combo-list li.active {
  background: rgba(99,102,241,0.12); color: var(--text);
}
.combo-list li[hidden] { display: none; }

.combo-list::-webkit-scrollbar { width: 8px; }
.combo-list::-webkit-scrollbar-track { background: transparent; }
.combo-list::-webkit-scrollbar-thumb {
  background: rgba(99,102,241,0.3); border-radius: 4px;
}

/* ══════════════════════════════════════
   FOOTER
══════════════════════════════════════ */
#footer {
  padding: 72px 0 32px;
  border-top: 1px solid var(--border);
  position: relative;
  background: linear-gradient(180deg, var(--bg) 0%, #0b0b1a 100%);
}
#footer::before {
  content: '';
  position: absolute; top: 0; left: 50%;
  transform: translateX(-50%);
  width: 160px; height: 1px;
  background: var(--grad1);
}
.footer-top { display: flex; gap: 80px; margin-bottom: 48px; align-items: center; }
.footer-brand { flex: 0 0 260px; }
.footer-brand p { color: var(--text-muted); font-size: 0.88rem; margin-top: 4px; }
/* Animated Cortexa logo (moved here from the hero) — the webp frame is 702×702
   with the emblem+wordmark in the middle ~third, so a fixed window clips the
   transparent padding and the oversized img zooms the visible logo */
.footer-logo-wrap {
  display: block; position: relative;
  width: 170px; height: 200px;
  overflow: hidden;
  animation: heroLogoFloat 6s ease-in-out infinite;
}
.footer-logo-3d {
  position: absolute; left: 50%; top: 50%;
  width: 540px; height: 540px; max-width: none;
  transform: translate(-50%, -50%);
  pointer-events: none;
  /* the webp frame has its own near-black background — screen blending drops it
     so the logo sits directly on the footer gradient, no visible rectangle */
  mix-blend-mode: screen;
}
.footer-links { display: flex; gap: 80px; flex: 1; }
.footer-col h5 {
  font-family: var(--font-head); font-size: 0.68rem;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-dim); margin-bottom: 16px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col a {
  font-size: 0.88rem; color: var(--text-muted);
  transition: color var(--transition), transform var(--transition);
  display: inline-block;
}
.footer-col a:hover { color: var(--indigo); transform: translateX(4px); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 24px; border-top: 1px solid var(--border);
  font-size: 0.82rem; color: var(--text-dim);
}
.footer-socials { display: flex; gap: 10px; }
.footer-socials a {
  width: 34px; height: 34px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700; color: var(--text-muted);
  transition: border-color var(--transition), color var(--transition), transform var(--transition);
}
.footer-socials a:hover {
  border-color: var(--indigo); color: var(--indigo);
  transform: translateY(-3px);
}

/* ══════════════════════════════════════
   STATS BAND
══════════════════════════════════════ */
#stats { padding: 64px 0; background: var(--bg); }
.stats-band {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  background: linear-gradient(135deg, rgba(99,102,241,0.06), rgba(139,92,246,0.03));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  position: relative; overflow: hidden;
}
.stats-band::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 120% at 50% -20%, rgba(99,102,241,0.12), transparent 70%);
  pointer-events: none;
}
.stat-cell {
  text-align: center; position: relative;
}
.stat-cell:not(:last-child)::after {
  content: ''; position: absolute; right: -12px; top: 50%;
  transform: translateY(-50%); width: 1px; height: 46px;
  background: var(--border);
}
.stat-num, .stat-static {
  display: inline-block;
  font-family: var(--font-head); font-weight: 900;
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  line-height: 1;
  background: var(--grad3);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  display: inline-block;
}
.stat-plus {
  font-family: var(--font-head); font-weight: 900;
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  color: var(--violet); margin-left: 1px; vertical-align: top;
}
.stat-cap {
  display: block;
  margin-top: 10px; font-size: 0.82rem; color: var(--text-muted);
  letter-spacing: 0.02em;
}

/* ══════════════════════════════════════
   PROCESS
══════════════════════════════════════ */
#process { background: var(--bg2); }
.process-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 20px; perspective: 1400px;
}
.process-step {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 26px 28px;
  overflow: hidden;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.process-step::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--grad1);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.5s cubic-bezier(0.23,1,0.32,1);
}
.process-step:hover {
  border-color: rgba(99,102,241,0.3);
  transform: translateY(-6px);
  box-shadow: 0 24px 60px rgba(0,0,0,0.4);
}
.process-step:hover::before { transform: scaleX(1); }
.step-num {
  font-family: var(--font-head); font-size: 2.4rem; font-weight: 900;
  color: transparent; -webkit-text-stroke: 1px rgba(99,102,241,0.4);
  margin-bottom: 16px; line-height: 1;
  transition: -webkit-text-stroke-color var(--transition);
}
.process-step:hover .step-num { -webkit-text-stroke-color: var(--indigo); }
.process-step h3 {
  font-family: var(--font-head); font-size: 1.05rem; font-weight: 700;
  margin-bottom: 10px; letter-spacing: -0.01em;
}
.process-step p { font-size: 0.86rem; color: var(--text-muted); line-height: 1.65; }

/* ══════════════════════════════════════
   TESTIMONIALS
══════════════════════════════════════ */
#testimonials { background: var(--bg); }
.testimonial-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.testimonial {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px 28px;
  display: flex; flex-direction: column; gap: 18px;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.testimonial:hover {
  border-color: rgba(99,102,241,0.3);
  transform: translateY(-5px);
  box-shadow: 0 22px 55px rgba(0,0,0,0.4);
}
.t-stars { color: #fbbf24; letter-spacing: 2px; font-size: 0.95rem; }
.testimonial blockquote {
  font-size: 0.95rem; color: var(--text); line-height: 1.7; font-style: italic;
  flex: 1;
}
.testimonial figcaption { display: flex; align-items: center; gap: 12px; }
.t-avatar {
  width: 42px; height: 42px; flex-shrink: 0;
  border-radius: 50%;
  background: var(--grad2);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-size: 0.78rem; font-weight: 700; color: #fff;
}
.t-meta { display: flex; flex-direction: column; line-height: 1.4; }
.t-meta strong { font-size: 0.9rem; }
.t-meta span { font-size: 0.78rem; color: var(--text-muted); }

/* ══════════════════════════════════════
   FAQ
══════════════════════════════════════ */
#faq { background: var(--bg2); }
.faq-list { max-width: 780px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition), background var(--transition);
}
.faq-item:hover { border-color: rgba(99,102,241,0.25); }
.faq-item.open { border-color: rgba(99,102,241,0.4); background: var(--surface2); }
.faq-q {
  width: 100%; background: none; border: none; cursor: none;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 22px; text-align: left;
  font-family: var(--font-body); font-size: 0.98rem; font-weight: 600; color: var(--text);
}
.faq-icon {
  position: relative; width: 16px; height: 16px; flex-shrink: 0;
}
.faq-icon::before, .faq-icon::after {
  content: ''; position: absolute; top: 50%; left: 50%;
  width: 12px; height: 2px; background: var(--indigo); border-radius: 2px;
  transform: translate(-50%, -50%);
  transition: transform var(--transition);
}
.faq-icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq-item.open .faq-icon::after { transform: translate(-50%, -50%) rotate(0deg); }
.faq-a {
  max-height: 0; overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4,0,0.2,1);
}
.faq-item.open .faq-a { max-height: 240px; }
.faq-a p {
  padding: 0 22px 22px; font-size: 0.9rem; color: var(--text-muted); line-height: 1.7;
}

/* ══════════════════════════════════════
   ACCESSIBILITY — focus visible
══════════════════════════════════════ */
:focus-visible {
  outline: 2px solid var(--indigo);
  outline-offset: 3px;
  border-radius: 4px;
}
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--indigo);
  outline-offset: 3px;
}
.btn:focus-visible { outline-offset: 4px; }
.skip-link {
  position: fixed; top: -60px; left: 16px; z-index: 10000;
  background: var(--indigo); color: #fff;
  padding: 10px 18px; border-radius: 8px; font-size: 0.85rem; font-weight: 600;
  transition: top 0.25s ease;
}
.skip-link:focus { top: 16px; }

/* Hamburger → X */
.hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; }
.hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ══════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════ */
@media (max-width: 1024px) {
  .services-grid  { grid-template-columns: 1fr 1fr; }
  .portfolio-grid { grid-template-columns: 1fr 1fr; }
  .pf-page-grid   { grid-template-columns: 1fr 1fr; }
  .process-grid   { grid-template-columns: 1fr 1fr; }
  .testimonial-grid { grid-template-columns: 1fr; max-width: 640px; margin: 0 auto; }
  .hero-content   { width: 360px; padding-left: 40px; }
  .hero-visual    { min-height: 400px; }
  .about-grid     { gap: 48px; }
}

@media (max-width: 768px) {
  body { cursor: auto; }
  /* the class survives a desktop → mobile resize; don't leave a cursorless page */
  html.custom-cursor *,
  html.custom-cursor *::before,
  html.custom-cursor *::after { cursor: auto !important; }
  html.custom-cursor a, html.custom-cursor button { cursor: pointer !important; }
  #cursor-ring, #cursor-dot { display: none; }
  .nav-links { display: none; }
  .hamburger { display: flex; }

  #hero {
    flex-direction: column;
    padding-top: calc(var(--nav-h) + 32px);
    text-align: center;
  }
  .hero-content { width: 100%; padding-left: 24px; padding-right: 24px; }
  .hero-badge   { margin: 0 auto 24px; }
  .hero-sub     { margin: 0 auto 32px; }
  .hero-ctas    { justify-content: center; }
  .hero-gauge   { justify-content: center; }
  .hero-visual  { width: 100%; min-height: 320px; align-self: auto; flex: none; }

  .services-grid  { grid-template-columns: 1fr; }
  .portfolio-grid { grid-template-columns: 1fr; }
  .pf-page-grid   { grid-template-columns: 1fr; }
  .pf-page-stats  { gap: 32px; }
  .process-grid   { grid-template-columns: 1fr; }
  .about-grid     { grid-template-columns: 1fr; }

  .stats-band     { grid-template-columns: 1fr 1fr; gap: 28px 16px; padding: 32px 20px; }
  .stat-cell:not(:last-child)::after { display: none; }
  .about-card-stack { height: 200px; }
  .acard          { width: 100%; }
  .acard-2        { left: 0; top: 80px; }
  .acard-3        { display: none; }

  .contact-grid    { grid-template-columns: 1fr; gap: 40px; }
  .form-row,
  .form-row.row-phone { grid-template-columns: 1fr; }
  .contact-form-wrap { padding: 24px; }

  .footer-top     { flex-direction: column; gap: 32px; }
  .footer-links   { gap: 40px; }
  .footer-brand   { flex: none; }
  .footer-bottom  { flex-direction: column; gap: 16px; text-align: center; }
}

/* ══════════════════════════════════════
   REDUCED MOTION
══════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  html { scroll-behavior: auto; }
  body { cursor: auto; }
  #cursor-ring, #cursor-dot { display: none; }
  .cursor-blink { animation: none; }
  /* keep reveals visible without motion (JS also forces .visible) */
  .reveal, .reveal-3d, .reveal-left, .reveal-right, .reveal-scale {
    opacity: 1 !important; transform: none !important;
  }
  .faq-a { transition: none; }
}
