:root {
  --bg-dark: #050407;
  --bg-deep: #0b0710;
  --bg-panel: rgba(18, 15, 24, 0.72);
  --text-main: #faf7ff;
  --text-soft: rgba(250, 247, 255, 0.82);
  --text-muted: rgba(250, 247, 255, 0.64);
  --accent: #9d55ff;
  --accent-2: #ff5ecb;
  --accent-3: #f5c77e;
  --accent-soft: rgba(157, 85, 255, 0.18);
  --glass-border: rgba(255, 255, 255, 0.13);
  --glass-bg: rgba(8, 6, 12, 0.72);
  --shadow: 0 30px 95px rgba(0, 0, 0, 0.42);
  --radius-xl: 38px;
  --radius-lg: 30px;
  --radius-md: 22px;
  --header-h: 78px;
  --page-pad: clamp(16px, 3.4vw, 58px);
  --font-sans: "Inter", "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  --font-display: Georgia, "Times New Roman", serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  background: var(--bg-dark);
}

body {
  min-width: 320px;
  width: 100%;
  background:
    radial-gradient(circle at 14% 12%, rgba(157, 85, 255, 0.26), transparent 34vw),
    radial-gradient(circle at 84% 8%, rgba(255, 94, 203, 0.17), transparent 30vw),
    radial-gradient(circle at 72% 78%, rgba(245, 199, 126, 0.10), transparent 32vw),
    linear-gradient(180deg, #050407 0%, #09070d 52%, #050407 100%);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.62;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.menu-open {
  overflow: hidden;
}

a {
  color: inherit;
}

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

::selection {
  color: #fff;
  background: rgba(157, 85, 255, 0.62);
}

.noise-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.026;
  background-image: url('data:image/svg+xml,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="n"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.75" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23n)"/%3E%3C/svg%3E');
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  z-index: 10001;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent-3));
  box-shadow: 0 0 22px rgba(157, 85, 255, 0.95);
}

.glass-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  min-height: var(--header-h);
  padding: 14px var(--page-pad);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: clamp(14px, 3vw, 36px);
  background: linear-gradient(180deg, rgba(5, 4, 7, 0.92), rgba(5, 4, 7, 0.58));
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border-bottom: 1px solid var(--glass-border);
  z-index: 1000;
  transition: min-height 0.25s ease, background 0.25s ease, box-shadow 0.25s ease, padding 0.25s ease;
}

.glass-header.scrolled {
  min-height: 64px;
  padding-top: 10px;
  padding-bottom: 10px;
  background: rgba(5, 4, 7, 0.91);
  box-shadow: 0 16px 55px rgba(0, 0, 0, 0.44);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
  color: var(--text-main);
  text-decoration: none;
}

.logo-mark {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  object-fit: contain;
  filter: drop-shadow(0 0 18px rgba(157, 85, 255, 0.55));
  transition: transform 0.25s ease, filter 0.25s ease;
}

.logo:hover .logo-mark,
.logo:focus-visible .logo-mark {
  transform: rotate(-3deg) scale(1.04);
  filter: drop-shadow(0 0 26px rgba(255, 94, 203, 0.62));
}

.logo-text {
  display: inline-flex;
  align-items: center;
  font-weight: 950;
  letter-spacing: 0.18em;
  font-size: clamp(0.86rem, 1vw, 1.06rem);
  line-height: 1;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.085);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
}

.nav-links a,
.dropdown-toggle {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.105em;
  transition: color 0.22s ease, transform 0.22s ease, background 0.22s ease;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  padding: 10px 14px;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.dropdown-toggle:hover,
.dropdown-toggle:focus-visible {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.075);
  transform: translateY(-1px);
  outline: none;
}

.dropdown {
  position: relative;
}

.dropdown-content {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  min-width: 220px;
  padding: 10px;
  display: grid;
  gap: 4px;
  background: rgba(8, 6, 12, 0.94);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -8px);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

