/* ============================================================
   EVADIA — брендовый сайт (прототип v2)
   Дизайн-система: ритм moonshot.ai, типографика Inter Tight/Inter
   ============================================================ */

:root {
  --bg: #0a0a0a; --bg-elev: #141414; --bg-card: #101010;
  --text: #f4f4f2; --dim: rgba(244,244,242,.58); --faint: rgba(244,244,242,.34);
  --line: rgba(255,255,255,.12); --line-soft: rgba(255,255,255,.07);
  --btn-bg: #f4f4f2; --btn-text: #0a0a0a;
  --shadow: 0 30px 80px rgba(0,0,0,.55);
  --glow: rgba(244,244,242,.10);
}

* { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior:smooth; }
body {
  background: var(--bg); color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  transition: background .35s ease, color .35s ease;
}
h1,h2,h3,.tight { font-family:'Inter Tight','Inter',system-ui,sans-serif; }
a { color: inherit; text-decoration: none; }
img { display:block; max-width:100%; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 32px; }
.micro {
  font-size: 12px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--faint); font-weight: 500;
}

/* ---------- header ---------- */
header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border-bottom: 1px solid var(--line-soft);
}
.nav { display:flex; align-items:center; gap: 36px; height: 68px; }
.brand-logo { display:flex; align-items:center; color: var(--text); }
.brand-logo svg { height: 19px; width: auto; }
.menu { display:flex; gap: 26px; margin: 0 auto; }
.menu a { font-size: 14.5px; color: var(--dim); transition: color .2s; }
.menu a:hover { color: var(--text); }
.menu a.active { color: var(--text); }
.actions { display:flex; align-items:center; gap: 16px; }
.shop-link {
  display:inline-flex; align-items:center; gap: 7px;
  font-size: 14px; font-weight: 500;
  padding: 9px 18px; border-radius: 999px;
  background: var(--btn-bg); color: var(--btn-text);
  transition: opacity .2s;
}
.shop-link:hover { opacity: .86; }
.icon-btn {
  background:none; border:1px solid var(--line); color: var(--text);
  width: 38px; height: 38px; border-radius: 999px; cursor: pointer;
  display:inline-flex; align-items:center; justify-content:center;
  transition: border-color .2s; flex: none;
}
.icon-btn:hover { border-color: var(--faint); }
.burger { display:none; }

.mob-menu {
  position: fixed; inset: 68px 0 auto 0; z-index: 49;
  background: var(--bg-elev); border-bottom: 1px solid var(--line);
  padding: 18px 24px 26px; display: none; flex-direction: column; gap: 4px;
}
.mob-menu.open { display: flex; }
.mob-menu a { padding: 12px 4px; font-size: 17px; border-bottom: 1px solid var(--line-soft); }
.mob-menu .micro { margin-top: 14px; border: none; }

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 100svh;
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  text-align:center; overflow:hidden; padding: 130px 24px 90px;
}
.hero-aura {
  position:absolute; inset:-20%; pointer-events:none;
  background:
    radial-gradient(38% 30% at 30% 35%, rgba(210,60,46,.10), transparent 70%),
    radial-gradient(42% 34% at 68% 60%, rgba(201,138,43,.08), transparent 70%),
    radial-gradient(30% 26% at 55% 30%, rgba(62,122,78,.07), transparent 70%);
  animation: drift 26s ease-in-out infinite alternate;
}
@keyframes drift {
  from { transform: translate3d(-2%,-1%,0) scale(1); }
  to   { transform: translate3d(2%,2%,0) scale(1.06); }
}
.hero > *:not(.hero-aura) { position: relative; }

