:root {
  --bg: #0b0814;
  --bg-2: #120d20;
  --card: #171126;
  --line: rgba(196, 165, 255, 0.12);
  --text: #f1ecff;
  --muted: #a99cc9;
  --purple: #8b5cf6;
  --purple-2: #a855f7;
  --lilac: #d8b4fe;
  --pink: #e879f9;
  --radius: 18px;
  --display: "Unbounded", system-ui, sans-serif;
  --body: "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.bg-glow {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(600px 400px at 85% -5%, rgba(139, 92, 246, .35), transparent 70%),
    radial-gradient(500px 400px at -10% 30%, rgba(168, 85, 247, .18), transparent 70%),
    radial-gradient(700px 500px at 50% 110%, rgba(232, 121, 249, .12), transparent 70%);
}

/* NAV */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px clamp(16px, 5vw, 64px);
  backdrop-filter: blur(14px);
  background: rgba(11, 8, 20, .7);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; }
.brand-logo { height: 40px; width: auto; filter: drop-shadow(0 4px 14px rgba(139, 92, 246, .45)); }
.hero-logo {
  width: min(420px, 85%); height: auto; margin-bottom: 22px;
  filter: drop-shadow(0 12px 40px rgba(139, 92, 246, .5));
}
.nav-links { display: flex; align-items: center; gap: clamp(12px, 3vw, 32px); font-size: .95rem; color: var(--muted); }
.nav-links a:not(.btn):hover { color: var(--text); }
.menu-btn { display: none; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.menu-btn span { width: 18px; height: 2px; border-radius: 2px; background: var(--text); transition: transform .25s, opacity .25s; }
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.skip { position: absolute; left: 16px; top: -60px; z-index: 200; padding: 10px 16px; border-radius: 10px; background: var(--purple); color: #fff; }
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--lilac); outline-offset: 3px; }

/* BUTTONS */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 26px; border-radius: 999px; font-weight: 600; color: #fff;
  background: linear-gradient(135deg, var(--purple), var(--purple-2));
  box-shadow: 0 10px 30px rgba(139, 92, 246, .4), inset 0 1px 0 rgba(255,255,255,.2);
  transition: transform .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 14px 38px rgba(139, 92, 246, .55); }
.btn-sm { padding: 9px 18px; font-size: .9rem; }
.btn-ghost { background: transparent; border: 1px solid var(--line); box-shadow: none; }
.btn-ghost:hover { border-color: var(--purple); box-shadow: none; background: rgba(139, 92, 246, .1); }

/* HERO */
.hero {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center;
  padding: clamp(48px, 8vw, 110px) clamp(16px, 5vw, 64px) clamp(40px, 6vw, 80px);
  max-width: 1280px; margin: 0 auto;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .8rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--lilac);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 4px rgba(74, 222, 128, .18); }
h1, h2, h3 { font-family: var(--display); line-height: 1.12; letter-spacing: -.01em; }
h1 { font-size: clamp(2.3rem, 5.4vw, 4.2rem); font-weight: 800; margin: 18px 0 20px; }
.grad {
  background: linear-gradient(100deg, var(--lilac), var(--purple-2) 45%, var(--pink));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead { color: var(--muted); font-size: clamp(1rem, 1.4vw, 1.15rem); max-width: 34rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 32px 0 40px; }
.stats { list-style: none; display: flex; gap: clamp(20px, 4vw, 44px); flex-wrap: wrap; }
.stats strong { display: block; font-family: var(--display); font-size: 1.6rem; }
.stats span { color: var(--muted); font-size: .85rem; }

.hero-art { position: relative; aspect-ratio: 1 / 1; }
.tile {
  position: absolute; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); box-shadow: 0 30px 60px rgba(0,0,0,.5), 0 0 0 1px rgba(139,92,246,.15);
}
.tile img { width: 100%; height: 100%; object-fit: cover; }
.t1 { width: 78%; aspect-ratio: 16/10; top: 4%; left: 0; z-index: 2; }
.t2 { width: 46%; aspect-ratio: 1440/1280; right: 0; top: 32%; z-index: 3; }
.t3 { width: 62%; aspect-ratio: 16/10; left: 8%; bottom: 2%; z-index: 1; }
@keyframes float { 50% { transform: translateY(-10px); } }

