:root {
  --green-900: #0f2a24;
  --green-800: #163a32;
  --green-600: #2f5d50;
  --sage: #9db5ab;
  --gold: #d9a84e;
  --gold-dark: #b88a3a;
  --paper: #f5f6f3;
  --white: #ffffff;
  --ink: #17211e;
  --muted: #5b6b65;
  --line: #dde3df;
  --radius: 14px;
  --font-serif: "Literata", Georgia, "Times New Roman", serif;
  --font-sans: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  font-family: var(--font-serif);
  letter-spacing: -.01em;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

/* Кнопки */
.btn-gold {
  background: var(--gold);
  color: var(--green-900);
  font-weight: 700;
  border: 0;
  border-radius: 10px;
  transition: background .25s, transform .25s var(--ease);
}

.btn-gold:hover {
  background: #e6b963;
  color: var(--green-900);
  transform: translateY(-2px);
}

.btn-outline-light {
  border-radius: 10px;
  font-weight: 700;
}

/* Навигация */
.site-nav {
  padding: 1rem 0;
  transition: background .3s, padding .3s, box-shadow .3s;
}

.site-nav.scrolled,
.site-nav:has(.show) {
  background: rgba(15, 42, 36, .96);
  backdrop-filter: blur(8px);
  padding: .6rem 0;
  box-shadow: 0 4px 24px rgba(0, 0, 0, .15);
}

.navbar-brand {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.35rem;
}

.navbar-brand i {
  color: var(--gold);
}

.nav-link {
  font-weight: 500;
}

/* Hero */
.hero {
  background: radial-gradient(900px 500px at 85% 20%, #1d4a3f 0%, transparent 60%), var(--green-900);
  color: var(--paper);
  padding: 9rem 0 6rem;
  overflow: hidden;
}

.hero h1 {
  font-size: clamp(2.3rem, 5.2vw, 4rem);
  line-height: 1.1;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.hero .lead {
  color: #c7d6cf;
  max-width: 34em;
  margin-bottom: 2rem;
}

.hero-meta {
  color: var(--sage);
  font-size: .95rem;
  margin-bottom: 1.2rem;
}

.hero-chart {
  width: 100%;
  height: auto;
}

.hero-in {
  opacity: 0;
  transform: translateY(18px);
  animation: rise .8s var(--ease) forwards;
}

.hero-in:nth-child(2) {
  animation-delay: .1s;
}

.hero-in:nth-child(3) {
  animation-delay: .2s;
}

.hero-in:nth-child(4) {
  animation-delay: .3s;
}

@keyframes rise {
  to {
    opacity: 1;
    transform: none;
  }
}

/* Цифры */
.stats {
  background: var(--green-800);
  color: var(--paper);
  padding: 3.5rem 0;
}

.stat {
  display: block;
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 4vw, 3rem);
  color: var(--gold);
  line-height: 1.1;
}

.stats span {
  display: block;
  font-size: .9rem;
  color: var(--sage);
  max-width: 15em;
  margin: .5rem auto 0;
  line-height: 1.45;
}

/* Секции */
.section {
  padding: 6rem 0;
}

.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 700;
}

/* Статья */
.toc {
  position: sticky;
  top: 100px;
  border-left: 2px solid var(--line);
  padding-left: 1.25rem;
}

.toc-title {
  font-weight: 700;
  margin-bottom: .75rem;
}

.toc a {
  display: block;
  color: var(--muted);
  text-decoration: none;
  padding: .3rem 0;
  transition: color .2s, transform .2s;
}

.toc a:hover,
.toc a.active {
  color: var(--green-600);
  transform: translateX(4px);
  font-weight: 700;
}

.article {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  line-height: 1.85;
}

.article p {
  margin-bottom: 1.4rem;
}

.article h2 {
  font-size: 1.8rem;
  font-weight: 700;
  margin: 3.2rem 0 1.2rem;
  display: flex;
  align-items: center;
  gap: .75rem;
}

.article h2 i {
  color: var(--gold-dark);
  font-size: 1.5rem;
  flex-shrink: 0;
}

.dropcap::first-letter {
  float: left;
  font-size: 4.6rem;
  line-height: .85;
  padding: .35rem .6rem 0 0;
  color: var(--green-600);
  font-weight: 700;
}

blockquote {
  margin: 2.5rem 0;
  padding: .5rem 0 .5rem 1.75rem;
  border-left: 4px solid var(--gold);
  font-size: 1.5rem;
  line-height: 1.5;
  font-style: italic;
  color: var(--green-800);
}

.mini {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  height: 100%;
  font-family: var(--font-sans);
  transition: transform .3s var(--ease), box-shadow .3s;
}

.mini:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(15, 42, 36, .1);
}

