/* ============================================================
   kegim.ru — Custom Styles (Tailwind CSS + Custom Components)
   ============================================================ */

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- Logo ---------- */
.logo-text {
  display: inline-flex;
  align-items: baseline;
  gap: 0;
  font-size: 1.65rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  text-decoration: none;
  user-select: none;
}
.logo-main {
  color: #ffffff;
  transition: color 0.25s ease;
}
.logo-accent {
  color: #f97316;
  margin-left: 0.08em;
}
.logo-dot {
  color: #f97316;
  font-size: 2rem;
  line-height: 1;
  margin-left: 0.02em;
}

/* When header is scrolled, switch main part to dark */
#header.scrolled .logo-main {
  color: #0f172a;
}

/* Footer logo — always dark bg so white stays */
footer .logo-main {
  color: #ffffff;
}

/* ---------- Header scroll effect ---------- */
#header {
  background: transparent;
}
#header.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}
#header.scrolled .nav-link {
  color: #1e293b;
}
#header:not(.scrolled) .nav-link {
  color: rgba(255, 255, 255, 0.9);
}
#header:not(.scrolled) #mobile-menu-btn svg {
  color: white;
}
#header:not(.scrolled) .header-phone {
  color: #fb923c;
}

/* ---------- Buttons ---------- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  color: #ffffff;
  font-weight: 700;
  padding: 0.75rem 1.75rem;
  border-radius: 0.75rem;
  transition: all 0.25s ease;
  box-shadow: 0 4px 15px rgba(249, 115, 22, 0.35);
  text-decoration: none;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}
.btn-primary:hover {
  background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
  box-shadow: 0 6px 20px rgba(241, 112, 19, 0.5);
  transform: translateY(-1px);
}
.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(249, 115, 22, 0.3);
}
.btn-primary.btn-lg {
  padding: 1rem 2.5rem;
  font-size: 1.05rem;
  border-radius: 0.875rem;
}

.btn-outline-white {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: transparent;
  color: #ffffff;
  font-weight: 700;
  padding: 0.75rem 1.75rem;
  border-radius: 0.75rem;
  border: 2px solid rgba(255, 255, 255, 0.4);
  transition: all 0.25s ease;
  text-decoration: none;
  font-size: 0.95rem;
  white-space: nowrap;
}
.btn-outline-white:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.7);
}
.btn-outline-white.btn-lg {
  padding: 1rem 2.5rem;
  font-size: 1.05rem;
  border-radius: 0.875rem;
}

/* ---------- Section Typography ---------- */
.section-badge {
  display: inline-block;
  background: #fff7ed;
  color: #ea580c;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.35rem 1rem;
  border-radius: 9999px;
  margin-bottom: 0.75rem;
  border: 1px solid #fed7aa;
}
.section-badge-dark {
  display: inline-block;
  background: rgba(249, 115, 22, 0.15);
  color: #fb923c;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.35rem 1rem;
  border-radius: 9999px;
  margin-bottom: 0.75rem;
  border: 1px solid rgba(249, 115, 22, 0.3);
}
.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 1rem;
  color: #0f172a;
}
.section-title.text-white { color: #ffffff; }
.section-subtitle {
  font-size: 1.05rem;
  color: #64748b;
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

/* ---------- Scroll Indicator ---------- */
.scroll-indicator {
  width: 24px;
  height: 38px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 12px;
  position: relative;
}
.scroll-indicator::after {
  content: '';
  position: absolute;
  top: 5px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 8px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 2px;
  animation: scrollBounce 1.8s infinite ease-in-out;
}
@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 1; }
  50% { transform: translateX(-50%) translateY(10px); opacity: 0.4; }
}

/* ---------- Stat Items ---------- */
.stat-item {
  padding: 1rem;
}

/* ---------- Benefits ---------- */
.benefit-card {
  background: #ffffff;
  border-radius: 1.25rem;
  padding: 1.75rem;
  border: 1px solid #f1f5f9;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}
.benefit-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
  border-color: #fed7aa;
}
.benefit-icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

/* ---------- Steps ---------- */
.step-card {
  padding: 1.5rem 1rem;
}
.step-number {
  width: 3.5rem;
  height: 3.5rem;
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: white;
  font-size: 1.5rem;
  font-weight: 900;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  box-shadow: 0 4px 15px rgba(249, 115, 22, 0.4);
}

/* ---------- Pricing Cards ---------- */
.pricing-card {
  background: #1a2338;
  border-radius: 1.5rem;
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.07);
  position: relative;
  transition: all 0.3s ease;
}
.pricing-card:hover {
  border-color: rgba(249, 115, 22, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}
.pricing-card.pricing-featured {
  background: #1e2d45;
  border: 2px solid rgba(249, 115, 22, 0.5);
  box-shadow: 0 8px 30px rgba(249, 115, 22, 0.15);
}
.pricing-header {
  text-align: center;
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.pricing-features {
  list-style: none;
  padding: 0;
  margin: 0;
}
.pricing-features li {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.4rem 0;
  font-size: 0.9rem;
  color: #94a3b8;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.pricing-features li:last-child { border-bottom: none; }
.pricing-features .check {
  color: #4ade80;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}

/* ---------- Keg Type Cards ---------- */
.keg-type-card {
  background: #ffffff;
  border-radius: 1.25rem;
  padding: 1.5rem 1rem;
  text-align: center;
  border: 1px solid #f1f5f9;
  transition: all 0.25s ease;
  cursor: default;
}
.keg-type-card:hover {
  border-color: #fed7aa;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
  transform: translateY(-3px);
}

/* ---------- Gallery ---------- */
.gallery-item {
  border-radius: 0.875rem;
  overflow: hidden;
  position: relative;
  aspect-ratio: 4/3;
  cursor: pointer;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.gallery-item:hover img {
  transform: scale(1.06);
}
.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, transparent 50%);
  display: flex;
  align-items: flex-end;
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

/* ---------- Area Tags ---------- */
.area-tag {
  background: rgba(249, 115, 22, 0.12);
  color: #fdba74;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  border: 1px solid rgba(249, 115, 22, 0.2);
}

/* ---------- Forms ---------- */
.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.375rem;
}
.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid #e5e7eb;
  border-radius: 0.625rem;
  font-size: 0.95rem;
  font-family: inherit;
  background: #f9fafb;
  color: #111827;
  transition: all 0.2s ease;
  outline: none;
}
.form-input:focus {
  border-color: #f97316;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.12);
}
.form-input.error {
  border-color: #ef4444;
  background: #fef2f2;
}
.form-error {
  display: block;
  font-size: 0.78rem;
  color: #ef4444;
  margin-top: 0.3rem;
}

/* ---------- FAQ ---------- */
.faq-item {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  overflow: hidden;
  transition: border-color 0.25s ease;
}
.faq-item[open] {
  border-color: #fed7aa;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
}
.faq-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
  color: #111827;
  transition: color 0.2s ease;
}
.faq-summary::-webkit-details-marker { display: none; }
.faq-summary:hover { color: #ea580c; }
.faq-arrow { color: #9ca3af; }
.faq-item[open] .faq-arrow { color: #f97316; }
.faq-body {
  padding: 0 1.5rem 1.25rem;
  color: #4b5563;
  line-height: 1.75;
  font-size: 0.95rem;
}

/* ---------- Reveal Animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Fade-in-up Animation ---------- */
.animate-fade-in-up {
  animation: fadeInUp 0.7s ease-out both;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Mobile Menu ---------- */
#mobile-menu {
  animation: slideDown 0.2s ease-out;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Scrollbar Styling ---------- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ---------- Selection ---------- */
::selection {
  background: rgba(249, 115, 22, 0.2);
  color: #c2410c;
}

/* ---------- Focus styles (accessibility) ---------- */
:focus-visible {
  outline: 2px solid #f97316;
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Print ---------- */
@media print {
  #header, .fixed, #mobile-menu { display: none !important; }
  body { background: white; color: black; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}
