/* ═══════════════════════════════════════════════════════════
   LIDEX — product hub
   Google-About-style layout, Lidex green identity
   ═══════════════════════════════════════════════════════════ */

:root {
  --brand: #0d9455;
  --brand-dark: #0a7a46;
  --brand-soft: #e6f4ec;
  --bg: #ffffff;
  --bg-soft: #f6f9f7;
  --text: #202124;
  --muted: #5f6368;
  --border: #e3e8e5;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .1);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; }

/* ─────────────── Nav ─────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1120px; margin: 0 auto;
  display: flex; align-items: center; gap: 28px;
  padding: 0 24px; height: 64px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 20px; letter-spacing: -.02em;
}
.brand img { width: 34px; height: 34px; border-radius: 50%; }
.nav-links { display: flex; gap: 4px; margin-left: 8px; }
.nav-links a {
  padding: 8px 12px; border-radius: 8px;
  font-size: 14px; font-weight: 500; color: var(--muted);
}
.nav-links a:hover { background: var(--bg-soft); color: var(--text); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }

/* ─────────────── Social icons ─────────────── */
.socials { display: flex; gap: 2px; align-items: center; }
.socials a {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 9px;
  color: var(--muted); transition: background .15s ease, color .15s ease;
}
.socials a:hover { background: var(--brand-soft); color: var(--brand-dark); }
.socials svg { width: 17px; height: 17px; }
.foot-socials { margin-top: 16px; }
.foot-socials a { width: 36px; height: 36px; }

/* ─────────────── Buttons ─────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: 0; cursor: pointer; font: inherit;
  font-size: 14px; font-weight: 600;
  border-radius: 999px; padding: 10px 18px;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn svg { width: 18px; height: 18px; }

/* ─────────────── Hero ─────────────── */
.hero {
  max-width: 800px; margin: 0 auto;
  padding: 88px 24px 48px; text-align: center;
}
.eyebrow {
  color: var(--brand); font-weight: 700; font-size: 13px;
  letter-spacing: .12em; text-transform: uppercase; margin: 0 0 16px;
}
.hero h1 {
  font-size: clamp(38px, 6vw, 58px);
  line-height: 1.05; letter-spacing: -.03em;
  margin: 0 0 20px; font-weight: 800;
}
.hero > p {
  font-size: clamp(16px, 2.2vw, 19px);
  color: var(--muted); line-height: 1.6;
  max-width: 640px; margin: 0 auto 32px;
}
.hero-cta { display: flex; gap: 12px; justify-content: center; align-items: center; flex-wrap: wrap; }

/* ─────────────── Sections ─────────────── */
.section { max-width: 1120px; margin: 0 auto; padding: 48px 24px 8px; }
.section-head { margin: 0 0 24px; }
.section-label {
  color: var(--brand); font-size: 13px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em;
}
.section-head h2 {
  font-size: clamp(26px, 4vw, 34px);
  letter-spacing: -.02em; margin: 8px 0; font-weight: 700;
}
.section-head > p { color: var(--muted); margin: 0; font-size: 16px; }

/* ─────────────── Product grid + cards ─────────────── */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex; flex-direction: column; gap: 12px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
a.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: #bcd9c9;
}
.card-icon {
  width: 64px; height: 64px; border-radius: 16px;
  object-fit: cover; box-shadow: var(--shadow); flex: none;
}
.card-main { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.card-row { display: flex; align-items: center; gap: 10px; }
.badge {
  font-size: 11px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; padding: 5px 10px; border-radius: 999px;
  margin-left: auto; flex: none;
}
.badge-live { background: var(--brand-soft); color: var(--brand-dark); }
.badge-soon { background: #f1f3f4; color: var(--muted); }
.card h3 { font-size: 20px; margin: 0; letter-spacing: -.01em; }
.card .tagline { margin: 0; color: var(--text); font-weight: 500; font-size: 14.5px; }
.card .desc {
  margin: 0; color: var(--muted); font-size: 14px;
  line-height: 1.55;
}
.card-cta {
  color: var(--brand); font-weight: 600; font-size: 14px;
  display: inline-flex; align-items: center; gap: 6px; margin-top: 4px;
}
.card-cta svg { width: 16px; height: 16px; transition: transform .18s ease; }
a.card:hover .card-cta svg { transform: translateX(3px); }
.card-cta .soon { color: var(--muted); }

/* list view (toggle) */
.grid.list { grid-template-columns: 1fr; }
.grid.list .card { flex-direction: row; align-items: center; gap: 18px; }
.grid.list .card-main { gap: 4px; }
.grid.list .card .desc {
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.grid.list .card-cta { margin: 0; margin-left: auto; white-space: nowrap; }

/* no-results state */
.no-results {
  grid-column: 1 / -1;
  border: 1.5px dashed #cfd8d2; background: var(--bg-soft);
  border-radius: var(--radius);
  padding: 48px 28px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.no-results h3 { margin: 0; font-size: 18px; }
.no-results p { margin: 0; color: var(--muted); font-size: 14.5px; }

/* ─────────────── Products toolbar (search + view toggle) ─────────────── */
.products-toolbar {
  display: flex; align-items: center; gap: 12px;
  flex-wrap: wrap; margin-bottom: 20px;
}
.search-box {
  position: relative; flex: 1; min-width: 220px; max-width: 440px;
  display: flex; align-items: center;
}
.search-ico {
  position: absolute; left: 14px; width: 17px; height: 17px;
  color: var(--muted); pointer-events: none;
}
.search-box input {
  width: 100%; font: inherit; font-size: 14px; color: var(--text);
  background: #fff; border: 1px solid var(--border); border-radius: 999px;
  padding: 10px 40px 10px 40px; outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.search-box input::placeholder { color: #9aa0a6; }
.search-box input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.search-box input::-webkit-search-cancel-button { display: none; }
.search-clear {
  position: absolute; right: 8px;
  display: flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border: 0; border-radius: 50%;
  background: #f1f3f4; color: var(--muted); cursor: pointer;
}
.search-clear:hover { background: #e8eaed; color: var(--text); }
.search-clear svg { width: 13px; height: 13px; }
.view-toggle { margin-left: auto; }
.view-toggle button { padding: 8px 11px; }
.view-toggle svg { width: 17px; height: 17px; display: block; }

.card-placeholder {
  border: 1.5px dashed #cfd8d2;
  background: var(--bg-soft);
  align-items: center; text-align: center;
  padding: 44px 28px;
}
.card-placeholder img { width: 56px; height: 56px; border-radius: 50%; margin-bottom: 4px; opacity: .9; }
.card-placeholder h3 { margin: 0; }
.card-placeholder p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.6; }

/* ─────────────── Market (TradingView widget + live prices) ─────────────── */
.market-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr);
  gap: 20px;
  align-items: stretch;
}
.market-chart-card { padding: 12px; }
.hidden { display: none !important; }

.chart-head {
  display: flex; align-items: center; gap: 12px;
  flex-wrap: wrap; margin-bottom: 10px;
}
.seg {
  display: inline-flex; background: var(--bg-soft);
  border: 1px solid var(--border); border-radius: 10px;
  padding: 3px; gap: 2px;
}
.seg button {
  border: 0; background: none; font: inherit;
  font-size: 12.5px; font-weight: 600; color: var(--muted);
  padding: 6px 12px; border-radius: 7px; cursor: pointer;
}
.seg button.active { background: #fff; color: var(--text); box-shadow: var(--shadow); }
.feed-badge {
  font-size: 11px; font-weight: 600; color: var(--muted);
  border: 1px solid var(--border); border-radius: 999px;
  padding: 4px 10px; background: #fff; white-space: nowrap; margin-left: auto;
}
.feed-badge.live { color: var(--brand-dark); background: var(--brand-soft); border-color: transparent; }
.chart-stage { position: relative; }

/* TradingView widget (official embed sizing) */
.tv-widget { width: 100%; height: 460px; }
.tradingview-widget-container { width: 100%; height: 460px; }
.tradingview-widget-container__widget { height: 100%; }

/* CoinGecko candle chart (TradingView Lightweight Charts) */
.cg-chart { width: 100%; height: 460px; }
.chart-fallback {
  color: var(--muted); font-size: 14px; line-height: 1.6;
  padding: 48px 28px; margin: 0;
}

.market-list-card { display: flex; flex-direction: column; padding: 20px; }
.market-list-card h3 { margin: 0 0 8px; font-size: 15px; }
.mkt-src {
  font-size: 11px; font-weight: 600; color: var(--brand-dark);
  background: var(--brand-soft); padding: 3px 9px;
  border-radius: 999px; margin-left: 6px; vertical-align: middle;
}
.mkt-row {
  display: grid;
  grid-template-columns: 34px 1fr auto auto;
  gap: 12px; align-items: center;
  width: 100%; border: 0; background: none; font: inherit;
  padding: 10px 8px; border-radius: 10px; cursor: pointer; text-align: left;
}
.mkt-row:hover { background: var(--bg-soft); }
.mkt-row.active { background: var(--brand-soft); }
.mkt-ico {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 8.5px; font-weight: 800; color: #fff; letter-spacing: .02em;
}
.mkt-name { font-size: 14px; font-weight: 600; display: flex; flex-direction: column; line-height: 1.25; }
.mkt-name small { color: var(--muted); font-weight: 500; font-size: 11.5px; }
.mkt-price { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mkt-chg {
  font-size: 12.5px; font-weight: 700;
  font-variant-numeric: tabular-nums;
  min-width: 64px; text-align: right; white-space: nowrap;
}
.mkt-chg.up { color: var(--brand-dark); }
.mkt-chg.down { color: #c5221f; }
.mkt-foot {
  margin: auto 0 0; padding-top: 12px;
  border-top: 1px solid var(--border);
  color: var(--muted); font-size: 12px; line-height: 1.5;
}

/* ─────────────── Vision ─────────────── */
.vision {
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-top: 64px;
}
.vision-inner { max-width: 720px; margin: 0 auto; padding: 72px 24px; text-align: center; }
.vision h2 { font-size: clamp(26px, 4vw, 34px); letter-spacing: -.02em; margin: 0 0 16px; font-weight: 700; }
.vision p { color: var(--muted); font-size: 16.5px; line-height: 1.7; margin: 0; }

/* ─────────────── Footer ─────────────── */
footer { padding: 56px 24px 40px; }
.foot-inner {
  max-width: 1120px; margin: 0 auto;
  display: flex; flex-wrap: wrap; gap: 40px; justify-content: space-between;
}
.foot-brand { max-width: 260px; }
.foot-brand .brand { margin-bottom: 12px; }
.foot-brand p { color: var(--muted); font-size: 13.5px; line-height: 1.6; margin: 0; }
.foot-cols { display: flex; gap: 64px; flex-wrap: wrap; }
.foot-col h4 {
  font-size: 12px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted); margin: 0 0 12px;
}
.foot-col a { display: block; font-size: 14px; color: var(--text); padding: 4px 0; }
.foot-col a:hover { color: var(--brand); }
.foot-bottom {
  max-width: 1120px; margin: 40px auto 0; padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--muted); font-size: 13px;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.foot-bottom a {
  color: var(--brand-dark); font-weight: 600; text-decoration: none;
}
.foot-bottom a:hover { color: var(--brand); text-decoration: underline; }

/* ─────────────── Wallet (connect / account) ─────────────── */
.wallet-slot { display: inline-flex; }
.wallet-wrap { position: relative; display: inline-flex; }
.wallet-chip {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--border); background: #fff;
  border-radius: 999px; padding: 6px 12px 6px 6px;
  font: inherit; font-size: 13.5px; font-weight: 600; color: var(--text);
  cursor: pointer; transition: border-color .15s ease;
}
.wallet-chip:hover { border-color: #c9d2cc; }
.wallet-chip.pending { opacity: .72; }
.wallet-chip .avatar { width: 28px; height: 28px; border-radius: 50%; flex: none; }
.wallet-chip .chev { width: 14px; height: 14px; color: var(--muted); }
.wallet-menu {
  position: absolute; right: 0; top: calc(100% + 8px);
  background: #fff; border: 1px solid var(--border);
  border-radius: 14px; box-shadow: var(--shadow-lg);
  min-width: 232px; padding: 8px; z-index: 60;
  display: none;
}
.wallet-menu.open { display: block; }
.wallet-menu .menu-head { padding: 8px 10px 10px; font-size: 12px; color: var(--muted); line-height: 1.5; }
.menu-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; border: 0; background: none;
  font: inherit; font-size: 14px; font-weight: 500; color: var(--text);
  padding: 9px 10px; border-radius: 9px; cursor: pointer; text-align: left;
}
.menu-item:hover { background: var(--bg-soft); }
.menu-item.danger { color: #c5221f; }
.menu-item svg { width: 16px; height: 16px; flex: none; }
.menu-sep { height: 1px; background: var(--border); margin: 6px 4px; }

/* ─────────────── Toast ─────────────── */
.toast {
  position: fixed; left: 50%; bottom: 28px;
  transform: translate(-50%, 16px);
  background: #202124; color: #fff;
  font-size: 14px; padding: 12px 20px; border-radius: 12px;
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
  max-width: 90vw; z-index: 100;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ─────────────── Responsive ─────────────── */
@media (max-width: 900px) {
  .market-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .hero { padding-top: 56px; }
  .grid { grid-template-columns: 1fr; }
  .foot-cols { gap: 32px; }
  .products-toolbar { flex-direction: column; align-items: stretch; }
  .search-box { max-width: none; }
  .view-toggle { margin-left: 0; align-self: flex-end; }
  .grid.list .card { flex-direction: column; align-items: stretch; }
  .grid.list .card-cta { margin: 4px 0 0; }
  .tv-widget, .tradingview-widget-container, .cg-chart { height: 380px; }
}
