/* =============== FONTS (self-hosted) =============== */
/* cyrillic */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/inter-cyrillic-400-normal.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url(/assets/fonts/inter-cyrillic-500-normal.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url(/assets/fonts/inter-cyrillic-600-normal.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url(/assets/fonts/inter-cyrillic-700-normal.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 800; font-display: swap; src: url(/assets/fonts/inter-cyrillic-800-normal.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
/* latin */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/inter-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url(/assets/fonts/inter-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url(/assets/fonts/inter-latin-600-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url(/assets/fonts/inter-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 800; font-display: swap; src: url(/assets/fonts/inter-latin-800-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* JetBrains Mono — cyrillic */
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/jetbrains-mono-cyrillic-400-normal.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url(/assets/fonts/jetbrains-mono-cyrillic-500-normal.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
/* JetBrains Mono — latin */
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/jetbrains-mono-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, 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-weight: 500; font-display: swap; src: url(/assets/fonts/jetbrains-mono-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* =========================================================
   Кремень — дизайн-токены
   Светлая тема — база (:root), тёмная — [data-theme="dark"].
   Правило: цвета в компонентах берутся ТОЛЬКО из переменных,
   иначе светлая тема разъедется.
   ========================================================= */

:root,
[data-theme="light"] {
  color-scheme: light;

  /* Brand — не зависят от темы */
  --purple: #7C3AED;
  --indigo: #6366F1;
  --cyan:   #0891B2;
  --pink:   #EC4899;

  /* Surfaces — лёгкая прохлада, не «больничный» белый */
  --bg-base:     #F7F8FC;
  --bg-surface:  #FFFFFF;
  --bg-elevated: #EEF1F7;
  --bg-glass:    rgba(15, 23, 42, .045);
  --bg-inset:    #FFFFFF;

  /* Borders */
  --border-subtle: rgba(15, 23, 42, .10);
  --border-hover:  rgba(124, 58, 237, .45);
  --border-strong: rgba(15, 23, 42, .18);

  /* Text */
  --text-primary:   #0F172A;
  --text-secondary: #475569;
  --text-muted:     #64748B;
  --text-contrast:  #FFFFFF;

  /* Accents — читаемые на белом */
  --accent-ai:  #DB2777;
  --accent-dev: #4F46E5;
  --accent-ops: #0E7490;
  --accent-sec: #0891B2;

  --cat-ai-text:   #9D174D;
  --cat-ai-bg:     rgba(236, 72, 153, .10);
  --cat-ai-border: rgba(236, 72, 153, .28);
  --cat-dev-text:   #3730A3;
  --cat-dev-bg:     rgba(99, 102, 241, .10);
  --cat-dev-border: rgba(99, 102, 241, .28);
  --cat-ops-text:   #155E75;
  --cat-ops-bg:     rgba(8, 145, 178, .10);
  --cat-ops-border: rgba(8, 145, 178, .28);
  --cat-sec-text:   #155E75;
  --cat-sec-bg:     rgba(34, 211, 238, .12);
  --cat-sec-border: rgba(8, 145, 178, .30);

  /* Gradients / glow */
  --gradient-ai:   linear-gradient(135deg, #7C3AED 0%, #6366F1 50%, #EC4899 100%);
  --gradient-cool: linear-gradient(135deg, #6366F1 0%, #0891B2 100%);
  --glow-ai:   0 0 0 1px rgba(124, 58, 237, .16), 0 18px 48px -22px rgba(124, 58, 237, .28);
  --glow-cyan: 0 0 0 1px rgba(8, 145, 178, .18), 0 18px 48px -22px rgba(8, 145, 178, .26);
  --shadow-card:  0 18px 40px -22px rgba(15, 23, 42, .18), 0 8px 16px -12px rgba(79, 70, 229, .12);
  --shadow-modal: 0 40px 80px -24px rgba(15, 23, 42, .22), 0 0 0 1px rgba(124, 58, 237, .10);
  --shadow-float: 0 16px 36px -16px rgba(15, 23, 42, .20);

  /* Ambient — фирменный цвет на белом должен быть заметен */
  --ambient-opacity-a: .34;
  --ambient-opacity-b: .28;
  --ambient-opacity-c: .22;
  --ambient-blur: 130px;
  --grid-line: rgba(15, 23, 42, .05);

  /* Spotlight / CTA / orbs — отдельные токены под тему */
  --card-spotlight: rgba(124, 58, 237, .14);
  --cta-spot-a: rgba(124, 58, 237, .18);
  --cta-spot-b: rgba(8, 145, 178, .14);
  --cta-ring-a: rgba(124, 58, 237, .45);
  --cta-ring-b: rgba(8, 145, 178, .40);
  --about-orb-opacity: .42;
  --case-spot-a: rgba(124, 58, 237, .22);
  --case-spot-b: rgba(8, 145, 178, .18);

  /* Hero: фото видно, текст читается */
  --hero-image-base: url('/assets/images/kremen-rock-white-glass.png');
  --hero-image-top:  url('/assets/images/kremen-rock-white-grass.png');
  --hero-scrim: none;

  --header-bg:  rgba(247, 248, 252, .82);
  --overlay-bg: rgba(15, 23, 42, .42);
  --scrollbar-track: #EEF1F7;
  --scrollbar-thumb: #CBD5E1;
  --scrollbar-thumb-hover: #94A3B8;
  --selection-bg: rgba(124, 58, 237, .20);

  --success:     #15803D;
  --success-bg:  rgba(34, 197, 94, .10);
  --success-border: rgba(34, 197, 94, .35);
  --danger:      #DC2626;
  --danger-bg:   rgba(239, 68, 68, .08);
  --danger-border: rgba(239, 68, 68, .45);
  --warning:     #B45309;
  --warning-bg:  rgba(251, 191, 36, .12);

  /* Shape */
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  /* Layout */
  --container-max: 1240px;
  --container-px:  24px;
  --header-h: 72px;

  /* Motion */
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --dur: 220ms;

  /* Fonts */
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ---------------- Тёмная тема ---------------- */
[data-theme="dark"] {
  color-scheme: dark;

  --bg-base:     #0A0A0B;
  --bg-surface:  #111114;
  --bg-elevated: #16161B;
  --bg-glass:    rgba(255, 255, 255, .03);
  --bg-inset:    #0A0A0B;

  --border-subtle: rgba(255, 255, 255, .08);
  --border-hover:  rgba(124, 58, 237, .45);
  --border-strong: rgba(255, 255, 255, .14);

  --text-primary:   #F8FAFC;
  --text-secondary: #A6ADBB;
  --text-muted:     #6B7280;
  --text-contrast:  #FFFFFF;

  --accent-ai:  #EC4899;
  --accent-dev: #6366F1;
  --accent-ops: #0891B2;
  --accent-sec: #22D3EE;

  --cat-ai-text:   #F9A8D4;
  --cat-ai-bg:     rgba(236, 72, 153, .10);
  --cat-ai-border: rgba(236, 72, 153, .25);
  --cat-dev-text:   #C7D2FE;
  --cat-dev-bg:     rgba(99, 102, 241, .10);
  --cat-dev-border: rgba(99, 102, 241, .25);
  --cat-ops-text:   #A5F3FC;
  --cat-ops-bg:     rgba(8, 145, 178, .12);
  --cat-ops-border: rgba(8, 145, 178, .30);
  --cat-sec-text:   #67E8F9;
  --cat-sec-bg:     rgba(34, 211, 238, .10);
  --cat-sec-border: rgba(34, 211, 238, .35);

  --glow-ai:   0 0 0 1px rgba(124, 58, 237, .25), 0 20px 60px -20px rgba(124, 58, 237, .35);
  --glow-cyan: 0 0 0 1px rgba(8, 145, 178, .30), 0 20px 60px -20px rgba(8, 145, 178, .35);
  --shadow-card:  0 22px 60px -20px rgba(124, 58, 237, .35);
  --shadow-modal: 0 40px 80px -20px rgba(0, 0, 0, .70), 0 0 0 1px rgba(124, 58, 237, .15);
  --shadow-float: 0 16px 32px -16px rgba(0, 0, 0, .45);

  --ambient-opacity-a: .55;
  --ambient-opacity-b: .45;
  --ambient-opacity-c: .30;
  --ambient-blur: 120px;
  --grid-line: rgba(255, 255, 255, .035);

  --card-spotlight: rgba(124, 58, 237, .10);
  --cta-spot-a: rgba(124, 58, 237, .35);
  --cta-spot-b: rgba(8, 145, 178, .30);
  --cta-ring-a: rgba(124, 58, 237, .60);
  --cta-ring-b: rgba(8, 145, 178, .60);
  --about-orb-opacity: .35;
  --case-spot-a: rgba(124, 58, 237, .35);
  --case-spot-b: rgba(8, 145, 178, .30);

  --hero-image-base: url('/assets/images/kremen-rock-night-sky.png');
  --hero-image-top:  url('/assets/images/kremen-rock-night-grass.png');
  --hero-scrim: none;

  --header-bg:  rgba(10, 10, 11, .72);
  --overlay-bg: rgba(4, 4, 6, .72);
  --scrollbar-track: #0A0A0B;
  --scrollbar-thumb: #232329;
  --scrollbar-thumb-hover: #33333C;
  --selection-bg: rgba(124, 58, 237, .35);

  --success:     #4ADE80;
  --success-bg:  rgba(34, 197, 94, .12);
  --success-border: rgba(34, 197, 94, .35);
  --danger:      #F87171;
  --danger-bg:   rgba(239, 68, 68, .12);
  --danger-border: rgba(239, 68, 68, .55);
  --warning:     #FBBF24;
  --warning-bg:  rgba(251, 191, 36, .12);
}

@media (min-width: 768px)  { :root { --container-px: 40px; } }
@media (min-width: 1024px) { :root { --container-px: 64px; } }

/* =============== RESET / BASE =============== */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-base);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background var(--dur) var(--ease-out), color var(--dur) var(--ease-out);
}

img { display: block; max-width: 100%; height: auto; }
svg { display: block; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; transition: color var(--dur) var(--ease-out); }
a:hover { color: var(--text-primary); }
ul { list-style: none; padding: 0; }

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

::selection { background: var(--selection-bg); color: var(--text-primary); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--scrollbar-track); }
::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--scrollbar-thumb-hover); }

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-px);
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; top: -100px; left: 16px; z-index: 200;
  padding: 12px 20px; border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  background: var(--bg-elevated); color: var(--text-primary);
  border: 1px solid var(--border-strong);
  transition: top var(--dur) var(--ease-out);
}
.skip-link:focus { top: 0; }

/* =============== TYPOGRAPHY =============== */
.h1, .h2, .h3 {
  font-weight: 700; letter-spacing: -.02em; line-height: 1.1;
  color: var(--text-primary);
  text-wrap: balance;
}
.h1 { font-size: clamp(36px, 6vw, 60px); }
.h2 { font-size: clamp(30px, 4.6vw, 46px); }
.h3 { font-size: clamp(20px, 2.6vw, 26px); line-height: 1.25; }

.gradient-text {
  background: var(--gradient-ai);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* Каретка typewriter не должна наследовать transparent fill от .gradient-text */
[data-typewriter]::after {
  content: '';
  display: inline-block;
  width: .08em;
  min-width: 3px;
  height: .82em;
  margin-left: .12em;
  vertical-align: -0.06em;
  border-radius: 1px;
  background: currentColor;
  color: var(--accent-ai);
  -webkit-text-fill-color: initial;
  background-clip: border-box;
  -webkit-background-clip: border-box;
  opacity: 1;
  animation: caretBlink 1s steps(1) infinite;
}

.lede { color: var(--text-secondary); font-size: 17px; line-height: 1.7; }
.muted { color: var(--text-muted); }
.mono { font-family: var(--font-mono); }

/* =============== AMBIENT BACKGROUND =============== */
.ambient {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none; overflow: hidden;
}
.ambient__blob {
  position: absolute; border-radius: 50%;
  filter: blur(var(--ambient-blur));
  transition: opacity var(--dur) var(--ease-out);
}
.ambient__blob--a {
  top: -10%; left: -10%; width: 620px; height: 620px;
  background: radial-gradient(circle, var(--purple) 0%, transparent 60%);
  opacity: var(--ambient-opacity-a);
  will-change: transform;
  animation: float 22s ease-in-out infinite;
}
.ambient__blob--b {
  top: 25%; right: -15%; width: 700px; height: 700px;
  background: radial-gradient(circle, var(--cyan) 0%, transparent 60%);
  opacity: var(--ambient-opacity-b);
}
.ambient__blob--c {
  bottom: -20%; left: 20%; width: 780px; height: 780px;
  background: radial-gradient(circle, var(--pink) 0%, transparent 60%);
  opacity: var(--ambient-opacity-c);
}
.ambient__grid { display: none; }
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(40px, -30px) scale(1.08); }
}

body > *:not(.ambient):not(.modal):not(.header):not(.skip-link):not(.cookie-bar) { position: relative; z-index: 1; }

/* =============== SECTIONS =============== */
.section { padding-block: clamp(72px, 10vw, 128px); }
.section--sm { padding-block: clamp(48px, 6vw, 80px); }
.section--muted {
  background: linear-gradient(180deg, transparent, var(--bg-glass), transparent);
}
.section__head {
  max-width: 720px; margin: 0 auto clamp(40px, 6vw, 72px);
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.section__lede { color: var(--text-secondary); font-size: 17px; }

/* =============== REVEAL =============== */
[data-reveal] {
  opacity: 0; transform: translateY(16px);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
  will-change: opacity, transform;
}
[data-reveal].is-visible { opacity: 1; transform: none; }

/* =============== REDUCED MOTION =============== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .ambient__blob, .about__orb, .cta__glow { animation: none !important; }
}

/* =============== HEADER =============== */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background var(--dur) var(--ease-out),
              backdrop-filter var(--dur) var(--ease-out),
              border-color var(--dur) var(--ease-out);
}
.header.scrolled {
  background: var(--header-bg);
  backdrop-filter: saturate(140%) blur(18px);
  -webkit-backdrop-filter: saturate(140%) blur(18px);
  border-bottom-color: var(--border-subtle);
}
.header__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  padding-block: 14px;
  gap: 16px;
}
.header__actions {
  display: flex; align-items: center; justify-content: flex-end; gap: 10px;
  justify-self: end;
}
.brand { display: inline-flex; align-items: center; gap: 10px; justify-self: start; }
.brand__name {
  font-weight: 700; font-size: 20px; letter-spacing: -.02em;
  color: var(--text-primary);
}
.brand__mark { flex: 0 0 auto; filter: drop-shadow(0 4px 16px rgba(124, 58, 237, .40)); }

.nav {
  display: none; align-items: center; justify-content: center; gap: 24px;
  font-size: 14px; color: var(--text-secondary); font-weight: 500;
  justify-self: center;
}
.nav a { position: relative; padding-block: 4px; }
.nav a::after {
  content: ''; position: absolute; left: 0; right: 100%; bottom: -6px;
  height: 1px; background: var(--gradient-ai);
  transition: right var(--dur) var(--ease-out);
}
.nav a:hover::after,
.nav a[aria-current="page"]::after { right: 0; }
.nav a[aria-current="page"] { color: var(--text-primary); }

.header__cta { display: none; }
@media (min-width: 1024px) {
  .nav, .header__cta { display: flex; }
}

.menu-toggle {
  display: inline-flex; flex-direction: column; gap: 5px;
  width: 40px; height: 40px; align-items: center; justify-content: center;
  border: 1px solid var(--border-subtle); border-radius: 10px;
  background: var(--bg-glass);
}
.menu-toggle span {
  display: block; width: 18px; height: 2px;
  background: var(--text-primary); border-radius: 2px;
  transition: transform var(--dur) var(--ease-out), opacity var(--dur) var(--ease-out);
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (min-width: 1024px) { .menu-toggle { display: none; } }

/* Переключатель темы */
.theme-toggle {
  position: relative;
  width: 40px; height: 40px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border-subtle); background: var(--bg-glass);
  color: var(--text-secondary);
  transition: color var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out),
              background var(--dur) var(--ease-out);
}
.theme-toggle:hover { color: var(--text-primary); border-color: var(--border-strong); background: var(--bg-elevated); }
.theme-toggle svg {
  width: 18px; height: 18px; flex: 0 0 auto;
  stroke: currentColor;
  transition: transform var(--dur) var(--ease-out), opacity var(--dur) var(--ease-out);
}
/* Показываем иконку той темы, в которую переключимся */
.theme-toggle__sun  { display: none; }
[data-theme="dark"] .theme-toggle__sun  { display: block; }
[data-theme="dark"] .theme-toggle__moon { display: none; }

.mobile-menu {
  padding: 12px var(--container-px) 24px;
  display: flex; flex-direction: column; gap: 8px;
  background: var(--header-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border-subtle);
}
.mobile-menu[hidden] { display: none; }
@media (min-width: 1024px) {
  .mobile-menu, .mobile-menu[hidden] { display: none !important; }
}
.mobile-menu a {
  padding: 14px 12px; border-radius: 10px;
  font-weight: 500; color: var(--text-primary);
}
.mobile-menu a:hover { background: var(--bg-elevated); }
.mobile-menu a[aria-current="page"] { background: var(--bg-elevated); color: var(--accent-sec); }
.mobile-menu .btn { margin-top: 8px; }

/* =============== BUTTONS =============== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 600; font-size: 14px; line-height: 1;
  min-height: 44px;
  border: 1px solid transparent;
  white-space: nowrap; position: relative;
  transition: transform var(--dur) var(--ease-out), background var(--dur) var(--ease-out),
              box-shadow var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out),
              color var(--dur) var(--ease-out), opacity var(--dur) var(--ease-out);
}
.btn svg { width: 18px; height: 18px; flex: 0 0 auto; stroke: currentColor; }
.btn--lg svg { width: 20px; height: 20px; }
.btn--sm svg { width: 16px; height: 16px; }
.btn--lg { padding: 15px 26px; font-size: 15px; min-height: 52px; }
.btn--sm { padding: 8px 14px; font-size: 13px; min-height: 36px; }
.btn--block { width: 100%; }
.btn:disabled { opacity: .6; cursor: not-allowed; }

.btn--primary {
  color: var(--text-contrast);
  background: var(--gradient-ai);
  background-size: 200% 100%;
  background-position: 0% 50%;
  box-shadow: 0 8px 32px -8px rgba(124, 58, 237, .50), inset 0 1px 0 rgba(255, 255, 255, .15);
}
.btn--primary:hover {
  color: var(--text-contrast);
  transform: translateY(-1px);
  background-position: 100% 50%;
  box-shadow: 0 14px 40px -8px rgba(124, 58, 237, .60), inset 0 1px 0 rgba(255, 255, 255, .20);
}
.btn--primary:active { transform: translateY(0); }

.btn--ghost {
  color: var(--text-primary);
  background: var(--bg-glass);
  border-color: var(--border-subtle);
  backdrop-filter: blur(10px);
}
.btn--ghost:hover { background: var(--bg-elevated); border-color: var(--border-strong); }

.btn--danger {
  color: var(--danger);
  background: var(--danger-bg);
  border-color: var(--danger-border);
}
.btn--danger:hover { color: var(--text-contrast); background: var(--danger); border-color: var(--danger); }

.btn__spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .30); border-top-color: #FFF;
  animation: spin .8s linear infinite; display: none;
}
.btn.is-loading .btn__spinner { display: inline-block; }
.btn.is-loading .btn__label { opacity: .65; }
@keyframes spin { to { transform: rotate(360deg); } }

/* =============== TYPEWRITER =============== */
[data-typewriter] {
  display: inline-block;
  min-height: 1.1em;
  vertical-align: top;
}
@keyframes caretBlink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}
/* Каждая буква — отдельный span */
.tw-char {
  display: inline-block;
  will-change: transform, opacity, filter;
}

/* === Эффекты появления === */
@keyframes twEnterBlur {
  0%   { opacity: 0; transform: scale(.3); filter: blur(12px); }
  60%  { opacity: 1; transform: scale(1.08); filter: blur(1px); }
  100% { opacity: 1; transform: scale(1); filter: blur(0); }
}
@keyframes twEnterRise {
  0%   { opacity: 0; transform: translateY(30px) scale(.8); filter: blur(6px); }
  100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

/* === 1. Взрыв — буквы разлетаются с blur и scale === */
@keyframes fxExplode {
  0%   { transform: scale(1) translate(0,0); opacity: 1; filter: blur(0); }
  30%  { transform: scale(1.3) translate(0,0); opacity: .9; filter: blur(2px); }
  100% { transform: scale(.2) translate(var(--fx-x,0), var(--fx-y,0)); opacity: 0; filter: blur(16px); }
}
/* === 2. Осколки — буквы разлетаются в стороны с вращением === */
@keyframes fxShatter {
  0%   { transform: translate(0,0) rotate(0) scale(1); opacity: 1; filter: blur(0); }
  100% { transform: translate(var(--fx-x,0), var(--fx-y,0)) rotate(var(--fx-r,0deg)) scale(.3); opacity: 0; filter: blur(6px); }
}
/* === 3. Растворение — буквы исчезают по очереди === */
@keyframes fxDissolve {
  0%   { opacity: 1; filter: blur(0) saturate(1); transform: scale(1); }
  100% { opacity: 0; filter: blur(14px) saturate(0); transform: scale(1.1) translateY(-10px); }
}
/* === 4. Пикселизация — нарастающий blur + contrast === */
@keyframes fxPixelate {
  0%   { filter: blur(0) contrast(1); opacity: 1; transform: scale(1); }
  50%  { filter: blur(4px) contrast(4) brightness(1.8); opacity: .6; transform: scale(1.04); }
  100% { filter: blur(16px) contrast(0) brightness(.5); opacity: 0; transform: scale(1.1); }
}
/* === 5. Телепорт — вспышка + исчезновение по буквам === */
@keyframes fxTeleport {
  0%   { opacity: 1; filter: blur(0) brightness(1); transform: scale(1); text-shadow: none; }
  40%  { opacity: 1; filter: blur(0) brightness(4); transform: scale(1.15); text-shadow: 0 0 30px var(--accent-ai), 0 0 60px var(--accent-sec); }
  100% { opacity: 0; filter: blur(8px) brightness(3); transform: scale(.6); text-shadow: 0 0 50px var(--accent-ai); }
}
/* === 6. Волна — буквы уходят волной сверху вниз === */
@keyframes fxWave {
  0%   { transform: translateY(0) skewY(0); opacity: 1; filter: blur(0); }
  40%  { transform: translateY(-12px) skewY(-6deg); opacity: .8; filter: blur(1px); }
  100% { transform: translateY(40px) skewY(0); opacity: 0; filter: blur(10px); }
}
/* === 7. Втягивание — буквы засасываются в центр === */
@keyframes fxImplode {
  0%   { transform: scale(1) translate(0,0); opacity: 1; filter: blur(0); }
  100% { transform: scale(0) translate(var(--fx-cx,0), var(--fx-cy,0)); opacity: 0; filter: blur(8px); }
}
/* === 8. Сжигание — буквы выгорают снизу вверх === */
@keyframes fxBurn {
  0%   { opacity: 1; filter: blur(0) brightness(1) sepia(0) hue-rotate(0); transform: scale(1); color: inherit; }
  40%  { opacity: 1; filter: blur(1px) brightness(1.6) sepia(.9) hue-rotate(-15deg) contrast(1.5); transform: scale(1.04) translateY(-2px); }
  100% { opacity: 0; filter: blur(10px) brightness(2.5) sepia(1) hue-rotate(-45deg) contrast(.3); transform: scale(1.1) translateY(-15px); }
}
/* === 9. Скрамбл — буквы дрожат и исчезают === */
@keyframes fxScramble {
  0%   { opacity: 1; filter: blur(0); transform: translate(0,0) scale(1); }
  50%  { opacity: .7; filter: blur(2px) contrast(3) brightness(1.3); transform: translate(var(--fx-jx,0),0) scale(1.05); }
  100% { opacity: 0; filter: blur(12px) contrast(.2) brightness(.4); transform: translate(0,0) scale(.9); }
}

/* =============== BADGES =============== */
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 500;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-secondary);
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(8px);
  max-width: 100%;
  line-height: 1.3;
}
.badge svg,
.badge svg use {
  width: 14px !important;
  height: 14px !important;
  max-width: 14px;
  max-height: 14px;
  flex: 0 0 auto;
  stroke: currentColor;
  overflow: hidden;
}
.badge--sm { padding: 4px 9px; font-size: 10px; }
.badge--ai {
  color: var(--cat-ai-text);
  background: linear-gradient(135deg, rgba(124, 58, 237, .20), rgba(236, 72, 153, .20));
  border-color: var(--cat-ai-border);
}
.badge--ai .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--pink); box-shadow: 0 0 12px var(--pink);
  animation: pulse 2s ease-in-out infinite;
}
.badge--dev { color: var(--cat-dev-text); background: var(--cat-dev-bg); border-color: var(--cat-dev-border); }
.badge--ops { color: var(--cat-ops-text); background: var(--cat-ops-bg); border-color: var(--cat-ops-border); }
.badge--sec { color: var(--cat-sec-text); background: var(--cat-sec-bg); border-color: var(--cat-sec-border); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }

/* =============== CARDS =============== */
.card {
  position: relative;
  padding: 28px 26px 30px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex; flex-direction: column; gap: 12px;
  box-shadow: var(--shadow-float);
  transition: transform var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out),
              box-shadow var(--dur) var(--ease-out), background var(--dur) var(--ease-out);
}
[data-theme="dark"] .card { box-shadow: none; }
.card::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(600px circle at var(--mx, 50%) var(--my, 0%), var(--card-spotlight), transparent 40%);
  opacity: 0; pointer-events: none;
  transition: opacity var(--dur) var(--ease-out);
}
.card:hover {
  transform: translateY(-3px);
  border-color: var(--border-hover);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-card);
}
.card:hover::before { opacity: 1; }

.card__icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg-elevated); border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  transition: transform var(--dur) var(--ease-out), background var(--dur) var(--ease-out),
              color var(--dur) var(--ease-out);
}
.card__icon svg { width: 22px; height: 22px; stroke: currentColor; }
.card:hover .card__icon { transform: scale(1.05); }

.card--ai  .card__icon { color: var(--cat-ai-text);  background: var(--cat-ai-bg);  border-color: var(--cat-ai-border); }
.card--dev .card__icon { color: var(--cat-dev-text); background: var(--cat-dev-bg); border-color: var(--cat-dev-border); }
.card--ops .card__icon { color: var(--cat-ops-text); background: var(--cat-ops-bg); border-color: var(--cat-ops-border); }
.card--sec .card__icon { color: var(--cat-sec-text); background: var(--cat-sec-bg); border-color: var(--cat-sec-border); }

