:root {
  --bg: #0a0c10;
  --bg-elevated: #12151c;
  --bg-card: #181c26;
  --fg: #e8eaf0;
  --fg-muted: #8b91a3;
  --fg-dim: #5a6078;
  --accent: #3dffa2;
  --accent-dim: rgba(61, 255, 162, 0.12);
  --accent-glow: rgba(61, 255, 162, 0.25);
  --danger: #ff6b6b;
  --border: #222738;
  --radius: 12px;
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'DM Sans', sans-serif;
}

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

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ─── HERO ────────────────────── */
.hero {
  min-height: 90vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px 24px 60px;
  max-width: 900px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2.5px;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 8px 18px;
  border-radius: 100px;
  margin-bottom: 36px;
  width: fit-content;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 7vw, 5.2rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 28px;
}

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

.lede {
  font-size: 1.15rem;
  color: var(--fg-muted);
  max-width: 620px;
  line-height: 1.7;
  margin-bottom: 56px;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 28px 36px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: fit-content;
}

.stat-num {
  display: block;
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.82rem;
  color: var(--fg-dim);
  letter-spacing: 0.5px;
}

.stat-divider {
  width: 1px;
  height: 44px;
  background: var(--border);
}

/* ─── PROBLEM ─────────────────── */
.problem {
  padding: 100px 24px;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.problem-inner {
  max-width: 1000px;
  margin: 0 auto;
}

.problem-label,
.features-label,
.how-label {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2.5px;
  color: var(--accent);
  margin-bottom: 16px;
}

.problem h2,
.features h2,
.how h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 48px;
  line-height: 1.15;
}

.problem-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.problem-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
}

.problem-icon {
  font-size: 1.6rem;
  margin-bottom: 16px;
  color: var(--danger);
}

.problem-card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.problem-card p {
  font-size: 0.95rem;
  color: var(--fg-muted);
  line-height: 1.6;
}

/* ─── FEATURES ────────────────── */
.features {
  padding: 100px 24px;
}

.features-inner {
  max-width: 900px;
  margin: 0 auto;
}

.features-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.feature-row {
  display: flex;
  gap: 36px;
  padding: 36px 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}

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

.feature-number {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  min-width: 48px;
  padding-top: 4px;
  opacity: 0.7;
}

.feature-content h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.feature-content p {
  font-size: 0.98rem;
  color: var(--fg-muted);
  line-height: 1.65;
}

/* ─── HOW / COMPARISON ────────── */
.how {
  padding: 100px 24px;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.how-inner {
  max-width: 900px;
  margin: 0 auto;
}

.how-text {
  font-size: 1.1rem;
  color: var(--fg-muted);
  max-width: 680px;
  line-height: 1.7;
  margin-bottom: 48px;
}

.how-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.how-col {
  border-radius: var(--radius);
  padding: 32px 28px;
}

.how-col.old {
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.how-col.new {
  background: var(--accent-dim);
  border: 1px solid rgba(61, 255, 162, 0.2);
}

.how-col-header {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.how-col.old .how-col-header { color: var(--fg-dim); }
.how-col.new .how-col-header { color: var(--accent); }

.how-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.how-col.old li {
  font-size: 0.95rem;
  color: var(--fg-dim);
  padding-left: 20px;
  position: relative;
}

.how-col.old li::before {
  content: '\2013';
  position: absolute;
  left: 0;
  color: var(--fg-dim);
}

.how-col.new li {
  font-size: 0.95rem;
  color: var(--fg);
  padding-left: 24px;
  position: relative;
}

.how-col.new li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* ─── CLOSING ─────────────────── */
.closing {
  padding: 120px 24px;
  text-align: center;
}

.closing-inner {
  max-width: 700px;
  margin: 0 auto;
}

.closing h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 20px;
}

.closing p {
  font-size: 1.1rem;
  color: var(--fg-muted);
  line-height: 1.7;
}

/* ─── FOOTER ──────────────────── */
.site-footer {
  padding: 48px 24px;
  border-top: 1px solid var(--border);
}

.footer-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--fg);
}

.footer-tagline {
  font-size: 0.85rem;
  color: var(--fg-dim);
}

/* ─── RESPONSIVE ──────────────── */
@media (max-width: 768px) {
  .hero { min-height: auto; padding: 60px 20px 48px; }
  .hero-stats { flex-direction: column; gap: 20px; padding: 24px; width: 100%; }
  .stat-divider { width: 60px; height: 1px; }
  .problem-grid { grid-template-columns: 1fr; }
  .problem, .features, .how, .closing { padding: 64px 20px; }
  .how-comparison { grid-template-columns: 1fr; }
  .feature-row { flex-direction: column; gap: 8px; }
  .feature-number { min-width: unset; }
  .footer-inner { flex-direction: column; gap: 8px; text-align: center; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 2.2rem; }
  .lede { font-size: 1rem; }
}
/* ─── APP SHELL ────────────────── */
.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  height: 60px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 100;
}

.app-nav-brand {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--fg);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.app-nav-brand .brand-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}

.app-nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-content {
  flex: 1;
  padding: 40px 32px;
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
}

