:root {
  --bg: #040816;
  --bg-2: #08143A;
  --panel: rgba(12, 28, 78, .55);
  --panel-solid: #0A1738;
  --edge: rgba(58, 160, 255, .30);
  --edge-strong: #3AA0FF;
  --blue: #1F6BFF;
  --blue-2: #1648E8;
  --cyan: #35C6FF;
  --text: #F2F7FF;
  --muted: #9DB2DA;
  --ok: #33D6A6;
  --alert: #FF7A7A;
  --glow: 0 0 40px rgba(31, 107, 255, .28);
  --f-display: 'Geologica', system-ui, 'Segoe UI', Arial, sans-serif;
  --f-body: 'Golos Text', system-ui, 'Segoe UI', Arial, sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0; color: var(--text); min-height: 100vh;
  font: 400 1.0625rem/1.55 var(--f-body);
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(900px 520px at 88% -6%, rgba(31, 107, 255, .38), transparent 62%),
    radial-gradient(700px 520px at -6% 34%, rgba(24, 168, 255, .13), transparent 60%),
    radial-gradient(800px 600px at 60% 105%, rgba(22, 72, 232, .22), transparent 60%),
    var(--bg);
}
[hidden] { display: none !important; }
a { color: var(--cyan); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--f-display); margin: 0; line-height: 1.1; letter-spacing: -.01em; }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.fine { font-size: .85rem; color: var(--muted); margin-top: 14px; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; border-radius: 8px; }

.container { width: min(1120px, 100% - 40px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 40px); }

