:root {
  --bg: #0a0a0f;
  --bg-2: #0d0d13;
  --panel: #111119;
  --panel-2: #14141d;
  --stroke: rgba(255, 255, 255, 0.08);
  --stroke-2: rgba(255, 255, 255, 0.14);
  --gold: #ffd700;
  --gold-2: #ffa500;
  --gold-soft: rgba(255, 215, 0, 0.12);
  --text: #f5f5f7;
  --text-dim: #9a9aa8;
  --text-faint: #62626f;
  --mono: 'Geist Mono', ui-monospace, monospace;
  --sans: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --radius: 8px;
  --radius-sm: 5px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.wrap { max-width: 1140px; margin: 0 auto; padding: 0 28px; position: relative; z-index: 2; }
a { color: inherit; text-decoration: none; }

.noise {
  position: fixed; inset: 0; pointer-events: none; z-index: 1; opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.scroll-progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 100%; z-index: 60;
  background: linear-gradient(90deg, var(--gold-2), var(--gold));
  transform: scaleX(0); transform-origin: 0 50%; will-change: transform;
}

/* header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 10, 15, 0.72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--stroke);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { font-weight: 700; font-size: 1.1rem; letter-spacing: -0.01em; display: flex; align-items: center; gap: 8px; }
.brand-mark { color: var(--gold); font-family: var(--mono); }
.nav { display: flex; align-items: center; gap: 30px; font-size: 0.9rem; color: var(--text-dim); }
.nav a { transition: color 0.2s ease; }
.nav a:hover { color: var(--text); }
.nav-cta {
  color: #0a0a0f !important; background: var(--gold);
  padding: 9px 18px; border-radius: var(--radius-sm); font-weight: 600;
  transition: background 0.2s ease, transform 0.2s ease;
}
.nav-cta:hover { background: #ffe14d; transform: translateY(-1px); }

/* hero */
.hero { position: relative; padding: 150px 0 120px; overflow: hidden; border-bottom: 1px solid var(--stroke); }
.hero-glow {
  position: absolute; top: -20%; left: 50%; transform: translateX(-50%);
  width: 900px; height: 600px; z-index: 0; pointer-events: none;
  background: radial-gradient(50% 50% at 50% 50%, rgba(255, 215, 0, 0.10), transparent 70%);
}
.hero-grid-lines {
  position: absolute; inset: 0; z-index: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black, transparent);
}
.hero-inner { position: relative; z-index: 2; }
.eyebrow {
  font-family: var(--mono); font-size: 0.8rem; margin: 0 0 22px; letter-spacing: 0.02em;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 15px; border-radius: 999px;
  color: var(--gold); background: var(--gold-soft); border: 1px solid rgba(255, 215, 0, 0.22);
}
.blink { animation: blink 1.1s step-start infinite; }
@keyframes blink { 50% { opacity: 0; } }

