/* ═══════════════════════════════════════════════════════════════
   TOMCO TECHNOLOGIES - MAIN STYLESHEET
   ═══════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────────
   RESET & BASE STYLES
   ───────────────────────────────────────────────────────────── */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-primary);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  color: var(--text-primary);
  background: var(--bg-dark);
  overflow-x: hidden;
  position: relative;
}

/* Background gradient */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-bg);
  z-index: var(--z-behind);
  pointer-events: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  color: var(--text-primary);
}

h1 { font-size: var(--fs-6xl); }
h2 { font-size: var(--fs-5xl); }
h3 { font-size: var(--fs-4xl); }
h4 { font-size: var(--fs-3xl); }
h5 { font-size: var(--fs-2xl); }
h6 { font-size: var(--fs-xl); }

p {
  margin-bottom: var(--space-md);
  color: var(--text-secondary);
}

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

a:hover {
  color: var(--magenta-tech);
}

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

ul, ol {
  list-style: none;
}

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

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

/* ─────────────────────────────────────────────────────────────
   UTILITY CLASSES
   ───────────────────────────────────────────────────────────── */

.container {
  width: 100%;
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

.container-wide {
  max-width: var(--container-2xl);
}

.container-narrow {
  max-width: var(--container-lg);
}

.section {
  padding: var(--space-5xl) 0;
  position: relative;
}

.section-sm {
  padding: var(--space-4xl) 0;
}

.section-lg {
  padding: var(--space-5xl) 0;
}

/* Text Utilities */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }

/* Display Utilities */
.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

/* Flexbox Utilities */
.flex-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

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

.flex-column {
  display: flex;
  flex-direction: column;
}

.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }

/* Spacing Utilities */
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }

.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.mb-2xl { margin-bottom: var(--space-2xl); }

/* ─────────────────────────────────────────────────────────────
   PARTICLES BACKGROUND
   ───────────────────────────────────────────────────────────── */

#particles-js {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: var(--z-behind);
  pointer-events: none;
}

/* ─────────────────────────────────────────────────────────────
   BUTTONS
   ───────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 14px 32px;
  border-radius: var(--radius-md);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-base);
  transition: all var(--transition-base);
  cursor: pointer;
  border: none;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 4px 20px rgba(58, 78, 225, 0.4);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--violet-mid), var(--magenta-tech));
  box-shadow: 0 6px 30px rgba(207, 28, 213, 0.5);
  transform: translateY(-2px);
  color: white;
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--blue-electric);
  color: var(--text-primary);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 2px solid var(--blue-electric);
}

.btn-outline:hover {
  background: var(--blue-electric);
  color: white;
  box-shadow: 0 0 20px rgba(58, 78, 225, 0.4);
  transform: translateY(-2px);
}

.btn-block {
  width: 100%;
}

.btn-lg {
  padding: 16px 40px;
  font-size: var(--fs-lg);
}

.btn-sm {
  padding: 10px 24px;
  font-size: var(--fs-sm);
}

/* ─────────────────────────────────────────────────────────────
   ACCESSIBILITY - FOCUS STYLES
   ───────────────────────────────────────────────────────────── */

/* Focus visible for keyboard navigation */
*:focus-visible {
  outline: 2px solid var(--blue-electric);
  outline-offset: 4px;
  border-radius: var(--radius-sm);
}

a:focus-visible,
button:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--blue-electric);
  outline-offset: 4px;
  box-shadow: 0 0 0 4px rgba(58, 78, 225, 0.2);
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--blue-electric);
  outline-offset: 2px;
  border-color: var(--blue-electric);
}

/* Skip to content link (for screen readers) */
.skip-to-content {
  position: absolute;
  left: -9999px;
  z-index: var(--z-max);
  padding: var(--space-md) var(--space-lg);
  background: var(--blue-electric);
  color: white;
  text-decoration: none;
  border-radius: var(--radius-md);
}

.skip-to-content:focus {
  left: 50%;
  top: var(--space-md);
  transform: translateX(-50%);
}

/* ─────────────────────────────────────────────────────────────
   ICONS
   ───────────────────────────────────────────────────────────── */

.icon-glow {
  filter: drop-shadow(0 0 8px var(--blue-electric));
  transition: filter var(--transition-base);
}

.icon-glow:hover {
  filter: drop-shadow(0 0 16px var(--magenta-tech));
}

/* ─────────────────────────────────────────────────────────────
   GRID LAYOUTS
   ───────────────────────────────────────────────────────────── */

.grid {
  display: grid;
  gap: var(--space-xl);
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

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

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

/* ─────────────────────────────────────────────────────────────
   RESPONSIVE
   ───────────────────────────────────────────────────────────── */

@media (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

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

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  h1 { font-size: var(--fs-5xl); }
  h2 { font-size: var(--fs-4xl); }
  h3 { font-size: var(--fs-3xl); }
}

@media (max-width: 640px) {
  .container {
    padding: 0 var(--space-md);
  }

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

  .btn {
    padding: 12px 24px;
    font-size: var(--fs-sm);
  }
}
