/* ============================================================
   AI Solutions Hub — main.css
   Палитра логотипа: фон #F4F3EF, графит #141416, акцент #FF4A1C
   ========================================================== */

:root {
	--bg: #F4F3EF;
	--bg-card: #FFFFFF;
	--ink: #141416;
	--ink-soft: #4A4A4F;
	--accent: #FF4A1C;
	--accent-dark: #D93A12;
	--dark: #141416;
	--dark-card: #1E1E22;
	--line: rgba(20, 20, 22, .12);
	--radius: 16px;
	--font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
	font-family: var(--font);
	background: var(--bg);
	color: var(--ink);
	line-height: 1.65;
	font-size: 17px;
	-webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }
a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--accent); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container--narrow { max-width: 880px; }

/* ---------- Кнопки ---------- */
.btn {
	display: inline-block;
	padding: 15px 32px;
	border-radius: 999px;
	font-weight: 600;
	font-size: 16px;
	border: 2px solid transparent;
	cursor: pointer;
	transition: all .25s ease;
}
.btn--accent { background: var(--accent); color: #fff; }
.btn--accent:hover { background: var(--accent-dark); color: #fff; transform: translateY(-2px); }
.btn--ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn--ghost:hover { background: var(--ink); color: var(--bg); }

/* ---------- Шапка ---------- */
.header {
	position: sticky; top: 0; z-index: 100;
	background: rgba(244, 243, 239, .92);
	backdrop-filter: blur(12px);
	border-bottom: 1px solid var(--line);
}
.header__inner { display: flex; align-items: center; flex-wrap: nowrap; gap: 18px; padding-top: 12px; padding-bottom: 12px; max-width: 1320px; }
.header__logo { flex: none; }
.header__logo img { display: block; }

.nav { flex: 1; min-width: 0; }
.nav__list { display: flex; flex-wrap: nowrap; align-items: center; justify-content: center; list-style: none; gap: 14px; }
.nav__item { position: relative; flex: none; }
.nav__item > a { font-weight: 500; font-size: 14px; padding: 8px 0; display: inline-block; white-space: nowrap; line-height: 1.2; }
.nav__sub {
	display: none; position: absolute; top: 100%; left: -16px; min-width: 260px;
	background: var(--bg-card); border-radius: 12px; box-shadow: 0 18px 44px rgba(20,20,22,.14);
	list-style: none; padding: 10px; border: 1px solid var(--line);
}
.nav__sub a { display: block; padding: 9px 14px; border-radius: 8px; font-size: 14.5px; }
.nav__sub a:hover { background: var(--bg); color: var(--accent); }
.has-children:hover .nav__sub, .has-children:focus-within .nav__sub { display: block; }

.header__right { display: flex; align-items: center; flex-wrap: nowrap; gap: 14px; white-space: nowrap; flex: none; }
.header__phone { font-weight: 700; font-size: 14px; white-space: nowrap; }
.header__mail { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; color: var(--ink-soft); white-space: nowrap; flex: none; }
.header__mail:hover { color: var(--accent); }
.header__mail svg { flex: none; }
.lang-switch { display: flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--ink-soft); flex: none; }
.lang-switch__link { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-soft); padding: 4px 6px; border-radius: 8px; border: 1px solid transparent; white-space: nowrap; }
.lang-switch__link:hover { color: var(--accent); }
.lang-switch__link .flag { display: block; border-radius: 3px; }
.lang-switch__link.is-active { color: var(--accent); border-color: var(--line); background: var(--bg-card); }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; transition: .3s; }

/* ---------- Hero ---------- */
.hero {
	padding: 110px 0 90px;
	background:
		radial-gradient(800px 400px at 85% -10%, rgba(255,74,28,.14), transparent 60%),
		radial-gradient(600px 400px at -10% 110%, rgba(20,20,22,.08), transparent 60%);
}
.hero__tag { font-size: 14px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 22px; }
.hero h1 { font-size: clamp(32px, 4.6vw, 56px); line-height: 1.12; font-weight: 800; letter-spacing: -.02em; max-width: 900px; margin-bottom: 24px; }
.hero__sub { font-size: 19px; color: var(--ink-soft); max-width: 760px; margin-bottom: 36px; }
.hero__cta { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 56px; }
.hero__stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; border-top: 1px solid var(--line); padding-top: 36px; }
.stat b { display: block; font-size: 38px; font-weight: 800; color: var(--accent); letter-spacing: -.02em; }
.stat span { font-size: 14.5px; color: var(--ink-soft); }

