:root {
  --bg: #120a20;
  --bg-alt: #1a0f2e;
  --card: #231540;
  --card-border: rgba(214, 140, 255, 0.18);
  --text: #f3eaff;
  --muted: #b9a6d6;
  --pink: #ff5fc8;
  --violet: #9b5cff;
  --cyan: #5ff3ff;
  --grad: linear-gradient(135deg, var(--pink), var(--violet));
  --radius: 14px;
  --pixel: "Pixelify Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Inter", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: var(--pink); }

h1, h2, h3, .brand { font-family: var(--pixel); font-weight: 700; line-height: 1.1; }
h2 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 0.75rem; }
h3 { font-size: 1.35rem; margin-bottom: 0.4rem; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--cyan);
  margin-bottom: 0.6rem;
}
.lead { color: var(--muted); font-size: 1.1rem; max-width: 640px; margin-bottom: 2.5rem; }

.container { width: min(1180px, 100% - 32px); margin: 0 auto; }
.container.narrow { width: min(760px, 100% - 32px); }
.section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  font: 600 1rem "Inter", sans-serif;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 28px rgba(255, 95, 200, .35); }
.btn-primary:hover { box-shadow: 0 10px 36px rgba(255, 95, 200, .55); }
.btn-ghost { background: rgba(255,255,255,.06); color: var(--text); border-color: rgba(255,255,255,.25); backdrop-filter: blur(6px); }
.btn-ghost:hover { background: rgba(255,255,255,.12); }
.btn-small { padding: .5rem 1.1rem; font-size: .9rem; background: var(--grad); color: #fff !important; }

/* Nav */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px max(16px, calc((100% - 1180px) / 2));
  transition: background .3s ease, padding .3s ease, box-shadow .3s ease;
}
.nav.scrolled {
  background: rgba(18, 10, 32, .85);
  backdrop-filter: blur(12px);
  padding-top: 12px; padding-bottom: 12px;
  box-shadow: 0 1px 0 var(--card-border);
}
.brand { font-size: 1.6rem; color: #fff; text-decoration: none; }
.brand span, h1 span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav-links { display: flex; align-items: center; gap: 1.6rem; }
.nav-links a { color: var(--text); text-decoration: none; font-weight: 500; font-size: .95rem; opacity: .85; }
.nav-links a:hover { opacity: 1; color: var(--pink); }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: #fff; margin: 5px 0; transition: .3s; }

/* Hero */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: grid; place-items: center; text-align: center;
  padding: 120px 16px 80px; overflow: hidden;
}
.hero-bg {
  position: absolute; inset: -20px;
  background-size: cover; background-position: center 30%;
  animation: drift 30s ease-in-out infinite alternate;
}
.hero-overlay {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at center, rgba(18,10,32,.35) 0%, rgba(18,10,32,.75) 70%),
    linear-gradient(to bottom, rgba(18,10,32,.3) 0%, rgba(18,10,32,.1) 40%, var(--bg) 100%);
}
@keyframes drift { from { transform: scale(1.05) translateY(0); } to { transform: scale(1.12) translateY(-10px); } }
.hero-content { position: relative; z-index: 2; max-width: 760px; }
.hero h1 {
  font-size: clamp(3.5rem, 12vw, 7.5rem);
  text-shadow: 0 6px 40px rgba(155, 92, 255, .6);
  margin-bottom: 1rem;
}
.tagline { font-size: clamp(1.05rem, 2.4vw, 1.3rem); color: #e8dcff; margin: 0 auto 2rem; max-width: 560px; text-shadow: 0 2px 12px rgba(0,0,0,.5); }

.brand img { height: 44px; width: auto; filter: drop-shadow(0 2px 8px rgba(155,92,255,.5)); transition: height .3s; }
.nav.scrolled .brand img { height: 36px; }
.hero-logo {
  width: min(560px, 88vw); height: auto; margin: 0 auto;
  filter: drop-shadow(0 8px 40px rgba(155, 92, 255, .7));
  animation: float 6s ease-in-out infinite;
}
@keyframes float { 50% { transform: translateY(-10px); } }
.status {
  display: inline-flex; align-items: center; gap: .55rem; margin-bottom: 1rem;
  padding: .5rem 1.1rem; border-radius: 999px; font-weight: 600;
  background: rgba(35, 21, 64, .75); border: 1px solid var(--card-border);
  backdrop-filter: blur(8px);
}
.status[hidden] { display: none; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: #888; }
.dot.online { background: #4dff8a; box-shadow: 0 0 10px #4dff8a; animation: pulse 2s infinite; }
.dot.offline { background: #ff5f6d; }
@keyframes pulse { 50% { box-shadow: 0 0 2px #4dff8a; } }
.badges { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; margin-bottom: 2rem; }
.badge {
  padding: .4rem 1rem; border-radius: 999px; font-size: .85rem; font-weight: 600;
  background: rgba(35, 21, 64, .75); border: 1px solid var(--card-border);
  backdrop-filter: blur(8px);
}

.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.scroll-cue {
  position: absolute; bottom: 28px; left: 50%; z-index: 2;
  width: 26px; height: 42px; margin-left: -13px;
  border: 2px solid rgba(255,255,255,.5); border-radius: 14px;
}
.scroll-cue::after {
  content: ""; position: absolute; left: 50%; top: 8px;
  width: 4px; height: 8px; margin-left: -2px; border-radius: 2px;
  background: #fff; animation: cue 1.8s infinite;
}
@keyframes cue { 0% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(14px); } }

/* Features */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.25rem; }
.feature {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: transform .2s, border-color .2s;
}
.feature:hover { transform: translateY(-4px); border-color: rgba(255, 95, 200, .5); }
.feature-icon { font-size: 2rem; margin-bottom: .75rem; }
.feature p { color: var(--muted); }

/* Tour */
.tour { display: flex; flex-direction: column; gap: 4rem; }
.tour-item { display: grid; grid-template-columns: 1.3fr 1fr; gap: 3rem; align-items: center; }
.tour-item.reverse img { order: 2; }
.tour-item img {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--card-border);
  box-shadow: 0 20px 60px rgba(0,0,0,.45), 0 0 0 1px rgba(155,92,255,.15);
}
.tour-num { font-family: var(--pixel); font-size: 3rem; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; display: block; margin-bottom: .25rem; }
.tour-text h3 { font-size: 1.9rem; margin-bottom: .75rem; }
.tour-text p { color: var(--muted); font-size: 1.05rem; }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 220px; gap: 12px; }
.g-item {
  position: relative; overflow: hidden; border: 0; padding: 0; cursor: zoom-in;
  border-radius: 10px; background: var(--card);
}
.g-item.g-wide { grid-column: span 2; }
.g-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease, filter .3s; }
.g-item:hover img { transform: scale(1.06); filter: brightness(1.1) saturate(1.1); }
.g-item::after {
  content: ""; position: absolute; inset: 0; border-radius: 10px;
  box-shadow: inset 0 0 0 2px transparent; transition: box-shadow .2s;
}
.g-item:hover::after { box-shadow: inset 0 0 0 2px var(--pink); }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.25rem; margin-top: 2rem; }
.step { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 2rem 1.75rem; }
.step-num {
  display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 1rem;
  border-radius: 10px; background: var(--grad);
  font-family: var(--pixel); font-size: 1.4rem; color: #fff;
}
.step p { color: var(--muted); }
.step strong { color: var(--text); word-break: break-all; }

