/*
 * Общий бренд-стиль client-web (landing/instructions/trial/legal) — цвета
 * герба VELBER (тёмно-синий щит + золото): все брендовые цвета — через
 * CSS-переменные ниже, чтобы тёмная тема переопределяла их в одном месте,
 * а не дублировала каждое отдельное правило (как было раньше в инлайн-стилях).
 */

:root {
  --navy: #14264f;
  --navy-dark: #0b1730;
  --navy-light: #24407a;
  --gold: #c9a227;
  --gold-light: #e8cf7c;
  --gold-dark: #97781a;
  --bg: #f8f7f2;
  --bg-card: rgba(255, 255, 255, 0.82);
  --text: #1a1a1a;
  --text-muted: rgba(26, 26, 26, 0.7);
  --border: #e7e2d3;
  --shadow: rgba(20, 38, 79, 0.12);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #080e1c;
    --bg-card: rgba(18, 28, 51, 0.82);
    --text: #eef1f8;
    --text-muted: rgba(238, 241, 248, 0.72);
    --border: #22304f;
    --shadow: rgba(0, 0, 0, 0.35);
    --navy-light: #3a5aa0;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

/* Фолбэк-цвет для ЛЮБОЙ ссылки без своего класса (напр. внешние ссылки
   в тексте, вроде amnezia.org на /instructions) — иначе браузер берёт
   дефолтный синий, который на тёмно-синих карточках бренда местами почти
   не виден. Компоненты с собственным цветом (header/footer/.btn/...)
   специфичнее этого правила и его перебивают как обычно. */
a { color: var(--gold-dark); }
@media (prefers-color-scheme: dark) { a { color: var(--gold-light); } }

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 2; }

/* Хлебные крошки — всегда светлая плашка (не зависит от темы), тот же
   приём, что у .download-link на /trial: гарантированно читается поверх
   бренд-фонов, а не только "достаточно контрастно по расчёту". */
.breadcrumbs { margin: 4px 0 18px; font-size: 0.9em; position: relative; z-index: 2; }
.breadcrumbs a {
  display: inline-block; padding: 4px 14px; border-radius: 20px;
  background: #fdf6e3; color: var(--navy); font-weight: 600; text-decoration: none;
  border: 1px solid var(--gold);
}
.breadcrumbs a:hover { background: var(--gold-light); }
.breadcrumbs .crumb-sep { margin: 0 8px; opacity: 0.45; }
.breadcrumbs .crumb-current { opacity: 0.7; font-weight: 600; }

