/* ========================================================================
   Variables
   ======================================================================== */

:root {
  /* Color Palette */
  --color-bg: #060709; /* near-black charcoal */
  --color-surface: #101117; /* elevated surfaces */
  --color-surface-muted: #181a22; /* secondary surfaces */
  --color-text: #f5f7fb; /* primary text on dark */
  --color-text-muted: #a5acbf;
  --color-border-subtle: rgba(255, 255, 255, 0.06);

  --color-primary: #1e7bff; /* electric blue */
  --color-primary-soft: rgba(30, 123, 255, 0.12);
  --color-primary-strong: #0f5ad1;

  --color-accent-teal: #2fd0c5; /* soft teal accent */
  --color-accent-teal-soft: rgba(47, 208, 197, 0.14);

  --color-success: #30c57b;
  --color-warning: #ffb547;
  --color-danger: #ff4a5c;

  --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: #111827;

  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: 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.1;
  --line-height-snug: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.7;

  /* Spacing scale (0–96px) */
  --space-0: 0;
  --space-1: 0.125rem; /* 2px */
  --space-2: 0.25rem;  /* 4px */
  --space-3: 0.375rem; /* 6px */
  --space-4: 0.5rem;   /* 8px */
  --space-5: 0.625rem; /* 10px */
  --space-6: 0.75rem;  /* 12px */
  --space-8: 1rem;     /* 16px */
  --space-10: 1.25rem; /* 20px */
  --space-12: 1.5rem;  /* 24px */
  --space-16: 2rem;    /* 32px */
  --space-20: 2.5rem;  /* 40px */
  --space-24: 3rem;    /* 48px */
  --space-28: 3.5rem;  /* 56px */
  --space-32: 4rem;    /* 64px */
  --space-40: 5rem;    /* 80px */
  --space-48: 6rem;    /* 96px */

  /* Radius */
  --radius-xs: 2px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 18px;
  --radius-pill: 999px;

  /* Shadows (subtle high-tech glow) */
  --shadow-soft:
    0 10px 30px rgba(0, 0, 0, 0.4);
  --shadow-elevated:
    0 18px 45px rgba(0, 0, 0, 0.55);
  --shadow-focus:
    0 0 0 1px rgba(255, 255, 255, 0.1),
    0 0 0 3px rgba(30, 123, 255, 0.65);

  /* Transitions */
  --transition-fast: 120ms ease-out;
  --transition-md: 180ms ease-out;
  --transition-slow: 260ms ease-out;
}

/* Motion reduction */

@media (prefers-reduced-motion: reduce) {
  :root {
    --transition-fast: 0ms;
    --transition-md: 0ms;
    --transition-slow: 0ms;
  }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

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

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

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

body {
  margin: 0;
}

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

ul[role="list"],
ol[role="list"] {
  list-style: none;
  padding: 0;
  margin: 0;
}

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

img {
  height: auto;
}

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

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

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

textarea {
  resize: vertical;
}

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

/* Improve text rendering */

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

body {
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: var(--font-size-md);
  line-height: var(--line-height-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
}

main {
  min-height: 60vh;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: var(--line-height-tight);
  letter-spacing: 0.01em;
  color: var(--gray-50);
}

h1 {
  font-size: clamp(2.25rem, 3vw, 3rem);
  margin-bottom: var(--space-16);
}

h2 {
  font-size: clamp(1.875rem, 2.5vw, 2.25rem);
  margin-bottom: var(--space-12);
}

h3 {
  font-size: clamp(1.5rem, 2vw, 1.875rem);
  margin-bottom: var(--space-10);
}

h4 {
  font-size: 1.25rem;
  margin-bottom: var(--space-8);
}

h5 {
  font-size: 1.125rem;
  margin-bottom: var(--space-6);
}

h6 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-400);
  margin-bottom: var(--space-4);
}

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

strong {
  font-weight: 600;
}

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

/* Links - subtle high-tech underline on hover */

a {
  position: relative;
  cursor: pointer;
  transition: color var(--transition-md);
}

a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.15em;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent-teal));
  transition: width var(--transition-md);
}

a:hover::after,
a:focus-visible::after {
  width: 100%;
}

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

/* Lists */

ul,
ol {
  padding-left: 1.2rem;
}

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

:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid transparent;
  box-shadow: var(--shadow-focus);
  border-radius: max(2px, var(--radius-xs));
}

/* 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;
}

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

/* Layout: container */

.container {
  width: 100%;
  margin-inline: auto;
  padding-inline: var(--space-16);
  max-width: 1200px;
}

@media (min-width: 1440px) {
  .container {
    max-width: 1320px;
  }
}

/* Flex utilities */

.flex {
  display: flex;
}

