@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Share+Tech+Mono&family=Barlow:wght@300;400;500;600&display=swap');

:root {
  --bg:        #0c0909;
  --bg2:       #110d0d;
  --bg3:       #160f0f;
  --surface:   #1e1418;
  --border:    #2d1a1d;
  --accent:    #dd1515;
  --accent2:   #ff3333;
  --gold:      #f0a020;
  --teal:      #ff1177;
  --text:      #d8dce8;
  --muted:     #6a7080;
  --white:     #f0f2f8;
  --mono:      'Share Tech Mono', monospace;
  --display:   'Bebas Neue', sans-serif;
  --body:      'Barlow', sans-serif;
  --radius:    4px;
  --glow-red:  0 0 20px rgba(221,21,21,0.4);
  --glow-teal: 0 0 20px rgba(255,17,119,0.35);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ─── SCANLINE OVERLAY ─── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.06) 2px,
    rgba(0,0,0,0.06) 4px
  );
  pointer-events: none;
  z-index: 9999;
}

/* ─── NOISE TEXTURE ─── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9998;
  opacity: 0.4;
}

/* ─── TYPOGRAPHY ─── */
h1, h2, h3, h4 { font-family: var(--display); letter-spacing: 0.06em; line-height: 1; }
h1 { font-size: clamp(3rem, 8vw, 7rem); color: var(--white); }
h2 { font-size: clamp(2rem, 4vw, 3.5rem); color: var(--white); }
h3 { font-size: clamp(1.4rem, 2.5vw, 2rem); color: var(--white); }
h4 { font-size: 1.2rem; color: var(--text); }
p { font-weight: 300; color: var(--text); }
a { color: var(--teal); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--white); }
code, .mono { font-family: var(--mono); }

/* ─── LAYOUT ─── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.section { padding: 6rem 0; }

/* ─── NAV ─── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(12,9,9,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
  padding: 0.35rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
}
.nav-logo {
  font-family: var(--display);
  font-size: 1.6rem;
  letter-spacing: 0.1em;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  line-height: 0;
}
.nav-logo span { color: var(--accent); }
.nav-logo-img {
  display: block;
  height: 40px;
  width: auto;
  max-width: min(200px, 52vw);
  object-fit: contain;
  image-rendering: auto;
}
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a {
  font-family: var(--mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  transition: color 0.2s;
  padding: 0.25rem 0;
  border-bottom: 1px solid transparent;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ─── HERO ─── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 60px;
}
.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,17,119,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,17,119,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
}
.hero-content { position: relative; z-index: 1; }
.hero-eyebrow {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  color: var(--teal);
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.hero-eyebrow::before {
  content: '';
  display: block;
  width: 40px;
  height: 1px;
  background: var(--teal);
}
.hero-brand { margin-bottom: 1rem; max-width: min(920px, 100%); }
.hero-banner-img {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(28vh, 200px);
  object-fit: contain;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,0.45));
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.hero h1 { margin-bottom: 1rem; }
.hero h1 em {
  font-style: normal;
  color: var(--accent);
  display: block;
}
.hero-sub {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 500px;
  margin-bottom: 3rem;
  font-weight: 300;
}
.hero-stats {
  display: flex;
  gap: 3rem;
  margin-bottom: 3rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.stat-item { }
.stat-num {
  font-family: var(--display);
  font-size: 2.2rem;
  color: var(--gold);
  letter-spacing: 0.06em;
  display: block;
}
.stat-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: var(--muted);
  text-transform: uppercase;
}
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 2rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  text-decoration: none;
}
.btn-primary {
  background: var(--accent);
  color: var(--white);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
}
.btn-primary:hover {
  background: #ff5050;
  color: var(--white);
  box-shadow: var(--glow-red);
}
.btn-outline {
  background: transparent;
  color: var(--teal);
  border: 1px solid var(--teal);
}
.btn-outline:hover {
  background: rgba(255,17,119,0.12);
  color: var(--teal);
  box-shadow: var(--glow-teal);
}

/* ─── SECTION HEADERS ─── */
.section-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.section-title {
  margin-bottom: 1rem;
}
.section-sub {
  color: var(--muted);
  font-weight: 300;
  max-width: 600px;
  margin-bottom: 3rem;
}

/* ─── CARDS ─── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1.5rem;
  border-radius: var(--radius);
  transition: border-color 0.2s, transform 0.2s;
}
.card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.card-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  display: block;
}
.card h4 { margin-bottom: 0.5rem; font-family: var(--display); font-size: 1.1rem; letter-spacing: 0.06em; }
.card p { font-size: 0.9rem; color: var(--muted); }

/* ─── GRID ─── */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }

/* ─── PAGE HEADER ─── */
.page-header {
  padding: 8rem 0 4rem;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.page-header::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}
.page-header .section-label { margin-bottom: 1rem; }
.page-header h2 { margin-bottom: 1rem; }
.page-header p { color: var(--muted); max-width: 600px; }

/* ─── RULE/DIVIDER ─── */
.rule {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: 3rem 0;
}

/* ─── TAGS ─── */
.tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 2px;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--muted);
}
.tag.client { border-color: var(--teal); color: var(--teal); }
.tag.server { border-color: var(--gold); color: var(--gold); }
.tag.both { border-color: var(--accent2); color: var(--accent2); }
.tag.perf { border-color: #8866ff; color: #8866ff; }
.tag.qol { border-color: var(--teal); color: var(--teal); }
.tag.gameplay { border-color: var(--accent); color: var(--accent); }
.tag.world { border-color: var(--gold); color: var(--gold); }
.tag.visual { border-color: #88ddff; color: #88ddff; }
.tag.util { border-color: var(--muted); color: var(--muted); }

/* ─── TABLE ─── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.data-table th {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  background: var(--bg2);
}
.data-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--bg3);
  vertical-align: middle;
}
.data-table tr:hover td { background: var(--surface); }
.data-table td:first-child { color: var(--white); font-weight: 500; }

/* ─── CALLOUT ─── */
.callout {
  padding: 1.25rem 1.5rem;
  border-left: 3px solid var(--accent);
  background: rgba(221,21,21,0.07);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.5rem 0;
}
.callout.info { border-color: var(--teal); background: rgba(255,17,119,0.07); }
.callout.warn { border-color: var(--gold); background: rgba(240,160,32,0.07); }
.callout p { color: var(--text); font-size: 0.95rem; }
.callout strong { color: var(--white); }

/* ─── CODE BLOCK ─── */
.code-block {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--teal);
  overflow-x: auto;
  margin: 1rem 0;
}
.code-block .cmd { color: var(--accent); }
.code-block .arg { color: var(--gold); }
.code-block .comment { color: var(--muted); }

/* ─── SCHEDULE DISPLAY ─── */
.schedule-bar {
  display: flex;
  align-items: stretch;
  height: 60px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 1.5rem 0;
  font-family: var(--mono);
  font-size: 0.75rem;
}
.schedule-segment {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 1rem;
  flex: 1;
  letter-spacing: 0.08em;
}
.schedule-segment.closed {
  background: var(--bg2);
  color: var(--muted);
  border-right: 1px solid var(--border);
  flex: 8;
}
.schedule-segment.open {
  background: linear-gradient(135deg, rgba(221,21,21,0.25), rgba(255,51,51,0.2));
  color: var(--accent);
  border-right: 1px solid var(--border);
  flex: 4.5;
  font-weight: 600;
  text-shadow: 0 0 10px var(--accent);
}
.schedule-segment.closed-2 {
  background: var(--bg2);
  color: var(--muted);
  flex: 2.5;
}

/* ─── FOOTER ─── */
footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0;
  margin-top: 6rem;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}
.footer-logo {
  font-family: var(--display);
  font-size: 1.4rem;
  color: var(--muted);
  letter-spacing: 0.1em;
}
.footer-logo span { color: var(--accent); }
.footer-links { display: flex; gap: 1.5rem; list-style: none; }
.footer-links a {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-transform: uppercase;
}
.footer-links a:hover { color: var(--text); }
.footer-copy {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.08em;
}

/* ─── SEARCH ─── */
.search-wrap {
  position: relative;
  margin-bottom: 2rem;
}
.search-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.85rem;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.2s;
}
.search-input:focus { border-color: var(--teal); }
.search-input::placeholder { color: var(--muted); }
.search-icon {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 1rem;
  pointer-events: none;
}

/* ─── ACCORDION ─── */
.accordion-item {
  border-bottom: 1px solid var(--border);
}
.accordion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 0;
  cursor: pointer;
  font-family: var(--display);
  font-size: 1.1rem;
  letter-spacing: 0.06em;
  color: var(--white);
  transition: color 0.2s;
  user-select: none;
}
.accordion-header:hover { color: var(--accent); }
.accordion-arrow {
  color: var(--muted);
  font-size: 0.8rem;
  transition: transform 0.3s;
}
.accordion-item.open .accordion-arrow { transform: rotate(90deg); color: var(--accent); }
.accordion-body {
  display: none;
  padding: 0 0 1.5rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.7;
}
.accordion-item.open .accordion-body { display: block; }

/* ─── PILL FILTERS ─── */
.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}
.pill {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  border: 1px solid var(--border);
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  transition: all 0.2s;
}
.pill:hover { border-color: var(--text); color: var(--text); }
.pill.active { border-color: var(--accent); color: var(--accent); background: rgba(221,21,21,0.12); }

