@property --pulse-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

html, body { height: 100%; margin: 0; scroll-behavior: auto; }

body{
  overflow-x: hidden;
  background: #000;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* пока не готовы — скролл запрещён */
body.locked{
  overflow: hidden;
}

/* после волны — можно скроллить */
body.ready{
  overflow-y: auto;
}

#gl{
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
}

/* Hero как контейнер для canvas */
.hero{
  position: relative;
  z-index: 0;
  overflow: hidden;
}

/* UI слой поверх canvas (если используешь) */
.ui{
  position: fixed;
  inset: 0;
  pointer-events: none;
}

/* Центрирование кнопки */
.center{
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  z-index: 2;
}
.center .btn{
  pointer-events: auto;
}

/* ---------- SHARED SPOTLIGHT (same as Open button) ---------- */
.spotlight{
  position: relative;
}

.spotlight::before{
  content:"";
  position:absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;

  background: linear-gradient(
    135deg,
    rgba(255,255,255,0.65),
    rgba(255,255,255,0.14),
    rgba(255,255,255,0.40)
  );

  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;

  opacity: 0.95;
  pointer-events: none;
}

.spotlight::after{
  content:"";
  position:absolute;
  inset: -2px;
  border-radius: inherit;
  padding: 2px;

  background: radial-gradient(
    120px circle at var(--mx, 50%) var(--my, 50%),
    rgba(255,255,255,0.95),
    rgba(255,255,255,0.25) 45%,
    rgba(255,255,255,0.0) 72%
  );

  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;

  opacity: 0;
  transition: opacity 180ms ease;
  pointer-events: none;

  filter: blur(0.2px);
}

.spotlight:hover::after{ opacity: 1; }

/* ---------- BUTTON (Liquid Glass) ---------- */
.btn{
  pointer-events: auto;
  border: 0;
  cursor: pointer;
  padding: 16px 22px;
  border-radius: 999px;

  font-weight: 700;
  font-size: 16px;
  color: rgba(255,255,255,0.92);

  background: rgba(255,255,255,0.10);
  backdrop-filter: blur(16px) saturate(1.35);
  -webkit-backdrop-filter: blur(16px) saturate(1.35);

  box-shadow:
    0 14px 40px rgba(0,0,0,0.45),
    inset 0 1px 0 rgba(255,255,255,0.10);

  user-select: none;

  transition:
    transform 520ms cubic-bezier(.2,.9,.2,1),
    opacity 520ms ease,
    filter 520ms ease,
    box-shadow 220ms ease;
}

.btn:hover{
  box-shadow:
    0 18px 55px rgba(0,0,0,0.55),
    inset 0 1px 0 rgba(255,255,255,0.14);
}

.btn:active{ transform: scale(0.98); }

.btn.hide{
  opacity: 0;
  filter: blur(14px);
  transform: scale(1.35);
  transform-origin: center;
  pointer-events: none;
}

/* ---------- TITLE (chars reveal) ---------- */
.title-wrap{
  position: fixed;
  top: 45vh;
  left: 50%;
  transform: translate(-50%, 0) scale(1);
  text-align: center;
  width: min(1400px, calc(100vw - 24px));
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity 400ms ease, transform 600ms cubic-bezier(.2,.9,.2,1);
  will-change: transform, opacity, filter;
}

.title-wrap.show{
  opacity: 1;
}

.title-wrap.scroll-controlled{
  transition: none;
}

.title{
  margin: 0;
  color: rgba(255,255,255,0.92);
  font-size: clamp(100px, 5vw, 200px);
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 420ms ease;
}

.title.show{ opacity: 1; }

.subtitle{
  margin: 0;
  color: rgba(255,255,255,0.96);
  font-size: clamp(40px, 4.2vw, 78px);
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  text-align: center;
  width: 100%;
}


.title-wrap.shifted{
  transform: translate(-50%, -46px) scale(0.62);
}

.subtitle-wrap{
  position: fixed;
  top: 45vh;
  left: 50%;
  transform: translate(-50%, 76px) scale(0.92);
  width: calc(100vw - 24px);
  text-align: center;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity 400ms ease, transform 600ms cubic-bezier(.2,.9,.2,1);
  will-change: transform, opacity, filter;
}

.subtitle-wrap.shifted{
  opacity: 1;
  transform: translate(-50%, 52px) scale(1);
}

.subtitle-wrap.scroll-controlled{
  transition: none;
}


