/* Astronativa · общ стил (начални, правни и входни страници) */
@font-face {
  font-family: "Manrope";
  src: url("/fonts/Manrope.ttf") format("truetype");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --sky-0: #070b1c;
  --sky-1: #0b1026;
  --sky-2: #121a3a;
  --sky-3: #1a2450;
  --line: rgba(185, 194, 224, .16);
  --line-strong: rgba(185, 194, 224, .28);
  --text: #e8ecf8;
  --muted: #b9c2e0;
  --gold: #f5c26b;
  --gold-soft: rgba(245, 194, 107, .14);
  --gold-ink: #1b1405;
  --danger: #e2676b;
  --radius: 18px;
  --radius-sm: 12px;
  --wrap: 72rem;
  --gutter: 16px;
  color-scheme: dark;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background-color: var(--sky-1);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(70, 92, 190, .35), transparent 70%),
    radial-gradient(ellipse 60% 40% at 100% 30%, rgba(245, 194, 107, .06), transparent 70%),
    linear-gradient(180deg, var(--sky-1) 0%, var(--sky-0) 100%);
  background-attachment: fixed;
  overflow-x: hidden;
  position: relative;
}

/* Фини звезди — само CSS */
body::before, body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-repeat: repeat;
}
body::before {
  background-image:
    radial-gradient(1px 1px at 20px 30px, rgba(255,255,255,.75), transparent),
    radial-gradient(1px 1px at 140px 80px, rgba(255,255,255,.5), transparent),
    radial-gradient(1.5px 1.5px at 90px 160px, rgba(255,255,255,.85), transparent),
    radial-gradient(1px 1px at 230px 210px, rgba(255,255,255,.45), transparent),
    radial-gradient(1px 1px at 300px 40px, rgba(255,255,255,.6), transparent),
    radial-gradient(1px 1px at 50px 260px, rgba(255,255,255,.4), transparent);
  background-size: 340px 300px;
  opacity: .55;
}
body::after {
  background-image:
    radial-gradient(1.5px 1.5px at 60px 120px, rgba(245,194,107,.8), transparent),
    radial-gradient(1px 1px at 400px 300px, rgba(255,255,255,.7), transparent),
    radial-gradient(2px 2px at 520px 90px, rgba(255,255,255,.55), transparent),
    radial-gradient(1px 1px at 250px 460px, rgba(255,255,255,.5), transparent);
  background-size: 620px 540px;
  opacity: .45;
}
body > * { position: relative; z-index: 1; }

a { color: var(--gold); text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { color: #ffd690; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; font-weight: 800; }
h1 { font-size: clamp(2.5rem, 7vw, 4.75rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.6rem); }
h3 { font-size: 1.2rem; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 720px) { :root { --gutter: 32px; } }

.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 16px; top: 16px; z-index: 10; background: var(--gold); color: var(--gold-ink); padding: .5rem .9rem; border-radius: 8px; }

/* Горна лента */
.top {
  position: sticky; top: 0; z-index: 5;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  background: rgba(11, 16, 38, .72);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--text); text-decoration: none; font-weight: 800; font-size: 1.15rem; letter-spacing: -.01em; }
.brand:hover { color: var(--text); }
.brand img { width: 30px; height: 30px; display: block; }
.nav { display: flex; align-items: center; gap: .25rem; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: .95rem; padding: .45rem .7rem; border-radius: 10px; }
.nav a:hover { color: var(--text); background: rgba(255,255,255,.05); }
.nav a.nav-cta { color: var(--text); border: 1px solid var(--line-strong); }
.nav a.nav-lang { font-size: .85rem; letter-spacing: .05em; }
@media (max-width: 420px) {
  .brand span { font-size: 1.05rem; }
  .nav a { padding: .4rem .5rem; font-size: .9rem; }
}

/* Бутони-връзки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: .75rem 1.4rem;
  border-radius: 999px; font-weight: 700; font-size: 1rem; text-decoration: none;
  border: 1px solid transparent; transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-gold { background: var(--gold); color: var(--gold-ink); box-shadow: 0 8px 30px rgba(245,194,107,.25); }
.btn-gold:hover { background: #ffd28a; color: var(--gold-ink); }
.btn-ghost { color: var(--text); border-color: var(--line-strong); background: rgba(255,255,255,.03); }
.btn-ghost:hover { color: var(--text); border-color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } .btn:hover { transform: none; } }

/* Hero */
.hero { padding: clamp(4rem, 12vw, 8.5rem) 0 clamp(3.5rem, 9vw, 6rem); text-align: center; }
.eyebrow { display: inline-block; color: var(--gold); font-weight: 700; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 1.2rem; }
.hero h1 { max-width: 14ch; margin: 0 auto .4em; }
.hero h1 em { font-style: normal; color: var(--gold); }
.lead { color: var(--muted); font-size: clamp(1.1rem, 2.4vw, 1.3rem); max-width: 38rem; margin: 0 auto 2.2rem; }
.actions { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center; }
.hero-note { margin-top: 1.4rem; color: var(--muted); font-size: .9rem; }

