/* Главная страница ShopMaster. Основа (цвета, кнопки, поля) — base.css. */

/* ── Шапка ── */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid transparent; }
.top.scrolled { border-bottom-color: var(--line); }
.top .wrap { display: flex; align-items: center; gap: 28px; height: 72px; }
.nav { display: flex; gap: 24px; margin-left: auto; }
.nav a { color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 16px; white-space: nowrap; }
.nav a:hover { color: var(--ink); }
.nav .nav-login { display: none; }
.top-actions { display: flex; gap: 12px; align-items: center; }
.lang { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius-s); overflow: hidden; }
.lang button { border: 0; background: none; color: var(--ink-3); font: 600 13px var(--text); padding: 0 10px; min-height: 36px; cursor: pointer; }
.lang button + button { border-left: 1px solid var(--line); }
.lang button[aria-pressed="true"] { background: var(--cobalt-soft); color: var(--cobalt); }
:lang(ka) .nav a { font-size: 15px; }
.theme-btn { width: 38px; height: 38px; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: var(--radius-s); background: none; color: var(--ink-2); cursor: pointer; padding: 0; }
.theme-btn:hover { color: var(--ink); border-color: var(--ink-3); }
.theme-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-btn .sun { display: none; }
:root[data-theme="dark"] .theme-btn .sun { display: block; }
:root[data-theme="dark"] .theme-btn .moon { display: none; }
@media (max-width: 1100px) { .nav { gap: 18px; } .nav a { font-size: 15px; } }
@media (max-width: 960px) {
  .menu-btn { display: inline-grid; }
  .nav { position: fixed; inset: 72px 0 auto 0; flex-direction: column; gap: 0; padding: 8px 16px 20px; background: var(--surface); border-bottom: 1px solid var(--line); display: none; margin: 0; box-shadow: 0 20px 40px -20px rgba(15, 30, 61, .35); }
  .nav.open { display: flex; }
  .nav a { padding: 14px 4px; font-size: 17px; border-bottom: 1px solid var(--line); }
  .nav .nav-login { display: block; color: var(--cobalt); font-weight: 600; border-bottom: 0; }
  .top-actions { margin-left: auto; }
  .login-link { display: none; }
}
@media (max-width: 380px) { .lang button { padding: 0 7px; } }