/* ─── BUTTONS ──────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 8px;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: opacity 0.15s, transform 0.1s;
}

.btn:hover { opacity: 0.88; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--accent);
  color: #0a0c10;
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--fg);
  border: 1px solid var(--border);
}

.btn-ghost {
  background: transparent;
  color: var(--fg-muted);
  border: 1px solid var(--border);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.82rem;
}

.btn-danger {
  background: rgba(255,107,107,0.12);
  color: var(--danger);
  border: 1px solid rgba(255,107,107,0.25);
}

/* ─── STATS ROW ────────────────── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 24px;
}

.stat-card-label {
  font-size: 0.8rem;
  color: var(--fg-dim);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  font-family: var(--font-display);
  font-weight: 600;
  margin-bottom: 10px;
}

.stat-card-value {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--fg);
  line-height: 1.1;
}

.stat-card-value.accent { color: var(--accent); }

/* ─── AI INSIGHT BOX ───────────── */
.ai-insight {
  background: var(--accent-dim);
  border: 1px solid rgba(61,255,162,0.2);
  border-radius: var(--radius);
  padding: 28px 32px;
  margin-bottom: 32px;
  position: relative;
}

.ai-insight-label {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.ai-insight-text {
  font-size: 1rem;
  color: var(--fg);
  line-height: 1.7;
  white-space: pre-wrap;
}

/* ─── ACTION COLUMNS ───────────── */
.actions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}

.action-col {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.action-col-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.action-col-title {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.action-col-count {
  margin-left: auto;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 2px 10px;
  font-size: 0.78rem;
  color: var(--fg-dim);
  font-family: var(--font-display);
  font-weight: 600;
}

.col-reorder .action-col-title { color: var(--danger); }
.col-reduce .action-col-title { color: #f5c842; }
.col-emerging .action-col-title { color: var(--accent); }

.action-list {
  display: flex;
  flex-direction: column;
}

.action-item {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  cursor: default;
  transition: background 0.12s;
}

.action-item:last-child { border-bottom: none; }
.action-item:hover { background: rgba(255,255,255,0.02); }

.action-item-name {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--fg);
  margin-bottom: 4px;
  line-height: 1.35;
}

.action-item-reason {
  font-size: 0.82rem;
  color: var(--fg-muted);
  line-height: 1.5;
}

.action-item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.badge-high { background: rgba(255,107,107,0.15); color: var(--danger); }
.badge-medium { background: rgba(245,200,66,0.15); color: #f5c842; }
.badge-low { background: rgba(255,255,255,0.06); color: var(--fg-dim); }
.badge-trend { background: var(--accent-dim); color: var(--accent); }

.confidence-bar {
  flex: 1;
  min-width: 60px;
  height: 4px;
  background: var(--bg-elevated);
  border-radius: 2px;
  overflow: hidden;
}

.confidence-bar-fill {
  height: 100%;
  border-radius: 2px;
  background: var(--accent);
  opacity: 0.6;
  transition: width 0.3s;
}

.empty-state {
  padding: 40px 22px;
  text-align: center;
  color: var(--fg-dim);
  font-size: 0.9rem;
}

/* ─── CONNECT FORM ─────────────── */
.connect-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

.connect-card {
  width: 100%;
  max-width: 480px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 48px 44px;
}

.connect-logo {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.connect-logo .brand-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
}

.connect-headline {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  margin-top: 28px;
}

.connect-subhead {
  font-size: 0.95rem;
  color: var(--fg-muted);
  line-height: 1.6;
  margin-bottom: 36px;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--fg-muted);
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.form-input {
  width: 100%;
  padding: 13px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 0.98rem;
  transition: border-color 0.15s;
  outline: none;
}

.form-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.form-input::placeholder { color: var(--fg-dim); }

.form-hint {
  font-size: 0.78rem;
  color: var(--fg-dim);
  margin-top: 6px;
  line-height: 1.5;
}

.form-error {
  background: rgba(255,107,107,0.08);
  border: 1px solid rgba(255,107,107,0.25);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.88rem;
  color: var(--danger);
  margin-bottom: 20px;
  line-height: 1.5;
}

/* ─── SYNCING STATE ────────────── */
.sync-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--accent-dim);
  border: 1px solid rgba(61,255,162,0.2);
  border-radius: 10px;
  padding: 14px 20px;
  margin-bottom: 28px;
  font-size: 0.92rem;
  color: var(--fg);
}

.sync-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(61,255,162,0.3);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ─── PAGE HEADER ──────────────── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 32px;
  gap: 16px;
}

.page-header-text {}
.page-title {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.page-subtitle {
  font-size: 0.9rem;
  color: var(--fg-muted);
}

/* ─── STORES LIST ──────────────── */
.stores-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.store-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 26px;
  text-decoration: none;
  display: block;
  transition: border-color 0.15s, transform 0.1s;
}

.store-card:hover {
  border-color: rgba(61,255,162,0.3);
  transform: translateY(-1px);
}

.store-card-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 4px;
}

.store-card-domain {
  font-size: 0.82rem;
  color: var(--fg-dim);
  margin-bottom: 16px;
}

.store-card-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-family: var(--font-display);
  font-weight: 600;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.status-dot.complete { background: var(--accent); box-shadow: 0 0 6px var(--accent); }
.status-dot.syncing { background: #f5c842; box-shadow: 0 0 6px #f5c842; animation: pulse 1.2s ease-in-out infinite; }
.status-dot.pending, .status-dot.error { background: var(--fg-dim); }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ─── LANDING PAGE HERO CTA BTN ─ */
.hero-cta {
  margin-top: 36px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-cta .btn {
  padding: 16px 32px;
  font-size: 1rem;
}

/* ─── RESPONSIVE APP ───────────── */
@media (max-width: 900px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .actions-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .app-content { padding: 24px 16px; }
  .app-nav { padding: 0 16px; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .connect-card { padding: 36px 24px; }
  .page-header { flex-direction: column; }
}
