/* priiima.lt — компоненты и блоки страницы. Только на переменных из tokens.css: свои цвета, размеры и отступы здесь не заводить. */
/* ---------- основа ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body { font: var(--w-normal) var(--fs-md) / var(--lh-text) var(--font); color: var(--text); background: var(--bg); text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
img, video, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 3px; }
button, input, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-weight: var(--w-bold); line-height: var(--lh-tight); letter-spacing: -0.015em; text-wrap: balance; }
h1 { font-size: var(--fs-2xl); }
h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-lg); letter-spacing: -0.01em; }
p { text-wrap: pretty; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- раскладка: колонка, блок, заголовок блока ---------- */
.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); background: var(--bg); color: var(--text); }
.section-head { max-width: var(--measure); margin-bottom: var(--s-7); display: grid; gap: var(--s-4); }
.section-head p { color: var(--text-muted); }
.section-head--flush { margin-bottom: 0; }
.kicker { font-size: var(--fs-xs); font-weight: var(--w-bold); letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-text); }
.dark .kicker { color: var(--accent); }
.lead { font-size: var(--fs-lg); color: var(--text-muted); max-width: var(--measure); }
.stack { display: grid; gap: var(--s-5); }

/* ---------- кнопка ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2); min-height: 48px; padding: var(--s-3) var(--s-5);
  border-radius: var(--r-pill); border: 1.5px solid transparent; font-size: var(--fs-md); font-weight: var(--w-bold); line-height: 1.2;
  text-decoration: none; cursor: pointer; transition: background-color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: var(--brand-dark); }          /* на акценте — только тёмный текст */
.btn--primary:hover { background: var(--accent-hover); }
.btn--secondary { background: transparent; color: var(--text); border-color: var(--line); }
.dark .btn--secondary { border-color: var(--ink-600); }
.btn--secondary:hover { border-color: var(--text); }
.btn--sm { min-height: 40px; padding: var(--s-2) var(--s-4); font-size: var(--fs-sm); }
.btn[disabled] { opacity: .6; cursor: default; }
.actions { display: flex; flex-wrap: wrap; gap: var(--s-3); }

/* ---------- метки: Bazė, Modulis, Netrukus ---------- */
.badge { display: inline-flex; align-items: center; width: max-content; padding: var(--s-1) var(--s-3); border-radius: var(--r-pill);
  font-size: var(--fs-xs); font-weight: var(--w-bold); letter-spacing: 0.02em; line-height: 1.5; background: var(--accent-soft); color: var(--accent-text); }
.dark .badge { background: var(--accent); color: var(--brand-dark); }
.badge--soon { background: transparent; color: var(--text-muted); border: 1.5px dashed var(--ink-400); }
.dark .badge--soon { background: transparent; color: var(--text-muted); border-color: var(--ink-600); }

/* ---------- карточка ---------- */
.card { display: grid; align-content: start; gap: var(--s-3); padding: var(--s-5); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.card p { color: var(--text-muted); font-size: var(--fs-sm); }
.card--soon { background: transparent; border-style: dashed; }
.cards { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }

/* ---------- списки с галочкой ---------- */
.ticks { display: grid; gap: var(--s-2); list-style: none; }
.ticks li { position: relative; padding-left: var(--s-6); }
.ticks li::before { content: ''; position: absolute; left: 4px; top: 0.45em; width: 14px; height: 8px; border-left: 2.5px solid var(--accent); border-bottom: 2.5px solid var(--accent); transform: rotate(-45deg); }

/* ---------- шапка ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: var(--ink-950); color: var(--white); border-bottom: 1px solid var(--ink-800); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--s-5); min-height: 64px; }
.site-header .logo img { height: 30px; width: auto; }
.site-nav { display: flex; align-items: center; gap: var(--s-5); }
.site-nav a:not(.btn) { display: none; color: var(--ink-200); text-decoration: none; font-size: var(--fs-sm); }
.site-nav a:not(.btn):hover { color: var(--white); }

/* ---------- подвал ---------- */
.site-footer { padding-block: var(--s-7); border-top: 1px solid var(--line); font-size: var(--fs-sm); color: var(--text-muted); }
.site-footer .wrap { display: grid; gap: var(--s-4); }
.site-footer .logo img { height: 26px; width: auto; }
.site-footer a { color: var(--text); }

/* ---------- поле формы ---------- */
.field { display: grid; gap: var(--s-2); }
fieldset.field { border: 0; min-width: 0; }
.field > label, .field-legend { font-size: var(--fs-sm); font-weight: var(--w-bold); }
.field-legend { margin-bottom: var(--s-2); }
.input { width: 100%; min-height: 48px; padding: var(--s-3) var(--s-4); border-radius: var(--r-md); border: 1.5px solid var(--line); background: var(--surface); color: var(--text);
  transition: border-color var(--t-fast) var(--ease); }
textarea.input { min-height: 120px; resize: vertical; }
.input::placeholder { color: var(--placeholder); }
.input:hover { border-color: var(--ink-500); }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.check { display: flex; gap: var(--s-3); align-items: flex-start; font-size: var(--fs-sm); color: var(--text-muted); cursor: pointer; }
.check input { accent-color: var(--accent); width: 20px; height: 20px; flex: none; margin-top: 1px; }
.chips { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.chips label { display: inline-flex; align-items: center; gap: var(--s-2); min-height: 40px; padding: var(--s-2) var(--s-4); border-radius: var(--r-pill);
  border: 1.5px solid var(--line); font-size: var(--fs-sm); cursor: pointer; transition: border-color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease); }
.chips input { accent-color: var(--accent); }
.chips label:has(input:checked) { border-color: var(--accent); background: var(--accent-tint); }
.chips label:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.msg { font-size: var(--fs-sm); min-height: 1.6em; }
.msg.ok { color: var(--ok); }
.msg.err { color: var(--err); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.small { font-size: var(--fs-xs); color: var(--text-muted); }

/* ---------- снимок экрана ---------- */
.shot { border-radius: var(--r-lg); overflow: hidden; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-2); }
.shot img { width: 100%; }

/* ---------- блоки страницы ---------- */
.hero .wrap { display: grid; gap: var(--s-7); }
.hero .copy { display: grid; gap: var(--s-5); align-content: center; }
.hero h1 em { font-style: normal; color: var(--accent); }
.facts { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); list-style: none; font-size: var(--fs-sm); color: var(--text-muted); }
.facts li { display: inline-flex; align-items: center; gap: var(--s-2); }
.facts li::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.hero .visual { position: relative; display: grid; gap: var(--s-4); }
.hero .visual .phone-shot { display: none; }   /* на телефоне — один снимок, второй только удлиняет первый экран */

