/* ============================================================
   AFFILIX PARTNERS — Fire-Themed Design System
   Tailwind utilities (tailwind.css, built from src/tailwind.css) handle layout; this file handles custom design,
   animations, glassmorphism, fire gradients, and special FX.
   ============================================================ */

/* ── Root Tokens ─────────────────────────────────────────── */
:root {
  --fire-red:      #E31E24;
  --fire-orange:   #F47B20;
  --fire-gold:     #F9A825;
  --fire-glow:     rgba(227,30,36,0.35);
  --signal-cyan:   #23C7D9;
  --signal-green:  #22C55E;
  --dark:          #0A0A0B;
  --dark-card:     #111113;
  --dark-surface:  #1A1A1E;
  --gray:          #71717A;
  --gray-light:    #A1A1AA;
  --white:         #FAFAFA;
  --glass-bg:      rgba(17,17,19,0.7);
  --glass-border:  rgba(244,123,32,0.12);
  --radius-card:   8px;
  --font-sans:     'Inter', sans-serif;
  --font-display:  'Montserrat', sans-serif;
  --font-mono:     'JetBrains Mono', monospace;
}

/* ── Reset & Base ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--dark);
  color: var(--white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
::selection {
  background: rgba(227,30,36,0.3);
  color: #fff;
}

/* ── Scroll Progress ─────────────────────────────────────── */
#scroll-progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 0;
  background: linear-gradient(90deg, var(--fire-red), var(--fire-orange), var(--fire-gold));
  z-index: 9999; border-radius: 0 2px 2px 0;
  box-shadow: 0 0 12px rgba(227,30,36,0.6);
  transition: width 0.1s linear;
}

.font-display { font-family: var(--font-display); }

/* ── Mesh / Pattern Background ───────────────────────────── */
.mesh-bg {
  position: relative;
  background:
    radial-gradient(ellipse 80% 50% at 20% 40%, rgba(227,30,36,0.06) 0%, transparent 60%),
    radial-gradient(ellipse 60% 60% at 80% 10%, rgba(244,123,32,0.05) 0%, transparent 55%),
    radial-gradient(ellipse 50% 70% at 50% 100%, rgba(249,168,37,0.04) 0%, transparent 60%),
    var(--dark);
}
.tech-grid-overlay {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(244,123,32,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244,123,32,0.025) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%);
}

/* ── Navbar ──────────────────────────────────────────────── */
#navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  transition: background 0.4s, box-shadow 0.4s, backdrop-filter 0.4s;
}
#navbar.scrolled {
  background: rgba(10,10,11,0.92);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(244,123,32,0.15), 0 10px 40px rgba(0,0,0,0.5);
}
.nav-logo-icon {
  width: 34px; height: 34px; border-radius: 8px; overflow: hidden; flex-shrink: 0;
}
.nav-logo-icon img { width: 100%; height: auto; display: block; }
.nav-logo-text {
  font-family: var(--font-display);
  background: linear-gradient(135deg, var(--fire-red) 0%, var(--fire-orange) 50%, var(--fire-gold) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  letter-spacing: 0;
}
.nav-link {
  position: relative; color: var(--gray); font-size: 0.875rem; font-weight: 500;
  letter-spacing: 0.02em; text-decoration: none; transition: color 0.25s;
}
.nav-link::after {
  content: ''; position: absolute; bottom: -4px; left: 0;
  width: 0; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--fire-red), var(--fire-orange));
  transition: width 0.3s ease;
}
.nav-link:hover { color: #fff; }
.nav-link:hover::after { width: 100%; }

/* Language Toggle */
.lang-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 16px; border-radius: 50px;
  border: 1px solid var(--glass-border); background: var(--glass-bg);
  color: var(--white); font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.06em; cursor: pointer;
  transition: all 0.3s; backdrop-filter: blur(8px);
}
.lang-btn:hover {
  border-color: var(--fire-orange);
  background: rgba(244,123,32,0.1);
  box-shadow: 0 0 20px rgba(244,123,32,0.2);
}

/* Mobile Menu */
#mobile-menu {
  background: rgba(10,10,11,0.97);
  backdrop-filter: blur(20px);
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 32px; border-radius: 50px;
  background: linear-gradient(135deg, var(--fire-red) 0%, var(--fire-orange) 100%);
  color: #fff; font-weight: 700; font-size: 0.9rem;
  letter-spacing: 0.03em; text-decoration: none; border: none; cursor: pointer;
  position: relative; overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s;
  box-shadow: 0 4px 25px rgba(227,30,36,0.4);
}
.btn-primary::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent);
  opacity: 0; transition: opacity 0.3s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 40px rgba(227,30,36,0.55); }
.btn-primary:hover::before { opacity: 1; }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 32px; border-radius: 50px;
  border: 1px solid rgba(244,123,32,0.25); background: transparent;
  color: #fff; font-weight: 600; font-size: 0.9rem;
  letter-spacing: 0.03em; text-decoration: none; cursor: pointer;
  transition: all 0.3s; backdrop-filter: blur(8px);
}
.btn-secondary:hover {
  border-color: var(--fire-orange);
  background: rgba(244,123,32,0.08);
  box-shadow: 0 0 25px rgba(244,123,32,0.15);
  transform: translateY(-2px);
}

