/* ═══════════════════════════════════════════════
   АВТОБУС ГРУПП — Shared Styles
   ═══════════════════════════════════════════════ */

/* ── Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  color: #111827; background: #fff; overflow-x: hidden;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
input, textarea, select, button { font-family: inherit; }
button { cursor: pointer; border: none; background: none; }
:focus-visible { outline: 2px solid #f97316; outline-offset: 2px; border-radius: 4px; }

/* ── Container ── */
.container { max-width: 1280px; margin: 0 auto; padding: 0 1rem; }
@media (min-width: 640px) { .container { padding: 0 1.5rem; } }
@media (min-width: 1024px) { .container { padding: 0 2rem; } }

/* ── Colors ── */
:root {
  --brand-50: #eef2ff; --brand-100: #e0e7ff; --brand-200: #c7d2fe;
  --brand-300: #a5b4fc; --brand-400: #818cf8; --brand-500: #1e40af;
  --brand-600: #1e3a8a; --brand-700: #1e3380; --brand-800: #172554;
  --brand-900: #0f172a;
  --accent-50: #fff7ed; --accent-100: #ffedd5; --accent-200: #fed7aa;
  --accent-300: #fdba74; --accent-400: #fb923c; --accent-500: #f97316;
  --accent-600: #ea580c; --accent-700: #c2410c;
  --gray-50: #f9fafb; --gray-100: #f3f4f6; --gray-200: #e5e7eb;
  --gray-300: #d1d5db; --gray-400: #9ca3af; --gray-500: #6b7280;
  --gray-600: #4b5563; --gray-700: #374151; --gray-800: #1f2937;
  --gray-900: #111827;
}

/* ── Glass ── */
.glass { background: rgba(255,255,255,0.80); backdrop-filter: blur(16px) saturate(180%); }
.glass-dark { background: rgba(15,23,42,0.75); backdrop-filter: blur(16px) saturate(180%); }

