/* ============================================================
   Anna tHaron — лендинг «Чат-боты под ключ»
   Единая таблица стилей. Палитра: небесно-голубой → тёмно-синий → фиолетовый.
   ============================================================ */

:root {
  --sky: #7cc4ff;
  --sky-bright: #a9dcff;
  --blue: #1b3a8f;
  --deep: #0a1030;
  --purple: #4b1d78;
  --violet: #7a4bd6;
  --violet-soft: #c8a6ff;
  --accent: #7fe0ff;

  --ink: #eef4ff;
  --muted: rgba(226, 236, 255, 0.72);
  --muted-2: rgba(226, 236, 255, 0.5);
  --line: rgba(160, 200, 255, 0.16);
  --glass: rgba(18, 30, 72, 0.42);
  --glass-strong: rgba(14, 22, 56, 0.72);

  --font-serif: "EB Garamond", Garamond, "Times New Roman", serif;
  --font-sans: "Jost", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius: 22px;
  --radius-sm: 14px;
  --container: 1200px;
  --header-h: 78px;

  --ease: cubic-bezier(0.22, 0.72, 0.2, 1);
}

/* ------------------------------------------------ Reset */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.12rem);
  line-height: 1.65;
  color: var(--ink);
  background: linear-gradient(158deg, #123a7a 0%, #0a1030 42%, #1c0a3d 74%, #2a0a4a 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

button { font: inherit; color: inherit; }

ul, ol { margin: 0; padding: 0; list-style: none; }

h1, h2, h3 { font-family: var(--font-serif); font-weight: 500; line-height: 1.08; margin: 0; letter-spacing: 0.01em; }

::selection { background: rgba(127, 224, 255, 0.35); color: #fff; }

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

/* ------------------------------------------------ Живой фон */
.bg {
  position: fixed;
  inset: 0;
  z-index: -3;
  overflow: hidden;
  pointer-events: none;
}

.bg-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.85;
  will-change: transform;
}

.bg-blob--1 {
  width: 46vw;
  height: 46vw;
  min-width: 320px;
  min-height: 320px;
  top: -12vw;
  left: -10vw;
  background: radial-gradient(circle at 35% 35%, rgba(124, 196, 255, 0.75), rgba(124, 196, 255, 0) 68%);
  animation: drift-1 26s var(--ease) infinite alternate;
}

.bg-blob--2 {
  width: 52vw;
  height: 52vw;
  min-width: 340px;
  min-height: 340px;
  bottom: -18vw;
  right: -12vw;
  background: radial-gradient(circle at 60% 40%, rgba(122, 75, 214, 0.7), rgba(122, 75, 214, 0) 68%);
  animation: drift-2 32s var(--ease) infinite alternate;
}

.bg-blob--3 {
  width: 38vw;
  height: 38vw;
  min-width: 260px;
  min-height: 260px;
  top: 38%;
  left: 46%;
  background: radial-gradient(circle at 50% 50%, rgba(200, 166, 255, 0.42), rgba(200, 166, 255, 0) 70%);
  animation: drift-3 30s var(--ease) infinite alternate;
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(160, 200, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(160, 200, 255, 0.06) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 0%, transparent 78%);
  mask-image: radial-gradient(ellipse at 50% 30%, #000 0%, transparent 78%);
}

@keyframes drift-1 {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(9vw, 7vh, 0) scale(1.18); }
}
@keyframes drift-2 {
  from { transform: translate3d(0, 0, 0) scale(1.1); }
  to { transform: translate3d(-8vw, -6vh, 0) scale(0.95); }
}
@keyframes drift-3 {
  from { transform: translate3d(-4vw, 3vh, 0) scale(1); }
  to { transform: translate3d(5vw, -5vh, 0) scale(1.25); }
}

.bg-particles {
  position: fixed;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.75;
}

.cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 420px;
  height: 420px;
  margin: -210px 0 0 -210px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(127, 224, 255, 0.14), rgba(122, 75, 214, 0.08) 45%, transparent 68%);
  pointer-events: none;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.5s ease;
  will-change: transform;
}

/* ------------------------------------------------ Layout helpers */
.section,
.hero,
.site-footer .footer-inner,
.header-inner {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.1rem, 4vw, 2.4rem);
}

.section {
  padding-block: clamp(4.5rem, 11vw, 8.5rem);
  scroll-margin-top: calc(var(--header-h) + 10px);
  position: relative;
}

.section-head {
  max-width: 720px;
  margin-bottom: clamp(2.4rem, 5vw, 3.6rem);
}

.eyebrow {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 0.82rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}
.eyebrow::before {
  content: "";
  width: 34px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.section-title {
  font-size: clamp(2.1rem, 1.4rem + 3.4vw, 3.6rem);
  color: #fff;
  text-wrap: balance;
}

.section-subtitle {
  margin: 1.1rem 0 0;
  color: var(--muted);
  max-width: 60ch;
}

.lead {
  font-size: clamp(1.1rem, 1rem + 0.6vw, 1.42rem);
  color: #fff;
  font-weight: 300;
  line-height: 1.5;
}

/* ------------------------------------------------ Buttons */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.92em 1.75em;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 0.98rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.35s var(--ease), box-shadow 0.45s var(--ease), background 0.4s ease, border-color 0.4s ease;
}

.btn > span { position: relative; z-index: 2; }

.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.55) 50%, transparent 70%);
  transform: translateX(-130%);
  transition: transform 0.85s var(--ease);
}
.btn:hover::after { transform: translateX(130%); }