/* SECTIONS */
.section { max-width: 1280px; margin: 0 auto; padding: clamp(56px, 8vw, 100px) clamp(16px, 5vw, 64px); }
.section-head { margin-bottom: 36px; }
.section-head.row { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); font-weight: 700; margin-top: 10px; }
.sub { color: var(--muted); margin-top: 12px; max-width: 36rem; }

/* SERVICES */
.services { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.service {
  padding: 28px 24px; border-radius: var(--radius);
  background: linear-gradient(180deg, var(--card), var(--bg-2));
  border: 1px solid var(--line); transition: border-color .25s, transform .25s;
}
.service:hover { border-color: rgba(139, 92, 246, .5); transform: translateY(-4px); }
.ico {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0;
  background: rgba(139, 92, 246, .14); color: var(--lilac); margin-bottom: 18px;
}
.ico svg { width: 24px; height: 24px; }
.service h3 { font-size: 1.05rem; margin-bottom: 8px; }
.service p { color: var(--muted); font-size: .93rem; }

/* WORK */
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 9px 18px; border-radius: 999px; font-size: .9rem; font-weight: 500;
  border: 1px solid var(--line); color: var(--muted); transition: all .2s;
}
.chip:hover { color: var(--text); border-color: rgba(139, 92, 246, .5); }
.chip.active { background: var(--purple); border-color: var(--purple); color: #fff; }
.hint { color: var(--muted); font-size: .85rem; margin: -12px 0 24px; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card {
  position: relative; border-radius: var(--radius); overflow: hidden;
  background: var(--card); border: 1px solid var(--line);
  transition: transform .3s, border-color .3s, box-shadow .3s;
  animation: in .55s cubic-bezier(.2, .7, .2, 1) backwards;
}
.card:hover { transform: translateY(-4px); border-color: rgba(139, 92, 246, .55); box-shadow: 0 20px 50px rgba(88, 28, 135, .35); }
@keyframes in { from { opacity: 0; transform: translateY(24px) scale(.96); } }
.card .media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; cursor: zoom-in; }
.card.square .media { aspect-ratio: 1440 / 1280; }
.card .media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .4s, transform .6s; }
.card .media .topo { opacity: 0; }
.card:hover .media img { transform: scale(1.04); }
.card.has-topo:hover .media .topo, .card.show-topo .media .topo { opacity: 1; }
.card.has-topo:hover .media .render, .card.show-topo .media .render { opacity: 0; }
.card .meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; }
.card h3 { font-family: var(--body); font-size: 1rem; font-weight: 600; }
.card .tag { font-size: .75rem; color: var(--lilac); text-transform: uppercase; letter-spacing: .1em; }
.topo-btn {
  font-size: .78rem; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted);
}
.pack-badge {
  position: absolute; top: 12px; right: 12px; z-index: 2; padding: 5px 12px; border-radius: 999px;
  font-size: .78rem; font-weight: 600; color: #fff;
  background: rgba(124, 58, 237, .9); box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
}
.card.pack .media { cursor: pointer; }
.pack-btn { background: var(--purple); border-color: var(--purple); color: #fff; }
.pack-btn:hover { background: var(--purple-2); }
.card.show-topo .topo-btn { background: rgba(139, 92, 246, .2); color: var(--text); border-color: var(--purple); }

/* VIEWER */
.embed {
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line);
  aspect-ratio: 16 / 9; background: var(--card);
  box-shadow: 0 30px 80px rgba(88, 28, 135, .3);
}
.embed iframe { width: 100%; height: 100%; border: 0; }
.embed-cover { position: relative; width: 100%; height: 100%; display: block; }
.embed-cover img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.6); transition: filter .3s; }
.embed-cover:hover img { filter: brightness(.75); }
.play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: inline-flex; align-items: center; gap: 10px; padding: 14px 24px; border-radius: 999px;
  font-weight: 600; color: #fff; white-space: nowrap;
  background: linear-gradient(135deg, var(--purple), var(--purple-2));
  box-shadow: 0 10px 30px rgba(139, 92, 246, .5);
}
.play svg { width: 20px; height: 20px; }
.fine { color: var(--muted); font-size: .8rem; margin-top: 12px; }
.more-wrap { display: flex; justify-content: center; margin-top: 28px; }
.more-wrap [hidden] { display: none; }

