/*
Theme Name: Grok Ru
Theme URI: https://grok-ai.click/
Description: Брендовая тёмная тема сайта Grok Ru — нейросеть Grok (xAI): возможности, модели, тарифы, Grok Imagine, доступ из России. Домен grok-ai.click.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: grok-ru
*/

/* ============================ 1. Токены ============================ */
:root {
	--bg:        #0A0A0B;
	--surface:   #141417;
	--surface-2: #1C1C22;
	--tint:      #141417;
	--text:      #F4F4F6;
	--muted:     #9A9AA4;
	--border:    #2A2A31;
	--accent:    #6C8CFF;
	--accent-2:  #9A6CFF;
	--white:     #FFFFFF;
	--star:      #E8B23A;
	--grad:      linear-gradient(135deg, #09299b, #9A6CFF);	--maxw:      1140px;
	--radius:    16px;
	--radius-sm: 10px;
}

/* ============================ 2. Сброс/база ============================ */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	font-size: 17px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { font-family: 'Space Grotesk', 'Inter', sans-serif; font-weight: 600; line-height: 1.15; color: var(--white); margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.15rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.15rem); margin-top: 0; padding-bottom: 20px;}
h3 { font-size: 1.24rem; }
p { margin: 0 0 1.05em; }
a { color: var(--accent); text-decoration: none; transition: color .15s; }
a:hover { color: #93a9ff; }
strong { color: var(--white); font-weight: 600; }
img, svg { max-width: 100%; }
ul, ol { margin: 0 0 1.1em; padding-left: 1.3em; }
li { margin: .35em 0; }

/* ============================ 3. Раскладка ============================ */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.wrap--narrow { max-width: 760px; }
.section { padding: 72px 0; border-top: 1px solid transparent; }
.section--tint { background: var(--tint); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section--panel { background: var(--surface); }
.section--hero-sub { padding-top: 56px; padding-bottom: 48px; }
.prose > *:last-child { margin-bottom: 0; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; color: var(--text); }
.lead { font-size: 1.24rem; line-height: 1.55; color: var(--text); margin-bottom: 1em; }
.tldr { background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--radius-sm); padding: 16px 20px; margin: 1.4em 0; color: var(--muted); }
.tldr strong { color: var(--white); }

/* ============================ 4. Кнопки ============================ */
.btn { display: inline-flex; align-items: center; gap: .5em; font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: .98rem; line-height: 1; padding: 13px 22px; border-radius: 999px; border: 1px solid transparent; cursor: pointer; transition: transform .12s, background .15s, border-color .15s; white-space: nowrap; }
.btn i, .btn svg { width: 18px; height: 18px; }
.btn--primary { background: var(--white); color: #000; }
.btn--primary:hover { color: #000; transform: translateY(-1px); background: #e9e9ee; }
.btn--secondary { background: transparent; color: var(--text); border-color: var(--border); }
.btn--secondary:hover { color: var(--white); border-color: var(--accent); background: var(--surface-2); }
.btn--lg { padding: 16px 30px; font-size: 1.06rem; }
.btn--sm { padding: 10px 18px; font-size: .9rem; }

/* ============================ 5. Хедер ============================ */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(10,10,11,.82); backdrop-filter: saturate(140%) blur(14px); border-bottom: 1px solid var(--border); }
.site-header__inner { display: flex; align-items: center; gap: 20px; height: 66px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 1.22rem; color: var(--white); letter-spacing: -0.01em; }
.logo:hover { color: var(--white); }
.logo__icon { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 9px; background: var(--grad); box-shadow: 0 2px 14px rgba(108,140,255,.35); }
.logo__text { line-height: 1; }
.logo__ru { color: var(--accent); margin-left: 2px; }
.nav { display: flex; gap: 20px; margin-left: 8px; flex-wrap: wrap; }
.nav a { color: var(--muted); font-size: .95rem; font-weight: 500; }
.nav a:hover { color: var(--white); }
.cta-header { margin-left: auto; }
.cta-mobile { display: none; }
.burger { display: none; flex-direction: column; gap: 5px; width: 42px; height: 42px; align-items: center; justify-content: center; background: transparent; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; }
.burger span { display: block; width: 18px; height: 2px; background: var(--text); border-radius: 2px; }
.mobile-nav { display: none; flex-direction: column; padding: 8px 24px 20px; border-bottom: 1px solid var(--border); background: var(--bg); }
.mobile-nav a { color: var(--text); padding: 11px 0; border-bottom: 1px solid var(--border); font-weight: 500; }
.mobile-nav a:last-child { border-bottom: 0; }

@media (max-width: 1040px) { .nav { display: none; } .cta-header { display: none; } .cta-mobile { display: inline-flex; margin-left: auto; } .burger { display: inline-flex; } .mobile-nav[hidden] { display: none; } .mobile-nav:not([hidden]) { display: flex; } }
@media (max-width: 380px) { .logo__text { display: none; } }

/* ============================ 6. Крошки ============================ */
.crumbs { padding: 18px 0 0; font-size: .86rem; color: var(--muted); }
.crumbs a { color: var(--muted); } .crumbs a:hover { color: var(--white); }
.crumbs__sep { margin: 0 8px; opacity: .5; }
.crumbs__cur { color: var(--text); }

/* ============================ 7. Hero (главная) ============================ */
.hero { position: relative; padding: 96px 0 84px; overflow: hidden; }
.hero::before { content: ""; position: absolute; top: -30%; left: 50%; transform: translateX(-50%); width: 900px; height: 600px; background: radial-gradient(ellipse at center, rgba(108,140,255,.18), rgba(154,108,255,.06) 45%, transparent 70%); pointer-events: none; }
.hero__inner { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.hero__badge { display: inline-flex; align-items: center; gap: 8px; font-family: 'JetBrains Mono', monospace; font-size: .8rem; color: var(--muted); background: var(--surface); border: 1px solid var(--border); padding: 7px 14px; border-radius: 999px; margin-bottom: 22px; }
.hero__badge b { color: var(--accent); font-weight: 500; }
.hero h1 { margin-bottom: .35em; }
.hero__lead { font-size: 1.28rem; color: var(--muted); line-height: 1.55; margin-bottom: 1.4em; }
.hero__lead strong { color: var(--text); }
.hero__cta { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.hero__rating { display: flex; align-items: center; gap: 10px; margin-top: 26px; color: var(--muted); font-size: .92rem; }
.hero__panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.hero__panel h3 { font-size: 1rem; color: var(--muted); font-weight: 500; margin-bottom: 16px; font-family: 'JetBrains Mono', monospace; }
.hero__feat { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); }
.hero__feat:first-of-type { border-top: 0; }
.hero__feat i { width: 20px; height: 20px; color: var(--accent); flex-shrink: 0; margin-top: 2px; }
.hero__feat b { display: block; color: var(--white); font-weight: 600; font-size: .98rem; font-family: 'Space Grotesk', sans-serif; }
.hero__feat span { color: var(--muted); font-size: .9rem; }
.hero__panel--video { padding: 0; overflow: hidden; line-height: 0; display: flex;
    align-self: start;}
.hero__panel-video { display: block; width: 100%; height: auto; }
@media (max-width: 900px) { .hero__inner { grid-template-columns: 1fr; gap: 34px; } .hero { padding: 60px 0 56px; } .hero__panel--video {max-width: 420px;
    margin: 0 auto;}}

/* ============================ 8. Сетки/карточки ============================ */
.grid { display: grid; gap: 20px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; transition: border-color .15s, transform .12s; }
.card:hover { border-color: #3a3a44; transform: translateY(-2px); }
.card__icon { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--border); margin-bottom: 14px; }
.card__icon i, .card__icon svg { width: 22px; height: 22px; color: var(--accent); }
.card h3 { margin-bottom: .35em; }
.card p { color: var(--muted); margin-bottom: 0; font-size: .96rem; }
/* Алиас-сетка для карточек без .grid-обёртки + прямые иконки в .card */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 1.4em 0; }
@media (max-width: 900px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .cards { grid-template-columns: 1fr; } }
.card > svg, .card > i { width: 26px; height: 26px; color: var(--accent); stroke: currentColor; margin-bottom: 12px; display: block; }

/* ============================ 9. Таблицы ============================ */
.table-wrap { overflow-x: auto; margin: 1.4em 0; border: 1px solid var(--border); border-radius: var(--radius); }
table.data { width: 100%; border-collapse: collapse; font-size: .95rem; min-width: 520px; }
table.data th, table.data td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--border); }
table.data thead th { background: var(--surface); color: var(--white); font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: .9rem; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: var(--surface); }
table.data td { color: var(--muted); }
table.data td:first-child { color: var(--text); font-weight: 500; }

