/* ==========================================================================
   OracleAI — дизайн-система публичного сайта (BUS-663)
   Тёмная «небесно-мистическая» эстетика. Mobile-first. Без внешних шрифтов.
   ========================================================================== */

:root {
  /* Цвета: ночное небо */
  --bg-0: #070b1f;
  --bg-1: #0d1330;
  --bg-2: #131a3a;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-hover: rgba(255, 255, 255, 0.08);
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.18);

  --text: #eef0ff;
  --muted: #a7adcf;

  --gold: #e9c46a;
  --gold-soft: rgba(233, 196, 106, 0.14);
  --violet: #9d8cff;
  --violet-soft: rgba(157, 140, 255, 0.16);

  /* Telegram: чуть глубже брендового ради контраста белого текста ≥ 4.5:1 */
  --tg-1: #1f8ec4;
  --tg-2: #146c96;
  --tg-glow: rgba(42, 171, 238, 0.35);

  --radius: 18px;
  --radius-lg: 26px;

  --font-display: Georgia, "Palatino Linotype", "Book Antiqua", serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --container: 1080px;
  --gap: 1rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg-0);
  /* Ночное небо: вертикальные глубинные градиенты + статичное звёздное поле */
  background-image:
    radial-gradient(1.5px 1.5px at 12% 18%, rgba(255, 255, 255, 0.5), transparent 60%),
    radial-gradient(1px 1px at 38% 8%, rgba(255, 255, 255, 0.35), transparent 60%),
    radial-gradient(1.5px 1.5px at 64% 26%, rgba(233, 196, 106, 0.4), transparent 60%),
    radial-gradient(1px 1px at 82% 12%, rgba(255, 255, 255, 0.3), transparent 60%),
    radial-gradient(1px 1px at 90% 42%, rgba(255, 255, 255, 0.25), transparent 60%),
    radial-gradient(1.5px 1.5px at 24% 52%, rgba(157, 140, 255, 0.35), transparent 60%),
    radial-gradient(1px 1px at 8% 74%, rgba(255, 255, 255, 0.3), transparent 60%),
    radial-gradient(1px 1px at 46% 66%, rgba(255, 255, 255, 0.22), transparent 60%),
    radial-gradient(1.5px 1.5px at 70% 82%, rgba(233, 196, 106, 0.3), transparent 60%),
    radial-gradient(1px 1px at 92% 88%, rgba(255, 255, 255, 0.28), transparent 60%),
    radial-gradient(900px 480px at 50% -10%, var(--violet-soft), transparent 70%),
    radial-gradient(1200px 700px at 80% 110%, rgba(157, 140, 255, 0.1), transparent 70%),
    linear-gradient(180deg, var(--bg-0) 0%, var(--bg-1) 55%, var(--bg-2) 100%);
  background-attachment: fixed;
}

img,
svg {
  max-width: 100%;
  display: block;
}

a {
  color: var(--gold);
}

/* ---------- Доступность ---------- */

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  border-radius: 0 0 12px 0;
  color: var(--text);
  text-decoration: none;
}

.skip-link:focus {
  left: 0;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Каркас ---------- */

.container {
  width: min(var(--container), 100% - 2.5rem);
  margin-inline: auto;
}

.section {
  padding-block: clamp(3rem, 8vw, 5.5rem);
}

.section-head {
  max-width: 44rem;
  margin-inline: auto;
  margin-bottom: clamp(1.75rem, 4vw, 3rem);
  text-align: center;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 0.75rem;
  padding: 0.3rem 0.9rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--gold-soft);
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  line-height: 1.18;
  margin: 0 0 0.75rem;
  letter-spacing: 0.01em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.1rem, 6.5vw, 3.5rem);
}

h2 {
  font-size: clamp(1.55rem, 4vw, 2.2rem);
}

h3 {
  font-size: 1.12rem;
}

p {
  margin: 0 0 1rem;
}

.lead {
  font-size: clamp(1.05rem, 2.5vw, 1.25rem);
  color: var(--muted);
  max-width: 40rem;
}

