/* ===============================================
   TECHPARTS SHOP -- Design Tokens & Global Styles
================================================ */

:root {
  /* -- Colors -- */
  --color-primary:       #16a34a;
  --color-primary-light: #4ade80;
  --color-primary-dark:  #15803d;
  --color-accent:        #f97316;
  --color-blue:          #1d4ed8;

  --color-bg:            #f5f7fa;
  --color-bg-alt:        #f0fdf4;
  --color-bg-dark:       #1a1a2e;
  --color-text:          #1a1a2e;
  --color-text-muted:    #6b7280;
  --color-border:        #e5e7eb;

  /* -- Typography -- */
  --font-heading: 'Sora', 'Inter', system-ui, -apple-system, sans-serif;
  --font-body:    'Inter', system-ui, -apple-system, sans-serif;

  /* -- Layout -- */
  --max-width: 1280px;

  /* -- Shadows -- */
  --shadow-sm: 0 1px 3px 0 rgba(0,0,0,0.07), 0 1px 2px -1px rgba(0,0,0,0.07);
  --shadow-md: 0 4px 16px -2px rgba(0,0,0,0.10), 0 2px 6px -2px rgba(0,0,0,0.06);
  --shadow-lg: 0 12px 32px -4px rgba(0,0,0,0.12), 0 4px 10px -4px rgba(0,0,0,0.07);

  /* -- Standard Tokens (auto-injected) -- */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --text-6xl: 3.75rem;
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;
  --radius-default: 4px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* -- Base -- */
body {
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.6;
}

/* -- Font utilities -- */
.font-heading { font-family: var(--font-heading); }
.font-body    { font-family: var(--font-body); }

/* Font weight utilities */
.font-500 { font-weight: 500; }
.font-600 { font-weight: 600; }
.font-700 { font-weight: 700; }
.font-800 { font-weight: 800; }

/* -- Border-left utility -- */
.border-l-3 { border-left-width: 3px; border-left-style: solid; }

/* ===============================================
   ICON SYSTEM
================================================ */
.icon {
  display: inline-block;
  width: 1.25em;
  height: 1.25em;
  vertical-align: -0.15em;
  flex-shrink: 0;
}
.icon.hidden { display: none; }
.icon-sm { width: 1em;   height: 1em; }
.icon-lg { width: 1.5em; height: 1.5em; }
.icon-xl { width: 2em;   height: 2em; }

/* ===============================================
   NAVIGATION
================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10000;
  transition: box-shadow 0.3s ease, background-color 0.3s ease;
}

.site-header.is-scrolled {
  box-shadow: var(--shadow-md);
}

.nav-inner {
  display: flex;
  align-items: center;
  height: 64px;
  padding: 0 1rem;
  gap: 1rem;
}

.nav-logo {
  text-decoration: none;
  flex-shrink: 0;
}

.nav-desktop {
  display: flex;
  align-items: center;
}

.nav-link {
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-toggle {
  display: none;
}

@media (max-width: 767px) {
  .nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
  }
}

/* ===============================================
   MOBILE MENU
================================================ */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  background-color: #ffffff;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  opacity: 0;
  pointer-events: none;
  transform: translateX(100%);
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-menu.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.mobile-nav-link {
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9375rem;
}

/* ===============================================
   SCROLL REVEAL ANIMATIONS
================================================ */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

[data-reveal-stagger] > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-reveal-stagger].is-visible > *:nth-child(1) { transition-delay: 0ms; }
[data-reveal-stagger].is-visible > *:nth-child(2) { transition-delay: 75ms; }
[data-reveal-stagger].is-visible > *:nth-child(3) { transition-delay: 150ms; }
[data-reveal-stagger].is-visible > *:nth-child(4) { transition-delay: 225ms; }
[data-reveal-stagger].is-visible > *:nth-child(5) { transition-delay: 300ms; }
[data-reveal-stagger].is-visible > *:nth-child(6) { transition-delay: 375ms; }
[data-reveal-stagger].is-visible > *:nth-child(7) { transition-delay: 450ms; }
[data-reveal-stagger].is-visible > *:nth-child(8) { transition-delay: 525ms; }

[data-reveal-stagger].is-visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* ===============================================
   KEYFRAMES
================================================ */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-8px); }
}

@keyframes pulse-ring {
  0%   { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.5); }
  70%  { transform: scale(1);    box-shadow: 0 0 0 10px rgba(22, 163, 74, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); }
}

/* ===============================================
   REDUCED MOTION
================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}body { margin: 0; }

.mobile-menu-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: transparent;
  border: 0;
  cursor: pointer;
  color: inherit;
  padding: 0.5rem;
  line-height: 1;
  z-index: 1;
}
