/* ═══════════════════════════════════════════════════════════════
   NEXUS DIJI - GLOBAL STYLES
   Base reset, typography, and utility styles
   ═══════════════════════════════════════════════════════════════ */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 145px;
}

@media (max-width: 1024px) {
  html {
    scroll-padding-top: 90px;
  }
}

@media (max-width: 768px) {
  html {
    scroll-padding-top: 72px;
  }
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-primary);
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

/* Prevent horizontal scroll on mobile */
@media (max-width: 768px) {
  body {
    overflow-x: clip;
    -webkit-overflow-scrolling: touch;
  }
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

ul,
ol {
  list-style: none;
}

/* Custom Cursor - Desktop Only */
.cursor {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9999;
  box-shadow: 0 0 10px var(--accent);
  opacity: 1;
  transition: transform 0.1s ease;
}

.cursor-ring {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.9;
  background: conic-gradient(from 0deg, var(--accent), var(--accent2), var(--accent));
  -webkit-mask: radial-gradient(circle, transparent 13px, black 14px);
  mask: radial-gradient(circle, transparent 13px, black 14px);
  animation: rotate 2s linear infinite;
  transition: opacity 0.3s ease;
}

/* Noise Texture Overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1000;
  opacity: 0.15;
}

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

h1 {
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  letter-spacing: -0.03em;
}

h3 {
  font-size: var(--font-size-xl);
  font-weight: 800;
  letter-spacing: -0.02em;
}

h4 {
  font-size: var(--font-size-lg);
  font-weight: 700;
}

p {
  color: var(--muted);
  line-height: 1.7;
}

/* Utility Classes */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.section {
  padding: var(--space-3xl) var(--space-xl);
}

.section-label {
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: var(--space-md);
  display: block;
}

.section-title {
  font-family: var(--font-primary);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-md);
  line-height: 1.1;
}

.section-desc {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 480px;
  margin-bottom: var(--space-2xl);
  font-weight: 400;
}

/* Buttons */
.btn-primary {
  background: var(--grad);
  color: #fff;
  padding: 0.9rem 2rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all var(--transition-bounce);
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  transform: skewX(-20deg);
  transition: all 0.5s ease;
}

.btn-primary:hover::after {
  left: 150%;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(155, 93, 229, 0.25), 0 0 15px rgba(67, 97, 238, 0.15);
}

/* Reveal Animation */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity, transform;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Hide cursor on mobile */
@media (max-width: 768px) {
  body {
    cursor: auto;
  }

  .cursor,
  .cursor-ring {
    display: none;
  }
}

/* Keyframe Animations */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(0.8);
  }
}

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus States */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}