/* =========================================================
   Variables
   ========================================================= */
:root {
  /* Color palette */
  --color-background: #050811; /* deep, techy navy */
  --color-surface: #0c111b; /* elevated surface */
  --color-surface-alt: #151b28;

  --color-text: #f5f7fb;
  --color-text-muted: #9ca3b5;

  --color-primary: #00b3ff; /* accent cyan */
  --color-primary-soft: rgba(0, 179, 255, 0.12);

  --color-success: #20c997;
  --color-warning: #ffc857;
  --color-danger: #ff4b5c;

  --color-border-subtle: #1f2635;
  --color-border-strong: #2f3a4f;

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

  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", 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 */

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

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

  /* Radius */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  /* Shadows (subtle, not heavy) */
  --shadow-soft: 0 16px 40px rgba(0, 0, 0, 0.35);
  --shadow-elevated: 0 24px 60px rgba(0, 0, 0, 0.55);

  /* Transitions */
  --transition-fast: 120ms ease-out;
  --transition-normal: 180ms ease-out;
  --transition-slow: 240ms ease;

  /* Layout */
  --max-width-container: 1200px;
  --max-width-reading: 72ch;
}

/* =========================================================
   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;
  margin: 0;
  padding: 0;
}

img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

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

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

textarea {
  resize: vertical;
}

:focus {
  outline: none;
}

/* Remove default link styles while preserving semantics */
a {
  text-decoration: none;
  color: inherit;
}

/* =========================================================
   Base Styles
   ========================================================= */
body {
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: var(--font-size-md);
  line-height: var(--line-height-normal);
  background: radial-gradient(circle at top left, #111827 0, #050811 45%, #020308 100%);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main {
  display: block;
}

/* Headings: techy, confident scale */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: var(--line-height-tight);
  letter-spacing: 0.01em;
  color: var(--color-text);
}

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

h2 {
  font-size: clamp(1.875rem, 2.2vw + 1.2rem, 2.25rem);
  margin-bottom: var(--space-3);
}

h3 {
  font-size: 1.5rem;
  margin-bottom: var(--space-3);
}

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

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

h6 {
  font-size: 1rem;
  margin-bottom: var(--space-1);
}

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

strong {
  font-weight: 600;
}

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

/* Links: subtle default, accent on hover */
a {
  position: relative;
  transition: color var(--transition-normal);
}

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

a[href]::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--color-primary), #5cf2ff);
  transition: width var(--transition-fast);
}

a[href]:hover::after {
  width: 100%;
}

/* Lists */
ul,
ol {
  margin: 0 0 var(--space-3);
  padding-left: 1.25rem;
}

/* Forms */
label {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

/* =========================================================
   Accessibility & Motion
   ========================================================= */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

@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;
  }
}

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

/* Layout helpers */
.container {
  width: 100%;
  max-width: var(--max-width-container);
  margin-inline: auto;
  padding-inline: var(--space-4);
}

@media (min-width: 1024px) {
  .container {
    padding-inline: var(--space-6);
  }
}

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

.grid {
  display: grid;
}

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

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

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

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

.mt-0 { margin-top: 0 !important; }
.mt-4 { margin-top: var(--space-4) !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-4 { margin-bottom: var(--space-4) !important; }

.text-center { text-align: center !important; }
.text-right { text-align: right !important; }

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

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-pill);
  font-size: var(--font-size-sm);
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border: 1px solid transparent;
  background: linear-gradient(135deg, #1a2638, #111827);
  color: var(--color-text);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6), 0 16px 40px rgba(0, 0, 0, 0.6);
  transition:
    background var(--transition-normal),
    border-color var(--transition-fast),
    box-shadow var(--transition-normal),
    transform var(--transition-fast),
    color var(--transition-fast);
}

.btn-primary {
  background: radial-gradient(circle at 0% 0%, #5cf2ff, #00b3ff 35%, #005f99 100%);
  border-color: rgba(92, 242, 255, 0.6);
  box-shadow: 0 0 0 1px rgba(92, 242, 255, 0.3), 0 18px 45px rgba(0, 179, 255, 0.5);
  color: #fff !important;
}

.btn-outline {
  background: transparent;
  border-color: var(--color-border-strong);
  box-shadow: none;
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.btn-primary:hover:not(:disabled) {
  box-shadow: 0 0 0 1px rgba(92, 242, 255, 0.6), 0 22px 55px rgba(0, 179, 255, 0.7);
}

.btn-outline:hover:not(:disabled) {
  border-color: var(--color-primary);
  background: rgba(0, 179, 255, 0.08);
}

.btn-ghost:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.03);
}

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

.btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

/* Inputs & form controls */
.input,
select,
textarea {
  width: 100%;
  padding: 0.625rem 0.8rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border-subtle);
  background-color: #050914;
  color: var(--color-text);
  font-size: var(--font-size-sm);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6);
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    background-color var(--transition-fast);
}

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

.input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px rgba(0, 179, 255, 0.5), 0 0 0 4px rgba(0, 179, 255, 0.22);
}

.input[aria-invalid="true"] {
  border-color: var(--color-danger);
}

/* Card */
.card {
  position: relative;
  border-radius: var(--radius-md);
  padding: var(--space-4);
  background: radial-gradient(circle at top, rgba(0, 179, 255, 0.09), transparent 55%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.02), rgba(4, 9, 20, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.04);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.card--hoverable {
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-normal),
    border-color var(--transition-fast);
}

.card--hoverable:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-elevated);
  border-color: rgba(0, 179, 255, 0.5);
}

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

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

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

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

/* Tag / pill (useful for specs, statuses) */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
}

.badge-primary {
  border-color: rgba(0, 179, 255, 0.7);
  background: rgba(0, 179, 255, 0.12);
  color: #e6f9ff;
}

.badge-success {
  border-color: rgba(32, 201, 151, 0.7);
  background: rgba(32, 201, 151, 0.12);
}

.badge-danger {
  border-color: rgba(255, 75, 92, 0.7);
  background: rgba(255, 75, 92, 0.12);
}

/* Search-bar shell (common for advanced e-commerce search) */
.search-shell {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius-pill);
  background: rgba(2, 6, 23, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.6);
}

.search-shell input[type="search"] {
  border: none;
  background: transparent;
  padding: 0.35rem 0.5rem;
  box-shadow: none;
}

.search-shell input[type="search"]:focus-visible {
  outline: none;
  border: none;
  box-shadow: none;
}

/* Price text helper */
.price {
  font-weight: 600;
  font-size: var(--font-size-lg);
}

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