/* ==========================================================================
   AIJIASU.MY - GLOBAL STYLE SYSTEM
   Design Language: Deep Nebula Obsidian & Aurora Plasma Violet / Pulsar Amber Gold
   ========================================================================== */

:root {
  /* Color Palette - Deep Nebula */
  --bg-deep: #07050d;
  --bg-surface: #0e0a1a;
  --bg-elevated: #151026;
  --bg-card: rgba(22, 16, 40, 0.75);
  --bg-card-hover: rgba(32, 24, 58, 0.85);

  /* Plasma & Pulsar Accents */
  --plasma-violet: #a855f7;
  --plasma-violet-light: #c084fc;
  --plasma-violet-dark: #7e22ce;
  --plasma-glow: rgba(168, 85, 247, 0.35);

  --pulsar-amber: #f59e0b;
  --pulsar-amber-light: #fbbf24;
  --pulsar-amber-dark: #b45309;
  --pulsar-glow: rgba(245, 158, 11, 0.35);

  --cyber-cyan: #06b6d4;
  --cyber-emerald: #10b981;
  --cyber-rose: #f43f5e;

  /* Text Hierarchy */
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  /* Borders & Dividers */
  --border-subtle: rgba(168, 85, 247, 0.15);
  --border-glow: rgba(168, 85, 247, 0.4);
  --border-amber: rgba(245, 158, 11, 0.3);

  /* Shadows */
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.7), 0 0 1px 1px rgba(168, 85, 247, 0.15);
  --shadow-glow: 0 0 25px rgba(168, 85, 247, 0.25);
  --shadow-amber-glow: 0 0 25px rgba(245, 158, 11, 0.25);

  /* Layout */
  --max-width: 1240px;
  --header-height: 72px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-secondary);
  background-color: var(--bg-deep);
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 20px);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.menu-open {
  overflow: hidden !important;
}

section[id] {
  scroll-margin-top: calc(var(--header-height) + 20px);
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: 
    radial-gradient(circle at 15% 10%, rgba(126, 34, 206, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 85% 30%, rgba(245, 158, 11, 0.1) 0%, transparent 45%),
    radial-gradient(circle at 50% 80%, rgba(168, 85, 247, 0.12) 0%, transparent 50%),
    var(--bg-deep);
  background-attachment: fixed;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

img, svg {
  display: block;
  max-width: 100%;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
  position: relative;
}

.section-hero {
  padding: 120px 0 80px;
}

/* Typography Helpers */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
h3 { font-size: clamp(1.3rem, 2.2vw, 1.6rem); }
h4 { font-size: 1.2rem; }

.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 56px;
}

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--plasma-violet-light);
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-full);
  margin-bottom: 16px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.section-badge.amber {
  color: var(--pulsar-amber-light);
  background: rgba(245, 158, 11, 0.12);
  border-color: var(--border-amber);
}

.section-title {
  margin-bottom: 16px;
}

.gradient-text {
  background: linear-gradient(135deg, #f8fafc 20%, var(--plasma-violet-light) 65%, var(--pulsar-amber-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.section-subtitle {
  font-size: 1.08rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* Top Navigation Bar */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-height);
  background: rgba(7, 5, 13, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  transition: all var(--transition-normal);
}

.site-header.scrolled {
  background: rgba(7, 5, 13, 0.95);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
  border-bottom-color: var(--border-glow);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--plasma-violet), var(--pulsar-amber));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 0 15px var(--plasma-glow);
}

.brand-name {
  font-weight: 800;
  letter-spacing: 0.02em;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-drawer-cta {
  display: none;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
  padding: 6px 0;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
}

.nav-link.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--plasma-violet), var(--pulsar-amber));
  border-radius: 2px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Action Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-normal);
  text-align: center;
  white-space: nowrap;
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, #9333ea 0%, #7c3aed 50%, #f59e0b 100%);
  background-size: 200% 100%;
  border-color: rgba(245, 158, 11, 0.4);
  box-shadow: 0 4px 18px rgba(147, 51, 234, 0.45), 0 0 12px rgba(245, 158, 11, 0.3);
}

.btn-primary:hover {
  background-position: 100% 0;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(147, 51, 234, 0.65), 0 0 18px rgba(245, 158, 11, 0.5);
}

