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

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: #ffffff18 transparent;
}

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  color: var(--text-primary);
  background: var(--bg-base);
  overflow-x: hidden;
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20'%3E%3Ccircle cx='10' cy='10' r='3' fill='%23d4d1cc' fill-opacity='0.85'/%3E%3Ccircle cx='10' cy='10' r='8' fill='none' stroke='%23d4d1cc' stroke-opacity='0.22' stroke-width='1'/%3E%3C/svg%3E") 10 10, crosshair;
  --mx: 50%;
  --my: 50%;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  background:
    radial-gradient(160px circle at var(--mx) var(--my), color-mix(in srgb, var(--accent) 10%, transparent), transparent 60%),
    radial-gradient(400px circle at var(--mx) var(--my), color-mix(in srgb, var(--cat-biography) 6%, transparent), transparent 70%);
  mix-blend-mode: screen;
  transition: none;
}

/* В лёгком режиме убираем курсорное "пятно" полностью */
body.landing-lite::after {
  display: none;
}

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #ffffff18; border-radius: 4px; }

/* ═══ GRAPH BACKGROUND ═══ */

.graph-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  /* даже без 3D/класса — мягкая тёмная подложка */
  background: linear-gradient(135deg, #050b16 0%, #0c0716 45%, #14060a 100%);
}

/* Статичный фон для слабых устройств (вместо 3D-графа) */
.graph-bg.graph-bg--static {
  /* Базовая тёмная подложка (без картинки) */
  background: linear-gradient(135deg, #050b16 0%, #0c0716 45%, #14060a 100%);
  opacity: 1;
  overflow: hidden;
}

/* Анимированные "цветовые облака" + затемнённый blur-слой */
.graph-bg.graph-bg--static::before {
  content: '';
  position: absolute;
  inset: -10%;
  background:
    radial-gradient(900px 700px at 12% 28%, rgba(60, 140, 255, 0.62), transparent 64%),
    radial-gradient(920px 780px at 88% 64%, rgba(90, 210, 255, 0.34), transparent 68%),
    radial-gradient(760px 640px at 70% 12%, rgba(140, 80, 255, 0.26), transparent 62%),
    radial-gradient(820px 720px at 26% 86%, rgba(110, 120, 255, 0.16), transparent 66%);
  filter: blur(22px) saturate(1.25) contrast(1.06);
  transform: translate3d(0, 0, 0) scale(1.06);
  opacity: 0.82;
  animation: graphBgFlow 10s ease-in-out infinite;
  will-change: transform, opacity;
}

.graph-bg.graph-bg--static::after {
  content: '';
  position: absolute;
  inset: 0;
  /* затемнение glass-слоя поверх цвета */
  background:
    /* центр-дампер: гарантированно убирает засвет */
    radial-gradient(420px 320px at 50% 46%, rgba(0,0,0,0.78), rgba(0,0,0,0.92)),
    /* виньетка */
    radial-gradient(980px 760px at 50% 46%, rgba(0,0,0,0.58), rgba(0,0,0,0.84)),
    radial-gradient(1600px 1200px at 50% 50%, rgba(0,0,0,0.18), rgba(0,0,0,0.78)),
    linear-gradient(180deg, rgba(0,0,0,0.40), rgba(0,0,0,0.62));
  pointer-events: none;
}

@keyframes graphBgFlow {
  0%   { transform: translate3d(-3.5%, -2.5%, 0) scale(1.08); opacity: 0.78; }
  25%  { transform: translate3d(2.8%, -3.2%, 0) scale(1.11); opacity: 0.92; }
  55%  { transform: translate3d(3.2%, 2.4%, 0) scale(1.10); opacity: 0.88; }
  80%  { transform: translate3d(-2.4%, 3.0%, 0) scale(1.12); opacity: 0.90; }
  100% { transform: translate3d(-3.5%, -2.5%, 0) scale(1.08); opacity: 0.78; }
}

/* ═══ SCROLL PROGRESS ═══ */

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--cat-biography), var(--cat-current_situation), var(--cat-inner_world));
  z-index: 100;
  transition: width 0.08s linear;
}