.btn--primary {
  background: linear-gradient(120deg, var(--sky-bright) 0%, var(--sky) 40%, var(--violet-soft) 100%);
  color: #0a1230;
  box-shadow: 0 10px 30px -12px rgba(124, 196, 255, 0.7);
}
.btn--primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 46px -14px rgba(127, 224, 255, 0.85), 0 0 30px rgba(122, 75, 214, 0.5);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(180, 210, 255, 0.35);
  color: var(--ink);
  backdrop-filter: blur(8px);
}
.btn--ghost:hover {
  transform: translateY(-3px);
  border-color: var(--sky);
  background: rgba(124, 196, 255, 0.12);
  box-shadow: 0 0 26px rgba(124, 196, 255, 0.35);
}

.btn--glow { animation: btn-pulse 3.4s ease-in-out infinite; }
@keyframes btn-pulse {
  0%, 100% { box-shadow: 0 10px 30px -12px rgba(124, 196, 255, 0.65); }
  50% { box-shadow: 0 14px 42px -10px rgba(127, 224, 255, 0.9), 0 0 34px rgba(122, 75, 214, 0.55); }
}
.btn--glow:hover { animation-play-state: paused; }

/* ------------------------------------------------ Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  transition: box-shadow 0.5s ease, border-color 0.5s ease;
  border-bottom: 1px solid transparent;
}
/* Размываем фон отдельным псевдоэлементом: у самой шапки нет backdrop-filter,
   иначе он превращался бы в containing block для position: fixed мобильного меню,
   из-за чего меню «схлопывалось» в районе шапки при прокрутке. */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: transparent;
  backdrop-filter: none;
  transition: background 0.5s ease, backdrop-filter 0.5s ease;
}
.site-header.is-scrolled::before {
  background: rgba(9, 15, 42, 0.68);
  backdrop-filter: blur(16px) saturate(140%);
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 12px 40px -24px rgba(0, 0, 0, 0.9);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.brand { display: inline-flex; align-items: center; gap: 0.75rem; margin-right: auto; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #0a1230;
  background: linear-gradient(135deg, var(--sky-bright), var(--violet-soft));
  box-shadow: 0 8px 24px -10px rgba(127, 224, 255, 0.8);
  overflow: hidden;
}
.brand-mark img { width: 100%; height: 100%; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-family: var(--font-serif); font-size: 1.2rem; font-weight: 600; letter-spacing: 0.02em; color: #fff; }
.brand-text small { font-size: 0.72rem; letter-spacing: 0.06em; color: var(--muted-2); }

.nav { display: flex; align-items: center; gap: 0.4rem; }
.nav-link {
  position: relative;
  padding: 0.5rem 0.95rem;
  font-size: 0.95rem;
  color: var(--muted);
  border-radius: 999px;
  transition: color 0.35s ease;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0.95rem;
  right: 0.95rem;
  bottom: 0.3rem;
  height: 1px;
  background: linear-gradient(90deg, var(--sky), var(--violet-soft));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}
.nav-link:hover,
.nav-link.is-active { color: #fff; }
.nav-link:hover::after,
.nav-link.is-active::after { transform: scaleX(1); }

.header-cta { padding: 0.7em 1.4em; font-size: 0.92rem; }

.nav-toggle {
  display: none;
  position: relative;
  z-index: 2;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 46px;
  height: 46px;
  padding: 0 11px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 13px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 0.4s var(--ease), opacity 0.3s ease;
}
.nav-toggle.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-active span:nth-child(2) { opacity: 0; }
.nav-toggle.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ------------------------------------------------ Hero */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: calc(var(--header-h) + 3rem);
  padding-bottom: 4rem;
}

.hero-inner { position: relative; z-index: 2; max-width: 760px; }

.hero-title {
  display: flex;
  flex-direction: column;
  font-size: clamp(3rem, 1.5rem + 11vw, 8rem);
  font-weight: 500;
  line-height: 0.96;
  color: #fff;
  margin: 0.3rem 0 0;
}
.hero-title .accent {
  background: linear-gradient(110deg, var(--sky-bright), var(--violet-soft) 55%, var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 34px rgba(127, 224, 255, 0.35));
}

.hero-subtitle {
  margin: 1.7rem 0 0;
  max-width: 56ch;
  font-size: clamp(1.05rem, 0.98rem + 0.5vw, 1.3rem);
  color: var(--muted);
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.3rem; }

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.4rem, 4vw, 3.2rem);
  margin-top: 3.2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}
.stat { display: flex; flex-direction: column; }
.stat-value {
  font-family: var(--font-serif);
  font-size: clamp(1.9rem, 1.3rem + 2vw, 2.8rem);
  line-height: 1;
  color: #fff;
}
.stat-label { margin-top: 0.4rem; font-size: 0.85rem; color: var(--muted-2); letter-spacing: 0.02em; }

