/* Buba VPN — стили сайта. Значения взяты из design/tokens.json, правила — из design/design-system.md. */

:root {
  --page-peach: #FFCFB8;
  --page-cream: #FFF3E6;
  --page-mist: #EAF4FB;
  --page-sky: #B5DDF7;
  --page-flat: #F8F3EE;

  --text-primary: #1B2340;
  --text-secondary: #38435F;
  --text-tertiary: #505B77;
  --text-on-accent: #FFFFFF;

  --accent: #2A8548;
  --accent-end: #1F7039;
  --accent-pressed: #1B6633;
  --accent-text: #1B6633;
  --accent-soft: #E3FBE3;
  --accent-bright: #4BB065;

  --surface-glass: rgba(255, 255, 255, 0.66);
  --surface-glass-strong: rgba(255, 255, 255, 0.92);
  --surface-glass-subtle: rgba(255, 255, 255, 0.40);
  --border-glass: rgba(255, 255, 255, 0.80);
  --border-outline: rgba(31, 42, 74, 0.07);
  --border-divider: rgba(27, 35, 64, 0.10);
  --border-focus: #17589C;

  --shadow-card: 0 8px 24px rgba(31, 42, 74, 0.10), 0 1px 2px rgba(31, 42, 74, 0.06);
  --shadow-hero: 0 24px 48px rgba(31, 42, 74, 0.16);
  --shadow-accent: 0 8px 20px rgba(42, 133, 72, 0.32);

  --font: "Nunito", ui-rounded, system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  font-size: 16px;
  line-height: 24px;
  color: var(--text-primary);
  background: var(--page-flat);
}

/* Градиент закреплён за экраном: содержимое прокручивается поверх. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(135deg, var(--page-peach) 0%, var(--page-cream) 40%, var(--page-mist) 68%, var(--page-sky) 100%);
}

img { max-width: 100%; height: auto; }

a { color: var(--accent-text); text-underline-offset: 3px; }

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

h1, h2, h3 { font-weight: 800; margin: 0; }
h1 { font-size: 40px; line-height: 44px; }
h2 { font-size: 28px; line-height: 34px; }
h3 { font-size: 22px; line-height: 28px; }
p { margin: 0; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }

main { flex: 1; }

/* Шапка */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--surface-glass-strong);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border-outline);
}

.site-header .wrap {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  line-height: 24px;
  font-weight: 800;
  color: var(--text-primary);
  text-decoration: none;
  white-space: nowrap;
}

.brand img { width: 40px; height: 40px; border-radius: 10px; display: block; }

.site-nav { display: flex; gap: 4px; }

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 12px;
  font-weight: 600;
  font-size: 15px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 999px;
}

.site-nav a:hover { background: rgba(27, 35, 64, 0.06); }

/* Кнопки */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 28px;
  border-radius: 999px;
  border: 0;
  font-family: inherit;
  font-size: 17px;
  line-height: 22px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.btn-primary {
  color: var(--text-on-accent);
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-end) 100%);
  box-shadow: var(--shadow-accent);
}

.btn-primary:hover { background: var(--accent-pressed); }

.btn-secondary {
  color: var(--text-primary);
  background: var(--surface-glass);
  border: 1.5px solid var(--border-glass);
  box-shadow: var(--shadow-card);
}

/* До публикации в магазине кнопка выглядит выключенной. Чтобы включить:
   убрать класс is-soon и aria-disabled, перенести адрес из data-store в href, сменить подпись. */
.btn.is-soon {
  color: var(--text-tertiary);
  background: var(--surface-glass-subtle);
  border: 1px solid rgba(255, 255, 255, 0.70);
  box-shadow: none;
  cursor: default;
}

/* Карточки */
.card {
  background: var(--surface-glass);
  border: 1px solid var(--border-glass);
  outline: 1px solid var(--border-outline);
  border-radius: 24px;
  box-shadow: var(--shadow-card);
  padding: 20px;
}

section { padding: 32px 0; }

.section-title { margin-bottom: 20px; }

/* Первый экран */
.hero { padding: 40px 0 24px; }

.hero .wrap { display: grid; gap: 32px; align-items: center; }

.hero .lead {
  margin-top: 16px;
  font-size: 18px;
  line-height: 28px;
  color: var(--text-secondary);
  max-width: 34em;
}

.hero .actions { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 12px; }

.hero .note { margin-top: 12px; font-size: 14px; line-height: 20px; color: var(--text-tertiary); }

