:root {
  /* =============================
   * Color System
   * ============================= */
  --color-background: #050910;
  --color-surface: #0b121c;
  --color-surface-elevated: #101927;

  --color-text: #f5f7fb;
  --color-text-muted: #9ca7c3;
  --color-border-subtle: #1f2937;

  --color-primary: #2f8cff;
  --color-primary-soft: rgba(47, 140, 255, 0.12);
  --color-primary-strong: #1f6ed1;

  --color-success: #21c58a;
  --color-success-soft: rgba(33, 197, 138, 0.12);
  --color-warning: #f6b71e;
  --color-warning-soft: rgba(246, 183, 30, 0.14);
  --color-danger: #ff4b5c;
  --color-danger-soft: rgba(255, 75, 92, 0.14);

  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2933;
  --gray-900: #0b111a;

  /* Accent / metallic tones (cool blue-silver) */
  --color-accent-silver: #c3d0e8;
  --color-accent-cyan: #3fd2ff;

  /* Backdrops */
  --color-backdrop: rgba(3, 7, 18, 0.75);
  --color-backdrop-strong: rgba(3, 7, 18, 0.9);

  /* =============================
   * Typography
   * ============================= */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  --font-size-xs: 0.75rem;   /* 12px */
  --font-size-sm: 0.875rem;  /* 14px */
  --font-size-md: 1rem;      /* 16px */
  --font-size-lg: 1.125rem;  /* 18px */
  --font-size-xl: 1.25rem;   /* 20px */
  --font-size-2xl: 1.5rem;   /* 24px */
  --font-size-3xl: 1.875rem; /* 30px */
  --font-size-4xl: 2.25rem;  /* 36px */
  --font-size-5xl: 3rem;     /* 48px */

  --line-height-tight: 1.2;
  --line-height-snug: 1.35;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.7;

  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  /* =============================
   * Spacing Scale (px)
   * ============================= */
  --space-0: 0;
  --space-4: 0.25rem;  /* 4px */
  --space-8: 0.5rem;   /* 8px */
  --space-12: 0.75rem; /* 12px */
  --space-16: 1rem;    /* 16px */
  --space-20: 1.25rem; /* 20px */
  --space-24: 1.5rem;  /* 24px */
  --space-32: 2rem;    /* 32px */
  --space-40: 2.5rem;  /* 40px */
  --space-48: 3rem;    /* 48px */
  --space-64: 4rem;    /* 64px */
  --space-80: 5rem;    /* 80px */
  --space-96: 6rem;    /* 96px */

  /* =============================
   * Radius & Shadows
   * ============================= */
  --radius-xs: 3px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --radius-full: 999px;

  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-medium: 0 18px 45px rgba(0, 0, 0, 0.45);
  --shadow-strong: 0 28px 80px rgba(0, 0, 0, 0.6);
  --shadow-focus-primary: 0 0 0 1px rgba(15, 118, 255, 0.85), 0 0 0 8px rgba(47, 140, 255, 0.45);

  /* =============================
   * Transitions & Motion
   * ============================= */
  --transition-fast: 120ms ease-out;
  --transition-normal: 200ms ease;
  --transition-slow: 320ms ease;

  --transition-focus: box-shadow 160ms ease-out, transform 160ms ease-out;
  --transition-base: background-color var(--transition-normal), border-color var(--transition-normal), color var(--transition-normal), transform var(--transition-fast), box-shadow var(--transition-fast), opacity var(--transition-fast);

  /* Layout */
  --container-max-width: 1200px;
  --container-max-width-wide: 1440px;
}

/* =============================
 * Reset / Normalize
 * ============================= */

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  text-size-adjust: 100%;
}

body {
  margin: 0;
}

h1, h2, h3, h4, h5, h6,
p, figure, blockquote,
dl, dd {
  margin: 0;
}

ul, ol {
  margin: 0;
  padding: 0;
}

ul[role='list'],
ol[role='list'] {
  list-style: none;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  border: none;
  padding: 0;
  background: none;
}

textarea {
  resize: vertical;
}