.dropdown:hover .dropdown-content,
.dropdown:focus-within .dropdown-content,
.dropdown.open .dropdown-content {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.dropdown-content a {
  display: block;
  padding: 13px 14px;
  border-radius: 14px;
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 0.95rem;
  font-weight: 700;
}

.dropdown-content a:hover,
.dropdown-content a:focus-visible {
  background: var(--accent-soft);
  color: #fff;
}

.menu-btn {
  display: none;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.055);
  cursor: pointer;
}

.menu-btn span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 3px 0;
  background: #fff;
  border-radius: 10px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.menu-btn.active span:first-child {
  transform: translateY(5px) rotate(45deg);
}

.menu-btn.active span:last-child {
  transform: translateY(-5px) rotate(-45deg);
}

main {
  position: relative;
  width: 100%;
}

section {
  position: relative;
  width: 100%;
  isolation: isolate;
  scroll-margin-top: calc(var(--header-h) + 10px);
}

.hero-section {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 54px) var(--page-pad) 74px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-size: cover;
  background-position: center;
  opacity: 0.60;
  transform: scale(1.02);
}

.hero-section::after,
.video-container::after,
.carousel-slide::after,
.gallery-item::after,
.image-panel::after,
.project-tile::after,
.card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.hero-section::after {
  background:
    radial-gradient(circle at 20% 46%, rgba(157, 85, 255, 0.26), transparent 34%),
    linear-gradient(90deg, rgba(5, 4, 7, 0.94) 0%, rgba(5, 4, 7, 0.60) 42%, rgba(5, 4, 7, 0.18) 100%),
    linear-gradient(180deg, rgba(5, 4, 7, 0.12), #050407 100%);
}

.hero-content {
  width: min(930px, 100%);
  position: relative;
  z-index: 2;
}

.subtitle {
  display: block;
  margin-bottom: 1rem;
  color: #dbc0ff;
  font-size: clamp(0.7rem, 0.9vw, 0.82rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.20em;
}

.chapter-num {
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  margin-bottom: clamp(12px, 2vw, 20px);
  font-size: clamp(0.72rem, 0.9vw, 0.84rem);
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  background: linear-gradient(100deg, #caa7ff 0%, #9d55ff 28%, #ff5ecb 54%, #b980ff 78%, #caa7ff 100%);
  background-size: 260% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: purpleTitleFlow 5.5s ease-in-out infinite;
  text-shadow: 0 0 28px rgba(157, 85, 255, 0.20);
}

@keyframes purpleTitleFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.main-title,
.section-title,
.carousel-caption h2,
.gallery-caption,
.metric-value,
.step-num,
.footer-brand strong,
.tile-title {
  font-family: var(--font-display);
}

.main-title {
  max-width: 14ch;
  font-size: clamp(3.55rem, 10.5vw, 9.2rem);
  font-weight: 700;
  line-height: 0.88;
  margin-bottom: 1.35rem;
  letter-spacing: -0.055em;
  background: linear-gradient(115deg, #fff 0%, #f4e8ff 38%, #cba7ff 58%, #ff75d3 82%, #ffd493 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-wrap: balance;
}

.sub-title {
  max-width: 820px;
  margin-bottom: 1.35rem;
  font-size: clamp(1.34rem, 2.85vw, 2.55rem);
  font-weight: 500;
  line-height: 1.14;
  text-wrap: balance;
  color: var(--text-soft);
}

.description,
.section-desc {
  max-width: 760px;
  color: var(--text-muted);
  font-size: clamp(1rem, 1.25vw, 1.14rem);
}

.description {
  margin-bottom: 2rem;
}

.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 2.2rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0.42rem 1rem;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.058);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.cta-buttons,
.cta-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0.95rem 1.55rem;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.btn-primary {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 18px 46px rgba(157, 85, 255, 0.28);
}

.btn-outline {
  color: #fff;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.055);
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-3px);
  outline: none;
  box-shadow: 0 20px 54px rgba(157, 85, 255, 0.32);
}

.video-section {
  min-height: 96svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(76px, 8vw, 128px) var(--page-pad);
}

.video-container {
  position: relative;
  width: 100%;
  min-height: min(74svh, 780px);
  overflow: hidden;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  background: #09070d;
  box-shadow: var(--shadow);
}

.video-container::after,
.carousel-slide::after {
  background:
    radial-gradient(circle at 18% 50%, rgba(157, 85, 255, 0.22), transparent 34%),
    linear-gradient(90deg, rgba(5, 4, 7, 0.86) 0%, rgba(5, 4, 7, 0.45) 50%, rgba(5, 4, 7, 0.12) 100%);
}

.bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.70;
}

.video-overlay {
  position: absolute;
  left: clamp(18px, 5vw, 76px);
  right: clamp(18px, 5vw, 76px);
  bottom: clamp(18px, 5vw, 76px);
  max-width: 820px;
  padding: clamp(20px, 4vw, 44px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  background: rgba(8, 6, 12, 0.64);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}


.content-section,
.carousel-section,
.gallery-section,
.projects-section,
.metrics-section,
.video-section {
  content-visibility: auto;
  contain-intrinsic-size: 720px;
}

.hero-section,
.page-hero {
  content-visibility: visible;
}

.metrics-section {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 24px);
  padding: clamp(68px, 8vw, 116px) var(--page-pad);
  background: linear-gradient(180deg, rgba(157, 85, 255, 0.08), rgba(255, 255, 255, 0.015));
}

.metric-card,
.feature-card,
.genre-card,
.step,
.carousel-caption,
.detail-card,
.info-box,
.footer-card,
.footer-cta {
  border: 1px solid var(--glass-border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.078), rgba(255, 255, 255, 0.035));
  box-shadow: 0 22px 74px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.metric-card {
  min-height: 220px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: clamp(26px, 4vw, 52px);
  border-radius: var(--radius-lg);
}

.metric-value {
  display: block;
  font-size: clamp(2.8rem, 6vw, 5.6rem);
  font-weight: 700;
  line-height: 1;
  color: #fff;
}

.metric-label {
  display: block;
  max-width: 250px;
  margin: 1rem auto 0;
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.fullscreen-section,
.content-section {
  min-height: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(84px, 9vw, 140px) var(--page-pad);
}

.content-section.full-height {
  min-height: 100svh;
}

.section-header {
  width: min(1040px, 100%);
  margin-bottom: clamp(34px, 5vw, 68px);
}

.text-center {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.section-title {
  font-size: clamp(2.25rem, 5.4vw, 5.15rem);
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 0.96;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.section-desc {
  margin-top: 1.15rem;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.96fr) minmax(360px, 1.04fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  width: 100%;
}

.split-layout.reverse {
  grid-template-columns: minmax(360px, 1.04fr) minmax(0, 0.96fr);
}

.split-layout.reverse .split-copy {
  order: 2;
}

.split-layout.reverse .image-panel {
  order: 1;
}

.split-copy {
  min-width: 0;
}

.image-panel {
  position: relative;
  overflow: hidden;
  min-height: clamp(420px, 56vw, 720px);
  border-radius: var(--radius-xl);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
  background: #09070d;
}

.image-panel img {
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
  opacity: 0.92;
}

.image-panel::after {
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(5,4,7,0.02), rgba(5,4,7,0.40) 70%, rgba(5,4,7,0.80)),
    radial-gradient(circle at 25% 30%, rgba(157,85,255,0.22), transparent 36%);
}

.image-badge {
  position: absolute;
  left: clamp(18px, 3vw, 34px);
  bottom: clamp(18px, 3vw, 34px);
  z-index: 3;
  width: min(420px, calc(100% - 36px));
  padding: 18px 20px;
  border: 1px solid var(--glass-border);
  border-radius: 22px;
  background: rgba(8, 6, 12, 0.66);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.image-badge strong {
  display: block;
  margin-bottom: 4px;
  font-size: 1.04rem;
}

.image-badge span {
  display: block;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.grid-features,
.grid-genres,
.steps-grid,
.details-grid,
.project-grid {
  display: grid;
  gap: clamp(16px, 2vw, 28px);
  width: 100%;
}

.grid-features,
.steps-grid,
.details-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-genres,
.project-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.feature-card,
.genre-card,
.step,
.detail-card,
.info-box {
  min-height: 230px;
  padding: clamp(24px, 3vw, 38px);
  border-radius: var(--radius-md);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.feature-card:hover,
.genre-card:hover,
.step:hover,
.detail-card:hover,
.info-box:hover {
  transform: translateY(-6px);
  border-color: rgba(157, 85, 255, 0.48);
  background: linear-gradient(180deg, rgba(157, 85, 255, 0.16), rgba(255, 255, 255, 0.045));
}

.feature-card h4,
.genre-card h4,
.step h4,
.detail-card h4,
.info-box h4 {
  margin-bottom: 0.85rem;
  font-size: clamp(1.08rem, 1.55vw, 1.32rem);
  line-height: 1.15;
}

.feature-card p,
.genre-card p,
.step p,
.detail-card p,
.info-box p {
  color: var(--text-muted);
}

.info-box {
  min-height: 0;
  margin-top: clamp(28px, 4vw, 46px);
}

.info-box ul {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  list-style: none;
  color: var(--text-muted);
}

.info-box li::before {
  content: "✦";
  margin-right: 10px;
  color: #d8baff;
}

.carousel-section,
.gallery-section,
.projects-section {
  min-height: auto;
  display: flex;
  align-items: center;
  padding: clamp(84px, 9vw, 140px) var(--page-pad);
}

.carousel-container,
.gallery-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  background: rgba(255, 255, 255, 0.04);
}

.carousel-container {
  min-height: min(76svh, 790px);
}

.carousel-track,
.gallery-track {
  display: flex;
  height: 100%;
  transition: transform 0.55s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
}

.gallery-track {
  transition-duration: 0.34s;
}

.carousel-slide,
.gallery-item {
  position: relative;
  z-index: 1;
  flex: 0 0 100%;
  min-height: min(76svh, 790px);
  display: flex;
  align-items: flex-end;
  padding: clamp(18px, 5vw, 72px);
  background-size: cover;
  background-position: center;
}

.carousel-caption {
  width: min(620px, 100%);
  padding: clamp(20px, 4vw, 42px);
  border-radius: var(--radius-md);
  background: rgba(8, 6, 12, 0.64);
}

.carousel-caption h2 {
  margin: 0.8rem 0 0.55rem;
  font-size: clamp(2rem, 4.2vw, 4.5rem);
  font-weight: 700;
  line-height: 0.96;
  letter-spacing: -0.036em;
  text-wrap: balance;
}

.carousel-caption p {
  color: var(--text-muted);
}

.carousel-btn {
  position: absolute;
  top: 50%;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  transform: translateY(-50%);
  color: #fff;
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  background: rgba(8, 6, 12, 0.64);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: pointer;
  z-index: 5;
  transition: background 0.25s ease, transform 0.25s ease;
}

.carousel-btn:hover,
.carousel-btn:focus-visible {
  background: var(--accent);
  transform: translateY(-50%) scale(1.05);
  outline: none;
}

.prev-btn { left: clamp(12px, 2vw, 28px); }
.next-btn { right: clamp(12px, 2vw, 28px); }

.projects-section {
  flex-direction: column;
  align-items: stretch;
  gap: clamp(28px, 5vw, 58px);
}

.project-tile {
  position: relative;
  min-height: clamp(300px, 36vw, 520px);
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
  background-size: cover;
  background-position: center;
  box-shadow: 0 26px 80px rgba(0,0,0,0.24);
  text-decoration: none;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.project-tile::after {
  z-index: 1;
  background: linear-gradient(180deg, rgba(5,4,7,0.02), rgba(5,4,7,0.34) 48%, rgba(5,4,7,0.90) 100%);
}

.project-tile:hover,
.project-tile:focus-visible {
  transform: translateY(-8px);
  border-color: rgba(255, 255, 255, 0.24);
  outline: none;
}

.tile-content {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  z-index: 2;
}

.tile-title {
  display: block;
  margin-top: 10px;
  font-size: clamp(1.8rem, 3.6vw, 3.8rem);
  font-weight: 700;
  line-height: 0.96;
}

.tile-content p {
  max-width: 420px;
  margin-top: 12px;
  color: var(--text-muted);
}

.gallery-section {
  flex-direction: column;
  justify-content: center;
  gap: clamp(28px, 5vw, 58px);
}

.gallery-container {
  min-height: min(66svh, 690px);
}

.gallery-item {
  min-height: min(66svh, 690px);
}

.gallery-item::after {
  z-index: 1;
  background: linear-gradient(180deg, rgba(5, 4, 7, 0.02), rgba(5, 4, 7, 0.18) 44%, rgba(5, 4, 7, 0.88) 100%);
}

.gallery-caption {
  position: relative;
  z-index: 2;
  width: 100%;
  font-size: clamp(1.65rem, 3vw, 3rem);
  font-weight: 700;
  line-height: 1.02;
}

.card-media {
  position: relative;
  z-index: 1;
  overflow: hidden;
  height: 190px;
  margin: calc(clamp(24px, 3vw, 38px) * -1) calc(clamp(24px, 3vw, 38px) * -1) 24px;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-media::after {
  z-index: 2;
  background: linear-gradient(180deg, rgba(5,4,7,0.02), rgba(5,4,7,0.54));
}

.step-num {
  display: block;
  margin-bottom: 1.2rem;
  font-size: clamp(2.5rem, 5vw, 4.7rem);
  font-weight: 700;
  line-height: 0.86;
  color: #d8baff;
}

.cta-footer {
  margin-top: clamp(28px, 5vw, 60px);
}

.site-footer {
  width: 100%;
  padding: clamp(58px, 8vw, 96px) var(--page-pad) 30px;
  border-top: 1px solid var(--glass-border);
  background:
    radial-gradient(circle at 18% 24%, rgba(157, 85, 255, 0.18), transparent 32vw),
    linear-gradient(180deg, rgba(8, 6, 12, 0.76), rgba(5, 4, 7, 0.96));
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1.25fr) repeat(4, minmax(170px, 0.78fr));
  gap: clamp(18px, 3vw, 34px);
  width: 100%;
  margin-bottom: 34px;
}

.footer-card,
.footer-cta {
  border-radius: var(--radius-md);
  padding: clamp(22px, 2.6vw, 34px);
}


.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  color: #fff;
  text-decoration: none;
}

.footer-logo img {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  filter: drop-shadow(0 0 22px rgba(157, 85, 255, 0.52));
}

.footer-logo span {
  font-size: clamp(1.7rem, 2.4vw, 2.8rem);
  font-weight: 950;
  line-height: 0.92;
  letter-spacing: 0.08em;
}

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

.social-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.social-links a {
  min-height: 48px;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: 16px;
  background:
    radial-gradient(circle at 30% 15%, rgba(255,255,255,0.18), transparent 32%),
    linear-gradient(135deg, rgba(157,85,255,0.24), rgba(255,94,203,0.10));
  color: #fff;
  text-decoration: none;
  box-shadow: 0 14px 32px rgba(0,0,0,0.22), inset 0 1px 0 rgba(255,255,255,0.08);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
}

.social-icon {
  width: 23px;
  height: 23px;
  display: block;
  fill: currentColor;
  filter: drop-shadow(0 0 10px rgba(209,173,255,0.28));
}

.social-links a:hover,
.social-links a:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(202,167,255,0.58);
  background:
    radial-gradient(circle at 30% 15%, rgba(255,255,255,0.24), transparent 36%),
    linear-gradient(135deg, rgba(157,85,255,0.44), rgba(255,94,203,0.22));
  box-shadow: 0 18px 42px rgba(116, 54, 255, 0.26), inset 0 1px 0 rgba(255,255,255,0.16);
  outline: none;
}

.footer-note {
  font-size: 0.92rem;
}

.footer-bottom a {
  color: #e7d5ff;
  text-decoration: none;
  border-bottom: 1px solid rgba(231,213,255,0.36);
}

.footer-bottom a:hover,
.footer-bottom a:focus-visible {
  color: #fff;
  border-color: #fff;
  outline: none;
}

.footer-brand strong {
  display: block;
  margin-bottom: 14px;
  font-size: clamp(1.8rem, 3vw, 3rem);
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: -0.035em;
}

.footer-brand p,
.footer-card p,
.footer-cta p {
  color: var(--text-muted);
}

.footer-card h4,
.footer-cta h4 {
  margin-bottom: 14px;
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #dbc0ff;
}

.footer-links,
.footer-list {
  display: grid;
  gap: 10px;
  list-style: none;
}

.footer-links a,
.footer-list a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.22s ease, transform 0.22s ease;
}

.footer-links a:hover,
.footer-links a:focus-visible,
.footer-list a:hover,
.footer-list a:focus-visible {
  color: #fff;
  transform: translateX(3px);
  outline: none;
}

.footer-cta {
  background: linear-gradient(135deg, rgba(157,85,255,0.26), rgba(255,94,203,0.12));
}

.footer-cta .btn {
  width: 100%;
  margin-top: 18px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding-top: 24px;
  border-top: 1px solid var(--glass-border);
  color: var(--text-muted);
  font-size: 0.86rem;
}

.page-hero {
  justify-content: center;
  text-align: center;
}

.page-hero .hero-content {
  margin-inline: auto;
}

.page-hero .main-title {
  max-width: 980px;
  margin-inline: auto;
}

.page-hero .description {
  margin-inline: auto;
}

.page-hero .cta-buttons {
  justify-content: center;
}

.feature-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(18px, 2.4vw, 30px);
  width: 100%;
  margin-top: clamp(28px, 4vw, 50px);
}

@media (max-width: 1280px) {
  .nav-links {
    gap: 4px;
  }

  .nav-links a,
  .dropdown-toggle {
    padding: 9px 10px;
    font-size: 0.69rem;
  }

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

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

@media (max-width: 980px) {
  .grid-features,
  .steps-grid,
  .details-grid,
  .metrics-section {
    grid-template-columns: 1fr 1fr;
  }

  .split-layout,
  .split-layout.reverse {
    grid-template-columns: 1fr;
  }

  .split-layout.reverse .split-copy,
  .split-layout.reverse .image-panel {
    order: initial;
  }
}

@media (max-width: 860px) {
  :root {
    --header-h: 68px;
    --page-pad: 18px;
  }

  .glass-header {
    padding: 11px var(--page-pad);
  }

  .menu-btn {
    display: grid;
    z-index: 1002;
  }

  .nav-links {
    position: fixed;
    inset: var(--header-h) 12px 12px 12px;
    max-height: calc(100svh - var(--header-h) - 24px);
    overflow-y: auto;
    display: grid;
    align-content: start;
    justify-content: stretch;
    gap: 10px;
    padding: 18px;
    border: 1px solid var(--glass-border);
    border-radius: 28px;
    background:
      radial-gradient(circle at 25% 10%, rgba(157, 85, 255, 0.20), transparent 34%),
      rgba(8, 6, 12, 0.97);
    box-shadow: var(--shadow);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px) scale(0.98);
    transition: opacity 0.22s ease, visibility 0.22s ease, transform 0.22s ease;
  }

  .nav-links.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
  }

  .nav-links a,
  .dropdown-toggle {
    width: 100%;
    min-height: 52px;
    padding: 15px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.055);
    text-align: left;
    font-size: 0.82rem;
  }

  .dropdown-content {
    position: static;
    min-width: 0;
    margin-top: 8px;
    display: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background: rgba(255, 255, 255, 0.045);
  }

  .dropdown:hover .dropdown-content,
  .dropdown:focus-within .dropdown-content {
    display: none;
    transform: none;
  }

  .dropdown.open .dropdown-content {
    display: grid;
  }

  .hero-section {
    align-items: flex-end;
    min-height: 100svh;
    padding-top: calc(var(--header-h) + 42px);
  }

  .hero-section::after {
    background:
      linear-gradient(180deg, rgba(5, 4, 7, 0.30), rgba(5, 4, 7, 0.88) 72%, #050407 100%),
      radial-gradient(circle at 45% 42%, rgba(157, 85, 255, 0.23), transparent 54%);
  }

  .cta-buttons,
  .cta-footer {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .metrics-section,
  .grid-genres,
  .grid-features,
  .steps-grid,
  .details-grid,
  .project-grid,
  .feature-strip,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .metric-card {
    min-height: 158px;
  }

  .carousel-btn {
    top: auto;
    bottom: 18px;
    transform: none;
  }

  .carousel-btn:hover,
  .carousel-btn:focus-visible {
    transform: scale(1.05);
  }

  .carousel-slide,
  .gallery-item,
  .carousel-container,
  .gallery-container,
  .video-container {
    min-height: 560px;
  }

  .video-overlay {
    width: auto;
    max-width: none;
  }

  .image-panel {
    min-height: 430px;
  }

  .footer-bottom {
    flex-direction: column;
  }

  .glass-header,
  .video-overlay,
  .carousel-caption,
  .image-badge,
  .nav-links {
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }
}

@media (max-width: 520px) {
  .logo-text {
    letter-spacing: 0.10em;
    font-size: 0.76rem;
  }

  .logo-mark {
    width: 36px;
    height: 36px;
    border-radius: 13px;
  }

  .hero-section,
  .fullscreen-section,
  .content-section,
  .video-section,
  .carousel-section,
  .gallery-section,
  .metrics-section,
  .projects-section,
  .site-footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  .main-title {
    font-size: clamp(3rem, 17vw, 4.7rem);
  }

  .section-title {
    font-size: clamp(2rem, 12vw, 3.3rem);
  }

  .chapter-num {
    font-size: 0.68rem;
    letter-spacing: 0.13em;
  }

  .tag {
    font-size: 0.66rem;
    min-height: 30px;
    padding-inline: 0.72rem;
  }

  .feature-card,
  .genre-card,
  .step,
  .detail-card,
  .info-box,
  .footer-card,
  .footer-cta {
    min-height: 0;
    padding: 22px;
  }

  .card-media {
    height: 170px;
    margin: -22px -22px 22px;
  }

  .carousel-slide,
  .gallery-item {
    padding: 16px;
  }

  .carousel-caption,
  .video-overlay {
    padding: 18px;
  }

  .image-panel {
    min-height: 360px;
    border-radius: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}


/* =========================================================
   MOBILE MENU V4 — CSS-only fallback + JS enhancement
   Исправляет мобильное меню даже если старый JS/CSS закеширован.
   ========================================================= */
.menu-toggle {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  pointer-events: none;
}

.menu-backdrop {
  display: none;
}

.dropdown > summary.dropdown-toggle {
  list-style: none;
  user-select: none;
}

.dropdown > summary.dropdown-toggle::-webkit-details-marker {
  display: none;
}

.dropdown[open] .dropdown-content,
.dropdown:hover .dropdown-content,
.dropdown:focus-within .dropdown-content {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

@media (max-width: 860px) {
  .glass-header {
    z-index: 12000;
  }

  .menu-btn {
    display: grid !important;
    z-index: 12070;
  }

  .menu-toggle:checked + .menu-btn {
    border-color: rgba(157, 85, 255, 0.72);
    background: rgba(157, 85, 255, 0.22);
  }

  .menu-toggle:checked + .menu-btn span:first-child {
    transform: translateY(5px) rotate(45deg);
  }

  .menu-toggle:checked + .menu-btn span:last-child {
    transform: translateY(-5px) rotate(-45deg);
  }

  .menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 12020;
    display: block;
    background: rgba(0, 0, 0, 0.62);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.22s ease, visibility 0.22s ease;
  }

  .menu-toggle:checked ~ .menu-backdrop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .nav-links,
  .glass-header .nav-links {
    position: fixed !important;
    top: calc(var(--header-h) + 12px) !important;
    left: max(12px, env(safe-area-inset-left)) !important;
    right: max(12px, env(safe-area-inset-right)) !important;
    bottom: max(12px, env(safe-area-inset-bottom)) !important;
    z-index: 12060 !important;
    width: auto !important;
    max-height: calc(100dvh - var(--header-h) - 24px) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    display: grid !important;
    align-content: start !important;
    justify-content: stretch !important;
    gap: 10px !important;
    padding: 18px !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    border-radius: 28px !important;
    background:
      radial-gradient(circle at 18% 0%, rgba(157, 85, 255, 0.30), transparent 38%),
      radial-gradient(circle at 88% 8%, rgba(255, 94, 203, 0.18), transparent 34%),
      rgba(8, 6, 12, 0.992) !important;
    box-shadow: 0 28px 100px rgba(0, 0, 0, 0.78) !important;
    backdrop-filter: blur(26px) !important;
    -webkit-backdrop-filter: blur(26px) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: translateY(-14px) scale(0.98) !important;
    transition: opacity 0.22s ease, visibility 0.22s ease, transform 0.22s ease !important;
  }

  .menu-toggle:checked ~ .nav-links,
  .nav-links.active {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translateY(0) scale(1) !important;
  }

  .nav-links a,
  .dropdown-toggle {
    width: 100% !important;
    min-height: 56px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 15px 16px !important;
    border-radius: 18px !important;
    background: rgba(255, 255, 255, 0.07) !important;
    color: rgba(250, 247, 255, 0.90) !important;
    text-align: left !important;
    font-size: 0.88rem !important;
    line-height: 1.2 !important;
    text-decoration: none !important;
  }

  .dropdown {
    width: 100% !important;
  }

  .dropdown-toggle::after {
    content: "";
    width: 8px;
    height: 8px;
    margin-left: 12px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    transition: transform 0.22s ease;
  }

  .dropdown[open] .dropdown-toggle::after,
  .dropdown.open .dropdown-toggle::after {
    transform: rotate(-135deg) translateY(-1px);
  }

  .dropdown-content,
  .dropdown:hover .dropdown-content,
  .dropdown:focus-within .dropdown-content {
    position: static !important;
    min-width: 0 !important;
    margin-top: 8px !important;
    padding: 8px !important;
    display: none !important;
    gap: 6px !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    box-shadow: none !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border-radius: 18px !important;
  }

  .dropdown[open] .dropdown-content,
  .dropdown.open .dropdown-content {
    display: grid !important;
  }

  .dropdown-content a {
    min-height: 48px !important;
    padding: 13px 14px !important;
    border-radius: 14px !important;
    background: rgba(255, 255, 255, 0.04) !important;
    font-size: 0.86rem !important;
  }
}