/* ═══ GLASS HEADER ═══ */

.glass-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  background: rgba(8, 10, 14, 0.74);
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(26px) saturate(1.35);
  -webkit-backdrop-filter: blur(26px) saturate(1.35);
  box-shadow: var(--glass-inset), inset 0 0 0 1px rgba(0,0,0,0.32);
}

.gh-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: inherit;
}
.gh-logo__icon {
  font-size: 22px;
  color: var(--cat-biography);
  filter: drop-shadow(0 0 6px color-mix(in srgb, var(--cat-biography) 53%, transparent));
}
.gh-logo__text {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .22em;
  background: linear-gradient(90deg, color-mix(in srgb, var(--text-primary) 82%, var(--cat-biography)), var(--text-primary), color-mix(in srgb, var(--text-primary) 82%, var(--cat-biography)));
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 6s linear infinite;
}

/* Small "beta" badge near the CORTEX logo */
.beta-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 16px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
  color: color-mix(in srgb, var(--text-primary) 70%, var(--cat-biography));
  background: color-mix(in srgb, var(--cat-biography) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--cat-biography) 26%, rgba(255, 255, 255, 0.10));
  box-shadow: 0 0 0 1px rgba(0,0,0,0.18) inset;
  user-select: none;
  white-space: nowrap;
}
.beta-badge--landing {
  transform: translateY(1px);
}
@keyframes shimmer {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

.gh-nav {
  display: flex;
  gap: 24px;
}
.gh-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: .02em;
  transition: color .2s;
}
.gh-nav a:hover {
  color: var(--text-secondary);
}

.gh-cta {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--cat-biography) 18%, transparent);
  border: 1px solid color-mix(in srgb, var(--cat-biography) 28%, var(--glass-edge));
  color: color-mix(in srgb, var(--text-secondary) 70%, var(--cat-biography));
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  backdrop-filter: blur(var(--overlay-blur));
  -webkit-backdrop-filter: blur(var(--overlay-blur));
  transition: background .2s, color .2s, border-color .2s;
}
.gh-cta:hover {
  background: color-mix(in srgb, var(--cat-biography) 32%, transparent);
  color: var(--text-primary);
}

/* ═══ SCROLL CONTAINER ═══ */

.scroll-container {
  position: relative;
  z-index: 1;
}

.screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 28px 40px;
  position: relative;
}

.section-inner {
  width: min(1100px, 100%);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ═══ GLASS PANELS ═══ */

.glass-panel {
  /* Важно: фон должен оставаться полупрозрачным, иначе backdrop-blur визуально "исчезает" */
  background: rgba(8, 10, 14, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.10);
  /* Без calc(): если var(--glass-sat) не число, весь фильтр дропается */
  backdrop-filter: blur(26px) saturate(1.35);
  -webkit-backdrop-filter: blur(26px) saturate(1.35);
  border-radius: var(--radius-xl);
  box-shadow: var(--glass-shadow), var(--glass-inset), inset 0 0 0 1px rgba(0,0,0,0.32);
}

.glass-card {
  background: rgba(8, 10, 14, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(22px) saturate(1.32);
  -webkit-backdrop-filter: blur(22px) saturate(1.32);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: var(--glass-shadow), var(--glass-inset), inset 0 0 0 1px rgba(0,0,0,0.34);
  transition: transform .3s ease, box-shadow .3s ease, border-color .25s;
}
.glass-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--glass-edge) 75%, var(--text-primary));
  box-shadow: 0 18px 56px rgba(0, 0, 0, 0.5), var(--glass-inset);
}

.glass-card__num {
  font-size: 36px;
  font-weight: 800;
  line-height: 1;
  color: color-mix(in srgb, var(--cat-biography) 22%, transparent);
  margin-bottom: 10px;
}
.glass-card__icon {
  font-size: 28px;
  color: color-mix(in srgb, var(--cat-inner_world) 42%, transparent);
  margin-bottom: 8px;
}