/* ── Hero ────────────────────────────────────────────────── */
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px 6px 8px; border-radius: 50px;
  background: rgba(227,30,36,0.08); border: 1px solid rgba(227,30,36,0.2);
  color: var(--fire-orange); font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
}
.hero-badge-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--fire-red); animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 0 rgba(227,30,36,0.5); }
  50% { opacity: 0.8; transform: scale(1.15); box-shadow: 0 0 0 6px rgba(227,30,36,0); }
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  font-weight: 900; line-height: 1.08; letter-spacing: 0;
}
.hero-title .gradient-word {
  background: linear-gradient(135deg, var(--fire-red) 0%, var(--fire-orange) 50%, var(--fire-gold) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-stat { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.hero-stat-num {
  font-family: var(--font-display); font-size: 1.6rem; font-weight: 900;
  background: linear-gradient(135deg, #fff, var(--fire-orange));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-stat-label { font-size: 0.72rem; color: var(--gray); letter-spacing: 0.08em; }
.hero-divider { width: 1px; height: 36px; background: rgba(244,123,32,0.15); }

/* Cinematic hero scene */
.hero-scene {
  isolation: isolate;
  background: #050506;
}
.hero-scene::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(5,5,6,0.96) 0%, rgba(5,5,6,0.84) 35%, rgba(5,5,6,0.38) 68%, rgba(5,5,6,0.76) 100%),
    radial-gradient(ellipse 70% 45% at 70% 35%, rgba(35,199,217,0.12), transparent 62%),
    radial-gradient(ellipse 50% 45% at 45% 84%, rgba(244,123,32,0.10), transparent 70%);
  pointer-events: none;
}
.hero-scene::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.22;
  background-image: linear-gradient(rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 100% 4px;
  mix-blend-mode: overlay;
}
.hero-light-sweep {
  position: absolute;
  inset: -20% -30%;
  z-index: 3;
  pointer-events: none;
  background:
    linear-gradient(110deg, transparent 0%, transparent 42%, rgba(35,199,217,0.14) 47%, rgba(244,123,32,0.10) 51%, transparent 58%, transparent 100%);
  transform: translateX(-42%) rotate(-2deg);
  mix-blend-mode: screen;
  animation: hero-sweep 7.8s cubic-bezier(0.45, 0, 0.2, 1) infinite;
}
.hero-depth-rings {
  position: absolute;
  right: max(3vw, 24px);
  top: 18%;
  z-index: 2;
  width: min(42vw, 560px);
  aspect-ratio: 1;
  pointer-events: none;
  transform: translate3d(calc(var(--hero-x, 0) * -20px), calc(var(--hero-y, 0) * -14px), 0) rotateX(64deg);
  transform-origin: center;
  opacity: 0.72;
}
.hero-depth-rings span {
  position: absolute;
  inset: calc(var(--i, 0) * 13%);
  border: 1px solid rgba(35,199,217,0.16);
  border-radius: 50%;
  box-shadow: 0 0 42px rgba(35,199,217,0.08), inset 0 0 28px rgba(244,123,32,0.04);
  animation: ring-drift 10s linear infinite;
}
.hero-depth-rings span:nth-child(1) { --i: 0; }
.hero-depth-rings span:nth-child(2) { --i: 1; animation-duration: 13s; animation-direction: reverse; }
.hero-depth-rings span:nth-child(3) { --i: 2; animation-duration: 16s; }
.hero-backdrop {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  transform: translate3d(calc(var(--hero-x, 0) * -10px), calc(var(--hero-y, 0) * -8px), 0) scale(1.04);
  transition: transform 0.3s ease-out;
}
.hero-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 50%;
  filter: saturate(1.04) contrast(1.05);
}
.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(360px, 0.7fr);
  align-items: center;
  gap: clamp(32px, 6vw, 84px);
}
.hero-copy {
  max-width: 760px;
  transform: translate3d(calc(var(--hero-x, 0) * 8px), calc(var(--hero-y, 0) * 5px), 0);
  transition: transform 0.25s ease-out;
}
.hero-visual {
  position: relative;
  min-height: 460px;
  perspective: 1200px;
  transform: translate3d(calc(var(--hero-x, 0) * -18px), calc(var(--hero-y, 0) * -10px), 0);
  transition: transform 0.25s ease-out;
}
.hero-device {
  position: absolute;
  right: 0;
  top: 50%;
  width: min(100%, 520px);
  min-height: 360px;
  padding: 18px;
  border: 1px solid rgba(35,199,217,0.24);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(8,13,16,0.82), rgba(9,9,11,0.56)),
    linear-gradient(90deg, rgba(35,199,217,0.06), rgba(244,123,32,0.08));
  box-shadow: 0 34px 120px rgba(0,0,0,0.62), inset 0 0 0 1px rgba(255,255,255,0.04);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transform: translateY(-50%) rotateX(8deg) rotateY(-12deg);
  animation: device-float 7s ease-in-out infinite;
}
.device-glow {
  position: absolute;
  inset: 10% -8% -10% 20%;
  background: linear-gradient(135deg, rgba(35,199,217,0.22), rgba(244,123,32,0.12));
  filter: blur(42px);
  opacity: 0.7;
  z-index: -1;
}
.device-header {
  display: flex;
  gap: 7px;
  margin-bottom: 16px;
}
.device-header span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.25);
}
.device-header span:nth-child(1) { background: var(--fire-red); }
.device-header span:nth-child(2) { background: var(--fire-gold); }
.device-header span:nth-child(3) { background: var(--signal-cyan); }
.device-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 12px;
}
.device-panel {
  min-height: 132px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  background: rgba(3,7,10,0.62);
  overflow: hidden;
  position: relative;
}
.device-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(35,199,217,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(35,199,217,0.07) 1px, transparent 1px);
  background-size: 26px 26px;
  opacity: 0.5;
}
.panel-wide { grid-column: span 2; }
.panel-kicker {
  position: relative;
  z-index: 1;
  color: rgba(255,255,255,0.72);
  font: 700 0.68rem/1 var(--font-mono);
  letter-spacing: 0;
  text-transform: uppercase;
}
.signal-line {
  position: relative;
  z-index: 1;
  height: 56px;
  margin: 16px 0 8px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.signal-line::before,
.signal-line::after {
  content: '';
  position: absolute;
  inset: 0;
  clip-path: polygon(0 74%, 12% 56%, 22% 66%, 34% 30%, 48% 50%, 60% 22%, 74% 44%, 86% 18%, 100% 36%, 100% 100%, 0 100%);
  background: linear-gradient(180deg, rgba(35,199,217,0.55), rgba(35,199,217,0.02));
  animation: signal-scan 4.6s ease-in-out infinite;
}
.signal-line::after {
  clip-path: polygon(0 48%, 14% 66%, 28% 42%, 40% 70%, 54% 28%, 68% 58%, 82% 34%, 100% 62%, 100% 100%, 0 100%);
  background: linear-gradient(180deg, rgba(244,123,32,0.52), rgba(244,123,32,0.02));
  animation-delay: -1.3s;
}
.bar-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: end;
  gap: 9px;
  height: 52px;
}
.bar-row i:nth-child(1) { --h: 48%; }
.bar-row i:nth-child(2) { --h: 72%; }
.bar-row i:nth-child(3) { --h: 58%; }
.bar-row i:nth-child(4) { --h: 88%; }
.bar-row i:nth-child(5) { --h: 68%; }
.bar-row i:nth-child(6) { --h: 96%; }
.bar-row i {
  width: 100%;
  height: var(--h);
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, var(--signal-cyan), rgba(35,199,217,0.2));
  animation: bar-live 2.8s ease-in-out infinite;
  animation-delay: calc(var(--h) * -0.018s);
}
.funnel-stack,
.radial-meter {
  position: relative;
  z-index: 1;
}
.funnel-stack {
  display: grid;
  gap: 9px;
  margin-top: 20px;
}
.funnel-stack span {
  height: 14px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--fire-red), var(--fire-orange), var(--signal-cyan));
  opacity: 0.9;
  animation: funnel-breathe 3.8s ease-in-out infinite;
}
.funnel-stack span:nth-child(1) { width: 100%; }
.funnel-stack span:nth-child(2) { width: 76%; }
.funnel-stack span:nth-child(3) { width: 54%; }
.funnel-stack span:nth-child(4) { width: 34%; }
.radial-meter {
  width: 104px;
  height: 104px;
  margin: 16px auto 0;
  border-radius: 50%;
  background: conic-gradient(from 120deg, var(--signal-cyan), var(--fire-orange), var(--signal-green), rgba(255,255,255,0.08) 76%);
  animation: meter-spin 8s linear infinite;
}
.radial-meter span {
  position: absolute;
  inset: 13px;
  border-radius: 50%;
  background: rgba(3,7,10,0.92);
  border: 1px solid rgba(255,255,255,0.08);
}
.floating-chip {
  position: absolute;
  z-index: 2;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(8,10,12,0.72);
  color: rgba(255,255,255,0.82);
  font: 700 0.72rem/1 var(--font-mono);
  backdrop-filter: blur(14px);
  box-shadow: 0 14px 36px rgba(0,0,0,0.34);
}
.chip-one {
  right: 42%;
  top: 12%;
  animation: chip-drift 6s ease-in-out infinite;
}
.chip-two {
  right: 2%;
  bottom: 10%;
  animation: chip-drift 6.5s ease-in-out infinite reverse;
}
.hero-motion-rail {
  position: absolute;
  left: 2%;
  right: 10%;
  bottom: 1%;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 1fr 0.7fr 1.2fr;
  gap: 10px;
  height: 42px;
  opacity: 0.88;
}
.hero-motion-rail span {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(3,7,10,0.62);
}
.hero-motion-rail span::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(35,199,217,0.7), rgba(244,123,32,0.55), transparent);
  transform: translateX(-100%);
  animation: rail-pulse 3.4s ease-in-out infinite;
  animation-delay: calc(var(--delay, 0) * 1s);
}
.hero-motion-rail span:nth-child(1) { --delay: 0; }
.hero-motion-rail span:nth-child(2) { --delay: .35; }
.hero-motion-rail span:nth-child(3) { --delay: .7; }
.hero-motion-rail span:nth-child(4) { --delay: 1.05; }
.hero-motion-rail span:nth-child(5) { --delay: 1.4; }
@keyframes device-float {
  0%, 100% { transform: translateY(-50%) rotateX(8deg) rotateY(-12deg) translateZ(0); }
  50% { transform: translateY(calc(-50% - 14px)) rotateX(7deg) rotateY(-10deg) translateZ(18px); }
}
@keyframes signal-scan {
  0%, 100% { opacity: 0.55; transform: translateX(-2%); }
  50% { opacity: 0.92; transform: translateX(2%); }
}
@keyframes bar-live {
  0%, 100% { transform: scaleY(0.76); opacity: 0.68; }
  50% { transform: scaleY(1); opacity: 1; }
}
@keyframes funnel-breathe {
  0%, 100% { transform: scaleX(0.92); opacity: 0.65; }
  50% { transform: scaleX(1); opacity: 0.96; }
}
@keyframes meter-spin { to { transform: rotate(360deg); } }
@keyframes chip-drift {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(10px, -12px, 0); }
}
@keyframes hero-sweep {
  0%, 18% { transform: translateX(-48%) rotate(-2deg); opacity: 0; }
  30%, 54% { opacity: 1; }
  78%, 100% { transform: translateX(48%) rotate(-2deg); opacity: 0; }
}
@keyframes ring-drift {
  to { transform: rotate(360deg); }
}
@keyframes rail-pulse {
  0%, 28% { transform: translateX(-100%); opacity: 0; }
  45%, 70% { opacity: 1; }
  100% { transform: translateX(100%); opacity: 0; }
}

