/* ============================================================
   BIRGA — «Ночной выпуск» (арт-дирекция v3, 2026-08-08).
   Дневник, снятый как фильм, с деталями торгового терминала.

   Опоры: тёплый чёрный (не синий SaaS), зерно плёнки, один
   акцент — янтарь. Editorial-типографика: Unbounded (дисплей),
   Golos Text (текст), JetBrains Mono (цифры/метки/тикер).

   DO NOT: индиго/фиолетовые градиенты, стеклянные карточки,
   неон, Inter, стоковые улыбки, 3D-шарики.
   ============================================================ */

:root {
  --bg: #0b0a08;            /* тёплый почти-чёрный */
  --bg-2: #12100c;          /* приподнятые поверхности */
  --bg-3: #181510;          /* ховеры */
  --line: rgba(255, 250, 240, 0.09);
  --line-strong: rgba(255, 250, 240, 0.16);
  --ink: #f2efe8;           /* тёплый белый */
  --ink-soft: #a39d90;      /* приглушённый тёплый серый */
  --amber: #e0a83c;         /* единственный яркий акцент */
  --amber-soft: rgba(224, 168, 60, 0.14);
  --amber-ink: #171205;
  --plus: #79b98f;
  --minus: #cf7a68;

  --font-display: "Unbounded", "Arial Black", sans-serif;
  --font-body: "Golos Text", -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", monospace;

  --radius: 14px;
  --container: 680px;
}

/* Казахская локаль: Unbounded и Golos не покрывают қ/ә/ң/ұ —
   заголовки и текст уводим в Rubik (полный казахский алфавит). */
html[lang="kk"] {
  --font-display: "Rubik", "Arial Black", sans-serif;
  --font-body: "Rubik", "Golos Text", -apple-system, sans-serif;
}
html[lang="kk"] h1, html[lang="kk"] h2 { font-weight: 800; }

/* ---------- Сброс ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(900px 520px at 85% -5%, rgba(224, 168, 60, 0.07), transparent 60%),
    radial-gradient(700px 500px at -10% 30%, rgba(224, 168, 60, 0.03), transparent 55%),
    var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--amber); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 0.45em; line-height: 1.12; font-weight: 700; }
h1, h2 { font-family: var(--font-display); letter-spacing: -0.01em; }
h3, h4 { font-family: var(--font-body); font-weight: 600; }
p { margin: 0 0 0.9em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
figure { margin: 0; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Зерно плёнки ---------- */
.grain {
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  z-index: 90;
  pointer-events: none;
  opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.01em;
  padding: 14px 28px;
  cursor: pointer;
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.18s ease, background 0.18s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: linear-gradient(180deg, #ecb751, var(--amber));
  color: var(--amber-ink);
  box-shadow: 0 10px 34px rgba(224, 168, 60, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.btn-primary:hover { box-shadow: 0 14px 44px rgba(224, 168, 60, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.35); }
.btn-sm { padding: 9px 18px; font-size: 13px; }
.btn-lg { padding: 16px 34px; font-size: 16px; }

/* ---------- Шапка ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 10, 8, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.site-header .container {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 58px;
}
.wordmark {
  font-family: "Unbounded", "Arial Black", sans-serif; /* латиница, казахский фолбэк не нужен */
  font-weight: 900;
  font-size: 17px;
  letter-spacing: 0.08em;
  color: var(--ink);
}
.wordmark:hover { text-decoration: none; color: var(--amber); }

.lang-switch {
  margin-left: auto;
  display: flex;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
}
.lang-switch button {
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font: 600 11px/1 var(--font-mono);
  letter-spacing: 0.08em;
  padding: 7px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.15s ease;
}
.lang-switch button:hover { color: var(--ink); }
.lang-switch button.is-active {
  background: var(--amber);
  color: var(--amber-ink);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 76px 0 56px;
}
.hero::before {
  /* тонкая терминальная сетка, едва читается */
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(600px 420px at 75% 0%, rgba(0, 0, 0, 0.5), transparent 70%);
  -webkit-mask-image: radial-gradient(600px 420px at 75% 0%, rgba(0, 0, 0, 0.5), transparent 70%);
  pointer-events: none;
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 16px;
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--amber);
  flex: 0 0 auto;
}
.hero-title {
  font-size: clamp(34px, 8.5vw, 58px);
  font-weight: 900;
  line-height: 1.04;
  margin-bottom: 22px;
  text-wrap: balance;
}
.hero-subtitle {
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 560px;
  margin-bottom: 30px;
}
.hero-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.hero-cta-note {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-soft);
}