a {
  color: inherit;
  text-decoration: none;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

:focus {
  outline: none;
}

/* =============================
 * Base Styles
 * ============================= */

body {
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: var(--font-size-md);
  line-height: var(--line-height-relaxed);
  font-weight: var(--font-weight-regular);
  background: radial-gradient(circle at top left, #151c2b 0, #050910 52%, #02030a 100%);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
}

main {
  min-height: 60vh;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-tight);
  color: var(--color-text);
}

h1 {
  font-size: clamp(var(--font-size-3xl), 3vw + 1rem, var(--font-size-5xl));
  letter-spacing: 0.02em;
}

h2 {
  font-size: clamp(var(--font-size-2xl), 2.2vw + 0.5rem, var(--font-size-4xl));
  letter-spacing: 0.015em;
}

h3 {
  font-size: clamp(var(--font-size-xl), 1.5vw + 0.5rem, var(--font-size-3xl));
}

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

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

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

h1, h2 {
  margin-bottom: var(--space-16);
}

h3, h4, h5, h6 {
  margin-bottom: var(--space-12);
}

p {
  margin-bottom: var(--space-12);
  color: var(--color-text-muted);
}

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

a {
  position: relative;
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-normal), opacity var(--transition-fast);
}

a:hover {
  color: var(--color-primary-strong);
}

a:active {
  opacity: 0.9;
}

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

code, pre {
  font-family: var(--font-mono);
}

hr {
  border: none;
  border-top: 1px solid var(--color-border-subtle);
  margin: var(--space-24) 0;
}

/* =============================
 * Accessibility & Focus Styles
 * ============================= */

:focus-visible {
  outline: none;
}

:where(a, button, [role="button"], input, textarea, select):focus-visible {
  box-shadow: var(--shadow-focus-primary);
  border-radius: var(--radius-sm);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* =============================
 * Layout Utilities
 * ============================= */

.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-16);
  padding-right: var(--space-16);
}

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

.section {
  padding-top: var(--space-48);
  padding-bottom: var(--space-48);
}

.section--dense {
  padding-top: var(--space-32);
  padding-bottom: var(--space-32);
}

.section--spacious {
  padding-top: var(--space-64);
  padding-bottom: var(--space-64);
}

/* Flexbox Helpers */

.flex {
  display: flex;
}

.flex-inline {
  display: inline-flex;
}

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

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

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

.flex-wrap {
  flex-wrap: wrap;
}

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

.items-start {
  align-items: flex-start;
}

.items-end {
  align-items: flex-end;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-8 {
  gap: var(--space-8);
}

.gap-12 {
  gap: var(--space-12);
}

.gap-16 {
  gap: var(--space-16);
}

.gap-24 {
  gap: var(--space-24);
}

.gap-32 {
  gap: var(--space-32);
}

/* Grid Helpers */

.grid {
  display: grid;
}

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

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

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

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

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

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

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

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

/* Width & alignment utilities */

.w-full {
  width: 100%;
}

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

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

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

.m-auto {
  margin: auto;
}

.mt-24 {
  margin-top: var(--space-24);
}

.mb-24 {
  margin-bottom: var(--space-24);
}

.mt-32 {
  margin-top: var(--space-32);
}

.mb-32 {
  margin-bottom: var(--space-32);
}

/* Screen reader only */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sr-only-focusable:focus,
.sr-only-focusable:active {
  position: static;
  width: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

/* =============================
 * Components
 * ============================= */

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-8);
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: linear-gradient(135deg, #2f8cff, #3fd2ff);
  color: #020617;
  cursor: pointer;
  transition: var(--transition-base);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7);
}

.button:hover {
  transform: translateY(-1px) translateZ(0);
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.8);
  filter: brightness(1.05);
}

.button:active {
  transform: translateY(0) scale(0.99);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.75);
}

.button:disabled,
.button[aria-disabled='true'] {
  cursor: not-allowed;
  opacity: 0.55;
  box-shadow: none;
}

.button--ghost {
  background: radial-gradient(circle at top left, rgba(47, 140, 255, 0.1), rgba(15, 23, 42, 0.96));
  color: var(--color-text);
  border-color: rgba(148, 163, 184, 0.5);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.7);
}

