@font-face {
  font-family: Brain Manrope;
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/assets/brain-hero/manrope-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: Brain Manrope;
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/assets/brain-hero/manrope-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

.brain-hero,
.site-header--brain {
  --brain-ink: #f4f6ff;
  --brain-muted: #aebbd5;
  --brain-accent: #beeaff;
  --brain-line: #8198c54d;
  font-family: Brain Manrope, Segoe UI, sans-serif;
  color: var(--brain-ink);
}

.brain-hero .container,
.site-header--brain .container {
  width: min(1376px, calc(100% - clamp(48px, 9vw, 144px)));
}

.homepage .site-header--brain {
  background: #0b1224;
  border-color: #9fb9f321;
}

.site-header--brain .header-inner { gap: 24px; }
.site-header--brain .desktop-nav { gap: clamp(20px, 3.5vw, 42px); margin-left: auto; }
.site-header--brain .nav-link {
  font: 700 13px/1.5 Brain Manrope, Segoe UI, sans-serif;
  color: #d2dbee;
}
.site-header--brain .nav-link:hover { color: var(--brain-accent); }

.brain-brand { display: flex; align-items: center; gap: 11px; white-space: nowrap; }
.brain-brand img { width: 40px; height: 40px; object-fit: contain; }
.brain-brand__text { display: flex; flex-direction: column; gap: 3px; }
.brain-brand strong { font-size: 21px; line-height: 1.05; font-weight: 800; letter-spacing: -.045em; }
.brain-brand strong span { color: #b39bff; }
.brain-brand small { font-size: 10px; line-height: 1.4; color: var(--brain-muted); font-weight: 600; }
.homepage .brain-header-cta {
  background: #a5b9ed0c;
  border: 1px solid var(--brain-line);
  border-radius: 8px;
  color: var(--brain-ink);
  font-size: 12px;
  font-weight: 750;
  padding: 11px 15px;
  gap: 12px;
  white-space: nowrap;
}
.homepage .brain-header-cta:hover { background: #a5b9ed1c; }
.brain-header-cta svg { width: 15px; height: 15px; color: var(--brain-accent); }
.site-header--brain .menu-toggle { background: #ffffff08; border-color: var(--brain-line); color: var(--brain-ink); }
.site-header--brain .mobile-nav { background: #0e1830; border-color: var(--brain-line); }

.brain-hero {
  --brain-header-height: 80px;
  position: relative;
  isolation: isolate;
  overflow: clip;
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: calc(100svh - var(--brain-header-height));
  background:
    radial-gradient(ellipse 64% 70% at 80% 44%, #1b2b54 0%, #111d39 38%, transparent 78%),
    linear-gradient(118deg, #0b1224 20%, #0b1429 82%, #10192f);
}

.brain-hero__main {
  display: grid;
  grid-template-columns: minmax(0, .94fr) minmax(0, 1.06fr);
  align-items: center;
}
.brain-hero__copy { position: relative; z-index: 2; padding: clamp(32px, 6vh, 70px) 0; }
.brain-hero h1 {
  margin: 0;
  font: 800 clamp(43px, 5.05vw, 78px)/1.075 Brain Manrope, Segoe UI, sans-serif;
  letter-spacing: -.066em;
  text-transform: none;
}
.brain-hero h1 span {
  background: linear-gradient(100deg, #a0e8ff 2%, #8db6ff 44%, #c2a2fa 94%);
  background-clip: text;
  color: transparent;
}
.brain-hero__description {
  max-width: 34ch;
  margin: 26px 0 31px;
  color: var(--brain-muted);
  font-size: clamp(16px, 1.36vw, 20px);
  font-weight: 550;
  line-height: 1.62;
}
.brain-hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.brain-hero__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  min-height: 52px;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.45;
  white-space: nowrap;
  transition: background-color .2s, border-color .2s;
}
.brain-hero__button svg { width: 18px; height: 18px; }
.brain-hero__button--primary { color: #111f34; background: var(--brain-accent); }
.brain-hero__button--primary:hover { background: #e0f5ff; }
.brain-hero__button--secondary { color: var(--brain-ink); border-color: var(--brain-line); }
.brain-hero__button--secondary:hover { background: #adc0f018; border-color: #8198c5; }

.brain-hero__scene {
  position: relative;
  align-self: stretch;
  min-width: 0;
  min-height: clamp(400px, 64vh, 660px);
}
.brain-hero__backglow {
  position: absolute;
  inset: 5% -7%;
  pointer-events: none;
  background:
    radial-gradient(ellipse 45% 41% at 37% 43%, #206db634, transparent 89%),
    radial-gradient(ellipse 45% 43% at 65% 57%, #7f48bc30, transparent 88%);
}
.brain-hero__backglow::before {
  content: '';
  position: absolute;
  inset: 5% 2%;
  background: radial-gradient(circle, #a9ccff32 .65px, transparent 1.2px) 0 0 / 22px 22px;
  mask-image: radial-gradient(ellipse, transparent 33%, #000 58%, transparent 73%);
}
.brain-hero__backglow::after {
  content: '';
  position: absolute;
  inset: 24% 5%;
  border: 1px solid #9bbaff30;
  border-radius: 50%;
  transform: rotate(-21deg);
  mask-image: linear-gradient(124deg, #000 4%, transparent 49%, #000 91%);
}
.brain-hero__scene canvas,
.brain-hero__poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  mix-blend-mode: screen;
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent),
    linear-gradient(transparent, #000 10%, #000 90%, transparent);
  mask-composite: intersect;
  pointer-events: none;
  transition: opacity .24s ease-out;
}
.brain-hero__scene canvas { opacity: 0; }
.brain-hero__scene[data-brain-state="ready"] canvas { opacity: 1; }
.brain-hero__scene[data-brain-state="ready"] .brain-hero__poster { opacity: 0; }

.brain-hero__footer {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px 0 22px;
  border-top: 1px solid #8faadd21;
  color: var(--brain-muted);
  font-size: 12px;
  font-weight: 700;
}
.brain-hero__scroll,
.brain-hero__replay:not([hidden]) { display: inline-flex; min-height: 44px; align-items: center; gap: 10px; }
.brain-hero__scroll:hover,
.brain-hero__replay:hover { color: var(--brain-ink); }
.brain-hero__scroll-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 29px;
  height: 29px;
  border: 1px solid var(--brain-line);
  border-radius: 50%;
  color: var(--brain-accent);
}
.brain-hero__scroll-icon svg { width: 14px; height: 14px; transform: rotate(90deg); }
.brain-hero__replay { color: inherit; font: inherit; border: 0; padding: 0; background: none; cursor: pointer; }
.brain-hero__replay span { color: var(--brain-accent); font: 21px/1 Segoe UI, sans-serif; }

@media (min-width: 861px) {
  .site-header--brain .desktop-nav { display: flex; }
  .site-header--brain .menu-toggle { display: none; }
}

@media (max-width: 860px) {
  .brain-hero { --brain-header-height: 71px; }
  .site-header--brain .header-inner { min-height: 70px; }
  .site-header--brain .desktop-nav { display: none; }
  .site-header--brain .menu-toggle { display: inline-grid; place-items: center; }
  .brain-hero__wide-break { display: none; }
}

@media (max-width: 700px) {
  .brain-hero,
  .site-header--brain { --brain-line: #8198c55e; }
  .brain-hero .container,
  .site-header--brain .container { width: calc(100% - 40px); }
  .brain-hero {
    background:
      radial-gradient(ellipse 100% 48% at 50% 68%, #1b2b54, transparent 88%),
      linear-gradient(155deg, #0b1224 28%, #0e1730);
  }
  .brain-hero__main { grid-template-columns: minmax(0, 1fr); }
  .brain-hero__copy { padding: 34px 0 0; }
  .brain-hero h1 { font-size: clamp(34px, 10.3vw, 56px); }
  .brain-hero__description { margin: 17px 0 22px; font-size: 15px; }
  .brain-hero__button { min-height: 47px; gap: 8px; padding: 10px 12px; font-size: 13px; }
  .brain-hero__button svg { width: 15px; height: 15px; }
  .brain-hero__scene {
    width: min(100%, 480px);
    height: clamp(242px, 77vw, 380px);
    min-height: 0;
    margin: -4px auto 0;
  }
  .brain-hero__footer { padding: 4px 0 12px; font-size: 11px; }
  .brain-hero__scroll,
  .brain-hero__replay:not([hidden]) { gap: 6px; }
  .site-header--brain .header-inner { gap: 8px; }
  .site-header--brain .header-actions { gap: 7px; }
  .site-header--brain .menu-toggle { width: 38px; height: 38px; padding: 0; }
  .site-header--brain .menu-toggle svg { width: 19px; height: 19px; }
  .brain-brand { gap: 8px; }
  .brain-brand img { width: 32px; height: 32px; }
  .brain-brand strong { font-size: 18px; }
  .brain-brand small { font-size: 8px; }
  .homepage .brain-header-cta { gap: 6px; padding: 9px; font-size: 10px; }
}

@media (max-width: 370px) {
  .brain-header-cta > span { display: none; }
  .homepage .brain-header-cta { width: 38px; height: 38px; justify-content: center; }
  .brain-hero__actions { gap: 8px; }
  .brain-hero__button { gap: 6px; padding-inline: 10px; font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .brain-hero__button,
  .brain-hero__scene canvas,
  .brain-hero__poster { transition: none; }
}
