/* NEXTRON AI Design System - Global Stylesheet */

@import 'tokens/colors.css';
@import 'tokens/typography.css';
@import 'tokens/spacing.css';

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--font-size-body);
  line-height: var(--line-height-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* TYPOGRAPHY */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--weight-normal);
  margin-bottom: var(--spacing-lg);
}

p {
  margin-bottom: var(--spacing-base);
  line-height: var(--line-height-body);
}

a {
  color: var(--accent-link);
  text-decoration: none;
  transition: color 150ms ease;
}

a:hover {
  color: var(--accent-link);
  opacity: 0.8;
}

/* BUTTONS */
button {
  border: none;
  cursor: pointer;
  font-family: var(--font-ui);
  transition: all 150ms ease;
  border-radius: var(--border-radius-none);
}

button:focus {
  outline: 2px solid var(--accent-gold);
  outline-offset: 2px;
}

/* INPUTS */
input,
textarea,
select {
  font-family: var(--font-body);
  border: 1px solid var(--border-divider);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  padding: var(--padding-button-ghost);
  border-radius: var(--border-radius-none);
}

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid var(--accent-gold);
  outline-offset: 0;
}

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

/* CONTAINER */
.container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-xl-plus);
}

.container-lg {
  max-width: var(--container-max-width-lg);
  margin: 0 auto;
  padding: 0 var(--spacing-xl-plus);
}

/* FLEXBOX UTILITIES */
.flex {
  display: flex;
}

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

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

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

/* GRID UTILITIES */
.grid {
  display: grid;
}

.grid-cols-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gap-card);
}

.grid-cols-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap-card);
}

.grid-cols-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap-card);
}

/* RESPONSIVE GRID */
@media (max-width: 1024px) {
  .grid-cols-3 {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

/* VISIBILITY */
.hidden {
  display: none;
}

.invisible {
  visibility: hidden;
}

/* TEXT UTILITIES */
.text-center {
  text-align: center;
}

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

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

.uppercase {
  text-transform: uppercase;
}

.no-wrap {
  white-space: nowrap;
}

/* DEPTH UTILITIES */
.bg-depth-0 {
  background-color: var(--depth-0-abyss);
}

.bg-depth-1 {
  background-color: var(--depth-1-surface);
}

.bg-depth-2 {
  background-color: var(--depth-2-overlay);
}

.bg-depth-3 {
  background-color: var(--depth-3-fog);
}

.bg-depth-4 {
  background-color: var(--depth-4-mist);
}

/* PRINT STYLES */
@media print {
  body {
    background-color: white;
    color: black;
  }

  a {
    color: var(--accent-link);
  }
}

/* ACCESSIBILITY */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