/* сцена фирменного знака: затмение, появление букв, блик, параллакс */
.brand-float { position: relative; perspective: 1000px; }
.brand-eclipse {
  position: absolute; left: 50%; top: 46%;
  width: min(560px, 82vw); aspect-ratio: 1 / 1;
  transform: translate(-50%, -50%);
  border-radius: 50%; pointer-events: none;
  background: conic-gradient(from 0deg,
    transparent 0deg 200deg,
    rgba(255,255,255,.05) 235deg,
    rgba(255,255,255,.60) 285deg,
    rgba(255,255,255,.10) 320deg,
    transparent 360deg);
  -webkit-mask: radial-gradient(closest-side, transparent 63%, #000 66.5%, #000 72.5%, transparent 76%);
          mask: radial-gradient(closest-side, transparent 63%, #000 66.5%, #000 72.5%, transparent 76%);
  animation: eclipseSpin 30s linear infinite;
}
.brand-eclipse::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 180deg,
    transparent 0deg 235deg,
    rgba(255,255,255,.14) 285deg,
    transparent 335deg);
  -webkit-mask: radial-gradient(closest-side, transparent 79%, #000 81.5%, #000 83.5%, transparent 85.5%);
          mask: radial-gradient(closest-side, transparent 79%, #000 81.5%, #000 83.5%, transparent 85.5%);
  animation: eclipseSpinRev 46s linear infinite;
}
@keyframes eclipseSpin {
  from { transform: translate(-50%,-50%) rotate(0deg); }
  to   { transform: translate(-50%,-50%) rotate(360deg); }
}
@keyframes eclipseSpinRev {
  from { transform: rotate(360deg); }
  to   { transform: rotate(0deg); }
}
.brand-glow {
  position:absolute; left:50%; top:44%; transform:translate(-50%,-50%);
  width: min(760px, 90vw); height: 300px; pointer-events:none;
  background: radial-gradient(50% 50% at 50% 50%, var(--glow), transparent 70%);
  animation: breathe 8s ease-in-out infinite;
}
@keyframes breathe {
  0%,100% { opacity:.55; transform:translate(-50%,-50%) scale(1); }
  50%     { opacity:1;   transform:translate(-50%,-50%) scale(1.08); }
}
.brand-mark {
  position: relative; width: min(660px, 76vw); color: var(--text);
  transform-style: preserve-3d; will-change: transform;
  transition: transform .45s cubic-bezier(.2,.7,.3,1);
}
.brand-mark svg { width:100%; height:auto; display:block; }

/* появление букв при загрузке (JS разбивает знак на .brand-letter) */
html.js:not([data-flat]) .brand-letter {
  opacity: 0;
  transform: translateY(22px) scale(.93);
  filter: blur(12px);
  transform-box: fill-box; transform-origin: 50% 60%;
}
html.js:not([data-flat]) .brand-mark.play .brand-letter {
  animation: letterIn 1.15s cubic-bezier(.16,1,.3,1) forwards;
}
@keyframes letterIn {
  55% { filter: blur(0); }
  to  { opacity: 1; transform: none; filter: blur(0); }
}

/* пробегающий блик по буквам (маска — векторный знак) */
.brand-shine {
  position: absolute; inset: -8% -3%; pointer-events: none; opacity: 0;
  background: linear-gradient(102deg, transparent 44%, rgba(255,255,255,.9) 50%, transparent 56%);
  background-size: 280% 100%; background-repeat: no-repeat; background-position: 135% 0;
  -webkit-mask: url('../evadia-wordmark.svg') center / contain no-repeat;
          mask: url('../evadia-wordmark.svg') center / contain no-repeat;
}
html.js:not([data-flat]) .brand-shine { opacity: 1; animation: shineSweep 9s ease-in-out 2.4s infinite; }
@keyframes shineSweep {
  0%   { background-position: 135% 0; }
  16%  { background-position: -35% 0; }
  100% { background-position: -35% 0; }
}

/* каскадное появление элементов первого экрана */
html.js:not([data-flat]) .hero-rise { opacity: 0; transform: translateY(18px); }
html.js:not([data-flat]) .hero.played .hero-rise {
  opacity: 1; transform: none;
  transition: opacity .9s ease var(--d, 0s), transform .9s cubic-bezier(.16,1,.3,1) var(--d, 0s);
}
.brand-sub {
  margin-top: 18px; font-family:'Inter Tight'; font-weight: 500;
  font-size: clamp(13px, 1.7vw, 19px); letter-spacing: .52em; text-indent: .52em;
  color: var(--dim);
}
.brand-ru { margin-top: 26px; font-size: 17.5px; color: var(--dim); }
.hero .micro { margin-bottom: 34px; }

/* ---------- AI-консультант ---------- */
.helper { margin-top: 52px; width: min(680px, 100%); }
.helper h2 {
  font-size: clamp(22px, 2.6vw, 30px); font-weight: 700; letter-spacing:-.01em;
  margin-bottom: 20px;
}
.ai-box {
  width: 100%;
  display:flex; align-items:center; gap: 10px;
  background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: 999px; padding: 8px 8px 8px 26px;
  box-shadow: var(--shadow); transition: border-color .25s;
}
.ai-box:focus-within { border-color: var(--faint); }
.ai-box input {
  flex:1; background:none; border:none; outline:none;
  color: var(--text); font-size: 15.5px; font-family: inherit; min-width: 0;
}
.ai-box input::placeholder { color: var(--faint); }
.ai-send {
  flex: none; width: 44px; height: 44px; border-radius: 999px; border: none;
  background: var(--btn-bg); color: var(--btn-text); cursor: pointer;
  display:flex; align-items:center; justify-content:center;
  transition: transform .15s;
}
.ai-send:hover { transform: scale(1.06); }
.chips { margin-top: 16px; display:flex; flex-wrap:wrap; gap: 10px; justify-content:center; }
.chip {
  border: 1px solid var(--line); border-radius: 999px; background: none;
  color: var(--dim); font-size: 13.5px; padding: 8px 16px; cursor: pointer;
  font-family: inherit; transition: all .2s; text-align: left;
}
.chip:hover { color: var(--text); border-color: var(--faint); }
.helper-note { margin-top: 14px; font-size: 13px; color: var(--faint); }
.helper-note b { color: var(--dim); font-weight: 500; }

/* ---------- CTA ---------- */
.hero-cta { margin-top: 38px; display:flex; gap: 14px; flex-wrap: wrap; justify-content:center; }
.pill {
  display:inline-flex; align-items:center; gap: 8px;
  padding: 14px 30px; border-radius: 999px; font-size: 14.5px; font-weight: 500;
  border: 1px solid var(--line); color: var(--text); cursor: pointer;
  background: none; transition: all .2s; font-family: inherit;
}
.pill:hover { border-color: var(--faint); }
.pill.solid { background: var(--btn-bg); color: var(--btn-text); border-color: var(--btn-bg); }
.pill.solid:hover { opacity:.88; }
.cta-note { margin-top: 18px; font-size: 13.5px; color: var(--faint); }
.cta-note a { color: var(--dim); border-bottom: 1px solid var(--line); }
.cta-note a:hover { color: var(--text); }

/* ---------- секции ---------- */
section { padding: 120px 0; }
.sec-head { max-width: 640px; margin-bottom: 64px; }
.sec-head.center { margin-left:auto; margin-right:auto; text-align:center; }
.sec-head h2 {
  font-size: clamp(30px, 4.4vw, 52px); font-weight: 700; letter-spacing: -.02em;
  line-height: 1.08; margin: 18px 0 16px;
}
.sec-head p { color: var(--dim); font-size: 17px; }

/* ---------- направления ассортимента ---------- */
.dir-row {
  display:grid; grid-template-columns: 1.15fr 1fr; gap: 72px; align-items: center;
  padding: 44px 0;
}
.dir-row + .dir-row { border-top: 1px solid var(--line-soft); }
.dir-row:nth-child(even) .dir-img { order: 2; }
.dir-img {
  border-radius: 20px; overflow: hidden; border: 1px solid var(--line-soft);
  aspect-ratio: 3/2; background: var(--bg-card);
}
.dir-img img { width:100%; height:100%; object-fit: cover; }
.dir-img.contain { display:flex; align-items:center; justify-content:center; }
.dir-img.contain img { object-fit: contain; padding: 40px; }
.dir-num { font-family:'Inter Tight'; font-size: 13px; color: var(--faint); letter-spacing:.14em; }
.dir-body h3 {
  font-size: clamp(24px, 2.8vw, 34px); font-weight: 700; letter-spacing:-.015em;
  margin: 12px 0 14px;
}
.dir-body p { color: var(--dim); font-size: 16.5px; max-width: 44ch; }
.dir-link {
  display:inline-flex; align-items:center; gap: 8px; margin-top: 22px;
  font-size: 14.5px; font-weight: 500; color: var(--text);
  border-bottom: 1px solid var(--line); padding-bottom: 3px; transition: border-color .2s;
}
.dir-link:hover { border-color: var(--text); }

/* ---------- о компании ---------- */
.about-grid { display:grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items:center; }
.about-photo { border-radius: 20px; overflow:hidden; border:1px solid var(--line-soft); }
.about-photo img { width:100%; height:100%; object-fit: cover; }
.about-text .lead { font-size: 19px; line-height: 1.6; margin: 16px 0 26px; }
.sec-h { font-size:clamp(28px,3.6vw,44px); font-weight:700; letter-spacing:-.02em; line-height:1.12; margin:18px 0 0; }
.contacts-grid .sec-h { margin-bottom: 26px; }
.stats { display:grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 8px; }
.stat b {
  display:block; font-family:'Inter Tight'; font-size: 26px; font-weight: 700;
  letter-spacing:-.01em; margin-bottom: 6px;
}
.stat span { font-size: 13.5px; color: var(--dim); }

/* ---------- контакты ---------- */
.contacts-grid { display:grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: start; }
.contact-line { display:flex; flex-direction:column; gap: 4px; padding: 18px 0; border-bottom: 1px solid var(--line-soft); }
.contact-line:first-child { padding-top: 0; }
.contact-line .k { font-size: 12.5px; letter-spacing:.14em; text-transform: uppercase; color: var(--faint); }
.contact-line a, .contact-line .v { font-size: 18px; font-weight: 500; }
.contact-line a:hover { opacity:.8; }
.socials { display:flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.requisites { font-size: 13px; color: var(--faint); line-height: 1.7; }
.insta-note { font-size: 11.5px; color: var(--faint); margin-top: 18px; max-width: 46ch; }

/* ---------- страница «Для бизнеса» ---------- */
.page-hero { padding: 170px 0 90px; text-align: center; position: relative; overflow: hidden; }
.page-hero h1 {
  font-size: clamp(36px, 5.6vw, 68px); font-weight: 800; letter-spacing:-.025em;
  line-height: 1.05; max-width: 16ch; margin: 20px auto 22px;
}
.page-hero .sub { color: var(--dim); font-size: 17.5px; max-width: 52ch; margin: 0 auto; }
.page-hero .hero-cta { margin-top: 34px; }
.facts { display:grid; grid-template-columns: repeat(3,1fr); gap: 24px;
  border-top: 1px solid var(--line-soft); padding-top: 56px; }
.fact b { display:block; font-family:'Inter Tight'; font-size: 30px; font-weight:700; margin-bottom: 8px; letter-spacing:-.01em; }
.fact span { color: var(--dim); font-size: 14.5px; }

.steps { display:grid; grid-template-columns: repeat(2,1fr); gap: 20px; counter-reset: step; }
.step {
  border: 1px solid var(--line-soft); border-radius: 20px; padding: 30px 32px;
  background: var(--bg-card);
}
.step .n { font-family:'Inter Tight'; font-size: 13px; letter-spacing:.14em; color: var(--faint); }
.step h3 { font-size: 19px; font-weight: 700; margin: 10px 0 8px; letter-spacing:-.01em; }
.step p { color: var(--dim); font-size: 15px; }

.points { display:grid; grid-template-columns: repeat(2,1fr); gap: 20px; }
.point { padding: 26px 28px; border:1px solid var(--line-soft); border-radius: 20px; background: var(--bg-card); }
.point h3 { font-size: 17px; font-weight: 600; margin-bottom: 8px; }
.point p { color: var(--dim); font-size: 15px; }

.faq details { border-bottom: 1px solid var(--line-soft); }
.faq summary {
  cursor: pointer; list-style: none; padding: 24px 4px;
  font-family:'Inter Tight'; font-size: 18px; font-weight: 600; letter-spacing:-.01em;
  display:flex; justify-content:space-between; align-items:center; gap: 20px;
}
.faq summary::-webkit-details-marker { display:none; }
.faq summary::after { content:'+'; font-size: 22px; font-weight: 400; color: var(--faint); transition: transform .25s; flex:none; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 4px 26px; color: var(--dim); font-size: 15.5px; max-width: 68ch; }
.faq details a { color: var(--text); border-bottom: 1px solid var(--line); }

.big-strip {
  padding: 110px 0; text-align:center; border-top: 1px solid var(--line-soft);
}
.big-strip .t {
  font-family:'Inter Tight'; font-weight: 800; letter-spacing:-.02em;
  font-size: clamp(28px, 4.6vw, 54px); line-height: 1.12; max-width: 20ch; margin: 0 auto 30px;
}

/* ---------- футер ---------- */
footer { border-top: 1px solid var(--line-soft); padding: 72px 0 44px; }
.foot-grid { display:flex; justify-content:space-between; gap: 48px; flex-wrap: wrap; }
.foot-logo-img { width: 132px; opacity: .92; }
.foot-logo-img { filter: invert(1); }
.foot-col { display:flex; flex-direction:column; gap: 12px; font-size: 14.5px; }
.foot-col .micro { margin-bottom: 6px; }
.foot-col a { color: var(--dim); }
.foot-col a:hover { color: var(--text); }
.foot-shop {
  display:inline-flex; align-items:center; gap: 8px; margin-top: 8px;
  font-weight: 500; color: var(--text) !important;
  border-bottom: 1px solid var(--line); padding-bottom: 3px; width: fit-content;
}
.foot-bottom {
  margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line-soft);
  display:flex; justify-content:space-between; gap: 20px; flex-wrap: wrap;
  color: var(--faint); font-size: 13px;
}

/* ---------- чат (демо существующего live chat) ---------- */
.chat {
  position: fixed; top:0; right:0; bottom:0; width: min(420px, 100vw); z-index: 100;
  background: var(--bg-elev); border-left: 1px solid var(--line);
  transform: translateX(105%); transition: transform .35s cubic-bezier(.32,.72,.28,1);
  display:flex; flex-direction:column; box-shadow: var(--shadow);
}
.chat.open { transform: translateX(0); }
.chat-head { padding: 20px 24px; border-bottom: 1px solid var(--line-soft); display:flex; align-items:center; justify-content:space-between; }
.chat-head .t { font-weight: 700; font-family:'Inter Tight'; }
.chat-head .mock { font-size: 11px; color: var(--faint); letter-spacing:.12em; text-transform: uppercase; }
.chat-body { flex:1; overflow-y:auto; padding: 24px; display:flex; flex-direction:column; gap: 14px; }
.msg { max-width: 88%; padding: 13px 17px; border-radius: 18px; font-size: 14.5px; line-height: 1.5; }
.msg.user { align-self:flex-end; background: var(--btn-bg); color: var(--btn-text); border-bottom-right-radius: 6px; }
.msg.bot { align-self:flex-start; background: var(--bg-card); border:1px solid var(--line-soft); border-bottom-left-radius: 6px; }
.msg.bot a { color: var(--text); border-bottom: 1px solid var(--line); }
.chat-note { padding: 12px 24px; font-size: 12px; color: var(--faint); border-top: 1px solid var(--line-soft); }
.chat-input { padding: 16px 20px; border-top: 1px solid var(--line-soft); display:flex; gap: 10px; }
.chat-input input { flex:1; background: var(--bg-card); border:1px solid var(--line-soft); border-radius: 999px; padding: 11px 18px; color: var(--text); font-size: 14px; outline: none; font-family: inherit; min-width:0; }
.chat-input button { flex:none; width:42px; height:42px; border-radius:999px; border:none; background: var(--btn-bg); color: var(--btn-text); cursor:pointer; }


/* ---------- эффекты: ч/б → цвет при наведении ---------- */
.dir-img img, .about-photo img {
  filter: grayscale(1) contrast(1.02);
  transition: filter .6s ease, transform .8s cubic-bezier(.22,.61,.3,1);
}
.dir-img:hover img, .about-photo:hover img,
.dir-img.force-color img { filter: grayscale(0); transform: scale(1.04); }
.dir-img, .about-photo { transition: border-color .3s; }
.dir-img:hover, .about-photo:hover { border-color: var(--line); }
.step, .point { transition: border-color .25s, transform .25s; }
.step:hover, .point:hover { border-color: var(--line); transform: translateY(-3px); }

/* ---------- reveal (сдержанные переходы секций) ---------- */
.js .reveal { opacity: 0; transform: translateY(26px); }
.js .reveal.in { opacity: 1; transform: none; transition: opacity .7s ease, transform .7s cubic-bezier(.22,.61,.3,1); }

/* ---------- живой чат Bitrix24: штатная плавающая кнопка скрыта ----------
   Вход в чат — через блок Ai Helper (формы, чипы, кнопки «Помочь с подбором»).
   Сам диалог чата рендерится отдельным оверлеем и не затрагивается. */
.b24-widget-button-wrapper { display: none !important; }

/* ---------- verification helper ---------- */
html[data-flat] .hero { min-height: auto; }
html[data-flat] .reveal { opacity: 1 !important; transform: none !important; }
html[data-flat] .brand-eclipse, html[data-flat] .brand-eclipse::after { animation: none; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-aura, .brand-glow, .brand-eclipse, .brand-eclipse::after, .brand-shine { animation: none; }
  .brand-shine { opacity: 0; }
  html.js .brand-letter { opacity: 1 !important; transform: none !important; filter: none !important; }
  html.js .hero-rise { opacity: 1 !important; transform: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  * { transition-duration: .01ms !important; }
}

/* ---------- адаптив ---------- */
@media (max-width: 1024px) {
  .menu { gap: 18px; }
  .dir-row { gap: 44px; }
  .about-grid, .contacts-grid { gap: 44px; }
}
@media (max-width: 760px) {
  .menu { display: none; }
  .burger { display: inline-flex; }
  .shop-link { font-size: 13px; padding: 8px 14px; }
  .nav { gap: 16px; }
  section { padding: 84px 0; }
  .hero { padding: 120px 20px 70px; }
  .brand-sub { letter-spacing: .38em; text-indent: .38em; }
  .dir-row { grid-template-columns: 1fr; gap: 26px; padding: 34px 0; }
  .dir-row:nth-child(even) .dir-img { order: 0; }
  .about-grid, .contacts-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .facts { grid-template-columns: 1fr; gap: 28px; }
  .steps, .points { grid-template-columns: 1fr; }
  .hero-cta .pill { width: 100%; justify-content: center; }
  .page-hero { padding: 140px 0 70px; }
}
