/*
Theme Name: Global Negdel SAFE
Theme URI: https://globalnegdel.mn
Author: Global Negdel Group
Author URI: https://globalnegdel.mn
Description: Premium dark-themed WordPress theme for Global Negdel Group - A sophisticated business portfolio with modern animations, blog functionality, and dynamic content management.
Version: 2.1.0 SAFE
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: globalnegdel
Tags: business, portfolio, dark, modern, animated, blog, custom-menu, featured-images, threaded-comments, translation-ready

Global Negdel SAFE WordPress Theme
Crafted with excellence for modern business presentation.
*/

/* ============================================
   ROOT VARIABLES & DESIGN TOKENS
   ============================================ */
:root {
  /* Colors */
  --bg: #0F1117;
  --bg-2: #15171F;
  --surface: #1E2028;
  --line: rgba(180, 185, 200, 0.12);
  --line-strong: rgba(180, 185, 200, 0.28);
  --text: #ECEDF0;
  --muted: #8B8E96;
  --signal: #00E5FF;
  --signal-soft: #1FB8CC;
  --warn: #FFB347;
  --green: #4ADE80;
  
  /* Spacing */
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 32px;
  --space-lg: 64px;
  --space-xl: 100px;
  
  /* Typography */
  --font-main: 'Archivo', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;
  
  /* Animation */
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --transition-fast: 0.2s;
  --transition-normal: 0.4s;
  --transition-slow: 0.8s;
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-main);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  position: relative;
}

/* Animated Grid Background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 80px 80px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
  -webkit-mask-image: radial-gradient(ellipse at top, black 0%, transparent 70%);
  mask-image: radial-gradient(ellipse at top, black 0%, transparent 70%);
  animation: gridPulse 20s ease-in-out infinite;
}

@keyframes gridPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.6; }
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

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

a:hover {
  color: var(--signal);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.mono {
  font-family: var(--font-mono);
}

/* ============================================
   NAVIGATION
   ============================================ */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 17, 23, 0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
  transition: all var(--transition-normal) var(--ease-smooth);
}

nav.scrolled {
  background: rgba(15, 17, 23, 0.98);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 18px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
  font-weight: 800;
  letter-spacing: -0.01em;
  font-size: 18px;
  transition: transform var(--transition-fast) var(--ease-smooth);
}

.logo:hover {
  transform: translateY(-2px);
}

.logo-mark {
  width: 36px;
  height: 36px;
  background: var(--signal);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 16px;
  clip-path: polygon(0 0, 100% 0, 100% 75%, 75% 100%, 0 100%);
  transition: all var(--transition-fast) var(--ease-smooth);
}

.logo:hover .logo-mark {
  background: var(--text);
  transform: rotate(5deg) scale(1.05);
}

.nav-links {
  display: flex;
  gap: 4px;
  list-style: none;
  font-size: 13px;
  font-weight: 500;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 6px;
  transition: all var(--transition-fast) var(--ease-smooth);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 12px;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 6px;
  left: 16px;
  right: 16px;
  height: 2px;
  background: var(--signal);
  transform: scaleX(0);
  transition: transform var(--transition-fast) var(--ease-smooth);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--signal);
  background: var(--surface);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
}

.nav-cta {
  padding: 10px 20px;
  background: var(--signal);
  color: var(--bg);
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: all var(--transition-fast) var(--ease-smooth);
  clip-path: polygon(0 0, 100% 0, 100% 75%, 92% 100%, 0 100%);
  position: relative;
  overflow: hidden;
}

.nav-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--text);
  transform: translateX(-100%);
  transition: transform var(--transition-normal) var(--ease-smooth);
}

.nav-cta:hover::before {
  transform: translateX(0);
}

.nav-cta span {
  position: relative;
  z-index: 1;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero-section {
  position: relative;
  z-index: 1;
  padding: 120px 32px 80px;
  min-height: 90vh;
  display: flex;
  align-items: center;
}

.hero-container {
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.hero-content {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 80px;
  align-items: center;
}

.hero-text h1 {
  font-size: clamp(48px, 8vw, 120px);
  line-height: 0.95;
  letter-spacing: -0.04em;
  margin-bottom: 32px;
  opacity: 0;
  animation: fadeInUp 1s var(--ease-smooth) forwards;
}

.hero-text h1 .signal {
  color: var(--signal);
  position: relative;
  display: inline-block;
}

.hero-text h1 .signal::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--signal);
  opacity: 0.3;
}