/* Орбита — декоративна */
.orbit { width: min(26rem, 80vw); aspect-ratio: 1; margin: 3.5rem auto 0; position: relative; }
.orbit::before, .orbit::after { content: ""; position: absolute; border-radius: 50%; border: 1px solid var(--line); }
.orbit::before { inset: 0; }
.orbit::after { inset: 18%; border-color: var(--line-strong); }
.orbit .moon {
  position: absolute; inset: 36%; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff4dc, #f5c26b 55%, #b8873a);
  box-shadow: 0 0 60px rgba(245,194,107,.35), inset -14px -10px 0 rgba(11,16,38,.55);
}
.orbit .dot { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--text); box-shadow: 0 0 10px rgba(232,236,248,.8); }
.orbit .d1 { top: -4px; left: calc(50% - 4px); }
.orbit .d2 { top: 50%; right: calc(18% - 4px); background: var(--gold); }
.orbit .d3 { bottom: 12%; left: 12%; width: 6px; height: 6px; }

/* Секции */
section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.sec-head { max-width: 40rem; margin-bottom: 2.5rem; }
.sec-head p { color: var(--muted); font-size: 1.1rem; }
.center { text-align: center; margin-left: auto; margin-right: auto; }

.grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: linear-gradient(180deg, rgba(26,36,80,.55), rgba(18,26,58,.45));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
}
.card p { color: var(--muted); margin: 0; }
.card .ico {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: var(--gold-soft); color: var(--gold); margin-bottom: 1.1rem;
}
.card .ico svg { width: 22px; height: 22px; }
.free-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .free-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .free-grid { grid-template-columns: repeat(6, 1fr); } .free-grid > :nth-child(-n+3) { grid-column: span 2; } .free-grid > :nth-child(n+4) { grid-column: span 3; } }