/* Floating Orbs */
.orb {
  position: absolute; border-radius: 50%; filter: blur(80px);
  opacity: 0.3; pointer-events: none; animation: orb-float 8s ease-in-out infinite;
}
.orb-1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(227,30,36,0.5), transparent);
  top: -100px; right: -150px;
}
.orb-2 {
  width: 350px; height: 350px;
  background: radial-gradient(circle, rgba(244,123,32,0.4), transparent);
  bottom: 50px; left: -100px; animation-delay: 3s;
}
.orb-3 {
  width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(249,168,37,0.35), transparent);
  top: 40%; right: 10%; animation-delay: 5s;
}
@keyframes orb-float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-30px) scale(1.05); }
}

/* ── Particle Canvas ─────────────────────────────────────── */
#particle-canvas {
  position: absolute; inset: 0;
  pointer-events: none; z-index: 0; opacity: 0.6;
}
#cinematic-canvas {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.9;
  mix-blend-mode: screen;
}

/* ── Section Commons ─────────────────────────────────────── */
.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900; letter-spacing: 0; line-height: 1.1;
}
.section-tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 14px; border-radius: 50px;
  background: rgba(227,30,36,0.08); border: 1px solid rgba(227,30,36,0.2);
  color: var(--fire-orange); font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 16px;
}
.gradient-line {
  width: 60px; height: 3px; border-radius: 2px; margin: 16px auto 0;
  background: linear-gradient(90deg, var(--fire-red), var(--fire-orange), transparent);
}