.btn-secondary {
  color: var(--text-primary);
  background: rgba(22, 16, 40, 0.8);
  border: 1px solid var(--border-glow);
  backdrop-filter: blur(8px);
}

.btn-secondary:hover {
  background: rgba(35, 26, 62, 0.9);
  border-color: var(--plasma-violet-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.btn-amber {
  color: #07050d;
  font-weight: 700;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  border: 1px solid #fde68a;
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.4);
}

.btn-amber:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(245, 158, 11, 0.6);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.84rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 14px 30px;
  font-size: 1.05rem;
  border-radius: var(--radius-md);
}

/* Mobile Toggle */
.mobile-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 6px;
}

/* Card System */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: all var(--transition-normal);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
}

.card:hover {
  border-color: var(--border-glow);
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-card), var(--shadow-glow);
}

.card-amber:hover {
  border-color: var(--border-amber);
  box-shadow: var(--shadow-card), var(--shadow-amber-glow);
}

/* Grid Layouts */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

/* Telemetry Badge */
.telemetry-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: rgba(15, 12, 28, 0.8);
  border: 1px solid var(--border-subtle);
  color: var(--plasma-violet-light);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--cyber-emerald);
  box-shadow: 0 0 8px var(--cyber-emerald);
  animation: pulse-ring 1.8s infinite;
}

.pulse-dot.amber {
  background-color: var(--pulsar-amber);
  box-shadow: 0 0 8px var(--pulsar-amber);
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* Global Footer */
.site-footer {
  background: #05040a;
  border-top: 1px solid var(--border-subtle);
  padding: 64px 0 32px;
  margin-top: auto;
  position: relative;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.2fr;
  gap: 48px;
  margin-bottom: 56px;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-top: 16px;
  line-height: 1.7;
  max-width: 340px;
}

.footer-col h4 {
  color: var(--text-primary);
  font-size: 0.98rem;
  font-weight: 700;
  margin-bottom: 20px;
  letter-spacing: 0.03em;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}

.footer-links a:hover {
  color: var(--plasma-violet-light);
  transform: translateX(3px);
}

.footer-bottom {
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-dim);
  font-size: 0.84rem;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-cert-badges {
  display: flex;
  gap: 16px;
  align-items: center;
}

.cert-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--text-muted);
  padding: 3px 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
}

/* Desktop Intermediate Layout (1025px - 1240px) */
@media (min-width: 1025px) and (max-width: 1240px) {
  .nav-menu {
    gap: 16px;
  }
  .nav-link {
    font-size: 0.88rem;
  }
  .nav-actions {
    gap: 12px;
  }
  .btn-sm {
    padding: 6px 12px;
    font-size: 0.82rem;
  }
}

/* Tablet & Mobile Drawer Navigation (<= 1024px) */
@media (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
  }

  .mobile-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
    background: rgba(22, 16, 40, 0.6);
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
  }

  .mobile-toggle:hover {
    border-color: var(--plasma-violet-light);
    color: var(--plasma-violet-light);
    background: rgba(168, 85, 247, 0.1);
  }

  .nav-menu {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: calc(100dvh - var(--header-height));
    background: rgba(7, 5, 13, 0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    flex-direction: column;
    padding: 24px 20px 48px;
    gap: 12px;
    align-items: stretch;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    pointer-events: none;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease, visibility 0.3s;
    border-bottom: 1px solid var(--border-glow);
    z-index: 999;
  }

  .nav-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .nav-menu li {
    width: 100%;
  }

  .nav-link {
    display: block;
    width: 100%;
    padding: 12px 16px;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    background: rgba(22, 16, 40, 0.4);
    border: 1px solid transparent;
    transition: all var(--transition-fast);
  }

  .nav-link:hover, .nav-link.active {
    color: #fff;
    background: rgba(168, 85, 247, 0.15);
    border-color: var(--border-glow);
  }

  .nav-link.active::after {
    display: none;
  }

  .nav-drawer-cta {
    display: block;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-subtle);
  }
}

/* Mobile Screens (<= 768px) */
@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 60px 0;
  }
}

/* Small Mobile Screens (<= 480px) */
@media (max-width: 480px) {
  .brand-logo {
    font-size: 1.2rem;
    gap: 8px;
  }
  .brand-icon {
    width: 32px;
    height: 32px;
  }
  .nav-actions .btn {
    padding: 6px 12px;
    font-size: 0.8rem;
  }
}

