:root {
  --bg: #0b1016;
  --bg-soft: #121a24;
  --card: #151f2b;
  --line: #22303f;
  --text: #e8eef5;
  --muted: #93a4b8;
  --brand: #34d399;
  --brand-2: #3b82f6;
  --radius: 18px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { width: min(1080px, 100% - 40px); margin-inline: auto; }

/* ---------- шапка ---------- */
.top {
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: blur(12px);
  background: rgba(11, 16, 22, .82);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
.logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 18px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--text);
}
.logo:hover { text-decoration: none; }
.logo img { width: 34px; height: auto; transition: transform .45s cubic-bezier(.2,.7,.2,1); }
.logo:hover img { transform: translateY(-3px) rotate(-4deg); }
.nav { display: flex; gap: 22px; margin-left: auto; color: var(--muted); font-size: 15px; }
.nav a { color: var(--muted); }
.nav a:hover { color: var(--text); text-decoration: none; }

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: 12px; font-weight: 600; font-size: 15px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #07131c; border: 0; cursor: pointer; white-space: nowrap;
}
.btn { transition: transform .25s cubic-bezier(.2,.7,.2,1), box-shadow .25s ease, filter .25s ease, border-color .25s ease; }
.btn:hover { text-decoration: none; filter: brightness(1.07); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(52, 211, 153, .18); }
.btn:active { transform: translateY(0); }
.btn.ghost:hover { border-color: var(--brand); box-shadow: none; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn.small { padding: 10px 16px; font-size: 14px; }

/* ---------- секции ---------- */
section { padding: 72px 0; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 16px; }
h1 { font-size: clamp(30px, 5vw, 46px); letter-spacing: -.02em; }
h2 { font-size: clamp(24px, 3.4vw, 32px); }
h3 { font-size: 18px; }
.lead { color: var(--muted); font-size: 18px; max-width: 620px; }
.center { text-align: center; }
.center .lead { margin-inline: auto; }

.hero { padding: 84px 0 64px; }
.hero .badge {
  display: inline-block; padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--bg-soft);
  color: var(--brand); font-size: 14px; margin-bottom: 20px;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.hero-note { color: var(--muted); font-size: 14px; margin-top: 14px; }

/* ---------- карточки ---------- */
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px;
  transition: transform .35s cubic-bezier(.2,.7,.2,1), border-color .35s ease, box-shadow .35s ease;
}
.card:hover {
  transform: translateY(-5px); border-color: #2f4257;
  box-shadow: 0 16px 34px rgba(0, 0, 0, .35);
}
.card .ico { transition: transform .35s cubic-bezier(.2,.7,.2,1); }
.card:hover .ico { transform: scale(1.14); }
.card .ico { font-size: 24px; margin-bottom: 12px; }
.card p { color: var(--muted); margin: 0; }

/* ---------- тарифы ---------- */
.plans { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.plan {
  position: relative; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px 24px; text-align: center;
  transition: transform .35s cubic-bezier(.2,.7,.2,1), border-color .35s ease, box-shadow .35s ease;
}
.plan:hover { transform: translateY(-6px); border-color: #2f4257; box-shadow: 0 18px 38px rgba(0, 0, 0, .4); }
.plan.best { border-color: var(--brand); }
.plan.best:hover { border-color: var(--brand); box-shadow: 0 18px 44px rgba(52, 211, 153, .22); }
.plan .tag {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #07131c;
  font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: 999px;
}
.plan .term { color: var(--muted); font-size: 15px; }
.plan .price { font-size: 38px; font-weight: 700; margin: 8px 0 2px; }
.plan .per { color: var(--muted); font-size: 14px; min-height: 21px; }
.plan .btn { margin-top: 18px; width: 100%; }

/* ---------- шаги ---------- */
.steps { counter-reset: step; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.step {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px;
  transition: transform .35s cubic-bezier(.2,.7,.2,1), border-color .35s ease;
}
.step:hover { transform: translateY(-4px); border-color: #2f4257; }
.step::before {
  counter-increment: step; content: counter(step);
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 10px; margin-bottom: 12px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #07131c; font-weight: 700;
}
.step p { color: var(--muted); margin: 0; }

/* ---------- вопросы ---------- */
details {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 18px 20px; margin-bottom: 12px;
  transition: border-color .3s ease, background .3s ease;
}
details:hover { border-color: #2f4257; }
details[open] { border-color: #2c3e52; }
details[open] p { animation: answerIn .35s cubic-bezier(.2,.7,.2,1) both; }
summary::after { transition: transform .3s ease, color .3s ease; display: inline-block; }
details[open] summary::after { transform: rotate(180deg); color: var(--brand); }
summary { cursor: pointer; font-weight: 600; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; float: right; color: var(--muted); font-weight: 400; }
details[open] summary::after { content: "–"; }
details p { color: var(--muted); margin: 12px 0 0; }

/* ---------- подвал ---------- */
footer { border-top: 1px solid var(--line); padding: 40px 0; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; gap: 20px; flex-wrap: wrap; justify-content: space-between; }
footer a { color: var(--muted); }
.foot-links { display: flex; gap: 18px; flex-wrap: wrap; }

/* ---------- юридические страницы ---------- */
.doc { max-width: 760px; }
.doc h1 { margin-bottom: 8px; }
.doc .updated { color: var(--muted); font-size: 14px; margin-bottom: 32px; }
.doc h2 { font-size: 21px; margin-top: 36px; }
.doc p, .doc li { color: #c6d3e1; }
.doc ul { padding-left: 22px; }
.doc li { margin-bottom: 8px; }
.doc .box { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; }

/* ---------- анимации ---------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes answerIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, .25); }
  50% { box-shadow: 0 0 0 10px rgba(52, 211, 153, 0); }
}

.hero .badge { animation: fadeUp .6s cubic-bezier(.2,.7,.2,1) both, glow 3.4s ease-in-out 1s infinite; }
.hero h1 { animation: fadeUp .7s cubic-bezier(.2,.7,.2,1) .08s both; }
.hero .lead { animation: fadeUp .7s cubic-bezier(.2,.7,.2,1) .16s both; }
.hero-actions { animation: fadeUp .7s cubic-bezier(.2,.7,.2,1) .24s both; }
.hero-note { animation: fadeUp .7s cubic-bezier(.2,.7,.2,1) .32s both; }
.top .logo img { animation: floatY 5s ease-in-out infinite; }

/* появление блоков при прокрутке */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.visible { opacity: 1; transform: none; }

.nav a { position: relative; transition: color .25s ease; }
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: -4px; height: 2px; width: 100%;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  transform: scaleX(0); transform-origin: left; transition: transform .3s cubic-bezier(.2,.7,.2,1);
}
.nav a:hover::after { transform: scaleX(1); }

.plan .price { transition: transform .35s cubic-bezier(.2,.7,.2,1); }
.plan:hover .price { transform: scale(1.05); }
footer a { transition: color .25s ease; }
footer a:hover { color: var(--brand); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

@media (max-width: 640px) {
  .nav { display: none; }
  section { padding: 56px 0; }
  .hero { padding: 56px 0 44px; }
}