.hero-orb {
  position: absolute;
  top: 50%;
  right: clamp(-6rem, -2vw, 2rem);
  transform: translateY(-50%);
  width: clamp(320px, 38vw, 560px);
  height: clamp(320px, 38vw, 560px);
  pointer-events: none;
  z-index: 1;
}
.orb-core {
  --cube: clamp(150px, 17vw, 250px);
  --half: calc(var(--cube) / 2);
  position: absolute;
  inset: 0;
  animation: float-y 7s ease-in-out infinite;
  perspective: 1200px;
  will-change: transform;
  transition: filter 0.6s var(--ease);
}
.hero-orb.is-dark .orb-core { filter: brightness(0.6) saturate(0.8); }
@keyframes cube-flash {
  0% { filter: brightness(2.05) saturate(1.18); }
  100% { filter: brightness(1) saturate(1); }
}
.hero-orb.is-flash .orb-core {
  animation: float-y 7s ease-in-out infinite, cube-flash 0.85s var(--ease);
}
.hero-orb.is-flash .cube-glow { opacity: 1; }
.cube-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: calc(var(--cube) * 2.3);
  height: calc(var(--cube) * 2.3);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 196, 255, 0.4), rgba(122, 75, 214, 0.32) 46%, transparent 72%);
  filter: blur(34px);
  z-index: -1;
  pointer-events: none;
  transition: opacity 0.6s var(--ease);
}
.hero-orb.is-dark .cube-glow { opacity: 0.28; }
.cube-shadow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: calc(var(--cube) * 1.8);
  height: calc(var(--cube) * 0.52);
  transform: translate(-50%, calc(var(--cube) * 0.82)) scale(1);
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.82), rgba(1, 4, 16, 0.58) 32%, rgba(3, 7, 24, 0.28) 56%, transparent 80%);
  filter: blur(18px);
  z-index: -2;
  pointer-events: none;
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.cube-shadow::before {
  content: "";
  position: absolute;
  inset: -70% -32%;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(2, 5, 20, 0.5), transparent 66%);
  filter: blur(32px);
}
.hero-orb.is-dark .cube-shadow { opacity: 0.95; transform: translate(-50%, calc(var(--cube) * 0.82)) scale(0.9); }
.cube {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--cube);
  height: var(--cube);
  margin: calc(var(--cube) / -2);
  transform-style: preserve-3d;
  transform: rotateX(-14deg) rotateY(-14deg);
  animation: cube-spin 26s linear infinite;
  will-change: transform;
  pointer-events: auto;
  cursor: pointer;
}
.cube:hover { animation-play-state: paused; }
.cube-face {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border: 1px solid rgba(170, 216, 255, 0.55);
  background: rgba(9, 15, 42, 0.22);
  box-shadow:
    inset 0 0 22px rgba(124, 196, 255, 0.5),
    inset 0 0 6px rgba(200, 230, 255, 0.55),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    0 0 20px rgba(124, 196, 255, 0.3),
    0 0 44px rgba(122, 75, 214, 0.24);
  transition: box-shadow 0.55s var(--ease), border-color 0.55s var(--ease);
}
.cube-face img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 1;
}
.cube-face::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(150deg, rgba(124, 196, 255, 0.4), transparent 46%, rgba(122, 75, 214, 0.5));
  mix-blend-mode: screen;
}
.cube:hover .cube-face {
  border-color: rgba(215, 238, 255, 0.95);
  box-shadow:
    inset 0 0 34px rgba(124, 196, 255, 0.85),
    inset 0 0 11px rgba(222, 242, 255, 0.95),
    inset 0 0 0 1px rgba(255, 255, 255, 0.16),
    0 0 42px rgba(124, 196, 255, 0.72),
    0 0 84px rgba(122, 75, 214, 0.55);
}
.cube-face--0 { transform: rotateY(0deg) translateZ(var(--half)); }
.cube-face--1 { transform: rotateY(90deg) translateZ(var(--half)); }
.cube-face--2 { transform: rotateY(180deg) translateZ(var(--half)); }
.cube-face--3 { transform: rotateY(-90deg) translateZ(var(--half)); }
.cube-face--4 { transform: rotateX(90deg) translateZ(var(--half)); }
.cube-face--5 { transform: rotateX(-90deg) translateZ(var(--half)); }

