:root {
  --v2-bg: #030207;
  --v2-bg-soft: #080611;
  --v2-surface: rgba(15, 12, 25, 0.62);
  --v2-surface-strong: rgba(12, 10, 20, 0.86);
  --v2-line: rgba(255, 255, 255, 0.11);
  --v2-line-strong: rgba(255, 255, 255, 0.18);
  --v2-text: #f7f4ff;
  --v2-text-soft: rgba(242, 238, 255, 0.72);
  --v2-text-muted: rgba(228, 221, 245, 0.48);
  --v2-lavender: #9a7fe8;
  --v2-lavender-bright: #c5b3ff;
  --v2-cyan: #7bd9ff;
  --v2-header-height: 70px;
  --v2-radius-xl: 32px;
  --v2-radius-lg: 24px;
  --v2-shadow: 0 30px 100px rgba(0, 0, 0, 0.46);
  --v2-container: min(1380px, calc(100vw - 64px));
  --hero-exit: 0;
  --hero-collapse: 0;
  --brand-opacity: 1;
  --brand-scale: 1;
  --brand-blur: 0px;
  --constellation-x: 0px;
  --constellation-y: 0px;
  --constellation-scale: 1;
  --constellation-rotate: 0deg;
  --constellation-opacity: 1;
  --constellation-tilt-x: 0deg;
  --constellation-tilt-y: 0deg;
  --constellation-depth: 0px;
  --constellation-pointer-x: 0deg;
  --constellation-pointer-y: 0deg;
  --constellation-pointer-z: 0px;
  --intro-progress: 0;
  --scene-rgb: 161 123 218;
  --scene-rgb-soft: 68 49 111;
  --scene-rgb-deep: 24 34 74;
}


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

body.v2-home {
  margin: 0;
  min-width: 320px;
  overflow-x: clip;
  background: var(--v2-bg);
  color: var(--v2-text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.v2-home::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 14%, rgb(var(--scene-rgb) / .22), transparent 0 24%),
    radial-gradient(circle at 16% 34%, rgb(var(--scene-rgb-soft) / .14), transparent 0 28%),
    radial-gradient(circle at 84% 66%, rgb(var(--scene-rgb-deep) / .20), transparent 0 32%),
    linear-gradient(180deg, rgba(3,2,7,.10), rgba(3,2,7,0));
  transition: background 1400ms cubic-bezier(.2,.8,.2,1), opacity 900ms ease, filter 900ms ease;
  filter: saturate(1.06);
  will-change: background;
}

body.v2-home.is-menu-open {
  overflow: hidden;
}

body.v2-home ::selection {
  background: rgba(158, 128, 232, 0.34);
  color: #fff;
}

body.v2-home main {
  position: relative;
  z-index: 1;
}

body.v2-home .v2-cinematic,
body.v2-home .v2-content-section,
body.v2-home .v2-conversion,
body.v2-home .v2-footer {
  position: relative;
  z-index: 1;
}

body.v2-home .container {
  width: var(--v2-container);
  max-width: none;
}

body.v2-home .skiplink {
  z-index: 10000;
}

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

/* Loader v2: simple, quiet, brand-first. */
body.v2-home #loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 48%, rgba(123, 92, 194, 0.16), transparent 24%),
    #030207;
  transition: opacity 700ms cubic-bezier(.2,.8,.2,1), visibility 700ms;
}

body.v2-home #loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.v2-loader-core {
  display: grid;
  place-items: center;
  gap: 24px;
}

.v2-loader-mark {
  width: 74px;
  height: 74px;
  object-fit: contain;
  filter: drop-shadow(0 0 26px rgba(153, 121, 232, 0.28));
  animation: v2-loader-breathe 2.2s ease-in-out infinite;
}

.v2-loader-track {
  width: 112px;
  height: 1px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
}

.v2-loader-track::after {
  content: "";
  display: block;
  width: 42%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--v2-lavender-bright), transparent);
  animation: v2-loader-line 1.5s ease-in-out infinite;
}

@keyframes v2-loader-breathe {
  0%, 100% { opacity: .58; transform: scale(.96); }
  50% { opacity: 1; transform: scale(1); }
}

@keyframes v2-loader-line {
  from { transform: translateX(-130%); }
  to { transform: translateX(340%); }
}

/* The recovered sections remain available below the approved prototype. */
body.v2-home .legacy-zone {
  position: relative;
  z-index: 6;
  background:
    radial-gradient(circle at 15% 0%, rgba(96, 72, 151, 0.10), transparent 30%),
    linear-gradient(180deg, #080611 0%, #090711 38%, #06050c 100%);
}

body.v2-home .legacy-zone:first-of-type {
  padding-top: clamp(72px, 10vw, 150px);
}

body.v2-home .legacy-zone.section,
body.v2-home .legacy-zone.section-compact {
  scroll-margin-top: 110px;
}

body.v2-home .site-footer {
  position: relative;
  z-index: 7;
  background: #05040a;
}

body.v2-home .guide-orb {
  display: none;
}

body.v2-home .wa-fab {
  z-index: 80;
}

body.v2-home .hidden {
  display: none !important;
}

@media (max-width: 760px) {
  :root {
    --v2-container: min(100% - 32px, 1380px);
  }
}

@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;
  }
}


@media (max-width: 820px) and (pointer: coarse) {
  html, body { overscroll-behavior-y: none; }
  body.v2-home::before { transition-duration: 700ms; }
}

/* Runtime containment: keeps distant sections from consuming layout/paint work. */
.v2-content-section,
.v2-conversion,
.v2-footer {
  content-visibility:auto;
  contain-intrinsic-size: 900px;
}

@media (max-width: 820px) {
  .v2-cinematic-noise { display:none; }
}

/* v1.10 performance containment and mobile paint budget. */
.project-world {
  contain: layout style;
}

@media (max-width: 900px), (pointer: coarse) {
  body.v2-home::before {
    transition: opacity 480ms ease;
    will-change: auto;
    filter: none;
    opacity: .42;
    background:
      radial-gradient(circle at 50% 18%, rgb(var(--scene-rgb) / .10), transparent 0 30%),
      radial-gradient(circle at 78% 72%, rgb(var(--scene-rgb-soft) / .065), transparent 0 34%);
  }

  .v2-content-section,
  .v2-conversion,
  .v2-footer {
    contain: layout style paint;
  }
}

html.visuals-paused .v2-cosmos-texture::before,
html.visuals-paused .v2-cosmos-texture::after,
html.visuals-paused .v2-cosmos-texture > span {
  animation-play-state: paused !important;
}
