/* Base Styles - Typography & Foundational Elements */

/* Import Fonts from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@400;500;600;700&family=Inter:wght@400;500;600;700&family=Roboto+Mono:wght@400;500&display=swap');

/* Body Base */
body {
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-normal);
  color: var(--color-text);
  background-color: var(--color-bg-primary);
  overflow-x: hidden;
}

/* Typography Hierarchy */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-spacing-wide);
  text-transform: uppercase;
  color: var(--color-text);
}

h1 {
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-bold);
  line-height: 1.1;
  letter-spacing: var(--letter-spacing-tight);
}

h2 {
  font-size: var(--font-size-3xl);
  line-height: 1.15;
}

h3 {
  font-size: var(--font-size-2xl);
  line-height: var(--line-height-snug);
}

h4 {
  font-size: var(--font-size-xl);
}

h5 {
  font-size: var(--font-size-lg);
}

h6 {
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-medium);
}

/* Paragraph & Text */
p {
  margin-bottom: var(--spacing-md);
  line-height: var(--line-height-relaxed);
  color: var(--color-text-muted);
}

p:last-child {
  margin-bottom: 0;
}

strong {
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
}

em {
  font-style: italic;
}

/* Links */
a {
  color: var(--color-accent);
  transition: color var(--transition-fast);
}

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

/* Code & Technical Text */
code, .mono {
  font-family: var(--font-mono);
  font-size: var(--font-size-sm);
  letter-spacing: var(--letter-spacing-normal);
}

/* Utility Classes */
.text-muted {
  color: var(--color-text-muted);
}

.text-dim {
  color: var(--color-text-dim);
}

.text-accent {
  color: var(--color-accent);
}

.text-alert {
  color: var(--color-alert);
}

.text-uppercase {
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-wide);
}

.text-center {
  text-align: center;
}

/* Tactical Design Elements */

/* Tactical Grid Overlay */
.tactical-grid {
  position: relative;
  overflow: hidden;
}

.tactical-grid::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    linear-gradient(var(--grid-color) var(--border-width), transparent var(--border-width)),
    linear-gradient(90deg, var(--grid-color) var(--border-width), transparent var(--border-width));
  background-size: var(--grid-size) var(--grid-size);
  pointer-events: none;
  opacity: 0.5;
  z-index: 1;
}

.tactical-grid > * {
  position: relative;
  z-index: 2;
}

/* Diagonal Accent Line */
.diagonal-accent {
  position: relative;
}

.diagonal-accent::after {
  content: '';
  position: absolute;
  width: 200px;
  height: var(--border-width-thick);
  background: var(--color-accent);
  transform: rotate(-35deg);
  opacity: 0.6;
}

/* Noise Texture Overlay */
.noise-texture {
  position: relative;
}

.noise-texture::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.03;
  pointer-events: none;
}

/* Container */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

@media (min-width: 768px) {
  .container {
    padding: 0 var(--spacing-lg);
  }
}

/* Section Spacing */
section {
  padding: var(--spacing-3xl) 0;
}

@media (min-width: 768px) {
  section {
    padding: var(--spacing-4xl) 0;
  }
}

/* Responsive Typography */
@media (max-width: 767px) {
  h1 {
    font-size: var(--font-size-3xl);
  }

  h2 {
    font-size: var(--font-size-2xl);
  }

  h3 {
    font-size: var(--font-size-xl);
  }

  body {
    font-size: var(--font-size-sm);
  }
}

/* Selection */
::selection {
  background-color: var(--color-accent);
  color: var(--color-bg-primary);
}
