*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

:root {
  --bg: #000;
  --surface: #161617;
  --surface-hover: #1d1d1f;
  --field: #1d1d1f;
  --chip-line: #424245;
  --line: rgba(255, 255, 255, 0.08);
  --ink: #f5f5f7;
  --muted: #86868b;
  --accent: #c8f560;
  --accent-ink: #142000;
  --eyebrow: #f56300;
  --error: #ff6b81;
  --radius-card: 28px;
  --radius-field: 14px;
  --ease: cubic-bezier(0.28, 0.11, 0.32, 1);
  --font-heading: "Space Grotesk", sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}

html { color-scheme: dark; background: var(--bg); scroll-behavior: smooth; }

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

h1, h2, h3, .logo, .plan__price {
  font-family: var(--font-heading);
  line-height: 1.1;
  margin: 0 0 16px;
  font-weight: 600;
  letter-spacing: -0.025em;
}

h1 { font-size: clamp(38px, 6vw, 64px); letter-spacing: -0.035em; line-height: 1.04; }
h2 { font-size: clamp(30px, 4vw, 44px); margin-bottom: 48px; text-align: center; }
h3 { font-size: 22px; }
p { margin: 0; }
a { color: inherit; }

.container { max-width: 1240px; margin: 0 auto; padding: 0 16px; }

.header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(0, 0, 0, 0.72);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
}
.header__inner { display: flex; align-items: center; justify-content: space-between; min-height: 60px; gap: 16px; }
.logo { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-size: 19px; font-weight: 700; text-decoration: none; margin: 0; }
.logo__img { width: 32px; height: 32px; border-radius: 8px; flex: none; }
.nav { display: flex; gap: 2px; }
.nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px;
  color: var(--muted); font-size: 15px; text-decoration: none; border-radius: 999px;
  transition: color 150ms ease;
}
.nav a:hover { color: var(--ink); }

.hero { padding: clamp(88px, 14vh, 140px) 0 96px; text-align: center; }
.hero__inner { display: grid; justify-items: center; gap: 14px; }
.hero h1 { max-width: 16ch; margin: 0; }
.hero__eyebrow { color: var(--eyebrow); font-size: 15px; font-weight: 500; }
.hero__sub { max-width: 40rem; color: var(--muted); font-size: clamp(17px, 1.6vw, 21px); line-height: 1.4; }
.hero__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 12px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 22px;
  font: 500 16px var(--font-body);
  color: var(--ink); background: var(--surface-hover);
  border: 1px solid var(--chip-line); border-radius: 999px;
  text-decoration: none; cursor: pointer;
  transition: filter 150ms ease, transform 150ms ease, background 150ms ease, border-color 150ms ease;
}
.btn:hover { background: #2a2a2d; border-color: #5a5a5f; }
.btn:active { transform: scale(0.97); }
.btn--accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn--accent:hover { background: var(--accent); border-color: var(--accent); filter: brightness(1.12); }
.btn:disabled { opacity: .6; cursor: wait; }
.btn:focus-visible, input:focus-visible, a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.services, .prices { padding: 96px 0; }
.services { padding-top: 24px; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--surface); border-radius: var(--radius-card); padding: 32px 28px;
  transition: background 200ms ease, transform 200ms var(--ease);
}
.card:hover { background: var(--surface-hover); transform: translateY(-2px); }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--muted); }

