/* ==========================================================================
   SMK KARYA GUNA 2 - PIXEL ADVENTURE DESIGN SYSTEM
   Theme: Retro-Modern Cyber Pixel RPG & Professional School Identity
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Press+Start+2P&family=Silkscreen:wght@400;700&display=swap');

:root {
  /* Color Palette */
  --bg-primary: #090d16;
  --bg-secondary: #0f172a;
  --bg-tertiary: #1e293b;
  --bg-card: rgba(15, 23, 42, 0.85);
  --bg-glass: rgba(30, 41, 59, 0.7);

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --accent-blue: #2563eb;
  --accent-cyan: #06b6d4;
  --accent-sky: #38bdf8;
  --accent-green: #10b981;
  --accent-emerald: #34d399;
  --accent-gold: #fbbf24;
  --accent-amber: #f59e0b;
  --accent-red: #ef4444;
  --accent-purple: #a855f7;

  /* Pixel Art Borders & Shadows */
  --pixel-border-color: #38bdf8;
  --pixel-box-shadow: 4px 4px 0px #030712, -2px -2px 0px rgba(56, 189, 248, 0.2);
  --pixel-card-border: 2px solid #334155;
  --pixel-glow-blue: 0 0 20px rgba(37, 99, 235, 0.35);
  --pixel-glow-cyan: 0 0 25px rgba(6, 182, 212, 0.4);
  --pixel-glow-gold: 0 0 25px rgba(251, 191, 36, 0.4);

  /* Typography */
  --font-pixel: 'Press Start 2P', monospace;
  --font-pixel-heading: 'Silkscreen', cursive;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-smooth: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Base Setup */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-sans);
  text-rendering: optimizeLegibility;
}

body {
  overflow-x: hidden;
  background: radial-gradient(circle at 50% 0%, #1e1b4b 0%, #090d16 60%, #020617 100%);
  background-attachment: fixed;
  line-height: 1.6;
  min-height: 100vh;
}

/* CRT Scanline Retro Effect (Toggleable) */
body.crt-active::after {
  content: " ";
  display: block;
  position: fixed;
  top: 0; left: 0; bottom: 0; right: 0;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.35) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
  z-index: 99999;
  background-size: 100% 3px, 6px 100%;
  pointer-events: none;
  opacity: 0.75;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
  border-left: 2px solid var(--bg-tertiary);
}
::-webkit-scrollbar-thumb {
  background: var(--accent-blue);
  border: 2px solid var(--bg-primary);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-sky);
}

/* Container Layout */
.container {
  width: 100%;
  max-width: 1240px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

/* Typography Utility */
h1, h2, h3, h4, h5, h6 {
  color: #ffffff;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.pixel-title {
  font-family: var(--font-pixel-heading);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.pixel-font-sm {
  font-family: var(--font-pixel);
  font-size: 0.75rem;
  line-height: 1.5;
}

.text-accent { color: var(--accent-sky); }
.text-cyan { color: var(--accent-cyan); }
.text-gold { color: var(--accent-gold); }
.text-green { color: var(--accent-emerald); }

/* Section Header Structure */
.section-header-block {
  text-align: center;
  margin-bottom: 3.5rem;
  position: relative;
}

.section-badge-quest {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(37, 99, 235, 0.15);
  border: 1px solid var(--accent-sky);
  color: var(--accent-sky);
  padding: 0.35rem 0.85rem;
  font-family: var(--font-pixel);
  font-size: 0.65rem;
  text-transform: uppercase;
  margin-bottom: 1rem;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
}

.section-main-heading {
  font-size: 2.25rem;
  font-family: var(--font-pixel-heading);
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 50%, var(--accent-sky) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-lead-desc {
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto;
  font-size: 1.05rem;
}

/* ==========================================================================
   TOP RETRO HUD & NAVIGATION BAR
   ========================================================================== */

.top-hud-bar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(9, 13, 22, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 2px solid #1e293b;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

/* Top Mini Ticker Strip */
.hud-status-strip {
  background: #020617;
  border-bottom: 1px solid #1e293b;
  padding: 0.25rem 0;
  font-family: var(--font-pixel);
  font-size: 0.6rem;
  color: var(--accent-sky);
}

.hud-status-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hud-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  background: var(--accent-green);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-green);
  animation: pulseLight 1.5s infinite;
}

@keyframes pulseLight {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.hud-controls-group {
  display: flex;
  gap: 0.75rem;
}

.hud-util-btn {
  background: transparent;
  border: 1px solid #334155;
  color: var(--text-muted);
  font-family: var(--font-pixel);
  font-size: 0.55rem;
  padding: 0.2rem 0.5rem;
  cursor: pointer;
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.hud-util-btn:hover {
  background: #1e293b;
  color: var(--accent-gold);
  border-color: var(--accent-gold);
}

.hud-util-btn.muted {
  color: var(--accent-red);
  border-color: rgba(239, 68, 68, 0.4);
}

/* Main Navigation Bar */
.main-nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand-logo-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
}

.brand-pixel-emblem {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--accent-blue), #1e1b4b);
  border: 2px solid var(--accent-sky);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  box-shadow: 2px 2px 0px #000;
}

.brand-text-col h1 {
  font-family: var(--font-pixel-heading);
  font-size: 1rem;
  line-height: 1.1;
  color: #ffffff;
}

.brand-text-col span {
  font-family: var(--font-pixel);
  font-size: 0.55rem;
  color: var(--accent-cyan);
}

.nav-links-menu {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.nav-item-link {
  text-decoration: none;
  color: #cbd5e1;
  font-size: 0.9rem;
  font-weight: 600;
  transition: var(--transition-fast);
  position: relative;
  padding: 0.5rem 0;
}

.nav-item-link:hover {
  color: var(--accent-sky);
}

.nav-item-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--accent-sky);
  transition: width 0.2s ease;
}

.nav-item-link:hover::after {
  width: 100%;
}

.nav-actions-right {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

/* Mobile Toggle */
.mobile-menu-trigger {
  display: none;
  background: var(--bg-tertiary);
  border: 1px solid #334155;
  color: #ffffff;
  padding: 0.5rem;
  font-size: 1.25rem;
  cursor: pointer;
}

/* Mobile Drawer */
.mobile-nav-drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: 280px;
  height: 100vh;
  background: var(--bg-secondary);
  border-left: 2px solid var(--accent-sky);
  z-index: 2000;
  padding: 2rem 1.5rem;
  transition: right 0.3s ease;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.8);
}

