:root {
  --bg: #07030f;
  --bg-2: #120624;
  --ink: #f5f0ff;
  --muted: #b8a6dc;
  --violet: #8b5cf6;
  --lav: #c4b5fd;
  --pink: #f0abfc;
  --line: rgba(196, 181, 253, .16);
  --glass: rgba(22, 9, 44, .62);
  --display: "Unbounded", system-ui, sans-serif;
  --body: "Manrope", system-ui, sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background:
    radial-gradient(1200px 800px at 15% 110%, rgba(124, 58, 237, .22), transparent 60%),
    radial-gradient(900px 700px at 90% 60%, rgba(217, 70, 239, .12), transparent 60%),
    radial-gradient(1000px 900px at 50% 40%, rgba(76, 29, 149, .25), transparent 70%),
    var(--bg);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--body);
  font-weight: 300;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.is-loading, body.menu-open { overflow: hidden; }
a { color: inherit; }
::selection { background: rgba(196, 181, 253, .35); }

.grad {
  background: linear-gradient(100deg, var(--lav) 0%, var(--pink) 45%, #fff 70%, var(--lav) 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 8s linear infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }

.eyebrow {
  font-family: var(--display);
  font-size: .72rem;
  letter-spacing: .38em;
  text-transform: uppercase;
  color: var(--lav);
  margin: 0 0 1.2rem;
  opacity: .85;
}

/* ---------- Loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-content: center; justify-items: center; gap: .6rem;
  background: var(--bg);
  transition: opacity 1.1s var(--ease), visibility 1.1s;
}
.loader.is-done { opacity: 0; visibility: hidden; }
.loader__mark { font-family: var(--display); font-weight: 700; letter-spacing: .3em; font-size: clamp(1rem, 3vw, 1.5rem); }
.loader__sub { font-size: .75rem; letter-spacing: .5em; text-transform: uppercase; color: var(--muted); }
.loader__bar { width: min(240px, 60vw); height: 1px; background: var(--line); margin-top: 1.4rem; overflow: hidden; }
.loader__bar span { display: block; height: 100%; width: 40%; background: linear-gradient(90deg, transparent, var(--pink), transparent); box-shadow: 0 0 12px var(--pink); animation: sweep 1.4s ease-in-out infinite; }
@keyframes sweep { from { transform: translateX(-100%); } to { transform: translateX(250%); } }

/* ---------- Particle canvas ---------- */
#gl {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: 40; pointer-events: none;
}

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.1rem clamp(16px, 4vw, 48px);
  opacity: 0; transform: translateY(-14px); pointer-events: none;
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}
.nav.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.nav::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to bottom, rgba(7, 3, 15, .75), transparent);
}
.nav__brand {
  display: flex; align-items: center; gap: .7rem; text-decoration: none;
  font-family: var(--display); font-weight: 700; font-size: .8rem; letter-spacing: .22em;
}
.nav__brand em { font-style: normal; font-weight: 300; color: var(--muted); letter-spacing: .18em; margin-left: .35em; }
.nav__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 10px var(--pink), 0 0 26px var(--violet); animation: breathe 3s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(.65); opacity: .7; } }
.nav__links { display: flex; align-items: center; gap: clamp(.8rem, 2.4vw, 2rem); font-size: .85rem; }
.nav__links a { text-decoration: none; color: var(--muted); transition: color .3s; }
.nav__links a:hover { color: var(--ink); }
.nav__links .nav__cta { color: var(--ink); border: 1px solid var(--line); padding: .5rem 1rem; border-radius: 999px; background: rgba(139, 92, 246, .12); }
@media (max-width: 720px) {
  .nav__brand em, .nav__links a:not(.nav__cta):not(.nav__gallery) { display: none; }
}

/* ---------- Intro / portal ---------- */
.intro { position: relative; height: 620vh; z-index: 10; }
.stage {
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden;
  background: var(--bg);
}
.stage.is-gone { visibility: hidden; }
#neb { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.cloud {
  position: absolute; left: 0; top: 0; height: auto; max-width: none;
  transform-origin: 50.98% 60.2%; /* the aperture in the artwork */
  mix-blend-mode: screen; opacity: 0;
  pointer-events: none; user-select: none; will-change: transform, opacity;
}