.card__title {
  font-size: 19px; font-weight: 600;
  color: var(--text-primary); letter-spacing: -.01em;
}
.card__text { font-size: 14.5px; color: var(--text-secondary); line-height: 1.6; }
.card__foot {
  margin-top: auto; padding-top: 8px;
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--accent-sec); font-weight: 500;
}
.card__foot svg { width: 16px; height: 16px; transition: transform var(--dur) var(--ease-out); }
.card:hover .card__foot svg { transform: translateX(3px); }

.card--ai::after, .card--dev::after, .card--ops::after, .card--sec::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  opacity: 0; transition: opacity var(--dur) var(--ease-out);
}
.card--ai::after  { background: linear-gradient(90deg, transparent, var(--accent-ai), transparent); }
.card--dev::after { background: linear-gradient(90deg, transparent, var(--accent-dev), transparent); }
.card--ops::after { background: linear-gradient(90deg, transparent, var(--accent-sec), transparent); }
.card--sec::after { background: linear-gradient(90deg, transparent, var(--accent-sec), transparent); }
.card:hover::after { opacity: 1; }

/* Сетки */
.grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 640px)  { .grid--2, .grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) {
  .grid--3 { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .grid--4 { grid-template-columns: repeat(4, 1fr); gap: 24px; }
}
@media (min-width: 768px) and (max-width: 1023px) { .grid--4 { grid-template-columns: repeat(2, 1fr); } }

/* =============== TAGS =============== */
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.tags li, .tag {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .04em;
  padding: 4px 9px; border-radius: 6px;
  background: var(--bg-glass); border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}
.tag svg, .tags svg { width: 14px; height: 14px; flex: 0 0 auto; }
.tag.is-current { color: var(--text-contrast); background: var(--gradient-ai); border-color: transparent; }
.tag.is-current .muted { color: color-mix(in oklab, var(--text-contrast) 72%, transparent); }

/* =============== FORMS =============== */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; color: var(--text-secondary); font-weight: 500; }
.field label .req { color: var(--accent-ai); }
.field input, .field textarea, .field select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-inset);
  color: var(--text-primary);
  font: inherit; font-size: 14px;
  resize: vertical;
  transition: border-color var(--dur), box-shadow var(--dur), background var(--dur);
}
.field input::placeholder, .field textarea::placeholder { color: var(--text-muted); }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: rgba(124, 58, 237, .60);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, .18);
}
.field--error input, .field--error textarea, .field--error select { border-color: var(--danger-border); }
.field__error { font-size: 12px; color: var(--danger); }
.field__hint  { font-size: 12px; color: var(--text-muted); }