.title .char{
  display: inline-block;
  opacity: 0;
  transform: translateY(22px);
  filter: blur(10px);
  will-change: transform, opacity, filter;
}

.title .char.yo{
  position: relative;
}

.title .char.yo::before,
.title .char.yo::after{
  content: "";
  position: absolute;
  top: 0.16em;
  width: 0.20em;
  height: 0.20em;
  border-radius: 50%;
  background: #2ecb63;
  box-shadow: 0 0 0.12em rgba(46, 203, 99, 0.55);
}

.title .char.yo::before{ left: 0.05em; }
.title .char.yo::after{ left: 0.31em; }

.title.show .char{
  animation: charIn 1200ms cubic-bezier(.2,.9,.2,1) both;
  animation-delay: calc(var(--i) * 70ms);
}

@keyframes charIn{
  from{
    opacity: 0;
    transform: translateY(22px);
    filter: blur(30px);
  }
  to{
    opacity: 1;
    transform: translateY(0px);
    filter: blur(0px);
  }
}

/* Subtitle chars animation */
.subtitle .char{
  display: inline-block;
  opacity: 0;
  transform: translateY(16px);
  filter: blur(8px);
  will-change: transform, opacity, filter;
}

.subtitle-wrap.shifted .subtitle .char{
  animation: charInFast 600ms cubic-bezier(.2,.9,.2,1) both;
  animation-delay: calc(var(--i) * 25ms);
}

@keyframes charInFast{
  from{
    opacity: 0;
    transform: translateY(16px);
    filter: blur(12px);
  }
  to{
    opacity: 1;
    transform: translateY(0px);
    filter: blur(0px);
  }
}

/* ---------- NAV (3 pills: left + center group + right) ---------- */
.topnav{
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: min(980px, calc(100vw - 36px));
  height: 56px;
  z-index: 1000;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;

  background: transparent;
  border: 0;
  box-shadow: none;

  /* скрыто до ready */
  opacity: 0;
  transform: translateX(-50%) translateY(-10px);
  filter: blur(10px);
  pointer-events: none;

  transition: opacity 420ms ease, transform 420ms ease, filter 420ms ease;

  /* сдвиги к центру (ставит JS) */
  --shiftL: 0px;
  --shiftR: 0px;
}

/* появляется только после завершения волны */
body.ready .topnav{
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  filter: blur(0);
  pointer-events: auto;
}

/* общая стеклянная плашка */
.nav-pill,
.nav-center-pill{
  display: inline-flex;
  align-items: center;
  justify-content: center;

  height: 56px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;

  text-decoration: none;
  font-family: inherit;
  font-weight: 650;
  font-size: 14px;
  letter-spacing: 0.2px;
  color: rgba(255,255,255,0.90);

  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(26px) saturate(1.35);
  -webkit-backdrop-filter: blur(26px) saturate(1.35);

  box-shadow: 0 14px 40px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.08);
  transition: transform 300ms ease, box-shadow 220ms ease, background 180ms ease, opacity 260ms ease, filter 260ms ease;
}

.nav-pill:hover,
.nav-center-pill:hover{
  background: rgba(255,255,255,0.10);
  box-shadow: 0 18px 55px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.12);
}

.nav-pill:active,
.nav-center-pill:active{
  transform: scale(0.98);
}

/* центральная плашка с ссылками */
.nav-center-pill{
  gap: 10px;
  padding: 0 18px;
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  transition: opacity 520ms ease, filter 520ms ease, transform 520ms ease;
}

/* ссылки внутри центральной плашки */
.nav-center-pill .nav-link{
  color: rgba(255,255,255,0.88);
  text-decoration: none;
  padding: 10px 10px;
  border-radius: 999px;
  transition: background 160ms ease, color 160ms ease;
}

.nav-center-pill .nav-link:hover{
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.96);
}

/* collapsed: центр исчезает */
.topnav.collapsed .nav-center-pill{
  opacity: 0;
  filter: blur(8px);
  transform: translate(-50%, -10px) scale(1.04);
  pointer-events: none;
}

/* сдвиг левой/правой к центру (значения задаёт JS) */
.nav-left{
  transform: translateX(var(--shiftL));
  transition: all 700ms cubic-bezier(.2,.9,.2,1);
}

.nav-right{
  transform: translateX(var(--shiftR));
  transition: all 700ms cubic-bezier(.2,.9,.2,1);
}