/* Цени */
.prices { display: grid; gap: 1.2rem; grid-template-columns: 1fr; align-items: stretch; }
@media (min-width: 900px) { .prices { grid-template-columns: repeat(3, 1fr); } }
.price { display: flex; flex-direction: column; position: relative; }
.price h3 { font-size: 1.5rem; margin-bottom: .2rem; }
.price .tag { color: var(--muted); font-size: .95rem; margin-bottom: 1.3rem; }
.price .amount { font-size: 2.6rem; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.price .amount small { font-size: 1rem; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.price .year { color: var(--muted); font-size: .9rem; margin: .5rem 0 1.4rem; }
.price ul { list-style: none; padding: 0; margin: 0 0 1.8rem; flex: 1; }
.price li { position: relative; padding-left: 1.6rem; margin-bottom: .65rem; color: var(--text); }
.price li::before { content: ""; position: absolute; left: 0; top: .55em; width: .55rem; height: .55rem; border-radius: 50%; background: var(--gold); box-shadow: 0 0 8px rgba(245,194,107,.6); }
.price.shadow li::before { background: transparent; border: 1.5px solid var(--muted); box-shadow: none; }
.price .btn { width: 100%; }
.price.best {
  border-color: rgba(245,194,107,.55);
  background: linear-gradient(180deg, rgba(245,194,107,.12), rgba(26,36,80,.55) 40%);
  box-shadow: 0 20px 60px rgba(0,0,0,.35), 0 0 0 1px rgba(245,194,107,.2) inset;
}
.badge { position: absolute; top: -.8rem; left: 1.6rem; background: var(--gold); color: var(--gold-ink); font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: .3rem .75rem; border-radius: 999px; }
.price-note { margin-top: 2rem; color: var(--muted); font-size: .95rem; max-width: 46rem; }

/* Точност */
.split { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 820px) { .split { grid-template-columns: 1fr 1fr; } }
.split .card h3 { display: flex; align-items: center; gap: .6rem; }
.kicker { color: var(--gold); font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; display: block; margin-bottom: .6rem; }

/* Въпроси */
.faq { max-width: 48rem; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-of-type { border-top: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; padding: 1.2rem 2.5rem 1.2rem 0; position: relative;
  font-weight: 700; font-size: 1.08rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: .25rem; top: 50%; transform: translateY(-50%); color: var(--gold); font-size: 1.5rem; font-weight: 400; }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--muted); padding: 0 0 1.3rem; margin: 0; }

/* Футър */
.foot { border-top: 1px solid var(--line); padding: 2.5rem 0 3rem; color: var(--muted); font-size: .92rem; }
.foot .wrap { display: grid; gap: 1.2rem; }
@media (min-width: 820px) { .foot .wrap { grid-template-columns: 1.4fr 1fr; align-items: start; } }
.foot p { margin: 0 0 .3rem; }
.foot nav { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; }
@media (min-width: 820px) { .foot nav { justify-content: flex-end; } }
.foot a { color: var(--muted); }
.foot a:hover { color: var(--text); }

/* Правни страници */
.doc { padding: clamp(2.5rem, 7vw, 4.5rem) 0 4rem; }
.doc .wrap { max-width: 46rem; }
.doc h1 { font-size: clamp(2rem, 5vw, 3rem); }
.doc h2 { font-size: 1.35rem; margin-top: 2.4rem; letter-spacing: -.01em; }
.doc p, .doc li { color: #d3d9ee; }
.doc ul { padding-left: 1.2rem; }
.doc li { margin-bottom: .45rem; }
.version {
  display: inline-block; background: var(--gold-soft); color: var(--gold);
  border: 1px solid rgba(245,194,107,.35); border-radius: 10px;
  padding: .45rem .8rem; font-size: .9rem; font-weight: 600; margin-bottom: 1.6rem;
}
.doc .facts { background: rgba(26,36,80,.45); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1rem 1.2rem; }
.doc .facts p { margin: 0 0 .2rem; }

/* ===== Вход (страниците на /vhod) ===== */
body.an-auth {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; padding: 2rem var(--gutter);
}
.an-card {
  width: 100%; max-width: 26rem;
  background: linear-gradient(180deg, rgba(26,36,80,.75), rgba(18,26,58,.7));
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 2rem 1.6rem;
  box-shadow: 0 30px 80px rgba(0,0,0,.45);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
@media (min-width: 480px) { .an-card { padding: 2.4rem 2.2rem; } }
.an-card h1 { font-size: 1.6rem; margin-bottom: .4rem; }
.an-card h2 { font-size: 1.3rem; }
.an-card form { display: grid; gap: 1rem; margin-top: 1.2rem; }
.an-logo {
  display: inline-flex; align-items: center; gap: .55rem; margin-bottom: 1.6rem;
  color: var(--text); text-decoration: none; font-weight: 800; font-size: 1.15rem;
}
.an-logo:hover { color: var(--text); }
.an-logo img, .an-logo svg { width: 30px; height: 30px; }
.an-muted { color: var(--muted); }
.an-small { font-size: .875rem; line-height: 1.5; }
.an-msg {
  background: var(--gold-soft); color: var(--gold);
  border: 1px solid rgba(245,194,107,.4); border-radius: var(--radius-sm);
  padding: .75rem 1rem; font-size: .95rem; margin: 0 0 1rem;
}
.an-card label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: .35rem; color: var(--text); }
.an-card input[type=email], body.an-auth input[type=email] {
  width: 100%; min-height: 48px; padding: .7rem 1rem;
  font: inherit; font-size: 1rem; color: var(--text);
  background: rgba(7,11,28,.6); border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  transition: border-color .15s ease, box-shadow .15s ease;
}
body.an-auth input[type=email]::placeholder { color: rgba(185,194,224,.55); }
body.an-auth input[type=email]:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(245,194,107,.2); }
.an-check { display: flex; align-items: flex-start; gap: .65rem; font-size: .92rem; color: var(--muted); line-height: 1.5; font-weight: 400; cursor: pointer; }
.an-check input[type=checkbox] { flex: none; width: 1.15rem; height: 1.15rem; margin: .15rem 0 0; accent-color: var(--gold); cursor: pointer; }
body.an-auth button, .an-card button {
  display: inline-flex; align-items: center; justify-content: center;
  width: 100%; min-height: 48px; padding: .75rem 1.2rem;
  font: inherit; font-weight: 700; font-size: 1rem; cursor: pointer;
  color: var(--gold-ink); background: var(--gold);
  border: 1px solid transparent; border-radius: 999px;
  transition: background .15s ease, transform .15s ease;
}
body.an-auth button:hover, .an-card button:hover { background: #ffd28a; }
body.an-auth button:disabled { opacity: .55; cursor: not-allowed; }
body.an-auth button.an-danger, .an-card button.an-danger { background: var(--danger); color: #fff; }
body.an-auth button.an-danger:hover, .an-card button.an-danger:hover { background: #ec7f82; }