.field--check { flex-direction: row; align-items: flex-start; gap: 10px; }
.field--check input { width: auto; margin-top: 3px; flex: 0 0 auto; accent-color: var(--purple); }
.field--check label { font-size: 12.5px; line-height: 1.5; color: var(--text-muted); }
.field--check a { color: var(--accent-sec); text-decoration: underline; text-underline-offset: 2px; }

/* =============== ALERTS =============== */
.alert {
  padding: 14px 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 14px;
}
.alert svg { width: 18px; height: 18px; flex: 0 0 auto; margin-top: 1px; }
.alert--success { color: var(--success); background: var(--success-bg); border-color: var(--success-border); }
.alert--error   { color: var(--danger);  background: var(--danger-bg);  border-color: var(--danger-border); }
.alert--warning { color: var(--warning); background: var(--warning-bg); border-color: var(--warning-bg); }

/* =============== MODAL =============== */
.modal {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.modal[hidden] { display: none; }
.modal__backdrop {
  position: absolute; inset: 0;
  background: var(--overlay-bg);
  backdrop-filter: blur(12px);
  animation: fadeIn .25s var(--ease-out);
}
.modal__panel {
  position: relative;
  width: 100%; max-width: 480px;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-modal);
  animation: modalIn .35s var(--ease-out);
  max-height: 90vh; overflow-y: auto;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn {
  from { opacity: 0; transform: translateY(24px) scale(.96); }
  to   { opacity: 1; transform: none; }
}
.modal__close {
  position: absolute; top: 16px; right: 16px;
  width: 36px; height: 36px; border-radius: 10px;
  border: 1px solid var(--border-subtle); background: var(--bg-glass);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
  transition: color var(--dur), background var(--dur), border-color var(--dur);
}
.modal__close:hover { color: var(--text-primary); background: var(--bg-elevated); border-color: var(--border-strong); }
.modal__body { display: flex; flex-direction: column; gap: 14px; }
.modal__lede { color: var(--text-secondary); font-size: 14px; }
.modal__hint { color: var(--text-muted); font-size: 12px; text-align: center; margin-top: 8px; }
.modal form { display: flex; flex-direction: column; gap: 14px; margin-top: 8px; }

.modal__success {
  text-align: center; padding: 16px 0;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.modal__success-icon {
  width: 64px; height: 64px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--success-bg); color: var(--success);
  border: 1px solid var(--success-border);
}
.modal__success-icon svg { width: 32px; height: 32px; }

/* =============== BREADCRUMBS =============== */
.breadcrumbs {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-muted);
  padding-block: 16px;
}
.breadcrumbs a:hover { color: var(--text-primary); }
.breadcrumbs svg { width: 14px; height: 14px; opacity: .5; }