/* ── Service Cards ───────────────────────────────────────── */
.service-card {
  position: relative; background: var(--glass-bg);
  border: 1px solid var(--glass-border); border-radius: var(--radius-card);
  padding: 36px 32px; overflow: hidden;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
  cursor: default;
}
.service-card::before {
  content: ''; position: absolute; inset: 0; border-radius: var(--radius-card);
  background: linear-gradient(135deg, rgba(227,30,36,0.06) 0%, transparent 60%);
  opacity: 0; transition: opacity 0.4s;
}
.service-card::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--fire-red), var(--fire-orange), transparent);
  border-radius: var(--radius-card) var(--radius-card) 0 0;
  opacity: 0; transition: opacity 0.4s;
}
.service-card:hover {
  transform: translateY(-8px) scale(1.01);
  border-color: rgba(244,123,32,0.35);
  box-shadow: 0 20px 60px rgba(227,30,36,0.12), 0 0 0 1px rgba(227,30,36,0.06);
}
.service-card:hover::before, .service-card:hover::after { opacity: 1; }

.service-icon {
  width: 52px; height: 52px; border-radius: 8px;
  background: linear-gradient(135deg, rgba(227,30,36,0.15), rgba(244,123,32,0.08));
  border: 1px solid rgba(227,30,36,0.2);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 24px; transition: all 0.35s;
}
.service-card:hover .service-icon {
  background: linear-gradient(135deg, rgba(227,30,36,0.25), rgba(244,123,32,0.15));
  box-shadow: 0 0 30px rgba(227,30,36,0.25);
}
.service-card h3 {
  font-family: var(--font-display); font-size: 1.2rem;
  font-weight: 800; margin-bottom: 12px; color: #fff;
}
.service-card p { font-size: 0.88rem; line-height: 1.7; color: var(--gray-light); }
.service-highlight {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 20px; padding: 5px 12px; border-radius: 50px;
  background: rgba(227,30,36,0.08); border: 1px solid rgba(227,30,36,0.2);
  font-size: 0.75rem; font-weight: 600; color: var(--fire-orange);
}
.service-number {
  position: absolute; top: 20px; right: 24px;
  font-family: var(--font-display); font-size: 3.5rem; font-weight: 900;
  color: rgba(227,30,36,0.04); line-height: 1; pointer-events: none;
  transition: color 0.35s;
}
.service-card:hover .service-number { color: rgba(227,30,36,0.08); }

