/* HAIOS · haios.tech — заглушка v1. Токены — из дизайн-системы HAIOS (Premium Dark Tech). */

@font-face { font-family: 'Onest'; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(../fonts/onest-cyrillic-wght-normal.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Onest'; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(../fonts/onest-latin-wght-normal.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; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-display: swap; font-weight: 400;
  src: url(../fonts/jetbrains-mono-latin-400-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-display: swap; font-weight: 400;
  src: url(../fonts/jetbrains-mono-cyrillic-400-normal.woff2) format('woff2');
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-display: swap; font-weight: 500;
  src: url(../fonts/jetbrains-mono-latin-500-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+2000-206F; }

:root {
  --bg: #000;
  --bg-1: #16161D;
  --fg-1: #fff;
  --fg-2: rgba(255, 255, 255, 0.72);
  --fg-3: rgba(255, 255, 255, 0.48);
  --fg-4: rgba(255, 255, 255, 0.28);
  --accent: #6A3CFF;
  --glow: #8A5CFF;
  --lav: #BEA4F7;
  --deep: #220A46;
  --line: rgba(255, 255, 255, 0.10);
  --line-strong: rgba(255, 255, 255, 0.18);
  --sans: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --gutter: clamp(20px, 4vw, 48px);
  --hero-fade: 1;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); color: var(--fg-1); -webkit-text-size-adjust: 100%; scrollbar-width: thin; scrollbar-color: rgba(138, 92, 255, 0.45) transparent; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(138, 92, 255, 0.4); border-radius: 3px; }
body { margin: 0; font-family: var(--sans); font-size: 17px; line-height: 1.55; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: hidden; }
h1, h2, h3, p, ol { margin: 0; }
ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent); color: #fff; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- сцена ---------- */
#scene { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100lvh; display: block; z-index: 0; }
.poster { position: fixed; inset: 0; z-index: 0; opacity: 0; pointer-events: none;
  background: #000 center 42% / cover no-repeat; }
.no-webgl .poster { opacity: 1; background-image: url(../img/poster.jpg); }
.no-webgl #scene { display: none; }
main, .foot { position: relative; z-index: 1; }
.clean main, .clean .foot, .clean .cursor { visibility: hidden; }

/* ---------- метки ---------- */
.kicker { font-family: var(--mono); font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--lav); }

/* ---------- первый экран ---------- */
.hero { height: 260vh; }
.hero__stage { position: sticky; top: 0; height: 100vh; height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; }
.hero__copy { text-align: center; padding: 0 var(--gutter); margin-bottom: clamp(88px, 14vh, 150px);
  opacity: 0; transform: translateY(18px); filter: blur(6px);
  transition: opacity 1.6s var(--ease), transform 1.6s var(--ease), filter 1.6s var(--ease); }
.intro-done .hero__copy { opacity: var(--hero-fade); transform: translateY(calc((1 - var(--hero-fade)) * -30px)); filter: blur(calc((1 - var(--hero-fade)) * 8px)); }
.scrolling .hero__copy { transition: none; }
.hero h1 { margin-top: 18px; font-weight: 300; font-size: clamp(30px, 3.6vw, 58px); line-height: 1.08; letter-spacing: -0.025em; }
.hero__sub { margin-top: 14px; color: var(--fg-3); font-size: clamp(15px, 1.2vw, 18px); letter-spacing: 0.01em; }

.hint { position: absolute; bottom: max(26px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 12px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--fg-4);
  opacity: 0; transition: opacity 1.2s var(--ease) 0.8s; }
.intro-done .hint { opacity: calc(var(--hero-fade)); }
.hint i { position: relative; width: 1px; height: 44px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.hint i::after { content: ''; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: linear-gradient(transparent, var(--lav)); animation: drip 2.2s var(--ease) infinite; }
@keyframes drip { to { top: 110%; } }

/* ---------- блоки тизера ---------- */
.block { max-width: 1240px; margin: 0 auto; padding: clamp(96px, 20vh, 220px) var(--gutter); }
.block h2 { margin-top: 20px; font-weight: 500; font-size: clamp(32px, 4.2vw, 64px); line-height: 1.04; letter-spacing: -0.035em; max-width: 16ch; }
.block__lead { margin-top: 24px; max-width: 46ch; color: var(--fg-2); font-size: clamp(16px, 1.25vw, 19px); }

.reveal { opacity: 0; transform: translateY(26px); filter: blur(4px);
  transition: opacity 1s var(--ease), transform 1s var(--ease), filter 1s var(--ease); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; filter: none; }

/* 01 · манифест */
.manifesto { margin-top: -38vh; padding-top: 0; }
.manifesto__lead { margin-top: 28px; font-weight: 300; font-size: clamp(32px, 5vw, 80px); line-height: 1.06; letter-spacing: -0.035em; max-width: 17ch; }
.manifesto__lead::first-line { color: #fff; }
.manifesto__text { margin-top: 36px; max-width: 52ch; color: var(--fg-2); font-size: clamp(16px, 1.3vw, 20px); }

/* 02 · слои */
.layers__body { margin-top: clamp(48px, 8vh, 96px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.orbits { position: relative; aspect-ratio: 430 / 240; max-width: 520px; width: 100%; justify-self: center; }
.orbits svg { width: 100%; height: 100%; overflow: visible; }
.orbit ellipse { fill: none; stroke: rgba(255, 255, 255, 0.09); stroke-width: 1; transition: stroke 0.8s var(--ease), stroke-width 0.8s var(--ease); vector-effect: non-scaling-stroke; }
.orbit.on ellipse { stroke: rgba(138, 92, 255, 0.85); stroke-width: 1.5; filter: drop-shadow(0 0 6px rgba(138, 92, 255, 0.9)); }
.orbit__dot { fill: var(--lav); opacity: 0.35; transition: opacity 0.8s var(--ease); filter: drop-shadow(0 0 5px var(--glow)); }
.orbit.on .orbit__dot { opacity: 1; }
.orbit { transform-origin: 0 0; animation: spin var(--spd, 40s) linear infinite; }
.orbit[data-layer="0"] { --spd: 14s; }
.orbit[data-layer="1"] { --spd: 22s; animation-direction: reverse; }
.orbit[data-layer="2"] { --spd: 34s; }
.orbit[data-layer="3"] { --spd: 52s; animation-direction: reverse; }
@keyframes spin { to { transform: rotate(360deg); } }
.orbits__core-glow { animation: breathe-core 5s ease-in-out infinite; transform-origin: 0 0; }
@keyframes breathe-core { 50% { transform: scale(1.4); opacity: 0.6; } }

.layers__list { display: grid; gap: 6px; counter-reset: l; }
.layer { display: grid; grid-template-columns: 56px 1fr; gap: 8px; padding: 22px 20px; border-radius: 16px; border: 1px solid transparent;
  transition: background 0.6s var(--ease), border-color 0.6s var(--ease); }
.layer__n { font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; color: var(--fg-3); padding-top: 6px; transition: color 0.6s var(--ease); }
.layer h3 { font-size: clamp(19px, 1.6vw, 24px); font-weight: 600; letter-spacing: -0.02em; color: var(--fg-2); transition: color 0.6s var(--ease); }
.layer p { margin-top: 6px; color: var(--fg-3); font-size: 15px; line-height: 1.5; transition: color 0.6s var(--ease); }
.layer.on { background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01)); border-color: var(--line); }
.layer.on .layer__n { color: var(--glow); }
.layer.on h3 { color: #fff; }
.layer.on p { color: var(--fg-2); }

/* 03 · цикл */
.cycle__head { text-align: center; display: flex; flex-direction: column; align-items: center; }
.cycle__head h2 { max-width: 18ch; }
.cycle__ring { position: relative; margin: clamp(56px, 9vh, 110px) auto 0; width: min(640px, 100%); aspect-ratio: 1; }
.cycle__dial { position: absolute; inset: 11%; }
.cycle__dial svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.cycle__center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
.cycle__num { font-weight: 200; font-size: clamp(64px, 9vw, 132px); line-height: 1; letter-spacing: -0.04em; color: #fff;
  text-shadow: 0 0 28px rgba(138, 92, 255, 0.75), 0 0 60px rgba(106, 60, 255, 0.35); transition: opacity 0.3s var(--ease), transform 0.3s var(--ease); }
.cycle__num.swap { opacity: 0; transform: translateY(6px); }
.cycle__of { margin-top: 10px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--fg-4); }
.cycle__track { fill: none; stroke: rgba(255, 255, 255, 0.16); stroke-width: 1; vector-effect: non-scaling-stroke; }
.cycle__trail { fill: none; stroke: var(--glow); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 150 1068; transform: rotate(-140.6deg);
  filter: drop-shadow(0 0 6px rgba(138, 92, 255, 0.9)); vector-effect: non-scaling-stroke; }
.cycle__trail--long { stroke-width: 1; opacity: 0.35; stroke-dasharray: 420 1068; transform: rotate(-231.5deg); filter: none; }
.cycle__runner { fill: #fff; filter: drop-shadow(0 0 6px #fff) drop-shadow(0 0 14px var(--glow)); }
.cycle__runner-glow { fill: var(--glow); opacity: 0.4; filter: blur(8px); }
.cycle__nodes circle { fill: #0A0A0F; stroke: rgba(255, 255, 255, 0.5); stroke-width: 1; vector-effect: non-scaling-stroke; transition: stroke 0.5s var(--ease), fill 0.5s var(--ease); }
.cycle__nodes circle.on { fill: var(--lav); stroke: var(--lav); }
.cycle__steps li { position: absolute; left: 50%; top: 50%; width: 190px; margin: -1.5em 0 0 -95px; text-align: center;
  transform: rotate(var(--a)) translateY(calc(min(640px, 100vw - 2 * var(--gutter)) * -0.5 + 0px)) rotate(calc(var(--a) * -1));
  font-size: 16px; line-height: 1.3; color: var(--fg-3); transition: color 0.5s var(--ease), text-shadow 0.5s var(--ease); }
.cycle__steps li span { display: block; margin-bottom: 6px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; color: var(--fg-4); transition: color 0.5s var(--ease); }
.cycle__steps li.on { color: #fff; text-shadow: 0 0 24px rgba(138, 92, 255, 0.8); }
.cycle__steps li.on span { color: var(--glow); }
.cycle__steps li[data-step="0"] { --a: 0deg; }
.cycle__steps li[data-step="1"] { --a: 60deg; }
.cycle__steps li[data-step="2"] { --a: 120deg; }
.cycle__steps li[data-step="3"] { --a: 180deg; }
.cycle__steps li[data-step="4"] { --a: 240deg; }
.cycle__steps li[data-step="5"] { --a: 300deg; }

/* 04 · человек + ИИ */
.duo__grid { margin-top: clamp(40px, 7vh, 80px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card { padding: 30px 28px 34px; border-radius: 20px; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(22, 22, 29, 0.72), rgba(10, 10, 15, 0.5));
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); transition: border-color 0.5s var(--ease), background 0.5s var(--ease); }
.card:hover { border-color: var(--line-strong); }
.card__k { font-family: var(--mono); font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--glow); margin-bottom: 18px; }
.card p:last-child { font-size: clamp(17px, 1.35vw, 21px); line-height: 1.45; color: var(--fg-1); letter-spacing: -0.01em; }
.ote { margin-top: 16px; padding: 34px 30px; border-radius: 20px; border: 1px solid rgba(138, 92, 255, 0.35);
  background: radial-gradient(120% 140% at 0% 0%, rgba(106, 60, 255, 0.22), rgba(34, 10, 70, 0.18) 45%, rgba(10, 10, 15, 0.4));
  display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 24px; align-items: center; }
.ote__name { font-size: clamp(40px, 5vw, 76px); font-weight: 700; letter-spacing: -0.04em; line-height: 1; }
.ote__name span { display: block; margin-top: 12px; font-family: var(--mono); font-size: 12px; font-weight: 400; letter-spacing: 0.22em; text-transform: uppercase; color: var(--lav); }
.ote__text { color: var(--fg-2); font-size: clamp(16px, 1.3vw, 20px); }

/* финал */
.finale { height: 220vh; }
.finale__copy { position: sticky; top: 0; height: 100vh; height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; text-align: center;
  padding: 0 var(--gutter) clamp(90px, 15vh, 160px); opacity: var(--finale-fade, 0); transition: opacity 0.3s linear; }
.finale__title { margin-top: 16px; font-weight: 300; font-size: clamp(30px, 3.4vw, 54px); letter-spacing: -0.025em; }
.finale__sub { margin-top: 10px; color: var(--fg-3); }

.foot { display: flex; justify-content: space-between; align-items: center; padding: 28px var(--gutter) max(28px, env(safe-area-inset-bottom));
  color: var(--fg-4); font-size: 13px; border-top: 1px solid rgba(255, 255, 255, 0.06); background: rgba(0, 0, 0, 0.5); }
.foot__mono { font-family: var(--mono); letter-spacing: 0.16em; }

/* курсор: мягкое кольцо с инерцией — только для мыши */
.cursor { position: fixed; left: 0; top: 0; z-index: 10; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; pointer-events: none;
  border: 1px solid rgba(190, 164, 247, 0.55); box-shadow: 0 0 18px rgba(138, 92, 255, 0.35), inset 0 0 10px rgba(138, 92, 255, 0.25);
  opacity: 0; transition: opacity 0.4s var(--ease), width 0.3s var(--ease), height 0.3s var(--ease), margin 0.3s var(--ease); }
.cursor::after { content: ''; position: absolute; left: 50%; top: 50%; width: 4px; height: 4px; margin: -2px 0 0 -2px; border-radius: 50%; background: #fff; box-shadow: 0 0 8px var(--glow); }
@media (hover: hover) and (pointer: fine) {
  .cursor.live { opacity: 1; }
}

/* ---------- телефон ---------- */
@media (max-width: 820px) {
  body { font-size: 16px; }
  .hero { height: 230vh; }
  .hero__copy { margin-bottom: clamp(96px, 16vh, 150px); }
  .layers__body { grid-template-columns: 1fr; }
  .orbits { max-width: 360px; }
  .layer { grid-template-columns: 44px 1fr; padding: 18px 14px; }
  .cycle__ring { aspect-ratio: auto; width: 100%; }
  .cycle__dial { position: relative; inset: auto; width: min(300px, 80vw); aspect-ratio: 1; margin: 0 auto; }
  .cycle__steps { margin-top: 36px; display: grid; gap: 4px; }
  .cycle__steps li { position: static; width: auto; margin: 0; transform: none; text-align: left; padding: 12px 4px; border-bottom: 1px solid rgba(255, 255, 255, 0.06); display: flex; gap: 16px; align-items: baseline; }
  .cycle__steps li span { margin: 0; min-width: 28px; }
  .duo__grid { grid-template-columns: 1fr; }
  .ote { grid-template-columns: 1fr; padding: 28px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .orbit, .orbits__core-glow, .hint i::after { animation: none; }
  .reveal { transition-duration: 0.01s; }
}