.hero h1 {
  font-family: var(--sans); font-weight: 700;
  font-size: clamp(2.4rem, 5.6vw, 4rem);
  line-height: 1.08; letter-spacing: -0.03em;
  margin: 0 0 24px; max-width: 860px; color: #fff;
}
.gradient-text { color: #fff; }
.gradient-text .hl { color: var(--gold); }

.hero-sub { color: var(--text-dim); font-size: 1.12rem; max-width: 640px; margin: 0 0 38px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 26px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 0.96rem; cursor: pointer;
  border: 1px solid transparent; font-family: var(--sans);
  transition: transform 0.18s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--gold); color: #0a0a0f; box-shadow: 0 8px 24px -10px rgba(255, 215, 0, 0.5); }
.btn-primary:hover { background: #ffe14d; box-shadow: 0 12px 30px -10px rgba(255, 215, 0, 0.7); }
.btn-ghost { border-color: var(--stroke-2); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

.hero-status { margin: 28px 0 0; font-size: 0.86rem; color: var(--text-dim); display: inline-flex; align-items: center; gap: 10px; }
.status-dot {
  width: 9px; height: 9px; border-radius: 50%; background: #43d17a;
  box-shadow: 0 0 0 0 rgba(67, 209, 122, 0.6); animation: pulseDot 2s ease-out infinite;
}
@keyframes pulseDot {
  0% { box-shadow: 0 0 0 0 rgba(67, 209, 122, 0.5); }
  70% { box-shadow: 0 0 0 10px rgba(67, 209, 122, 0); }
  100% { box-shadow: 0 0 0 0 rgba(67, 209, 122, 0); }
}

/* stats */
.stats { position: relative; z-index: 2; border-bottom: 1px solid var(--stroke); background: var(--bg-2); }
.stats-inner { display: grid; grid-template-columns: repeat(4, 1fr); padding: 42px 28px; }
.stat { display: flex; flex-direction: column; gap: 6px; padding: 0 26px; border-left: 1px solid var(--stroke); }
.stat:first-child { border-left: none; padding-left: 0; }
.stat-num { font-weight: 700; font-size: 1.9rem; color: var(--gold); letter-spacing: -0.02em; }
.stat-label { font-size: 0.82rem; color: var(--text-dim); }

/* tools band */
.toolbar-band { position: relative; z-index: 2; border-bottom: 1px solid var(--stroke); background: var(--bg); padding: 24px 0; }
.toolbar-inner { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.toolbar-label { font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-faint); white-space: nowrap; }
.toolbar-pills { display: flex; flex-wrap: wrap; gap: 10px; }
.toolbar-pills span {
  font-family: var(--mono); font-size: 0.78rem; color: var(--text-dim);
  padding: 7px 14px; border-radius: 999px; border: 1px solid var(--stroke); background: var(--panel);
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.toolbar-pills span:hover { color: var(--gold); border-color: rgba(255, 215, 0, 0.35); transform: translateY(-2px); }

/* sections */
.section { padding: 110px 0; position: relative; z-index: 2; }
.section.alt { background: var(--bg-2); border-top: 1px solid var(--stroke); border-bottom: 1px solid var(--stroke); }
.section-title {
  font-weight: 700; font-size: 2rem; letter-spacing: -0.02em;
  display: flex; align-items: center; gap: 14px; margin: 0 0 12px;
}
.section-title .tag {
  font-family: var(--mono); font-size: 0.78rem; color: var(--gold);
  border: 1px solid rgba(255, 215, 0, 0.3); background: var(--gold-soft);
  padding: 4px 9px; border-radius: var(--radius-sm);
}
.section-sub { color: var(--text-dim); margin: 0 0 52px; max-width: 640px; font-size: 1.02rem; }
.more-label { margin: 60px 0 30px; }

/* card base */
.config-item, .project-card, .server-card, .video-card, .marquee-pill {
  background: var(--panel); border: 1px solid var(--stroke);
}

.tilt { transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease; }
.tilt:hover { transform: translateY(-5px); }

/* config gallery */
.config-gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.config-item {
  position: relative; border-radius: var(--radius); overflow: hidden; cursor: zoom-in;
}
.config-item:hover { border-color: rgba(255, 215, 0, 0.4); box-shadow: 0 18px 40px -22px rgba(255, 215, 0, 0.28); }
.config-item img { width: 100%; display: block; aspect-ratio: 4/3; object-fit: cover; transition: transform 0.5s ease; }
.config-item:hover img { transform: scale(1.06); }
.config-cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 14px;
  font-family: var(--mono); font-size: 0.72rem; color: #fff;
  background: linear-gradient(to top, rgba(10,10,15,0.95), transparent);
}

/* marquee */
.marquee-wrap { overflow: hidden; position: relative; padding: 10px 0; }
.marquee-wrap::before, .marquee-wrap::after { content: ""; position: absolute; top: 0; bottom: 0; width: 110px; z-index: 3; }
.marquee-wrap::before { left: 0; background: linear-gradient(to right, var(--bg-2), transparent); }
.marquee-wrap::after { right: 0; background: linear-gradient(to left, var(--bg-2), transparent); }
.marquee { display: flex; gap: 14px; width: max-content; padding: 7px 0; }
.marquee-left { animation: scrollLeft 66s linear infinite; }
.marquee-right { animation: scrollRight 66s linear infinite; }
.marquee-wrap:hover .marquee { animation-play-state: paused; }
.marquee-pill {
  font-family: var(--mono); font-size: 0.82rem; color: var(--text-dim);
  padding: 9px 18px; border-radius: 999px; white-space: nowrap;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.marquee-pill:hover { color: var(--gold); border-color: rgba(255, 215, 0, 0.4); }
@keyframes scrollLeft { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
@keyframes scrollRight { 0% { transform: translateX(-50%); } 100% { transform: translateX(0); } }

/* featured */
.featured-list { display: flex; flex-direction: column; gap: 90px; margin-bottom: 30px; }
.feature-card { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 52px; align-items: center; }
.feature-card.reverse { direction: rtl; }
.feature-card.reverse > * { direction: ltr; }
.feature-media {
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--stroke);
  background: #000; box-shadow: 0 24px 50px -26px rgba(0,0,0,0.7); cursor: zoom-in;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.feature-media:hover { border-color: rgba(255, 215, 0, 0.4); box-shadow: 0 24px 54px -22px rgba(255, 215, 0, 0.25); }
.feature-media img { width: 100%; display: block; }
.feature-kicker { font-family: var(--mono); font-size: 0.78rem; color: var(--gold); letter-spacing: 0.03em; margin: 0 0 10px; }
.feature-body h3 { font-weight: 700; font-size: 1.9rem; margin: 0 0 16px; letter-spacing: -0.02em; }
.feature-body p { color: var(--text-dim); margin: 0 0 20px; }
.feature-tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 9px; }
.feature-tags li {
  font-family: var(--mono); font-size: 0.76rem; color: var(--text-dim);
  border: 1px solid var(--stroke); background: var(--panel); padding: 6px 12px; border-radius: 999px;
}

/* project grid */
.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.project-card { border-radius: var(--radius); padding: 28px; }
.project-card:hover { border-color: rgba(255, 215, 0, 0.35); box-shadow: 0 18px 40px -24px rgba(255, 215, 0, 0.25); }
.project-kicker { font-family: var(--mono); font-size: 0.7rem; color: var(--gold-2); margin: 0 0 12px; letter-spacing: 0.03em; }
.project-card h4 { font-weight: 600; margin: 0 0 12px; font-size: 1.2rem; }
.project-card p { color: var(--text-dim); font-size: 0.9rem; margin: 0 0 18px; }
.project-meta { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.project-meta li { font-family: var(--mono); font-size: 0.7rem; color: var(--text-faint); }
.project-meta li::before { content: "» "; color: var(--gold); }

/* servers */
.server-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.server-card {
  border-radius: var(--radius); padding: 30px 20px;
  font-weight: 600; font-size: 1.05rem; text-align: center;
}
.server-card:hover { border-color: rgba(255, 215, 0, 0.4); color: var(--gold); box-shadow: 0 16px 40px -24px rgba(255, 215, 0, 0.3); }
.server-card-nda { color: var(--text-faint); font-weight: 500; font-size: 0.9rem; }
.server-card-nda:hover { color: var(--text-dim); border-color: var(--stroke); box-shadow: none; }

/* videos */
.video-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.video-card { position: relative; border-radius: var(--radius); overflow: hidden; cursor: pointer; aspect-ratio: 16/9; }
.video-card:hover { border-color: rgba(255, 215, 0, 0.4); }
.video-card img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.5s ease, filter 0.3s ease; }
.video-card:hover img { transform: scale(1.06); filter: brightness(0.5); }
.play-btn { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.25s ease; }
.play-btn::before {
  content: "▶"; font-size: 1rem; color: #0a0a0f;
  width: 54px; height: 54px; display: flex; align-items: center; justify-content: center; padding-left: 4px;
  border-radius: 50%; background: var(--gold); box-shadow: 0 8px 24px -6px rgba(255, 215, 0, 0.7);
}
.video-card:hover .play-btn { opacity: 1; }

/* video modal */
.video-modal { position: fixed; inset: 0; z-index: 100; background: rgba(6, 6, 10, 0.9); backdrop-filter: blur(6px); display: none; align-items: center; justify-content: center; padding: 40px; }
.video-modal.open { display: flex; }
.video-modal-inner { position: relative; width: 100%; max-width: 940px; }
.video-modal-frame { position: relative; width: 100%; aspect-ratio: 16/9; background: #000; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--stroke); }
.video-modal-frame iframe { width: 100%; height: 100%; border: 0; }
.video-modal-close { position: absolute; top: -46px; right: 0; background: none; border: none; color: #fff; font-size: 2rem; cursor: pointer; line-height: 1; }

/* image lightbox */
.img-lightbox {
  position: fixed; inset: 0; z-index: 110; background: rgba(6, 6, 10, 0.94);
  backdrop-filter: blur(8px); display: none; align-items: center; justify-content: center;
  padding: 48px; opacity: 0; transition: opacity 0.2s ease;
}
.img-lightbox.open { display: flex; opacity: 1; }
.lightbox-fig { margin: 0; max-width: 92vw; max-height: 88vh; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.lightbox-fig img {
  max-width: 92vw; max-height: 80vh; width: auto; height: auto;
  border-radius: var(--radius); border: 1px solid var(--stroke);
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.8);
  transform: scale(0.97); transition: transform 0.25s ease;
}
.img-lightbox.open .lightbox-fig img { transform: scale(1); }
.lightbox-fig figcaption { font-family: var(--mono); font-size: 0.82rem; color: var(--text-dim); text-align: center; }
.lightbox-close {
  position: absolute; top: 22px; right: 28px; width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.06); border: 1px solid var(--stroke); border-radius: 50%;
  color: #fff; font-size: 1.7rem; line-height: 1; cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.lightbox-close:hover { background: var(--gold-soft); border-color: var(--gold); transform: rotate(90deg); }

/* about */
.about-inner { max-width: 760px; }
.about-text { color: var(--text-dim); font-size: 1.05rem; margin: 0 0 22px; }
.about-text strong { color: var(--text); }

/* contact */
.contact { text-align: center; }
.contact-inner { max-width: 600px; margin: 0 auto; }
.contact h2 { font-weight: 700; font-size: 2.3rem; margin: 0 0 18px; letter-spacing: -0.02em; }
.contact p { color: var(--text-dim); margin: 0 0 34px; font-size: 1.05rem; }
.discord-icon { width: 18px; height: 18px; filter: brightness(0); }
.copy-hint { font-size: 0.72rem; opacity: 0.65; font-weight: 400; }

/* footer */
.site-footer { border-top: 1px solid var(--stroke); padding: 44px 0 30px; position: relative; z-index: 2; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; }
.footer-left { display: flex; flex-direction: column; gap: 6px; }
.footer-brand { font-weight: 700; font-size: 1.05rem; display: inline-flex; align-items: center; gap: 8px; }
.footer-dim { font-size: 0.82rem; color: var(--text-faint); }
.footer-socials { display: flex; gap: 12px; }
.social-link {
  width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm); border: 1px solid var(--stroke); background: var(--panel);
  cursor: pointer; transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.social-link:hover { transform: translateY(-3px); border-color: var(--gold); background: var(--gold-soft); }
.social-link img { width: 20px; height: 20px; filter: brightness(0) invert(1); opacity: 0.8; }
.social-link:hover img { opacity: 1; }
.footer-copy { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--stroke); font-family: var(--mono); font-size: 0.74rem; color: var(--text-faint); }

/* scroll reveal */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

@media (max-width: 980px) {
  .config-gallery { grid-template-columns: repeat(2, 1fr); }
  .project-grid { grid-template-columns: repeat(2, 1fr); }
  .server-grid { grid-template-columns: repeat(2, 1fr); }
  .video-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .nav a:not(.nav-cta) { display: none; }
  .stats-inner { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .stat { border-left: none; padding-left: 0; }
  .feature-card, .feature-card.reverse { grid-template-columns: 1fr; direction: ltr; }
  .config-gallery { grid-template-columns: 1fr 1fr; }
  .project-grid, .server-grid, .video-grid { grid-template-columns: 1fr; }
}
