/* ============================================
   A WHOLE NEW BEAST - Main Stylesheet
   Dark Industrial Sci-Fi Design System
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
  /* Colors */
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --bg-surface: #1a1a1a;
  --bg-surface-hover: #222222;

  --text-primary: #e0e0e0;
  --text-secondary: #999999;
  --text-heading: #ffffff;

  --accent-cyan: #00f0ff;
  --accent-crimson: #ff2d2d;
  --accent-amber: #ffaa00;
  --accent-purple: #b44dff;

  --border-color: #2a2a2a;
  --border-glow: rgba(0, 240, 255, 0.3);

  /* Typography */
  --font-heading: 'Oswald', 'Barlow Condensed', sans-serif;
  --font-body: 'Inter', 'Rajdhani', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 2rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;

  /* Layout */
  --max-width: 1200px;
  --nav-height: 70px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 300ms ease;
  --transition-slow: 500ms ease;

  /* Effects */
  --glow-cyan: 0 0 20px rgba(0, 240, 255, 0.5);
  --glow-crimson: 0 0 20px rgba(255, 45, 45, 0.5);
  --glow-amber: 0 0 20px rgba(255, 170, 0, 0.5);
}

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

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(0, 240, 255, 0.03) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(255, 45, 45, 0.02) 0%, transparent 50%);
}

/* Metallic grain texture overlay */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.03;
  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)'/%3E%3C/svg%3E");
}

a {
  color: var(--accent-cyan);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

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

ul, ol {
  list-style: none;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-heading);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 700;
}

h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 600;
}

h3 {
  font-size: clamp(1.2rem, 2.5vw, 1.8rem);
  font-weight: 600;
}

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

/* --- Layout Utilities --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

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

.section--dark {
  background-color: var(--bg-secondary);
}

.flex {
  display: flex;
}

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

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

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

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

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  transition: background var(--transition-base);
}

.nav--scrolled {
  background: rgba(10, 10, 10, 0.98);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

.nav__container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-heading);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.nav__logo-accent {
  color: var(--accent-cyan);
}

.nav__links {
  display: flex;
  gap: var(--space-lg);
}

.nav__link {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  position: relative;
  padding: var(--space-sm) 0;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-cyan);
  transition: width var(--transition-base);
}

.nav__link:hover,
.nav__link--active {
  color: var(--text-heading);
}

.nav__link:hover::after,
.nav__link--active::after {
  width: 100%;
}

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: var(--space-sm);
}

.nav__toggle span {
  width: 25px;
  height: 2px;
  background: var(--text-heading);
  transition: var(--transition-base);
}

/* --- Hero Section --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  text-align: center;
  padding-top: var(--nav-height);
}

.hero__bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at center, rgba(0, 240, 255, 0.08) 0%, transparent 60%);
  z-index: -1;
}

.hero__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.hero__title {
  margin-bottom: var(--space-md);
  text-shadow: var(--glow-cyan);
}

.hero__subtitle {
  font-family: var(--font-body);
  font-size: clamp(1rem, 2vw, 1.4rem);
  color: var(--text-secondary);
  font-weight: 300;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: var(--space-xl);
}

.hero__cta {
  display: inline-flex;
  gap: var(--space-md);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 2rem;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.btn--primary {
  background: var(--accent-cyan);
  color: var(--bg-primary);
}

.btn--primary:hover {
  background: #33f5ff;
  box-shadow: var(--glow-cyan);
  color: var(--bg-primary);
}

.btn--outline {
  background: transparent;
  color: var(--accent-cyan);
  border: 1px solid var(--accent-cyan);
}

.btn--outline:hover {
  background: rgba(0, 240, 255, 0.1);
  box-shadow: var(--glow-cyan);
}

.btn--crimson {
  background: var(--accent-crimson);
  color: var(--text-heading);
}

.btn--crimson:hover {
  background: #ff5555;
  box-shadow: var(--glow-crimson);
}

/* --- Cards --- */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: var(--space-lg);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.card:hover {
  border-color: var(--border-glow);
  transform: translateY(-2px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.card:hover::before {
  opacity: 1;
}

.card__image {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  margin-bottom: var(--space-md);
  filter: grayscale(20%);
  transition: filter var(--transition-base);
}

.card:hover .card__image {
  filter: grayscale(0%);
}

.card__title {
  font-size: 1.3rem;
  margin-bottom: var(--space-sm);
}

.card__role {
  font-size: 0.85rem;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: var(--space-md);
}

.card__text {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* --- Section Headers --- */
.section-header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.section-header__label {
  font-size: 0.8rem;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.3em;
  margin-bottom: var(--space-sm);
}

.section-header__title {
  position: relative;
  display: inline-block;
}

.section-header__title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--accent-cyan);
  margin: var(--space-md) auto 0;
}

/* --- Footer --- */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: var(--space-xl) 0 var(--space-lg);
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.footer__brand {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--text-heading);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-md);
}

