:root {
  --bg: #0a0a0a;
  --bg-2: rgba(20, 20, 20, 0.72);
  --bg-3: rgba(28, 28, 28, 0.78);
  --fg: #f5f5f5;
  --fg-mute: #b8b8b8;
  --fg-dim: #7a7a7a;
  --accent: #34d399;
  --accent-2: #10b981;
  --line: rgba(255, 255, 255, 0.08);
  --radius: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  background:
    linear-gradient(180deg, rgba(10, 10, 10, .55) 0%, rgba(10, 10, 10, .82) 70%, rgba(10, 10, 10, .92) 100%),
    radial-gradient(ellipse at 50% 0%, rgba(52, 211, 153, .07), transparent 55%),
    url("images/bg-forest-lake.png") center / cover no-repeat fixed #0a0a0a;
}
body {
  color: var(--fg);
  font: 16px/1.55 -apple-system, "Segoe UI", system-ui, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background: transparent;
}

img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); }

.container { max-width: 1180px; margin: 0 auto; padding: 0 28px; }

/* TOP BAR */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 28px;
  background: rgba(10,10,10,.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--fg); font-weight: 600; letter-spacing: .02em; font-size: 18px; }
.logo svg { color: var(--accent); }
.lang { display: inline-flex; gap: 4px; border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.lang button {
  appearance: none; border: 0; background: transparent; color: var(--fg-mute);
  padding: 6px 12px; border-radius: 999px; font: inherit; cursor: pointer;
  font-size: 13px; letter-spacing: .04em; font-weight: 500;
}
.lang button.active { background: var(--accent); color: #062018; }

/* HERO */
.hero {
  position: relative; min-height: 78vh;
  display: flex; align-items: flex-end;
  overflow: hidden;
}
.hero-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: .6;
  background: linear-gradient(135deg, #0d2018, #0a0a0a);
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,10,10,.4) 0%, rgba(10,10,10,.25) 50%, rgba(10,10,10,.95) 100%);
}
.hero-content {
  position: relative; z-index: 2;
  max-width: 1180px; margin: 0 auto; width: 100%;
  padding: 0 28px 80px;
}
.kicker {
  text-transform: uppercase; letter-spacing: .14em; font-size: 12px;
  color: var(--accent); margin-bottom: 18px;
}
h1 {
  font-size: clamp(36px, 6vw, 76px);
  font-weight: 700; line-height: 1.05; letter-spacing: -.02em;
  margin-bottom: 22px; max-width: 18ch;
}
.lead {
  font-size: clamp(17px, 1.5vw, 21px);
  color: var(--fg-mute); max-width: 56ch; margin-bottom: 32px;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 14px 24px; border-radius: 999px;
  font-weight: 600; font-size: 15px; transition: transform .15s, background .15s, color .15s;
  border: 1px solid transparent;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #062018; }
.btn-primary:hover { background: var(--accent-2); color: #062018; }
.btn-ghost { border-color: var(--line); color: var(--fg); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* STATS */
.stats {
  background: var(--bg-2);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 36px 0;
}
.stats-grid {
  display: grid; gap: 28px;
  grid-template-columns: repeat(5, 1fr);
}
.stats-grid > div { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.stats-grid b { font-size: 28px; font-weight: 700; letter-spacing: -.01em; color: var(--fg); }
.stats-grid span { font-size: 13px; color: var(--fg-mute); text-transform: uppercase; letter-spacing: .08em; }
.stats-total b { color: var(--accent); }
@media (max-width: 760px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }

/* SECTIONS */
.section { padding: 88px 0; border-bottom: 1px solid var(--line); position: relative; }
.section::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgba(10, 10, 10, 0.55);
  backdrop-filter: blur(10px) saturate(130%);
  -webkit-backdrop-filter: blur(10px) saturate(130%);
}
.section h2 {
  font-size: clamp(28px, 3.5vw, 44px);
  font-weight: 700; letter-spacing: -.015em;
  margin-bottom: 16px; max-width: 22ch;
}
.section-lead { color: var(--fg-mute); margin-bottom: 36px; max-width: 60ch; font-size: 17px; }

/* SPEC */
.spec-grid {
  display: grid; gap: 20px;
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 900px) { .spec-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .spec-grid { grid-template-columns: 1fr; } }
.spec-card {
  background: var(--bg-2);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px;
  transition: transform .2s, border-color .2s;
}
.spec-card:hover { transform: translateY(-2px); border-color: rgba(52, 211, 153, 0.3); }
.spec-card h3 { font-size: 18px; font-weight: 600; margin-bottom: 8px; color: var(--accent); }
.spec-card p { color: var(--fg-mute); font-size: 15px; }

/* STAGES */
.section-stages::before { background: rgba(10, 10, 10, 0.62); }
.stages-grid {
  display: grid; gap: 24px;
  grid-template-columns: repeat(2, 1fr);
}
@media (max-width: 760px) { .stages-grid { grid-template-columns: 1fr; } }
.stage {
  background: var(--bg-3);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; position: relative;
  transition: transform .25s, border-color .25s;
}
.stage:hover { transform: translateY(-2px); border-color: var(--accent); }
.stage img {
  width: 100%; aspect-ratio: 16/9; object-fit: cover;
  background: linear-gradient(135deg, #0d2018, #1a1a1a);
  transform: scale(1.12);
  will-change: transform;
}
.stage-num {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  background: var(--accent); color: #062018;
  font-weight: 700; font-size: 13px; letter-spacing: .04em;
  padding: 4px 12px; border-radius: 999px;
}
.stage h3 { padding: 18px 20px 6px; font-size: 19px; font-weight: 600; }
.stage p { padding: 0 20px 22px; color: var(--fg-mute); font-size: 15px; }

/* TABLE */
.cost {
  width: 100%; border-collapse: collapse;
  background: var(--bg-2);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden;
}
.cost th, .cost td {
  padding: 14px 18px; text-align: left;
  border-bottom: 1px solid var(--line); font-size: 15px;
}
.cost th {
  background: var(--bg-3); font-weight: 600; color: var(--fg-mute);
  text-transform: uppercase; letter-spacing: .06em; font-size: 12px;
}
.cost td:last-child, .cost th:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.cost tr:last-child td { border-bottom: 0; }
.cost .row-sum td { font-weight: 700; background: rgba(52,211,153,.08); color: var(--fg); border-top: 1px solid var(--accent); }

/* TOTAL */
.section-total::before { background: linear-gradient(180deg, rgba(20, 20, 20, 0.6), rgba(10, 10, 10, 0.85)); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.total-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 28px; }
@media (max-width: 760px) { .total-grid { grid-template-columns: 1fr; } }
.total-card {
  background: var(--bg-3);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 36px; position: relative;
}
.total-card-china { opacity: .8; }
.total-card .kicker { margin-bottom: 12px; }
.total-card-china .kicker { color: var(--fg-dim); }
.total-num {
  font-size: clamp(36px, 5vw, 56px); font-weight: 700;
  letter-spacing: -.02em; color: var(--accent); margin-bottom: 18px;
}
.total-card-china .total-num { color: var(--fg-mute); }
.total-card ul { list-style: none; }
.total-card li {
  padding: 8px 0 8px 22px; position: relative;
  color: var(--fg-mute); font-size: 15px;
  border-top: 1px solid var(--line);
}
.total-card li:first-child { border-top: 0; }
.total-card li::before {
  content: "→"; position: absolute; left: 0; color: var(--accent);
}
.total-card-china li::before { content: "•"; color: var(--fg-dim); }
.total-note {
  margin-top: 8px; padding: 18px 22px;
  background: var(--bg-3);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--fg-mute); font-size: 15px;
}

/* RISKS */
.risks-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
@media (max-width: 760px) { .risks-grid { grid-template-columns: 1fr; } }
.risk {
  background: var(--bg-2);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  padding: 22px 24px;
}
.risk h3 { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.risk p { color: var(--fg-mute); font-size: 15px; }

/* CTA */
.cta {
  position: relative;
  text-align: center; padding: 88px 0;
}
.cta::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(135deg, rgba(12, 42, 31, 0.8), rgba(10, 10, 10, 0.85));
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}
.cta h2 { font-size: clamp(28px, 3.5vw, 40px); margin-bottom: 14px; }
.cta p { color: var(--fg-mute); font-size: 17px; margin-bottom: 26px; max-width: 50ch; margin-inline: auto; }

/* FOOTER */
footer {
  padding: 40px 0; color: var(--fg-dim); border-top: 1px solid var(--line);
  background: rgba(10, 10, 10, 0.7);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
footer .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 13px; }
.footer-note { color: var(--fg-dim); }

/* ------------------------------------------------------------------ */
/* SCROLL-DRIVEN MOTION — фон стоит, контент дышит на ходу             */
/* ------------------------------------------------------------------ */
@media (prefers-reduced-motion: no-preference) {

  /* Hero — текст fade out при скролле, фото в hero едет медленнее */
  .hero-img {
    will-change: transform;
    transform: scale(1.08) translateY(0);
  }
  .hero-content { will-change: transform, opacity; }

  @supports (animation-timeline: view()) {

    /* === HERO: текст уходит вверх, hero-img параллаксит вниз === */
    .hero-content {
      animation: hero-text-fade linear both;
      animation-timeline: scroll(root);
      animation-range: 0 100vh;
    }
    @keyframes hero-text-fade {
      from { opacity: 1; transform: translateY(0); }
      60%  { opacity: 1; transform: translateY(0); }
      to   { opacity: 0; transform: translateY(-60px); }
    }
    .hero-img {
      animation: hero-img-parallax linear both;
      animation-timeline: scroll(root);
      animation-range: 0 100vh;
    }
    @keyframes hero-img-parallax {
      from { transform: scale(1.08) translateY(0); }
      to   { transform: scale(1.18) translateY(8%); }
    }

    /* === STATS: всплывает снизу при входе === */
    .stats {
      animation: rise-in linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 70%;
    }

    /* === SECTIONS: каждая секция плавно появляется === */
    .section {
      animation: rise-in linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 50%;
    }
    @keyframes rise-in {
      from { opacity: 0; transform: translateY(50px); }
      to   { opacity: 1; transform: translateY(0); }
    }

    /* === SPEC карточки: stagger по индексу === */
    .spec-card {
      animation: card-pop linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 60%;
    }
    @keyframes card-pop {
      from { opacity: 0; transform: translateY(40px) scale(0.96); }
      to   { opacity: 1; transform: translateY(0) scale(1); }
    }

    /* === STAGES: карточки stagger reveal + image parallax внутри === */
    .stage {
      animation: stage-card-in linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 55%;
    }
    @keyframes stage-card-in {
      from { opacity: 0; transform: translateY(60px); }
      to   { opacity: 1; transform: translateY(0); }
    }
    /* Картинка внутри карточки едет вверх когда карточка проезжает viewport */
    .stage img {
      animation: stage-img-parallax linear both;
      animation-timeline: view();
      animation-range: cover 0% cover 100%;
    }
    @keyframes stage-img-parallax {
      from { transform: scale(1.12) translateY(8%); }
      to   { transform: scale(1.12) translateY(-8%); }
    }

    /* === TABLES: scale-in === */
    .cost {
      animation: table-in linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 65%;
    }
    @keyframes table-in {
      from { opacity: 0; transform: scale(0.97) translateY(30px); }
      to   { opacity: 1; transform: scale(1) translateY(0); }
    }

    /* === TOTAL CARDS: side-in === */
    .total-card:first-child {
      animation: slide-from-left linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 65%;
    }
    .total-card:last-child {
      animation: slide-from-right linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 65%;
    }
    @keyframes slide-from-left {
      from { opacity: 0; transform: translateX(-50px); }
      to   { opacity: 1; transform: translateX(0); }
    }
    @keyframes slide-from-right {
      from { opacity: 0; transform: translateX(50px); }
      to   { opacity: 1; transform: translateX(0); }
    }

    /* === RISKS: каждая карточка появляется === */
    .risk {
      animation: risk-in linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 60%;
    }
    @keyframes risk-in {
      from { opacity: 0; transform: translateX(-30px); }
      to   { opacity: 1; transform: translateX(0); }
    }

    /* === Stats numbers: pop в появлении === */
    .stats-grid > div {
      animation: stat-pop linear both;
      animation-timeline: view(.stats);
      animation-range: entry 0% entry 80%;
    }
    @keyframes stat-pop {
      from { opacity: 0; transform: translateY(20px) scale(0.9); }
      to   { opacity: 1; transform: translateY(0) scale(1); }
    }
  }
}

/* Reduced motion fallback — без анимаций */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

