/* ============================================
   KVATASK SITE — COMPONENTS
   Кнопки, навигация, футер, секции, FAQ, карточки
   ============================================ */

/* ===== Section ===== */
.section {
  padding: 120px 0;
}

.section-tight {
  padding: 80px 0;
}

.section-eyebrow {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 16px;
}

.section-title {
  font-size: var(--display-2);
  font-weight: 800;
  text-align: center;
  margin-bottom: 16px;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.section-title-left {
  text-align: left;
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  text-align: center;
  max-width: 640px;
  margin: 0 auto 64px;
  line-height: 1.6;
}

.section-subtitle-left {
  text-align: left;
  margin-left: 0;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-lg);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  font-family: inherit;
  white-space: nowrap;
  min-height: 44px; /* mobile touch target */
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.4);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.5);
}

.btn-secondary {
  background: var(--bg-primary);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--bg-secondary);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  color: var(--text);
  background: var(--primary-muted);
}

.btn-lg {
  padding: 16px 36px;
  font-size: 1.0625rem;
  border-radius: var(--radius-xl);
}

.btn-icon-trail svg {
  transition: transform 0.2s ease;
}

.btn:hover .btn-icon-trail svg,
.btn-icon-trail:hover svg {
  transform: translateX(3px);
}

/* ===== Navigation ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: padding 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}

.nav.scrolled {
  padding: 10px 0;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--nav-border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  gap: 16px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 1.375rem;
  font-weight: 700;
  font-family: var(--font-display);
  flex-shrink: 0;
}

.nav-logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  flex-shrink: 0;
}

.nav-logo-text span:first-child { color: var(--primary); }
.nav-logo-text span:last-child { color: var(--text); }

.nav-logo-sub {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-left: 4px;
  padding-left: 14px;
  border-left: 1px solid var(--border);
  line-height: 1.2;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.nav-links a.active {
  position: relative;
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  background: var(--primary);
  border-radius: 1px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-login {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9375rem;
  padding: 8px 16px;
  border-radius: var(--radius);
  transition: color 0.2s, background 0.2s;
}

.nav-login:hover {
  color: var(--text);
  background: var(--primary-muted);
}

.nav-actions .btn-primary {
  padding: 10px 22px;
  font-size: 0.875rem;
  min-height: 40px;
}

.nav-mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--text);
  border-radius: var(--radius);
}

.nav-mobile-toggle:hover {
  background: var(--primary-muted);
}

/* ===== Footer ===== */
.footer {
  padding: 60px 0 40px;
  border-top: 1px solid var(--border);
  background: var(--bg-page);
  transition: border-color 0.4s, background 0.4s;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 320px;
}

.footer-tagline {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.footer-col h4 {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 16px;
  font-family: var(--font-sans);
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col a {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: var(--text);
}

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-copy {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer-legal {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-legal a {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-legal a:hover {
  color: var(--text);
}

/* ===== Generic card ===== */
.card-base {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.card-base:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-muted);
}

/* ===== Pill/badge ===== */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--primary-muted);
  color: var(--primary);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: var(--font-sans);
  letter-spacing: 0;
}

.pill-dot {
  width: 6px;
  height: 6px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse-soft 2s ease infinite;
}

/* ===== FAQ ===== */
.faq-list {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.3s ease;
}

.faq-item:hover {
  border-color: var(--border-hover);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  cursor: pointer;
  gap: 16px;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
  color: var(--text);
}

.faq-question h3 {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  margin: 0;
  font-family: var(--font-sans);
  letter-spacing: 0;
}

.faq-chevron {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  transition: transform 0.3s ease;
  color: var(--text-muted);
}

.faq-item.open .faq-chevron {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.faq-item.open .faq-answer {
  max-height: 400px;
}

.faq-answer-inner {
  padding: 0 24px 20px;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .section { padding: 100px 0; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .section { padding: 72px 0; }
  .section-tight { padding: 56px 0; }
  .section-subtitle { font-size: 1rem; margin-bottom: 40px; }

  .nav-links { display: none; }
  .nav-mobile-toggle { display: block; }
  .nav-logo-sub { display: none; }
  .nav-login { display: none; }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .section { padding: 56px 0; }
  .section-tight { padding: 40px 0; }
  .section-subtitle { font-size: 0.9375rem; margin-bottom: 32px; }

  .btn { padding: 12px 22px; font-size: 0.9375rem; }
  .btn-lg { padding: 14px 28px; font-size: 1rem; }

  .nav { padding: 10px 0; }
  .nav-inner { padding: 0 12px; }
  .nav-logo { font-size: 1.125rem; gap: 6px; }
  .nav-logo-icon { width: 28px; height: 28px; }
  .nav-actions .btn-primary { padding: 8px 14px; font-size: 0.8125rem; min-height: 36px; }

  .faq-question { padding: 14px 16px; }
  .faq-question h3 { font-size: 0.9375rem; }
  .faq-answer-inner { padding: 0 16px 14px; font-size: 0.875rem; }
}

/* ===== Notch safe area ===== */
@supports (padding: env(safe-area-inset-top)) {
  .nav { padding-top: max(10px, env(safe-area-inset-top)); }
  .footer { padding-bottom: max(40px, env(safe-area-inset-bottom)); }
}

/* ===== Hero / CTA action row — общий для hero-блоков и CTA-секций ===== */
.home-hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== CTA band — общая секция «призыв к действию» в подвале страниц ===== */
.home-cta {
  padding: 100px 0;
  background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 50%, #10b981 100%);
  color: #fff;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.home-cta::before {
  content: '';
  position: absolute;
  inset: -10%;
  background:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.2) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(255,255,255,0.15) 0%, transparent 50%);
  pointer-events: none;
}

.home-cta-inner {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
}

.home-cta h2 {
  font-size: var(--display-2);
  font-weight: 800;
  margin-bottom: 14px;
  letter-spacing: -0.03em;
  color: #fff;
  font-family: var(--font-display);
}

.home-cta p {
  font-size: 1.125rem;
  opacity: 0.92;
  margin-bottom: 32px;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}

.home-cta .btn-primary {
  background: #fff;
  color: var(--primary-dark);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.home-cta .btn-primary:hover {
  background: #f8fafc;
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
}

.home-cta .btn-secondary {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.home-cta .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.6);
}

@media (max-width: 1024px) {
  .home-cta { padding: 80px 0; }
}

@media (max-width: 768px) {
  .home-cta { padding: 64px 0; }
  .home-cta p { font-size: 1rem; }
}

@media (max-width: 480px) {
  .home-cta { padding: 48px 0; }
  .home-hero-actions { flex-direction: column; gap: 10px; }
  .home-hero-actions .btn { width: 100%; }
}