/* ── Hero gradient ── */
.hero-gradient { background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 45%, #172554 100%); }
.hero-gradient-sm { background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #172554 100%); }

/* ── Section backgrounds (фон секций) ── */
.section { background: #fff; }
.section-alt { background: linear-gradient(180deg, #f9fafb 0%, #f3f4f6 100%); }
.section-dark { background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%); color: #fff; }
.section-tint { background: linear-gradient(135deg, #eef2ff 0%, #fff7ed 100%); }

/* ── Card shadows (тени карточек) ── */
.card-shadow { box-shadow: 0 1px 3px rgba(0,0,0,0.05), 0 4px 12px rgba(0,0,0,0.04); }
.card-shadow-md { box-shadow: 0 4px 6px rgba(0,0,0,0.05), 0 10px 24px rgba(0,0,0,0.06); }
.card-shadow-lg { box-shadow: 0 10px 20px rgba(0,0,0,0.06), 0 20px 40px rgba(0,0,0,0.10); }
.card-shadow-brand { box-shadow: 0 4px 14px rgba(30,58,138,0.10), 0 12px 32px rgba(30,58,138,0.08); }
.card-shadow-accent { box-shadow: 0 4px 14px rgba(249,115,22,0.12), 0 12px 32px rgba(249,115,22,0.10); }

/* ── Card with background + shadow (фон + тень) ── */
.card-bg {
  background: #fff;
  border: 1px solid var(--gray-100);
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.03);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.card-bg:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.08), 0 16px 40px rgba(0,0,0,0.06);
  transform: translateY(-2px);
}
.card-bg-brand {
  background: linear-gradient(135deg, var(--brand-600) 0%, var(--brand-800) 100%);
  color: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(30,58,138,0.25), 0 16px 48px rgba(30,58,138,0.15);
}
.card-bg-accent {
  background: linear-gradient(135deg, var(--accent-500) 0%, var(--accent-600) 100%);
  color: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(249,115,22,0.25), 0 16px 48px rgba(249,115,22,0.15);
}

/* ── Navbar shadow (тень навбара) ── */
.navbar { background: transparent; }
.navbar-scrolled { background: rgba(11,16,32,0.85); backdrop-filter: blur(20px) saturate(180%); box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.04); }
.navbar-hidden { transform: translateY(-100%); pointer-events: none; }

/* ── Button shadows (тени кнопок) ── */
.btn-green { background: #4CAF50; color: #fff; box-shadow: 0 2px 8px rgba(76,175,80,0.25); }
.btn-green:hover { background: #43A047; box-shadow: 0 4px 16px rgba(76,175,80,0.35); transform: translateY(-1px); }
.btn-green:active { transform: translateY(0); box-shadow: 0 2px 6px rgba(76,175,80,0.20); }

/* ── Scroll Reveal ── */
.reveal { opacity: 0; transform: translateY(40px); transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-left { opacity: 0; transform: translateX(-50px); transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal-left.visible { opacity: 1; transform: translateX(0); }
.reveal-right { opacity: 0; transform: translateX(50px); transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal-right.visible { opacity: 1; transform: translateX(0); }
.reveal-scale { opacity: 0; transform: scale(0.92); transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal-scale.visible { opacity: 1; transform: scale(1); }
.delay-1 { transition-delay: 0.1s; } .delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; } .delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; } .delay-6 { transition-delay: 0.6s; }
.delay-7 { transition-delay: 0.7s; } .delay-8 { transition-delay: 0.8s; }

/* ── Card 3D ── */
.card-3d { transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease; box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.03); }
.card-3d:hover { transform: translateY(-6px) scale(1.01); box-shadow: 0 12px 28px rgba(0,0,0,0.10), 0 24px 56px rgba(0,0,0,0.12); }

/* ── Vehicle tile ── */
.vehicle-tile { transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); cursor: default; box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.03); }
.vehicle-tile:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 8px 20px rgba(0,0,0,0.08), 0 16px 40px rgba(0,0,0,0.06); }

/* ── Section Headers ── */
.section-header { max-width: 700px; margin: 0 auto 3rem; text-align: center; }
.section-title { font-size: clamp(1.75rem, 3vw, 2.5rem); font-weight: 800; color: var(--gray-900); letter-spacing: -0.02em; line-height: 1.2; }
.section-subtitle { font-size: 1.125rem; color: var(--gray-500); line-height: 1.7; }

/* ── Form Inputs ── */
.input { width: 100%; padding: 0.75rem 1rem; border: 1px solid var(--gray-200); border-radius: 8px; font-size: 0.9375rem; color: var(--gray-900); background: #fff; transition: border-color 0.2s ease, box-shadow 0.2s ease; }
.input:focus { outline: none; border-color: var(--accent-400); box-shadow: 0 0 0 3px rgba(249,115,22,0.1); }
.input::placeholder { color: var(--gray-400); }
textarea.input { resize: vertical; min-height: 80px; }
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%236b7280' viewBox='0 0 24 24'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }

/* ═══════════════════════════════════════════════
   MOTION DESIGN — Scroll, Ambient, Micro-interactions
   ═══════════════════════════════════════════════ */

/* ── Keyframes ── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-50px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(50px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 8px rgba(249,115,22,0.3); }
  50%      { box-shadow: 0 0 24px rgba(249,115,22,0.6); }
}
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes zoomIn {
  from { transform: scale(1.05); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes counterPulse {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.08); }
  100% { transform: scale(1); }
}

/* ── Hero Cascade (поэлементное появление) ── */
.hero-cascade > * {
  opacity: 0;
  animation-fill-mode: forwards;
}
.hero-cascade > :nth-child(1) { animation: fadeInUp 0.6s 0.1s ease both; }
.hero-cascade > :nth-child(2) { animation: fadeInUp 0.6s 0.3s ease both; }
.hero-cascade > :nth-child(3) { animation: fadeInUp 0.6s 0.5s ease both; }
.hero-cascade > :nth-child(4) { animation: fadeInUp 0.6s 0.7s ease both; }
.hero-cascade > :nth-child(5) { animation: fadeInUp 0.6s 0.9s ease both; }

/* ── Hero Image Slow Zoom ── */
.hero-zoom {
  animation: zoomIn 1.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.hero-zoom-slow {
  transition: transform 12s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.hero-zoom-slow:hover { transform: scale(1.08); }

/* ── Ambient particle overlay ── */
.ambient-particles {
  position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 1;
}
.ambient-particles span {
  position: absolute; display: block;
  width: 4px; height: 4px;
  background: rgba(249,115,22,0.25);
  border-radius: 50%;
  animation: floatParticle 12s infinite ease-in-out;
}
@keyframes floatParticle {
  0%, 100% { transform: translateY(0) translateX(0) scale(1); opacity: 0; }
  10%      { opacity: 1; }
  90%      { opacity: 1; }
  50%      { transform: translateY(-60vh) translateX(40px) scale(1.5); }
}

/* ── Card image zoom ── */
.img-zoom {
  overflow: hidden; border-radius: inherit;
}
.img-zoom img {
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1),
              filter 0.4s ease;
}
.img-zoom:hover img {
  transform: scale(1.12);
  filter: brightness(1.05);
}
.vehicle-card .img-zoom img {
  transition: transform 0.5s ease, filter 0.4s ease;
}
.vehicle-card:hover .img-zoom img {
  transform: scale(1.15);
  filter: brightness(1.08) contrast(1.05);
}

/* ── Hero badge pulse ── */
.badge-pulse {
  animation: pulseGlow 2.5s ease-in-out infinite;
}

/* ── Stagger grid (улучшенный) ── */
.stagger-item {
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.stagger-item.visible {
  opacity: 1; transform: translateY(0);
}

/* ── CTA subtle float ── */
.btn-float {
  animation: float 3s ease-in-out infinite;
}
.btn-float:hover {
  animation: none;
}

/* ── Marquee (исправленный) ── */
.marquee-track {
  display: flex; gap: 3rem;
  width: max-content;
  animation: marquee 40s linear infinite;
}
.marquee-track:hover {
  animation-play-state: paused;
}
.marquee-container {
  overflow: hidden; position: relative;
}
.marquee-container::before,
.marquee-container::after {
  content: ''; position: absolute; top: 0; bottom: 0; width: 60px; z-index: 2;
  pointer-events: none;
}
.marquee-container::before { left: 0; background: linear-gradient(90deg, #f9fafb 0%, transparent 100%); }
.marquee-container::after  { right: 0; background: linear-gradient(-90deg, #f9fafb 0%, transparent 100%); }

/* ── Counter animation ── */
.stat-value.animate {
  animation: counterPulse 0.3s ease;
}

/* ── Navbar smooth hide/show ── */
.navbar-hidden {
  transform: translateY(-100%); pointer-events: none;
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .marquee-track { animation: none !important; }
  .hero-zoom-slow:hover { transform: none !important; }
  .img-zoom:hover img { transform: none !important; }
  .vehicle-card:hover .img-zoom img { transform: none !important; }
}

/* ── Counter ── */
.stat-value { font-variant-numeric: tabular-nums; }

/* ── Float orbs ── */
.orb { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.15; pointer-events: none; }
@keyframes floatOrb {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -40px) scale(1.1); }
  66% { transform: translate(-20px, 20px) scale(0.9); }
}

/* ── Shimmer button ── */
.btn-shimmer { position: relative; overflow: hidden; }
.btn-shimmer::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transform: translateX(-100%); transition: transform 0.6s;
}
.btn-shimmer:hover::after { transform: translateX(100%); }

/* ── Stagger grid ── */
.stagger-item { opacity: 0; transform: translateY(20px); }
.stagger-item.visible { animation: staggerIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
@keyframes staggerIn { to { opacity: 1; transform: translateY(0); } }

/* ── Mobile panel ── */
  .mobile-panel { transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease; }
  .mobile-panel.open { transform: translateY(0) scale(1); opacity: 1; pointer-events: auto; }
  .mobile-panel.closed { transform: translateY(-24px) scale(0.95); opacity: 0; pointer-events: none; }

/* ── Navbar ── */
.navbar { position: fixed; top: 0; left: 0; right: 0; z-index: 50; transition: all 0.3s ease; }
.navbar-scrolled { box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.navbar-hidden { transform: translateY(-100%); pointer-events: none; }

/* ── Hero page header ── */
.page-hero {
  padding: 8rem 0 4rem; position: relative; overflow: hidden;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 45%, #172554 100%);
  box-shadow: inset 0 -40px 80px rgba(0,0,0,0.15);
}
.page-hero-sm { padding: 7rem 0 3.5rem; }
@media (min-width: 1024px) { .page-hero { padding: 10rem 0 5rem; } .page-hero-sm { padding: 8rem 0 4rem; } }

/* ── Section ── */
.section { padding: 4rem 0; }
@media (min-width: 1024px) { .section { padding: 6rem 0; } }
.section-alt { background: var(--gray-50); }

/* ── Tag ── */
.tag {
  display: inline-flex; align-items: center; font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.22em; color: var(--accent-500);
}

/* ── Buttons ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.75rem 1.5rem; border-radius: 0.75rem; font-weight: 600; font-size: 0.875rem;
  transition: all 0.2s ease; }
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent-500); color: #fff; box-shadow: 0 2px 8px rgba(249,115,22,0.20); }
.btn-primary:hover { background: var(--accent-600); box-shadow: 0 8px 24px rgba(249,115,22,0.30); transform: translateY(-1px); }
.btn-outline { border: 1px solid rgba(255,255,255,0.2); color: #fff; }
.btn-outline:hover { background: rgba(255,255,255,0.1); }
  .btn-secondary { background: rgba(255,255,255,0.1); color: #fff; border: 1px solid rgba(255,255,255,0.25); }
  .btn-secondary:hover { background: rgba(255,255,255,0.18); }
.btn-brand { background: var(--brand-600); color: #fff; box-shadow: 0 2px 8px rgba(30,58,138,0.20); }
.btn-brand:hover { background: var(--brand-700); box-shadow: 0 8px 24px rgba(30,58,138,0.30); transform: translateY(-1px); }
.btn-lg { padding: 1rem 2rem; font-size: 1rem; border-radius: 0.875rem; }

/* ── Form inputs ── */
.input {
  width: 100%; padding: 0.875rem 1rem; border-radius: 0.75rem; font-size: 0.875rem;
  border: 1px solid var(--gray-200); background: #fff; color: var(--gray-900);
  transition: all 0.2s ease; outline: none;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.02);
}
.input:focus { border-color: var(--brand-400); box-shadow: 0 0 0 3px rgba(129,140,248,0.15), inset 0 1px 2px rgba(0,0,0,0.02); }
.input-dark {
  background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.1); color: #fff;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
}
.input-dark::placeholder { color: rgba(255,255,255,0.25); }
.input-dark:focus { border-color: var(--accent-400); box-shadow: 0 0 0 3px rgba(249,115,22,0.15), inset 0 1px 2px rgba(0,0,0,0.1); }
.input-label { display: block; color: rgba(255,255,255,0.6); font-size: 0.875rem; font-weight: 500; margin-bottom: 0.375rem; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #94a3b8; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #64748b; }

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-left, .reveal-right, .reveal-scale { opacity: 1; transform: none; }
  .card-3d:hover, .vehicle-tile:hover { transform: none; }
  .orb { animation: none !important; }
  .stagger-item { opacity: 1; transform: none; }
}

/* ── Utility ── */
.section-title { font-size: 2rem; font-weight: 800; color: var(--gray-900); letter-spacing: -0.025em; }
@media (min-width: 640px) { .section-title { font-size: 2.5rem; } }
@media (min-width: 1024px) { .section-title { font-size: 3rem; } }
.section-subtitle { font-size: 1.125rem; color: var(--gray-500); line-height: 1.625; }
.section-header { max-width: 36rem; margin: 0 auto 3rem; text-align: center; }
@media (min-width: 1024px) { .section-header { margin-bottom: 4rem; } }

/* ── Page layout ── */
.page-wrapper { min-height: 100dvh; display: flex; flex-direction: column; }
.page-wrapper main { flex: 1; }

/* ── Breadcrumbs ── */
.breadcrumbs { display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; }
.breadcrumbs a { color: rgba(255,255,255,0.6); transition: color 0.2s; }
.breadcrumbs a:hover { color: #fff; }
.breadcrumbs span { color: rgba(255,255,255,0.9); }
.breadcrumbs .sep { color: rgba(255,255,255,0.3); }

/* ── Responsive grid helpers ── */
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
.grid-4 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }