/* ==========================================================================
   TernNET v3 — світла мінімалістична тема (index3.html)
   Та сама мова, що й у темній версії (style2.css), але світла
   ========================================================================== */

:root {
  --bg: #fbfbf9;
  --bg-soft: #f3f4f1;
  --card: #ffffff;
  --line: #e3e6e4;
  --line-soft: #eceeeb;

  --ink: #0e1216;
  --muted: #626d79;
  --muted-2: #8b949e;

  --accent: #c8f751;
  --accent-hover: #d6ff6e;
  --accent-ink: #0e1216;
  --accent-soft: rgba(200, 247, 81, 0.18);
  --sky: #0f6fd1;

  --r: 14px;
  --r-lg: 20px;
  --max: 1140px;
  --font: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--bg);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }

a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

h1, h2, h3 {
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.032em;
  line-height: 1.06;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: var(--accent); color: var(--accent-ink); }

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 200;
  background: var(--ink);
  color: #fff;
  padding: 12px 18px;
  border-radius: 10px;
  font-weight: 600;
}
.skip-link:focus { top: 12px; }

/* ---------- Кнопки ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font: inherit;
  font-size: 15.5px;
  font-weight: 650;
  line-height: 1;
  padding: 14px 22px;
  border: 1px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.16s, border-color 0.16s, color 0.16s, transform 0.16s;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }

.btn--accent { background: var(--accent); color: var(--accent-ink); }
.btn--accent:hover { background: var(--accent-hover); color: var(--accent-ink); }

.btn--ink { background: var(--ink); color: #fff; }
.btn--ink:hover { background: #1d252d; color: #fff; }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn--ghost:hover { border-color: #c9cecd; background: #fff; color: var(--ink); }

.btn--sm { padding: 11px 16px; font-size: 15px; border-radius: 10px; }
.btn--block { width: 100%; }
.btn--lg { padding: 17px 26px; font-size: 16.5px; }
.btn__icon { width: 17px; height: 17px; flex: none; }

/* ---------- Шапка ---------- */

.header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(251, 251, 249, 0.9);
  backdrop-filter: blur(14px) saturate(150%);
  border-bottom: 1px solid var(--line);
}

.header__inner {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 76px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--ink);
  flex: none;
}
.logo:hover { text-decoration: none; }
.logo__dot { color: var(--sky); }
.logo__mark { width: 30px; height: 30px; flex: none; }

.header__spacer { margin-left: auto; }

/* Телефони в шапці */
.phones { display: flex; gap: 22px; align-items: center; }
.phones__item {
  display: grid;
  gap: 1px;
  line-height: 1.2;
  padding: 4px 0;
}
.phones__item:hover { text-decoration: none; }
.phones__item b {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.phones__item span {
  font-size: 11.5px;
  color: var(--muted-2);
  letter-spacing: 0.03em;
}
.phones__item:hover b { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Перший екран ---------- */

.hero {
  position: relative;
  padding: clamp(44px, 6vw, 92px) 0 clamp(38px, 5vw, 72px);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--line-soft) 1px, transparent 1px);
  background-size: 25% 100%;
  opacity: 0.7;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), transparent 78%);
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), transparent 78%);
}

.hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(30px, 5vw, 76px);
  align-items: end;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 26px;
}
.kicker::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--ink);
  flex: none;
}

/* Слоган */
.hero h1 {
  font-size: clamp(2.2rem, 1.1rem + 4vw, 4.3rem);
  letter-spacing: -0.042em;
  margin-bottom: 18px;
  max-width: 15ch;
}
.hero h1 mark {
  background: linear-gradient(180deg, transparent 62%, var(--accent) 62%, var(--accent) 94%, transparent 94%);
  color: inherit;
  padding: 0 0.06em;
}

.hero__sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 26px;
}
.hero__sub span { display: inline-flex; align-items: center; gap: 8px; }
.hero__sub span::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--muted-2);
  flex: none;
}
.hero__sub span:first-child::before { display: none; }

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Правий блок — специфікація */
.specs {
  border-top: 1px solid var(--ink);
  margin: 0;
}
.specs__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 18px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}
.specs__row dt {
  font-size: 13.5px;
  color: var(--muted);
  letter-spacing: 0.01em;
}
.specs__row dd {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: right;
}
.specs__row dd small {
  display: block;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--muted-2);
  margin-top: 1px;
}

/* ---------- Секції ---------- */

.section { padding: clamp(50px, 7vw, 96px) 0; }
.section--soft {
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.head { margin-bottom: clamp(24px, 3vw, 40px); }
.head h2 {
  font-size: clamp(1.55rem, 1.15rem + 1.5vw, 2.15rem);
  margin-bottom: 10px;
}
.head p { color: var(--muted); margin: 0; max-width: 56ch; }

/* ---------- Тарифи ---------- */

.plans {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--ink);
  border-left: 1px solid var(--line);
}
.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 24px 20px 20px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--card);
  transition: background-color 0.18s;
}
.plan:hover { background: #fff; }
.plan--main { background: #fff; }
.plan--main::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -1px;
  height: 3px;
  background: var(--accent);
}

.plan__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 14px;
}
.plan__price {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin-bottom: 3px;
}
.plan__price b {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1;
}
.plan__price span { color: var(--muted); font-size: 13.5px; }
.plan__speed { color: var(--ink); font-size: 14.5px; font-weight: 600; margin-bottom: 18px; }
.plan__speed--none { color: var(--muted-2); font-weight: 500; }

.plan__rows { display: grid; gap: 7px; margin-top: auto; }
.plan__row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13.5px;
  color: var(--muted);
  padding-top: 7px;
  border-top: 1px solid var(--line-soft);
}
.plan__row b { color: var(--ink); font-weight: 600; text-align: right; }

.note {
  margin-top: 16px;
  font-size: 13.5px;
  color: var(--muted-2);
}
.note b { color: var(--ink); font-weight: 600; }

/* ---------- Кроки ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
  counter-reset: s3;
}
.step {
  counter-increment: s3;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 22px 24px 22px 0;
  border-bottom: 1px solid var(--line);
}
.step + .step { border-left: 1px solid var(--line); padding-left: 24px; }
.step::before {
  content: "0" counter(s3);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--muted-2);
  flex: none;
  padding-top: 4px;
}
.step h3 { font-size: 16px; margin-bottom: 4px; }
.step p { margin: 0; color: var(--muted); font-size: 14.5px; }

/* ---------- Viber ---------- */

.viber {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: center;
  padding: clamp(26px, 3.4vw, 38px);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--card);
}
.viber h2 { font-size: clamp(1.25rem, 1.1rem + 0.7vw, 1.6rem); margin-bottom: 8px; }
.viber p { margin: 0; color: var(--muted); max-width: 54ch; }

/* ---------- Форма ---------- */

.form {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(26px, 4vw, 60px);
  align-items: start;
}
.form__side h2 { font-size: clamp(1.55rem, 1.2rem + 1.3vw, 2.05rem); margin-bottom: 12px; }
.form__side p { color: var(--muted); margin-bottom: 22px; max-width: 38ch; }

.sideinfo {
  list-style: none;
  margin: 26px 0 0;
  padding: 0;
  display: grid;
  max-width: 330px;
}
.sideinfo li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted-2);
}
.sideinfo b { color: var(--ink); font-weight: 600; }
.sideinfo a { color: var(--sky); text-decoration: underline; }

.form__card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(20px, 2.6vw, 30px);
}

.field { margin: 0 0 14px; padding: 0; border: 0; min-width: 0; }
.field legend,
.field :where(label) {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--muted);
  margin-bottom: 7px;
  padding: 0;
}
.field__hint { font-weight: 400; color: var(--muted-2); }

.field input,
.field select,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 15.5px;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 12px 14px;
  transition: border-color 0.16s, box-shadow 0.16s, background-color 0.16s;
}
.field input::placeholder,
.field textarea::placeholder { color: #a3abb3; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  background: #fff;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(14, 18, 22, 0.08);
}
.field input[aria-invalid="true"] {
  border-color: #cf4040;
  box-shadow: 0 0 0 3px rgba(207, 64, 64, 0.1);
}
.field textarea { resize: vertical; min-height: 74px; line-height: 1.5; }

.field__row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field__row--2-1 { grid-template-columns: 1.6fr 1fr; }
.field__row > div { min-width: 0; }

.err { display: none; margin-top: 5px; font-size: 12.5px; color: #c53a3a; }
.err.is-open { display: block; }

.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.choice__opt {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--bg);
  cursor: pointer;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--muted);
  transition: border-color 0.16s, color 0.16s, background-color 0.16s;
}
.choice__opt:hover { border-color: #c9cecd; color: var(--ink); }
.choice__opt input {
  width: 18px;
  height: 18px;
  margin: 0;
  padding: 0;
  flex: none;
  border: 0;
  background: none;
  box-shadow: none;
  accent-color: var(--ink);
}
.choice__opt:has(input:checked) {
  border-color: var(--ink);
  background: var(--accent-soft);
  color: var(--ink);
}

.consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted-2);
  margin: 2px 0 16px;
}
.consent input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  flex: none;
  accent-color: var(--ink);
}
.consent a { color: var(--sky); text-decoration: underline; }

.done {
  display: none;
  padding: 26px;
  border: 1px solid var(--ink);
  border-radius: var(--r);
  background: var(--accent-soft);
  text-align: center;
}
.done.is-open { display: block; }
.done b { display: block; font-size: 18px; margin-bottom: 6px; }
.done p { color: var(--muted); font-size: 15px; }

/* ---------- Підвал ---------- */

.footer {
  border-top: 1px solid var(--ink);
  padding: clamp(38px, 5vw, 60px) 0 30px;
  color: var(--muted);
  font-size: 14.5px;
  background: var(--bg);
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 1fr 1.1fr;
  gap: clamp(22px, 3vw, 44px);
  margin-bottom: 36px;
}
.footer h3 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 14px;
}
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer a { color: var(--ink); }
.footer a:hover { color: var(--sky); }
.footer__about { color: var(--muted); font-size: 14px; max-width: 30ch; margin-top: 14px; }

.addr { display: grid; gap: 12px; }
.addr__item b { display: block; font-size: 13.5px; color: var(--ink); font-weight: 650; }
.addr__item span { display: block; font-size: 13.5px; color: var(--muted); line-height: 1.5; }

.vibertag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #4b1f8a;
  background: #efe6fd;
  border-radius: 999px;
  padding: 2px 8px;
  margin-left: 4px;
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  justify-content: space-between;
  align-items: center;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted-2);
}

/* ---------- Мобільна панель ---------- */

.mcta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 70;
  display: none;
  gap: 8px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: rgba(251, 251, 249, 0.95);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
}
.mcta .btn { flex: 1; }

/* ---------- Адаптивність ---------- */

@media (max-width: 1080px) {
  .phones { gap: 16px; }
  .phones__item span { display: none; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 980px) {
  .hero__grid { grid-template-columns: 1fr; align-items: start; }
  .hero h1 { max-width: 20ch; }
  .specs { margin-top: 6px; }
  .plans { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr; }
  .step + .step { border-left: 0; padding-left: 0; }
  .form { grid-template-columns: 1fr; }
  .viber { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .container { padding: 0 18px; }
  .header__inner { min-height: 64px; gap: 12px; }
  .phones { display: none; }
  .plans { grid-template-columns: 1fr; }
  .mcta { display: flex; }
  .footer { padding-bottom: 80px; }
  .field__row { grid-template-columns: 1fr; }
  .field__row--2-1 { grid-template-columns: 1fr 1fr; }
  .footer__grid { grid-template-columns: 1fr; gap: 26px; }
  .hero__actions .btn { flex: 1; }
}

@media (max-width: 420px) {
  .choice { grid-template-columns: 1fr; }
  .plan__price b { font-size: 30px; }
  .hero h1 { font-size: 2rem; }
  .hero__sub { flex-direction: column; align-items: flex-start; gap: 3px; }
  .hero__sub span::before { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .plan:hover { background: var(--card); }
}

/* ==========================================================================
   Мікроанімації та інтерактив
   ========================================================================== */

/* ---------- Заставка ---------- */

.loader {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  background: var(--bg);
  transition: opacity 0.45s ease, visibility 0.45s;
}
.loader.is-done { opacity: 0; visibility: hidden; }
html:not(.js-anim) .loader { display: none; }

.loader__box {
  display: grid;
  justify-items: center;
  gap: 14px;
  animation: loaderFloat 1.8s ease-in-out infinite;
}
.loader__logo { width: 46px; height: 46px; }
.loader__logo rect:not(:first-child) {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: barGrow 1.05s infinite cubic-bezier(0.45, 0, 0.55, 1);
}
.loader__logo .lb1 { animation-delay: 0s; }
.loader__logo .lb2 { animation-delay: 0.13s; }
.loader__logo .lb3 { animation-delay: 0.26s; }

.loader__word {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--muted-2);
  animation: wordIn 1.2s ease-in-out infinite alternate;
}

@keyframes barGrow {
  0%, 100% { transform: scaleY(0.35); }
  50% { transform: scaleY(1); }
}
@keyframes loaderFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
@keyframes wordIn {
  from { opacity: 0.45; }
  to { opacity: 1; }
}

/* ---------- Смуга прогресу ---------- */

.progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 250;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: 0 50%;
  pointer-events: none;
  box-shadow: 0 0 10px rgba(200, 247, 81, 0.8);
}

/* ---------- Шапка при скролі ---------- */

.header { transition: box-shadow 0.25s ease, background-color 0.25s ease; }
.header__inner { transition: min-height 0.25s ease; }
.header.is-compact .header__inner { min-height: 60px; }
.header.is-compact {
  background: rgba(251, 251, 249, 0.96);
  box-shadow: 0 12px 30px -26px rgba(14, 18, 22, 0.55);
}

/* ---------- Поява першого екрана ---------- */

.js-anim .hero .kicker,
.js-anim .hero h1,
.js-anim .hero__sub,
.js-anim .hero__actions,
.js-anim .specs { opacity: 0; }

.js-anim.is-loaded .hero .kicker { animation: riseIn 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) 0.02s both; }
.js-anim.is-loaded .hero h1 { animation: riseIn 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) 0.08s both; }
.js-anim.is-loaded .hero__sub { animation: riseIn 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) 0.18s both; }
.js-anim.is-loaded .hero__actions { animation: riseIn 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) 0.26s both; }
.js-anim.is-loaded .specs { animation: riseIn 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) 0.2s both; }

@keyframes riseIn {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Поява блоків при скролі ---------- */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.reveal.is-in { opacity: 1; transform: none; }

.plan__price b { font-variant-numeric: tabular-nums; }

/* ---------- Ripple ---------- */

.btn { position: relative; overflow: hidden; }
.ripple {
  position: absolute;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.2;
  transform: scale(0);
  pointer-events: none;
  animation: rippleOut 0.6s ease-out forwards;
}
@keyframes rippleOut {
  to { transform: scale(1); opacity: 0; }
}

/* ---------- Кнопка «догори» ---------- */

.totop {
  position: fixed;
  right: 18px;
  bottom: 22px;
  z-index: 75;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px) scale(0.9);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease, border-color 0.2s ease;
}
.totop.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.totop:hover { border-color: var(--ink); }

/* ---------- Акордеон ---------- */

.probs {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(26px, 4vw, 56px);
  align-items: start;
}
.probs .viber { grid-template-columns: 1fr; }

.acc { border-top: 1px solid var(--line); }
.acc__item { border-bottom: 1px solid var(--line); }
.acc__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  cursor: pointer;
  font-weight: 600;
  font-size: 16px;
  list-style: none;
  transition: color 0.18s ease;
}
.acc__item summary::-webkit-details-marker { display: none; }
.acc__item summary:hover { color: var(--ink); }
.acc__item[open] summary { color: var(--ink); }

.acc__plus {
  position: relative;
  width: 16px;
  height: 16px;
  flex: none;
  color: var(--muted-2);
  transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1), color 0.2s ease;
}
.acc__plus::before,
.acc__plus::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1.5px;
  border-radius: 2px;
  background: currentColor;
  transform: translateY(-50%);
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.acc__plus::after { transform: translateY(-50%) rotate(90deg); }
.acc__item[open] .acc__plus { transform: rotate(180deg); color: var(--ink); }
.acc__item[open] .acc__plus::after { transform: translateY(-50%) rotate(0deg); opacity: 0; }

.acc__body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.32s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.acc__item[open] .acc__body { grid-template-rows: 1fr; }
.acc__inner {
  overflow: hidden;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
  padding-bottom: 0;
  transition: padding-bottom 0.3s ease;
}
.acc__item[open] .acc__inner { padding-bottom: 18px; }

/* ---------- Успішна заявка ---------- */

.done__check {
  width: 54px;
  height: 54px;
  margin: 0 auto 8px;
  color: var(--ink);
  opacity: 0;
  transform: scale(0.8);
}
.done.is-open .done__check { animation: checkPop 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.15) 0.05s both; }
.done__check path { stroke-dasharray: 44; stroke-dashoffset: 44; }
.done.is-open .done__check path { animation: checkDraw 0.5s ease 0.2s forwards; }

@keyframes checkPop { to { opacity: 1; transform: none; } }
@keyframes checkDraw { to { stroke-dashoffset: 0; } }

/* ---------- Помилка поля ---------- */

.is-shake { animation: shake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97); }
@keyframes shake {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(2px); }
  30%, 50%, 70% { transform: translateX(-3px); }
  40%, 60% { transform: translateX(3px); }
}

/* ---------- Дрібні реакції ---------- */

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.99); }

.plan { transition: background-color 0.22s ease, box-shadow 0.28s ease, transform 0.28s ease; }
.plan:hover {
  transform: translateY(-3px);
  background: #fff;
  box-shadow: 0 20px 44px -32px rgba(14, 18, 22, 0.6);
}

.specs__row { transition: padding-left 0.22s ease; }
.specs__row:hover { padding-left: 6px; }
.specs__row:hover dd { color: var(--ink); }

.field:focus-within label { color: var(--ink); }
.field:focus-within legend { color: var(--ink); }

.viber { transition: border-color 0.22s ease, box-shadow 0.28s ease; }
.viber:hover { border-color: #d5d9d3; box-shadow: 0 18px 40px -34px rgba(14, 18, 22, 0.5); }

.step { transition: background-color 0.22s ease, border-color 0.22s ease; }
.step:hover { background: #fff; border-color: #cfd4cd; }

/* ---------- Якорі з урахуванням липкої шапки ---------- */

#top, #tariffs, #help, #lead, .section { scroll-margin-top: 86px; }

/* ---------- Мобільна панель і «догори» ---------- */

@media (max-width: 760px) {
  .totop { bottom: 86px; right: 14px; }
}

/* ---------- Повага до налаштувань ---------- */

@media (prefers-reduced-motion: reduce) {
  .loader { display: none; }
  .js-anim .hero .kicker,
  .js-anim .hero h1,
  .js-anim .hero__sub,
  .js-anim .hero__actions,
  .js-anim .specs { opacity: 1; animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover, .plan:hover { transform: none; }
  .acc__body { transition: none; }
  .totop { transition: none; }
  .done__check { opacity: 1; transform: none; animation: none; }
  .done__check path { stroke-dashoffset: 0; animation: none; }
  .is-shake { animation: none; }
  .specs__row:hover { padding-left: 0; }
}

/* ==========================================================================
   Внутрішні сторінки (оплата)
   ========================================================================== */

.page-head { padding: clamp(30px, 5vw, 62px) 0 clamp(18px, 2.5vw, 26px); }
.page-head h1 {
  font-family: var(--font);
  font-size: clamp(1.9rem, 1.2rem + 2.4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.038em;
  line-height: 1.04;
  margin-bottom: 12px;
}
.page-head p { color: var(--muted); max-width: 58ch; margin: 0; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(20px, 2.6vw, 32px);
}
.card h2 { font-size: clamp(1.2rem, 1.05rem + 0.6vw, 1.5rem); margin-bottom: 10px; }
.card p { color: var(--muted); margin: 0 0 12px; }
.card p:last-child { margin-bottom: 0; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }

.ex { display: grid; gap: 8px; padding: 14px 16px; background: var(--bg-soft); border-radius: var(--r); margin: 14px 0; }
.ex__row { display: flex; justify-content: space-between; gap: 16px; font-size: 14.5px; color: var(--muted); }
.ex__row b { color: var(--ink); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 15px; }

.steps-num { list-style: none; counter-reset: sn; margin: 0; padding: 0; display: grid; gap: 2px; }
.steps-num li { counter-increment: sn; position: relative; padding: 14px 0 14px 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 15.5px; }
.steps-num li::before {
  content: counter(sn);
  position: absolute;
  left: 0;
  top: 14px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 700;
}
.steps-num b { color: var(--ink); font-weight: 650; }

.hours { display: grid; gap: 0; margin-top: 6px; }
.hours__row { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14.5px; color: var(--muted); }
.hours__row b { color: var(--ink); font-weight: 600; }

@media (max-width: 860px) {
  .grid2, .grid3 { grid-template-columns: 1fr; }
}

/* Кнопки в картках внутрішніх сторінок — донизу */
.grid2 > .card, .grid3 > .card { display: flex; flex-direction: column; }
.grid2 > .card .btn, .grid3 > .card .btn { margin-top: auto; align-self: flex-start; }
.grid2 > .card .hours, .grid3 > .card .hours { margin-top: auto; }

/* Акордеон + картка Viber на вузьких екранах */
@media (max-width: 980px) {
  .probs { grid-template-columns: 1fr; }
  .probs .viber { margin-top: 4px; }
  .acc__item summary { padding: 14px 0; }
}

/* ---------- Контакти у лівій колонці форми ---------- */

.callblock { display: grid; margin: 24px 0 0; border-top: 1px solid var(--line); }
.callrow {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  transition: padding-left 0.22s ease, border-color 0.22s ease;
}
.callrow:hover { padding-left: 6px; text-decoration: none; border-color: #c9cec8; }
.callrow__label {
  font-size: 12.5px;
  letter-spacing: 0.02em;
  color: var(--muted-2);
  white-space: nowrap;
}
.callrow b {
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-align: right;
}
.callrow:hover b { text-decoration: underline; text-underline-offset: 3px; }

.form__note {
  margin: 16px 0 0;
  font-size: 13.5px;
  color: var(--muted-2);
}

/* ---------- Вкладки ---------- */

.tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 26px;
  border-radius: 14px;
  background: var(--bg-soft);
  max-width: 100%;
  overflow-x: auto;
}
.tab {
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 11px;
  padding: 10px 16px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}
.tab:hover { color: var(--ink); }
.tab.is-active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(14, 18, 22, 0.06), 0 6px 16px -12px rgba(14, 18, 22, 0.4);
}

/* ---------- Кроки зі скриншотами ---------- */

.shots { display: grid; gap: 22px; max-width: 820px; margin: 24px 0 0; padding: 0; list-style: none; }
.shot { display: grid; gap: 12px; padding-top: 22px; border-top: 1px solid var(--line); }
.shot__title { display: flex; gap: 12px; align-items: flex-start; margin: 0; font-size: 16px; font-weight: 650; line-height: 1.5; }
.shot__n {
  flex: none;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 12.5px;
  font-weight: 700;
  margin-top: 1px;
}
.shot__text { font-weight: 400; color: var(--muted); }
.shot figure { margin: 0; }
.shot img {
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: #fff;
}
.shot figcaption { margin-top: 8px; font-size: 12.5px; color: var(--muted-2); }

.callout {
  margin-top: 20px;
  padding: 14px 16px;
  border-radius: var(--r);
  background: var(--accent-soft);
  border: 1px solid rgba(200, 247, 81, 0.55);
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink);
}

@media (max-width: 760px) {
  .callrow { flex-direction: column; align-items: flex-start; gap: 2px; }
  .callrow b { text-align: left; }
}

/* ---------- Логін для оплати ---------- */

.loginhint {
  max-width: 780px;
  padding: clamp(18px, 2.4vw, 24px) clamp(18px, 2.6vw, 26px);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--card);
}
.loginhint > p { margin: 0 0 14px; font-size: 14.5px; color: var(--muted); }
.loginhint__note { margin: 14px 0 0 !important; font-size: 13.5px !important; color: var(--muted-2) !important; }

.logins { list-style: none; margin: 0; padding: 0; display: grid; }
.logins li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-top: 1px solid var(--line-soft);
  font-size: 14.5px;
  color: var(--muted);
}
.logins li:first-child { border-top: 1px solid var(--line); }
.logins li:last-child { border-bottom: 1px solid var(--line); }
.logins b {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  background: var(--bg-soft);
  border-radius: 6px;
  padding: 2px 8px;
  white-space: nowrap;
}

@media (max-width: 560px) {
  .logins li { flex-direction: column; align-items: flex-start; gap: 4px; }
}

/* ---------- Приховане поле-пастка та помилка відправки ---------- */

.hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.form__error {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: var(--r);
  background: #fdecec;
  border: 1px solid #f2c6c6;
  color: #9b2c2c;
  font-size: 14px;
  line-height: 1.5;
}
.form__error[hidden] { display: none; }