/* Rules */
.rules-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 2rem; }
.rules-title { color: var(--pink); margin-bottom: 1rem; }
.rules { list-style: none; counter-reset: r; display: grid; gap: .75rem; }
.rules li {
  counter-increment: r; position: relative;
  background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius);
  padding: 1.1rem 1.25rem 1.1rem 4rem; color: var(--muted);
}
.rules li::before {
  content: counter(r); position: absolute; left: 1.1rem; top: 50%; transform: translateY(-50%);
  font-family: var(--pixel); font-size: 1.5rem; color: var(--pink);
}
.rules strong { color: var(--text); }

/* CTA */
.cta {
  position: relative; padding: 120px 16px; text-align: center; overflow: hidden;
  background: linear-gradient(rgba(18,10,32,.65), rgba(18,10,32,.85)), var(--cta-bg) center / cover;
}
.cta-inner { position: relative; max-width: 640px; margin: 0 auto; }
.cta p { color: #e8dcff; font-size: 1.15rem; margin-bottom: 2rem; }

/* Footer */
.footer { padding: 40px 16px; text-align: center; border-top: 1px solid var(--card-border); font-size: .9rem; }
.muted { color: var(--muted); margin-top: .3rem; }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(10, 5, 20, .94);
  display: grid; place-items: center;
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox img { max-width: 92vw; max-height: 86vh; border-radius: 10px; box-shadow: 0 20px 80px rgba(155,92,255,.3); }
.lb-close, .lb-nav {
  position: absolute; background: rgba(255,255,255,.08); color: #fff; border: 0; cursor: pointer;
  border-radius: 50%; width: 52px; height: 52px; font-size: 2rem; line-height: 1;
  display: grid; place-items: center; transition: background .2s;
}
.lb-close:hover, .lb-nav:hover { background: var(--violet); }
.lb-close { top: 20px; right: 20px; }
.lb-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 20px; top: 50%; transform: translateY(-50%); }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* Responsive */
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed; inset: 0 0 auto 0; top: 0;
    flex-direction: column; gap: 1.4rem;
    padding: 90px 16px 36px;
    background: rgba(18, 10, 32, .97);
    transform: translateY(-100%); transition: transform .35s ease;
    z-index: -1;
  }
  .nav-links.open { transform: none; }
  .nav-links a { font-size: 1.15rem; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .section { padding: 72px 0; }
  .tour { gap: 3rem; }
  .tour-item { grid-template-columns: 1fr; gap: 1.25rem; }
  .tour-item.reverse img { order: 0; }

  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 160px; }
  .lb-nav { width: 42px; height: 42px; }
  .lb-prev { left: 8px; } .lb-next { right: 8px; }
}
@media (max-width: 520px) {
  .gallery { grid-template-columns: 1fr; grid-auto-rows: 200px; }
  .g-item.g-wide { grid-column: auto; }
}