/* ── Cinematic Operating Layer ───────────────────────────── */
.motion-lab {
  background:
    radial-gradient(ellipse 70% 80% at 82% 42%, rgba(35,199,217,0.09), transparent 62%),
    radial-gradient(ellipse 60% 70% at 10% 78%, rgba(227,30,36,0.08), transparent 64%),
    #070708;
}
.motion-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(420px, 1fr);
  align-items: center;
  gap: clamp(34px, 7vw, 96px);
}
.motion-copy { max-width: 560px; }
.motion-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.motion-checks span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.035);
  color: rgba(255,255,255,0.78);
  font-size: 0.78rem;
  font-weight: 700;
}
.motion-checks span::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--signal-cyan);
  box-shadow: 0 0 16px rgba(35,199,217,0.7);
}
.film-stage {
  position: relative;
  min-height: 520px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(7,13,18,0.82), rgba(8,8,10,0.72)),
    radial-gradient(circle at 70% 38%, rgba(35,199,217,0.18), transparent 42%);
  box-shadow: 0 34px 100px rgba(0,0,0,0.38), inset 0 0 0 1px rgba(255,255,255,0.035);
}
.film-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(35,199,217,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(35,199,217,0.07) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at 58% 50%, black, transparent 72%);
  -webkit-mask-image: radial-gradient(circle at 58% 50%, black, transparent 72%);
  animation: film-grid-move 9s linear infinite;
}
.film-beam {
  position: absolute;
  height: 2px;
  left: 12%;
  right: 12%;
  top: 50%;
  background: linear-gradient(90deg, transparent, rgba(35,199,217,0.95), rgba(244,123,32,0.75), transparent);
  box-shadow: 0 0 32px rgba(35,199,217,0.38);
  transform-origin: center;
  animation: beam-breathe 4s ease-in-out infinite;
}
.beam-one { transform: rotate(-18deg); }
.beam-two {
  transform: rotate(20deg);
  animation-delay: -1.7s;
  opacity: 0.75;
}
.film-node {
  position: absolute;
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(35,199,217,0.34);
  background: rgba(2,8,12,0.74);
  box-shadow: 0 0 36px rgba(35,199,217,0.18), inset 0 0 24px rgba(35,199,217,0.08);
  animation: node-pulse 3.6s ease-in-out infinite;
}
.film-node span {
  font: 900 0.82rem/1 var(--font-mono);
  color: rgba(255,255,255,0.78);
}
.node-a { left: 12%; top: 18%; }
.node-b { right: 18%; top: 20%; animation-delay: -0.8s; }
.node-c { left: 18%; bottom: 16%; animation-delay: -1.5s; }
.node-d { right: 12%; bottom: 18%; animation-delay: -2.2s; }
.film-panel {
  position: absolute;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(3,8,11,0.62);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.film-panel-a {
  left: 34%;
  top: 16%;
  width: 190px;
  height: 122px;
  padding: 14px;
  transform: rotate(-4deg);
}
.film-panel-a i {
  display: block;
  height: 14px;
  margin-bottom: 12px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--signal-cyan), transparent);
  animation: panel-fill 2.8s ease-in-out infinite;
}
.film-panel-a i:nth-child(2) { width: 72%; animation-delay: -0.7s; }
.film-panel-a i:nth-child(3) { width: 48%; animation-delay: -1.3s; }
.film-panel-b {
  right: 30%;
  bottom: 14%;
  width: 210px;
  height: 132px;
  display: flex;
  align-items: end;
  gap: 12px;
  padding: 18px;
  transform: rotate(5deg);
}
.film-panel-b strong {
  flex: 1;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, var(--fire-orange), rgba(244,123,32,0.15));
  animation: film-bars 2.6s ease-in-out infinite;
}
.film-panel-b strong:nth-child(1) { height: 44%; }
.film-panel-b strong:nth-child(2) { height: 78%; animation-delay: -0.4s; }
.film-panel-b strong:nth-child(3) { height: 56%; animation-delay: -0.8s; }
.film-panel-b strong:nth-child(4) { height: 92%; animation-delay: -1.2s; }
.film-orbit {
  position: absolute;
  inset: 13% 18%;
  border: 1px solid rgba(249,168,37,0.14);
  border-radius: 50%;
  transform: rotateX(64deg) rotateZ(-14deg);
  animation: orbit-spin 13s linear infinite;
}
.film-orbit span {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--fire-gold);
  box-shadow: 0 0 24px rgba(249,168,37,0.9);
}
.film-orbit span:first-child { left: 12%; top: 16%; }
.film-orbit span:last-child { right: 18%; bottom: 12%; background: var(--signal-cyan); }
@keyframes film-grid-move {
  to { background-position: 44px 44px; }
}
@keyframes beam-breathe {
  0%, 100% { opacity: 0.34; filter: blur(0); }
  50% { opacity: 1; filter: blur(0.5px); }
}
@keyframes node-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 30px rgba(35,199,217,0.12), inset 0 0 24px rgba(35,199,217,0.08); }
  50% { transform: scale(1.07); box-shadow: 0 0 56px rgba(244,123,32,0.22), inset 0 0 30px rgba(35,199,217,0.14); }
}
@keyframes panel-fill {
  0%, 100% { transform: scaleX(0.54); opacity: 0.48; transform-origin: left; }
  50% { transform: scaleX(1); opacity: 1; transform-origin: left; }
}
@keyframes film-bars {
  0%, 100% { transform: scaleY(0.72); opacity: 0.62; transform-origin: bottom; }
  50% { transform: scaleY(1); opacity: 1; transform-origin: bottom; }
}
@keyframes orbit-spin {
  to { transform: rotateX(64deg) rotateZ(346deg); }
}