.button--ghost:hover {
  border-color: rgba(209, 213, 219, 0.9);
  background: radial-gradient(circle at top left, rgba(63, 210, 255, 0.12), rgba(15, 23, 42, 0.98));
}

.button--outline {
  background: transparent;
  color: var(--color-primary);
  border-color: rgba(47, 140, 255, 0.65);
  box-shadow: none;
}

.button--outline:hover {
  background: var(--color-primary-soft);
}

.button--sm {
  padding: 0.45rem 1rem;
  font-size: var(--font-size-xs);
}

.button--lg {
  padding: 0.8rem 1.6rem;
  font-size: var(--font-size-md);
}

/* Inputs & form controls */

.input,
.select,
.textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(156, 163, 175, 0.35);
  background-color: rgba(15, 23, 42, 0.9);
  color: var(--color-text);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-normal);
  transition: var(--transition-base);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.input::placeholder,
.textarea::placeholder {
  color: var(--color-text-muted);
}

.input:focus-visible,
.select:focus-visible,
.textarea:focus-visible {
  border-color: rgba(47, 140, 255, 0.85);
  box-shadow: 0 0 0 1px rgba(47, 140, 255, 0.7), 0 0 0 8px rgba(37, 99, 235, 0.45);
}

.input[disabled],
.select[disabled],
.textarea[disabled] {
  cursor: not-allowed;
  opacity: 0.6;
}

label {
  display: inline-block;
  margin-bottom: var(--space-8);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
}

.form-row {
  margin-bottom: var(--space-20);
}

.form-help {
  margin-top: var(--space-4);
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

.form-error {
  margin-top: var(--space-4);
  font-size: var(--font-size-xs);
  color: var(--color-danger);
}

/* Card component (ideal for product tiles, info blocks) */

.card {
  position: relative;
  border-radius: var(--radius-lg);
  padding: var(--space-20);
  background: radial-gradient(circle at top left, rgba(63, 210, 255, 0.06), rgba(15, 23, 42, 0.98));
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  transition: var(--transition-base);
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at top right, rgba(47, 140, 255, 0.14), transparent 60%);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.card:hover {
  transform: translateY(-2px) translateZ(0);
  box-shadow: var(--shadow-medium);
  border-color: rgba(148, 163, 184, 0.7);
}

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

.card--flat {
  box-shadow: none;
  background: rgba(15, 23, 42, 0.95);
}

.card-header {
  margin-bottom: var(--space-16);
}

.card-title {
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-4);
}

.card-subtitle {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

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

.card-footer {
  margin-top: var(--space-20);
}

/* Tag / pill (e.g., warranty, delivery, availability) */

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.18rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.badge--primary {
  background-color: var(--color-primary-soft);
  color: var(--color-accent-silver);
  border-color: rgba(47, 140, 255, 0.7);
}

.badge--success {
  background-color: var(--color-success-soft);
  color: #a7f3d0;
  border-color: rgba(16, 185, 129, 0.7);
}

.badge--warning {
  background-color: var(--color-warning-soft);
  color: #fef3c7;
  border-color: rgba(245, 158, 11, 0.7);
}

.badge--danger {
  background-color: var(--color-danger-soft);
  color: #fee2e2;
  border-color: rgba(248, 113, 113, 0.75);
}

/* Subtle gradient divider for techy sections */

.divider-gradient {
  height: 1px;
  width: 100%;
  background: linear-gradient(90deg, transparent, rgba(148, 163, 184, 0.9), transparent);
  margin: var(--space-24) 0;
}

/* =============================
 * Utility color helpers
 * ============================= */

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

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

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

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

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

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

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

/* =============================
 * Misc helpers for product imagery
 * ============================= */

.product-image-wrap {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: radial-gradient(circle at top, rgba(55, 65, 81, 0.6), rgba(15, 23, 42, 1));
}

.product-image-wrap img {
  transition: transform var(--transition-slow), filter var(--transition-normal);
}

.product-image-wrap:hover img {
  transform: translateY(-3px) scale(1.02);
  filter: saturate(1.05);
}

.badge-corner {
  position: absolute;
  top: var(--space-12);
  left: var(--space-12);
}

/* =============================
 * End base.css
 * ============================= */
