/* ============ TOKENS ============ */
:root {
  --bg: #0A0E14;
  --panel: #12181F;
  --panel-raised: #161E27;
  --line: #232D38;
  --text: #E8EDF2;
  --muted: #5A6776;
  --signal: #00F0B5;
  --alert: #FF3D7F;
  --signal-dim: rgba(0, 240, 181, 0.12);
  --alert-dim: rgba(255, 61, 127, 0.12);

  --font-display: "Space Grotesk", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "JetBrains Mono", monospace;

  --radius: 6px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

/* subtle grid texture */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}

a { color: var(--signal); text-decoration: none; }

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

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============ TYPOGRAPHY ============ */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--signal);
}

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

/* ============ NAV ============ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 14, 20, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  max-width: 1160px;
  margin: 0 auto;
}

.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-mark {
  width: 10px;
  height: 10px;
  background: var(--signal);
  border-radius: 2px;
  box-shadow: 0 0 12px var(--signal);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
}

.nav-links a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s ease;
}

.nav-links a:hover, .nav-links a.active {
  color: var(--text);
}

.nav-links a.active {
  color: var(--signal);
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--signal);
  color: #061015;
}

.btn-primary:hover {
  background: #33ffce;
  box-shadow: 0 0 24px rgba(0, 240, 181, 0.35);
}

.btn-outline {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}

.btn-outline:hover {
  border-color: var(--signal);
  color: var(--signal);
}

.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-block { width: 100%; }

/* ============ HERO ============ */
.hero {
  padding: 96px 0 64px;
  position: relative;
  z-index: 1;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 64px;
  align-items: center;
}

.hero h1 {
  font-size: 56px;
  margin: 16px 0 20px;
}

.hero h1 .accent { color: var(--signal); }

.hero p {
  color: var(--muted);
  font-size: 17px;
  max-width: 480px;
  margin-bottom: 32px;
}

.hero-cta { display: flex; gap: 14px; }

/* terminal / scanner visual */
.terminal {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.terminal-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-raised);
}

.terminal-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--line);
}

.terminal-title {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  margin-left: 8px;
}

.terminal-body {
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 24px;
  min-height: 320px;
  position: relative;
}

.scan-line {
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--signal), transparent);
  opacity: 0;
  box-shadow: 0 0 12px var(--signal);
}

.scan-line.active {
  animation: scan 1.8s ease-in-out infinite;
}

@keyframes scan {
  0% { top: 0%; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

.term-line {
  display: flex;
  justify-content: space-between;
  padding: 7px 0;
  border-bottom: 1px dashed var(--line);
  opacity: 0;
  animation: fadeIn 0.4s ease forwards;
}

.term-line:last-child { border-bottom: none; }

@keyframes fadeIn {
  to { opacity: 1; }
}

.term-label { color: var(--muted); }
.term-value { color: var(--text); font-weight: 600; }
.term-value.ok { color: var(--signal); }
.term-value.warn { color: var(--alert); }

.term-prompt {
  color: var(--signal);
  margin-bottom: 14px;
}

.term-prompt::after {
  content: "█";
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* ============ SECTIONS ============ */
section { padding: 72px 0; position: relative; z-index: 1; }

.section-head {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 48px;
}

.section-head h2 { font-size: 36px; margin: 12px 0 10px; }
.section-head p { color: var(--muted); }

/* ============ HOW IT WORKS ============ */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.step {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}

.step-num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--signal);
  margin-bottom: 16px;
}

.step h3 { font-size: 18px; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 14px; }

/* ============ CARDS / PRODUCTS ============ */
.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.15s ease, transform 0.15s ease;
  display: flex;
  flex-direction: column;
}

.card:hover {
  border-color: var(--signal);
  transform: translateY(-2px);
}

.card-img {
  aspect-ratio: 4/3;
  background: var(--panel-raised);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}

.card-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }

.card-cat {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--signal);
}