/* ---------- Тикер ---------- */
.ticker {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: 11px 0;
  background: rgba(18, 16, 12, 0.5);
}
.ticker-track {
  display: inline-flex;
  white-space: nowrap;
  animation: ticker-run 46s linear infinite;
  will-change: transform;
}
.ticker-track span {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  padding: 0 26px;
  border-right: 1px solid var(--line);
}
.ticker i { font-style: normal; font-size: 10px; }
.ticker .up { color: var(--plus); }
.ticker .dn { color: var(--minus); }
@keyframes ticker-run {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
}

/* ---------- Секции ---------- */
.section { padding: 58px 0; }
.section-head { margin-bottom: 30px; }
.section-title {
  font-size: clamp(22px, 5vw, 30px);
  font-weight: 700;
  line-height: 1.18;
  text-wrap: balance;
}
.section-sub { color: var(--ink-soft); margin-top: 8px; font-size: 15px; }

/* ---------- Таймлайн: дорога из деревни ---------- */
.timeline { position: relative; padding-left: 2px; }
.timeline::before {
  /* дорожная разметка — прерывистая линия */
  content: "";
  position: absolute;
  left: 21px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: repeating-linear-gradient(
    var(--line-strong) 0 14px,
    transparent 14px 26px
  );
}
.tl-item {
  position: relative;
  display: flex;
  gap: 20px;
  padding: 0 0 30px;
}
.tl-item:last-child { padding-bottom: 0; }
.tl-age {
  position: relative;
  z-index: 1;
  flex: 0 0 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  font: 600 15px/1 var(--font-mono);
  color: var(--ink-soft);
  box-shadow: 0 0 0 6px var(--bg);
}
.tl-item.is-now .tl-age {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--amber-ink);
  box-shadow: 0 0 0 6px var(--bg), 0 0 28px rgba(224, 168, 60, 0.35);
}
.tl-body { padding-top: 2px; }
.tl-body h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
}
.tl-body p { color: var(--ink-soft); margin: 0; font-size: 15px; line-height: 1.6; }
.tl-item.is-now .tl-body h3 { color: var(--amber); }

/* ---------- «В чём подвох» ---------- */
.honest-section {
  background: linear-gradient(180deg, var(--bg-2), rgba(18, 16, 12, 0.4));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.honest-lead { margin-bottom: 26px; }
.honest-lead p { font-size: 16px; line-height: 1.6; }
.honest-lead p:last-child {
  position: relative;
  border-left: 2px solid var(--amber);
  padding: 4px 0 4px 18px;
  margin-bottom: 0;
  color: var(--ink);
}
.vs-list { display: grid; gap: 8px; }
.vs-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 18px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.vs-row:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.vs-them {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-soft);
  text-decoration: line-through;
  text-decoration-color: var(--minus);
  text-decoration-thickness: 1.5px;
}
.vs-me {
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
  position: relative;
  padding-left: 16px;
}
.vs-me::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.52em;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--amber);
}
@media (max-width: 520px) {
  .vs-row { grid-template-columns: 1fr; gap: 6px; }
}

/* ---------- Карточки «что внутри» ---------- */
.card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 560px) {
  .card-grid { grid-template-columns: 1fr; }
}
.card {
  position: relative;
  background: linear-gradient(180deg, rgba(255, 250, 240, 0.03), transparent 55%), var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.card h3 { font-size: 15.5px; margin-bottom: 6px; }
.card p { color: var(--ink-soft); margin: 0; font-size: 14px; line-height: 1.6; }

/* ---------- Результаты ---------- */
.trades-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
@media (max-width: 520px) {
  .trades-grid { grid-template-columns: repeat(2, 1fr); }
  .trades-grid .trade-slot:nth-child(3) { display: none; }
}
.trade-slot {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s ease;
}
.trade-slot:hover { border-color: var(--line-strong); }
.trade-slot img { width: 100%; height: auto; }
.trade-slot figcaption {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-soft);
  padding: 10px 12px;
  border-top: 1px solid var(--line);
}
.trade-slot.is-empty img { display: none; }
.trade-slot.is-empty figcaption { border-top: none; }
.trade-slot.is-empty {
  min-height: 110px;
  display: flex;
  align-items: flex-end;
  background:
    repeating-linear-gradient(-45deg, transparent 0 10px, rgba(255, 250, 240, 0.02) 10px 20px),
    var(--bg-2);
}
.results-note {
  margin: 14px 0 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-soft);
}