.footer__desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  max-width: 300px;
}

.footer__heading {
  font-size: 0.85rem;
  color: var(--text-heading);
  margin-bottom: var(--space-md);
}

.footer__link {
  display: block;
  color: var(--text-secondary);
  font-size: 0.9rem;
  padding: var(--space-xs) 0;
  transition: color var(--transition-fast);
}

.footer__link:hover {
  color: var(--accent-cyan);
}

.footer__social {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-md);
}

.footer__social-link {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  transition: all var(--transition-base);
}

.footer__social-link:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  box-shadow: var(--glow-cyan);
}

.footer__bottom {
  text-align: center;
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* --- Shopping Cart --- */
.nav__cart {
  position: relative;
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.nav__cart:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.nav__cart-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 18px;
  height: 18px;
  background: var(--accent-crimson);
  color: var(--text-heading);
  font-size: 0.65rem;
  font-family: var(--font-mono);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  opacity: 0;
  transform: scale(0);
  transition: all var(--transition-fast);
}

.nav__cart-badge--visible {
  opacity: 1;
  transform: scale(1);
}

.cart-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1800;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

.cart-overlay--open {
  opacity: 1;
  visibility: visible;
}

.cart-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 400px;
  max-width: 90vw;
  height: 100%;
  background: var(--bg-secondary);
  border-left: 1px solid var(--border-color);
  z-index: 1900;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--transition-base);
}

.cart-panel--open {
  transform: translateX(0);
}

.cart-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg);
  border-bottom: 1px solid var(--border-color);
}

.cart-panel__title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--text-heading);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.cart-panel__close {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: var(--space-sm);
  transition: color var(--transition-fast);
}

.cart-panel__close:hover {
  color: var(--accent-cyan);
}

.cart-panel__items {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-md);
}

.cart-panel__empty {
  text-align: center;
  padding: var(--space-2xl) var(--space-lg);
  color: var(--text-secondary);
}

.cart-panel__empty svg {
  margin-bottom: var(--space-md);
  opacity: 0.3;
}

.cart-item {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  gap: var(--space-md);
  padding: var(--space-md);
  border-bottom: 1px solid var(--border-color);
  align-items: center;
}

.cart-item__image {
  width: 60px;
  height: 60px;
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
}

.cart-item__info {
  min-width: 0;
}

.cart-item__name {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  color: var(--text-heading);
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item__price {
  font-size: 0.85rem;
  color: var(--accent-amber);
}

.cart-item__controls {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-sm);
}

.cart-item__remove {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: color var(--transition-fast);
}

.cart-item__remove:hover {
  color: var(--accent-crimson);
}

.cart-item__qty {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.cart-item__qty-btn {
  width: 24px;
  height: 24px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  transition: all var(--transition-fast);
}

.cart-item__qty-btn:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.cart-item__qty-num {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-heading);
  min-width: 20px;
  text-align: center;
}

.cart-panel__footer {
  padding: var(--space-lg);
  border-top: 1px solid var(--border-color);
  background: var(--bg-surface);
}

.cart-panel__subtotal {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--space-md);
}

.cart-panel__subtotal-label {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.cart-panel__subtotal-value {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--accent-amber);
}

.cart-panel__checkout {
  width: 100%;
}

/* --- Responsive --- */
.stats-grid {
  width: 100%;
}

@media (max-width: 768px) {
  body {
    overflow-x: hidden;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: var(--space-md) !important;
  }

  .nav__links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    width: 100%;
    height: calc(100vh - var(--nav-height));
    background: rgba(10, 10, 10, 0.98);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-xl);
    transform: translateX(100%);
    transition: transform var(--transition-base);
  }

  .nav__links--open {
    transform: translateX(0);
  }

  .nav__toggle {
    display: flex;
  }

  .hero__cta {
    flex-direction: column;
  }

  .footer__grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer__desc {
    max-width: 100%;
  }

  .footer__social {
    justify-content: center;
  }

  .section {
    overflow: hidden;
  }
}
