/* ============================================================
   Tehnukte — дизайн-система по макету tehnuckte.codecrafters.kz
   Действует только на страницах с <body class="theme-v2">.
   Страницы переводятся на неё по одной; когда переведены все,
   файл сливается со style.css.
   Цвета LEGO Education здесь не используются (ТЗ 2.4).
   ============================================================ */

body.theme-v2 {
  --t-ink: #2F2F34;
  --t-accent: #EE5A1F;
  --t-accent-hover: #D94C14;
  --t-cream: #FBF8F4;
  --t-gray: #F4F3F0;
  --t-gray-hover: #ECEBE7;
  --t-line: #ECEBE8;
  --t-muted: #62626A;
  --t-subtle: #8A8A92;
  --t-tile: #EDE9E3;
  --t-font: "Onest", system-ui, sans-serif;

  background: #fff;
  color: var(--t-ink);
  font-family: var(--t-font);
  line-height: normal;
  -webkit-font-smoothing: antialiased;
}
body.theme-v2 h1, body.theme-v2 h2, body.theme-v2 h3, body.theme-v2 h4 { font-family: var(--t-font); letter-spacing: normal; }
body.theme-v2 input, body.theme-v2 textarea, body.theme-v2 button, body.theme-v2 select { font-family: inherit; }
body.theme-v2 a { color: var(--t-ink); }
body.theme-v2 a:hover { color: var(--t-accent); }
body.theme-v2 .container { max-width: 1280px; padding: 0 32px; }

/* Фокус с клавиатуры: графит на светлом, белый на тёмном и оранжевом.
   Красная обводка из style.css на этих фонах почти не видна. */
body.theme-v2 :focus-visible { outline: 2px solid var(--t-ink); outline-offset: 3px; }
body.theme-v2 .topbar :focus-visible, body.theme-v2 footer.main :focus-visible { outline: 2px solid #fff; }

/* ----- Раскладка секций ----- */
body.theme-v2 .t-section { padding: 104px 0; }
body.theme-v2 .t-cream { background: var(--t-cream); }
body.theme-v2 .t-split {
  display: grid; gap: 56px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--split-min, 380px)), 1fr));
}
body.theme-v2 .t-head-split {
  display: grid; gap: 20px 56px; align-items: end; margin-bottom: 48px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
}
body.theme-v2 .t-head-split > p { margin: 0; font-size: 17px; line-height: 1.55; color: var(--t-muted); max-width: 460px; }

/* ----- Заголовок секции ----- */
body.theme-v2 .section-head {
  display: flex; flex-direction: column; gap: 14px;
  max-width: none; margin: 0; text-align: left;
}
body.theme-v2 .section-tag {
  display: block; margin: 0;
  font-family: inherit; font-size: 15px; font-weight: 600;
  color: var(--t-accent); text-transform: none; letter-spacing: normal;
}
body.theme-v2 .section-tag::before { content: none; }
body.theme-v2 .section-head h2 {
  margin: 0; font-weight: 800; font-size: clamp(32px, 4vw, 52px);
  line-height: 1.06; letter-spacing: -0.03em; text-wrap: balance;
}
body.theme-v2 .section-head p { margin: 0; font-size: 17px; line-height: 1.55; color: var(--t-muted); }