.glass-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}
.glass-card p {
  color: var(--text-secondary);
  line-height: 1.65;
  font-size: 14px;
}

/* ═══ REVEAL ANIMATION ═══ */

[data-reveal] {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1);
}
[data-reveal].visible {
  opacity: 1;
  transform: translateY(0);
}

[data-reveal]:nth-child(2) { transition-delay: .08s; }
[data-reveal]:nth-child(3) { transition-delay: .16s; }
[data-reveal]:nth-child(4) { transition-delay: .24s; }
[data-reveal]:nth-child(5) { transition-delay: .32s; }

/* ═══ HERO ═══ */

.screen--hero {
  align-items: center;
  justify-content: flex-start;
  padding-top: 120px;
}

.hero-content {
  max-width: 560px;
  padding: 40px 36px 32px;
  margin-left: 5vw;
}

.hero-eyebrow {
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--text-muted) 55%, var(--cat-biography));
  margin-bottom: 14px;
}

.hero-title {
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.04;
  font-weight: 700;
  margin-bottom: 16px;
  text-shadow: 0 4px 40px rgba(0,0,0,0.6);
}

.hero-desc {
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.7;
  max-width: 44ch;
  margin-bottom: 20px;
}

.hero-demo {
  margin-bottom: 22px;
}

.demo-chat {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.demo-chat__q,
.demo-chat__a {
  padding: 10px 16px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.5;
  min-height: 20px;
}

.demo-chat__q {
  background: color-mix(in srgb, var(--cat-biography) 22%, transparent);
  color: color-mix(in srgb, var(--text-secondary) 65%, var(--cat-biography));
  align-self: flex-end;
  max-width: 90%;
  border-bottom-right-radius: 4px;
  border: 1px solid color-mix(in srgb, var(--cat-biography) 35%, var(--glass-edge));
}

.demo-chat__a {
  background: var(--glass-veil);
  color: var(--text-secondary);
  align-self: flex-start;
  max-width: 95%;
  border-bottom-left-radius: 4px;
  border: 1px solid var(--glass-edge);
}

.demo-chat__q:empty,
.demo-chat__a:empty {
  display: none;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.hero-chips span {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border-radius: var(--radius-pill);
  background: var(--glass-veil);
  border: 1px solid var(--glass-edge);
  color: var(--text-muted);
  font-size: 11px;
  letter-spacing: .02em;
}

/* ═══ BUTTONS ═══ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  padding: 0 20px;
  border-radius: var(--radius-md);
  background: var(--glass-veil-strong);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--glass-edge);
  backdrop-filter: blur(var(--overlay-blur));
  -webkit-backdrop-filter: blur(var(--overlay-blur));
  transition: background .25s, color .25s, transform .2s, box-shadow .25s, border-color .25s;
}
a, .btn, summary, .gh-cta, .gh-nav a {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20'%3E%3Ccircle cx='10' cy='10' r='4.5' fill='%23d4d1cc' fill-opacity='0.9'/%3E%3Ccircle cx='10' cy='10' r='8.5' fill='none' stroke='%23d4d1cc' stroke-opacity='0.28' stroke-width='1'/%3E%3C/svg%3E") 10 10, pointer;
}

.btn:hover {
  background: var(--glass-veil-hover);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.btn--glow {
  background: linear-gradient(135deg, color-mix(in srgb, var(--cat-biography) 38%, transparent), color-mix(in srgb, var(--cat-current_situation) 28%, transparent));
  color: var(--text-primary);
  box-shadow: 0 4px 30px color-mix(in srgb, var(--cat-biography) 22%, transparent);
}
.btn--glow:hover {
  background: linear-gradient(135deg, color-mix(in srgb, var(--cat-biography) 52%, transparent), color-mix(in srgb, var(--cat-current_situation) 38%, transparent));
  box-shadow: 0 8px 40px color-mix(in srgb, var(--cat-biography) 32%, transparent);
  color: var(--text-primary);
}

.btn--lg {
  height: 52px;
  padding: 0 32px;
  font-size: 16px;
  border-radius: 16px;
}

/* ═══ SECTION TITLES ═══ */

.section-title {
  display: inline-block;
  padding: 14px 28px;
  font-size: 28px;
  font-weight: 700;
  align-self: flex-start;
}

/* ═══ CARDS LAYOUTS ═══ */

.cards-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.cases-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.glass-card--wide h3 {
  font-size: 16px;
  margin-bottom: 6px;
}

/* ═══ FAQ ═══ */

.faq-list {
  padding: 8px 28px;
  max-width: 680px;
}

.faq-list details {
  padding: 16px 0;
}
.faq-list details + details {
  border-top: 1px solid var(--glass-edge);
}

.faq-list summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  color: var(--text-secondary);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
}
.faq-list summary::before {
  content: '+';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--glass-veil);
  color: var(--text-muted);
  font-size: 14px;
  flex-shrink: 0;
  transition: transform .25s, background .25s;
}
.faq-list details[open] summary::before {
  transform: rotate(45deg);
  background: color-mix(in srgb, var(--cat-biography) 18%, transparent);
}
.faq-list summary::-webkit-details-marker { display: none; }

