/* DARSYNT — стили сайта. Палитра взята из брендбука (colors.css). */
:root {
  --cyan: #00D4FF;
  --blue: #3B82FF;
  --purple: #9B5CFF;
  --light: #F5F7FF;
  --dark: #0B0F1A;
  --grad: linear-gradient(135deg, #00D4FF, #3B82FF 52%, #9B5CFF);

  --bg-1: #0B0F1A;
  --bg-2: #101627;
  --line: rgba(245, 247, 255, .09);
  --line-2: rgba(245, 247, 255, .16);
  --text: #F5F7FF;
  --muted: rgba(245, 247, 255, .72);

  --font: 'Sora', 'Segoe UI Variable Display', 'Segoe UI', system-ui, -apple-system, Roboto, 'Helvetica Neue', Arial, sans-serif;
  --header-h: 72px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --wrap: 1240px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg-1);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; }
svg { display: block; }

.wrap { width: min(var(--wrap), 100% - 48px); margin-inline: auto; }
@media (min-width: 1800px) { :root { --wrap: 1520px; } body { font-size: 17px; } }
@media (min-width: 2200px) {
  :root { --wrap: 1840px; --header-h: 84px; }
  body { font-size: 19px; }
  .hero__title { font-size: 12rem; }
  .hero__art { width: min(100%, 720px); }
  .wordmark { font-size: 18px; }
  .nav a { font-size: 16px; }
  .art { height: 210px; }
}

:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }

.skip {
  position: fixed; left: 16px; top: -60px; z-index: 100;
  background: var(--light); color: var(--dark); padding: 10px 16px; border-radius: 10px; font-weight: 600;
  transition: top .2s;
}
.skip:focus { top: 12px; }

/* ---------- Header ---------- */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--header-h);
  transition: background .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