/* ─── ANIM (scroll reveal via main.js IntersectionObserver) ─── */
.fade-up {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 8px rgba(221,21,21,0.35); }
  50%       { box-shadow: 0 0 20px rgba(221,21,21,0.65); }
}
.pulse { animation: pulse-glow 2s ease infinite; }

/* ─── STATUS BADGE ─── */
.status-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 8px rgba(74,222,128,0.7);
  animation: pulse-glow 2s ease infinite;
  margin-right: 0.4rem;
}

/* ─── MOBILE ─── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hero-stats { flex-wrap: wrap; gap: 1.5rem; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ─── HAMBURGER ─── */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text);
  transition: all 0.2s;
}
@media (max-width: 768px) {
  .nav-toggle { display: flex; }
}

/* ─── MOD LIST ─── */
.mod-entry {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  border-bottom: 1px solid var(--bg3);
  transition: background 0.15s;
}
.mod-entry:hover { background: var(--surface); }
.mod-num {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
  min-width: 2.5rem;
  padding-top: 0.15rem;
}
.mod-info { flex: 1; }
.mod-name { font-weight: 500; color: var(--white); font-size: 0.95rem; }
.mod-desc { font-size: 0.82rem; color: var(--muted); margin-top: 0.2rem; }
.mod-tags { display: flex; gap: 0.4rem; margin-top: 0.4rem; flex-wrap: wrap; }

/* ─── COMMAND TABLE ─── */
.cmd-group { margin-bottom: 3rem; }
.cmd-group h3 {
  font-size: 1.4rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}
.cmd-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--bg3);
}
.cmd-syntax {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--teal);
  background: var(--bg2);
  padding: 0.5rem 0.8rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.cmd-syntax .opt { color: var(--gold); }
.cmd-desc { font-size: 0.9rem; color: var(--muted); }
.cmd-desc strong { color: var(--text); }

@media (max-width: 600px) {
  .cmd-row { grid-template-columns: 1fr; }
}


/* ─── SKIP LINK ─── */
.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 10000;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: var(--white);
  font-family: var(--mono);
  font-size: 0.8rem;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* ─── JOIN STRIP ─── */
.join-strip .section-sub strong { color: var(--white); }
.join-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}
.join-card h4 { margin-bottom: 0.5rem; }
.join-value.mono {
  font-family: var(--mono);
  color: var(--teal);
  font-size: 1.05rem;
  margin: 0.5rem 0 1rem;
}
.join-card-desc { color: var(--muted); font-size: 0.9rem; margin-bottom: 1rem; }
.mono { font-family: var(--mono); }
.btn-tiny {
  padding: 0.45rem 1rem;
  font-size: 0.72rem;
}

/* ─── MOBILE MENU (hidden toggled in JS) ─── */
.nav-links-mobile {
  list-style: none;
  margin: 0;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem 2rem;
  background: var(--bg2);
  border-top: 1px solid var(--border);
}
.nav-links-mobile[hidden] {
  display: none !important;
}
.nav-links-mobile:not([hidden]) {
  display: flex;
}
.nav-links-mobile a {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--text);
}
.nav-links-mobile a.active {
  color: var(--accent);
}
button.nav-toggle {
  background: none;
  border: none;
  color: inherit;
}

/* ─── BRANDING ASSETS ─── */
.branding-strip {
  padding: 2.5rem 0;
  background: linear-gradient(180deg, var(--bg2) 0%, var(--bg) 100%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.branding-strip-inner {
  display: flex;
  justify-content: center;
  align-items: center;
}
.branding-banner-img {
  width: 100%;
  max-width: min(900px, 100%);
  height: auto;
  max-height: 120px;
  object-fit: contain;
  opacity: 0.95;
  filter: drop-shadow(0 4px 20px rgba(221,21,21,0.2));
}

.connect-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.connect-label span {
  display: inline;
}
.connect-icon {
  flex-shrink: 0;
  border-radius: 4px;
  box-shadow: 0 0 20px rgba(255, 17, 119, 0.35);
}

.page-header--account {
  padding-top: 7rem;
}
.page-header-icon {
  display: block;
  margin-bottom: 1rem;
  filter: drop-shadow(0 0 12px rgba(255, 17, 119, 0.45));
}

.metrics-list {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  font-size: 0.88rem;
  color: var(--text);
}
.metrics-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--bg3);
}

/* ─── Forms (register / login) ─── */
.form-label {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}
.form-input {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg2);
  color: var(--white);
  font-family: var(--body);
  font-size: 1rem;
}
.form-input:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: var(--glow-teal);
}