.email { display: flex; flex-direction: column; gap: 8px; max-width: 360px; margin-bottom: 20px; font-weight: 500; font-size: 15px; }
.email input {
  min-height: 48px; padding: 0 16px;
  font: 16px var(--font-body); color: var(--ink);
  background: var(--field); border: 1px solid var(--chip-line); border-radius: var(--radius-field);
}
.email input::placeholder { color: #6e6e73; }
.email input:focus { border-color: var(--accent); outline: none; }
.error { color: var(--error); margin-bottom: 16px; font-size: 15px; }

.plan {
  display: flex; flex-direction: column;
  background: var(--surface); border-radius: var(--radius-card); padding: 32px 28px;
  transition: background 200ms ease, transform 200ms var(--ease);
}
.plan:hover { background: var(--surface-hover); transform: translateY(-2px); }
.plan--featured { box-shadow: inset 0 0 0 1.5px var(--accent); }
.plan__badge { align-self: flex-start; margin-bottom: 14px; padding: 4px 12px; border-radius: 999px; background: rgba(200, 245, 96, 0.12); color: var(--accent); font-size: 13px; font-weight: 600; }
.plan__price { font-size: 40px; font-weight: 700; margin: 6px 0 20px; font-variant-numeric: tabular-nums; }
.plan .btn { margin-top: auto; width: 100%; }
.plan__prefix { font-size: 20px; font-weight: 500; color: var(--muted); }
.plan__text { color: var(--muted); font-size: 15px; margin-bottom: 24px; }
.plan__tiers { list-style: none; margin: 0 0 24px; padding: 0; }
.plan__tiers li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; font-size: 15px; color: var(--muted); }
.plan__tiers li + li { border-top: 1px solid var(--line); }
.plan__tiers li span:last-child { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }

.note { margin-top: 28px; color: var(--muted); font-size: 15px; text-align: center; }
.note + .note { margin-top: 8px; }
.note a { color: var(--accent); text-decoration: none; }
.note a:hover { text-decoration: underline; text-underline-offset: 3px; }

.footer { border-top: 1px solid var(--line); padding: 80px 0 28px; }
.footer__cta { font-family: var(--font-heading); font-size: clamp(28px, 4vw, 40px); font-weight: 600; letter-spacing: -0.025em; margin-bottom: 12px; }
.footer__contacts { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-bottom: 40px; }
.footer__contacts a { display: inline-flex; align-items: center; min-height: 44px; font-size: 18px; color: var(--accent); text-decoration: none; }
.footer__contacts a:hover { text-decoration: underline; text-underline-offset: 4px; }
.requisites {
  display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: 20px 32px;
  margin: 0 0 28px; padding: 28px 32px; background: var(--surface); border-radius: var(--radius-card);
}
.requisites dt { color: var(--muted); font-size: 13px; }
.requisites dd { margin: 6px 0 0; font-size: 16px; font-variant-numeric: tabular-nums; }
.footer__bottom { display: flex; flex-wrap: wrap; align-items: center; gap: 0 24px; font-size: 14px; color: var(--muted); }
.footer__bottom a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; transition: color 150ms ease; }
.footer__bottom a:hover { color: var(--ink); }
.footer__copy { margin-left: auto; }

.checkout {
  width: min(480px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.6);
}
.checkout::backdrop { background: rgba(0, 0, 0, .6); backdrop-filter: blur(6px); }
.checkout[open] { animation: checkout-in .25s var(--ease); }
@keyframes checkout-in { from { opacity: 0; transform: translateY(16px) scale(.98); } }