/* Плитка в форме иконки: буква и щит. */
.tile {
  position: relative;
  width: min(72vw, 300px);
  aspect-ratio: 1;
  margin: 0 auto;
  border-radius: 24%;
  background: linear-gradient(135deg, #FCC5AC 0%, #FFF0D2 34%, #EAF4FB 58%, #A4D6F3 84%, #87B8EE 100%);
  border: 1.5px solid var(--border-glass);
  box-shadow: var(--shadow-hero), 0 0 40px rgba(255, 255, 255, 0.80);
  display: grid;
  place-items: center;
}

.tile .letter { width: 118%; max-width: none; display: block; }

.tile .shield {
  position: absolute;
  right: 4%;
  bottom: 4%;
  width: 34%;
  filter: drop-shadow(0 0 12px rgba(75, 176, 101, 0.55));
}

/* Тариф */
.price-card { display: grid; gap: 16px; }

.price {
  font-size: 56px;
  line-height: 60px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.price small { font-size: 18px; line-height: 28px; font-weight: 600; color: var(--text-secondary); white-space: nowrap; }

.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }

.checks li { position: relative; padding-left: 36px; }

.checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.5 12.5l3.5 3.5 7.5-8' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 24px no-repeat;
}

/* Пакеты в блоке тарифа */
.price-card .price { margin-top: 12px; }

.price-caption { margin-top: 8px; color: var(--text-secondary); }

.price-list + .price-caption { margin-top: 16px; }

.price-list { list-style: none; margin: 16px 0 0; padding: 0; }

.price-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--border-divider);
}

.price-list li:last-child { border-bottom: 1px solid var(--border-divider); }

.price-sum { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 13px;
  line-height: 18px;
  font-weight: 600;
  color: var(--accent-text);
  background: var(--accent-soft);
}

/* Сетки */
.grid { display: grid; gap: 16px; }

.step-num {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 12px;
  border-radius: 50%;
  font-weight: 800;
  color: var(--text-on-accent);
  background: var(--accent);
}

.card h3 { margin-bottom: 8px; }

.card p { color: var(--text-secondary); }

/* Вопросы и ответы */
.faq { padding: 4px 20px; }

.faq details { border-top: 1px solid var(--border-divider); }

.faq details:first-child { border-top: 0; }

.faq summary {
  list-style: none;
  cursor: pointer;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-weight: 600;
}

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

.faq summary::after {
  content: "";
  flex: none;
  width: 20px;
  height: 20px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 8l5 5 5-5' fill='none' stroke='%23505B77' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px no-repeat;
  transition: transform 200ms;
}

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

.faq details p { padding: 0 0 16px; color: var(--text-secondary); }

/* Документы */
.doc {
  max-width: 760px;
  margin: 32px auto;
  padding: 28px 20px;
  background: var(--surface-glass-strong);
  border: 1px solid var(--border-glass);
  outline: 1px solid var(--border-outline);
  border-radius: 24px;
  box-shadow: var(--shadow-card);
}

.doc h1 { font-size: 32px; line-height: 38px; }
.doc h2 { font-size: 22px; line-height: 28px; margin: 28px 0 10px; }
.doc p, .doc li { color: var(--text-secondary); }
.doc p + p { margin-top: 10px; }
.doc ul, .doc ol { margin: 10px 0; padding-left: 22px; display: grid; gap: 8px; }
.doc .meta { margin-top: 8px; font-size: 14px; line-height: 20px; color: var(--text-tertiary); }
.doc strong { color: var(--text-primary); }

.requisites {
  margin-top: 12px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--border-divider);
  display: grid;
  gap: 4px;
  font-size: 15px;
}

/* Подвал */
.site-footer {
  margin-top: 32px;
  padding: 28px 0 36px;
  background: var(--surface-glass);
  border-top: 1px solid var(--border-glass);
  font-size: 14px;
  line-height: 20px;
  color: var(--text-secondary);
}

.site-footer .wrap { display: grid; gap: 16px; }

.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 16px; }

.site-footer nav a { display: inline-flex; align-items: center; min-height: 40px; font-weight: 600; }

@media (min-width: 768px) {
  .wrap { padding: 0 32px; }
  h1 { font-size: 56px; line-height: 60px; }
  h2 { font-size: 40px; line-height: 46px; }
  body { font-size: 18px; line-height: 28px; }
  section { padding: 48px 0; }
  .hero { padding: 72px 0 40px; }
  .hero .wrap { grid-template-columns: 1.15fr 0.85fr; gap: 48px; }
  .hero .lead { font-size: 20px; line-height: 30px; }
  .tile { width: min(34vw, 360px); }
  .price { font-size: 72px; line-height: 76px; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .price-card { grid-template-columns: 1fr 1fr; align-items: center; gap: 32px; padding: 32px; }
  .doc { padding: 40px; }
  .site-footer .wrap { grid-template-columns: 1.4fr 1fr; }
}

@media (max-width: 420px) {
  .site-nav a.optional { display: none; }
  .site-nav a { padding: 0 8px; }
  .site-header .wrap { gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .faq summary::after { transition: none; }
}
