:root {
  --bg: #0A0C14;
  --bg-soft: #11131E;
  --bg-card: #14172A;
  --text: #FAFAFA;
  --text-soft: #C9CCD9;
  --text-dim: #8B8FA3;
  --accent: #FFB547;
  --accent-soft: rgba(255, 181, 71, 0.10);
  --accent-strong: rgba(255, 181, 71, 0.36);
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.14);
  --red: #E5736A;

  /* Один контейнер для всего — единая ширина */
  --container: 880px;
  --container-wide: 1040px;
  --pad: 32px;

  /* Spacing scale */
  --s1: 8px;
  --s2: 16px;
  --s3: 24px;
  --s4: 32px;
  --s5: 48px;
  --s6: 64px;
  --s7: 80px;
  --s8: 112px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Onest', -apple-system, system-ui, sans-serif;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  max-width: 100vw;
  overflow-x: clip;
}
body {
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse 900px 600px at 88% -5%, rgba(255,181,71,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 700px 500px at -5% 35%, rgba(255,181,71,0.04) 0%, transparent 60%);
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.022;
  pointer-events: none;
  z-index: 0;
}

img, svg, canvas, iframe { max-width: 100%; height: auto; }

/* === NAV === */
nav {
  position: sticky;
  top: 0;
  backdrop-filter: blur(16px);
  background: rgba(10, 12, 20, 0.78);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  padding: 18px var(--pad);
}
.nav-wrap {
  max-width: var(--container-wide);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.nav-logo {
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.2px;
  color: var(--text);
  text-decoration: none;
}
.nav-logo .ai { color: var(--accent); font-size: 14px; margin-left: 1px; }
.nav-actions { display: flex; gap: 28px; align-items: center; }
.nav-link {
  color: var(--text-soft);
  text-decoration: none;
  font-size: 14.5px;
  transition: color 0.18s;
}
.nav-link:hover { color: var(--text); }
.nav-lang {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.8px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: color 0.18s, border-color 0.18s;
}
.nav-lang:hover { color: var(--accent); border-color: var(--accent); }

/* === WRAP === единый контейнер */
.wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad);
  position: relative;
  z-index: 1;
}

/* === HERO === скромный, в линию с остальным контентом */
.hero {
  padding: var(--s7) 0 var(--s7);
  position: relative;
}
.hero-canvas-fixed {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  opacity: 0.45;
}
.hero-content { position: relative; z-index: 2; }
.hero-kicker {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--s4);
  font-weight: 600;
  padding: 5px 12px;
  border: 1px solid var(--accent-strong);
  border-radius: 100px;
  background: var(--accent-soft);
}
.hero-title {
  font-size: clamp(34px, 4.4vw, 56px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -1.2px;
  margin-bottom: var(--s3);
}
.hero-title .accent { color: var(--accent); }
.hero-sub {
  font-size: clamp(17px, 1.4vw, 20px);
  color: var(--text-soft);
  line-height: 1.6;
  margin-bottom: var(--s3);
  max-width: 700px;
}
.hero-micro {
  font-size: 14px;
  color: var(--text-dim);
  margin-bottom: var(--s5);
}
.hero-micro span { color: var(--text-soft); }
.hero-cta {
  display: flex;
  gap: var(--s2);
  flex-wrap: wrap;
  align-items: center;
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: var(--bg);
  padding: 14px 24px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.15s, filter 0.15s, box-shadow 0.2s;
  box-shadow: 0 2px 16px rgba(255, 181, 71, 0.18);
}
.btn-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
  box-shadow: 0 4px 22px rgba(255, 181, 71, 0.3);
}
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  background: transparent;
  padding: 14px 22px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.18s, background 0.18s;
}
.btn-secondary:hover { border-color: var(--accent); background: var(--accent-soft); }