/* ---------- Multi-page additions ---------- */
.nav-links a.active { color: var(--pink); opacity: 1; }

/* Sub-page banner */
.page-hero {
  position: relative; text-align: center;
  padding: 160px 16px 80px;
  background: linear-gradient(rgba(18,10,32,.55), var(--bg)), var(--img) center 35% / cover;
}
.page-hero h1 { font-size: clamp(2.8rem, 9vw, 5rem); text-shadow: 0 6px 40px rgba(155, 92, 255, .6); margin-bottom: .75rem; }
.page-hero .lead { margin: 0 auto; color: #e8dcff; }
.page-hero + .section { padding-top: 40px; }

/* Home: link cards */
.link-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 1.25rem; margin-top: 2rem; }
.link-card {
  position: relative; display: flex; align-items: flex-end; min-height: 280px;
  border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--text);
  border: 1px solid var(--card-border);
  background: linear-gradient(to top, rgba(18,10,32,.95) 10%, rgba(18,10,32,.2) 70%), var(--img) center / cover;
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.link-card:hover { transform: translateY(-4px); border-color: var(--pink); box-shadow: 0 16px 40px rgba(255,95,200,.2); }
.link-card-text { padding: 1.75rem; }
.link-card h3 { font-size: 1.8rem; }
.link-card p { color: var(--muted); margin-bottom: .75rem; }
.link-card-go { color: var(--pink); font-weight: 600; }

