/* =============================================
   AGENTIUM — CSS Design System
   Палитра: #0a0a1a / #8666ff / #44faa1
   ============================================= */

/* --- CSS Variables --- */
:root {
  --bg-primary: #0a0a1a;
  --bg-card: rgba(255, 255, 255, 0.05);
  --accent-purple: #8666ff;
  --accent-teal: #44faa1;
  --text-white: #ffffff;
  --text-muted: #a0a0b8;
  --border-glass: rgba(255, 255, 255, 0.1);
  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
  --max-width: 1200px;
  --section-padding: 100px 0;
  --radius: 16px;
  --radius-sm: 10px;
}

/* --- Reset --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-white);
  font-family: var(--font-main);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

ul { list-style: none; }
img { max-width: 100%; display: block; }

/* --- Container --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Section --- */
.section {
  padding: var(--section-padding);
}

.section-label {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent-purple);
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-teal));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 600px;
  line-height: 1.7;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-header .section-subtitle {
  margin: 0 auto;
}

/* --- Glass Card --- */
.glass {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius);
}

/* --- Gradient Text --- */
.gradient-text {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-teal));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-main);
  font-weight: 600;
  font-size: 16px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: var(--radius-sm);
  padding: 16px 32px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-purple), #6428ff);
  color: var(--text-white);
  box-shadow: 0 4px 24px rgba(134, 102, 255, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(134, 102, 255, 0.5);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-white);
  border: 1px solid var(--border-glass);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

/* =============================================
   NAVBAR
   ============================================= */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background: rgba(10, 10, 26, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-glass);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
}

.nav-logo svg {
  width: 36px;
  height: 36px;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.3s;
}

.nav-links a:hover {
  color: var(--text-white);
}

.nav-cta {
  font-size: 14px;
}

.nav-cta .btn {
  padding: 10px 24px;
  font-size: 14px;
}

/* Burger */
.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}

.burger span {
  width: 24px;
  height: 2px;
  background: var(--text-white);
  border-radius: 2px;
  transition: all 0.3s;
}

.burger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.burger.active span:nth-child(2) {
  opacity: 0;
}

.burger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 10, 26, 0.95);
  backdrop-filter: blur(20px);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
}

.mobile-menu.active {
  display: flex;
}

.mobile-menu a {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.3s;
}

.mobile-menu a:hover {
  color: var(--text-white);
}

/* =============================================
   HERO
   ============================================= */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  overflow: hidden;
}

/* Animated background */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero-bg .orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  animation: orbFloat 8s ease-in-out infinite;
}

.hero-bg .orb-1 {
  width: 500px;
  height: 500px;
  background: var(--accent-purple);
  top: -10%;
  left: -10%;
  animation-delay: 0s;
}

.hero-bg .orb-2 {
  width: 400px;
  height: 400px;
  background: var(--accent-teal);
  bottom: -10%;
  right: -10%;
  animation-delay: -4s;
}

.hero-bg .orb-3 {
  width: 300px;
  height: 300px;
  background: #6428ff;
  top: 40%;
  left: 50%;
  animation-delay: -2s;
}

/* Grid overlay */
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(134, 102, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(134, 102, 255, 0.05) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.05); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero-logo {
  margin: 0 auto 32px;
}

.hero-logo svg {
  width: 80px;
  height: 80px;
  filter: drop-shadow(0 0 24px rgba(134, 102, 255, 0.5));
}

.hero h1 {
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 24px;
}

.hero h1 .highlight {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-teal));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(16px, 2.5vw, 20px);
  color: var(--text-muted);
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

/* Agent avatars row */
.hero-agents {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.hero-agents .agent-mini {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-white);
  margin-left: -8px;
  transition: transform 0.3s;
}

.hero-agents .agent-mini:first-child {
  margin-left: 0;
}

.hero-agents .agent-mini:hover {
  transform: scale(1.2);
  z-index: 1;
}

.hero-agents-label {
  margin-left: 16px;
  font-size: 14px;
  color: var(--text-muted);
}

.hero-agents-label strong {
  color: var(--text-white);
}

/* =============================================
   ABOUT
   ============================================= */
.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}

.about-card {
  padding: 32px;
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
}

.about-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(134, 102, 255, 0.15);
}

.about-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(134, 102, 255, 0.2), rgba(68, 250, 161, 0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: var(--accent-purple);
}

.about-card h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
}

.about-card p {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.6;
}

/* =============================================
   TEAM
   ============================================= */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.team-card {
  padding: 32px 24px;
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
}

.team-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(134, 102, 255, 0.2);
}

.team-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  color: var(--text-white);
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 24px rgba(134, 102, 255, 0.3);
  transition: box-shadow 0.3s;
}

.team-card:hover .team-avatar {
  box-shadow: 0 0 40px rgba(134, 102, 255, 0.6);
}

.team-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-name {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}

.team-role {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-purple);
  margin-bottom: 12px;
}

.team-skills {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* =============================================
   SERVICES
   ============================================= */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.service-card {
  padding: 32px;
  transition: transform 0.3s, box-shadow 0.3s;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(134, 102, 255, 0.15);
}

.service-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent-purple), #6428ff);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--text-white);
}

.service-card h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
}

.service-card p {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.6;
}

/* =============================================
   PORTFOLIO
   ============================================= */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.portfolio-card {
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}

.portfolio-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(134, 102, 255, 0.2);
}