/* ---------- Секции ---------- */
.section { padding: 84px 0; }
.section--dark { background: var(--dark); color: var(--bg); }
.section--dark .section__sub { color: rgba(244,243,239,.65); }
.section--accent { background: linear-gradient(135deg, rgba(255,74,28,.08), rgba(255,74,28,.02)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section__title { font-size: clamp(26px, 3.2vw, 40px); font-weight: 800; letter-spacing: -.02em; margin-bottom: 14px; }
.section__sub { color: var(--ink-soft); font-size: 18px; margin-bottom: 44px; max-width: 720px; }
.section__more { margin-top: 36px; text-align: center; }

/* ---------- Карточки услуг ---------- */
.cards { display: grid; gap: 20px; }
.cards--services { grid-template-columns: repeat(3, 1fr); }
.cards--services .card:first-child { grid-column: span 2; }
.cards--products { grid-template-columns: repeat(3, 1fr); }
.cards--cases { grid-template-columns: repeat(4, 1fr); }

.card {
	background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius);
	padding: 30px; display: flex; flex-direction: column; gap: 12px;
	transition: all .25s ease; color: var(--ink);
}
.card:hover { transform: translateY(-4px); box-shadow: 0 20px 44px rgba(20,20,22,.12); border-color: var(--accent); }
.card__num { font-size: 13px; font-weight: 700; color: var(--accent); letter-spacing: .1em; }
.card h3 { font-size: 20px; font-weight: 700; line-height: 1.3; }
.card p { font-size: 15px; color: var(--ink-soft); flex: 1; }
.card__link { font-weight: 600; font-size: 14.5px; color: var(--accent); }

.card--dark { background: var(--dark-card); border-color: rgba(244,243,239,.1); color: var(--bg); }
.card--dark p { color: rgba(244,243,239,.65); }
.card--dark:hover { box-shadow: 0 20px 44px rgba(0,0,0,.4); }

/* ---------- Кейсы ---------- */
.case-card {
	background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius);
	padding: 28px; display: flex; flex-direction: column; gap: 10px; transition: all .25s ease; color: var(--ink);
}
.case-card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: 0 20px 44px rgba(20,20,22,.12); }
.case-card b { font-size: 34px; font-weight: 800; color: var(--accent); letter-spacing: -.02em; }
.case-card span { font-size: 14.5px; color: var(--ink-soft); }

/* ---------- География ---------- */
.geo-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
.geo-card { background: var(--bg-card); border-radius: var(--radius); border: 1px solid var(--line); padding: 24px; }
.geo-card h3 { font-size: 18px; margin-bottom: 10px; }
.geo-card h3::before { content: ''; display: block; width: 34px; height: 4px; background: var(--accent); border-radius: 2px; margin-bottom: 14px; }
.geo-card p { font-size: 13.8px; color: var(--ink-soft); }

/* ---------- Почему мы ---------- */
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.why-card { padding: 26px; border-left: 3px solid var(--accent); background: var(--bg-card); border-radius: 0 var(--radius) var(--radius) 0; border-top: 1px solid var(--line); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.why-card h3 { font-size: 18px; margin-bottom: 8px; }
.why-card p { font-size: 14.5px; color: var(--ink-soft); }

/* ---------- Команда ---------- */
.team-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; max-width: 900px; }
.team-card { background: var(--dark-card); border-radius: var(--radius); padding: 32px; border: 1px solid rgba(244,243,239,.1); }
.team-card__avatar {
	width: 72px; height: 72px; border-radius: 50%; background: var(--accent); color: #fff;
	display: flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 800; margin-bottom: 18px;
}
.team-card__photo {
	width: 96px; height: 96px; border-radius: 50%; object-fit: cover; object-position: top;
	border: 3px solid var(--accent); margin-bottom: 18px;
}
.team-card h3 { font-size: 22px; margin-bottom: 4px; }
.team-card__role { color: var(--accent); font-weight: 600; font-size: 14.5px; margin-bottom: 12px; }
.team-card p:not(.team-card__role) { font-size: 14.5px; color: rgba(244,243,239,.7); }