/* === SECTIONS === одинаковый ритм */
section {
  padding: var(--s7) 0;
  border-top: 1px solid var(--border);
}
.section-kicker {
  font-size: 12px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--s2);
  font-weight: 600;
}
.section-title {
  font-size: clamp(28px, 3.2vw, 40px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.6px;
  margin-bottom: var(--s4);
}
.section-text {
  font-size: 17px;
  color: var(--text-soft);
  line-height: 1.7;
  max-width: 700px;
}
.section-text p { margin-bottom: var(--s3); }
.section-text p:last-child { margin-bottom: 0; }
.section-text strong { color: var(--text); font-weight: 600; }

/* === COMPARE (Category narrative) === */
.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s3);
  margin-top: var(--s5);
}
.compare-card {
  padding: var(--s4) var(--s4);
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-soft);
}
.compare-card.old { border-color: rgba(229,115,106,0.22); }
.compare-card.new {
  border-color: var(--accent-strong);
  background: linear-gradient(165deg, rgba(255,181,71,0.06), rgba(255,181,71,0.01));
}
.compare-label {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: var(--s3);
}
.compare-card.old .compare-label { background: rgba(229,115,106,0.14); color: var(--red); }
.compare-card.new .compare-label { background: rgba(255,181,71,0.18); color: var(--accent); }
.compare-title {
  font-size: 21px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--s3);
  letter-spacing: -0.2px;
}
.compare-list { list-style: none; padding: 0; margin: 0; }
.compare-list li {
  color: var(--text-soft);
  padding: 9px 0;
  font-size: 15.5px;
  line-height: 1.5;
  padding-left: 18px;
  position: relative;
  border-bottom: 1px solid var(--border);
}
.compare-list li:last-child { border-bottom: none; }
.compare-list li:before {
  content: '·';
  position: absolute;
  left: 6px;
  color: var(--text-dim);
  font-weight: 700;
}
.compare + .section-text {
  font-size: 17px;
  color: var(--text-soft);
  line-height: 1.7;
  max-width: 700px;
}

/* === PROOF GRID === */
.proof-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s2);
  margin-top: var(--s5);
}
.proof-item {
  padding: var(--s3) var(--s3);
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-soft);
  transition: border-color 0.18s, transform 0.18s, background 0.18s;
}
.proof-item:hover {
  border-color: var(--accent-strong);
  transform: translateY(-2px);
  background: var(--bg-card);
}
.proof-num {
  font-size: 13px;
  letter-spacing: 1.3px;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 6px;
}
.proof-text {
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
}
.proof-grid + .section-text {
  font-size: 17px;
  color: var(--text-soft);
  line-height: 1.7;
  max-width: 700px;
}

/* === ESSAYS === */
.essay-list {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  margin-top: var(--s5);
  margin-bottom: var(--s4);
}
.essay-item {
  display: block;
  text-decoration: none;
  padding: var(--s4) var(--s4);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: border-color 0.18s, transform 0.15s, background 0.18s;
}
.essay-item:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  background: var(--bg-card);
}
.essay-tag {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: var(--s2);
}
.essay-title {
  color: var(--text);
  font-size: 21px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 8px;
  letter-spacing: -0.2px;
}
.essay-desc {
  color: var(--text-soft);
  font-size: 15px;
  line-height: 1.55;
}

/* === TG BUTTON === */
.tg-button {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 18px 24px;
  background: linear-gradient(135deg, rgba(255,181,71,0.14), rgba(255,181,71,0.04));
  border: 1px solid var(--accent-strong);
  border-radius: 14px;
  color: var(--text);
  text-decoration: none;
  transition: transform 0.15s, border-color 0.18s, background 0.18s, box-shadow 0.2s;
}
.tg-button:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(255,181,71,0.2), rgba(255,181,71,0.08));
  box-shadow: 0 4px 22px rgba(255, 181, 71, 0.18);
}
.tg-button svg { color: var(--accent); flex-shrink: 0; width: 26px; height: 26px; }
.tg-button-text { display: flex; flex-direction: column; gap: 2px; }
.tg-button-title { font-weight: 700; font-size: 16px; color: var(--text); }
.tg-button-sub { font-size: 13.5px; color: var(--text-soft); }