/* =============== PAGINATION =============== */
.pagination { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 48px; }
.pagination a, .pagination span {
  min-width: 40px; height: 40px; padding-inline: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px; font-size: 14px;
  border: 1px solid var(--border-subtle); background: var(--bg-glass);
  color: var(--text-secondary);
  transition: color var(--dur), background var(--dur), border-color var(--dur);
}
.pagination a:hover { color: var(--text-primary); background: var(--bg-elevated); border-color: var(--border-strong); }
.pagination .is-current {
  color: var(--text-contrast); background: var(--gradient-ai); border-color: transparent;
}

/* =============== FOOTER =============== */
.footer {
  border-top: 1px solid var(--border-subtle);
  padding-block: 64px 32px;
  background: linear-gradient(180deg, transparent, var(--bg-glass));
}
.footer__grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px 24px;
  margin-bottom: 48px;
}
@media (min-width: 768px) { .footer__grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer__col--brand { grid-column: 1 / -1; }
@media (min-width: 768px) { .footer__col--brand { grid-column: auto; } }

.footer__text { color: var(--text-secondary); margin-top: 12px; max-width: 320px; font-size: 14px; }
.footer__social { display: flex; gap: 10px; margin-top: 16px; }
.footer__social a {
  width: 40px; height: 40px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border-subtle); background: var(--bg-glass);
  color: var(--text-secondary);
  transition: color var(--dur), border-color var(--dur), background var(--dur);
}
.footer__social a:hover { color: var(--text-primary); border-color: var(--border-hover); background: var(--bg-elevated); }
.footer__social svg { width: 18px; height: 18px; }

.footer__title {
  font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .08em;
  font-size: 12px; color: var(--text-muted); margin-bottom: 16px; font-weight: 500;
}
.footer__col ul {
  display: flex; flex-direction: column; gap: 10px;
  font-size: 14px; color: var(--text-secondary);
}
.footer__col ul a:hover { color: var(--text-primary); }
.footer__bottom {
  border-top: 1px solid var(--border-subtle);
  padding-top: 24px;
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between;
  color: var(--text-muted); font-size: 13px;
  align-items: center;
}
.footer__legal-links {
  display: inline-flex; flex-wrap: wrap; gap: 8px 16px;
}
.footer__legal-links a:hover { color: var(--text-primary); }

/* =============== COOKIE BAR =============== */
body > .cookie-bar,
.cookie-bar {
  position: fixed !important;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
  pointer-events: none;
}
.cookie-bar[hidden] { display: none !important; }
.cookie-bar__inner {
  pointer-events: auto;
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px;
  max-width: 720px;
  margin-inline: auto;
  padding: 16px 18px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-modal);
}
.cookie-bar__text {
  flex: 1 1 240px; margin: 0;
  font-size: 13.5px; line-height: 1.5; color: var(--text-secondary);
}
.cookie-bar__text a { color: var(--accent-sec); text-decoration: underline; text-underline-offset: 2px; }

/* =============== HERO =============== */
.hero {
  min-height: 100vh; min-height: 100dvh;
  padding-top: 120px; padding-bottom: 80px;
  display: flex; align-items: center;
  position: relative;
}
.hero--compact { min-height: 0; padding-top: 140px; padding-bottom: clamp(48px, 6vw, 80px); }

/* Spotlight-reveal: верхний слой открывается CSS-маской под курсором.
   Координаты приходят в --sx/--sy — маска дешевле перерисовки canvas. */