/* ---------- FAQ ---------- */
.faq__item { border-bottom: 1px solid var(--line); }
.faq__q { font-size: 18px; font-weight: 700; padding: 22px 44px 22px 0; cursor: pointer; position: relative; }
.faq__q::after { content: '+'; position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font-size: 26px; color: var(--accent); font-weight: 400; transition: transform .25s; }
.faq__item.is-open .faq__q::after { transform: translateY(-50%) rotate(45deg); }
.faq__a { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.faq__a p { padding: 0 0 22px; color: var(--ink-soft); font-size: 15.5px; }
.faq__item.is-open .faq__a { max-height: 400px; }

/* ---------- Форма заявки ---------- */
.lead { background: var(--dark); color: var(--bg); padding: 84px 0; }
.lead__inner { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.lead h2 { font-size: clamp(26px, 3vw, 38px); font-weight: 800; letter-spacing: -.02em; margin-bottom: 16px; }
.lead__text p { color: rgba(244,243,239,.7); font-size: 17px; margin-bottom: 26px; }
.lead__contacts { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.lead__contacts a { color: var(--bg); font-weight: 600; font-size: 18px; }
.lead__contacts a:hover { color: var(--accent); }
.lead__form { display: flex; flex-direction: column; gap: 14px; }
.lead__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.lead__form input, .lead__form textarea, .lead__form select {
	font-family: var(--font); font-size: 16px; padding: 15px 18px; border-radius: 12px;
	border: 1px solid rgba(244,243,239,.2); background: var(--dark-card); color: var(--bg); outline: none; width: 100%;
}
.lead__form select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--accent) 50%), linear-gradient(135deg, var(--accent) 50%, transparent 50%); background-position: calc(100% - 21px) 50%, calc(100% - 15px) 50%; background-size: 6px 6px; background-repeat: no-repeat; }
.lead__form select:invalid { color: rgba(244,243,239,.45); }
.lead__form input:focus, .lead__form textarea:focus, .lead__form select:focus { border-color: var(--accent); }
.lead__form input::placeholder, .lead__form textarea::placeholder { color: rgba(244,243,239,.45); }
.lead__check { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; color: rgba(244,243,239,.7); cursor: pointer; }
.lead__check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); }
.lead__form .btn { align-self: flex-start; border: 0; }
.lead__agree { font-size: 12.5px; color: rgba(244,243,239,.5); }
.lead__agree a { color: rgba(244,243,239,.75); text-decoration: underline; }
.lead__notice { padding: 16px 20px; border-radius: 12px; margin-bottom: 16px; font-weight: 600; }
.lead__notice--ok { background: rgba(76, 200, 120, .15); color: #7de3a1; border: 1px solid rgba(76,200,120,.4); }
.lead__notice--err { background: rgba(255, 74, 28, .15); color: #ff9a7d; border: 1px solid rgba(255,74,28,.4); }
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

/* ---------- Контакты ---------- */
.contacts-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 44px; align-items: start; }
.contacts-info p { margin-bottom: 20px; font-size: 16.5px; }
.contacts-info b { display: block; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); margin-bottom: 4px; }
.contacts-info a { font-weight: 600; }
.contacts-hours { color: var(--ink-soft); font-size: 14.5px; }

/* ---------- Контентные страницы ---------- */
.page-hero { padding: 56px 0 0; }
.page-hero h1 { font-size: clamp(28px, 3.6vw, 44px); font-weight: 800; letter-spacing: -.02em; line-height: 1.15; margin-bottom: 14px; }
.page-hero__lead { font-size: 18.5px; color: var(--ink-soft); }
.breadcrumbs { font-size: 13.5px; color: var(--ink-soft); margin-bottom: 26px; }
.breadcrumbs a { color: var(--ink-soft); }
.breadcrumbs a:hover { color: var(--accent); }
.page-content { padding-top: 40px; }