/* ── Tech Stack ──────────────────────────────────────────── */
.tech-section {
  background: linear-gradient(180deg, var(--dark) 0%, #060607 50%, var(--dark) 100%);
}
.tech-marquee-wrapper {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
}
.tech-marquee {
  display: flex; gap: 24px; width: max-content;
  animation: marquee 30s linear infinite;
}
.tech-marquee:hover { animation-play-state: paused; }
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.tech-pill {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 24px 20px; border-radius: 8px;
  background: var(--glass-bg); border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px); transition: all 0.3s; min-width: 100px; flex-shrink: 0;
}
.tech-pill:hover {
  border-color: var(--fire-orange); transform: translateY(-6px);
  box-shadow: 0 15px 40px rgba(227,30,36,0.15);
  background: rgba(17,17,19,0.9);
}
.tech-pill img {
  width: 42px; height: 42px; object-fit: contain;
  filter: grayscale(30%); transition: filter 0.3s, transform 0.3s;
}
.tech-pill:hover img { filter: grayscale(0%); transform: scale(1.1); }
.tech-pill span { font-size: 0.75rem; font-weight: 600; color: var(--gray); letter-spacing: 0.05em; }
.tech-pill:hover span { color: #fff; }

/* ── Partners / Swiper ───────────────────────────────────── */
.partner-logo-wrap {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 20px 28px; border-radius: 8px;
  background: var(--glass-bg); border: 1px solid var(--glass-border);
  height: 80px; backdrop-filter: blur(8px); transition: all 0.35s;
}
.partner-icon {
  width: 32px; height: 32px; object-fit: contain; border-radius: 6px;
  filter: grayscale(40%) brightness(0.8); transition: filter 0.35s, transform 0.35s;
}
.partner-name {
  font-family: var(--font-display); font-size: 0.95rem; font-weight: 800;
  color: var(--gray-light); letter-spacing: 0; white-space: nowrap;
  transition: color 0.35s;
}
.partner-logo-wrap:hover {
  border-color: rgba(244,123,32,0.3);
  box-shadow: 0 8px 30px rgba(227,30,36,0.1);
}
.partner-logo-wrap:hover .partner-icon { filter: grayscale(0%) brightness(1); transform: scale(1.1); }
.partner-logo-wrap:hover .partner-name { color: #fff; }
.swiper-wrapper { align-items: center; }
.swiper-pagination-bullet { background: var(--gray); opacity: 1; width: 6px; height: 6px; transition: all 0.3s; }
.swiper-pagination-bullet-active { background: var(--fire-orange); width: 24px; border-radius: 3px; }

/* ── Success Story Card ──────────────────────────────────── */
.success-card {
  position: relative;
  background: linear-gradient(135deg, rgba(227,30,36,0.06) 0%, rgba(17,17,19,0.8) 100%);
  border: 1px solid rgba(244,123,32,0.2); border-radius: 8px;
  padding: 48px; overflow: hidden; backdrop-filter: blur(16px);
}
.success-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--fire-red), var(--fire-orange), var(--fire-gold));
}
.success-metric { display: flex; flex-direction: column; gap: 4px; }
.success-num {
  font-family: var(--font-display); font-size: 2.2rem; font-weight: 900;
  background: linear-gradient(135deg, var(--fire-red), var(--fire-gold));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.success-label { font-size: 0.78rem; color: var(--gray); font-weight: 500; }
.success-divider { width: 1px; background: rgba(244,123,32,0.15); align-self: stretch; }

/* ── Contact Section ─────────────────────────────────────── */
.contact-section {
  background:
    radial-gradient(ellipse 60% 80% at 0% 50%, rgba(227,30,36,0.05), transparent),
    var(--dark);
}
.contact-info-card {
  position: relative; padding: 48px; border-radius: 8px;
  background: var(--glass-bg); border: 1px solid var(--glass-border);
  backdrop-filter: blur(16px); height: 100%;
}
.telegram-btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 16px 28px; border-radius: 8px;
  background: linear-gradient(135deg, #0088CC, #006BB3);
  color: #fff; font-weight: 700; font-size: 0.95rem;
  text-decoration: none; transition: all 0.3s; margin-top: 32px;
  border: 1px solid rgba(0,136,204,0.4);
}
.telegram-btn:hover { transform: translateY(-3px); box-shadow: 0 12px 35px rgba(0,136,204,0.4); }
.telegram-icon-float { animation: float-bounce 3s ease-in-out infinite; }
@keyframes float-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* Form */
.form-card {
  padding: 48px; border-radius: 8px;
  background: var(--glass-bg); border: 1px solid var(--glass-border);
  backdrop-filter: blur(16px);
}
.form-group { position: relative; margin-bottom: 20px; }
.honeypot-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.form-input {
  width: 100%; padding: 14px 18px; border-radius: 8px;
  background: rgba(10,10,11,0.6); border: 1px solid rgba(244,123,32,0.12);
  color: #fff; font-family: var(--font-sans); font-size: 0.9rem;
  outline: none; transition: all 0.3s; -webkit-appearance: none;
}
.form-input::placeholder { color: var(--gray); }
.form-input:focus {
  border-color: var(--fire-orange);
  background: rgba(244,123,32,0.04);
  box-shadow: 0 0 0 3px rgba(244,123,32,0.08);
}
textarea.form-input { resize: none; min-height: 120px; }
.form-label {
  display: block; font-size: 0.8rem; font-weight: 600;
  color: var(--gray); letter-spacing: 0.04em; margin-bottom: 8px;
}
select.form-input option { background: var(--dark-surface); color: #fff; }

/* ── Toast ───────────────────────────────────────────────── */
#toast {
  position: fixed; bottom: 30px; right: 30px;
  padding: 16px 24px; border-radius: 8px;
  background: linear-gradient(135deg, rgba(16,185,129,0.15), rgba(16,185,129,0.08));
  border: 1px solid rgba(16,185,129,0.4); color: #fff;
  font-weight: 600; font-size: 0.9rem;
  display: flex; align-items: center; gap: 10px;
  z-index: 9999; backdrop-filter: blur(16px);
  box-shadow: 0 10px 40px rgba(0,0,0,0.4);
  transform: translateY(100px); opacity: 0;
  transition: all 0.4s cubic-bezier(0.34,1.56,0.64,1);
  pointer-events: none;
}
#toast.show { transform: translateY(0); opacity: 1; }
#toast.error {
  background: linear-gradient(135deg, rgba(239,68,68,0.15), rgba(239,68,68,0.08));
  border-color: rgba(239,68,68,0.4);
}