/* Пробная «бабочка» на CSS Motion Path (грань 0) */
.cube-face--0 { overflow: visible; }
.butterfly-stage {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 300px;
  height: 300px;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.butterfly-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 30px;
  height: 30px;
  margin: -15px 0 0 -15px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(190, 230, 255, 0.95), rgba(124, 196, 255, 0.6) 42%, rgba(122, 75, 214, 0.35) 66%, transparent 80%);
  filter: blur(6px);
  offset-path: path("M 150 150 C 112 100, 54 62, -6 84 C -66 106, -116 168, -62 208");
  offset-rotate: auto;
  opacity: 0;
  pointer-events: none;
}
.butterfly-glow--far {
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  filter: blur(10px);
  background: radial-gradient(circle, rgba(200, 170, 255, 0.85), rgba(122, 75, 214, 0.5) 48%, transparent 78%);
}
.butterfly {
  position: absolute;
  top: 0;
  left: 0;
  width: 8px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(180deg, #e4f3ff, #7cc4ff 46%, #7a4bd6);
  box-shadow: 0 0 14px rgba(160, 214, 255, 1);
  filter: drop-shadow(0 0 6px rgba(190, 228, 255, 1)) drop-shadow(0 0 16px rgba(124, 196, 255, 0.95)) drop-shadow(0 0 30px rgba(122, 75, 214, 0.85));
  offset-path: path("M 150 150 C 112 100, 54 62, -6 84 C -66 106, -116 168, -62 208");
  offset-rotate: auto;
  opacity: 0;
  pointer-events: none;
}
.butterfly::before,
.butterfly::after {
  content: "";
  position: absolute;
  top: 1px;
  width: 16px;
  height: 18px;
  background: radial-gradient(circle at 32% 30%, #eaf6ff, #7cc4ff 55%, #7a4bd6);
  box-shadow: 0 0 10px rgba(160, 214, 255, 0.95), 0 0 20px rgba(122, 75, 214, 0.7);
  animation: butterfly-wing 0.16s ease-in-out infinite alternate;
}
.butterfly::before {
  right: 100%;
  transform-origin: right center;
  border-radius: 38% 62% 40% 60% / 62% 62% 38% 38%;
}
.butterfly::after {
  left: 100%;
  transform-origin: left center;
  border-radius: 62% 38% 60% 40% / 62% 62% 38% 38%;
}
.cube-face--0:hover .butterfly {
  animation: butterfly-fly 3s var(--ease) forwards;
}
.cube-face--0:hover .butterfly-glow--near {
  animation: butterfly-trail 3s var(--ease) forwards;
  animation-delay: 0.08s;
}
.cube-face--0:hover .butterfly-glow--far {
  animation: butterfly-trail-far 3s var(--ease) forwards;
  animation-delay: 0.16s;
}
@keyframes butterfly-fly {
  0% { offset-distance: 0%; opacity: 0; transform: scale(0.5); }
  10% { opacity: 1; }
  72% { opacity: 1; }
  100% { offset-distance: 100%; opacity: 0; transform: scale(1.9); }
}
@keyframes butterfly-trail {
  0% { offset-distance: 0%; opacity: 0; transform: scale(0.4); }
  12% { opacity: 0.85; }
  70% { opacity: 0.6; }
  100% { offset-distance: 100%; opacity: 0; transform: scale(1.7); }
}
@keyframes butterfly-trail-far {
  0% { offset-distance: 0%; opacity: 0; transform: scale(0.35); }
  14% { opacity: 0.6; }
  70% { opacity: 0.42; }
  100% { offset-distance: 100%; opacity: 0; transform: scale(1.5); }
}
@keyframes butterfly-wing {
  from { transform: scaleX(1); }
  to { transform: scaleX(0.3); }
}
.orb-ring {
  position: absolute;
  inset: 6%;
  border-radius: 50%;
  border: 1px solid rgba(160, 210, 255, 0.32);
  transform: rotate(18deg) scaleY(0.5);
  animation: orbit-a 26s linear infinite;
}
.orb-ring--2 {
  inset: 0%;
  border-color: rgba(200, 166, 255, 0.28);
  transform: rotate(-30deg) scaleY(0.42);
  animation: orbit-b 34s linear infinite;
}
@keyframes cube-spin {
  0% { transform: rotateX(0deg) rotateY(0deg); }
  50% { transform: rotateX(180deg) rotateY(180deg); }
  100% { transform: rotateX(360deg) rotateY(360deg); }
}
@keyframes orbit-a {
  from { transform: rotate(18deg) scaleY(0.5); }
  to { transform: rotate(378deg) scaleY(0.5); }
}
@keyframes orbit-b {
  from { transform: rotate(-30deg) scaleY(0.42); }
  to { transform: rotate(-390deg) scaleY(0.42); }
}
@keyframes float-y { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-16px); } }
@media (prefers-reduced-motion: reduce) {
  .orb-ring, .orb-ring--2, .cube, .butterfly, .butterfly-glow, .butterfly::before, .butterfly::after { animation: none; }
}

/* ------------------------------------------------ About */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 5vw, 4.4rem);
  align-items: start;
}

.about-photo-wrap { position: relative; max-width: 400px; }
.about-photo-stack { position: relative; }
.about-photo {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 30px 70px -34px rgba(0, 0, 0, 0.9);
  transform: perspective(1000px) rotateY(4deg);
  transition: transform 0.7s var(--ease), box-shadow 0.7s var(--ease);
}
.about-photo-wrap:hover .about-photo {
  transform: perspective(1000px) rotateY(0deg) translateY(-6px);
  box-shadow: 0 40px 90px -34px rgba(122, 75, 214, 0.7);
}
.about-photo img { width: 400px; height: 499px; max-width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.about-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(200deg, rgba(124, 196, 255, 0.18), transparent 45%, rgba(122, 75, 214, 0.28));
  mix-blend-mode: screen;
}
.about-photo-glow {
  position: absolute;
  inset: auto -6% -8% 12%;
  height: 40%;
  background: radial-gradient(ellipse at 50% 50%, rgba(122, 75, 214, 0.6), transparent 70%);
  filter: blur(40px);
  z-index: -1;
}
.about-badge {
  position: absolute;
  left: -0.6rem;
  bottom: 1.6rem;
  padding: 0.5rem 1rem;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  border-radius: 999px;
  background: rgba(9, 15, 42, 0.72);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
  box-shadow: 0 12px 30px -16px rgba(0, 0, 0, 0.9);
}

.about-body p { color: var(--muted); margin: 0 0 1.15rem; }
.about-body .lead { color: #fff; margin-bottom: 1.4rem; }

.about-highlights {
  display: grid;
  gap: 0.7rem;
  margin-top: 1.8rem;
}
.about-highlights li {
  position: relative;
  padding-left: 1.9rem;
  color: var(--ink);
}
.about-highlights li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sky-bright), var(--violet-soft));
  box-shadow: 0 0 14px rgba(127, 224, 255, 0.7);
}

.about-skills-label {
  margin-top: 2rem;
  margin-bottom: 0.85rem;
  font-size: 0.78rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.about-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

/* ------------------------------------------------ Services */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.1rem, 2.4vw, 1.7rem);
}

.service-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(1.6rem, 3vw, 2.3rem);
  border-radius: var(--radius);
  background: var(--glass);
  border: 1px solid var(--line);
  backdrop-filter: blur(12px);
  overflow: hidden;
  transition: transform 0.55s var(--ease), border-color 0.55s ease, box-shadow 0.55s ease, background 0.55s ease;
}
.service-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(124, 196, 255, 0.16), transparent 60%);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}
.service-card:hover {
  transform: translateY(-8px);
  border-color: rgba(160, 210, 255, 0.5);
  box-shadow: 0 30px 60px -32px rgba(122, 75, 214, 0.9);
  background: rgba(24, 38, 86, 0.55);
}
.service-card:hover::before { opacity: 1; }