.card-title { font-size: 15px; font-weight: 600; line-height: 1.35; }

.card-specs {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 4px 0;
}

.card-foot {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.card-foot .card-price {
  text-align: left;
}

.card-foot .btn {
  width: 100%;
}

.card-price {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
}

.card-price .old {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--muted);
  text-decoration: line-through;
  font-weight: 400;
  margin-right: 6px;
}

/* ============ UPGRADE RESULT PAGE ============ */
.spec-table {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.spec-row {
  display: grid;
  grid-template-columns: 180px 1fr 1fr;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  align-items: center;
}

.spec-row:last-child { border-bottom: none; }

.spec-row .label {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.spec-row .current { font-weight: 600; }

.spec-row .max {
  color: var(--signal);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.spec-head {
  display: grid;
  grid-template-columns: 180px 1fr 1fr;
  gap: 16px;
  padding: 12px 20px;
  background: var(--panel-raised);
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-family: var(--font-mono);
  font-weight: 600;
}

.tag-bottleneck { background: var(--alert-dim); color: var(--alert); }
.tag-good { background: var(--signal-dim); color: var(--signal); }

/* ============ FILTERS ============ */
.shop-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
}

.filters {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  height: fit-content;
  position: sticky;
  top: 90px;
}

.filter-group { margin-bottom: 24px; }
.filter-group:last-child { margin-bottom: 0; }

.filter-title {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 12px;
}

.filter-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  font-size: 14px;
  cursor: pointer;
  color: var(--text);
}

.filter-option input {
  accent-color: var(--signal);
  width: 16px;
  height: 16px;
}

.shop-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.shop-toolbar select {
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 8px 12px;
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 13px;
}

/* ============ BUNDLES ============ */
.bundle-tabs {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.bundle-tab {
  padding: 10px 22px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.bundle-tab.active {
  border-color: var(--signal);
  color: var(--signal);
  background: var(--signal-dim);
}

.bundle-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 32px;
  display: none;
}

.bundle-card.active { display: block; }

.bundle-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
  gap: 16px;
}

.bundle-head h3 { font-size: 24px; }

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

.bundle-total .num {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  color: var(--signal);
}

.bundle-total .lbl {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.bundle-items {
  display: grid;
  gap: 12px;
}

.bundle-item {
  display: grid;
  grid-template-columns: 90px 1fr auto auto;
  gap: 16px;
  align-items: center;
  padding: 12px;
  background: var(--panel-raised);
  border-radius: var(--radius);
}

.bundle-item-img {
  aspect-ratio: 4/3;
  background: var(--bg);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
}

.bundle-item-cat {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--signal);
  display: block;
  margin-bottom: 2px;
}

.bundle-item-price {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
}

/* ============ FOOTER ============ */
footer {
  border-top: 1px solid var(--line);
  padding: 48px 0 32px;
  position: relative;
  z-index: 1;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
}

.footer-grid h4 {
  font-size: 14px;
  margin-bottom: 14px;
  color: var(--text);
}

.footer-grid ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-grid a { color: var(--muted); font-size: 14px; }
.footer-grid a:hover { color: var(--signal); }

.footer-disclosure {
  font-size: 13px;
  color: var(--muted);
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.footer-disclosure strong { color: var(--text); }

/* ============ MISC ============ */
.badge-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.badge {
  font-family: var(--font-mono);
  font-size: 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px;
  color: var(--muted);
}

.callout {
  background: var(--signal-dim);
  border: 1px solid rgba(0,240,181,0.3);
  border-radius: var(--radius);
  padding: 16px 20px;
  font-size: 14px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.callout strong { color: var(--signal); }

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero h1 { font-size: 38px; }
  .steps { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .shop-layout { grid-template-columns: 1fr; }
  .filters { position: static; }
  .footer-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .spec-row, .spec-head { grid-template-columns: 1fr; gap: 4px; }
}

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

:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 2px;
}