/* ── Footer ──────────────────────────────────────────────── */
footer {
  background: linear-gradient(to bottom, var(--dark), #050506);
  border-top: 1px solid rgba(244,123,32,0.08);
}
.footer-logo-icon {
  width: 38px; height: 38px; border-radius: 8px; overflow: hidden; flex-shrink: 0;
}
.footer-logo-icon img { width: 100%; height: auto; display: block; }
.footer-logo-text {
  font-family: var(--font-display); font-size: 1.4rem; font-weight: 900;
  background: linear-gradient(135deg, var(--fire-red), var(--fire-orange), var(--fire-gold));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.footer-link { color: var(--gray); font-size: 0.85rem; text-decoration: none; transition: color 0.25s; }
.footer-link:hover { color: var(--fire-orange); }
.social-icon {
  width: 36px; height: 36px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: var(--glass-bg); border: 1px solid var(--glass-border);
  color: var(--gray); text-decoration: none; transition: all 0.3s;
}
.social-icon:hover {
  border-color: var(--fire-orange); color: var(--fire-orange);
  transform: translateY(-3px); box-shadow: 0 6px 20px rgba(227,30,36,0.15);
}

/* ── Animations ──────────────────────────────────────────── */
@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}
.shimmer-text {
  background: linear-gradient(90deg, var(--fire-red), var(--fire-orange), var(--fire-gold), var(--fire-red));
  background-size: 200% auto;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  animation: shimmer 4s linear infinite;
}
@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 20px rgba(227,30,36,0.2); }
  50% { box-shadow: 0 0 40px rgba(227,30,36,0.4); }
}