.mini i {
  font-size: 1.6rem;
  color: var(--green-600);
}

.mini h3 {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 700;
  margin: .5rem 0 .25rem;
}

.mini p {
  font-size: .95rem;
  line-height: 1.5;
  color: var(--muted);
  margin: 0;
}

/* Калькулятор */
.calc-section {
  background: var(--white);
  border-block: 1px solid var(--line);
}

.calc {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: clamp(1.5rem, 4vw, 3rem);
  box-shadow: 0 24px 60px rgba(15, 42, 36, .08);
}

.form-label {
  font-weight: 700;
}

.form-control,
.form-select {
  border-radius: 10px;
  border-color: var(--line);
  padding: .7rem 1rem;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--green-600);
  box-shadow: 0 0 0 .2rem rgba(47, 93, 80, .2);
}

.form-range::-webkit-slider-thumb {
  background: var(--green-600);
}

.form-range::-moz-range-thumb {
  background: var(--green-600);
}

.res-label {
  display: block;
  color: var(--muted);
  font-size: .9rem;
}

.res {
  font-family: var(--font-serif);
  font-size: 1.5rem;
}

.res-main {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  color: var(--green-600);
}

.split {
  display: flex;
  height: 12px;
  border-radius: 99px;
  overflow: hidden;
  background: var(--line);
}

.split span {
  height: 100%;
  transition: width .6s var(--ease);
}

#splitInvested {
  background: var(--green-600);
}

#splitGain {
  background: var(--gold);
}

/* Выводы */
.card-take {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem;
  height: 100%;
  transition: transform .3s var(--ease), box-shadow .3s;
}

.card-take:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(15, 42, 36, .12);
}

.card-take i {
  display: inline-grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: var(--green-900);
  color: var(--gold);
  font-size: 1.5rem;
  margin-bottom: 1.1rem;
}

.card-take h3 {
  font-size: 1.3rem;
  font-weight: 700;
}

.card-take p {
  color: var(--muted);
  margin: 0;
}

/* Подписка */
.subscribe {
  background: var(--green-900);
  color: var(--paper);
  padding: 5.5rem 0;
}

.subscribe h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 700;
}

.subscribe p {
  color: #c7d6cf;
}

.form-msg {
  min-height: 1.5rem;
  color: var(--gold) !important;
  font-weight: 500;
}

/* Футер */
.site-footer {
  background: #0a1f1a;
  color: var(--sage);
  padding: 2.5rem 0;
  text-align: center;
}

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

/* Наверх */
.to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: var(--gold);
  color: var(--green-900);
  font-size: 1.2rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity .3s, transform .3s var(--ease), visibility .3s;
  z-index: 1030;
}

.to-top.show {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.to-top:hover {
  background: #e6b963;
}

/* Появление при прокрутке */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}

[data-reveal].visible {
  opacity: 1;
  transform: none;
}

/* Адаптивность */
@media (max-width: 991.98px) {
  .hero {
    padding: 7.5rem 0 4rem;
  }

  .section {
    padding: 4.5rem 0;
  }

  .site-nav {
    background: rgba(15, 42, 36, .96);
  }
}

@media (max-width: 575.98px) {
  .article {
    font-size: 1.05rem;
  }

  .article h2 {
    font-size: 1.5rem;
  }

  blockquote {
    font-size: 1.25rem;
  }
}

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

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

  [data-reveal],
  .hero-in {
    opacity: 1;
    transform: none;
  }
}