/* Staff */
.staff-grid { display: flex; flex-direction: column; gap: 3.5rem; }
.staff-tier { --role: var(--violet); }
.staff-tier-title {
  display: flex; align-items: center; gap: 1rem; justify-content: center;
  font-size: clamp(1.5rem, 4vw, 2rem); color: var(--role); margin-bottom: 1.5rem; text-align: center;
}
.staff-tier-title::before, .staff-tier-title::after {
  content: ""; flex: 1; max-width: 220px; height: 2px;
  background: linear-gradient(to right, transparent, var(--role));
}
.staff-tier-title::after { background: linear-gradient(to left, transparent, var(--role)); }
.staff-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.25rem; }
.staff-row .staff-card { width: 240px; }
.staff-tier.role-owner .staff-card { width: 280px; box-shadow: 0 0 40px color-mix(in srgb, var(--role) 25%, transparent); border-color: color-mix(in srgb, var(--role) 50%, transparent); }
.staff-card {
  --role: var(--violet);
  background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius);
  padding: 1.5rem 1.25rem 1.75rem; text-align: center;
  transition: transform .2s, border-color .2s;
}
.staff-card:hover { transform: translateY(-4px); border-color: var(--role); }
.role-owner { --role: var(--pink); }
.role-admin { --role: #ff7a5c; }
.role-moderator, .role-mod { --role: var(--cyan); }
.role-helper { --role: #4dff8a; }
.role-builder { --role: #ffd35c; }
.staff-skin {
  height: 260px; display: grid; place-items: center; margin-bottom: 1rem; cursor: grab;
  border-radius: 10px;
  background: radial-gradient(circle at 50% 60%, color-mix(in srgb, var(--role) 30%, transparent), transparent 70%);
}
.staff-skin:active { cursor: grabbing; }
.staff-skin canvas { display: block; }
.staff-skin img { height: 180px; width: auto; image-rendering: pixelated; filter: drop-shadow(0 8px 16px rgba(0,0,0,.5)); }
.staff-role {
  display: inline-block; padding: .2rem .8rem; border-radius: 999px; margin-bottom: .5rem;
  font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em;
  color: var(--role); border: 1px solid var(--role);
}
.staff-card h3 { word-break: break-word; font-family: "Inter", sans-serif; font-size: 1.15rem; }
.staff-edition { display: inline-block; margin-bottom: .4rem; font-size: .75rem; color: var(--muted); }
.staff-card p { color: var(--muted); font-size: .95rem; }

.note {
  margin-top: 3rem; padding: 2rem; text-align: center;
  background: var(--card); border: 1px dashed var(--card-border); border-radius: var(--radius);
}
.note p { color: var(--muted); }

/* Gallery filters + captions */
.filters { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; margin-bottom: 2rem; }
.filter {
  padding: .6rem 1.2rem; border-radius: 999px; cursor: pointer;
  font: 600 .95rem "Inter", sans-serif; color: var(--text);
  background: var(--card); border: 1px solid var(--card-border);
  transition: background .2s, border-color .2s;
}
.filter:hover { border-color: var(--pink); }
.filter.active { background: var(--grad); border-color: transparent; }
.filter .count { opacity: .6; font-size: .8rem; margin-left: .2rem; }
.g-caption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 2rem .9rem .7rem;
  text-align: left; color: #fff; font: 600 .9rem "Inter", sans-serif;
  background: linear-gradient(transparent, rgba(10,5,20,.85));
  opacity: 0; transform: translateY(8px); transition: .25s;
}
.g-caption em { font-weight: 400; color: var(--muted); }
.g-item:hover .g-caption, .g-item:focus-visible .g-caption { opacity: 1; transform: none; }
@media (hover: none) { .g-caption { opacity: 1; transform: none; } }

.lb-figure { display: flex; flex-direction: column; align-items: center; gap: .75rem; }
.lb-figure img { max-height: 80vh; }
#lbCaption { color: var(--muted); text-align: center; padding: 0 16px; }