.inline-flex {
  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 {
  display: flex;
  flex-direction: column;
}

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

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

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

.gap-xs {
  gap: var(--space-4);
}

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

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

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

/* Grid utilities */

.grid {
  display: grid;
}

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

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

.grid-auto-fit {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-16);
}

/* Width helpers */

.w-full {
  width: 100%;
}

/* Spacing helpers (margin / padding) */

.mt-0 { margin-top: 0; }
.mt-xs { margin-top: var(--space-4); }
.mt-sm { margin-top: var(--space-8); }
.mt-md { margin-top: var(--space-12); }
.mt-lg { margin-top: var(--space-16); }

.mb-0 { margin-bottom: 0; }
.mb-xs { margin-bottom: var(--space-4); }
.mb-sm { margin-bottom: var(--space-8); }
.mb-md { margin-bottom: var(--space-12); }
.mb-lg { margin-bottom: var(--space-16); }

.px-sm {
  padding-inline: var(--space-8);
}

.px-md {
  padding-inline: var(--space-16);
}

.py-sm {
  padding-block: var(--space-8);
}

.py-md {
  padding-block: var(--space-12);
}

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

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

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

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

/* Buttons */

.button,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-size: var(--font-size-sm);
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    background-color var(--transition-md),
    color var(--transition-md),
    border-color var(--transition-md),
    box-shadow var(--transition-md),
    transform var(--transition-fast);
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent-teal));
  color: #ffffff!important;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.02),
    0 14px 32px rgba(0, 0, 0, 0.7);
}

.button:hover,
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06),
    0 18px 45px rgba(0, 0, 0, 0.85);
}

.button:active,
.btn:active {
  transform: translateY(0);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
}

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

.button--secondary,
.btn--secondary {
  background: rgba(255, 255, 255, 0.02);
  border-color: var(--color-border-subtle);
  color: var(--gray-50)!important;
}

.button--secondary:hover,
.btn--secondary:hover {
  background: rgba(255, 255, 255, 0.05);
}

.button--ghost,
.btn--ghost {
  background: transparent;
  border-color: transparent;
  color: var(--color-primary)!important;
}

.button--ghost:hover,
.btn--ghost:hover {
  background: var(--color-primary-soft);
}

/* Inputs & form controls */

.input,
select,
textarea,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="number"] {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-subtle);
  background-color: rgba(15, 17, 24, 0.9);
  color: var(--color-text);
  font-size: var(--font-size-sm);
  line-height: 1.4;
  transition:
    border-color var(--transition-md),
    background-color var(--transition-md),
    box-shadow var(--transition-md);
}

.input::placeholder,
textarea::placeholder,
input::placeholder {
  color: var(--gray-500);
}

.input:focus-visible,
select:focus-visible,
textarea:focus-visible,
input[type="text"]:focus-visible,
input[type="email"]:focus-visible,
input[type="password"]:focus-visible,
input[type="search"]:focus-visible,
input[type="tel"]:focus-visible,
input[type="number"]:focus-visible {
  border-color: var(--color-primary);
  background-color: rgba(19, 23, 34, 0.98);
  box-shadow: 0 0 0 1px rgba(30, 123, 255, 0.6),
    0 0 0 6px rgba(30, 123, 255, 0.16);
}

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

label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-4);
  font-size: var(--font-size-sm);
  color: var(--gray-200);
  margin-bottom: var(--space-4);
}

/* Card */

.card {
  position: relative;
  background: radial-gradient(circle at top left, rgba(30, 123, 255, 0.18), transparent 52%),
    radial-gradient(circle at bottom right, rgba(47, 208, 197, 0.2), transparent 50%),
    var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-16);
  border: 1px solid rgba(255, 255, 255, 0.04);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.card--muted {
  background: var(--color-surface-muted);
  box-shadow: none;
}

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

.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);
}

/* Media wrapper for product imagery */

.media-frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: radial-gradient(circle at top, rgba(255, 255, 255, 0.08), transparent 55%),
    #050609;
}

.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.01);
  transition: transform var(--transition-slow), filter var(--transition-slow);
}

.media-frame:hover img {
  transform: scale(1.04);
  filter: saturate(1.05);
}

/* Badges (e.g., for deals / new products) */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(8, 12, 18, 0.9);
}

.badge--primary {
  border-color: rgba(30, 123, 255, 0.6);
  color: var(--color-primary);
}

.badge--accent {
  border-color: rgba(47, 208, 197, 0.6);
  color: var(--color-accent-teal);
}

/* Toast / status text */

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

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

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

.bg-success-soft {
  background: rgba(48, 197, 123, 0.16);
}

.bg-warning-soft {
  background: rgba(255, 181, 71, 0.16);
}

.bg-danger-soft {
  background: rgba(255, 74, 92, 0.16);
}

/* Price emphasis */

.price {
  font-size: var(--font-size-xl);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.price--highlight {
  color: var(--color-accent-teal);
}
