/**
 * Fedoseev.ONE - Premium Glassmorphism Design
 * @version 2.0
 * @author Claude (Sonnet 4.5)
 * @description Ultra-modern design with wow-factor
 */

/* ===== CSS CUSTOM PROPERTIES ===== */
:root {
  --mouse-x: 50%;
  --mouse-y: 50%;
}

/* ===== ADDITIONAL GLOBAL STYLES ===== */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: #00f2fe;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== MOUSE TRACKING GRADIENT ===== */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(
    circle 600px at var(--mouse-x) var(--mouse-y),
    rgba(102, 126, 234, 0.15) 0%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.3s;
}

/* ===== CONTAINER ===== */
.container {
  position: relative;
  z-index: 1;
}

/* ===== TYPOGRAPHY ===== */
.section-title {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 2rem;
  text-align: center;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  letter-spacing: -0.02em;
}

/* ===== GRADIENT TEXT EFFECT ===== */
.gradient-text {
  background: linear-gradient(135deg, #fff 0%, #00f2fe 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

/* ===== GLASSMORPHISM CARDS ===== */
.glass-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* ===== SERVICES GRID ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

/* ===== SERVICE CARD ===== */
.service-card {
  border-radius: 20px;
  padding: 2rem;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  min-height: 280px;
  display: flex;
  flex-direction: column;
}

.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(255, 255, 255, 0.05) 100%
  );
  opacity: 0;
  transition: opacity 0.3s;
}

.service-card:hover::before {
  opacity: 1;
}

.service-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(255, 255, 255, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
}

/* ===== CARD ICON ===== */
.card-icon {
  font-size: 3.5rem;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

.card-icon.gradient-blue {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  box-shadow: 0 8px 24px rgba(79, 172, 254, 0.4);
}

.card-icon.gradient-purple {
  background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
  box-shadow: 0 8px 24px rgba(168, 85, 247, 0.4);
}

.card-icon.gradient-green {
  background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
  box-shadow: 0 8px 24px rgba(52, 211, 153, 0.4);
}

.card-icon.gradient-orange {
  background: linear-gradient(135deg, #fb923c 0%, #f97316 100%);
  box-shadow: 0 8px 24px rgba(251, 146, 60, 0.4);
}

/* ===== CARD CONTENT ===== */
.card-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.5rem;
  line-height: 1.2;
  position: relative;
  z-index: 1;
}

.card-subtitle {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 600;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  z-index: 1;
}

.card-description {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.6;
  margin-bottom: auto;
  position: relative;
  z-index: 1;
}

.card-arrow {
  font-size: 1.5rem;
  color: rgba(255, 255, 255, 0.6);
  align-self: flex-end;
  margin-top: 1rem;
  transition: all 0.3s;
  position: relative;
  z-index: 1;
}

.service-card:hover .card-arrow {
  color: #ffffff;
  transform: translateX(4px);
}

/* ===== SOCIAL GRID ===== */
.social-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 3rem;
}

/* ===== SOCIAL LINK ===== */
.social-link {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  padding: 1rem;
  text-decoration: none;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  opacity: 0;
  transform: translateY(10px);
}

.social-link.visible {
  opacity: 1;
  transform: translateY(0);
}

.social-link:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.social-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

/* ===== FOOTER ===== */
.footer {
  text-align: center;
  padding: 2rem 0;
  margin-top: 3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
}

/* ===== POPUP OVERLAY ===== */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.popup-overlay.active {
  opacity: 1;
}

/* ===== POPUP MODAL ===== */
.popup-modal {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 24px;
  padding: 3rem;
  max-width: 500px;
  width: 100%;
  position: relative;
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transform: scale(0.95) translateY(20px);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.popup-overlay.active .popup-modal {
  transform: scale(1) translateY(0);
}

/* ===== POPUP CLOSE BUTTON ===== */
.popup-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 1.25rem;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  line-height: 1;
}

.popup-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

/* ===== POPUP CONTENT ===== */
.popup-icon {
  font-size: 4rem;
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  margin: 0 auto 1.5rem;
}

.popup-title {
  font-size: 2rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.popup-subtitle {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1.5rem;
}

.popup-description {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.7;
  text-align: center;
  margin-bottom: 1.5rem;
}

/* ===== POPUP FEATURES ===== */
.popup-features {
  list-style: none;
  margin-bottom: 2rem;
}

.popup-features li {
  padding: 0.75rem 0;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.popup-features li:last-child {
  border-bottom: none;
}

/* ===== POPUP BUTTON ===== */
.popup-button {
  width: 100%;
  padding: 1.125rem 2.5rem;
  border: none;
  border-radius: 16px;
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffffff;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.3),
    0 2px 8px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  position: relative;
  overflow: hidden;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  letter-spacing: 0.025em;
}

/* Shimmer effect */
.popup-button::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    transparent 0%,
    rgba(255, 255, 255, 0.3) 50%,
    transparent 100%
  );
  transform: translateX(-100%);
  transition: transform 0.6s;
}

/* Subtle glow overlay */
.popup-button::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.2) 0%,
    transparent 50%,
    rgba(0, 0, 0, 0.1) 100%
  );
  border-radius: 16px;
  pointer-events: none;
}

.popup-button:hover::before {
  transform: translateX(100%);
}

.popup-button:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.4),
    0 4px 16px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  filter: brightness(1.1);
}

.popup-button:active {
  transform: translateY(-1px) scale(1);
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: all 0.15s;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .services-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .service-card {
    padding: 1.5rem;
    min-height: auto;
  }

  .card-icon {
    font-size: 3rem;
    width: 70px;
    height: 70px;
  }

  .social-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .social-link {
    padding: 0.75rem;
    font-size: 0.875rem;
  }

  .popup-modal {
    padding: 2rem 1.5rem;
    border-radius: 20px;
  }

  .popup-icon {
    font-size: 3rem;
    width: 80px;
    height: 80px;
  }

  .popup-title {
    font-size: 1.5rem;
  }

  .popup-description {
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  .service-card {
    padding: 1.25rem;
  }

  .card-icon {
    font-size: 2.5rem;
    width: 60px;
    height: 60px;
  }

  .card-title {
    font-size: 1.25rem;
  }

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

  .popup-modal {
    padding: 1.5rem 1rem;
  }

  .popup-close {
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    font-size: 1.1rem;
  }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== FOCUS STATES ===== */
.service-card:focus-visible,
.social-link:focus-visible,
.popup-button:focus-visible,
.popup-close:focus-visible {
  outline: 3px solid #00f2fe;
  outline-offset: 2px;
}
