/* ═══════════════════════════════════════════════════════════════
   Альфа Юнит-1 — Premium Security Company Website
   Custom CSS: Dark Theme · Glassmorphism · Military-Tech Aesthetic
   2026 Standard
═══════════════════════════════════════════════════════════════ */

/* ── Custom Properties ─────────────────────────────────────── */
:root {
  --color-bg-primary: #05070a;
  --color-bg-secondary: #0b111b;
  --color-gold: #d4af37;
  --color-gold-light: #e8c84a;
  --color-gold-dim: rgba(212, 175, 55, 0.15);
  --color-blue: #2d5fff;
  --color-blue-dim: rgba(45, 95, 255, 0.12);
  --color-text: #ffffff;
  --color-text-muted: rgba(255, 255, 255, 0.55);

  --glass-bg: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-blur: 12px;

  --radius-card: 1rem;
  --radius-btn: 0.75rem;

  --transition-base: 0.25s ease;
  --transition-slow: 0.45s ease;

  --font-display: "Bebas Neue", sans-serif;
  --font-sans: "Inter", sans-serif;
}

/* ── Reset & Base ──────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--color-bg-primary);
  color: var(--color-text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--color-bg-secondary);
}
::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, 0.3);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-gold);
}

/* ── Glassmorphism ─────────────────────────────────────────── */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn-gold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-gold) 0%, #c9a020 100%);
  color: #05070a;
  font-weight: 700;
  letter-spacing: 0.01em;
  border-radius: var(--radius-btn);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  text-decoration: none;
}

.btn-gold::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 50%);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.btn-gold:hover::before {
  opacity: 1;
}

.btn-gold:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(212, 175, 55, 0.35);
}

.btn-gold:active {
  transform: translateY(0);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--color-text);
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-btn);
  transition: all var(--transition-base);
  text-decoration: none;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
}

/* ── Navigation ────────────────────────────────────────────── */
#navbar {
  background: transparent;
}

#navbar.scrolled {
  background: rgba(5, 7, 10, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.4);
}

.nav-link {
  position: relative;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-gold);
  transition: width var(--transition-base);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

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

/* Burger animation */
#burger.open .burger-line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
#burger.open .burger-line:nth-child(2) {
  opacity: 0;
}
#burger.open .burger-line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
  width: 1.5rem;
}

/* ── Hero Section ──────────────────────────────────────────── */
#hero {
  position: relative;
}

/* Tactical grid background */
.hero-grid {
  background-image:
    linear-gradient(rgba(212, 175, 55, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212, 175, 55, 0.08) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: gridPulse 8s ease-in-out infinite;
}

@keyframes gridPulse {
  0%,
  100% {
    opacity: 0.15;
  }
  50% {
    opacity: 0.25;
  }
}

/* Scanline effect */
.hero-scanline {
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 4px
  );
  pointer-events: none;
}

/* Hero content animations (GSAP-driven, also have CSS fallback) */
.hero-badge {
  animation: fadeInDown 0.8s ease 0.3s both;
}
.hero-title {
  animation: fadeInUp 0.9s ease 0.5s both;
}
.hero-subtitle {
  animation: fadeInUp 0.9s ease 0.7s both;
}
.hero-cta {
  animation: fadeInUp 0.9s ease 0.9s both;
}
.hero-trust {
  animation: fadeInUp 0.9s ease 1.1s both;
}

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

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Slow pulse for orbs */
@keyframes pulseSlow {
  0%,
  100% {
    opacity: 0.5;
    transform: scale(1);
  }
  50% {
    opacity: 0.9;
    transform: scale(1.08);
  }
}
.animate-pulse-slow {
  animation: pulseSlow 6s ease-in-out infinite;
}

/* Scroll indicator bounce */
@keyframes bounceSlow {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(6px);
  }
}
.animate-bounce-slow {
  animation: bounceSlow 2.5s ease-in-out infinite;
}

/* ── Section styling ───────────────────────────────────────── */
.section-header {
  position: relative;
}

/* ── Service cards ─────────────────────────────────────────── */
.service-card {
  cursor: pointer;
}

.service-card .w-12 svg {
  width: 1.25rem;
  height: 1.25rem;
}

/* ── Object cards ──────────────────────────────────────────── */
.tag {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.375rem;
  padding: 0.2rem 0.6rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* ── Timeline ──────────────────────────────────────────────── */
.timeline-item {
  position: relative;
}

/* ── Process steps ─────────────────────────────────────────── */
.process-step {
  position: relative;
}

/* ── FAQ ───────────────────────────────────────────────────── */
.faq-item {
  transition: border-color var(--transition-base);
}

.faq-item:hover {
  border-color: rgba(212, 175, 55, 0.25);
}

.faq-icon {
  transition: transform 0.3s ease;
}

.faq-item.open .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Contact form ──────────────────────────────────────────── */
.form-label {
  display: block;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 0.4rem;
  font-weight: 500;
}

.form-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--color-text);
  font-size: 0.9375rem;
  font-family: var(--font-sans);
  transition:
    border-color var(--transition-base),
    box-shadow var(--transition-base),
    background var(--transition-base);
  outline: none;
  -webkit-appearance: none;
}

.form-input::placeholder {
  color: rgba(255, 255, 255, 0.25);
}

.form-input:hover {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.07);
}

.form-input:focus {
  border-color: var(--color-gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
  background: rgba(255, 255, 255, 0.07);
}

.form-input.error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

select.form-input option {
  background: var(--color-bg-secondary);
  color: var(--color-text);
}

/* ── Counter items ─────────────────────────────────────────── */
.counter {
  font-family: var(--font-display);
  transition: color 0.3s ease;
}

.stat-card:hover .counter {
  color: var(--color-gold-light);
  text-shadow: 0 0 30px rgba(212, 175, 55, 0.4);
}

/* ── Footer ────────────────────────────────────────────────── */
footer a {
  text-decoration: none;
}

/* ── Loading state for form button ────────────────────────── */
#form-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none !important;
}

/* ── Responsive helpers ────────────────────────────────────── */

/* TV / ultra-wide (≥ 1920px) */
@media (min-width: 1920px) {
  .max-w-7xl {
    max-width: 1400px;
  }
  #hero .hero-title {
    font-size: 7rem;
  }
}

/* Tablet (640–1023px) */
@media (max-width: 1023px) {
  .timeline-item {
    display: block !important;
    margin-bottom: 2rem;
  }
}

/* Mobile (< 640px) */
@media (max-width: 639px) {
  .hero-title {
    font-size: 2.75rem !important;
  }
  .font-display.text-6xl {
    font-size: 3rem;
  }
}

/* ── Print ─────────────────────────────────────────────────── */
@media print {
  #navbar,
  #hero .hero-bg,
  .hero-grid,
  .hero-scanline {
    display: none;
  }
  body {
    background: white;
    color: black;
  }
}

/* ── AOS (Animate on Scroll) overrides ─────────────────────── */
[data-aos] {
  pointer-events: none;
}
[data-aos].aos-animate {
  pointer-events: auto;
}

/* ── Accessibility ─────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Skip to content (screen readers) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ── AOS fallback — показываем контент если CDN заблокирован ─ */
/* Когда AOS загружается — он добавляет class aos-initialized на <html>
   Если этого не произошло — весь контент отображается сразу */
html:not(.aos-initialized) [data-aos] {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

/* ── Reduced motion ────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .hero-grid {
    animation: none;
  }
}