.nav-left::before,
.nav-left::after,
.nav-right::before,
.nav-right::after{
  transition: all 700ms cubic-bezier(.2,.9,.2,1);
}

/* Объединённая плашка при collapsed */
.topnav.collapsed .nav-left{
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  padding-right: 16px;
}

.topnav.collapsed .nav-left::before{
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  inset: 0 -1px 0 0;
}

.topnav.collapsed .nav-left::after{
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.topnav.collapsed .nav-right{
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  padding-left: 16px;
}

.topnav.collapsed .nav-right::before{
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  inset: 0 0 0 -1px;
}

.topnav.collapsed .nav-right::after{
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

/* Развёрнутое меню при клике */
.topnav.nav-expanded .nav-center-pill{
  opacity: 1;
  filter: blur(0);
  transform: translateX(-50%);
  pointer-events: auto;
}

.topnav.nav-expanded .nav-left,
.topnav.nav-expanded .nav-right{
  border-radius: 999px;
  padding: 0 16px;
}

.topnav.nav-expanded .nav-left::before,
.topnav.nav-expanded .nav-right::before{
  border-radius: inherit;
  inset: 0;
}

/* ---------- PAGE SECTIONS ---------- */
.page{ position: relative; z-index: 1; }
.screen{ min-height: 100vh; position: relative; }

.about{
  position: relative;
  z-index: 1;
  background: rgb(5,8,12);
  color: rgba(255,255,255,0.92);
  padding: 140px 24px 200px;
  overflow: hidden;
  margin-top: -1px;
}

/* Фоновое изображение второго экрана */
.about::before{
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: url('./back2.jpg') center top / 100% auto no-repeat;
  background-color: rgb(5,8,12);
  opacity: var(--bg-opacity, 0);
  transition: opacity 0.1s ease-out;
  z-index: -2;
  pointer-events: none;
  -webkit-mask: linear-gradient(
    to bottom,
    transparent 0%,
    black 25%,
    black 60%,
    transparent 85%
  );
  mask: linear-gradient(
    to bottom,
    transparent 0%,
    black 25%,
    black 60%,
    transparent 85%
  );
}

/* Затемняющий оверлей поверх фона */
.about::after{
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(5,8,12,0.75);
  opacity: var(--bg-opacity, 0);
  transition: opacity 0.1s ease-out;
  z-index: -1;
  pointer-events: none;
  -webkit-mask: linear-gradient(
    to bottom,
    transparent 0%,
    black 25%,
    black 60%,
    transparent 85%
  );
  mask: linear-gradient(
    to bottom,
    transparent 0%,
    black 25%,
    black 60%,
    transparent 85%
  );
}
.about-inner{ max-width: 1050px; margin: 0 auto; }
.about h2{
  margin: 0 0 42px;
  font-size: clamp(45px, 4.8vw, 72px);
  font-weight: 720;
  letter-spacing: -0.015em;
}

.faq{
  margin-top: 156px;
}

.faq h3{
  margin: 0 0 18px;
  font-size: 100px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.faq-list{
  display: grid;
  gap: 8px;
}

.faq-item{
  position: relative;
  padding: 12px 0;
}

.faq-q{
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 10px 0;
  color: rgba(255,255,255,0.95);
  font-family: inherit;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  cursor: pointer;
  transition: color 200ms ease;
}

.faq-q:hover{
  color: rgba(255,255,255,1);
}

.faq-a{
  max-height: 0;
  overflow: hidden;
  transition: max-height 420ms ease, opacity 320ms ease, transform 320ms ease;
  opacity: 0;
  transform: translateY(-6px);
}

.faq-a p{
  margin: 0 0 12px;
  color: rgba(255,255,255,0.6);
  font-size: 16px;
  line-height: 1.5;
}

.faq-item.open .faq-a{
  max-height: 150px;
  opacity: 1;
  transform: translateY(0);
}

.faq-divider{
  position: relative;
  height: 1px;
  border-radius: 999px;
  background: rgba(255,255,255,0.10);
  overflow: visible;
  cursor: default;
}

/* Расширенная область hover для удобства */
.faq-divider::before{
  content:"";
  position: absolute;
  left: 0;
  right: 0;
  top: -10px;
  bottom: -10px;
}

.faq-divider::after{
  content:"";
  position:absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  border-radius: 999px;
  background:
    radial-gradient(
      60px 1px at var(--mx, 50%) 50%,
      rgba(255,255,255,0.85),
      rgba(255,255,255,0.25) 50%,
      rgba(255,255,255,0.0) 100%
    );
  opacity: var(--intensity, 0);
  transition: opacity 100ms ease;
  pointer-events: none;
}

.project-grid{
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-auto-rows: 70px;
  gap: 12px;
  position: relative;
}

/* Нейронные пути между карточками */
.neural-paths{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.neural-paths path{
  fill: none;
  stroke: rgba(255,255,255,0.06);
  stroke-width: 1;
}

/* Бегунок-импульс */
.neural-runner{
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.95) 0%, rgba(236,72,153,0.6) 40%, transparent 70%);
  box-shadow:
    0 0 6px 2px rgba(236,72,153,0.4),
    0 0 12px 4px rgba(168,85,247,0.25),
    0 0 20px 6px rgba(168,85,247,0.1);
  pointer-events: none;
  z-index: 10;
  opacity: 0;
  transform: translate(-50%, -50%);
}

.contact{
  position: relative;
  z-index: 1;
  background: rgb(5,8,12);
  color: rgba(255,255,255,0.92);
  padding: 140px 24px 0;
}

.contact-inner{
  max-width: 1050px;
  margin: 0 auto;
}

.contact-card{
  --reveal: 0;
  --y: 40px;
  --blur: 10px;
  padding: 28px;
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.14), rgba(255,255,255,0.04)),
    rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow:
    0 22px 60px rgba(0,0,0,0.45),
    inset 0 1px 0 rgba(255,255,255,0.18);
  backdrop-filter: blur(22px) saturate(1.2);
  -webkit-backdrop-filter: blur(22px) saturate(1.2);
  opacity: var(--reveal);
  transform: translateY(var(--y));
  filter: blur(var(--blur));
  transition: opacity 200ms ease, transform 200ms ease, filter 200ms ease;
}