.brand {
  position: absolute; left: 0; right: 0; top: 66%;
  text-align: center; pointer-events: none;
  opacity: 0; transform: translateY(14px);
  transition: opacity 1.8s var(--ease) 2.3s, transform 1.8s var(--ease) 2.3s;
}
body.is-ready .brand { opacity: 1; transform: none; }
.brand__title {
  display: inline-block; margin: 0;
  font-family: var(--display); font-weight: 700;
  font-size: min(7.2vw, 9.5vh); line-height: 1.05; letter-spacing: .02em;
  background: linear-gradient(180deg, #ffffff 0%, #f3ebff 36%, #b49aff 52%, #e6d9ff 68%, #ffffff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 14px rgba(192, 132, 252, .55)) drop-shadow(0 0 42px rgba(139, 92, 246, .45));
}
.brand__sub {
  margin: .7rem 0 0; display: flex; align-items: center; justify-content: center; gap: 1.1em;
  font-family: var(--display); font-weight: 300; text-transform: uppercase;
  font-size: min(1.7vw, 2.2vh, 1.05rem); letter-spacing: .5em; text-indent: .5em;
  color: #ece2ff; text-shadow: 0 0 12px rgba(192, 132, 252, .85);
}
.brand__sub span { width: clamp(24px, 6vw, 70px); height: 1px; background: linear-gradient(90deg, transparent, #ece2ff); }
.brand__sub span:last-child { transform: scaleX(-1); }
@media (max-width: 760px) { .brand__title { font-size: 9vw; } .brand__sub { font-size: .62rem; } }
.stage__vignette {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 45%, rgba(7, 3, 15, .65) 100%);
}
.stage__flash {
  position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(circle at 50% 40%, #fff 0%, #dccbff 22%, #a274ff 50%, #4a1a99 80%, #1d0838 100%);
}

.hint {
  position: absolute; left: 0; right: 0; bottom: max(5vh, 28px);
  display: flex; justify-content: center;
  opacity: 0; transform: translateY(10px);
  transition: opacity 1.2s var(--ease), transform 1.2s var(--ease);
}
.hint.is-visible { opacity: 1; transform: none; }
.hint__btn {
  display: flex; flex-direction: column; align-items: center; gap: .8rem;
  background: none; border: 0; color: var(--ink); cursor: pointer;
  font: inherit; font-size: .72rem; letter-spacing: .38em; text-transform: uppercase;
  text-shadow: 0 0 18px rgba(240, 171, 252, .8);
}
.hint__mouse {
  width: 24px; height: 38px; border: 1.5px solid rgba(245, 240, 255, .8); border-radius: 14px;
  display: flex; justify-content: center; padding-top: 7px;
  box-shadow: 0 0 18px rgba(196, 181, 253, .55);
}
.hint__mouse span { width: 3px; height: 8px; border-radius: 2px; background: #fff; animation: wheel 1.8s var(--ease) infinite; }
@keyframes wheel { 0% { opacity: 0; transform: translateY(-3px); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }

.progress {
  position: absolute; right: clamp(16px, 3vw, 36px); top: 50%; transform: translateY(-50%);
  width: 2px; height: 120px; background: rgba(255, 255, 255, .12); border-radius: 2px; overflow: hidden;
  opacity: 0; transition: opacity .6s;
}
.progress.is-visible { opacity: 1; }
.progress span { position: absolute; left: 0; right: 0; top: 0; height: 100%; transform-origin: top; transform: scaleY(0); background: linear-gradient(var(--pink), var(--violet)); }

/* ---------- Sections ---------- */
main > section:not(.intro) {
  position: relative; z-index: 20;
  padding: clamp(80px, 14vh, 160px) clamp(16px, 5vw, 64px);
  max-width: 1280px; margin: 0 auto;
}
h2 {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(2rem, 5.6vw, 4.4rem); line-height: 1.05; letter-spacing: -.02em;
  margin: 0;
}
.lab { padding-top: clamp(110px, 20vh, 220px) !important; }
.lab__head { text-align: center; max-width: 760px; margin: 0 auto clamp(40px, 8vh, 90px); }
.lede { color: var(--muted); font-size: clamp(1rem, 1.6vw, 1.15rem); margin: 1.4rem auto 0; max-width: 520px; }

.services {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(64px, 9vw, 120px) clamp(16px, 3vw, 40px);
}
@media (max-width: 900px) { .services { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .services { grid-template-columns: 1fr; } }

.service {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.service__slot {
  width: clamp(170px, 19vw, 230px); aspect-ratio: 1;
  position: relative;
}
.service:focus-visible { outline: none; }
.service:focus-visible .service__hint { border-color: var(--pink); }
.service__num {
  margin-top: 1.6rem;
  font-family: var(--display); font-weight: 300; font-size: .68rem; letter-spacing: .36em; text-indent: .36em;
  color: var(--pink); opacity: .75;
  display: flex; align-items: center; gap: .9em;
}
.service__num::before, .service__num::after {
  content: ""; width: 22px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(240, 171, 252, .6));
  transition: width .6s var(--ease);
}
.service__num::after { transform: scaleX(-1); }
.service:hover .service__num::before, .service:hover .service__num::after { width: 40px; }
.service__name {
  margin-top: .7rem;
  font-family: var(--display); font-weight: 500; font-size: clamp(1.05rem, 1.6vw, 1.25rem); letter-spacing: .01em;
  background: linear-gradient(180deg, #ffffff 0%, #efe6ff 45%, #bda6ff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.service__tag {
  margin-top: .55rem; max-width: 28ch;
  color: var(--muted); font-size: .9rem; line-height: 1.55;
}
.service__hint {
  margin-top: 1.2rem; display: inline-flex; align-items: center; gap: .7em;
  padding: .6rem 1.15rem .6rem 1.4rem; border-radius: 999px;
  font-size: .64rem; letter-spacing: .32em; text-transform: uppercase; color: var(--lav);
  border: 1px solid rgba(196, 181, 253, .18);
  background: linear-gradient(180deg, rgba(139, 92, 246, .1), rgba(139, 92, 246, .03));
  transition: border-color .5s var(--ease), background .5s var(--ease), box-shadow .5s var(--ease), color .5s;
}
.service__hint i { font-style: normal; letter-spacing: 0; transition: transform .5s var(--ease); }
.service:hover .service__hint, .service:focus-visible .service__hint {
  color: #fff; border-color: rgba(240, 171, 252, .5);
  background: linear-gradient(180deg, rgba(139, 92, 246, .28), rgba(217, 70, 239, .12));
  box-shadow: 0 0 28px rgba(168, 85, 247, .3), inset 0 1px 0 rgba(255, 255, 255, .12);
}
.service:hover .service__hint i { transform: translateX(5px); }

.about { text-align: center; }
.manifesto {
  font-family: var(--display); font-weight: 300;
  font-size: clamp(1.4rem, 3.4vw, 2.6rem); line-height: 1.3; letter-spacing: -.01em;
  max-width: 1000px; margin: 0 auto;
}
.stats { display: flex; justify-content: center; gap: clamp(24px, 8vw, 110px); margin-top: clamp(40px, 8vh, 80px); flex-wrap: wrap; }
.stats div { display: flex; flex-direction: column; }
.stats strong { font-family: var(--display); font-weight: 500; font-size: 1.2rem; color: var(--lav); }
.stats span { color: var(--muted); font-size: .9rem; }

.contact { text-align: center; padding-bottom: 40px !important; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  margin-top: 2.4rem; padding: 1rem 1.8rem; border-radius: 999px;
  text-decoration: none; font: inherit; font-weight: 600; font-size: .95rem; color: var(--ink);
  background: linear-gradient(120deg, rgba(139, 92, 246, .55), rgba(217, 70, 239, .45));
  border: 1px solid rgba(240, 171, 252, .4);
  box-shadow: 0 0 30px rgba(139, 92, 246, .35), inset 0 0 18px rgba(255, 255, 255, .08);
  cursor: pointer; transition: transform .4s var(--ease), box-shadow .4s var(--ease);
  word-break: break-all;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 0 46px rgba(217, 70, 239, .5), inset 0 0 18px rgba(255, 255, 255, .12); }
.btn--ghost { background: transparent; box-shadow: none; border-color: var(--line); font-weight: 400; }
.foot {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  margin-top: clamp(100px, 20vh, 200px); padding-top: 24px; border-top: 1px solid var(--line);
  font-size: .8rem; color: var(--muted);
}

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1.2s var(--ease), transform 1.2s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- Service menu ---------- */
.menu { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; visibility: hidden; }
.menu.is-open { visibility: visible; }
.menu__backdrop {
  position: absolute; inset: 0;
  background: radial-gradient(circle at var(--ox, 50%) var(--oy, 50%), rgba(76, 29, 149, .35), rgba(7, 3, 15, .7) 70%);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  opacity: 0; transition: opacity .7s var(--ease);
}
.menu.is-open .menu__backdrop { opacity: 1; }
.menu__panel {
  position: relative; width: min(560px, 100%); max-height: calc(100svh - 32px); overflow: auto;
  padding: clamp(28px, 5vw, 48px);
  border-radius: 28px;
  background: linear-gradient(160deg, rgba(46, 18, 92, .55), rgba(14, 6, 30, .7));
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(196, 181, 253, .22);
  box-shadow: 0 30px 120px rgba(76, 29, 149, .55), inset 0 1px 0 rgba(255, 255, 255, .08);
  opacity: 0; transform: translateY(24px) scale(.96);
  transition: opacity .6s var(--ease), transform .8s var(--ease);
}
.menu.is-open .menu__panel { opacity: 1; transform: none; transition-delay: .18s; }
.menu__panel h3 { font-family: var(--display); font-weight: 500; font-size: clamp(1.6rem, 4vw, 2.3rem); line-height: 1.1; margin: 0; }
.menu__tag { color: var(--muted); margin: .9rem 0 1.6rem; }
.menu__list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.menu__list li {
  display: flex; gap: 1rem; align-items: baseline;
  padding: .95rem 0; border-bottom: 1px solid var(--line);
  opacity: 0; transform: translateX(-10px); transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.menu.is-open .menu__list li { opacity: 1; transform: none; }
.menu__list b { font-family: var(--display); font-weight: 300; font-size: .7rem; color: var(--pink); letter-spacing: .1em; }
.menu__list span { font-weight: 600; }
.menu__list small { display: block; color: var(--muted); font-size: .85rem; font-weight: 300; }
.menu__actions { display: flex; gap: .8rem; flex-wrap: wrap; }
.menu__actions .btn { margin-top: 1.8rem; }
.menu__close {
  position: absolute; top: 18px; right: 18px; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .04); cursor: pointer;
  transition: transform .5s var(--ease), background .3s;
}
.menu__close:hover { transform: rotate(90deg); background: rgba(255, 255, 255, .1); }
.menu__close span { position: absolute; left: 50%; top: 50%; width: 16px; height: 1.5px; background: var(--ink); }
.menu__close span:first-child { transform: translate(-50%, -50%) rotate(45deg); }
.menu__close span:last-child { transform: translate(-50%, -50%) rotate(-45deg); }

/* Click pulse (screen ripple of light) */
.pulse {
  position: fixed; z-index: 39; pointer-events: none;
  width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%;
  background: radial-gradient(circle, rgba(240, 171, 252, .55), rgba(139, 92, 246, .18) 45%, transparent 70%);
  animation: pulse 1.1s var(--ease) forwards;
}
@keyframes pulse { from { transform: scale(1); opacity: 1; } to { transform: scale(46); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .grad, .nav__dot, .hint__mouse span { animation: none; }
  .reveal { transition: none; opacity: 1; transform: none; }
}

/* Fallback when WebGL is unavailable */
.no-gl .service__slot { background: radial-gradient(circle, rgba(240, 171, 252, .5), rgba(139, 92, 246, .2) 45%, transparent 70%); }