/* === CONTACT === */
.contact-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--s5);
  margin-top: var(--s4);
  align-items: start;
}
.contact-buttons { display: flex; flex-direction: column; gap: var(--s2); }
.contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  background: var(--bg-soft);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  min-width: 180px;
  transition: border-color 0.18s, background 0.18s, transform 0.15s;
}
.contact-btn svg { color: var(--accent); flex-shrink: 0; }
.contact-btn:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-1px);
}
.contact-filter {
  padding: var(--s4);
  background: var(--bg-soft);
  border-left: 3px solid var(--accent);
  border-radius: 4px;
}
.contact-filter h4 {
  color: var(--text);
  font-weight: 700;
  margin-bottom: var(--s2);
  font-size: 16px;
}
.contact-filter ol {
  margin-left: var(--s3);
  color: var(--text-soft);
  font-size: 15px;
  line-height: 1.65;
}
.contact-filter li { margin-bottom: 4px; }
.contact-filter .note {
  font-size: 13.5px;
  color: var(--text-dim);
  margin-top: var(--s2);
  font-style: italic;
}

/* === FOOTER === */
footer {
  border-top: 1px solid var(--border);
  padding: var(--s5) 0;
  margin-top: var(--s5);
  color: var(--text-dim);
  font-size: 13px;
}
.footer-wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
footer a { color: var(--text-soft); text-decoration: none; margin-left: 18px; transition: color 0.18s; }
footer a:first-of-type { margin-left: 0; }
footer a:hover { color: var(--accent); }

/* === ESSAY ARTICLES === */
article {
  max-width: 720px;
  margin: 0 auto;
  padding: var(--s7) var(--pad) var(--s8);
}
article h1 {
  font-size: clamp(30px, 3.8vw, 44px);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.7px;
  margin-bottom: var(--s5);
  color: var(--text);
}
article h2 {
  font-size: clamp(22px, 2.2vw, 28px);
  font-weight: 700;
  line-height: 1.25;
  margin: var(--s5) 0 var(--s2);
  color: var(--text);
  letter-spacing: -0.3px;
}
article h3 {
  font-size: 19px;
  font-weight: 600;
  margin: var(--s4) 0 12px;
  color: var(--text);
}
article p {
  color: var(--text-soft);
  font-size: 17.5px;
  line-height: 1.75;
  margin-bottom: var(--s3);
}
article ul {
  margin: 0 0 var(--s3) var(--s3);
  color: var(--text-soft);
  font-size: 17.5px;
  line-height: 1.7;
}
article li { margin-bottom: 6px; }
article strong { color: var(--text); font-weight: 600; }
.back-link {
  display: inline-block;
  margin-bottom: var(--s4);
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14px;
}
.back-link:hover { color: var(--accent); }

/* === RESPONSIVE === */
@media (max-width: 900px) {
  :root { --pad: 24px; }
  .proof-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; gap: var(--s3); }
}
@media (max-width: 700px) {
  :root { --pad: 20px; }
  .compare { grid-template-columns: 1fr; }
  .hero { padding: var(--s5) 0 var(--s6); }
  section { padding: var(--s6) 0; }
  .hero-title {
  font-size: clamp(34px, 4.4vw, 56px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -1.2px;
  margin-bottom: var(--s3);
}
  .section-title {
  font-size: clamp(28px, 3.2vw, 40px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.6px;
  margin-bottom: var(--s4);
}
  .essay-item { padding: var(--s3) var(--s3); }
  .essay-title { font-size: 19px; }
  .compare-card { padding: var(--s3); }
  .nav-actions { gap: 14px; }
  .nav-link[href="#category"], .nav-link[href="#about"] { display: none; }
}
@media (max-width: 420px) {
  :root { --pad: 16px; }
  .hero-title {
  font-size: clamp(34px, 4.4vw, 56px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -1.2px;
  margin-bottom: var(--s3);
}
  .proof-grid { grid-template-columns: 1fr; }
  .nav-link[href="#essays"], .nav-link[href="#contact"] { display: none; }
}