/* Мобилка: таблица → карточки по строкам, без горизонтальной прокрутки. Требует data-label на каждом <td> (= текст <th> этой колонки). */
@media (max-width: 640px) {
	.table-wrap { overflow-x: visible; border: 0; }
	table.data { min-width: 0; }
	table.data thead { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
	table.data, table.data tbody, table.data tr, table.data td { display: block; width: 100%; }
	table.data tr { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 12px; overflow: hidden; background: var(--surface); }
	table.data tr:last-child { margin-bottom: 0; }
	table.data td { padding: 10px 14px 10px 44%; position: relative; min-height: 20px; }
	table.data tr td:last-child { border-bottom: 0; }
	table.data td::before { content: attr(data-label); position: absolute; left: 14px; top: 10px; width: 38%; font-weight: 600; font-size: .82rem; color: var(--muted); }
}

/* ============================ 10. Чеклист/шаги/split ============================ */
.checklist { list-style: none; padding: 0; margin: 1.2em 0; }
.checklist li { position: relative; padding-left: 30px; margin: .6em 0; color: var(--text); }
.checklist li::before { content: ""; position: absolute; left: 0; top: 6px; width: 18px; height: 18px; border-radius: 50%; background: var(--grad); }
.checklist li::after { content: ""; position: absolute; left: 6px; top: 10px; width: 6px; height: 3px; border-left: 2px solid #0A0A0B; border-bottom: 2px solid #0A0A0B; transform: rotate(-45deg); }
.steps { list-style: none; counter-reset: s; padding: 0; margin: 1.4em 0; }
.steps li { position: relative; padding-left: 52px; margin: 1em 0; min-height: 36px; }
.steps li::before { counter-increment: s; content: counter(s); position: absolute; left: 0; top: 0; width: 36px; height: 36px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); color: var(--accent); font-family: 'Space Grotesk', sans-serif; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.split { display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; align-items: start; margin: 1.4em 0; }
.split__aside { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; color: var(--muted); font-size: .95rem; }
.split__aside h3 { font-size: 1.05rem; margin-bottom: .5em; }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; } }

