
/* VOUDY_VISUAL_V4 */

:root {
  --v4-glass-panel:rgba(255,255,255,.68);
  --v4-glass-strong:rgba(255,255,255,.76);
  --v4-glass-border:rgba(104,98,171,.22);
  --v4-bg:#eef1ff;
}

html[data-theme="dark"] {
  --v4-glass-panel:rgba(18,27,55,.64);
  --v4-glass-strong:rgba(12,19,43,.77);
  --v4-glass-border:rgba(166,173,225,.20);
  --v4-bg:#080e23;
}

body {
  position:relative;
  min-height:100vh;
  isolation:isolate;
}

body.voudy-motion-on {
  background-image:none!important;
  background-color:var(--v4-bg)!important;
}

/* Four independent aurora lights */

#voudy-four-lights {
  position:fixed;
  inset:0;
  overflow:hidden;
  pointer-events:none;
  z-index:0;
  isolation:isolate;
  display:block;
}

body:not(.voudy-motion-on) #voudy-four-lights {
  display:none;
}

#voudy-four-lights .v4-swirl {
  position:absolute;
  width:66vw;
  height:68vw;
  min-width:380px;
  min-height:380px;
  border-radius:50%;
  filter:blur(35px);
  will-change:transform;
  opacity:.70;
  transform-origin:center;
  animation:v4-orbit 24s linear infinite;
}

#voudy-four-lights .v4-swirl:nth-child(1) {
  left:-17%;
  top:-36%;
  background:radial-gradient(
    ellipse at 44% 45%,
    rgba(143,91,255,.70),
    rgba(143,91,255,.15) 45%,
    transparent 72%
  );
  animation-duration:24s;
}

#voudy-four-lights .v4-swirl:nth-child(2) {
  right:-21%;
  top:-17%;
  background:radial-gradient(
    ellipse at 46% 51%,
    rgba(10,198,234,.70),
    rgba(10,198,234,.14) 47%,
    transparent 72%
  );
  animation-duration:29s;
  animation-direction:reverse;
}

#voudy-four-lights .v4-swirl:nth-child(3) {
  bottom:-44%;
  left:12%;
  background:radial-gradient(
    ellipse at 50% 47%,
    rgba(250,76,176,.63),
    rgba(250,76,176,.13) 45%,
    transparent 72%
  );
  animation-duration:34s;
  animation-delay:-9s;
}

#voudy-four-lights .v4-swirl:nth-child(4) {
  bottom:-42%;
  right:-10%;
  background:radial-gradient(
    ellipse at 42% 47%,
    rgba(67,218,149,.69),
    rgba(67,218,149,.12) 47%,
    transparent 72%
  );
  animation-duration:27s;
  animation-delay:-14s;
  animation-direction:reverse;
}

html[data-theme="dark"] #voudy-four-lights .v4-swirl {
  opacity:.87;
  mix-blend-mode:screen;
}

@keyframes v4-orbit {
  0% {
    transform:translate3d(0,0,0) rotate(0deg) scale(1);
  }
  25% {
    transform:translate3d(10vw,8vh,0) rotate(90deg) scale(1.18);
  }
  50% {
    transform:translate3d(0,17vh,0) rotate(180deg) scale(.9);
  }
  75% {
    transform:translate3d(-11vw,4vh,0) rotate(270deg) scale(1.12);
  }
  100% {
    transform:translate3d(0,0,0) rotate(360deg) scale(1);
  }
}

/* Preserve sticky header and fixed sidebar */

body > main,
body > #voudy-compact-footer,
body > #notice,
body > .vc-legal-wrap {
  position:relative;
  z-index:1;
}

body > header {
  z-index:30;
}

body > #nav {
  z-index:20;
}

/* Glass panels */

body:not(.vc-legal-page) header {
  background:var(--v4-glass-strong)!important;
  backdrop-filter:blur(20px) saturate(135%);
  -webkit-backdrop-filter:blur(20px) saturate(135%);
}

body:not(.vc-legal-page) #nav,
body:not(.vc-legal-page) .card,
body:not(.vc-legal-page) .auth,
body:not(.vc-legal-page) .voudy-trust,
body:not(.vc-legal-page) #voudy-compact-footer .vcf-main,
body:not(.vc-legal-page) #voudy-compact-footer .vcf-bottom {
  background:var(--v4-glass-panel)!important;
  border-color:var(--v4-glass-border)!important;
  backdrop-filter:blur(18px) saturate(130%);
  -webkit-backdrop-filter:blur(18px) saturate(130%);
}

body:not(.vc-legal-page) .hero {
  background:var(--v4-glass-panel)!important;
}

/* Disclaimer follows selected Voudy mode */

html[data-theme="light"] body.vc-legal-page {
  --legal-bg:#eef1ff;
  --legal-panel:rgba(255,255,255,.71);
  --legal-text:#20233e;
  --legal-border:rgba(104,98,171,.22);
  --legal-muted:#56627a;
  --legal-link:#5f47d2;
}

html[data-theme="dark"] body.vc-legal-page {
  --legal-bg:#080e23;
  --legal-panel:rgba(18,27,55,.70);
  --legal-text:#f3f4ff;
  --legal-border:rgba(166,173,225,.20);
  --legal-muted:#b4c0dc;
  --legal-link:#c7aaff;
}