/* ---------- «Первый проект» ---------- */
.first-section { padding-top: 30px; }
.first-panel {
  position: relative;
  background: linear-gradient(180deg, rgba(224, 168, 60, 0.06), transparent 60%), var(--bg-2);
  border: 1px solid var(--line-strong);
  border-radius: calc(var(--radius) * 1.3);
  padding: 30px 26px;
  overflow: hidden;
}
.first-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 26px;
  right: 26px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--amber), transparent);
  opacity: 0.7;
}
.first-panel .section-title { font-size: clamp(20px, 4.6vw, 26px); }
.first-body { margin-bottom: 20px; }
.first-body p { color: var(--ink-soft); font-size: 15px; line-height: 1.65; }
.first-body p:first-child { color: var(--ink); }
.first-body p:last-child { margin-bottom: 0; }

/* ---------- Лайфстайл ---------- */
.life-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.life-tile {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-2);
}
.life-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.85) contrast(1.05);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.life-tile:hover img { transform: scale(1.04); }
.life-tile figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 22px 12px 10px;
  font: 600 11px/1 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: linear-gradient(transparent, rgba(11, 10, 8, 0.8));
}
.life-tile.is-empty img { display: none; }
.life-tile.is-empty figcaption { background: none; color: var(--ink-soft); }
.life-tile.is-empty {
  background:
    repeating-linear-gradient(-45deg, transparent 0 10px, rgba(255, 250, 240, 0.02) 10px 20px),
    var(--bg-2);
}
@media (max-width: 560px) {
  .life-grid { grid-template-columns: repeat(2, 1fr); }
  .life-tile { aspect-ratio: 1 / 1; }
}

/* ---------- FAQ ---------- */
.faq-list { display: grid; gap: 8px; }
.faq-item {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 18px;
  transition: border-color 0.2s ease;
}
.faq-item[open], .faq-item:hover { border-color: var(--line-strong); }
.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 14.5px;
  padding: 15px 28px 15px 0;
  list-style: none;
  position: relative;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  color: var(--amber);
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 400;
  transition: transform 0.2s ease;
}
.faq-item[open] summary::after { content: "–"; }
.faq-item p { color: var(--ink-soft); font-size: 14px; line-height: 1.6; padding-bottom: 16px; margin: 0; }

/* ---------- Финальный CTA ---------- */
.cta-section { padding-bottom: 66px; }
.cta-panel {
  position: relative;
  text-align: center;
  padding: 46px 24px;
  background:
    radial-gradient(420px 220px at 50% 0%, rgba(224, 168, 60, 0.12), transparent 70%),
    var(--bg-2);
  border: 1px solid var(--line-strong);
  border-radius: calc(var(--radius) * 1.6);
  overflow: hidden;
}
.cta-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 15%;
  right: 15%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--amber), transparent);
}
.cta-title {
  font-size: clamp(24px, 6vw, 34px);
  font-weight: 900;
}
.cta-sub {
  color: var(--ink-soft);
  font-size: 15px;
  max-width: 420px;
  margin: 0 auto 24px;
}

/* ---------- Подвал ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 26px 0 96px; /* низ — запас под sticky-cta на мобиле */
  font-size: 12.5px;
  color: var(--ink-soft);
}
.footer-grid { display: grid; gap: 16px; margin-bottom: 16px; }
.footer-brand .wordmark { display: inline-block; margin-bottom: 8px; font-size: 13px; }
.footer-disclaimer { margin: 0; line-height: 1.6; }
.footer-col ul { display: flex; flex-wrap: wrap; gap: 5px 18px; }
.footer-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
}

/* ---------- Плавающая CTA (мобайл) ---------- */
.sticky-cta {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 40;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: linear-gradient(transparent, rgba(11, 10, 8, 0.94) 45%);
  display: none;
}
.sticky-cta .btn { width: 100%; }
@media (max-width: 640px) {
  .sticky-cta { display: block; }
}
@media (min-width: 641px) {
  .site-footer { padding-bottom: 26px; }
}

/* ---------- Появление при скролле ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1), transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}
[data-reveal].is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Десктоп ---------- */
@media (min-width: 900px) {
  :root { --container: 760px; }
  .hero { padding: 100px 0 72px; }
  .hero-title { font-size: 64px; }
  .section { padding: 72px 0; }
}