.service-tag {
  position: absolute;
  top: 1.3rem;
  right: 1.3rem;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--violet-soft);
  padding: 0.3rem 0.65rem;
  border: 1px solid rgba(200, 166, 255, 0.35);
  border-radius: 999px;
}
.service-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-bottom: 1.3rem;
  border-radius: 16px;
  color: var(--accent);
  background: linear-gradient(145deg, rgba(124, 196, 255, 0.18), rgba(122, 75, 214, 0.18));
  border: 1px solid rgba(160, 210, 255, 0.28);
  transition: transform 0.6s var(--ease), box-shadow 0.6s var(--ease);
}
.service-icon svg { width: 27px; height: 27px; }
.service-card:hover .service-icon {
  transform: rotate(-8deg) scale(1.08);
  box-shadow: 0 0 26px rgba(127, 224, 255, 0.5);
}

.service-title { font-size: clamp(1.4rem, 1.2rem + 0.8vw, 1.75rem); color: #fff; margin-bottom: 0.7rem; }
.service-text { color: var(--muted); font-size: 0.98rem; margin: 0 0 1.2rem; }

.service-points { display: grid; gap: 0.5rem; margin-bottom: 1.5rem; }
.service-points li { position: relative; padding-left: 1.5rem; font-size: 0.92rem; color: var(--ink); }
.service-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}
.service-choose {
  display: inline-flex;
  justify-content: center;
  width: 100%;
  margin-top: auto;
  padding: 0.75em 1.6em;
  font-size: 0.95rem;
}

/* ------------------------------------------------ Process */
.process-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: clamp(1rem, 2vw, 1.6rem);
  counter-reset: step;
}
.process-step {
  position: relative;
  padding: 1.7rem 1.4rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(14, 22, 56, 0.35);
  transition: transform 0.5s var(--ease), border-color 0.5s ease, background 0.5s ease;
}
.process-step:hover {
  transform: translateY(-6px);
  border-color: rgba(160, 210, 255, 0.45);
  background: rgba(24, 38, 86, 0.5);
}
.process-num {
  font-family: var(--font-serif);
  font-size: 2.4rem;
  line-height: 1;
  background: linear-gradient(135deg, var(--sky-bright), var(--violet-soft));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.process-step h3 { font-size: 1.28rem; color: #fff; margin: 0.6rem 0 0.45rem; }
.process-step p { margin: 0; font-size: 0.92rem; color: var(--muted); }

/* ------------------------------------------------ FAQ */
.faq-list { display: grid; gap: 0.9rem; max-width: 920px; }

.faq-heading { margin: 0; }
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.15rem 1.35rem;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-serif);
  font-size: clamp(1.1rem, 1rem + 0.5vw, 1.35rem);
  color: #fff;
  background: transparent;
  border: 0;
  transition: color 0.35s ease, text-shadow 0.35s ease;
}
.faq-question:hover { color: var(--sky-bright); text-shadow: 0 0 22px rgba(127, 224, 255, 0.55); }
.faq-q-text { line-height: 1.3; }

.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(14, 22, 56, 0.35);
  backdrop-filter: blur(8px);
  overflow: hidden;
  transition: border-color 0.45s ease, background 0.45s ease, box-shadow 0.45s ease;
}
.faq-item:hover { border-color: rgba(160, 210, 255, 0.42); background: rgba(24, 38, 86, 0.5); }
.faq-item.is-open {
  border-color: rgba(160, 210, 255, 0.5);
  background: rgba(24, 38, 86, 0.55);
  box-shadow: 0 24px 50px -34px rgba(122, 75, 214, 0.9);
}

.faq-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--accent);
  background: rgba(124, 196, 255, 0.12);
  border: 1px solid rgba(160, 210, 255, 0.3);
  transition: transform 0.5s var(--ease), background 0.4s ease, box-shadow 0.4s ease;
}
.faq-icon svg { width: 16px; height: 16px; }
.faq-item.is-open .faq-icon {
  transform: rotate(135deg);
  background: rgba(122, 75, 214, 0.35);
  box-shadow: 0 0 20px rgba(127, 224, 255, 0.45);
}

.faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  visibility: hidden;
  transition: grid-template-rows 0.5s var(--ease), visibility 0s linear 0.5s;
}
.faq-item.is-open .faq-answer {
  grid-template-rows: 1fr;
  visibility: visible;
  transition: grid-template-rows 0.5s var(--ease), visibility 0s;
}
.faq-answer-inner { overflow: hidden; }
.faq-answer p {
  margin: 0;
  padding: 0 1.35rem 1.35rem calc(1.35rem + 34px + 1rem);
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.75;
}

/* ------------------------------------------------ Portfolio */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: clamp(1rem, 2.2vw, 1.6rem);
}

.project-cell { position: relative; }

.project-open {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #0a1230;
  background: rgba(240, 250, 255, 0.92);
  box-shadow: 0 10px 26px -10px rgba(10, 16, 48, 0.8);
  backdrop-filter: blur(6px);
  transition: transform 0.45s var(--ease), box-shadow 0.45s ease, background 0.45s ease;
}
.project-open svg { width: 20px; height: 20px; }
.project-open:hover {
  transform: translateY(-2px) scale(1.06);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(127, 224, 255, 0.35), 0 14px 30px -10px rgba(127, 224, 255, 0.7);
}
.project-open:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(127, 224, 255, 0.6);
}

.project-card {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: var(--radius);
}

.project-media {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 24px 50px -30px rgba(0, 0, 0, 0.95);
  transition: transform 0.6s var(--ease), box-shadow 0.6s var(--ease), border-color 0.6s ease;
}
.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.1s var(--ease), filter 0.6s ease;
  filter: saturate(1.02);
}
.project-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 16, 48, 0.05) 0%, rgba(10, 16, 48, 0.35) 55%, rgba(10, 16, 48, 0.92) 100%);
  transition: opacity 0.55s ease, background 0.55s ease;
}
.project-card:hover .project-media {
  transform: translateY(-8px);
  border-color: rgba(160, 210, 255, 0.55);
  box-shadow: 0 40px 80px -34px rgba(122, 75, 214, 0.95), 0 0 0 1px rgba(160, 210, 255, 0.18);
}
.project-card:hover .project-media img { transform: scale(1.09); }