/* ── Первый экран: чертёж ── */
.hero { padding: 48px 0 40px; position: relative; overflow: hidden; }
.hero::before { /* миллиметровка */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    linear-gradient(color-mix(in srgb, var(--grid) 45%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in srgb, var(--grid) 45%, transparent) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  -webkit-mask-image: linear-gradient(to bottom, #000 60%, transparent);
  mask-image: linear-gradient(to bottom, #000 60%, transparent);
}
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(34px, 5vw, 62px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; max-width: 12em; }
:lang(ka) .hero h1 { font-size: clamp(30px, 4.2vw, 52px); letter-spacing: 0; line-height: 1.2; }
.hero .lead { margin-top: 24px; font-size: 19px; color: var(--ink-2); max-width: 32em; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.note { margin-top: 18px; font-size: 15px; color: var(--ink-3); }

.blueprint { margin: 0; position: relative; }
.blueprint svg { width: 100%; height: auto; overflow: visible; }
.bp-node rect { fill: var(--surface); stroke: var(--cobalt); stroke-width: 2; }
.bp-phone rect { stroke-width: 2.5; }
.bp-title { font: 600 19px var(--display); fill: var(--ink); }
.bp-sub { font: 400 13px var(--text); fill: var(--ink-3); }
:lang(ka) .bp-title { font-size: 16px; }
:lang(ka) .bp-sub { font-size: 11px; }
.bp-thin { stroke: var(--line); stroke-width: 4; stroke-linecap: round; }
.bp-bars { stroke: var(--cobalt); stroke-width: 8; stroke-linecap: round; opacity: .85; }
.bp-link { fill: none; stroke: var(--cobalt); stroke-width: 1.6; stroke-dasharray: 6 5; }
.bp-arrowhead { fill: var(--cobalt); }
.bp-dim { stroke: var(--ink-3); stroke-width: 1.2; fill: none; }
.bp-tick { stroke: var(--ink-3); stroke-width: 1.4; }
.bp-dimtext { font: 500 13px var(--text); fill: var(--ink-3); paint-order: stroke; stroke: var(--bg); stroke-width: 8px; stroke-linejoin: round; }
.bp-hand { fill: none; stroke: var(--ink-2); stroke-width: 1.6; stroke-linecap: round; }
.bp-handtext { font: 700 22px var(--hand); fill: var(--ink-2); }
:lang(ka) .bp-handtext { font: 500 14px var(--text); }
.bp-note text { paint-order: stroke; stroke: var(--bg); stroke-width: 6px; stroke-linejoin: round; }

/* Штамп чертежа — как в углу настоящего чертежа */
.stamp { display: grid; grid-template-columns: repeat(3, auto); justify-content: end; margin-top: 8px; border: 1.5px solid var(--ink-3); width: max-content; margin-left: auto; background: var(--surface); }
.stamp span { padding: 6px 12px; display: grid; }
.stamp span + span { border-left: 1.5px solid var(--ink-3); }
.stamp small { font-size: 11px; color: var(--ink-3); line-height: 1.2; }
.stamp b { font: 600 13px var(--display); color: var(--ink); line-height: 1.3; }

/* Одна сцена при загрузке: линии чертятся, потом появляются пометки */
@media (prefers-reduced-motion: no-preference) {
  .draw { stroke-dashoffset: 0; animation: bp-draw 1.4s ease-out both; }
  .bp-link.draw { animation-name: bp-draw-dash; }
  .bp-node { animation: bp-fade .5s ease-out both; }
  .bp-note { animation: bp-fade .6s ease-out both; animation-delay: 1.2s; }
  .bp-note.n2 { animation-delay: 1.45s; }
  .bp-note.n3 { animation-delay: 1.7s; }
}
@keyframes bp-draw { from { stroke-dasharray: 600; stroke-dashoffset: 600; } to { stroke-dasharray: 600; stroke-dashoffset: 0; } }
@keyframes bp-draw-dash { from { opacity: 0; clip-path: inset(0 100% 0 0); } to { opacity: 1; clip-path: inset(0 0 0 0); } }
@keyframes bp-fade { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 960px) {
  .hero { padding: 28px 0 64px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 36px; }
  .blueprint { max-width: 560px; }
}

/* ── Разделы ── */
.section { padding: 104px 0; }
.section-head { max-width: 760px; margin-bottom: 52px; }
.section-head p, .sec-lead { margin-top: 18px; font-size: 19px; color: var(--ink-2); max-width: 36em; }
@media (max-width: 700px) { .section { padding: 68px 0; } .section-head { margin-bottom: 36px; } .section-head p, .sec-lead { font-size: 17px; } }
.muted { color: var(--ink-3); }
.small { font-size: 14px; }

/* Услуги: три колонки, разделённые линиями чертежа, без карточек */
.services { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 2px solid var(--ink); }
.svc { padding: 32px 32px 8px 0; }
.svc + .svc { padding-left: 32px; border-left: 1px solid var(--line); }
.svc-head { display: flex; flex-direction: column; gap: 18px; }
.svc-ico { width: 48px; height: 48px; fill: none; stroke: var(--cobalt); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.svc h3 { font-size: 24px; }
:lang(ka) .svc h3 { font-size: 20px; }
.svc-lead { margin-top: 14px; color: var(--ink-2); }
.svc-list { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 0; }
.svc-list li { padding: 12px 0 12px 22px; border-top: 1px dashed var(--line); position: relative; font-size: 16px; }
.svc-list li::before { content: ""; position: absolute; left: 0; top: 21px; width: 10px; height: 2px; background: var(--cobalt); }
@media (max-width: 960px) {
  .services { grid-template-columns: 1fr; }
  .svc, .svc + .svc { padding: 28px 0 12px; border-left: 0; }
  .svc + .svc { border-top: 1px solid var(--line); }
  .svc-head { flex-direction: row; align-items: center; gap: 14px; }
  .svc-ico { width: 40px; height: 40px; flex: none; }
}

/* Подход — на синей «синьке» */
.approach { background: var(--ap-bg); color: var(--ap-ink); position: relative; }
.approach::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(var(--ap-grid) 1px, transparent 1px), linear-gradient(90deg, var(--ap-grid) 1px, transparent 1px);
  background-size: 32px 32px;
}
.approach .wrap { position: relative; }
.approach h2, .approach h3 { color: var(--ap-ink); }
.approach .section-head p { color: var(--ap-ink-2); }
.approach-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.approach-grid .section-head { margin-bottom: 0; }
.principles { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.principles li { padding: 20px 0; border-top: 1px solid var(--ap-line); display: grid; gap: 6px; }
.principles li:last-child { border-bottom: 1px solid var(--ap-line); }
.principles b { font: 600 19px var(--display); color: var(--ap-ink); }
:lang(ka) .principles b { font-size: 17px; }
.principles span { color: var(--ap-ink-2); }
.steps-title { margin-top: 88px; font-size: 22px; }
.steps { list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(5, 1fr); counter-reset: s; }
.steps li { counter-increment: s; padding: 22px 20px 0 0; border-top: 2px solid var(--marker); position: relative; }
.steps li::before { content: counter(s); position: absolute; top: -15px; left: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--marker); color: #16120A; font: 700 14px/28px var(--display); text-align: center; }
.steps b { display: block; font: 600 18px var(--display); color: var(--ap-ink); margin-top: 8px; }
.steps span { display: block; margin-top: 8px; color: var(--ap-ink-2); font-size: 15px; }
@media (max-width: 960px) {
  .approach-grid { grid-template-columns: 1fr; gap: 36px; }
  .steps-title { margin-top: 64px; }
  .steps { grid-template-columns: 1fr; gap: 0; border-left: 2px solid var(--marker); margin-left: 13px; }
  .steps li { border-top: 0; padding: 0 0 28px 30px; }
  .steps li::before { top: 0; left: -15px; }
  .steps b { margin-top: 2px; }
}

/* Готовые программы */
.products { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.product { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 32px; display: flex; flex-direction: column; }
.product::before { content: ""; width: 44px; height: 4px; border-radius: 2px; background: var(--cobalt); margin-bottom: 20px; }
.product.club::before { background: var(--brass); }
.product h3 { font-size: 22px; }
.product > p { margin-top: 12px; color: var(--ink-2); }
.ticks { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 8px; }
.ticks li { padding-left: 28px; position: relative; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: 7px; width: 12px; height: 7px; border-left: 2px solid var(--cobalt); border-bottom: 2px solid var(--cobalt); transform: rotate(-45deg); }
.product.club .ticks li::before { border-color: var(--brass); }
.ticks.big { margin: 28px 0 0; gap: 12px; font-size: 17px; }
.product .actions { margin-top: auto; padding-top: 28px; display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 900px) { .products { grid-template-columns: 1fr; } .product { padding: 26px 20px; } }

.pricing { margin-top: 28px; border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--surface); }
.pricing summary { cursor: pointer; padding: 18px 22px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.pricing summary::-webkit-details-marker { display: none; }
.pricing summary::after { content: "+"; font: 500 24px/1 var(--text); color: var(--ink-3); }
.pricing[open] summary::after { content: "−"; }
.pricing > *:not(summary) { margin-left: 22px; margin-right: 22px; }
.pricing > p:last-child { margin-bottom: 20px; margin-top: 14px; }
.switch { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius-s); overflow: hidden; margin-bottom: 18px; }
.switch button { border: 0; background: none; padding: 10px 16px; font: 500 15px var(--text); color: var(--ink-2); cursor: pointer; }
.switch button + button { border-left: 1px solid var(--line); }
.switch button[aria-pressed="true"] { background: var(--ink); color: var(--surface); }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.plan { border: 1px solid var(--line); border-radius: var(--radius-m); padding: 20px; display: flex; flex-direction: column; background: var(--bg); }
.plan h4 { margin: 0; font: 600 18px var(--display); }
.plan .price { font: 700 30px var(--display); margin-top: 10px; letter-spacing: -0.02em; }
.plan .price small { font: 400 14px var(--text); color: var(--ink-3); letter-spacing: 0; }
.plan .devices { color: var(--ink-2); font-size: 15px; margin-top: 4px; }
.plan p { color: var(--ink-3); font-size: 15px; margin-top: 10px; }

/* Кабинет в телефоне */
.cabinet-sec { background: var(--surface); border-block: 1px solid var(--line); }
.cabinet { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 56px; align-items: center; }
.phone { justify-self: center; width: 290px; padding: 12px; border-radius: 42px; background: var(--phone); box-shadow: 0 40px 80px -40px rgba(15, 30, 61, .55); }
.phone-screen { border-radius: 32px; background: var(--bg); padding: 22px 16px 14px; display: grid; gap: 12px; min-height: 520px; align-content: start; }
.ph-top { display: flex; justify-content: space-between; align-items: baseline; }
.ph-top b { font: 600 20px var(--display); }
.ph-top span { color: var(--ink-3); font-size: 13px; }
.ph-tile { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: grid; }
.ph-tile span { color: var(--ink-3); font-size: 13px; }
.ph-tile b { font: 700 26px var(--display); letter-spacing: -0.02em; }
.ph-tile small { color: var(--ok); font-size: 13px; }
.ph-bars { height: 120px; display: flex; align-items: flex-end; gap: 6px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.ph-bars i { flex: 1; background: var(--cobalt); border-radius: 4px 4px 0 0; }
.ph-row { display: flex; justify-content: space-between; gap: 8px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; font-size: 13px; }
.ph-row em { font-style: normal; color: var(--brass); font-weight: 600; white-space: nowrap; }
.ph-row em.ok { color: var(--ok); }
.ph-tabs { display: flex; justify-content: space-around; padding-top: 10px; margin-top: 6px; border-top: 1px solid var(--line); }
.ph-tabs i { width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--ink-3); }
.ph-tabs i.on { border-color: var(--cobalt); background: var(--cobalt-soft); }
@media (max-width: 900px) { .cabinet { grid-template-columns: 1fr; gap: 44px; } .phone { width: 260px; } .phone-screen { min-height: 470px; } }

/* Вопросы */
.faq-grid { display: grid; grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr); gap: 48px; align-items: start; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 20px 40px 20px 0; font-weight: 600; font-size: 18px; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 16px; font: 400 26px var(--text); color: var(--cobalt); }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 0 22px; color: var(--ink-2); max-width: 40em; }
@media (max-width: 900px) { .faq-grid { grid-template-columns: 1fr; gap: 24px; } }

/* Заявка */
.contact-sec { background: var(--surface); border-top: 1px solid var(--line); }
.contact { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 56px; align-items: start; }
.contact-list { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 14px; }
.contact-list li { display: grid; gap: 2px; }
.contact-list span { font-size: 14px; color: var(--ink-3); }
.contact-list a { font-weight: 600; font-size: 18px; text-decoration: none; }
.form { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form .full { grid-column: 1 / -1; }
.kind { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.kind legend { font-size: 14px; font-weight: 600; margin-bottom: 8px; padding: 0; }
.kind label { position: relative; }
.kind input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.kind span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 15px; color: var(--ink-2); cursor: pointer; }
.kind input:checked + span { background: var(--cobalt); border-color: var(--cobalt); color: var(--on-cobalt); }
.kind input:focus-visible + span { outline: 3px solid var(--cobalt); outline-offset: 2px; }
.form-foot { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.form-msg { grid-column: 1 / -1; font-size: 15px; min-height: 1.2em; }
.form-msg.ok { color: var(--ok); }
.form-msg.err { color: var(--danger); }
@media (max-width: 900px) { .contact { grid-template-columns: 1fr; gap: 32px; } .form { grid-template-columns: 1fr; padding: 22px 16px; } .form-foot .btn { width: 100%; } }

/* Подвал */
.foot { padding: 44px 0 52px; color: var(--ink-2); font-size: 15px; }
.foot .wrap { display: grid; grid-template-columns: auto 1fr auto; gap: 12px 32px; align-items: center; }
.foot p { grid-column: 1 / 2; grid-row: 2; }
.foot nav { display: flex; gap: 22px; flex-wrap: wrap; justify-content: flex-end; grid-column: 2 / 4; }
.foot nav a { color: var(--ink-2); text-decoration: none; }
.foot nav a:hover { color: var(--ink); }
.foot .wrap > span { grid-column: 3; grid-row: 2; text-align: right; }
@media (max-width: 760px) { .foot .wrap { grid-template-columns: 1fr; } .foot p, .foot nav, .foot .wrap > span { grid-column: 1; grid-row: auto; justify-content: flex-start; text-align: left; } }

/* Телефон: шапка и чертёж крупнее и проще */
@media (max-width: 600px) {
  .bp-sub:not(.bp-phone .bp-sub) { display: none; }
  .bp-title { font-size: 26px; }
  .bp-node rect { stroke-width: 2.6; }
  .bp-handtext { font-size: 27px; }
  :lang(ka) .bp-handtext { font-size: 17px; }
  :lang(ka) .bp-title { font-size: 21px; }
  .bp-dimtext { font-size: 17px; }
  .stamp { margin-top: 4px; }
}
@media (max-width: 430px) {
  .top .logo { font-size: 0; gap: 0; }
  .top .wrap { gap: 12px; }
}

/* Облако — дополнительная услуга */
.cloud-sec { border-bottom: 1px solid var(--line); }
.cloud { grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); }
.eyebrow { display: inline-block; margin-bottom: 14px; padding: 4px 10px; border-radius: 999px; background: var(--cobalt-soft); color: var(--cobalt); font-size: 13px; font-weight: 600; letter-spacing: .02em; }
.cloud-win { width: 100%; max-width: 460px; justify-self: center; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 40px 80px -40px rgba(15, 30, 61, .45); overflow: hidden; }
.cw-bar { display: flex; align-items: center; gap: 6px; padding: 12px 14px; background: var(--surface-2); border-bottom: 1px solid var(--line); font-size: 13px; color: var(--ink-2); }
.cw-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.cw-bar span { margin-left: 8px; font-weight: 600; }
.cw-body { padding: 8px 10px 14px; display: grid; gap: 4px; }
.cw-row { display: flex; align-items: center; gap: 10px; padding: 10px 8px; border-radius: 10px; font-size: 14px; }
.cw-row:nth-child(odd) { background: var(--bg); }
.cw-row b { flex: 1; font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cw-row span { color: var(--ink-3); font-size: 12px; white-space: nowrap; }
.cw-row::before { content: ""; width: 18px; height: 14px; border-radius: 3px; flex: none; border: 2px solid var(--ink-3); }
.cw-row.dir::before { border-color: var(--cobalt); background: var(--cobalt-soft); }
.cw-row.dir b { font-weight: 600; }
.cw-row.xls::before { border-color: var(--ok); width: 14px; height: 18px; }
.cw-row.pdf::before { border-color: var(--danger); width: 14px; height: 18px; }
.cw-row.zip::before { border-color: var(--brass); width: 14px; height: 18px; }
.cw-foot { margin-top: 10px; padding: 0 8px; font-size: 12px; color: var(--ink-3); display: grid; gap: 6px; }
.cw-foot i { display: block; height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.cw-foot em { display: block; height: 100%; background: var(--cobalt); }
@media (max-width: 900px) { .cloud { grid-template-columns: 1fr; } .cloud .cloud-win { order: 2; } }