.hero-text p {
  font-size: 20px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 600px;
  opacity: 0;
  animation: fadeInUp 1s var(--ease-smooth) 0.2s forwards;
}

.hero-cta {
  margin-top: 48px;
  display: flex;
  gap: 16px;
  opacity: 0;
  animation: fadeInUp 1s var(--ease-smooth) 0.4s forwards;
}

.btn {
  padding: 16px 32px;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 8px;
  transition: all var(--transition-fast) var(--ease-smooth);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background: var(--signal);
  color: var(--bg);
  border: 2px solid var(--signal);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 229, 255, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--signal);
  border: 2px solid var(--signal);
}

.btn-outline:hover {
  background: var(--signal);
  color: var(--bg);
  transform: translateY(-2px);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.fade-in {
  opacity: 0;
  animation: fadeIn 0.8s var(--ease-smooth) forwards;
}

.slide-in-left {
  opacity: 0;
  animation: slideInLeft 0.8s var(--ease-smooth) forwards;
}

.slide-in-right {
  opacity: 0;
  animation: slideInRight 0.8s var(--ease-smooth) forwards;
}

/* ============================================
   SECTIONS
   ============================================ */
section {
  padding: var(--space-xl) 32px;
  position: relative;
  z-index: 1;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
}

.section-header {
  margin-bottom: 60px;
  border-top: 2px solid var(--line-strong);
  padding-top: 32px;
}

.section-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--signal);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-tag::before {
  content: '//';
  color: var(--muted);
}

.section-title {
  font-size: clamp(32px, 5vw, 64px);
  line-height: 1.1;
  margin-bottom: 24px;
}

.section-title .signal {
  color: var(--signal);
}

.section-intro {
  font-size: 18px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 800px;
}

/* ============================================
   BLOG SECTION
   ============================================ */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 32px;
  margin-top: 48px;
}

.blog-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  transition: all var(--transition-normal) var(--ease-smooth);
  cursor: pointer;
}

.blog-card:hover {
  border-color: var(--signal);
  transform: translateY(-8px);
  box-shadow: 0 16px 48px rgba(0, 229, 255, 0.15);
}

.blog-card-image {
  width: 100%;
  height: 240px;
  background: var(--bg-2);
  overflow: hidden;
  position: relative;
}

.blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow) var(--ease-smooth);
}

.blog-card:hover .blog-card-image img {
  transform: scale(1.1);
}

.blog-card-content {
  padding: 24px;
}

.blog-meta {
  display: flex;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

.blog-card-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
  transition: color var(--transition-fast);
}

.blog-card:hover .blog-card-title {
  color: var(--signal);
}

.blog-card-excerpt {
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
  margin-bottom: 20px;
}

.blog-card-link {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--signal);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: gap var(--transition-fast);
}

.blog-card:hover .blog-card-link {
  gap: 12px;
}

/* ============================================
   FOOTER
   ============================================ */
footer {
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  padding: 80px 32px 32px;
  position: relative;
  z-index: 1;
}

.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand-text {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.footer-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--signal);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 24px;
}

.footer-info {
  font-size: 14px;
  line-height: 1.8;
  color: var(--muted);
}

.footer-col h5 {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--signal);
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 12px;
}

.footer-col ul li a {
  color: var(--muted);
  font-size: 14px;
  transition: all var(--transition-fast);
  display: inline-block;
}

.footer-col ul li a:hover {
  color: var(--signal);
  transform: translateX(4px);
}

.footer-bottom {
  max-width: 1400px;
  margin: 0 auto;
  padding-top: 32px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1024px) {
  .hero-content {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  
  .footer-inner {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  
  .hero-section {
    padding: 80px 24px 60px;
  }
  
  section {
    padding: 60px 24px;
  }
  
  .blog-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-inner {
    grid-template-columns: 1fr;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-center {
  text-align: center;
}

.mt-1 { margin-top: var(--space-xs); }
.mt-2 { margin-top: var(--space-sm); }
.mt-3 { margin-top: var(--space-md); }
.mt-4 { margin-top: var(--space-lg); }

.mb-1 { margin-bottom: var(--space-xs); }
.mb-2 { margin-bottom: var(--space-sm); }
.mb-3 { margin-bottom: var(--space-md); }
.mb-4 { margin-bottom: var(--space-lg); }

.hidden {
  display: none;
}

.visible {
  display: block;
}