.content h2 { font-size: 28px; font-weight: 800; margin: 44px 0 16px; letter-spacing: -.01em; }
.content h3 { font-size: 21px; font-weight: 700; margin: 32px 0 12px; }
.content p, .content li { font-size: 16.5px; margin-bottom: 14px; }
.content ul, .content ol { padding-left: 24px; margin-bottom: 18px; }
.content li { margin-bottom: 8px; }
.content strong { font-weight: 700; }
.content table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 15px; }
.content th, .content td { border: 1px solid var(--line); padding: 12px 16px; text-align: left; }
.content th { background: var(--dark); color: var(--bg); font-weight: 600; }
.content blockquote { border-left: 3px solid var(--accent); padding: 6px 0 6px 22px; margin: 24px 0; color: var(--ink-soft); font-style: italic; }
.content .btn { margin: 8px 0; }

.post-card { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; margin-bottom: 18px; }
.post-card h2 { font-size: 20px; margin-bottom: 8px; }
.post-card p { color: var(--ink-soft); font-size: 15px; }

/* ---------- Подвал ---------- */
.footer { background: var(--dark); color: var(--bg); padding: 64px 0 0; margin-top: 0; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px; padding-bottom: 48px; }
.footer h4 { font-size: 14px; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); margin-bottom: 14px; }
.footer p, .footer a { font-size: 14.5px; color: rgba(244,243,239,.72); }
.footer a:hover { color: var(--accent); }
.footer__brand img { margin-bottom: 16px; }
.footer__hours { font-size: 13px; opacity: .7; margin-top: 8px; }
.footer__bottom {
	display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
	border-top: 1px solid rgba(244,243,239,.12); padding-top: 22px; padding-bottom: 26px;
	font-size: 13.5px; color: rgba(244,243,239,.5);
}

/* ---------- Адаптив ---------- */
@media (max-width: 1024px) {
	.cards--services, .cards--products, .why-grid { grid-template-columns: repeat(2, 1fr); }
	.cards--cases { grid-template-columns: repeat(2, 1fr); }
	.geo-grid { grid-template-columns: repeat(3, 1fr); }
	.cards--services .card:first-child { grid-column: span 1; }
	.footer__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
	.header__mail { display: none; }
	.hero { padding: 64px 0 56px; }
	.hero__stats { grid-template-columns: repeat(2, 1fr); }
	.cards--services, .cards--products, .cards--cases, .why-grid, .team-grid, .geo-grid { grid-template-columns: 1fr; }
	.lead__inner, .contacts-grid { grid-template-columns: 1fr; }
	.section { padding: 56px 0; }
	.footer__grid { grid-template-columns: 1fr; }
}

/* === Контентные блоки страниц (v3) === */
.content img.page-photo { width: 100%; height: auto; border-radius: 18px; margin: 8px 0 26px; box-shadow: 0 14px 40px rgba(20,20,22,.10); }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin: 26px 0; }
.metric { background: var(--bg-card); border: 1px solid var(--line); border-radius: 16px; padding: 20px 22px; }
.metric b { display: block; font-size: 30px; line-height: 1.1; color: var(--accent); margin-bottom: 6px; letter-spacing: -.01em; }
.metric span { font-size: 14px; color: var(--ink-soft); }
.case-tag { display: inline-block; font-size: 13px; font-weight: 600; color: var(--accent); background: rgba(255,74,28,.08); border-radius: 999px; padding: 5px 14px; margin: 0 8px 10px 0; }
.industry-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin: 22px 0; }
.industry-card { background: var(--bg-card); border: 1px solid var(--line); border-radius: 16px; padding: 20px 22px; }
.industry-card h3 { font-size: 17px; margin: 0 0 8px; }
.industry-card p { font-size: 14.5px; color: var(--ink-soft); margin: 0; }

@media (max-width: 1500px) {
	.header__mail span { display: none; }
}
@media (max-width: 1280px) {
	.header__phone { display: none; }
	.header__inner { gap: 14px; }
}
@media (max-width: 1100px) {
	.nav { position: fixed; inset: 64px 0 auto 0; background: var(--bg-card); border-bottom: 1px solid var(--line); display: none; padding: 16px 24px 28px; }
	.nav.is-open { display: block; }
	.nav__list { flex-direction: column; align-items: flex-start; gap: 4px; }
	.nav__item > a { display: block; padding: 10px 0; font-size: 17px; }
	.nav__sub { position: static; display: block; box-shadow: none; border: 0; padding: 0 0 0 16px; }
	.nav-toggle { display: block; }
}