/* ---------- Шапка ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(4, 8, 22, .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--edge);
}
.bar { display: flex; align-items: center; gap: 28px; min-height: 70px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text);
  font: 800 1.3rem var(--f-display); }
.brand img { border-radius: 50%; box-shadow: 0 0 0 1.5px var(--edge-strong), 0 0 18px rgba(58, 160, 255, .55); }
.brand b { color: var(--cyan); }
.nav { display: flex; gap: 22px; margin-left: 8px; }
.nav a { color: var(--text); text-decoration: none; font-weight: 500; opacity: .85; }
.nav a:hover { opacity: 1; color: var(--cyan); }
.bar-actions { margin-left: auto; display: flex; gap: 10px; }

/* ---------- Кнопки ---------- */
.btn {
  font: 600 1rem var(--f-body); padding: .8rem 1.4rem; border-radius: 999px;
  border: 1.5px solid var(--edge-strong); background: transparent; color: var(--text);
  cursor: pointer; text-decoration: none; display: inline-flex; align-items: center;
  justify-content: center; gap: 8px; transition: background .15s, box-shadow .15s, transform .15s;
}
.btn:hover { background: rgba(58, 160, 255, .16); box-shadow: 0 0 22px rgba(58, 160, 255, .35); }
.btn-primary {
  background: linear-gradient(180deg, var(--blue), var(--blue-2)); border-color: rgba(130, 195, 255, .55);
  box-shadow: 0 8px 26px rgba(31, 107, 255, .45), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.btn-primary:hover { background: linear-gradient(180deg, #3380FF, var(--blue)); box-shadow: 0 10px 32px rgba(31, 107, 255, .65), inset 0 1px 0 rgba(255, 255, 255, .3); transform: translateY(-1px); }
.btn-ghost { background: transparent; }
.btn-sm { padding: .5rem 1.05rem; font-size: .95rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: progress; transform: none; }

/* ---------- Баннер оплаты ---------- */
.banner { background: rgba(31, 107, 255, .2); border-bottom: 1px solid var(--edge-strong); padding: 12px 20px;
  text-align: center; font-weight: 600; }
.banner.err { background: rgba(255, 122, 122, .18); border-color: var(--alert); }
.banner.ok { background: rgba(51, 214, 166, .18); border-color: var(--ok); }

/* ---------- Первый экран ---------- */
.hero { padding: clamp(36px, 7vw, 84px) 0 clamp(28px, 5vw, 56px); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(2.5rem, 6.2vw, 4.7rem); font-weight: 800; line-height: 1.03; letter-spacing: -.025em; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 46ch; margin-top: 22px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.hero-art { position: relative; width: min(100%, 460px); aspect-ratio: 1; margin-inline: auto; }
.hero-logo { position: relative; width: 100%; height: 100%; border-radius: 50%; display: block;
  filter: drop-shadow(0 0 46px rgba(31, 107, 255, .6)); }
.ring { position: absolute; border-radius: 50%; pointer-events: none; }
.ring-a { inset: -9%; border: 1.5px dashed rgba(58, 160, 255, .45); animation: spin 70s linear infinite; }
.ring-a::after { content: ""; position: absolute; top: 8%; left: 14%; width: 12px; height: 12px; border-radius: 50%;
  background: var(--cyan); box-shadow: 0 0 16px 4px rgba(53, 198, 255, .8); }
.ring-b { inset: -19%; border: 1px solid rgba(58, 160, 255, .18); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Секции ---------- */
.section { padding: clamp(40px, 7vw, 84px) 0; border-top: 1px solid var(--edge); }
.section-lead { color: var(--muted); max-width: 58ch; margin: 14px 0 36px; }

/* ---------- Тарифы ---------- */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); gap: 24px; max-width: 880px; }
.plan {
  position: relative; border: 1.5px solid var(--edge); border-radius: 30px; padding: 30px 26px 26px;
  background: linear-gradient(180deg, rgba(20, 48, 118, .55), rgba(8, 18, 52, .75));
  box-shadow: var(--glow), inset 0 1px 0 rgba(255, 255, 255, .06);
  display: flex; flex-direction: column; gap: 20px;
}
.plan[data-line="family"] { border-color: rgba(53, 198, 255, .45); }
.plan-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.plan h3 { font-size: 1.6rem; font-weight: 800; }
.plan .dev { color: var(--muted); font-size: .95rem; margin-top: 4px; }
.plan-ico { width: 46px; height: 46px; border-radius: 50%; flex: none; display: grid; place-items: center;
  border: 1.5px solid var(--edge-strong); background: rgba(31, 107, 255, .18); color: var(--cyan); font-size: 1.3rem; }

.terms { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.term {
  font-family: var(--f-body); color: var(--text); cursor: pointer; text-align: center;
  border: 1.5px solid var(--edge); background: rgba(255, 255, 255, .03); border-radius: 16px;
  padding: 9px 4px 7px; display: grid; gap: 0; line-height: 1.15; transition: border-color .15s, background .15s;
}
.term b { font: 800 1.25rem var(--f-display); }
.term span { font-size: .78rem; color: var(--muted); }
.term em { font-style: normal; font-size: .72rem; font-weight: 600; color: var(--ok); min-height: 1.1em; margin-top: 2px; }
.term:hover { border-color: var(--edge-strong); }
.term[aria-pressed="true"] { background: linear-gradient(180deg, var(--blue), var(--blue-2)); border-color: rgba(130, 195, 255, .7);
  box-shadow: 0 0 22px rgba(31, 107, 255, .55); }
.term[aria-pressed="true"] span, .term[aria-pressed="true"] em { color: #fff; }

.price-box { display: grid; gap: 4px; }
.plan-price { font: 800 3.4rem/1 var(--f-display); letter-spacing: -.03em; }
.plan-price s { font: 500 1.4rem var(--f-display); color: var(--muted); margin-right: 8px; letter-spacing: 0; }
.per { color: var(--muted); }
.per b { color: var(--cyan); font-weight: 600; }

.stops { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.stops li { position: relative; padding: 4px 0 4px 32px; }
.stops li::before { content: "✓"; position: absolute; left: 0; top: 6px; width: 21px; height: 21px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(53, 198, 255, .15); color: var(--cyan); font-size: .75rem; font-weight: 700; }

/* ---------- Маршрут: шаги ---------- */
.route { list-style: none; margin: 36px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 28px; position: relative; }
.route::before { content: ""; position: absolute; top: 20px; left: 22px; right: 22px; height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--cyan)); border-radius: 3px; box-shadow: 0 0 14px rgba(53, 198, 255, .6); }
.route li { position: relative; padding-top: 62px; }
.route h3 { margin-bottom: 6px; }
.route p { color: var(--muted); }
.stop { position: absolute; top: 0; left: 0; width: 44px; height: 44px; border-radius: 50%;
  background: var(--bg-2); border: 2px solid var(--edge-strong); box-shadow: 0 0 18px rgba(58, 160, 255, .55);
  display: grid; place-items: center; font: 700 1rem var(--f-display); color: var(--cyan); }

.apps-block { margin-top: 64px; }
.apps { list-style: none; padding: 0; margin: 18px 0 14px; display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.apps li { background: var(--panel); border: 1px solid var(--edge); border-radius: 18px; padding: 14px 16px;
  display: flex; flex-direction: column; }
.apps span { color: var(--muted); font-size: .9rem; }

/* ---------- FAQ ---------- */
details { border-bottom: 1px solid var(--edge); padding: 18px 0; }
summary { cursor: pointer; font: 700 1.1rem var(--f-display); list-style: none;
  display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.5rem; line-height: 1; color: var(--cyan); }
details[open] summary::after { content: "−"; }
details p { margin-top: 10px; color: var(--muted); max-width: 62ch; }

/* ---------- Подвал ---------- */
.site-footer { border-top: 1px solid var(--edge); padding: 28px 0; color: var(--muted); }
.foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

/* ---------- Формы и диалоги ---------- */
dialog { border: 1.5px solid var(--edge-strong); border-radius: 26px; padding: 26px; width: min(460px, 100% - 32px);
  background: var(--panel-solid); color: var(--text); box-shadow: 0 0 60px rgba(31, 107, 255, .35); }
dialog::backdrop { background: rgba(2, 5, 15, .72); backdrop-filter: blur(4px); }
.dlg-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.x { background: none; border: 0; font-size: 2rem; line-height: 1; cursor: pointer; color: var(--muted); padding: 0 6px; }
.x:hover { color: var(--text); }
.seg { display: grid; grid-template-columns: 1fr 1fr; border: 1.5px solid var(--edge); border-radius: 999px;
  padding: 3px; margin-bottom: 18px; }
.seg button { border: 0; background: transparent; font: 600 .95rem var(--f-body); padding: .55rem; border-radius: 999px;
  cursor: pointer; color: var(--muted); }
.seg button[aria-selected="true"] { background: linear-gradient(180deg, var(--blue), var(--blue-2)); color: #fff; }
label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: 14px; }
input, select { display: block; width: 100%; margin-top: 6px; font: 400 1rem var(--f-body); color: var(--text);
  padding: .75rem .9rem; border: 1.5px solid var(--edge); border-radius: 14px; background: rgba(255, 255, 255, .05); }
input::placeholder { color: rgba(157, 178, 218, .7); }
input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(53, 198, 255, .2); outline: none; }
select option { background: var(--panel-solid); color: var(--text); }
.form-error { color: var(--alert); font-weight: 600; margin: -4px 0 12px; font-size: .95rem; }

.sum { border-block: 1px solid var(--edge); margin: 18px 0; padding: 12px 0; display: grid; gap: 6px; }
.sum div { display: flex; justify-content: space-between; gap: 12px; }
.sum .total { font: 800 1.3rem var(--f-display); color: var(--cyan); }
.inline-form { display: flex; gap: 8px; align-items: stretch; margin-bottom: 16px; }
.inline-form input { margin: 0; }
.co-terms { margin: 16px 0 0; }

/* ---------- Кабинет ---------- */
.cab { padding: 40px 0 72px; }
.cab-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 32px; }
.cab-head h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; }
.cab-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 32px; align-items: start; }
.cab h2 { font-size: 1.5rem; margin-bottom: 16px; }
.cab-main { display: grid; gap: 18px; }
.cab-main h2 { margin-bottom: 0; }
.cab-side { display: grid; gap: 28px; }
.block { border-top: 1px solid var(--edge); padding-top: 18px; }

.ticket { display: grid; grid-template-columns: 8px 1fr; border: 1.5px solid var(--edge); border-radius: 22px; overflow: hidden;
  background: linear-gradient(180deg, rgba(20, 48, 118, .5), rgba(8, 18, 52, .75)); box-shadow: var(--glow); }
.ticket-bar { background: linear-gradient(180deg, var(--cyan), var(--blue)); box-shadow: 0 0 16px rgba(53, 198, 255, .7); }
.ticket.expired { opacity: .8; }
.ticket.expired .ticket-bar { background: rgba(157, 178, 218, .35); box-shadow: none; }
.ticket-body { padding: 20px 22px; display: grid; gap: 14px; min-width: 0; }
.ticket-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.chip { font-weight: 600; font-size: .85rem; padding: .25rem .75rem; border-radius: 999px; border: 1.5px solid var(--edge);
  white-space: nowrap; }
.chip.ok { color: var(--ok); border-color: rgba(51, 214, 166, .5); background: rgba(51, 214, 166, .12); }
.chip.off { color: var(--alert); border-color: rgba(255, 122, 122, .5); background: rgba(255, 122, 122, .12); }
.chip.promo { color: var(--cyan); border-color: var(--edge-strong); background: rgba(53, 198, 255, .12); }
.meter { height: 10px; border-radius: 5px; border: 1px solid var(--edge); overflow: hidden; background: rgba(255, 255, 255, .05); }
.meter i { display: block; height: 100%; width: var(--w, 0%); background: linear-gradient(90deg, var(--blue), var(--cyan)); }
.keybox { display: flex; gap: 8px; }
.keybox input { margin: 0; font: 500 .85rem var(--f-mono); min-width: 0; }
.apps-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.apps-row a { font-weight: 600; font-size: .9rem; padding: .25rem .75rem; border-radius: 999px;
  border: 1px solid var(--edge); text-decoration: none; color: var(--text); }
.apps-row a:hover { border-color: var(--cyan); color: var(--cyan); }
.empty { border: 1.5px dashed var(--edge-strong); border-radius: 22px; padding: 28px; display: grid; gap: 14px; justify-items: start; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.stats div { border: 1px solid var(--edge); border-radius: 16px; padding: 10px 12px; background: var(--panel); }
.stats b { display: block; font: 800 1.5rem var(--f-display); color: var(--cyan); }
.buy-list { display: grid; gap: 10px; }
.buy-list .btn { justify-content: space-between; }

/* ---------- Уведомления ---------- */
#toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); display: grid; gap: 8px;
  z-index: 100; width: min(440px, 100% - 32px); }
.toast { background: var(--panel-solid); color: var(--text); padding: .8rem 1.1rem; border-radius: 16px; font-weight: 500;
  border: 1.5px solid var(--edge-strong); box-shadow: 0 0 30px rgba(31, 107, 255, .4); }
.toast.err { border-color: var(--alert); box-shadow: 0 0 30px rgba(255, 122, 122, .3); }

/* ---------- Админка ---------- */
.adm { padding: 40px 0 72px; display: grid; gap: 32px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--edge); font-size: .95rem; }
.table-wrap { overflow-x: auto; }
.grid-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; align-items: end; }
.grid-form label { margin: 0; }

/* ---------- Адаптив ---------- */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 56px; }
  .hero-art { width: min(100%, 340px); }
  .cab-grid { grid-template-columns: 1fr; }
  .nav { display: none; }
  .route { grid-template-columns: 1fr; gap: 26px; }
  .route::before { top: 22px; bottom: 22px; left: 20px; right: auto; width: 3px; height: auto;
    background: linear-gradient(180deg, var(--blue), var(--cyan)); }
  .route li { padding: 0 0 0 66px; min-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ring-a { animation: none; }
  .btn { transition: none; }
}