/* ============================ 11. Тарифы ============================ */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 1.6em 0; }
@media (max-width: 900px) { .plans { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; } }
.plan { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; display: flex; flex-direction: column; }
.plan--best { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 20px 60px rgba(108,140,255,.15); }
.plan__badge { position: absolute; top: -11px; left: 26px; background: var(--grad); color: #fff; font-size: .74rem; font-weight: 600; padding: 4px 12px; border-radius: 999px; font-family: 'Space Grotesk', sans-serif; }
.plan__name { font-family: 'JetBrains Mono', monospace; font-size: .92rem; color: var(--muted); margin-bottom: 12px; }
.plan__price { font-family: 'Space Grotesk', sans-serif; font-size: 2.3rem; font-weight: 700; color: var(--white); line-height: 1; }
.plan__price span { font-size: 1rem; color: var(--muted); font-weight: 500; }
.plan__tag { color: var(--muted); font-size: .95rem; margin: 12px 0 18px; flex-grow: 1; }
.plan .btn { width: 100%; justify-content: center; }

/* ============================ 12. FAQ ============================ */
.faq { margin: 1.4em 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.faq__item { border-bottom: 1px solid var(--border); }
.faq__item:last-child { border-bottom: 0; }
.faq__question { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; background: transparent; border: 0; text-align: left; padding: 18px 22px; color: var(--white); font-family: 'Space Grotesk', sans-serif; font-weight: 500; font-size: 1.05rem; cursor: pointer; }
.faq__question i { width: 20px; height: 20px; color: var(--muted); transition: transform .2s; flex-shrink: 0; }
.faq__item.is-open .faq__question i { transform: rotate(180deg); }
.faq__answer { max-height: 0; overflow: hidden; transition: max-height .25s ease; }
.faq__item.is-open .faq__answer { max-height: 600px; }
.faq__answer p { padding: 0 22px 18px; margin: 0; color: var(--muted); }
.faq__answer a { color: var(--accent); }

/* ============================ 13. Звёзды ============================ */
.stars { position: relative; display: inline-flex; white-space: nowrap; line-height: 0; vertical-align: middle; }
.stars__bg, .stars__fg { display: flex; gap: 2px; }
.stars__bg { color: #3a3a42; }
.stars__fg { position: absolute; inset: 0; overflow: hidden; color: var(--star); }
.stars svg { width: var(--star-size, 18px); height: var(--star-size, 18px); flex-shrink: 0; fill: currentColor; stroke: currentColor; }

/* ============================ 14. Отзывы ============================ */
.reviews { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin: 1.6em 0; }
@media (max-width: 720px) { .reviews { grid-template-columns: 1fr; } }
.review { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.review__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.review__author { font-family: 'Space Grotesk', sans-serif; font-weight: 600; color: var(--white); }
.review__role { color: var(--muted); font-size: .85rem; }
.review__date { color: var(--muted); font-size: .82rem; }
.review__text { color: var(--muted); font-size: .96rem; margin: 0; }

/* rating summary */
.rating-hero { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin: 1.4em 0; }
.rating-hero__num { font-family: 'Space Grotesk', sans-serif; font-size: 3.2rem; font-weight: 700; color: var(--white); line-height: 1; }
.rating-hero__meta { color: var(--muted); font-size: .95rem; }

/* ============================ 15. CTA-band ============================ */
.cta-band { padding: 76px 0; background: var(--surface); border-top: 1px solid var(--border); position: relative; overflow: hidden; }
.cta-band::before { content: ""; position: absolute; bottom: -50%; left: 50%; transform: translateX(-50%); width: 800px; height: 500px; background: radial-gradient(ellipse at center, rgba(108,140,255,.16), transparent 70%); }
.cta-band__inner { position: relative; text-align: center; max-width: 640px; margin: 0 auto; }
.cta-band h2 { margin-bottom: .4em; }
.cta-band p { color: var(--muted); margin-bottom: 1.6em; }

/* ============================ 16. Футер ============================ */
.site-footer { background: var(--bg); border-top: 1px solid var(--border); padding: 56px 0 32px; }
.site-footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 820px) { .site-footer__grid { grid-template-columns: 1fr 1fr; gap: 26px; } }
@media (max-width: 480px) { .site-footer__grid { grid-template-columns: 1fr; } }
.logo--footer { margin-bottom: 14px; }
.site-footer__tagline { color: var(--muted); font-size: .92rem; max-width: 320px; }
.site-footer__col h3 { font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-family: 'JetBrains Mono', monospace; font-weight: 500; margin-bottom: 14px; }
.site-footer__col a { display: block; color: var(--text); padding: 5px 0; font-size: .95rem; }
.site-footer__col a:hover { color: var(--accent); }
.site-footer__bottom { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer__disclaimer { color: var(--muted); font-size: .82rem; max-width: 720px; margin: 0; }
.site-footer__copy { color: var(--muted); font-size: .82rem; margin: 0; }

/* ============================ 17. Утилиты ============================ */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.badge-mono { font-family: 'JetBrains Mono', monospace; font-size: .82rem; color: var(--accent); background: var(--surface-2); border: 1px solid var(--border); padding: 3px 9px; border-radius: 6px; }
