@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Syne:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #0d0b0e;
  --bg-warm: #141015;
  --fg: #f0ebe5;
  --fg-muted: #a89e94;
  --accent: #e8a87c;
  --accent-glow: #f4c59e;
  --accent-deep: #c47a4a;
  --plum: #7b4a6e;
  --plum-light: #a8658f;
  --sage: #8fa88a;
  --sage-muted: #6b7d68;
  --surface: #1a161d;
  --surface-border: #2a242e;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'Outfit', sans-serif;
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
}

/* ---- HERO ---- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 6rem 2rem 4rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(232,168,124,0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -10%;
  left: -15%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(123,74,110,0.06) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-inner {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-block;
  font-family: 'Outfit', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent-deep);
  padding: 0.4rem 1rem;
  border-radius: 100px;
  margin-bottom: 2.5rem;
}

.hero h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--fg);
  margin-bottom: 1.5rem;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.hero-lede {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  color: var(--fg-muted);
  max-width: 620px;
  line-height: 1.8;
}

/* ---- PHILOSOPHY ---- */
.philosophy {
  padding: 6rem 2rem;
  position: relative;
}

.philosophy-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  align-items: center;
}

.philosophy-label {
  font-family: 'Outfit', sans-serif;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 1.5rem;
}

.philosophy h2 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 1.2rem;
}

.philosophy p {
  color: var(--fg-muted);
  font-size: 1.05rem;
  line-height: 1.8;
}

.philosophy-visual {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.philosophy-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 16px;
  padding: 1.6rem 1.8rem;
  transition: border-color 0.3s;
}

.philosophy-card:hover {
  border-color: var(--accent-deep);
}

.philosophy-card h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 0.5rem;
}

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

.card-accent-amber { border-left: 3px solid var(--accent); }
.card-accent-plum { border-left: 3px solid var(--plum-light); }
.card-accent-sage { border-left: 3px solid var(--sage); }

/* ---- CAPABILITIES ---- */
.capabilities {
  padding: 6rem 2rem;
  background: var(--bg-warm);
}

.capabilities-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.capabilities-header {
  text-align: center;
  margin-bottom: 4rem;
}

.capabilities-header h2 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 600;
  margin-bottom: 0.8rem;
}

.capabilities-header p {
  color: var(--fg-muted);
  font-size: 1.05rem;
  max-width: 550px;
  margin: 0 auto;
}

.capabilities-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.capability {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 16px;
  padding: 2rem;
  transition: transform 0.2s, border-color 0.3s;
}

.capability:hover {
  transform: translateY(-3px);
  border-color: var(--surface-border);
}

.capability-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 1.2rem;
}

.icon-amber { background: rgba(232,168,124,0.12); color: var(--accent); }
.icon-plum { background: rgba(123,74,110,0.15); color: var(--plum-light); }
.icon-sage { background: rgba(143,168,138,0.15); color: var(--sage); }

.capability h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.capability p {
  color: var(--fg-muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

/* ---- METRICS ---- */
.metrics {
  padding: 5rem 2rem;
  border-top: 1px solid var(--surface-border);
  border-bottom: 1px solid var(--surface-border);
}

.metrics-inner {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  text-align: center;
}

.metric-value {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.5rem;
}

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

/* ---- CLOSING ---- */
.closing {
  padding: 8rem 2rem;
  text-align: center;
  position: relative;
}

.closing::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(232,168,124,0.05) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.closing-inner {
  max-width: 700px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.closing h2 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.2rem;
}

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

/* ---- FOOTER ---- */
footer {
  padding: 2.5rem 2rem;
  border-top: 1px solid var(--surface-border);
  text-align: center;
}

footer p {
  color: var(--fg-muted);
  font-size: 0.8rem;
  opacity: 0.6;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  .hero { padding: 4rem 1.5rem 3rem; min-height: 85vh; }
  .philosophy-inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .capabilities-grid { grid-template-columns: 1fr; }
  .metrics-inner { grid-template-columns: 1fr; gap: 1.5rem; }
  .closing { padding: 5rem 1.5rem; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 2.2rem; }
  .philosophy h2, .capabilities-header h2 { font-size: 1.6rem; }
}

/* ================================================================
   APP SHELL — navigation, layout, shared app chrome
   ================================================================ */

.app-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13,11,14,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--surface-border);
}