/* ----- Кнопки ----- */
body.theme-v2 .btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 17px 28px; border-radius: 999px;
  font-size: 17px; font-weight: 600; line-height: 1.2;
  transform: none; box-shadow: none;
  transition: background .2s, color .2s, border-color .2s;
}
body.theme-v2 .btn-primary, body.theme-v2 .btn-primary:hover { color: #fff; border: 0; transform: none; box-shadow: none; }
body.theme-v2 .btn-primary { background: var(--t-accent); }
body.theme-v2 .btn-primary:hover { background: var(--t-accent-hover); }
body.theme-v2 .btn-outline { background: transparent; border: 2px solid var(--t-ink); color: var(--t-ink); }
body.theme-v2 .btn-outline:hover { background: var(--t-ink); border-color: var(--t-ink); color: #fff; }

/* ----- Верхняя полоса ----- */
body.theme-v2 .topbar { background: var(--t-ink); color: rgba(255,255,255,.75); font-size: 13px; padding: 9px 0; }
body.theme-v2 .topbar .container { gap: 12px; }
body.theme-v2 .topbar-info { gap: 24px; opacity: 1; font-family: inherit; font-size: 13px; letter-spacing: normal; }
body.theme-v2 .topbar-info span + span { border-left: 0; padding-left: 0; }
body.theme-v2 .topbar-info span:first-child { color: #fff; font-weight: 600; }
body.theme-v2 .lang-switcher { gap: 2px; }
body.theme-v2 .lang-switcher button {
  border: 0; border-radius: 999px; padding: 4px 10px;
  background: transparent; color: rgba(255,255,255,.7);
  font-size: 12px; font-weight: 600;
}
body.theme-v2 .lang-switcher button:hover { background: rgba(255,255,255,.08); }
body.theme-v2 .lang-switcher button.active { background: var(--t-accent); color: #fff; }

/* ----- Шапка ----- */
body.theme-v2 header.main {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.94);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--t-line); box-shadow: none;
}
/* .nav — это ещё и .container, поэтому боковые поля не трогаем */
body.theme-v2 .nav { justify-content: flex-start; gap: 28px; padding-top: 16px; padding-bottom: 16px; }
body.theme-v2 .logo img { width: auto; height: 38px; }
body.theme-v2 .nav-links { flex: 1 1 auto; min-width: 0; gap: 20px; font-size: 15px; font-weight: 500; white-space: nowrap; }
body.theme-v2 .nav-links a { color: var(--t-ink); }
body.theme-v2 .nav-links a:hover, body.theme-v2 .nav-links a.active { color: var(--t-accent); }
body.theme-v2 .nav-links a.active::after { content: none; }
/* «Войти» / «Кабинет» вставляет сервер (server/pages.js) */
body.theme-v2 .nav-account {
  flex: none; margin-left: 0; max-width: none;
  padding: 10px 14px; border: 0; border-radius: 0; background: none;
  font-size: 15px; font-weight: 500; color: var(--t-ink);
}
body.theme-v2 .nav-account:hover, body.theme-v2 .nav-account.active { background: none; color: var(--t-accent); }
body.theme-v2 .nav-account + .nav-cta { margin-left: -20px; }
body.theme-v2 .nav-cta {
  display: flex; align-items: center; gap: 10px; flex: none; min-height: 42px;
  padding: 9px 10px 9px 18px; border-radius: 999px;
  background: var(--t-gray); color: var(--t-ink);
  font-size: 15px; font-weight: 600; transform: none;
}
body.theme-v2 .nav-cta:hover { background: var(--t-gray-hover); color: var(--t-ink); transform: none; }
body.theme-v2 .nav-cta:has(.badge.hidden) { padding: 9px 18px; }
body.theme-v2 .nav-cta .badge {
  position: static; display: grid; place-items: center;
  min-width: 24px; width: auto; height: 24px; padding: 0 6px;
  border: 0; border-radius: 999px;
  background: var(--t-accent); color: #fff; font-size: 12px; font-weight: 700;
}
body.theme-v2 .nav-cta .badge.hidden { display: none; }
body.theme-v2 .nav-cta-ico { display: none; }
body.theme-v2 .burger span { background: var(--t-ink); }

/* ----- Частые вопросы (аккордеон из site.js) ----- */
body.theme-v2 .faq-list { max-width: none; margin: 0; display: flex; flex-direction: column; gap: 10px; }
body.theme-v2 .faq-item, body.theme-v2 .faq-item.open { margin: 0; border: 0; border-radius: 20px; background: #fff; box-shadow: none; }
body.theme-v2 .faq-q {
  padding: 22px 24px; gap: 20px; line-height: normal;
  font-size: 18px; font-weight: 600; letter-spacing: -0.01em; color: var(--t-ink);
}
body.theme-v2 .faq-q .ic {
  flex: none; width: 36px; height: 36px; border-radius: 999px;
  display: grid; place-items: center;
  background: var(--t-gray); color: var(--t-ink);
  transition: transform .2s ease-out, background .2s ease-out;
}
body.theme-v2 .faq-item.open .faq-q .ic { background: var(--t-accent); color: #fff; transform: rotate(45deg); }
body.theme-v2 .faq-a, body.theme-v2 .faq-item.open .faq-a {
  max-height: none; padding: 0 72px 24px 24px; transition: none;
  font-size: 16px; line-height: 1.6; color: var(--t-muted);
}
body.theme-v2 .faq-a[hidden] { display: none; }

/* ----- Формы ----- */
body.theme-v2 .form-card {
  display: flex; flex-direction: column; gap: 20px;
  padding: clamp(28px, 4vw, 44px); border: 0; border-radius: 32px;
  background: var(--t-gray); box-shadow: none;
}
body.theme-v2 .form-card h3 { margin: 0; font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
body.theme-v2 .form-card form { display: flex; flex-direction: column; gap: 20px; }
body.theme-v2 .form-row { margin: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
body.theme-v2 .form-group { margin: 0; display: flex; flex-direction: column; gap: 7px; }
body.theme-v2 .form-group label {
  margin: 0; font-size: 13px; font-weight: 500; color: var(--t-muted);
  text-transform: none; letter-spacing: normal;
}
body.theme-v2 .form-group input, body.theme-v2 .form-group select, body.theme-v2 .form-group textarea {
  height: 52px; padding: 0 16px; border: 1.5px solid transparent; border-radius: 14px;
  background: #fff; color: var(--t-ink); font-size: 16px; outline: none; box-shadow: none;
}
body.theme-v2 .form-group textarea { height: auto; min-height: 0; padding: 14px 16px; resize: vertical; }
body.theme-v2 .form-group input:focus, body.theme-v2 .form-group select:focus, body.theme-v2 .form-group textarea:focus {
  border-color: var(--t-accent); box-shadow: 0 0 0 3px rgba(238,90,31,.22);
}
body.theme-v2 .form-actions { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
body.theme-v2 .form-submit {
  width: auto; margin: 0; padding: 16px 32px; border: 0; border-radius: 999px;
  background: var(--t-accent); color: #fff; font-size: 16px; font-weight: 600;
}
body.theme-v2 .form-submit:hover { background: var(--t-accent-hover); }
body.theme-v2 .form-note { margin: 0; max-width: 300px; text-align: left; font-size: 13px; line-height: 1.4; color: var(--t-subtle); }
body.theme-v2 .form-success, body.theme-v2 .form-error {
  margin: 0; padding: 14px 18px; border-radius: 14px; background: #fff;
  font-size: 15px; font-weight: 500;
}
body.theme-v2 .form-success { border: 2px solid var(--t-accent); color: var(--t-ink); }
body.theme-v2 .form-error { border: 2px solid var(--t-accent-hover); color: var(--t-accent-hover); }

/* ----- Подвал ----- */
body.theme-v2 footer.main { background: var(--t-ink); color: rgba(255,255,255,.7); padding: 72px 0 36px; }
body.theme-v2 .footer-grid {
  display: grid; gap: 40px; margin-bottom: 56px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
}
body.theme-v2 .footer-brand .logo { margin-bottom: 16px; }
body.theme-v2 .footer-brand .logo img { width: auto; height: 38px; }
body.theme-v2 .footer-brand p { max-width: 300px; font-size: 14px; line-height: 1.6; opacity: 1; }
body.theme-v2 .footer-col h4 { margin-bottom: 12px; color: #fff; font-size: 15px; font-weight: 600; text-transform: none; letter-spacing: normal; }
body.theme-v2 .footer-col li { margin-bottom: 12px; font-size: 14px; }
body.theme-v2 .footer-col a { color: rgba(255,255,255,.7); opacity: 1; }
body.theme-v2 .footer-col a:hover { color: #fff; }
body.theme-v2 .reseller-badge-slot:empty { display: none; }
body.theme-v2 .footer-bottom {
  display: block; padding-top: 28px; border-top: 1px solid rgba(255,255,255,.12);
  font-size: 12px; line-height: 1.5; color: rgba(255,255,255,.75); opacity: 1;
}
body.theme-v2 .legal-line {
  margin-top: 10px; padding-top: 0; border-top: 0; max-width: none;
  font-size: 12px; line-height: 1.5; color: rgba(255,255,255,.5);
}

/* ----- Адаптив ----- */
/* Восемь пунктов меню, «Войти» и кнопка заявки в одну строку помещаются
   только с 1181px (самый длинный — казахский). Уже — бургер, а не 980px, как в style.css. */
@media (max-width: 1180px) {
  body.theme-v2 .nav-links { display: none; }
  body.theme-v2 .nav-links.open {
    display: flex; flex-direction: column; gap: 14px;
    position: absolute; top: 100%; left: 0; right: 0;
    padding: 20px 32px; background: #fff;
    border-bottom: 1px solid var(--t-line); box-shadow: 0 12px 40px rgba(47,47,52,.08);
  }
  body.theme-v2 .burger { display: block; }
  body.theme-v2 .nav-account { margin-left: auto; }
}
@media (max-width: 600px) {
  body.theme-v2 .topbar-info { display: flex; }
  body.theme-v2 .nav { gap: 8px; }
  body.theme-v2 .logo img { height: 32px; }
  body.theme-v2 .nav-account { padding: 8px 10px; }
  body.theme-v2 .nav-account + .nav-cta { margin-left: 0; }
  body.theme-v2 .nav-cta, body.theme-v2 .nav-cta:has(.badge.hidden) { gap: 6px; padding: 9px 12px; }
  /* Текст кнопки скрыт визуально, но остаётся именем ссылки для скринридеров */
  body.theme-v2 .nav-cta > span:first-child {
    display: block; position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap;
  }
  body.theme-v2 .nav-cta-ico { display: block; width: 18px; height: 18px; }
}

/* ============================================================
   Компоненты внутренних страниц (t-*). Собраны из блоков главной,
   чтобы все страницы говорили одним языком. Стили одной страницы —
   в assets/pages/<страница>.css, общие правила — здесь.
   ============================================================ */
body.theme-v2 {
  --c-yellow: #F6B500; --c-blue: #00B4D8; --c-green: #0E8F7E; --c-purple: #5B3FA8;
  --t-radius: 24px; --t-radius-lg: 32px;
}
body.theme-v2 .t-lead { margin: 0; font-size: 19px; line-height: 1.55; color: var(--t-muted); max-width: 560px; text-wrap: pretty; }
body.theme-v2 .t-actions { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 6px; }

/* ----- Первый экран страницы: текст слева, объект в круге справа ----- */
/* style.css даёт каждой <section> padding: 90px 0 — у первого экрана отступы задаёт сетка */
body.theme-v2 .t-page-hero { padding: 0; background: var(--t-cream); overflow: hidden; }
body.theme-v2 .t-page-hero-grid {
  display: grid; align-items: center; gap: 48px; padding-top: 72px; padding-bottom: 80px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr));
}
body.theme-v2 .t-page-hero-copy { display: flex; flex-direction: column; gap: 22px; }
body.theme-v2 .t-page-hero h1 {
  margin: 0; font-weight: 800; font-size: clamp(38px, 5vw, 64px);
  line-height: 1.04; letter-spacing: -0.035em; text-wrap: balance;
}
body.theme-v2 .t-page-hero--compact .t-page-hero-grid { padding-top: 56px; padding-bottom: 56px; }

/* ----- Объект в цветном круге ----- */
body.theme-v2 .t-art { --art: var(--t-gray); position: relative; width: 100%; max-width: 480px; justify-self: center; padding: 26px; }
body.theme-v2 .t-art-circle { position: relative; aspect-ratio: 1 / 1; border-radius: 50%; background: var(--art); }
body.theme-v2 .t-art img {
  position: absolute; left: 50%; bottom: 12%; transform: translateX(-50%);
  width: 82%; height: auto; max-height: 78%; object-fit: contain; pointer-events: none;
  filter: drop-shadow(0 18px 30px rgba(47,47,52,.22));
}
body.theme-v2 .t-art--arc::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: 16px solid var(--t-accent); border-right-color: transparent; border-bottom-color: transparent;
  transform: rotate(-20deg);
}
body.theme-v2 .t-art-chip {
  position: absolute; right: 2%; bottom: 10%; z-index: 1;
  display: flex; flex-direction: column; gap: 2px;
  padding: 16px 20px; border-radius: 20px; background: #fff;
  box-shadow: 0 12px 40px rgba(47,47,52,.14);
}
body.theme-v2 .t-art-chip span { font-size: 13px; color: var(--t-muted); }
body.theme-v2 .t-art-chip strong { font-size: 17px; font-weight: 700; }

/* ----- Сетки и карточки ----- */
body.theme-v2 .t-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--min, 300px)), 1fr)); }
body.theme-v2 .t-card {
  display: flex; flex-direction: column; gap: 12px;
  padding: 28px; border-radius: var(--t-radius); background: #fff; color: var(--t-ink);
  border: 1px solid var(--t-line);
}
body.theme-v2 .t-cream .t-card { border-color: transparent; }
body.theme-v2 .t-card--soft { background: var(--t-gray); border-color: transparent; }
body.theme-v2 .t-card--color { --card: var(--t-accent); background: var(--card); border-color: transparent; color: #fff; }
body.theme-v2 .t-card--color h3, body.theme-v2 .t-card--color h4, body.theme-v2 .t-card--color p, body.theme-v2 .t-card--color a, body.theme-v2 .t-card--color li, body.theme-v2 .t-card--color span { color: inherit; }
body.theme-v2 .t-card h3 { margin: 0; font-size: 21px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.25; }
body.theme-v2 .t-card p { margin: 0; font-size: 16px; line-height: 1.55; color: var(--t-muted); }
body.theme-v2 .t-card--color p { color: rgba(255,255,255,.88); }
body.theme-v2 .t-card-icon {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  background: var(--t-gray); color: var(--t-accent);
}
body.theme-v2 .t-card-icon svg { width: 22px; height: 22px; }

/* ----- Плитка с объектом на цветном круге, как «Почему Tehnukte» ----- */
body.theme-v2 .t-tile { display: flex; flex-direction: column; gap: 18px; }
body.theme-v2 .t-tile-img {
  --tile: var(--c-yellow);
  position: relative; aspect-ratio: 3 / 2; overflow: hidden; border-radius: var(--t-radius);
  background: radial-gradient(circle at 76% 82%, var(--tile) 0 46%, transparent calc(46% + 1px)), #fff;
}
body.theme-v2 .t-tile-img img {
  position: absolute; left: 50%; top: 50%; transform: translate(-46%, -48%);
  width: 70%; height: 80%; object-fit: contain;
  filter: drop-shadow(0 14px 22px rgba(47,47,52,.2));
}
body.theme-v2 .t-tile-body { display: flex; flex-direction: column; gap: 8px; }
body.theme-v2 .t-tile-body h3 { margin: 0; font-size: 21px; font-weight: 700; letter-spacing: -0.02em; }
body.theme-v2 .t-tile-body p { margin: 0; font-size: 16px; line-height: 1.55; color: var(--t-muted); }

/* ----- Нумерованные шаги ----- */
body.theme-v2 .t-steps { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
body.theme-v2 .t-step { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 20px; padding: 26px 0; border-top: 1px solid var(--t-line); }
body.theme-v2 .t-step-num {
  width: 44px; height: 44px; border-radius: 999px; border: 2px solid var(--t-accent);
  display: grid; place-items: center; color: var(--t-accent); font-size: 14px; font-weight: 700;
}
body.theme-v2 .t-step > div { display: flex; flex-direction: column; gap: 6px; padding-top: 8px; }
body.theme-v2 .t-step h3 { margin: 0; font-size: 21px; font-weight: 700; letter-spacing: -0.02em; }
body.theme-v2 .t-step p { margin: 0; font-size: 16px; line-height: 1.55; color: var(--t-muted); }

/* ----- Оранжевый баннер ----- */
body.theme-v2 .t-band-wrap { padding: 96px 0; }
body.theme-v2 .t-band {
  position: relative; overflow: hidden; border-radius: 40px;
  padding: clamp(40px, 6vw, 72px); background: var(--t-accent); color: #fff;
  display: grid; gap: 28px 48px; align-items: center;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
}
body.theme-v2 .t-band::after {
  content: ""; position: absolute; width: 520px; height: 520px; right: -140px; top: -180px;
  border-radius: 50%; border: 56px solid rgba(255,255,255,.14); pointer-events: none;
}
body.theme-v2 .t-band > * { position: relative; z-index: 1; }
body.theme-v2 .t-band h2, body.theme-v2 .t-band h3, body.theme-v2 .t-band p { color: #fff; margin: 0; }
body.theme-v2 .t-band h2 { font-weight: 800; font-size: clamp(30px, 4vw, 50px); line-height: 1.05; letter-spacing: -0.035em; text-wrap: balance; }
body.theme-v2 .t-band p { font-size: 18px; line-height: 1.5; opacity: .95; }
body.theme-v2 .t-band .btn, body.theme-v2 .t-band .btn-primary { background: #fff; color: var(--t-ink); border: 0; }
body.theme-v2 .t-band .btn:hover { background: var(--t-ink); color: #fff; }
body.theme-v2 .t-band .btn-outline { background: transparent; border: 2px solid #fff; color: #fff; }
body.theme-v2 .t-band :focus-visible { outline-color: #fff; }

/* ----- Пилюли-фильтры, бейджи ----- */
body.theme-v2 .t-chips { display: flex; flex-wrap: wrap; gap: 8px; }
body.theme-v2 .t-chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 42px;
  padding: 10px 18px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--t-gray); color: var(--t-ink); font-size: 15px; font-weight: 600;
  transition: background .2s, color .2s;
}
body.theme-v2 .t-chip:hover { background: var(--t-gray-hover); color: var(--t-ink); }
body.theme-v2 .t-chip.active, body.theme-v2 .t-chip[aria-pressed="true"] { background: var(--t-accent); color: #fff; }
body.theme-v2 .t-badge {
  display: inline-flex; align-items: center; align-self: flex-start; gap: 6px;
  padding: 5px 12px; border-radius: 999px; background: #fff; color: var(--t-ink);
  font-size: 13px; font-weight: 600;
}

/* ----- Таблица ----- */
body.theme-v2 .t-table { width: 100%; border-collapse: separate; border-spacing: 0; border: 1px solid var(--t-line); border-radius: var(--t-radius); overflow: hidden; background: #fff; }
body.theme-v2 .t-table th, body.theme-v2 .t-table td { padding: 16px 20px; text-align: left; font-size: 15px; border-bottom: 1px solid var(--t-line); }
body.theme-v2 .t-table th { background: var(--t-gray); font-weight: 600; color: var(--t-muted); }
body.theme-v2 .t-table tr:last-child td { border-bottom: 0; }

@media (max-width: 600px) {
  body.theme-v2 .container { padding: 0 16px; }
  body.theme-v2 .t-section { padding: 72px 0; }
  body.theme-v2 .t-page-hero-grid { padding-top: 40px; padding-bottom: 48px; gap: 24px; }
  body.theme-v2 .t-band-wrap { padding: 64px 0; }
  body.theme-v2 .t-band { border-radius: 28px; }
  body.theme-v2 .t-card { padding: 22px; }
}