.portfolio-preview {
  height: 200px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* CSS mockups for portfolio */
.portfolio-preview .mockup {
  width: 70%;
  height: 130px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(4px);
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.portfolio-preview .mockup::before {
  content: '';
  display: block;
  height: 24px;
  background: rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 8px 12px;
}

.portfolio-preview .mockup-dots {
  position: absolute;
  top: 7px;
  left: 12px;
  display: flex;
  gap: 5px;
}

.portfolio-preview .mockup-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}

.portfolio-preview .mockup-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.portfolio-preview .mockup-line {
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
}

.portfolio-preview .mockup-line.short { width: 60%; }
.portfolio-preview .mockup-line.medium { width: 80%; }
.portfolio-preview .mockup-line.long { width: 100%; }

/* Gradient backgrounds for each project */
.portfolio-card.gomybus .portfolio-preview {
  background: linear-gradient(135deg, #1a73e8, #34a853);
}
.portfolio-card.hockey .portfolio-preview {
  background: linear-gradient(135deg, #4fc3f7, #e0e0e0);
}
.portfolio-card.brigadir .portfolio-preview {
  background: linear-gradient(135deg, #ff8f00, #fdd835);
}
.portfolio-card.family .portfolio-preview {
  background: linear-gradient(135deg, #8666ff, #ec407a);
}

.portfolio-info {
  padding: 24px;
}

.portfolio-info h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.portfolio-info p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 12px;
  line-height: 1.5;
}

.portfolio-tech {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.portfolio-tech span {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(134, 102, 255, 0.15);
  color: var(--accent-purple);
  font-weight: 500;
}

/* =============================================
   PROCESS
   ============================================= */
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  position: relative;
}

/* connecting line */
.process-grid::before {
  content: '';
  position: absolute;
  top: 48px;
  left: calc(12.5% + 12px);
  right: calc(12.5% + 12px);
  height: 2px;
  background: linear-gradient(90deg, var(--accent-purple), var(--accent-teal));
  opacity: 0.3;
}

.process-step {
  text-align: center;
  position: relative;
}

.process-number {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-teal));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  margin: 0 auto 20px;
  position: relative;
  z-index: 1;
}

.process-step h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
}

.process-step p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* =============================================
   CTA
   ============================================= */
.cta-section {
  text-align: center;
  padding: 80px 24px;
}

.cta-box {
  max-width: 700px;
  margin: 0 auto;
  padding: 60px 40px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(134, 102, 255, 0.15), rgba(68, 250, 161, 0.05));
  border: 1px solid rgba(134, 102, 255, 0.2);
  position: relative;
  overflow: hidden;
}

.cta-box::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(134, 102, 255, 0.1), transparent 50%);
  pointer-events: none;
}

.cta-box h2 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  margin-bottom: 16px;
  position: relative;
}

.cta-box p {
  color: var(--text-muted);
  font-size: 18px;
  margin-bottom: 32px;
  position: relative;
}

.cta-box .btn {
  position: relative;
}

/* =============================================
   FOOTER
   ============================================= */
.footer {
  padding: 40px 0;
  border-top: 1px solid var(--border-glass);
  text-align: center;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 700;
}

.footer-logo svg {
  width: 28px;
  height: 28px;
}

.footer-copy {
  font-size: 14px;
  color: var(--text-muted);
}

.footer-link {
  font-size: 14px;
  color: var(--accent-purple);
  transition: color 0.3s;
}

.footer-link:hover {
  color: var(--accent-teal);
}

/* =============================================
   ANIMATIONS (fade-in)
   ============================================= */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* stagger children */
.fade-in-children > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-children.visible > *:nth-child(1) { transition-delay: 0s; }
.fade-in-children.visible > *:nth-child(2) { transition-delay: 0.1s; }
.fade-in-children.visible > *:nth-child(3) { transition-delay: 0.2s; }
.fade-in-children.visible > *:nth-child(4) { transition-delay: 0.3s; }
.fade-in-children.visible > *:nth-child(5) { transition-delay: 0.35s; }
.fade-in-children.visible > *:nth-child(6) { transition-delay: 0.4s; }
.fade-in-children.visible > *:nth-child(7) { transition-delay: 0.45s; }
.fade-in-children.visible > *:nth-child(8) { transition-delay: 0.5s; }
.fade-in-children.visible > *:nth-child(9) { transition-delay: 0.55s; }

.fade-in-children.visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* =============================================
   RESPONSIVE
   ============================================= */

/* Tablet */
@media (max-width: 1024px) {
  .services-grid,
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .process-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .process-grid::before {
    display: none;
  }
}

/* Mobile */
@media (max-width: 768px) {
  :root {
    --section-padding: 60px 0;
  }

  .navbar {
    padding: 0 16px;
  }

  .nav-links,
  .nav-cta {
    display: none;
  }

  .burger {
    display: flex;
  }

  .hero {
    padding: 100px 16px 60px;
    min-height: auto;
  }

  .hero h1 {
    font-size: 32px;
  }

  .hero-subtitle {
    font-size: 16px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .hero-agents {
    flex-wrap: wrap;
    justify-content: center;
  }

  .about-grid,
  .services-grid,
  .team-grid {
    grid-template-columns: 1fr;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .process-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .process-grid::before {
    display: none;
  }

  .section-title {
    font-size: 28px;
  }

  .cta-box {
    padding: 40px 24px;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .hero-agents .agent-mini {
    width: 36px;
    height: 36px;
    font-size: 12px;
  }

  .team-grid {
    gap: 16px;
  }

  .team-card {
    padding: 24px 16px;
  }
}