.gold-text {
  background: linear-gradient(100deg, var(--gold) 20%, var(--violet) 85%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 11, 31, 0.82);
  backdrop-filter: blur(10px);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.7rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: linear-gradient(160deg, var(--violet-soft), var(--gold-soft));
  color: var(--gold);
  font-size: 1rem;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.85rem 1.6rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-telegram {
  background: linear-gradient(180deg, var(--tg-1), var(--tg-2));
  color: #ffffff;
  box-shadow: 0 10px 30px var(--tg-glow);
}

.btn-telegram:hover {
  box-shadow: 0 14px 38px var(--tg-glow);
  transform: translateY(-1px);
}

.btn-ghost {
  border-color: var(--line-strong);
  color: var(--text);
  background: transparent;
}

.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.btn-lg {
  padding: 1.1rem 2.2rem;
  font-size: 1.08rem;
}

.btn-sm {
  padding: 0.55rem 1.1rem;
  font-size: 0.9rem;
}

.btn__icon {
  width: 1.2em;
  height: 1.2em;
  flex: none;
}

/* ---------- Hero ---------- */

.hero {
  padding-block: clamp(3.5rem, 10vw, 7rem) clamp(3rem, 8vw, 5rem);
  text-align: center;
}

.hero__inner {
  display: grid;
  justify-items: center;
  gap: 1.25rem;
}

.hero .lead {
  margin-inline: auto;
}

.hero__actions {
  display: grid;
  gap: 0.8rem;
  justify-items: center;
  margin-top: 0.5rem;
}

.hero__note {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
}

@media (min-width: 720px) {
  .hero__actions {
    grid-auto-flow: column;
    align-items: center;
  }
}

/* ---------- Карточки ---------- */

.grid {
  display: grid;
  gap: var(--gap);
}

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

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

  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.3rem;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.card:hover {
  background: var(--surface-hover);
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.card p {
  color: var(--muted);
  margin: 0;
  font-size: 0.95rem;
}

.chip {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 0.9rem;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: linear-gradient(160deg, var(--violet-soft), var(--gold-soft));
  color: var(--gold);
  font-size: 1.35rem;
  line-height: 1;
}

.card h3 {
  margin-bottom: 0.4rem;
}

/* ---------- Шаги ---------- */

.steps {
  counter-reset: step;
}

.step {
  position: relative;
  padding-left: 3.6rem;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.1rem;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--gold-soft);
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
}

.step p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.step h3 {
  margin-bottom: 0.3rem;
}

/* ---------- Примеры вопросов ---------- */

.questions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  justify-content: center;
  max-width: 46rem;
  margin-inline: auto;
}

.question-pill {
  padding: 0.6rem 1.1rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.92rem;
}

/* ---------- FAQ ---------- */

.faq {
  max-width: 46rem;
  margin-inline: auto;
  display: grid;
  gap: 0.7rem;
}

.faq details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 0;
  overflow: hidden;
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  color: var(--gold);
  font-size: 1.4rem;
  line-height: 1;
  flex: none;
  transition: transform 0.15s ease;
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq details p {
  margin: 0;
  padding: 0 1.25rem 1.1rem;
  color: var(--muted);
}

/* ---------- CTA-блоки ---------- */

.cta-band {
  text-align: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(600px 300px at 50% -30%, var(--violet-soft), transparent 70%),
    var(--surface);
  padding: clamp(2.2rem, 6vw, 4rem) clamp(1.25rem, 4vw, 3rem);
}

.cta-band .lead {
  margin-inline: auto;
  margin-bottom: 1.6rem;
}

.cta-note {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0.9rem;
}

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

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 2rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-footer a {
  color: var(--text);
  text-decoration-color: var(--line-strong);
}

.site-footer a:hover {
  color: var(--gold);
}

/* ---------- Движение ---------- */

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

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}

/* ---------- Список статей ---------- */

.article-grid {
  display: grid;
  gap: 1.2rem;
}

@media (min-width: 720px) {
  .article-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.article-card {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.article-card__meta {
  color: var(--muted);
  font-size: 0.85rem;
}

.article-card h3 {
  margin: 0;
  font-size: 1.15rem;
}

.article-card a {
  color: inherit;
  text-decoration: none;
}

.article-card a:hover h3 {
  color: var(--gold);
}

.article-card .excerpt {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0;
}

.article-card .card-link {
  margin-top: auto;
  color: var(--gold);
  font-size: 0.95rem;
  font-weight: 600;
}

/* ---------- Страница статьи / юридическая страница ---------- */

.prose {
  max-width: 46rem;
  margin-inline: auto;
}

.prose .article-meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
}

.prose h1 {
  font-size: clamp(1.7rem, 4vw, 2.4rem);
}

.prose h2 {
  margin-top: 2.4rem;
  scroll-margin-top: 5rem;
}

.prose h3 {
  margin-top: 1.8rem;
}

.prose p,
.prose ul,
.prose ol {
  color: var(--text);
  line-height: 1.7;
}

.prose ul,
.prose ol {
  padding-left: 1.4rem;
  margin-bottom: 1.1rem;
}

.prose li {
  margin-bottom: 0.4rem;
}

.prose blockquote {
  margin: 1.4rem 0;
  padding: 0.8rem 1.2rem;
  border-left: 3px solid var(--gold);
  background: var(--surface);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--muted);
}

.prose .back-link {
  display: inline-block;
  margin-bottom: 2rem;
  color: var(--muted);
}

.prose .back-link:hover {
  color: var(--gold);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin-block: 1.2rem;
  font-size: 0.95rem;
}

.prose th,
.prose td {
  border: 1px solid var(--line);
  padding: 0.55rem 0.75rem;
  text-align: left;
}

.prose th {
  background: var(--surface);
}

.article-cta {
  margin-top: 3rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}