/* PROCESS */
.process { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: s; }
.process li { padding: 26px 22px; border-top: 2px solid var(--purple); background: linear-gradient(180deg, rgba(139,92,246,.08), transparent); border-radius: 0 0 var(--radius) var(--radius); }
.process span { font-family: var(--display); color: var(--purple-2); font-size: .9rem; }
.process h3 { font-size: 1.05rem; margin: 10px 0 6px; }
.process p { color: var(--muted); font-size: .93rem; }

/* CONTACT */
.contact {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center;
  padding: clamp(28px, 5vw, 56px); border-radius: 28px;
  background:
    radial-gradient(400px 300px at 100% 0%, rgba(232, 121, 249, .2), transparent 70%),
    linear-gradient(135deg, #2a1650, #160d2b);
  border: 1px solid rgba(168, 85, 247, .35);
}
.contact-cards { display: grid; gap: 12px; }
.contact-card {
  display: flex; align-items: center; gap: 16px; padding: 16px 18px; text-align: left; width: 100%;
  border-radius: 14px; background: rgba(11, 8, 20, .55); border: 1px solid var(--line);
  transition: border-color .2s, background .2s;
}
.contact-card:hover { border-color: var(--purple); background: rgba(11, 8, 20, .8); }
.contact-card .ico { margin: 0; }
.contact-card small { display: block; color: var(--muted); font-size: .78rem; }
.contact-card strong { font-weight: 600; overflow-wrap: anywhere; }
.copy-label { margin-left: auto; font-style: normal; font-size: .8rem; color: var(--lilac); }

.footer {
  max-width: 1280px; margin: 0 auto; padding: 32px clamp(16px, 5vw, 64px) 96px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  color: var(--muted); font-size: .88rem; border-top: 1px solid var(--line);
}
.footer a:hover { color: var(--text); }
.footer-links { display: flex; gap: 20px; }

/* LEGAL + 404 */
.legal { max-width: 760px; }
.legal h1 { font-size: clamp(2rem, 5vw, 3rem); margin: 10px 0 0; }
.legal h2 { font-size: 1.2rem; margin: 36px 0 10px; }
.legal p, .legal li { color: var(--muted); }
.legal ul { padding-left: 20px; display: grid; gap: 10px; }
.legal strong { color: var(--text); }
.notfound { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 12px; }
.notfound h1 { font-size: clamp(4rem, 14vw, 8rem); }
.notfound .sub { margin-bottom: 20px; }

/* LIGHTBOX */
.lightbox {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center;
  background: rgba(6, 4, 12, .92); backdrop-filter: blur(8px); padding: 16px;
}
.lightbox[hidden] { display: none; }
.lightbox figure { max-width: min(1200px, 100%); }
.lightbox img { max-height: 82vh; border-radius: 12px; margin: 0 auto; }
.lightbox figcaption { text-align: center; color: var(--muted); margin-top: 12px; }
.lb-close { position: absolute; top: 16px; right: 20px; font-size: 1.4rem; color: var(--text); }
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px; border-radius: 50%; font-size: 2rem; line-height: 1;
  background: rgba(139, 92, 246, .25); color: #fff;
}
.lb-nav:hover { background: var(--purple); }
.prev { left: 16px; } .next { right: 16px; }

/* DISCORD */
.btn-discord { gap: 10px; background: linear-gradient(135deg, #5865f2, var(--purple-2)); }
.discord-ico { width: 20px; height: 20px; }
.contact-card.featured {
  border-color: rgba(168, 85, 247, .6);
  background: linear-gradient(135deg, rgba(88, 101, 242, .25), rgba(139, 92, 246, .2));
  animation: pulse 3s ease-in-out infinite;
}
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(139, 92, 246, .12), 0 10px 40px rgba(139, 92, 246, .35); } }

/* ===== ANIMATIONS ===== */
.particles { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.cursor-glow {
  position: fixed; left: 0; top: 0; width: 400px; height: 400px; border-radius: 50%; z-index: -1;
  pointer-events: none; opacity: 0; transition: opacity .6s;
  background: radial-gradient(circle, rgba(168, 85, 247, .16), transparent 65%);
}
.cursor-glow.on { opacity: 1; }

.nav { transition: background .3s, padding .3s, box-shadow .3s; }
.nav.scrolled { background: rgba(11, 8, 20, .88); box-shadow: 0 10px 40px rgba(0, 0, 0, .35); }

/* scroll reveal (only when JS + motion are on) */
.fx .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s cubic-bezier(.2, .7, .2, 1), transform .9s cubic-bezier(.2, .7, .2, 1); }
.fx .reveal.in { opacity: 1; transform: none; }