.project-cta {
  position: absolute;
  left: 1.1rem;
  bottom: 1.1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.05rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 500;
  color: #0a1230;
  background: linear-gradient(120deg, var(--sky-bright), var(--violet-soft));
  box-shadow: 0 12px 30px -12px rgba(127, 224, 255, 0.8);
  transform: translateY(14px);
  opacity: 0;
  transition: transform 0.55s var(--ease), opacity 0.55s ease;
}
.project-cta svg { width: 17px; height: 17px; }
.project-card:hover .project-cta,
.project-card:focus-visible .project-cta { transform: translateY(0); opacity: 1; }

.project-info { display: block; padding: 1rem 0.3rem 0; }
.project-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.65rem; }
.project-title {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.35rem;
  color: #fff;
  line-height: 1.2;
  transition: color 0.4s ease;
}
.project-card:hover .project-title { color: var(--sky-bright); }
.project-tagline { display: block; margin-top: 0.35rem; font-size: 0.9rem; color: var(--muted-2); }

/* CTA-полоса после портфолио */
.cta-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.4rem;
  margin-top: clamp(2.4rem, 5vw, 3.4rem);
  padding: clamp(1.6rem, 3.4vw, 2.6rem);
  border-radius: var(--radius);
  background: linear-gradient(120deg, rgba(124, 196, 255, 0.14), rgba(122, 75, 214, 0.18));
  border: 1px solid rgba(160, 210, 255, 0.3);
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(360px circle at 15% 50%, rgba(127, 224, 255, 0.18), transparent 65%);
  opacity: 0;
  transition: opacity 0.6s ease;
}
.cta-band:hover::before { opacity: 1; }
.cta-band-body { position: relative; z-index: 1; }
.cta-band h3 { font-size: clamp(1.6rem, 1.3rem + 1.4vw, 2.2rem); color: #fff; }
.cta-band p { margin: 0.5rem 0 0; max-width: 52ch; color: var(--muted); }
.cta-band .btn { position: relative; z-index: 1; flex: none; }

/* ------------------------------------------------ Chips */
.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.32rem 0.72rem;
  font-size: 0.82rem;
  color: var(--ink);
  border-radius: 999px;
  background: rgba(124, 196, 255, 0.1);
  border: 1px solid rgba(160, 210, 255, 0.22);
  transition: background 0.35s ease, border-color 0.35s ease, transform 0.35s ease;
}
.chip:hover { background: rgba(124, 196, 255, 0.2); border-color: var(--sky); transform: translateY(-2px); }
.chip--mini { font-size: 0.7rem; padding: 0.24rem 0.6rem; color: var(--violet-soft); background: rgba(122, 75, 214, 0.14); border-color: rgba(200, 166, 255, 0.28); }
.chip-list { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }

/* ------------------------------------------------ Contacts */
.contacts-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: clamp(1.4rem, 3vw, 2.4rem);
  align-items: start;
}

.contact-panel {
  padding: clamp(1.4rem, 3vw, 2.2rem);
  border-radius: var(--radius);
  background: var(--glass);
  border: 1px solid var(--line);
  backdrop-filter: blur(12px);
  display: grid;
  gap: 1rem;
}

.contact-method {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.2rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(9, 15, 42, 0.35);
  transition: transform 0.4s var(--ease), border-color 0.4s ease, background 0.4s ease, box-shadow 0.4s ease;
}
.contact-method:hover {
  transform: translateX(5px);
  border-color: var(--sky);
  background: rgba(124, 196, 255, 0.1);
  box-shadow: 0 0 26px -6px rgba(124, 196, 255, 0.5);
}
.contact-method-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: 13px;
  color: var(--accent);
  background: rgba(124, 196, 255, 0.12);
  border: 1px solid rgba(160, 210, 255, 0.25);
}
.contact-method-icon svg { width: 23px; height: 23px; }
.contact-method-body { display: flex; flex-direction: column; }
.contact-method-body small { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted-2); }
.contact-method-body strong { font-weight: 400; color: #fff; font-size: 1.02rem; }

.contact-form { display: grid; gap: 1rem; margin-top: 0.6rem; }
.field { display: grid; gap: 0.45rem; }
.field label { font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted-2); }
.field input,
.field textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--ink);
  background: rgba(9, 15, 42, 0.5);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color 0.35s ease, box-shadow 0.35s ease, background 0.35s ease;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input::placeholder,
.field textarea::placeholder { color: rgba(200, 216, 255, 0.35); }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--sky);
  background: rgba(12, 20, 52, 0.7);
  box-shadow: 0 0 0 3px rgba(124, 196, 255, 0.18), 0 0 26px -8px rgba(124, 196, 255, 0.6);
}