/* ── Hamburger ───────────────────────────────────────────── */
.hamburger {
  display: flex; flex-direction: column; gap: 5px; cursor: pointer; padding: 4px;
  border: none; background: transparent;
}
.hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--gray); border-radius: 2px; transition: all 0.3s ease;
}
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); background: var(--fire-orange); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); background: var(--fire-orange); }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .hero-scene {
    min-height: auto;
    padding-top: 104px;
    padding-bottom: 48px;
  }
  .hero-scene::before {
    background:
      linear-gradient(180deg, rgba(5,5,6,0.94) 0%, rgba(5,5,6,0.82) 44%, rgba(5,5,6,0.94) 100%),
      radial-gradient(ellipse 90% 42% at 75% 22%, rgba(35,199,217,0.16), transparent 66%),
      radial-gradient(ellipse 70% 42% at 38% 84%, rgba(244,123,32,0.12), transparent 70%);
  }
  .hero-backdrop {
    transform: translate3d(calc(var(--hero-x, 0) * -4px), calc(var(--hero-y, 0) * -4px), 0) scale(1.08);
  }
  .hero-backdrop img { object-position: 72% 50%; }
  #particle-canvas { opacity: 0.34; }
  #cinematic-canvas { opacity: 0.46; }
  .hero-light-sweep { opacity: 0.5; animation-duration: 9s; }
  .hero-depth-rings {
    right: -22vw;
    top: 8%;
    width: 86vw;
    opacity: 0.38;
  }
  .hero-title { font-size: 2.2rem; letter-spacing: 0; }
  .hero-layout { grid-template-columns: 1fr; gap: 24px; }
  .hero-copy { max-width: 100%; }
  .hero-badge {
    max-width: 100%;
    align-items: flex-start;
    border-radius: 8px;
    line-height: 1.35;
  }
  .hero-visual {
    min-height: 286px;
    opacity: 0.95;
  }
  .hero-device {
    left: 0;
    right: auto;
    width: 100%;
    min-height: 270px;
    padding: 14px;
    transform: translateY(-50%) rotateX(5deg) rotateY(-6deg);
    animation: none;
  }
  .device-grid { gap: 10px; }
  .device-panel { min-height: 104px; padding: 12px; }
  .floating-chip { display: none; }
  .hero-motion-rail {
    left: 0;
    right: 0;
    bottom: 6px;
    height: 32px;
    gap: 7px;
  }
  .hero-copy .mb-16 { margin-bottom: 2.2rem; }
  .hero-stat { min-width: 120px; align-items: flex-start; }
  .hero-stat-num { font-size: 1.32rem; }
  .hero-stat-label {
    max-width: 126px;
    line-height: 1.25;
  }
  .success-card { padding: 28px; }
  .motion-layout { grid-template-columns: 1fr; }
  .motion-copy { max-width: 100%; }
  .motion-checks { gap: 8px; }
  .motion-checks span {
    width: 100%;
    justify-content: flex-start;
  }
  .film-stage {
    min-height: 360px;
  }
  .film-node {
    width: 54px;
    height: 54px;
  }
  .film-panel-a {
    left: 28%;
    top: 17%;
    width: 150px;
    height: 104px;
  }
  .film-panel-b {
    right: 18%;
    bottom: 12%;
    width: 164px;
    height: 106px;
  }
  .film-orbit { inset: 18% 9%; }
  .contact-info-card, .form-card { padding: 28px; }
  .service-card { padding: 28px 24px; }
}

@media (max-width: 1100px) and (min-width: 769px) {
  .hero-layout { grid-template-columns: minmax(0, 1fr) minmax(300px, 0.7fr); }
  .hero-visual { min-height: 390px; }
  .hero-device { width: 440px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}

/* ── AOS tweaks ──────────────────────────────────────────── */
[data-aos] { backface-visibility: hidden; }

/* ── Legal Pages ─────────────────────────────────────────── */
.legal-page {
  min-height: 100vh;
  padding: 48px 20px;
  background:
    radial-gradient(ellipse 70% 50% at 20% 10%, rgba(227,30,36,0.08), transparent),
    var(--dark);
}
.legal-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 820px;
  margin: 0 auto 28px;
  color: #fff;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 900;
}
.legal-brand img {
  width: 38px;
  height: 38px;
  border-radius: 8px;
}
.legal-card {
  max-width: 820px;
  margin: 0 auto;
  padding: 42px;
  border-radius: 8px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(16px);
}
.legal-card h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 22px;
}
.legal-card p {
  color: var(--gray-light);
  line-height: 1.75;
  margin-bottom: 16px;
}
.legal-muted {
  color: var(--gray) !important;
  font-size: 0.85rem;
}
.legal-card a { color: var(--fire-orange); }