/* hero entrance + float */
.tile { animation: tile-in 1.1s cubic-bezier(.2, .8, .2, 1) both, float 7s ease-in-out 1.1s infinite; transition: translate .2s linear; }
.t1 { animation-delay: .15s, 1.2s; }
.t2 { animation-delay: .35s, 2s; }
.t3 { animation-delay: .55s, 2.8s; }
@keyframes tile-in { from { opacity: 0; transform: translateY(40px) scale(.9) rotate(-3deg); } }
.hero-logo { animation: logo-glow 4s ease-in-out infinite; }
@keyframes logo-glow { 50% { filter: drop-shadow(0 12px 50px rgba(168, 85, 247, .8)); } }

/* animated gradient text */
.grad { background-size: 200% auto; animation: shimmer 6s linear infinite; }
@keyframes shimmer { to { background-position: 200% center; } }

/* button shine */
.btn { position: relative; overflow: hidden; }
.btn::after {
  content: ""; position: absolute; top: 0; left: -120%; width: 60%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .28), transparent);
  transform: skewX(-20deg); transition: left .7s;
}
.btn:hover::after { left: 140%; }

/* 3D tilt + light spot on cards */
.card, .service {
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .2s ease-out, border-color .3s, box-shadow .3s;
}
.card:hover, .service:hover { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-6px); }
.card::after, .service::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(300px circle at var(--mx, 50%) var(--my, 50%), rgba(216, 180, 254, .14), transparent 60%);
}
.service { position: relative; }
.card:hover::after, .service:hover::after { opacity: 1; }
.service .ico { transition: transform .4s cubic-bezier(.3, 1.6, .5, 1); }
.service:hover .ico { transform: scale(1.12) rotate(-6deg); }
.process li { transition: transform .3s, background .3s; }
.process li:hover { transform: translateY(-4px); background: linear-gradient(180deg, rgba(139, 92, 246, .16), transparent); }

/* music button */
.music-btn {
  position: fixed; right: 20px; bottom: 20px; z-index: 60;
  display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px 10px 14px; border-radius: 999px;
  background: rgba(23, 17, 38, .85); border: 1px solid var(--line); backdrop-filter: blur(10px);
  font-size: .85rem; font-weight: 600; color: var(--muted);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .4); transition: border-color .3s, color .3s, transform .2s;
}
.music-btn[hidden] { display: none; }
.music-btn:hover { transform: translateY(-2px); color: var(--text); border-color: rgba(139, 92, 246, .6); }
.music-btn.on { color: var(--text); border-color: var(--purple); box-shadow: 0 10px 30px rgba(139, 92, 246, .35); }
.eq { display: inline-flex; align-items: flex-end; gap: 3px; height: 16px; }
.eq i { width: 3px; height: 4px; border-radius: 2px; background: var(--lilac); transition: height .3s; }
.music-btn.on .eq i { animation: eq 1s ease-in-out infinite; }
.music-btn.on .eq i:nth-child(2) { animation-delay: -.3s; }
.music-btn.on .eq i:nth-child(3) { animation-delay: -.6s; }
.music-btn.on .eq i:nth-child(4) { animation-delay: -.15s; }
@keyframes eq { 0%, 100% { height: 4px; } 50% { height: 16px; } }

/* RESPONSIVE */
@media (max-width: 1000px) {
  .services, .process { grid-template-columns: repeat(2, 1fr); }
  .grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; }
  .hero-art { max-width: 460px; width: 100%; margin: 0 auto; }
  .contact { grid-template-columns: 1fr; }
  .menu-btn { display: flex; }
  .brand-logo { height: 34px; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 4px; padding: 12px 16px 20px;
    background: rgba(11, 8, 20, .97); border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a:not(.btn) { padding: 12px 8px; font-size: 1.05rem; color: var(--text); border-bottom: 1px solid var(--line); }
  .nav-links .btn { margin-top: 10px; padding: 14px; }
  .hero { padding-top: 32px; }
  .hero-logo { width: min(320px, 80%); }
  .play { padding: 12px 18px; font-size: .9rem; }
}
@media (max-width: 560px) {
  .services, .process, .grid { grid-template-columns: 1fr; }
  .lb-nav { width: 40px; height: 40px; font-size: 1.6rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