.app-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--fg);
}

.nav-logo-mark {
  color: var(--accent);
  font-size: 1.2rem;
}

.nav-logo-text {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  gap: 0.25rem;
  align-items: center;
}

.nav-link {
  padding: 0.4rem 0.9rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--fg-muted);
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
}

.nav-link:hover { color: var(--fg); background: var(--surface); }
.nav-link.active { color: var(--accent); background: rgba(232,168,124,0.1); }
.nav-link-muted { opacity: 0.5; }
.nav-link-muted:hover { opacity: 0.8; }

/* ---- Also add dashboard nav link to landing page hero ---- */
.hero-nav-cta {
  margin-top: 2.5rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.8rem;
  background: var(--accent);
  color: var(--bg);
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 10px;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}

.btn-primary:hover {
  background: var(--accent-glow);
  transform: translateY(-1px);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.8rem;
  border: 1px solid var(--surface-border);
  color: var(--fg-muted);
  font-family: 'Outfit', sans-serif;
  font-weight: 400;
  font-size: 0.95rem;
  border-radius: 10px;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
  margin-left: 1rem;
}

.btn-ghost:hover {
  border-color: var(--accent-deep);
  color: var(--fg);
}

.app-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 2rem 4rem;
}

/* ================================================================
   PAGE HEADER
   ================================================================ */

.page-header {
  margin-bottom: 2.5rem;
}

.page-header-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.page-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent-deep);
  padding: 0.3rem 0.8rem;
  border-radius: 100px;
  margin-bottom: 0.8rem;
}

.page-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--fg);
}

/* ================================================================
   PERIOD SELECTOR
   ================================================================ */

.period-selector {
  display: flex;
  gap: 0.25rem;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 10px;
  padding: 0.3rem;
}

.period-btn {
  padding: 0.4rem 1rem;
  border-radius: 7px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--fg-muted);
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
}

.period-btn:hover { color: var(--fg); background: var(--surface-border); }
.period-btn.active { background: var(--accent); color: var(--bg); }

/* ================================================================
   KPI CARDS
   ================================================================ */

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.kpi-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 16px;
  padding: 1.5rem 1.75rem;
  transition: border-color 0.25s;
}

.kpi-card:hover { border-color: var(--accent-deep); }

.kpi-label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 0.6rem;
}

.kpi-value {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.6rem, 2.5vw, 2rem);
  font-weight: 700;
  line-height: 1;
  color: var(--fg);
  margin-bottom: 0.4rem;
}

.kpi-value.accent { color: var(--accent); }
.kpi-value.plum   { color: var(--plum-light); }
.kpi-value.sage   { color: var(--sage); }

.kpi-sub {
  font-size: 0.8rem;
  color: var(--fg-muted);
  opacity: 0.7;
}

/* ================================================================
   DASHBOARD ROW — chart + top products
   ================================================================ */

.dashboard-row {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.chart-card,
.top-products-card,
.recent-sales-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 16px;
  padding: 1.75rem;
}

.card-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.card-title {
  font-family: 'Syne', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--fg);
}

.card-subtitle {
  font-size: 0.8rem;
  color: var(--fg-muted);
  opacity: 0.6;
}