/* ===== АНИМАЦИИ ===== */
@keyframes fadeUp { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: translateY(0); } }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-15px) rotate(2deg); } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes slideIn { from { opacity: 0; transform: translateX(-20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(30px, -20px) scale(1.1); }
  50% { transform: translate(-20px, 30px) scale(0.9); }
  75% { transform: translate(40px, 10px) scale(1.05); }
}

/* ===== ФОНОВЫЕ ЭЛЕМЕНТЫ ===== */
.bg-container { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }

.bg-container .gradient-bg {
  position: absolute; top: -30%; right: -10%; width: 70%; height: 80%;
  background: radial-gradient(ellipse at 70% 30%, rgba(201, 162, 39, 0.14) 0%, rgba(20, 38, 79, 0.10) 50%, transparent 70%);
  animation: orbFloat 12s ease-in-out infinite;
}

.bg-container .gradient-bg-2 {
  position: absolute; bottom: -20%; left: -10%; width: 60%; height: 70%;
  background: radial-gradient(ellipse at 30% 70%, rgba(20, 38, 79, 0.10) 0%, rgba(201, 162, 39, 0.05) 50%, transparent 70%);
  animation: orbFloat 15s ease-in-out infinite reverse;
}

.bg-container .shape { position: absolute; border-radius: 50%; opacity: 0.07; border: 2px solid var(--navy-light); }
.bg-container .shape:nth-child(3) { width: 300px; height: 300px; top: 10%; right: 5%; animation: orbFloat 20s ease-in-out infinite; }
.bg-container .shape:nth-child(4) { width: 200px; height: 200px; bottom: 15%; left: 5%; animation: orbFloat 18s ease-in-out infinite reverse; border-color: var(--gold); }
.bg-container .shape:nth-child(5) {
  width: 120px; height: 120px; top: 50%; left: 50%; transform: translate(-50%, -50%);
  animation: orbFloat 25s ease-in-out infinite; border-color: var(--gold-dark); opacity: 0.05;
}

.bg-container .grid-pattern {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(20, 38, 79, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 38, 79, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
}

@media (prefers-color-scheme: dark) {
  .bg-container .grid-pattern {
    background-image:
      linear-gradient(rgba(201, 162, 39, 0.05) 1px, transparent 1px),
      linear-gradient(90deg, rgba(201, 162, 39, 0.05) 1px, transparent 1px);
  }
}

/* ===== ШАПКА ===== */
header.site {
  padding: 20px 0; display: flex; justify-content: space-between; align-items: center;
  animation: fadeUp 0.8s ease-out; position: relative; z-index: 10; flex-wrap: wrap; gap: 12px;
}

.logo-wrap { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }

.logo-wrap .logo-icon {
  /* PNG с прозрачным фоном (не JPG) — своя подложка не нужна, герб сам
     ложится на фон шапки. */
  width: 50px; height: 50px; transition: all 0.3s ease; flex-shrink: 0; object-fit: contain;
  filter: drop-shadow(0 2px 6px var(--shadow));
}

.logo-wrap:hover .logo-icon { transform: rotate(-6deg) scale(1.05); box-shadow: 0 6px 24px var(--shadow); }

.logo-wrap .logo-text { font-weight: 800; font-size: 1.4em; letter-spacing: -0.5px; }

.logo-wrap .logo-badge {
  font-size: 0.5em; font-weight: 700; background: linear-gradient(135deg, var(--navy), var(--navy-light));
  color: var(--gold-light); padding: 2px 10px; border-radius: 50px; margin-left: 6px; letter-spacing: 0.5px;
  vertical-align: middle;
}

header.site nav { display: flex; align-items: center; gap: 8px; }

header.site nav a {
  color: inherit; text-decoration: none; padding: 8px 16px; border-radius: 8px; opacity: 0.75;
  transition: all 0.3s ease; font-weight: 500; font-size: 0.95em;
}

header.site nav a:hover { opacity: 1; background: rgba(201, 162, 39, 0.12); color: var(--gold-dark); }

header.site nav a.telegram-link {
  background: linear-gradient(135deg, var(--navy), var(--navy-light)); color: #fff; opacity: 1;
  padding: 8px 20px; box-shadow: 0 2px 12px var(--shadow);
}

header.site nav a.telegram-link:hover { transform: translateY(-2px); box-shadow: 0 4px 20px var(--shadow); color: var(--gold-light); }

/* ===== HERO ===== */
.hero { padding: 60px 0 50px; text-align: center; animation: fadeUp 1s ease-out 0.2s both; position: relative; z-index: 2; }

.hero .badge {
  display: inline-block; background: linear-gradient(135deg, rgba(20,38,79,0.10), rgba(201,162,39,0.14));
  color: var(--gold-dark); padding: 6px 24px; border-radius: 50px; font-size: 0.85em; font-weight: 600;
  margin-bottom: 20px; border: 1px solid rgba(201, 162, 39, 0.4); animation: pulse 2s infinite;
}

@media (prefers-color-scheme: dark) { .hero .badge { color: var(--gold-light); } }

.hero h1 {
  font-size: 2.6em; font-weight: 800; margin: 0 0 16px; line-height: 1.25;
  background: linear-gradient(135deg, var(--text) 35%, var(--gold-dark));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

@media (prefers-color-scheme: dark) {
  .hero h1 { background: linear-gradient(135deg, #fff 35%, var(--gold-light)); -webkit-background-clip: text; background-clip: text; }
}

.hero p.lead { font-size: 1.15em; opacity: 0.85; max-width: 640px; margin: 0 auto 28px; line-height: 1.7; }
.hero .highlight { color: var(--gold-dark); font-weight: 700; }
@media (prefers-color-scheme: dark) { .hero .highlight { color: var(--gold-light); } }

.trust-row {
  display: flex; justify-content: center; gap: 28px; margin: 8px 0 28px; flex-wrap: wrap;
  font-size: 0.92em; opacity: 0.8;
}
.trust-row span { display: inline-flex; align-items: center; gap: 6px; }

.cta-row { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-block; padding: 15px 32px; border-radius: 12px; text-decoration: none;
  font-weight: 700; font-size: 1em; border: 2px solid transparent;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); cursor: pointer;
}

.btn-primary { background: linear-gradient(135deg, var(--navy), var(--navy-light)); color: #fff; box-shadow: 0 4px 20px var(--shadow); }
.btn-primary:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 8px 32px var(--shadow); }
.btn-primary:active { transform: translateY(0) scale(0.98); }

.btn-secondary { background: var(--bg-card); backdrop-filter: blur(8px); color: var(--gold-dark); border-color: var(--gold); }
.btn-secondary:hover { background: rgba(201, 162, 39, 0.12); transform: translateY(-3px); box-shadow: 0 4px 20px var(--shadow); }
@media (prefers-color-scheme: dark) { .btn-secondary { color: var(--gold-light); } }

/* ===== SECTIONS ===== */
section {
  padding: 50px 0; border-top: 1px solid var(--border); position: relative; z-index: 2;
  background: var(--bg-card); backdrop-filter: blur(4px); border-radius: 24px; margin: 8px 0;
}

section h2 { font-size: 1.9em; font-weight: 700; margin-top: 0; text-align: center; margin-bottom: 12px; }

section h2 .gradient {
  background: linear-gradient(135deg, var(--navy), var(--gold-dark));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
@media (prefers-color-scheme: dark) {
  section h2 .gradient { background: linear-gradient(135deg, var(--navy-light), var(--gold-light)); -webkit-background-clip: text; background-clip: text; }
}

section p.sub { text-align: center; opacity: 0.7; max-width: 600px; margin: 0 auto 36px; font-size: 1.03em; }

/* ===== FEATURES ===== */
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 24px; }

.feature {
  padding: 28px 20px; background: var(--bg-card); border-radius: 16px; text-align: center;
  border: 1px solid var(--border); transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); box-shadow: 0 2px 8px var(--shadow);
}
.feature:hover { transform: translateY(-8px); box-shadow: 0 12px 36px var(--shadow); border-color: var(--gold); }
.feature .icon { font-size: 2.3em; margin-bottom: 12px; display: inline-block; animation: float 3s ease-in-out infinite; }
.feature:nth-child(2) .icon { animation-delay: 0.5s; }
.feature:nth-child(3) .icon { animation-delay: 1s; }
.feature:nth-child(4) .icon { animation-delay: 1.5s; }
.feature h3 { font-size: 1.03em; margin: 0 0 8px; font-weight: 700; }
.feature p { font-size: 0.9em; opacity: 0.7; margin: 0; }

/* ===== PATHS ===== */
.paths { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 28px; }

.path {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 18px; padding: 32px;
  transition: all 0.4s ease; box-shadow: 0 2px 8px var(--shadow);
}
.path:hover { transform: translateY(-6px); box-shadow: 0 16px 44px var(--shadow); }
.path h3 { margin-top: 0; font-size: 1.2em; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.path ol { padding-left: 22px; opacity: 0.85; margin: 16px 0 20px; }
.path ol li { margin: 8px 0; }
.path .btn { margin-top: 8px; }

.path.alt { background: linear-gradient(135deg, rgba(201, 162, 39, 0.07), rgba(20, 38, 79, 0.05)); border-color: rgba(201, 162, 39, 0.35); }

.path .badge-recommend {
  display: inline-block; font-size: 0.68em; background: linear-gradient(135deg, var(--navy), var(--navy-light));
  color: var(--gold-light); padding: 2px 14px; border-radius: 50px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px;
}

/* ===== PLANS ===== */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 20px; }

.plan {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 26px 16px;
  text-align: center; transition: all 0.4s ease; box-shadow: 0 2px 8px var(--shadow); position: relative;
}
.plan:hover { transform: translateY(-6px) scale(1.02); border-color: var(--gold); box-shadow: 0 12px 36px var(--shadow); }

.plan.best { border-color: var(--gold); background: linear-gradient(135deg, rgba(201,162,39,0.10), rgba(20,38,79,0.06)); }
.plan.best::before {
  content: '🔥 Лучший'; position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, var(--navy), var(--navy-light)); color: var(--gold-light);
  font-size: 0.68em; font-weight: 700; padding: 3px 16px; border-radius: 50px;
  text-transform: uppercase; letter-spacing: 0.5px; white-space: nowrap;
}

.plan .plan-name { font-weight: 700; margin-bottom: 4px; font-size: 1.03em; }
.plan .plan-price { font-size: 1.75em; font-weight: 800; color: var(--navy); }
@media (prefers-color-scheme: dark) { .plan .plan-price { color: var(--gold-light); } }
.plan .plan-price small { font-size: 0.4em; font-weight: 400; opacity: 0.6; }
.plan .plan-days { font-size: 0.85em; opacity: 0.6; margin-top: 4px; }
.plan .plan-save {
  display: inline-block; background: rgba(201, 162, 39, 0.16); color: var(--gold-dark);
  font-size: 0.75em; font-weight: 700; padding: 2px 12px; border-radius: 50px; margin-top: 6px;
}
@media (prefers-color-scheme: dark) { .plan .plan-save { color: var(--gold-light); background: rgba(201, 162, 39, 0.22); } }

/* ===== PLATFORM / STEPS (страница инструкций) ===== */
.platform {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 28px;
  margin: 16px 0; transition: all 0.3s ease;
}
.platform:hover { border-color: var(--gold); box-shadow: 0 4px 20px var(--shadow); }
.platform h3 { margin-top: 0; display: flex; align-items: center; gap: 12px; }

.steps { counter-reset: step; list-style: none; padding: 0; }
.steps li { counter-increment: step; margin: 16px 0; padding-left: 48px; position: relative; animation: slideIn 0.5s ease-out both; }
.steps li:nth-child(1) { animation-delay: 0.1s; }
.steps li:nth-child(2) { animation-delay: 0.2s; }
.steps li:nth-child(3) { animation-delay: 0.3s; }
.steps li:nth-child(4) { animation-delay: 0.4s; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--navy), var(--navy-light)); color: var(--gold-light);
  display: flex; align-items: center; justify-content: center; font-size: 0.85em; font-weight: 700;
}

/* ===== FOOTER ===== */
footer.site {
  padding: 32px 0 48px; text-align: center; font-size: 0.9em; opacity: 0.65; border-top: 1px solid var(--border);
  margin: 20px 0 16px; position: relative; z-index: 2; background: var(--bg-card); backdrop-filter: blur(4px);
  border-radius: 16px;
}
footer.site a { color: inherit; text-decoration: none; transition: color 0.3s ease; margin: 0 8px; }
footer.site a:hover { color: var(--gold-dark); opacity: 1; }
@media (prefers-color-scheme: dark) { footer.site a:hover { color: var(--gold-light); } }

/* ===== АДАПТИВ ===== */
@media (max-width: 768px) {
  .hero h1 { font-size: 1.9em; }
  .wrap { padding: 0 16px; }
  .hero { padding: 30px 0; }
  section { padding: 30px 0; }
  header.site { justify-content: center; }
  header.site nav a { padding: 6px 12px; font-size: 0.85em; }
  header.site nav a.telegram-link { padding: 6px 16px; }
  .logo-wrap .logo-text { font-size: 1.15em; }
  .logo-wrap .logo-icon { width: 38px; height: 38px; }
  .trust-row { gap: 14px; }
  .path { padding: 24px; }
}