.hero--reveal { overflow: hidden; }
.hero__media { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.hero__layer {
  position: absolute; inset: 0;
  background-position: center; background-size: cover; background-repeat: no-repeat;
}
.hero__layer--base {
  background-image: var(--hero-image-base);
  animation: heroZoom 1.8s var(--ease-out) forwards;
}
.hero__layer--top {
  background-image: var(--hero-image-top);
  opacity: 0;
  transition: opacity .75s var(--ease-out);
  -webkit-mask-image: radial-gradient(circle var(--spot-r, 260px) at var(--sx, -999px) var(--sy, -999px),
    #000 0 40%, rgba(0,0,0,.75) 60%, rgba(0,0,0,.4) 75%, rgba(0,0,0,.12) 88%, transparent 100%);
  mask-image: radial-gradient(circle var(--spot-r, 260px) at var(--sx, -999px) var(--sy, -999px),
    #000 0 40%, rgba(0,0,0,.75) 60%, rgba(0,0,0,.4) 75%, rgba(0,0,0,.12) 88%, transparent 100%);
}
.hero--reveal.is-spot .hero__layer--top {
  opacity: 1;
  transition: opacity .18s var(--ease-out);
}
.hero__scrim { position: absolute; inset: 0; z-index: 1; background: var(--hero-scrim); pointer-events: none; }
.hero--reveal .hero__inner { position: relative; z-index: 2; }
@keyframes heroZoom { from { transform: scale(1.12); } to { transform: scale(1); } }

.hero__inner {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 22px;
}
.hero--compact .hero__inner { gap: 16px; }
.hero__badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.hero__badges .badge {
  text-transform: none; letter-spacing: 0; font-size: 13px; padding: 7px 14px;
  color: var(--text-secondary);
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, .04);
  font-family: var(--font-sans); font-weight: 500;
}
.hero__title {
  font-size: clamp(44px, 8vw, 92px);
  font-weight: 800; letter-spacing: -.035em; line-height: .98;
  color: var(--text-primary);
  max-width: 14ch; text-wrap: balance;
  text-shadow: 0 4px 40px rgba(10, 10, 11, .55);
}
[data-theme="light"] .hero__title,
[data-theme="light"] .hero__lede {
  text-shadow: none;
}
[data-theme="light"] .hero__meta-item svg {
  filter: none;
}

/* Light theme + тёмный камень: светлый текст на фактуре, без вуали */
[data-theme="light"] .hero--reveal .hero__title {
  color: #F8FAFC;
  text-shadow: 0 2px 18px rgba(10, 10, 11, .55), 0 1px 2px rgba(10, 10, 11, .35);
}
[data-theme="light"] .hero--reveal .hero__title .gradient-text {
  text-shadow: none;
  filter: none;
}
[data-theme="light"] .hero--reveal .hero__lede {
  color: rgba(248, 250, 252, .95);
  text-shadow:
    0 1px 1px rgba(10, 10, 11, .9),
    0 0 1px rgba(10, 10, 11, .75);
}
[data-theme="light"] .hero--reveal .hero__meta {
  color: rgba(248, 250, 252, .94);
  text-shadow:
    0 1px 1px rgba(10, 10, 11, .9),
    0 0 1px rgba(10, 10, 11, .75);
}
[data-theme="light"] .hero--reveal .hero__meta-item svg {
  color: #67E8F9;
  filter: drop-shadow(0 1px 1px rgba(10, 10, 11, .75));
}
[data-theme="light"] .hero--reveal .hero__badges .badge {
  color: var(--text-primary);
  background: rgba(255, 255, 255, .82);
  border-color: rgba(15, 23, 42, .12);
}
[data-theme="light"] .hero--reveal .btn--ghost {
  color: #F8FAFC;
  border-color: rgba(248, 250, 252, .45);
  background: rgba(10, 10, 11, .18);
}
[data-theme="light"] .hero--reveal .btn--ghost:hover {
  color: #fff;
  border-color: rgba(248, 250, 252, .7);
  background: rgba(10, 10, 11, .32);
}
[data-theme="light"] .hero--reveal .hero__scroll-line {
  background: linear-gradient(to bottom, transparent, rgba(248, 250, 252, .55));
}
.hero--compact .hero__title {
  font-size: clamp(28px, 4.2vw, 42px);
  max-width: min(100%, 40rem);
  letter-spacing: -.025em;
  line-height: 1.12;
  font-weight: 700;
  text-shadow: none;
  text-wrap: balance;
}
.hero--compact .hero__lede { max-width: 42rem; text-shadow: none; }
.hero--compact .hero__badges { justify-content: flex-start; }
.page-case .hero__inner,
.page-cases .hero__inner,
.page-services .hero__inner,
.page-service .hero__inner,
.page-about .hero__inner,
.page-contacts .hero__inner,
.page-legal .hero__inner {
  align-items: flex-start;
  text-align: left;
}
.page-legal .hero__title {
  max-width: min(100%, 46rem);
  font-size: clamp(26px, 3.6vw, 38px);
  line-height: 1.18;
  font-weight: 700;
}
.hero__lede {
  max-width: 640px; color: var(--text-secondary);
  font-size: clamp(16px, 1.8vw, 19px); line-height: 1.6;
  text-shadow: 0 2px 24px rgba(10, 10, 11, .85);
}
.hero__cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.hero__meta {
  margin-top: 12px;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 16px 32px;
  color: var(--text-secondary); font-size: 14px;
}
.hero__meta-item { display: inline-flex; align-items: center; gap: 10px; line-height: 1.3; }
.hero__meta-item svg {
  width: 18px; height: 18px; flex: 0 0 auto;
  color: var(--accent-sec); stroke: currentColor;
  filter: drop-shadow(0 0 8px rgba(34, 211, 238, .45));
}
.hero__title [data-typewriter],
.hero__title .gradient-text {
  display: inline-block;
  min-height: 1.05em;
  min-width: 4ch;
}
.hero__scroll {
  position: absolute; left: 50%; bottom: 28px; z-index: 2;
  transform: translateX(-50%);
  width: 20px; height: 36px;
  display: flex; justify-content: center;
}
.hero__scroll-line {
  width: 1px; height: 100%;
  background: linear-gradient(to bottom, transparent, var(--text-muted));
  animation: scrollPulse 1.8s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: .25; transform: scaleY(.6); transform-origin: top; }
  50% { opacity: .8; transform: scaleY(1); transform-origin: top; }
}

/* =============== STATS =============== */
.stats { padding-block: clamp(40px, 6vw, 72px); }
.stats__grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px;
  padding-block: 40px;
  border-block: 1px solid var(--border-subtle);
}
@media (min-width: 768px) { .stats__grid { grid-template-columns: repeat(4, 1fr); gap: 32px; } }
.stat { text-align: center; }
.stat__num {
  font-size: clamp(40px, 5vw, 60px);
  font-weight: 800; letter-spacing: -.03em; line-height: 1;
}
.stat__label { margin-top: 8px; color: var(--text-secondary); font-size: 14px; }

/* =============== PROCESS =============== */
.process { display: grid; grid-template-columns: 1fr; gap: 20px; position: relative; }
@media (min-width: 768px)  { .process { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .process { grid-template-columns: repeat(4, 1fr); gap: 24px; } }

.process__step {
  position: relative;
  padding: 28px 24px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  display: flex; flex-direction: column; gap: 12px;
  transition: border-color var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}
.process__step:hover { border-color: var(--border-hover); transform: translateY(-2px); }
.process__num { font-family: var(--font-mono); font-size: 13px; letter-spacing: .1em; color: var(--text-muted); }
.process__icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  color: var(--accent-sec);
}
.process__icon svg { width: 22px; height: 22px; stroke: currentColor; }