.faq-list p {
  color: var(--text-muted);
  line-height: 1.65;
  font-size: 14px;
  margin-top: 10px;
  padding-left: 32px;
}

/* ═══ CTA ═══ */

.screen--cta {
  min-height: 80vh;
}

.cta-block {
  text-align: center;
  padding: 48px 40px;
  max-width: 520px;
}
.cta-block h2 {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 10px;
}
.cta-block p {
  color: var(--text-muted);
  font-size: 16px;
  margin-bottom: 24px;
}

/* ═══ NODE TOOLTIP ═══ */

.node-tooltip {
  position: fixed;
  z-index: 60;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  background: var(--glass-tooltip-bg);
  border: 1px solid var(--glass-edge);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  box-shadow: var(--glass-shadow);
  max-width: 280px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px) scale(0.96);
  transition: opacity .25s, transform .25s;
}
.node-tooltip.active {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.node-tooltip__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.node-tooltip__cat {
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ═══ RESPONSIVE ═══ */

@media (max-width: 1024px) {
  body {
    cursor: auto;
  }

  body::after {
    display: none;
  }

  .glass-header {
    gap: 12px;
    padding: 0 16px;
  }

  .gh-logo__text {
    font-size: 16px;
    letter-spacing: .16em;
  }

  .gh-nav { display: none; }
  .cards-row,
  .cases-grid {
    grid-template-columns: 1fr;
  }
  .hero-content {
    margin-left: 0;
    max-width: 100%;
  }
  .screen {
    padding: 80px 16px 32px;
  }

  .btn,
  .gh-cta,
  .demo-node {
    min-height: 44px;
    touch-action: manipulation;
  }
}

@media (max-width: 767px) {
  .screen {
    min-height: auto;
    padding: 88px 14px 24px;
  }

  .screen--hero {
    padding-top: 96px;
  }

  .hero-content {
    margin-left: 0;
    padding: 24px 18px 20px;
  }

  .hero-title {
    font-size: 28px;
  }

  .hero-desc {
    font-size: 14px;
    line-height: 1.6;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .demo-chat__q,
  .demo-chat__a {
    max-width: 100%;
    padding: 10px 12px;
    font-size: 12px;
  }

  .hero-chips {
    gap: 6px;
  }

  .hero-chips span {
    height: 24px;
    padding: 0 8px;
    font-size: 10px;
  }

  .section-title {
    font-size: 22px;
    padding: 10px 18px;
  }
  .glass-header {
    padding: 0 14px;
  }

  .gh-cta {
    height: 32px;
    padding: 0 12px;
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  /* Убираем лишнюю анимацию UI, но оставляем "живой" фон лёгкого режима. */
  *:not(.graph-bg--static)::before,
  *:not(.graph-bg--static)::after,
  *:not(.graph-bg--static) {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
