/* =====================================================
   КегТорг — Custom Styles
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* ---------- CSS Custom Properties ---------- */
:root {
  --header-height: 80px;
  --transition-base: 0.2s ease;
  --transition-slow: 0.4s ease;
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.06);
  --shadow-card-hover: 0 12px 40px rgba(0, 0, 0, 0.12);
}

/* ---------- Base ---------- */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: #f97316;
  color: white;
  padding: 8px 16px;
  border-radius: 0 0 8px 8px;
  font-weight: 600;
  z-index: 100;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 0;
}

/* ---------- Header states ---------- */
#header.scrolled {
  box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

#header.scrolled .h-16 {
  height: 56px;
}

/* ---------- Scroll progress ---------- */
#scroll-progress {
  will-change: width;
}

/* ---------- Active nav link ---------- */
.nav-link.active {
  color: #f97316;
  position: relative;
}
.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: #f97316;
  border-radius: 1px;
}

/* ---------- Reveal animations ---------- */
.reveal-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-up.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- FAQ ---------- */
.faq-item.active .faq-icon {
  transform: rotate(180deg);
}
.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}
.faq-item.active .faq-content {
  max-height: 500px;
}

/* ---------- Back to top ---------- */
#back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

/* ---------- Mobile menu animation ---------- */
#mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
#mobile-menu.open {
  max-height: 600px;
}

/* ---------- Form focus states ---------- */
input:focus,
textarea:focus {
  outline: none;
}

input.error,
textarea.error {
  border-color: #ef4444;
}

/* ---------- Phone mask placeholder fix ---------- */
input[type="tel"]::placeholder {
  letter-spacing: 0;
}

/* ---------- Counter animation ---------- */
@keyframes countPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}
.counter.counting {
  animation: countPulse 0.3s ease;
}

/* ---------- Gallery hover overlay ---------- */
.group:hover .group-hover\:scale-105 {
  transform: scale(1.05);
}

/* ---------- Selection ---------- */
::selection {
  background: #fdba74;
  color: #7c2d12;
}

/* ---------- Scrollbar styling ---------- */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #f3f4f6;
}
::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

/* ---------- Print ---------- */
@media print {
  header, footer, #back-to-top, .fixed {
    display: none !important;
  }
  .reveal-up {
    opacity: 1 !important;
    transform: none !important;
  }
}