/* =============== CASES =============== */
.case {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-float);
  transition: transform var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out),
              box-shadow var(--dur) var(--ease-out);
}
[data-theme="dark"] .case { box-shadow: none; }
.case:hover { transform: translateY(-3px); border-color: var(--border-hover); box-shadow: var(--shadow-card); }

.case__cover {
  aspect-ratio: 16 / 10; position: relative;
  background: var(--bg-elevated); overflow: hidden;
}
.case__cover img { width: 100%; height: 100%; object-fit: cover; position: relative; z-index: 1; }
/* Плейсхолдер только если фото нет */
.case__cover:not(:has(img))::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, var(--case-spot-a), transparent 42%),
    radial-gradient(circle at 80% 70%, var(--case-spot-b), transparent 42%);
}
.case__cover--a:not(:has(img))::before { background-image: radial-gradient(circle at 30% 40%, var(--case-spot-a), transparent 45%), radial-gradient(circle at 75% 65%, rgba(99, 102, 241, .22), transparent 45%); }
.case__cover--b:not(:has(img))::before { background-image: radial-gradient(circle at 30% 50%, var(--case-spot-b), transparent 45%), radial-gradient(circle at 75% 40%, rgba(34, 211, 238, .20), transparent 45%); }
.case__cover--c:not(:has(img))::before { background-image: radial-gradient(circle at 25% 30%, rgba(236, 72, 153, .20), transparent 45%), radial-gradient(circle at 75% 70%, var(--case-spot-a), transparent 45%); }