.select-wrap { position: relative; }
.select-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding: 0.85rem 1rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  background: rgba(9, 15, 42, 0.5);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  backdrop-filter: blur(8px);
  transition: border-color 0.35s ease, box-shadow 0.35s ease, background 0.35s ease;
}
.select-control:hover { border-color: rgba(160, 210, 255, 0.45); }
.select-wrap.is-open .select-control,
.select-control:focus-visible {
  outline: none;
  border-color: var(--sky);
  background: rgba(12, 20, 52, 0.7);
  box-shadow: 0 0 0 3px rgba(124, 196, 255, 0.18), 0 0 26px -8px rgba(124, 196, 255, 0.6);
}
.select-arrow {
  flex: none;
  color: #a6d6ff;
  transition: transform 0.35s var(--ease);
  pointer-events: none;
}
.select-wrap.is-open .select-arrow { transform: rotate(180deg); }
.select-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  right: 0;
  z-index: 40;
  display: grid;
  padding: 0.45rem;
  margin: 0;
  list-style: none;
  border-radius: var(--radius-sm);
  background: rgba(10, 16, 48, 0.94);
  border: 1px solid rgba(160, 210, 255, 0.28);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.9), 0 0 30px rgba(122, 75, 214, 0.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.3s ease, transform 0.35s var(--ease), visibility 0.3s;
}
.select-wrap.is-open .select-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.select-menu li {
  padding: 0.6rem 0.85rem;
  border-radius: calc(var(--radius-sm) - 3px);
  font-size: 0.95rem;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease;
}
.select-menu li:hover { background: rgba(124, 196, 255, 0.12); color: #fff; }
.select-menu li.is-selected { color: var(--accent); background: rgba(122, 75, 214, 0.18); }
.form-submit { justify-self: start; }
.form-status { min-height: 1.2em; margin: 0; font-size: 0.92rem; color: var(--accent); transition: color 0.3s ease; }
.form-status.is-error { color: #ff9db1; }
.form-status.is-success { color: #8ff0c6; }

.contacts-aside h3 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: #fff;
  margin-bottom: 1.1rem;
}
.links-list { display: grid; gap: 0.6rem; }
.links-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(14, 22, 56, 0.35);
  color: var(--muted);
  transition: transform 0.4s var(--ease), color 0.4s ease, border-color 0.4s ease, background 0.4s ease;
}
.links-list a svg { width: 18px; height: 18px; flex: none; transition: transform 0.4s var(--ease); }
.links-list a:hover {
  color: #fff;
  transform: translateY(-3px);
  border-color: var(--violet-soft);
  background: rgba(122, 75, 214, 0.12);
}
.links-list a:hover svg { transform: translate(3px, -3px); }

/* ------------------------------------------------ Footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(7, 11, 32, 0.5);
  backdrop-filter: blur(10px);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.4rem;
  padding-block: 2rem 1.4rem;
}
.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.4rem;
  width: 100%;
}
.brand--footer .brand-mark { width: 42px; height: 42px; border-radius: 7px; font-size: 1.05rem; }
.brand--footer .brand-text small { max-width: 46ch; }

.footer-taglines { display: flex; flex-direction: column; gap: 0.05rem; margin-top: 0.15rem; }
.footer-taglines span:first-child { color: var(--muted); }
.footer-taglines span:last-child { color: var(--muted-2); }

.footer-nav { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.footer-nav a {
  padding: 0.4rem 0.8rem;
  font-size: 0.9rem;
  color: var(--muted);
  border-radius: 999px;
  transition: color 0.35s ease, background 0.35s ease;
}
.footer-nav a:hover { color: #fff; background: rgba(124, 196, 255, 0.12); }

.footer-contacts { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.footer-contacts a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.95rem;
  font-size: 0.88rem;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(14, 22, 56, 0.4);
  transition: color 0.35s ease, border-color 0.35s ease, background 0.35s ease, box-shadow 0.35s ease, transform 0.35s var(--ease);
}
.footer-contacts a svg { width: 16px; height: 16px; flex: none; }
.footer-contacts a:hover {
  color: #fff;
  border-color: var(--sky);
  background: rgba(124, 196, 255, 0.12);
  box-shadow: 0 0 22px -6px rgba(124, 196, 255, 0.55);
  transform: translateY(-2px);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  width: 100%;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
}
.footer-copy { margin: 0; font-size: 0.86rem; color: var(--muted-2); }
.made-with { margin: 0; font-size: 0.88rem; color: var(--muted-2); }
.made-with .heart { display: inline-block; animation: heartbeat 1.7s ease-in-out infinite; }
@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  25% { transform: scale(1.22); }
  40% { transform: scale(0.96); }
  60% { transform: scale(1.14); }
}

/* Плавающая кнопка «Заказать проект» */
.floating-cta {
  position: fixed;
  z-index: 54;
  right: 1.4rem;
  bottom: 1.4rem;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85em 1.4em;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 0.96rem;
  font-weight: 500;
  color: #0a1230;
  background: linear-gradient(120deg, var(--sky-bright), var(--violet-soft));
  box-shadow: 0 14px 40px -12px rgba(127, 224, 255, 0.8);
  opacity: 0;
  visibility: hidden;
  transform: translateY(18px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease), visibility 0.5s, box-shadow 0.4s ease;
}
.floating-cta svg { width: 17px; height: 17px; }
.floating-cta.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.floating-cta:hover { box-shadow: 0 18px 52px -12px rgba(127, 224, 255, 0.95), 0 0 30px rgba(122, 75, 214, 0.55); transform: translateY(-3px); }
@media (max-width: 640px) {
  .floating-cta {
    left: 0.8rem;
    right: 0.8rem;
    bottom: 0.8rem;
    justify-content: center;
  }
}

/* ------------------------------------------------ Modal */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: clamp(0.6rem, 3vw, 2rem); }
.modal[hidden] { display: none; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 7, 22, 0.72);
  backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.modal-dialog {
  position: relative;
  width: min(920px, 100%);
  max-height: min(90vh, 920px);
  overflow: hidden auto;
  border-radius: var(--radius);
  background: linear-gradient(170deg, rgba(22, 36, 84, 0.96), rgba(14, 10, 40, 0.98));
  border: 1px solid rgba(160, 210, 255, 0.25);
  box-shadow: 0 50px 120px -40px rgba(0, 0, 0, 1), 0 0 80px -30px rgba(122, 75, 214, 0.7);
  opacity: 0;
  transform: translateY(30px) scale(0.97);
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
  scrollbar-width: thin;
  scrollbar-color: rgba(160, 210, 255, 0.4) transparent;
}
.modal-dialog::-webkit-scrollbar { width: 8px; }
.modal-dialog::-webkit-scrollbar-thumb { background: rgba(160, 210, 255, 0.35); border-radius: 8px; }

