/* ══════════════════════════════════════════
   AI Legal HUB — landing page
   Переиспользует токены и компоненты main.css
══════════════════════════════════════════ */

/* Страница только на русском — переключатель языка не нужен */
.page-template-page-ai-legal-hub .lang-toggle,
.page-template-page-ai-legal-hub .lang-dropdown { display: none; }

.page-template-page-ai-legal-hub section { padding: 100px 0; }

/* ── HERO ── */
.hub-hero {
  position: relative;
  padding: calc(var(--nav-h) + 80px) 0 90px !important;
  overflow: hidden;
}

.hub-hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 64px;
  align-items: center;
  position: relative;
  z-index: 2;
}

.hub-hero h1 { font-size: clamp(2.2rem, 4vw, 3.4rem); }

.hub-hero .hero-desc { max-width: 560px; margin-bottom: 32px; }
.hub-hero .hero-desc strong { color: var(--text); font-weight: 500; }

.hub-bullets {
  list-style: none;
  display: grid;
  gap: 14px;
  margin: 0 0 36px;
  padding: 0;
}

.hub-bullets li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  font-size: 0.94rem;
  line-height: 1.6;
  color: var(--text2);
}

.hub-bullets i {
  font-size: 1.15rem;
  color: var(--accent2);
  flex-shrink: 0;
  margin-top: 1px;
}

.hub-bullets strong { color: var(--text); font-weight: 600; }

.hub-cta { font-size: 0.97rem; padding: 15px 30px; }

.hub-cta-note {
  margin-top: 14px;
  font-size: 0.82rem;
  color: var(--text3);
  line-height: 1.6;
  max-width: 420px;
}

/* Иллюстрация отрисована на своём почти чёрном фоне — без растушёвки краёв
   на секции виден прямоугольник картинки. */
.hub-hero-visual img {
  width: 100%;
  -webkit-mask-image: radial-gradient(closest-side, #000 58%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 58%, transparent 100%);
}

/* ── ПРОБЛЕМА ── */
.hub-problem { background: var(--bg2); }

.hub-problem-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 52px;
}

.hub-problem-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  transition: border-color 0.3s, transform 0.3s;
}

.hub-problem-card:hover { border-color: rgba(108, 99, 255, 0.35); transform: translateY(-3px); }

.hub-problem-card i {
  font-size: 1.6rem;
  color: var(--accent3);
  display: block;
  margin-bottom: 16px;
}

.hub-problem-card h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.hub-problem-card p { font-size: 0.88rem; color: var(--text2); line-height: 1.7; }

.hub-quote {
  margin-top: 40px;
  padding: 32px 36px;
  border-radius: var(--radius);
  border: 1px solid rgba(108, 99, 255, 0.3);
  background: linear-gradient(135deg, var(--surface) 0%, rgba(108, 99, 255, 0.07) 100%);
  position: relative;
}

.hub-quote-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent2);
  margin-bottom: 12px;
}

.hub-quote p {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text);
  margin: 0;
}

/* ── ЧТО ВХОДИТ ── */
.hub-includes-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 52px;
}

.hub-include-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: border-color 0.3s, transform 0.3s;
  display: flex;
  flex-direction: column;
}

.hub-include-card:hover { border-color: var(--accent); transform: translateY(-3px); }

.hub-include-card--wide {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
  gap: 36px;
}

.hub-include-media {
  flex: 0 0 200px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg);
}

.hub-include-media img { width: 100%; display: block; }

.hub-include-body { flex: 1; }

.hub-include-num {
  font-family: 'Syne', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent2);
  margin-bottom: 12px;
}

.hub-include-card h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.35;
}

.hub-include-card p { font-size: 0.9rem; color: var(--text2); line-height: 1.7; }

.hub-sublist {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.hub-sublist li {
  position: relative;
  padding-left: 20px;
  font-size: 0.89rem;
  color: var(--text2);
  line-height: 1.65;
}

.hub-sublist li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent2);
}

.hub-sublist strong { color: var(--text); font-weight: 600; }

/* ── ROI ── */
.hub-roi { background: var(--bg2); }

.hub-table-wrap {
  margin-top: 48px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.hub-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
}

.hub-table th,
.hub-table td {
  padding: 18px 24px;
  text-align: left;
  font-size: 0.92rem;
  border-bottom: 1px solid var(--border);
}

.hub-table thead th {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text);
  background: var(--surface2);
  white-space: nowrap;
}

.hub-table tbody th {
  font-weight: 500;
  color: var(--text);
}

.hub-table tbody td { color: var(--text2); }