.contact-head h3{
  margin: 0 0 10px;
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.contact-head p{
  margin: 0 0 22px;
  color: rgba(255,255,255,0.72);
  font-size: 15px;
}

.contact-head a{
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.2);
}

.contact-form{
  display: grid;
  gap: 14px;
}

.field{
  display: grid;
  gap: 8px;
}

.field span{
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.6);
}

.field input,
.field textarea{
  width: 100%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 14px;
  padding: 12px 16px;
  color: rgba(255,255,255,0.92);
  font-size: 14px;
  outline: none;
  box-sizing: border-box;
}

.field textarea{
  min-height: 88px;
  resize: vertical;
}

.contact-btn{
  justify-self: start;
  padding: 12px 18px;
}

/* ---------- FORM STATES ---------- */
.field input,
.field textarea{
  transition: border-color 200ms ease, box-shadow 200ms ease, background 200ms ease;
}

.field input:focus,
.field textarea:focus{
  border-color: rgba(255,255,255,0.35);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.08);
}

/* Validation states */
.field.error input,
.field.error textarea{
  border-color: rgba(255,100,100,0.6);
  background: rgba(255,100,100,0.08);
}

.field.error input:focus,
.field.error textarea:focus{
  box-shadow: 0 0 0 3px rgba(255,100,100,0.15);
}

.field.success input,
.field.success textarea{
  border-color: rgba(100,255,150,0.5);
  background: rgba(100,255,150,0.06);
}

.field-error{
  font-size: 12px;
  color: rgba(255,120,120,0.9);
  margin-top: 4px;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 200ms ease, transform 200ms ease;
  display: none;
}