.modal.is-open .modal-backdrop { opacity: 1; }
.modal.is-open .modal-dialog { opacity: 1; transform: translateY(0) scale(1); }

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(9, 15, 42, 0.6);
  backdrop-filter: blur(8px);
  cursor: pointer;
  transition: background 0.35s ease, transform 0.35s ease, border-color 0.35s ease;
}
.modal-close svg { width: 20px; height: 20px; }
.modal-close:hover { background: rgba(122, 75, 214, 0.55); border-color: var(--sky); transform: rotate(90deg); }

.modal-hero { position: relative; }
.modal-hero img { width: 100%; height: clamp(200px, 30vw, 300px); object-fit: cover; }
.modal-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(14, 10, 40, 0.1) 0%, rgba(14, 10, 40, 0.55) 55%, rgba(14, 10, 40, 0.98) 100%);
}
.modal-hero-text {
  position: absolute;
  left: clamp(1.2rem, 4vw, 2.4rem);
  right: clamp(1.2rem, 4vw, 2.4rem);
  bottom: clamp(1rem, 3vw, 1.6rem);
  z-index: 2;
}
.modal-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.7rem; }
.modal-hero-text h2 { font-size: clamp(1.6rem, 1.2rem + 2vw, 2.5rem); color: #fff; }
.modal-hero-text p { margin: 0.4rem 0 0; color: var(--muted); }

.modal-body {
  padding: clamp(1.4rem, 4vw, 2.6rem);
  display: grid;
  gap: clamp(1.4rem, 3vw, 2rem);
}
.modal-section {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(0.9rem, 2.5vw, 1.6rem);
  padding-bottom: clamp(1.4rem, 3vw, 2rem);
  border-bottom: 1px solid var(--line);
}
.modal-section:last-child { border-bottom: none; padding-bottom: 0; }
.modal-num {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.2rem);
  line-height: 1;
  background: linear-gradient(135deg, var(--sky-bright), var(--violet-soft));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.modal-section h3 {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: clamp(1.05rem, 1rem + 0.4vw, 1.25rem);
  color: #fff;
  margin-bottom: 0.7rem;
  letter-spacing: 0.01em;
}
.modal-section p { margin: 0; color: var(--muted); }

.modal-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  padding: clamp(1.2rem, 3vw, 1.8rem) clamp(1.4rem, 4vw, 2.6rem);
  background: linear-gradient(120deg, rgba(124, 196, 255, 0.12), rgba(122, 75, 214, 0.16));
  border-top: 1px solid var(--line);
}
.modal-cta h3 { font-size: clamp(1.35rem, 1.2rem + 1vw, 1.8rem); color: #fff; }
.modal-cta p { margin: 0.4rem 0 0; color: var(--muted); font-size: 0.95rem; }
.modal-cta .btn { flex: none; }

body.modal-open { overflow: hidden; }

/* ------------------------------------------------ Reveal animation */
[data-reveal] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: calc(var(--rd, 0) * 90ms);
}
[data-reveal].is-visible { opacity: 1; transform: none; }

/* ------------------------------------------------ Responsive */
@media (max-width: 1024px) {
  .about-grid { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); }
  /* Куб при уменьшении экрана опускается вниз по центру и остаётся видимым */
  .hero { flex-direction: column; align-items: stretch; }
  .hero-inner { width: min(760px, 100%); }
  .hero-orb {
    position: relative;
    top: auto;
    right: auto;
    transform: none;
    width: clamp(260px, 46vw, 400px);
    height: clamp(260px, 46vw, 400px);
    margin: 3.2rem auto 0;
    opacity: 1;
    z-index: 1;
  }
}

@media (max-width: 880px) {
  :root { --header-h: 70px; }

  .nav {
    position: fixed;
    inset: 0;
    z-index: 1;
    flex-direction: column;
    justify-content: center;
    gap: 0.4rem;
    padding: 2rem;
    background: linear-gradient(160deg, rgba(10, 16, 48, 0.97), rgba(30, 10, 58, 0.97));
    backdrop-filter: blur(20px);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.55s var(--ease), opacity 0.45s ease, visibility 0.45s;
  }
  .nav.is-open { transform: translateY(0); opacity: 1; visibility: visible; }
  .nav-link {
    font-family: var(--font-serif);
    font-size: clamp(1.8rem, 8vw, 2.6rem);
    padding: 0.5rem 1rem;
  }
  .nav-link::after { left: 1rem; right: 1rem; bottom: 0.2rem; }

  .header-cta { display: none; }
  .nav-toggle { display: flex; }

  .about-grid { grid-template-columns: 1fr; }
  .about-photo-wrap { max-width: 400px; }
  .about-photo { transform: none; }

  .contacts-grid { grid-template-columns: 1fr; }

  .hero { min-height: auto; padding-top: calc(var(--header-h) + 4.5rem); padding-bottom: 5rem; }

  .projects-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .hero-stats { gap: 1.5rem 2rem; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .modal-section { grid-template-columns: 1fr; }
  .modal-num { font-size: 1.5rem; }
  .cards-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
}

/* ------------------------------------------------ Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .cursor-glow, .bg-particles { display: none; }
}