.hub-table tr:last-child th,
.hub-table tr:last-child td { border-bottom: none; }

.hub-table .hub-table-accent {
  color: var(--green);
  font-weight: 600;
  background: rgba(52, 211, 153, 0.05);
}

.hub-table thead .hub-table-accent { color: var(--green); }

.hub-table .hub-table-strong { font-size: 1rem; font-weight: 700; }

/* ── ТАРИФ ── */
.hub-price-card {
  margin-top: 48px;
  max-width: 620px;
  background: linear-gradient(135deg, var(--surface) 0%, rgba(108, 99, 255, 0.07) 100%);
  border: 1px solid rgba(108, 99, 255, 0.35);
  border-radius: var(--radius);
  padding: 40px;
  position: relative;
  overflow: hidden;
}

.hub-price-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), var(--accent3), transparent);
}

.hub-price-head { margin-bottom: 28px; }

.hub-price-amount {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2.2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  background: linear-gradient(135deg, var(--accent2) 0%, var(--accent3) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hub-price-amount span {
  font-size: 1rem;
  font-weight: 500;
  margin-left: 10px;
  -webkit-text-fill-color: var(--text2);
  color: var(--text2);
}

.hub-price-sub { margin-top: 10px; font-size: 0.85rem; color: var(--text3); }

.hub-price-list {
  list-style: none;
  padding: 0;
  margin: 0 0 32px;
  display: grid;
  gap: 13px;
}

.hub-price-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 0.92rem;
  color: var(--text2);
  line-height: 1.6;
}

.hub-price-list i {
  color: var(--green);
  font-size: 1.05rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.hub-cta-wide { width: 100%; justify-content: center; }

/* ── FAQ ── */
.hub-faq-list { margin-top: 48px; }

.hub-final-cta {
  margin-top: 60px;
  text-align: center;
  padding: 48px 32px;
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  background: var(--surface);
}

.hub-final-cta h3 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

.hub-final-cta .hub-cta-note { margin: 14px auto 0; }

.hub-legal {
  margin-top: 40px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text3);
  line-height: 1.6;
}

.hub-legal a {
  color: var(--text2);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}

.hub-legal a:hover { color: var(--accent2); }

.hub-license { color: var(--text2); white-space: nowrap; }

/* Ссылка на granai.ru внутри текста — заметная, но не спорит с CTA */
.granai-link {
  color: var(--accent2);
  text-decoration: underline;
  text-decoration-color: rgba(167, 139, 250, 0.4);
  text-underline-offset: 3px;
  transition: color 0.2s, text-decoration-color 0.2s;
}

.granai-link:hover { color: var(--accent3); text-decoration-color: currentColor; }

.hub-include-card h3 .granai-link { color: inherit; text-decoration-color: rgba(255, 255, 255, 0.25); }
.hub-include-card h3 .granai-link:hover { color: var(--accent2); }

/* ── SCROLL REVEAL ── */
.page-template-page-ai-legal-hub .fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.page-template-page-ai-legal-hub .fade-up.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .page-template-page-ai-legal-hub .fade-up { opacity: 1; transform: none; transition: none; }
}

/* ── RESPONSIVE ── */
@media (max-width: 1100px) {
  .hub-hero-grid { gap: 40px; }
  .hub-problem-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .page-template-page-ai-legal-hub section { padding: 72px 0; }

  .hub-hero { padding: calc(var(--nav-h) + 48px) 0 64px !important; }
  /* На узких экранах иллюстрация уходит слоем под текст, а не отдельным блоком */
  .hub-hero-grid { grid-template-columns: 1fr; gap: 0; position: relative; }

  .hub-hero-visual {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 0;
    opacity: 0.26;
    pointer-events: none;
  }

  .hub-hero-visual::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, var(--bg) 85%);
  }

  .hub-hero-visual img { width: min(120%, 560px); }

  .hub-hero-text { position: relative; z-index: 1; }

  .hub-includes-grid { grid-template-columns: 1fr; }
  .hub-include-card--wide { flex-direction: column; align-items: flex-start; gap: 24px; }
  .hub-include-media { flex: none; width: 100%; max-width: 280px; }

  .hub-quote { padding: 26px 24px; }
  .hub-price-card { padding: 30px 24px; }
}

@media (max-width: 540px) {
  .hub-include-card,
  .hub-problem-card { padding: 24px 20px; }

  .hub-table th,
  .hub-table td { padding: 14px 16px; font-size: 0.87rem; }

  .hub-final-cta { padding: 36px 20px; }
  .hub-cta { width: 100%; justify-content: center; }
}