.notes { display: grid; gap: var(--s-3); }
.note { padding: var(--s-4) var(--s-5); border-radius: var(--r-md); border: 1.5px dashed var(--ink-300); color: var(--ink-700); font-size: var(--fs-md); }
.pain .wrap { display: grid; gap: var(--s-7); }
.pain h2 span { color: var(--accent-text); }

.player { position: relative; border-radius: var(--r-lg); overflow: hidden; background: var(--ink-900); aspect-ratio: 16 / 9; border: 1px solid var(--line); }
.player video { width: 100%; height: 100%; object-fit: cover; }
.play { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: var(--s-3); border: 0; cursor: pointer;
  background: linear-gradient(0deg, var(--overlay), transparent); color: var(--white); font-size: var(--fs-sm); }
.play i { width: 72px; height: 72px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; transition: transform var(--t-fast) var(--ease); }
.play i::after { content: ''; margin-left: 5px; border-style: solid; border-width: 12px 0 12px 19px; border-color: transparent transparent transparent var(--brand-dark); }
.play:hover i { transform: scale(1.06); }

.features { display: grid; gap: var(--s-8); }
.feat { display: grid; gap: var(--s-5); align-items: center; }
.feat .text { display: grid; gap: var(--s-4); max-width: var(--measure); }
.feat .text > p { color: var(--text-muted); }
.minis { display: grid; gap: var(--s-4); margin-top: var(--s-8); }

.base { gap: var(--s-4); }
.base .ticks { grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: var(--s-2) var(--s-5); font-size: var(--fs-sm); }
.custom { margin-top: var(--s-4); display: grid; gap: var(--s-2); }

.steps { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); list-style: none; counter-reset: step; }
.steps li { counter-increment: step; }
.steps li::before { content: '0' counter(step); font-size: var(--fs-sm); font-weight: var(--w-bold); color: var(--accent-text); }
.steps .card--accent { border-color: var(--accent); }
.prices { display: grid; gap: var(--s-4); margin-top: var(--s-4); }

.contact .wrap { display: grid; gap: var(--s-7); }
.contact .phone { font-size: var(--fs-xl); font-weight: var(--w-bold); text-decoration: none; }
.contact .mail { color: var(--text-muted); }
.form { display: grid; gap: var(--s-4); padding: var(--s-5); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.form .row { display: grid; gap: var(--s-4); }

dialog { max-width: min(560px, calc(100% - 2 * var(--gutter))); margin: auto; padding: var(--s-6); border: 0; border-radius: var(--r-lg); background: var(--white); color: var(--ink-950); box-shadow: var(--shadow-2); }
dialog::backdrop { background: var(--overlay); }
dialog .stack { gap: var(--s-4); }
dialog p { color: var(--ink-600); font-size: var(--fs-sm); }
dialog .logo { height: 24px; width: auto; }

/* появление при прокрутке; без движения — сразу на месте */
.rv { opacity: 0; transform: translateY(16px); transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease); }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rv { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { transition-duration: 0s !important; animation: none !important; }
}
.no-js .rv { opacity: 1; transform: none; }

/* ---------- шире телефона ---------- */
@media (min-width: 768px) {
  .site-nav a:not(.btn) { display: inline; }
  .form .row { grid-template-columns: 1fr 1fr; }
  .minis, .prices { grid-template-columns: repeat(3, 1fr); }
  .prices { grid-template-columns: 2fr 1fr; }
  .notes { grid-template-columns: 1fr 1fr; }
  .site-footer .wrap { grid-template-columns: auto 1fr auto; align-items: center; }
  .hero .visual .phone-shot { display: block; position: absolute; width: 38%; right: -2%; bottom: -12%; }
}
@media (min-width: 1024px) {
  .hero .wrap { grid-template-columns: 1.05fr 1fr; align-items: center; }
  .pain .wrap { grid-template-columns: 1fr 1.1fr; align-items: center; }
  .feat { grid-template-columns: 1fr 1.1fr; gap: var(--s-8); }
  .feat--rev .text { order: 2; }
  .contact .wrap { grid-template-columns: 1fr 1.15fr; align-items: start; }
  .site-nav .hphone { display: inline; }
}
@media (max-width: 1023.98px) { .site-nav .hphone { display: none !important; } }