.header.is-stuck {
  background: rgba(11, 15, 26, .72);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.header__in { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.wordmark { font-weight: 700; letter-spacing: .22em; font-size: 15px; }
.nav { display: flex; gap: 6px; }
.nav a {
  position: relative; padding: 8px 14px; font-size: 14px; color: var(--muted); border-radius: 999px;
  transition: color .2s;
}
.nav a:hover, .nav a.is-active { color: var(--text); }
.nav a.is-active::after {
  content: ''; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 2px; border-radius: 2px; background: var(--grad);
}
.header__tools { display: flex; align-items: center; gap: 12px; }

.lang { display: inline-flex; padding: 3px; border: 1px solid var(--line-2); border-radius: 999px; background: rgba(245, 247, 255, .03); }
.lang__btn {
  border: 0; background: none; cursor: pointer; padding: 5px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 600; letter-spacing: .08em; color: var(--muted); transition: color .2s, background .2s;
}
.lang__btn:hover { color: var(--text); }
.lang__btn[aria-pressed="true"] { background: var(--grad); color: #0B0F1A; }

.burger { display: none; width: 42px; height: 42px; border: 1px solid var(--line-2); border-radius: 12px; background: none; cursor: pointer; position: relative; }
.burger span { position: absolute; left: 11px; right: 11px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .3s var(--ease), top .3s var(--ease); }
.burger span:first-child { top: 16px; }
.burger span:last-child { top: 24px; }
.burger[aria-expanded="true"] span:first-child { top: 20px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { top: 20px; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100svh; display: flex; align-items: center; isolation: isolate; overflow: hidden;
  padding: calc(var(--header-h) + 32px) 0 88px;
}
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -3; }
.hero__glow {
  position: absolute; z-index: -1; inset: 0; pointer-events: none;
  background:
    radial-gradient(55% 55% at 76% 40%, rgba(59, 130, 255, .2), transparent 70%),
    radial-gradient(45% 45% at 92% 8%, rgba(155, 92, 255, .22), transparent 70%),
    radial-gradient(45% 45% at 8% 92%, rgba(0, 212, 255, .14), transparent 70%),
    linear-gradient(180deg, transparent 72%, var(--bg-1));
}
/* Перспективная сетка-«пол» */
.hero__floor {
  position: absolute; left: -20%; right: -20%; bottom: -8%; height: 46%; z-index: -2; pointer-events: none;
  background-image:
    linear-gradient(rgba(59, 130, 255, .35) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 130, 255, .35) 1px, transparent 1px);
  background-size: 64px 64px;
  transform: perspective(520px) rotateX(64deg); transform-origin: 50% 100%;
  -webkit-mask-image: linear-gradient(to top, #000 0%, transparent 85%);
  mask-image: linear-gradient(to top, #000 0%, transparent 85%);
  animation: floor 7s linear infinite;
}
@keyframes floor { to { background-position: 0 64px, 0 0; } }

.hero__in { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); align-items: center; gap: clamp(16px, 4vw, 64px); }
.hero__text { position: relative; z-index: 1; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px; font-size: 13px; letter-spacing: .18em; text-transform: uppercase; color: var(--cyan);
}
.eyebrow::before { content: ''; width: 36px; height: 1px; background: var(--cyan); }
.hero__title {
  margin-top: 18px; font-weight: 800; line-height: .92; letter-spacing: -.035em;
  font-size: clamp(3rem, 8.2vw, 8.6rem);
  background: linear-gradient(100deg, #00D4FF 0%, #3B82FF 45%, #9B5CFF 80%, #00D4FF 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: sheen 10s linear infinite;
  filter: drop-shadow(0 0 34px rgba(59, 130, 255, .3));
}
@keyframes sheen { to { background-position: -200% 0; } }
.hero__tag {
  margin-top: 24px; display: flex; flex-wrap: wrap; gap: 14px; align-items: center;
  font-size: clamp(1rem, 1.9vw, 1.4rem); font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
}
.hero__tag i { font-style: normal; color: var(--purple); }
.hero__lead { margin-top: 22px; max-width: 52ch; color: var(--muted); font-size: clamp(1rem, 1.4vw, 1.15rem); }
.hero__cta { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 14px; }

/* Композиция справа */
.hero__art { position: relative; justify-self: center; width: min(100%, 560px); aspect-ratio: 1; }
.hero__art svg { width: 100%; height: 100%; overflow: visible; }
.art-cube { animation: bob 6s ease-in-out infinite; }
.art-orbit { animation: orbit 14s linear infinite; }
.art-lines path { stroke-dasharray: 14 120; animation: flow 3.4s linear infinite; filter: drop-shadow(0 0 4px #00D4FF); }
.art-lines path:nth-child(2) { animation-delay: -1.1s; }
.art-lines path:nth-child(3) { animation-delay: -2.2s; }
.art-float { animation: bob 7s ease-in-out infinite; }
.art-float--2 { animation-duration: 9s; animation-delay: -2s; }
.art-float--3 { animation-duration: 5.5s; animation-delay: -1s; }
@keyframes bob { 50% { transform: translateY(-12px); } }
@keyframes orbit { to { stroke-dashoffset: -96; } }
@keyframes flow { to { stroke-dashoffset: -134; } }

.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 14px 26px; border-radius: 14px; font-weight: 600; font-size: 15px;
  border: 1px solid transparent; transition: transform .25s var(--ease), box-shadow .25s, border-color .25s, background .25s;
}
.btn--primary { background: var(--grad); color: #0B0F1A; box-shadow: 0 8px 30px -8px rgba(59, 130, 255, .6); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 12px 38px -8px rgba(155, 92, 255, .7); }
.btn--ghost { border-color: var(--line-2); background: rgba(245, 247, 255, .03); }
.btn--ghost:hover { border-color: var(--cyan); background: rgba(0, 212, 255, .07); transform: translateY(-2px); }

.scroll-hint { position: absolute; left: 50%; bottom: 24px; width: 26px; height: 42px; margin-left: -13px; border: 1.5px solid var(--line-2); border-radius: 14px; }
.scroll-hint span { position: absolute; left: 50%; top: 8px; width: 3px; height: 8px; margin-left: -1.5px; border-radius: 3px; background: var(--cyan); animation: wheel 2s ease-in-out infinite; }
@keyframes wheel { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(14px); opacity: 0; } 100% { opacity: 0; } }

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 9vw, 120px) 0; position: relative; }
.section--tight { padding: clamp(52px, 7vw, 88px) 0; }
.section + .section::before {
  content: ''; position: absolute; top: 0; left: 50%; width: min(var(--wrap), 100% - 48px); height: 1px; transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(59, 130, 255, .5), rgba(155, 92, 255, .5), transparent);
}
.section__head { margin-bottom: clamp(28px, 4.5vw, 52px); }
.section__idx { font-size: 13px; letter-spacing: .2em; color: #B796FF; font-weight: 600; }
.section__head h2 { margin-top: 8px; font-size: clamp(2rem, 4.6vw, 3.2rem); line-height: 1.1; font-weight: 700; letter-spacing: -.01em; }
.section__sub { margin-top: 12px; max-width: 60ch; color: var(--muted); }

/* ---------- Projects ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  --c: var(--blue); --c-rgb: 59, 130, 255;
  --mx: 50%; --my: 0%;
  position: relative; display: flex; flex-direction: column; gap: 12px; padding: 14px 14px 26px; border-radius: 22px;
  background: linear-gradient(160deg, rgba(245, 247, 255, .05), rgba(245, 247, 255, .015));
  border: 1px solid var(--line); overflow: hidden;
  transition: transform .35s var(--ease), border-color .35s, box-shadow .35s;
}
.card > :not(.art) { margin-inline: 14px; }
.card--led { --c: #00D4FF; --c-rgb: 0, 212, 255; }
.card--ndi { --c: #3B82FF; --c-rgb: 59, 130, 255; }
.card--stage { --c: #9B5CFF; --c-rgb: 155, 92, 255; }
.card::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .35s;
  background: radial-gradient(360px circle at var(--mx) var(--my), rgba(var(--c-rgb), .18), transparent 60%);
}
.card:hover { transform: translateY(-6px); border-color: rgba(var(--c-rgb), .55); box-shadow: 0 18px 50px -20px rgba(var(--c-rgb), .55); }
.card:hover::before { opacity: 1; }
.card__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; }
.card__n { font-size: 13px; letter-spacing: .2em; color: var(--muted); }
.card h3 { font-size: 1.4rem; line-height: 1.25; font-weight: 700; }
.card p { color: var(--muted); font-size: 15px; }
.card__tag { margin-top: auto; padding-top: 6px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--c); font-weight: 600; }
.card--ndi .card__tag { color: #6FA3FF; }
.card--stage .card__tag { color: #B796FF; }
.status {
  display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 600; letter-spacing: .04em; color: var(--light);
  border: 1px solid rgba(var(--c-rgb), .5); background: rgba(var(--c-rgb), .12);
}
.status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px var(--c); animation: pulse 2.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }

/* Иллюстрации карточек (абстрактные, не скриншоты) */
.art {
  position: relative; height: 170px; border-radius: 14px; overflow: hidden;
  background: radial-gradient(80% 90% at 50% 100%, rgba(var(--c-rgb), .2), rgba(11, 15, 26, .6) 70%), #0D1322;
  border: 1px solid rgba(var(--c-rgb), .22);
}
.art svg { width: 100%; height: 100%; }

/* LED: пиксельные панели */
.art--led { perspective: 700px; display: grid; place-items: center; }
.led {
  --dot: radial-gradient(circle at 50% 50%, rgba(0, 212, 255, .95) 0 1.7px, transparent 2.3px);
  position: absolute; border-radius: 6px; border: 1px solid rgba(0, 212, 255, .5);
  background: rgba(0, 212, 255, .05); transform-style: preserve-3d; overflow: hidden;
}
.led::before, .led::after { content: ''; position: absolute; inset: 0; background: var(--dot); background-size: 10px 10px; }
.led::before { opacity: .28; }
.led::after {
  opacity: 1;
  -webkit-mask-image: linear-gradient(100deg, transparent 35%, #000 50%, transparent 65%);
  mask-image: linear-gradient(100deg, transparent 35%, #000 50%, transparent 65%);
  -webkit-mask-size: 300% 100%; mask-size: 300% 100%; -webkit-mask-position: 100% 0; mask-position: 100% 0;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  animation: sweep 3.2s linear infinite paused;
}
.led--a { width: 150px; height: 84px; left: 50%; top: 50%; margin: -50px 0 0 -105px; transform: rotateY(-22deg) rotateX(8deg); }
.led--b { width: 86px; height: 86px; left: 50%; top: 50%; margin: -38px 0 0 30px; transform: rotateY(-22deg) rotateX(8deg) translateZ(-30px); opacity: .85; }
.led--b::after { animation-delay: -1.1s; }
.led--c { width: 60px; height: 40px; left: 50%; top: 50%; margin: 16px 0 0 -128px; transform: rotateY(-22deg) rotateX(8deg) translateZ(24px); opacity: .7; }
.led--c::after { animation-delay: -2s; }
.card:hover .led::after, .card:focus-within .led::after { animation-play-state: running; }
@keyframes sweep { from { -webkit-mask-position: 100% 0; mask-position: 100% 0; } to { -webkit-mask-position: 0 0; mask-position: 0 0; } }

/* NDI: сеть и сигналы */
.ndi-pulse path { stroke-dasharray: 10 90; animation: flow2 2.8s linear infinite paused; filter: drop-shadow(0 0 3px #3B82FF); }
.ndi-wave { stroke-dasharray: 300; stroke-dashoffset: 0; }
.ndi-blink { animation: pulse 1.6s ease-in-out infinite; }
.card:hover .ndi-pulse path, .card:focus-within .ndi-pulse path { animation-play-state: running; }
.card--ndi:hover .ndi-wave { animation: wave 2.4s linear infinite; }
@keyframes flow2 { to { stroke-dashoffset: -100; } }
@keyframes wave { to { stroke-dashoffset: -300; } }
.ndi-pulse path { stroke-dashoffset: 0; }

/* Сцена: лучи и ферма */
.beam { transform-origin: 50% 0; transform-box: fill-box; opacity: .55; transition: opacity .4s; }
.card:hover .beam, .card:focus-within .beam { opacity: 1; }
.card:hover .beam--1, .card:focus-within .beam--1 { animation: sway 3.4s ease-in-out infinite; }
.card:hover .beam--2, .card:focus-within .beam--2 { animation: sway 4.1s ease-in-out infinite reverse; }
.card:hover .beam--3, .card:focus-within .beam--3 { animation: sway 3.7s ease-in-out infinite; animation-delay: -1s; }
@keyframes sway { 0%, 100% { transform: rotate(-7deg); } 50% { transform: rotate(7deg); } }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.about__lead { font-size: clamp(1.2rem, 2.1vw, 1.65rem); line-height: 1.45; font-weight: 500; }
.about__text { margin-top: 16px; color: var(--muted); max-width: 56ch; }
.dirs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.dir {
  display: grid; grid-template-columns: auto 1fr; column-gap: 14px; row-gap: 2px; align-items: center; padding: 18px;
  border-radius: 18px; border: 1px solid var(--line); background: rgba(245, 247, 255, .03);
  transition: transform .3s var(--ease), border-color .3s, background .3s;
}
.dir:hover { transform: translateY(-3px); border-color: rgba(0, 212, 255, .45); background: rgba(0, 212, 255, .05); }
.dir__ico {
  grid-row: 1 / span 2; width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; color: var(--cyan);
  background: linear-gradient(135deg, rgba(0, 212, 255, .16), rgba(155, 92, 255, .16)); border: 1px solid var(--line-2);
}
.dir__ico svg, .link__ico svg { width: 24px; height: 24px; }
.dir__ico svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.dir b { font-size: 1rem; font-weight: 700; }
.dir > span:last-child { grid-column: 2; color: var(--muted); font-size: 14px; line-height: 1.45; }

/* ---------- Contact ---------- */
.links { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.link {
  position: relative; display: grid; grid-template-columns: auto 1fr auto; column-gap: 18px; row-gap: 2px; align-items: center; padding: 24px 26px;
  border-radius: 22px; border: 1px solid var(--line); background: linear-gradient(160deg, rgba(245, 247, 255, .05), rgba(245, 247, 255, .015));
  transition: border-color .3s, transform .3s var(--ease), box-shadow .3s;
}
.link--gh { --c-rgb: 155, 92, 255; }
.link--tg { --c-rgb: 0, 212, 255; }
.link:hover { border-color: rgba(var(--c-rgb), .6); transform: translateY(-4px); box-shadow: 0 16px 44px -22px rgba(var(--c-rgb), .6); }
.link__ico { grid-row: 1 / span 2; width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; color: var(--light); background: rgba(var(--c-rgb), .14); border: 1px solid rgba(var(--c-rgb), .4); transition: background .3s; }
.link__ico svg { width: 28px; height: 28px; }
.link:hover .link__ico { background: rgba(var(--c-rgb), .28); }
.link__k { grid-column: 2; font-size: 1.35rem; font-weight: 700; line-height: 1.2; }
.link__v { grid-column: 2; color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.link__a { grid-column: 3; grid-row: 1 / span 2; font-size: 1.5rem; color: var(--cyan); transition: transform .3s var(--ease); }
.link:hover .link__a { transform: translate(4px, -4px); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); background: var(--bg-2); padding: 48px 0 24px; }
.footer__in { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.footer__brand p { margin-top: 10px; color: var(--muted); font-size: 14px; }
.footer__nav, .footer__social { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.footer__nav a, .footer__social a { color: var(--muted); font-size: 14px; transition: color .2s; }
.footer__nav a:hover, .footer__social a:hover { color: var(--cyan); }
.footer__copy { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }

/* ---------- Reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .card.reveal.is-in, .js .dir.reveal.is-in, .js .link.reveal.is-in { transition: opacity .8s var(--ease) var(--d, 0s), transform .35s var(--ease), border-color .3s, box-shadow .35s, background .3s; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .card--stage { grid-column: 1 / -1; }
  .card--stage .art { height: 190px; }
}
@media (max-width: 960px) {
  .hero { min-height: 0; padding-top: calc(var(--header-h) + 36px); padding-bottom: 80px; }
  .hero__in { grid-template-columns: 1fr; gap: 8px; }
  .hero__title { font-size: clamp(3rem, 15.5vw, 7rem); }
  .hero__art { width: min(78%, 420px); margin-top: 8px; }
  .scroll-hint { display: none; }
  .about { grid-template-columns: 1fr; }
  .footer__in { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .burger { display: block; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; gap: 0; padding: 12px 24px 24px;
    background: rgba(11, 15, 26, .97); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line); transform: translateY(-12px); opacity: 0; visibility: hidden;
    transition: opacity .25s, transform .25s var(--ease), visibility .25s;
  }
  .nav.is-open { opacity: 1; transform: none; visibility: visible; }
  .nav a { padding: 14px 4px; font-size: 17px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav a.is-active::after { left: 4px; right: auto; width: 28px; bottom: 8px; }
  .cards { grid-template-columns: 1fr; }
  .card--stage { grid-column: auto; }
  .card--stage .art { height: 170px; }
  .links { grid-template-columns: 1fr; }
  .dirs { grid-template-columns: 1fr; }
  .hero__floor { height: 34%; }
}
@media (max-width: 420px) {
  .wrap { width: calc(100% - 32px); }
  .hero__cta .btn { flex: 1 1 100%; justify-content: center; }
  .link { padding: 18px; column-gap: 14px; }
  .link__ico { width: 48px; height: 48px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .js .reveal { opacity: 1; transform: none; }
  .led::after { -webkit-mask-position: 50% 0; mask-position: 50% 0; }
  .ndi-pulse path { stroke-dasharray: none; }
  .art-lines path { stroke-dasharray: none; }
  .card:hover { transform: none; }
}