body.vc-legal-page {
  color:var(--legal-text)!important;
  background:var(--legal-bg)!important;
  color-scheme:light;
}

html[data-theme="dark"] body.vc-legal-page {
  color-scheme:dark;
}

body.vc-legal-page article {
  background:var(--legal-panel)!important;
  border-color:var(--legal-border)!important;
  backdrop-filter:blur(18px) saturate(130%);
  -webkit-backdrop-filter:blur(18px) saturate(130%);
}

/* Official Voudy branding */

.voudy-legal-brand {
  margin:0 0 22px;
}

.voudy-legal-brand-link {
  display:inline-flex;
  align-items:center;
  gap:12px;
  color:var(--legal-text)!important;
  text-decoration:none!important;
}

.voudy-legal-brand-link strong {
  display:block;
  font-size:23px;
  line-height:1.15;
  letter-spacing:-.7px;
}

.voudy-legal-brand-link small {
  display:block;
  font-size:11px;
  color:var(--legal-muted);
  letter-spacing:.2px;
}

.voudy-unified-symbol {
  display:block;
  object-fit:contain;
  flex:none;
}

.voudy-footer-symbol {
  width:36px;
  height:36px;
  min-width:36px;
  border-radius:7px;
}

.voudy-legal-symbol {
  width:47px;
  height:43px;
  border-radius:7px;
}

html:not([data-theme="dark"]) .voudy-unified-symbol,
html:not([data-theme="dark"]) header .brand img.voudy-unified-symbol {
  background-color:#fff!important;
}

html[data-theme="dark"] .voudy-unified-symbol {
  background:transparent!important;
}

header .brand img.voudy-unified-symbol {
  width:45px;
  height:42px;
  border-radius:7px;
  object-fit:contain;
}

@media(max-width:800px) {
  #voudy-four-lights .v4-swirl {
    min-width:260px;
    min-height:260px;
    width:85vw;
    height:85vw;
    filter:blur(24px);
  }
}

@media(prefers-reduced-motion:reduce) {
  #voudy-four-lights .v4-swirl {
    animation:none!important;
  }
}


/* VOUDY_RHYTHM_GLASS_V5 — synchronized 16-second colour rhythm */
:root {
  --v4-glass-panel:rgba(255,255,255,.48);
  --v4-glass-strong:rgba(255,255,255,.59);
  --v4-glass-border:rgba(104,98,171,.25);
}
html[data-theme="dark"] {
  --v4-glass-panel:rgba(18,27,55,.43);
  --v4-glass-strong:rgba(12,19,43,.56);
  --v4-glass-border:rgba(166,173,225,.24);
}
html[data-theme="light"] body.vc-legal-page { --legal-panel:rgba(255,255,255,.52); }
html[data-theme="dark"] body.vc-legal-page { --legal-panel:rgba(18,27,55,.46); }

/* Each swirl has the same beat, staggered by a quarter-cycle. */
#voudy-four-lights .v4-swirl {
  --v5-blur:35px;
  animation: v5-orbit 16s ease-in-out infinite,
             v5-colour 16s linear infinite,
             v5-breathe 16s ease-in-out infinite;
  animation-direction:normal,normal,normal;
}
#voudy-four-lights .v4-swirl:nth-child(1) {
  animation-duration:16s,16s,16s;
  animation-direction:normal,normal,normal;
  animation-delay:0s,0s,0s;
}
#voudy-four-lights .v4-swirl:nth-child(2) {
  animation-duration:16s,16s,16s;
  animation-direction:normal,normal,normal;
  animation-delay:-4s,-4s,-4s;
}
#voudy-four-lights .v4-swirl:nth-child(3) {
  animation-duration:16s,16s,16s;
  animation-direction:normal,normal,normal;
  animation-delay:-8s,-8s,-8s;
}
#voudy-four-lights .v4-swirl:nth-child(4) {
  animation-duration:16s,16s,16s;
  animation-direction:normal,normal,normal;
  animation-delay:-12s,-12s,-12s;
}

@keyframes v5-orbit {
  0%,100% { transform:translate3d(0,0,0) rotate(0deg) scale(1); }
  25% { transform:translate3d(7vw,6vh,0) rotate(90deg) scale(1.11); }
  50% { transform:translate3d(0,13vh,0) rotate(180deg) scale(.95); }
  75% { transform:translate3d(-8vw,3vh,0) rotate(270deg) scale(1.10); }
}
@keyframes v5-colour {
  0%,100% { filter:blur(var(--v5-blur)) hue-rotate(0deg) saturate(125%); }
  25% { filter:blur(var(--v5-blur)) hue-rotate(90deg) saturate(145%); }
  50% { filter:blur(var(--v5-blur)) hue-rotate(180deg) saturate(130%); }
  75% { filter:blur(var(--v5-blur)) hue-rotate(270deg) saturate(145%); }
}
@keyframes v5-breathe {
  0%,100% { opacity:.68; }
  25% { opacity:.84; }
  50% { opacity:.72; }
  75% { opacity:.90; }
}
@media(max-width:800px) {
  #voudy-four-lights .v4-swirl { --v5-blur:24px; }
}
/* The existing Motion OFF and Reduce Motion rules remain effective. */