.field.error .field-error{
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* Button states */
.contact-btn{
  position: relative;
  overflow: hidden;
  transition:
    transform 520ms cubic-bezier(.2,.9,.2,1),
    opacity 300ms ease,
    filter 300ms ease,
    box-shadow 220ms ease,
    background 200ms ease;
}

.contact-btn:disabled{
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

.contact-btn.loading{
  color: transparent;
}

.contact-btn .btn-text{
  transition: opacity 200ms ease;
}

.contact-btn.loading .btn-text{
  opacity: 0;
}

/* Spinner */
.btn-spinner{
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: rgba(255,255,255,0.9);
  border-radius: 50%;
  opacity: 0;
  animation: none;
}

.contact-btn.loading .btn-spinner{
  opacity: 1;
  animation: spin 0.8s linear infinite;
}

@keyframes spin{
  to{ transform: translate(-50%, -50%) rotate(360deg); }
}

/* Form messages */
.form-message{
  padding: 14px 18px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 300ms ease, transform 300ms ease;
  display: none;
  margin-top: 8px;
}

.form-message.show{
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.form-message.success{
  background: rgba(100,255,150,0.12);
  border: 1px solid rgba(100,255,150,0.3);
  color: rgba(150,255,180,0.95);
}

.form-message.error{
  background: rgba(255,100,100,0.12);
  border: 1px solid rgba(255,100,100,0.3);
  color: rgba(255,150,150,0.95);
}
.form-message.error a{
  color: rgba(255,180,180,1);
  text-decoration: underline;
}
.form-message.error a:hover{
  color: #fff;
}

.project-card{
  grid-column: span 2;
  grid-row: span 2;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px 14px;
  border-radius: 16px;
  will-change: transform, opacity;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.12), rgba(255,255,255,0.03)),
    rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow:
    0 12px 32px rgba(0,0,0,0.3),
    inset 0 1px 0 rgba(255,255,255,0.15);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  opacity: 0;
}

/* Подсветка активной карточки - spotlight следует за бегунком */
.project-card::before{
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    100px 100px at var(--glow-x, 50%) var(--glow-y, 50%),
    rgba(236,72,153,0.5) 0%,
    rgba(168,85,247,0.3) 25%,
    rgba(168,85,247,0.1) 45%,
    transparent 65%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  opacity: var(--glow-opacity, 0);
  pointer-events: none;
  transition: opacity 0.5s ease;
}

/* Мягкое свечение вокруг активной карточки */
.project-card::after{
  content: "";
  position: absolute;
  inset: -12px;
  border-radius: 24px;
  background: radial-gradient(
    140px 140px at var(--glow-x, 50%) var(--glow-y, 50%),
    rgba(236,72,153,0.25) 0%,
    rgba(168,85,247,0.15) 30%,
    rgba(168,85,247,0.05) 50%,
    transparent 70%
  );
  filter: blur(12px);
  opacity: var(--glow-opacity, 0);
  pointer-events: none;
  z-index: -1;
  transition: opacity 0.5s ease;
}

.project-card h3{
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: rgba(255,255,255,0.95);
}

.project-card p{
  margin: 0;
  color: rgba(255,255,255,0.55);
  font-size: 13px;
  font-weight: 450;
  line-height: 1.4;
  letter-spacing: 0.01em;
}

.project-card .icon{
  margin-bottom: 4px;
}

.project-card.tall{ grid-row: span 3; }
.project-card.wide{ grid-column: span 3; }

.project-card.tall h3{
  font-size: 26px;
}

.project-card.wide h3{
  font-size: 24px;
}

/* ---------- 3D ICONS ---------- */
.icon{
  width: 48px;
  height: 48px;
  position: relative;
  transform-style: preserve-3d;
  perspective: 200px;
}

/* Серверы — стопка слоёв */
.icon-servers{
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}

.icon-servers::before,
.icon-servers::after,
.icon-servers span{
  content: "";
  display: block;
  width: 100%;
  height: 10px;
  border-radius: 3px;
  background: linear-gradient(135deg, rgba(120,200,255,0.9), rgba(80,160,220,0.7));
  box-shadow:
    0 2px 8px rgba(0,0,0,0.3),
    inset 0 1px 0 rgba(255,255,255,0.4),
    inset 0 -1px 0 rgba(0,0,0,0.2);
  transform: rotateX(15deg);
}

.icon-servers::after{
  background: linear-gradient(135deg, rgba(100,180,240,0.9), rgba(60,140,200,0.7));
}

.icon-servers span{
  background: linear-gradient(135deg, rgba(80,160,230,0.9), rgba(50,120,190,0.7));
}

/* Автоматизации — шестерёнка */
.icon-automation{
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-automation::before{
  content: "";
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background:
    conic-gradient(from 0deg,
      rgba(255,180,100,0.9) 0deg,
      rgba(255,140,60,0.7) 45deg,
      rgba(255,180,100,0.9) 90deg,
      rgba(255,140,60,0.7) 135deg,
      rgba(255,180,100,0.9) 180deg,
      rgba(255,140,60,0.7) 225deg,
      rgba(255,180,100,0.9) 270deg,
      rgba(255,140,60,0.7) 315deg,
      rgba(255,180,100,0.9) 360deg
    );
  box-shadow:
    0 4px 12px rgba(0,0,0,0.35),
    inset 0 2px 4px rgba(255,255,255,0.3);
  -webkit-mask:
    radial-gradient(circle at center, transparent 8px, black 9px),
    conic-gradient(from 22.5deg, transparent 0deg, black 22.5deg, black 45deg, transparent 45deg);
  -webkit-mask-composite: source-in;
  mask:
    radial-gradient(circle at center, transparent 8px, black 9px),
    conic-gradient(from 22.5deg, transparent 0deg, black 22.5deg, black 45deg, transparent 45deg);
  mask-composite: intersect;
  animation: gearSpin 8s linear infinite;
}

@keyframes gearSpin{
  to{ transform: rotate(360deg); }
}

/* Приложения — смартфон */
.icon-apps{
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-apps::before{
  content: "";
  width: 28px;
  height: 42px;
  border-radius: 6px;
  background: linear-gradient(160deg, rgba(160,140,255,0.95), rgba(120,100,220,0.8));
  box-shadow:
    0 6px 16px rgba(0,0,0,0.4),
    inset 0 1px 0 rgba(255,255,255,0.35),
    inset 0 -2px 0 rgba(0,0,0,0.15),
    inset 2px 0 0 rgba(255,255,255,0.1),
    inset -2px 0 0 rgba(0,0,0,0.1);
  transform: rotateY(-8deg) rotateX(5deg);
}

.icon-apps::after{
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%) rotateY(-8deg);
  width: 20px;
  height: 28px;
  border-radius: 2px;
  background: linear-gradient(180deg, rgba(40,35,60,0.9), rgba(60,55,90,0.8));
  box-shadow: inset 0 0 4px rgba(255,255,255,0.1);
}

/* Корпоративные сайты — окно браузера */
.icon-sites{
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-sites::before{
  content: "";
  width: 44px;
  height: 34px;
  border-radius: 5px;
  background: linear-gradient(160deg, rgba(100,220,180,0.95), rgba(60,180,140,0.8));
  box-shadow:
    0 6px 16px rgba(0,0,0,0.35),
    inset 0 1px 0 rgba(255,255,255,0.4),
    inset 0 -1px 0 rgba(0,0,0,0.15);
  transform: rotateX(10deg) rotateY(5deg);
}

.icon-sites::after{
  content: "";
  position: absolute;
  top: 7px;
  left: 50%;
  transform: translateX(-50%) rotateX(10deg) rotateY(5deg);
  width: 38px;
  height: 6px;
  border-radius: 2px 2px 0 0;
  background: rgba(255,255,255,0.25);
  box-shadow:
    0 10px 0 rgba(40,60,50,0.6),
    inset 0 0 0 1px rgba(255,255,255,0.1);
}

/* Интеграции — связанные узлы */
.icon-integrations{
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-integrations::before{
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255,140,180,0.95), rgba(220,100,150,0.8));
  box-shadow:
    0 4px 10px rgba(0,0,0,0.3),
    inset 0 1px 0 rgba(255,255,255,0.4),
    20px 8px 0 0 rgba(180,140,255,0.9),
    20px 8px 10px rgba(0,0,0,0.25),
    10px -12px 0 0 rgba(140,220,255,0.9),
    10px -12px 10px rgba(0,0,0,0.25);
}

.icon-integrations::after{
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 30px;
  height: 2px;
  background: linear-gradient(90deg,
    rgba(255,140,180,0.6),
    rgba(180,140,255,0.6)
  );
  transform-origin: left center;
  transform: translate(-2px, 4px) rotate(20deg);
  border-radius: 1px;
  box-shadow:
    -4px -18px 0 rgba(140,220,255,0.5);
}

.icon.orb{
  width: 44px;
  height: 44px;
  border-radius: 50%;
  position: relative;
  box-shadow:
    0 12px 26px rgba(0,0,0,0.35),
    inset 0 1px 0 rgba(255,255,255,0.35);
  background:
    radial-gradient(40% 40% at 30% 30%, rgba(255,255,255,0.95), rgba(255,255,255,0.1) 55%, rgba(0,0,0,0.25) 100%),
    linear-gradient(160deg, rgba(120,200,255,0.65), rgba(120,255,210,0.25));
}

.orb::after{
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: radial-gradient(circle at 70% 70%, rgba(0,0,0,0.2), rgba(255,255,255,0.05));
  opacity: 0.9;
}

.orb-a{ background: radial-gradient(40% 40% at 30% 30%, rgba(255,255,255,0.9), rgba(255,255,255,0.08) 55%, rgba(0,0,0,0.3) 100%), linear-gradient(160deg, rgba(120,255,190,0.7), rgba(120,180,255,0.35)); }
.orb-b{ background: radial-gradient(40% 40% at 30% 30%, rgba(255,255,255,0.9), rgba(255,255,255,0.08) 55%, rgba(0,0,0,0.3) 100%), linear-gradient(160deg, rgba(255,200,120,0.7), rgba(255,120,200,0.35)); }
.orb-c{ background: radial-gradient(40% 40% at 30% 30%, rgba(255,255,255,0.9), rgba(255,255,255,0.08) 55%, rgba(0,0,0,0.3) 100%), linear-gradient(160deg, rgba(120,220,255,0.7), rgba(120,255,210,0.35)); }
.orb-d{ background: radial-gradient(40% 40% at 30% 30%, rgba(255,255,255,0.9), rgba(255,255,255,0.08) 55%, rgba(0,0,0,0.3) 100%), linear-gradient(160deg, rgba(180,160,255,0.7), rgba(120,200,255,0.35)); }
.orb-e{ background: radial-gradient(40% 40% at 30% 30%, rgba(255,255,255,0.9), rgba(255,255,255,0.08) 55%, rgba(0,0,0,0.3) 100%), linear-gradient(160deg, rgba(140,255,180,0.7), rgba(140,255,120,0.35)); }

/* ---------- FOOTER ---------- */
.footer{
  position: relative;
  z-index: 1;
  background: rgb(5,8,12);
  padding: 0 24px 80px;
  min-height: 50vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 32px;
}

.footer-contacts{
  display: flex;
  gap: 48px;
  z-index: 2;
}

.footer-link{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.footer-link:hover{
  transform: translateY(-4px);
}

.footer-link-label{
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.4);
}

.footer-link-value{
  font-size: 18px;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  transition: color 0.3s ease;
}

.footer-link:hover .footer-link-value{
  color: rgba(255,255,255,1);
}

.footer-legal{
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-legal-link{
  font-size: 13px;
  color: rgba(255,255,255,0.4);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-legal-link:hover{
  color: rgba(255,255,255,0.7);
}

.footer-legal-sep{
  color: rgba(255,255,255,0.2);
  font-size: 13px;
}

.footer-title{
  display: flex;
  justify-content: center;
  align-items: center;
  line-height: 0.85;
}

.footer-char{
  display: inline-block;
  font-size: clamp(80px, 15vw, 220px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: rgba(255,255,255,0.25);
  will-change: transform, clip-path;
  position: relative;
  overflow: hidden;
}

/* Обёртка для clip-path эффекта */
.footer-char-inner{
  display: block;
  will-change: transform;
}

@media (max-width: 900px){
  .project-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 80px;
  }
  .project-card,
  .project-card.wide,
  .project-card.tall{
    grid-column: span 2;
    grid-row: span 2;
  }
  .project-card h3{
    font-size: 20px;
  }
}

@media (max-width: 768px){
  /* Навигация */
  .topnav{
    width: calc(100vw - 20px);
    gap: 10px;
    top: 12px;
  }

  .nav-center-pill{
    padding: 0 12px;
    gap: 6px;
  }

  .nav-center-pill .nav-link{
    padding: 8px 8px;
    font-size: 13px;
  }

  .nav-pill,
  .nav-center-pill{
    height: 48px;
    font-size: 13px;
  }

  /* Hero экран */
  .hero{
    min-height: 100svh; /* safe viewport height для мобильных */
  }

  #gl{
    object-fit: cover;
  }

  .title-wrap{
    top: 40vh;
    width: calc(100vw - 32px);
  }

  .subtitle-wrap{
    top: 40vh;
    width: calc(100vw - 32px);
  }

  .title{
    font-size: clamp(48px, 14vw, 100px);
  }

  .subtitle{
    font-size: clamp(18px, 5vw, 40px);
    white-space: normal;
    line-height: 1.2;
  }

  .title-wrap.shifted{
    transform: translate(-50%, -36px) scale(0.58);
  }

  .subtitle-wrap.shifted{
    transform: translate(-50%, 44px) scale(1);
  }

  /* Кнопка */
  .btn{
    padding: 14px 20px;
    font-size: 15px;
  }

  /* Карточки */
  .project-grid{
    grid-auto-rows: 70px;
    gap: 10px;
  }

  .project-card{
    padding: 12px 14px;
  }

  .project-card h3{
    font-size: 18px;
  }

  .project-card p{
    font-size: 12px;
  }

  .icon{
    width: 36px;
    height: 36px;
  }

  /* About секция */
  .about{
    padding: 100px 16px 160px;
  }

  .about h2{
    font-size: clamp(24px, 6vw, 36px);
    margin-bottom: 20px;
  }

  /* FAQ */
  .faq{
    margin-top: 100px;
  }

  .faq h3{
    font-size: 56px;
  }

  .faq-q{
    font-size: 18px;
    padding: 8px 0;
  }

  .faq-a p{
    font-size: 14px;
  }

  /* Контакты */
  .contact{
    padding: 100px 16px 0;
  }

  .contact-card{
    padding: 20px;
    border-radius: 22px;
  }

  .contact-head h3{
    font-size: clamp(22px, 5vw, 30px);
  }

  .contact-head p{
    font-size: 14px;
  }
}

@media (max-width: 480px){
  /* Навигация мобильная */
  .topnav{
    height: 44px;
    top: 10px;
    width: calc(100vw - 16px);
  }

  .nav-center-pill{
    display: none;
  }

  .nav-pill{
    height: 44px;
    padding: 0 12px;
    font-size: 12px;
  }

  /* Hero мобильный */
  .hero{
    min-height: 100svh;
  }

  .title-wrap{
    top: 38vh;
  }

  .subtitle-wrap{
    top: 38vh;
  }

  .title{
    font-size: clamp(40px, 16vw, 80px);
  }

  .subtitle{
    font-size: clamp(14px, 4.5vw, 28px);
    line-height: 1.25;
    padding: 0 8px;
  }

  .title-wrap.shifted{
    transform: translate(-50%, -28px) scale(0.55);
  }

  .subtitle-wrap.shifted{
    transform: translate(-50%, 36px) scale(1);
  }

  .btn{
    padding: 12px 18px;
    font-size: 14px;
  }

  /* About мобильный */
  .about{
    padding: 80px 12px 140px;
  }

  .about h2{
    font-size: 22px;
  }

  /* Карточки мобильные */
  .project-grid{
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
    gap: 12px;
  }

  .project-card,
  .project-card.wide,
  .project-card.tall{
    grid-column: span 1;
    grid-row: span 1;
    padding: 16px;
  }

  .project-card h3{
    font-size: 18px;
  }

  .project-card.tall h3,
  .project-card.wide h3{
    font-size: 18px;
  }

  .project-card p{
    font-size: 13px;
  }

  .icon{
    width: 32px;
    height: 32px;
    margin-bottom: 8px;
  }

  /* FAQ мобильный */
  .faq{
    margin-top: 80px;
  }

  .faq h3{
    font-size: 40px;
  }

  .faq-q{
    font-size: 16px;
  }

  .faq-a p{
    font-size: 13px;
  }

  /* Контакты мобильные */
  .contact{
    padding: 80px 12px 0;
  }

  .contact-card{
    padding: 16px;
    border-radius: 18px;
  }

  .contact-head h3{
    font-size: 20px;
  }

  .contact-head p{
    font-size: 13px;
  }

  .field span{
    font-size: 11px;
  }

  .field input,
  .field textarea{
    padding: 10px 14px;
    font-size: 14px;
    border-radius: 12px;
  }

  .contact-btn{
    padding: 10px 16px;
    font-size: 14px;
  }

  /* Скрываем бегунок на мобильных для производительности */
  .neural-runner{
    display: none;
  }
}

/* Ландшафтная ориентация на мобильных */
@media (max-height: 500px) and (orientation: landscape){
  .hero{
    min-height: 100svh;
  }

  .title-wrap{
    top: 35vh;
  }

  .subtitle-wrap{
    top: 35vh;
  }

  .title{
    font-size: clamp(32px, 8vw, 60px);
  }

  .subtitle{
    font-size: clamp(14px, 3vw, 24px);
  }

  .title-wrap.shifted{
    transform: translate(-50%, -20px) scale(0.5);
  }

  .subtitle-wrap.shifted{
    transform: translate(-50%, 28px) scale(1);
  }

  .btn{
    padding: 10px 16px;
    font-size: 13px;
  }
}