.card-link {
  font-size: 0.82rem;
  color: var(--accent);
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.card-link:hover { opacity: 1; }

.chart-container {
  height: 240px;
  position: relative;
}

/* ================================================================
   TOP PRODUCTS LIST
   ================================================================ */

.top-products-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.top-product-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.rank-badge {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Syne', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.rank-1 { background: rgba(232,168,124,0.2); color: var(--accent); }
.rank-2 { background: rgba(123,74,110,0.2); color: var(--plum-light); }
.rank-3 { background: rgba(143,168,138,0.15); color: var(--sage); }
.rank-4, .rank-5 { background: var(--surface-border); color: var(--fg-muted); }

.top-product-info {
  flex: 1;
  min-width: 0;
}

.top-product-title {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-product-meta {
  font-size: 0.75rem;
  color: var(--fg-muted);
  margin-top: 0.1rem;
}

.top-product-revenue {
  font-family: 'Syne', sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--accent);
  flex-shrink: 0;
}

/* ================================================================
   TYPE BADGES
   ================================================================ */

.type-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  background: rgba(42,36,46,0.8);
  color: var(--fg-muted);
  border: 1px solid var(--surface-border);
}

/* ================================================================
   SALES TABLE
   ================================================================ */

.recent-sales-card {
  margin-bottom: 0;
}

.sales-table-wrap {
  overflow-x: auto;
}

.sales-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.sales-table th {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-muted);
  padding: 0.5rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--surface-border);
}

.sales-table td {
  padding: 0.75rem;
  border-bottom: 1px solid rgba(42,36,46,0.5);
  vertical-align: middle;
}

.sales-table tr:last-child td { border-bottom: none; }

.sales-table tr:hover td { background: rgba(42,36,46,0.3); }

.sale-product {
  font-weight: 400;
  color: var(--fg);
  max-width: 280px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sale-buyer { color: var(--fg-muted); font-family: monospace; font-size: 0.82rem; }
.sale-amount { color: var(--accent); font-family: 'Syne', sans-serif; font-weight: 600; }
.sale-date { color: var(--fg-muted); font-size: 0.82rem; }

/* ================================================================
   PRODUCT CATALOG
   ================================================================ */

.catalog-stats {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.stat-chip {
  display: inline-block;
  font-size: 0.8rem;
  padding: 0.35rem 0.9rem;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  color: var(--fg-muted);
}

.stat-chip.accent-chip {
  background: rgba(232,168,124,0.1);
  border-color: var(--accent-deep);
  color: var(--accent);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.product-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 16px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: border-color 0.25s, transform 0.2s;
}

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

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

.product-type-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.product-meta-top {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.inactive-badge {
  font-size: 0.68rem;
  font-weight: 500;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  background: rgba(196, 122, 74, 0.1);
  color: var(--accent-deep);
  border: 1px solid rgba(196,122,74,0.3);
}

.product-title {
  font-family: 'Syne', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--fg);
  line-height: 1.3;
}

.product-desc {
  font-size: 0.88rem;
  color: var(--fg-muted);
  line-height: 1.6;
  flex: 1;
}

.product-stats-row {
  display: flex;
  gap: 1.5rem;
  margin-top: 0.25rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--surface-border);
}

.product-stat-value {
  font-family: 'Syne', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.product-stat-value.accent { color: var(--accent); }
.product-stat-value.plum   { color: var(--plum-light); }

.product-stat-label {
  font-size: 0.72rem;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.product-link {
  display: inline-block;
  font-size: 0.82rem;
  color: var(--accent);
  text-decoration: none;
  opacity: 0.75;
  transition: opacity 0.2s;
}

.product-link:hover { opacity: 1; }

.product-last-sale {
  font-size: 0.75rem;
  color: var(--fg-muted);
  opacity: 0.5;
}

/* ================================================================
   RESPONSIVE — app pages
   ================================================================ */

@media (max-width: 1024px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-row { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .app-main { padding: 1.5rem 1rem 3rem; }
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: 0.75rem; }
  .product-grid { grid-template-columns: 1fr; }
  .kpi-value { font-size: 1.4rem; }
  .page-header-inner { flex-direction: column; align-items: flex-start; }
  .app-nav-inner { padding: 0 1rem; }
  .sales-table th:nth-child(3),
  .sales-table td:nth-child(3) { display: none; }
}