.checkout__form { padding: 28px; }
.checkout__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.checkout__head h2 { font-size: 26px; margin: 0; text-align: left; }
.checkout__close {
  width: 44px; height: 44px; flex: none;
  font-size: 26px; line-height: 1;
  background: var(--field); border: 0; border-radius: 999px; cursor: pointer; color: var(--ink);
}
.checkout__close:hover { background: #2a2a2d; }
.checkout__options { border: 0; margin: 0 0 20px; padding: 0; display: grid; gap: 8px; }
.checkout__options legend { font-weight: 500; font-size: 15px; margin-bottom: 10px; padding: 0; }
.option {
  display: flex; align-items: center; gap: 12px;
  min-height: 54px; padding: 0 16px;
  background: var(--field); border: 1px solid var(--chip-line); border-radius: var(--radius-field); cursor: pointer;
  transition: border-color 150ms ease;
}
.option:hover { border-color: #5a5a5f; }
.option:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.option input { accent-color: var(--accent); width: 18px; height: 18px; margin: 0; }
.option__name { flex: 1; font-weight: 500; font-size: 15px; }
.option__price { font-family: var(--font-heading); font-weight: 700; font-size: 17px; white-space: nowrap; }
.checkout .email { max-width: none; }
.checkout__hint { color: var(--muted); font-size: 14px; font-weight: 400; }
.checkout__pay { width: 100%; min-height: 50px; }
.checkout .note { margin-top: 14px; font-size: 14px; text-align: left; }
.checkout .note + .note { margin-top: 8px; }

.doc { padding: 64px 0 96px; }
.doc__body { max-width: 800px; }
.doc h1 { max-width: none; font-size: clamp(30px, 5vw, 46px); margin-bottom: 12px; }
.doc__meta { color: var(--muted); font-size: 15px; margin-bottom: 40px; }
.doc h2 { font-size: 22px; margin: 44px 0 14px; text-align: left; }
.doc p, .doc li { color: #d2d2d7; }
.doc p + p { margin-top: 10px; }
.doc ul { margin: 10px 0; padding-left: 22px; }
.doc li + li { margin-top: 6px; }
.doc a { color: var(--accent); text-decoration: none; }
.doc a:hover { text-decoration: underline; text-underline-offset: 3px; }
.doc__requisites { margin: 0; padding: 6px 28px; background: var(--surface); border-radius: var(--radius-card); }
.doc__requisites div { display: grid; grid-template-columns: 140px 1fr; gap: 16px; padding: 14px 0; }
.doc__requisites div + div { border-top: 1px solid var(--line); }
.doc__requisites dt { color: var(--muted); font-size: 15px; }
.doc__requisites dd { margin: 0; font-weight: 500; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.doc .btn.doc__back { margin-top: 40px; color: var(--ink); }

.error-page { min-height: calc(100vh - 61px); min-height: calc(100svh - 61px); display: grid; place-items: center; padding: 64px 0 96px; text-align: center; }
.error-page h1 { max-width: 18ch; margin: 0; }

.status { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 16px; }
.status h1 { max-width: none; }
.status__logo { display: block; width: 72px; height: 72px; margin: 0 auto 24px; border-radius: 18px; }
.status p { margin-bottom: 28px; color: var(--muted); }
.status p a { color: var(--accent); }

.js-reveal .reveal { opacity: 0; }
.js-reveal .reveal.is-revealed { animation: reveal-in 1s var(--ease) var(--reveal-delay, 0ms) both; }
.js-reveal .reveal--text.is-revealed { animation-name: reveal-text-in; animation-duration: 1.1s; }
.hero__inner > * { animation: reveal-text-in 1.1s var(--ease) both; }
.hero__inner > :nth-child(2) { animation-delay: .12s; }
.hero__inner > :nth-child(3) { animation-delay: .24s; }
.hero__inner > :nth-child(4) { animation-delay: .36s; }

@keyframes reveal-in { from { opacity: 0; translate: 0 40px; } to { opacity: 1; translate: 0 0; } }
@keyframes reveal-text-in { from { opacity: 0; translate: 0 28px; filter: blur(10px); } to { opacity: 1; translate: 0 0; filter: blur(0); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__inner > *, .checkout[open], .js-reveal .reveal.is-revealed { animation: none; }
  .js-reveal .reveal { opacity: 1; }
  .card:hover, .plan:hover { transform: none; }
}

@media (max-width: 1100px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 800px) {
  .grid, .grid--4 { grid-template-columns: 1fr; }
  .hero { padding: 72px 0 64px; }
  .services, .prices { padding: 64px 0; }
  .services { padding-top: 8px; }
  h2 { margin-bottom: 32px; }
  .email { max-width: none; }
  .requisites { grid-template-columns: 1fr 1fr; padding: 24px; }
  .requisites > div:first-child { grid-column: 1 / -1; }
  .footer__copy { margin-left: 0; width: 100%; padding: 8px 0 4px; }
}

@media (max-width: 480px) {
  .logo { font-size: 17px; }
  .logo span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .nav a { padding: 0 8px; font-size: 14px; }
  .requisites { grid-template-columns: 1fr; gap: 16px; }
  .doc__requisites { padding: 4px 18px; }
  .doc__requisites div { grid-template-columns: 1fr; gap: 2px; }
  .checkout__form { padding: 22px 18px; }
  .plan, .card { padding: 28px 22px; }
}