.case__cover-tag {
  position: absolute; top: 14px; left: 14px; z-index: 2;
  padding: 6px 10px; border-radius: 999px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em;
  color: var(--text-primary); background: color-mix(in srgb, var(--bg-elevated) 82%, transparent);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(10px);
}
.case__body { padding: 24px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.case__client { font-size: 12.5px; color: var(--text-muted); }

/* Метрики кейса */
.metrics {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px;
  margin-top: 8px;
}
@media (min-width: 768px) {
  .metrics { grid-template-columns: repeat(4, 1fr); }
}
.metric {
  padding: 20px 18px; border-radius: var(--radius-md);
  background: var(--bg-glass); border: 1px solid var(--border-subtle);
  text-align: center;
}
.metric__value {
  font-size: clamp(24px, 3vw, 32px); font-weight: 800;
  letter-spacing: -.02em; line-height: 1;
  background: var(--gradient-ai);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.metric__label { margin-top: 8px; font-size: 12.5px; color: var(--text-secondary); line-height: 1.4; }

/* =============== ABOUT =============== */
.about { display: grid; grid-template-columns: 1fr; gap: 48px; align-items: center; }
@media (min-width: 1024px) { .about { grid-template-columns: 1.05fr 1fr; gap: 80px; } }

.about__text { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.about__lede { color: var(--text-secondary); font-size: 17px; line-height: 1.7; }
.about__badges { display: flex; flex-wrap: wrap; gap: 8px; }

.about__visual {
  position: relative; aspect-ratio: 1 / 1;
  max-width: 520px; width: 100%; margin-inline: auto;
}
.about__orb {
  position: absolute; inset: 20%; border-radius: 50%;
  background: conic-gradient(from 0deg, #7C3AED, #6366F1, #0891B2, #EC4899, #7C3AED);
  filter: blur(48px); opacity: var(--about-orb-opacity);
  animation: rotate 18s linear infinite;
}
@keyframes rotate { to { transform: rotate(360deg); } }

.about__card {
  position: absolute;
  left: var(--ax, 50%);
  top: var(--ay, 50%);
  padding: 10px 14px; border-radius: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(14px);
  display: flex; align-items: center; gap: 10px;
  color: var(--text-primary); font-size: 12px;
  box-shadow: var(--shadow-float);
  animation: bob 6s ease-in-out infinite;
  max-width: 178px;
  transform: translate(-50%, -50%);
  z-index: 1;
}
.about__card svg { width: 18px; height: 18px; flex: 0 0 auto; color: var(--accent-dev); }
.about__card strong { display: block; font-size: 13px; font-weight: 600; color: var(--text-primary); }
.about__card span { color: var(--text-secondary); font-size: 11px; }

/* 4 карточки (/about) — по сторонам */
.about__card--1  { --ax: 50%; --ay: 10%; animation-delay: 0s; }
.about__card--2  { --ax: 90%; --ay: 50%; animation-delay: .8s; }
.about__card--3  { --ax: 50%; --ay: 90%; animation-delay: 1.6s; }
.about__card--4  { --ax: 10%; --ay: 50%; animation-delay: 2.4s; }

/* 10 карточек (home) — ровное кольцо от 12 часов по часовой */
.about__visual:has(.about__card--10) .about__card--1  { --ax: 50%; --ay: 7%;  animation-delay: 0s; }
.about__visual:has(.about__card--10) .about__card--2  { --ax: 74%; --ay: 16%; animation-delay: .55s; }
.about__visual:has(.about__card--10) .about__card--3  { --ax: 90%; --ay: 36%; animation-delay: 1.1s; }
.about__visual:has(.about__card--10) .about__card--4  { --ax: 90%; --ay: 64%; animation-delay: 1.65s; }
.about__visual:has(.about__card--10) .about__card--5  { --ax: 74%; --ay: 84%; animation-delay: 2.2s; }
.about__visual:has(.about__card--10) .about__card--6  { --ax: 50%; --ay: 93%; animation-delay: 2.75s; }
.about__visual:has(.about__card--10) .about__card--7  { --ax: 26%; --ay: 84%; animation-delay: 3.3s; }
.about__visual:has(.about__card--10) .about__card--8  { --ax: 10%; --ay: 64%; animation-delay: 3.85s; }
.about__visual:has(.about__card--10) .about__card--9  { --ax: 10%; --ay: 36%; animation-delay: 4.4s; }
.about__visual:has(.about__card--10) .about__card--10 { --ax: 26%; --ay: 16%; animation-delay: 4.95s; }

@keyframes bob {
  0%, 100% { transform: translate(-50%, -50%) translateY(0); }
  50%      { transform: translate(-50%, -50%) translateY(-7px); }
}

/* =============== CTA =============== */
.cta {
  position: relative; overflow: hidden;
  border-radius: var(--radius-xl);
  padding: clamp(48px, 8vw, 96px) 24px;
  text-align: center;
  background:
    radial-gradient(ellipse at 20% 0%, var(--cta-spot-a), transparent 60%),
    radial-gradient(ellipse at 80% 100%, var(--cta-spot-b), transparent 60%),
    var(--bg-surface);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
}
.cta__glow {
  position: absolute; inset: -1px; border-radius: inherit; padding: 1px;
  background: conic-gradient(from 180deg, transparent 0deg, var(--cta-ring-a) 60deg, transparent 120deg, transparent 240deg, var(--cta-ring-b) 300deg, transparent 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: rotate 12s linear infinite;
  pointer-events: none;
}
.cta__inner {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 20px;
  max-width: 720px; margin-inline: auto;
}
.cta__lede { color: var(--text-secondary); font-size: 17px; line-height: 1.7; }
.cta__actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* =============== PROSE (контент страниц) =============== */
.prose { color: var(--text-secondary); font-size: 16px; line-height: 1.75; max-width: 75ch; }
.prose > * + * { margin-top: 1.1em; }
.case-detail__cover {
  width: 100%;
  max-width: 920px;
  margin: 8px 0 0;
  border-radius: var(--radius-lg, 16px);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
}
.case-detail__cover img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.case-detail__block { margin-bottom: 40px; }
.case-detail__block .h3 { margin-bottom: 14px; }
.case-detail__block .prose { margin-top: 0; }
.page-case .hero--compact { padding-bottom: clamp(32px, 5vw, 56px); }
.page-case .hero__title { max-width: 36rem; }
.prose h2 {
  font-size: clamp(24px, 3vw, 32px); font-weight: 700; letter-spacing: -.02em;
  color: var(--text-primary); margin-top: 1.8em; line-height: 1.2;
}
.prose h3 {
  font-size: clamp(19px, 2.2vw, 22px); font-weight: 600;
  color: var(--text-primary); margin-top: 1.5em;
}
.prose ul, .prose ol { padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.prose ul { list-style: none; padding-left: 0; }
.prose ul > li { position: relative; padding-left: 24px; }
.prose ul > li::before {
  content: ''; position: absolute; left: 6px; top: .65em;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--gradient-ai);
}
.prose ol { list-style: decimal; }
.prose ol > li::marker { color: var(--accent-sec); font-family: var(--font-mono); font-size: .9em; }
.prose a { color: var(--accent-sec); text-decoration: underline; text-underline-offset: 3px; }
.prose strong { color: var(--text-primary); font-weight: 600; }
.prose code {
  font-family: var(--font-mono); font-size: .88em;
  padding: 2px 6px; border-radius: 6px;
  background: var(--bg-elevated); border: 1px solid var(--border-subtle);
  color: var(--cat-dev-text);
}
.prose blockquote {
  padding: 16px 20px; border-left: 2px solid var(--purple);
  background: var(--bg-glass); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-secondary);
}
.prose table {
  width: 100%; border-collapse: collapse; font-size: 14px;
  display: block; overflow-x: auto;
}
.prose th, .prose td {
  text-align: left; padding: 10px 12px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: top;
}
.prose th { color: var(--text-primary); font-weight: 600; }

.legal { display: grid; gap: 32px; }
@media (min-width: 960px) {
  .legal { grid-template-columns: 220px 1fr; align-items: start; gap: 48px; }
}
.legal__toc {
  display: flex; flex-direction: column; gap: 8px;
  position: sticky; top: calc(var(--header-h) + 16px);
  font-size: 13px; line-height: 1.35;
}
.legal__toc a { color: var(--text-muted); }
.legal__toc a:hover { color: var(--text-primary); }
.legal-operator {
  padding: 16px 18px; border-radius: var(--radius-md);
  background: var(--bg-glass); border: 1px solid var(--border-subtle);
  margin: 1.1em 0;
}
.legal-operator p { margin: 0 0 .6em; }
.legal-operator ul {
  margin: 0; padding-left: 18px;
  display: flex; flex-direction: column; gap: 4px;
  list-style: disc;
}
.legal-operator ul > li { padding-left: 0; }
.legal-operator ul > li::before { display: none; content: none; }
.legal .prose, .page-legal .prose { max-width: none; }

/* =============== FEATURE LIST =============== */
.features { display: flex; flex-direction: column; gap: 12px; }
.features li { display: flex; align-items: flex-start; gap: 12px; color: var(--text-secondary); font-size: 15px; }
.features svg { width: 20px; height: 20px; flex: 0 0 auto; margin-top: 2px; color: var(--accent-sec); }

/* =============== STAGES (этапы услуги) =============== */
.stages { display: flex; flex-direction: column; gap: 0; counter-reset: stage; }
.stage {
  position: relative;
  padding: 0 0 32px 56px;
  counter-increment: stage;
}
.stage:last-child { padding-bottom: 0; }
.stage::before {
  content: counter(stage);
  position: absolute; left: 0; top: 0;
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 13px; font-weight: 600;
  color: var(--accent-sec);
  background: var(--bg-elevated); border: 1px solid var(--border-subtle);
}
.stage:not(:last-child)::after {
  content: ''; position: absolute; left: 18px; top: 40px; bottom: 4px;
  width: 1px; background: linear-gradient(180deg, var(--border-strong), transparent);
}
.stage__title { font-size: 17px; font-weight: 600; color: var(--text-primary); margin-bottom: 6px; }
.stage__desc { font-size: 14.5px; color: var(--text-secondary); line-height: 1.6; }

/* =============== FAQ =============== */
.faq { display: flex; flex-direction: column; gap: 12px; max-width: 820px; margin-inline: auto; }
.faq__item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--dur) var(--ease-out);
}
.faq__item[open] { border-color: var(--border-hover); }
.faq__q {
  padding: 18px 22px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  font-size: 16px; font-weight: 600; color: var(--text-primary);
  cursor: pointer; list-style: none;
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q:hover { background: var(--bg-glass); }
.faq__q svg {
  width: 20px; height: 20px; flex: 0 0 auto; color: var(--text-muted);
  transition: transform var(--dur) var(--ease-out);
}
.faq__item[open] .faq__q svg { transform: rotate(180deg); color: var(--accent-sec); }
.faq__a { padding: 0 22px 20px; color: var(--text-secondary); font-size: 15px; line-height: 1.7; }

/* =============== SPLIT (две колонки) =============== */
.split { display: grid; grid-template-columns: 1fr; gap: 40px; }
@media (min-width: 1024px) {
  .split { grid-template-columns: 1.4fr 1fr; gap: 64px; align-items: start; }
  .split__aside { position: sticky; top: calc(var(--header-h) + 24px); }
}

.panel {
  padding: 28px 26px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  display: flex; flex-direction: column; gap: 16px;
}
.panel__title { font-size: 18px; font-weight: 600; color: var(--text-primary); }
.panel__row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-block: 10px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 14px;
}
.panel__row:last-of-type { border-bottom: 0; }
.panel__row dt { color: var(--text-muted); }
.panel__row dd { color: var(--text-primary); font-weight: 500; text-align: right; }

/* =============== CONTACT LIST =============== */
.contact-list { display: flex; flex-direction: column; gap: 4px; }
.contact-list a, .contact-list div {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; border-radius: var(--radius-md);
  border: 1px solid transparent;
  transition: background var(--dur), border-color var(--dur);
}
.contact-list a:hover { background: var(--bg-glass); border-color: var(--border-subtle); }
.contact-list svg { width: 20px; height: 20px; color: var(--accent-sec); flex: 0 0 auto; }
.contact-list .label { display: block; font-size: 12px; color: var(--text-muted); }
.contact-list .value { display: block; font-size: 15px; color: var(--text-primary); font-weight: 500; }

/* =============== EMPTY STATE =============== */
.empty {
  padding: 64px 24px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  color: var(--text-muted);
}
.empty svg { width: 48px; height: 48px; opacity: .4; }

/* =============== ERROR PAGE =============== */
.error-page {
  min-height: 70vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 20px; padding-block: 120px 80px;
}
.error-page__code {
  font-family: var(--font-mono); font-size: clamp(72px, 14vw, 140px);
  font-weight: 700; line-height: 1; letter-spacing: -.04em;
  background: var(--gradient-ai);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