.mobile-nav-drawer.open {
  right: 0;
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  border-bottom: 1px solid #334155;
  padding-bottom: 1rem;
}

.drawer-links-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.drawer-links-list a {
  text-decoration: none;
  color: #e2e8f0;
  font-size: 1.05rem;
  font-weight: 600;
  display: block;
}

/* ==========================================================================
   PIXEL BUTTON SYSTEM
   ========================================================================== */

.pixel-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.75rem 1.4rem;
  font-family: var(--font-pixel-heading);
  font-size: 0.85rem;
  text-transform: uppercase;
  text-decoration: none;
  color: #ffffff;
  background: var(--accent-blue);
  border: 2px solid var(--accent-sky);
  box-shadow: 3px 3px 0px #020617;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease, background-color 0.2s ease;
  position: relative;
}

.pixel-btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0px #020617, 0 0 15px rgba(56, 189, 248, 0.4);
  background: #1d4ed8;
}

.pixel-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0px #020617;
}

.pixel-btn.sm {
  padding: 0.45rem 0.85rem;
  font-size: 0.7rem;
}

.pixel-btn.btn-gold {
  background: #d97706;
  border-color: var(--accent-gold);
  color: #ffffff;
}
.pixel-btn.btn-gold:hover {
  background: var(--accent-gold);
  color: #0f172a;
}

.pixel-btn.btn-cyan {
  background: #0891b2;
  border-color: var(--accent-cyan);
}
.pixel-btn.btn-cyan:hover {
  background: var(--accent-cyan);
  color: #0f172a;
}

.pixel-btn.btn-green {
  background: #059669;
  border-color: var(--accent-green);
}
.pixel-btn.btn-green:hover {
  background: var(--accent-green);
  color: #0f172a;
}

.pixel-btn.btn-outline {
  background: transparent;
  border-color: #475569;
  color: #e2e8f0;
}
.pixel-btn.btn-outline:hover {
  border-color: var(--accent-sky);
  background: rgba(56, 189, 248, 0.1);
  color: var(--accent-sky);
}

.pixel-btn.glow-pulse {
  animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 3px 3px 0px #020617, 0 0 10px rgba(56, 189, 248, 0.3); }
  50% { box-shadow: 3px 3px 0px #020617, 0 0 22px rgba(56, 189, 248, 0.7); }
}

/* ==========================================================================
   PAGE SECTION PADDING & UTILITIES
   ========================================================================== */

.page-section {
  padding: 5.5rem 0;
  position: relative;
}

.page-section.alt-bg {
  background: rgba(15, 23, 42, 0.6);
  border-top: 1px solid #1e293b;
  border-bottom: 1px solid #1e293b;
}

/* Responsive Media Queries */
@media (max-width: 992px) {
  .nav-links-menu {
    display: none;
  }
  .mobile-menu-trigger {
    display: block;
  }
  .section-main-heading {
    font-size: 1.85rem;
  }
}

@media (max-width: 768px) {
  .hud-status-strip {
    font-size: 0.5rem;
  }
  .hud-btn-text {
    display: none;
  }
  .page-section {
    padding: 3.5rem 0;
  }
  .section-main-heading {
    font-size: 1.5rem;
  }
}
