/* GridPrice — design tokens mirror the app (src/theme.ts).
   Rule: color only ever encodes price level; everything interactive is warm neutral. */

:root {
  --bg: #0d0e0c;
  --bg-elevated: #161714;
  --card: #161714;
  --border: #26271f;
  --text: #f2f1ea;
  --text-dim: #a5a499;
  --text-faint: #6e6d62;
  --accent: #e8e6dc;

  --cheap: #4caf50;
  --normal: #afb42b;
  --elevated: #ff9800;
  --high: #ff5722;
  --extreme: #c62828;

  --radius: 14px;
  --radius-lg: 20px;
  --display: 'Space Grotesk', system-ui, sans-serif;
  --body: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

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

a { color: var(--text); }
a:focus-visible, button:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap { max-width: 1060px; margin: 0 auto; padding: 0 24px; }

/* ---- Nav ---- */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 0;
}
.nav-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nav-brand img { width: 26px; height: 34px; }
.nav-brand span { font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: -0.02em; }
.nav-links { display: flex; gap: 22px; align-items: center; }
.nav-links a { color: var(--text-dim); text-decoration: none; font-size: 14px; font-weight: 600; }
.nav-links a:hover { color: var(--text); }
.nav-links a.nav-cta {
  color: var(--bg); background: var(--accent);
  padding: 8px 16px; border-radius: 999px;
}

/* ---- Hero ---- */
.hero {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px;
  align-items: center; padding: 64px 0 72px;
}
.hero h1 {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(34px, 5vw, 52px); line-height: 1.08; letter-spacing: -0.03em;
}
.hero h1 .lvl { white-space: nowrap; }
.hero .lede { color: var(--text-dim); margin: 18px 0 28px; max-width: 46ch; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--body); font-weight: 700; font-size: 15px;
  border: none; cursor: pointer; text-decoration: none;
  padding: 13px 22px; border-radius: var(--radius);
}
.btn-primary { background: var(--accent); color: var(--bg); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost {
  background: transparent; color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--text-faint); }
.store-note { color: var(--text-faint); font-size: 13px; width: 100%; margin-top: 4px; }

/* ---- Live widget replica ---- */
.phone-shadow { filter: drop-shadow(0 24px 60px rgba(0,0,0,0.55)); }
.widget-demo {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.widget-demo .wd-price { font-family: var(--display); font-weight: 700; font-size: 44px; line-height: 1; }
.widget-demo .wd-unit { font-family: var(--display); font-size: 14px; margin-left: 4px; }
.widget-demo .wd-level { font-size: 12px; font-weight: 600; margin-top: 6px; }
.widget-demo .wd-right { text-align: right; }
.widget-demo .wd-brand { font-family: var(--display); font-weight: 700; font-size: 13px; }
.widget-demo .wd-meta { color: var(--text-dim); font-size: 12px; margin-top: 3px; }
.demo-caption { color: var(--text-faint); font-size: 13px; text-align: center; margin-top: 14px; }
.demo-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 22px;
}
.demo-card .chart-title { color: var(--text-faint); font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 10px; }

/* ---- Sections ---- */
section { padding: 56px 0; border-top: 1px solid var(--border); }
.sec-title { font-family: var(--display); font-weight: 700; font-size: 28px; letter-spacing: -0.02em; margin-bottom: 8px; }
.sec-sub { color: var(--text-dim); margin-bottom: 32px; max-width: 60ch; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 22px;
}
.feature h3 { font-family: var(--display); font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.feature p { color: var(--text-dim); font-size: 14px; }
.feature .f-stat { font-family: var(--display); font-size: 26px; font-weight: 700; margin-bottom: 10px; }

.coverage { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.cov-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px; }
.cov-card h3 { font-family: var(--display); font-size: 18px; margin-bottom: 4px; }
.cov-card .cov-kind { color: var(--text-faint); font-size: 12px; margin-bottom: 12px; }
.cov-card ul { list-style: none; }
.cov-card li { color: var(--text-dim); font-size: 14px; padding: 5px 0; border-top: 1px solid var(--border); }
.cov-card li:first-child { border-top: none; }

/* ---- Live hub ---- */
.hub-controls { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 24px; }
.hub-field label { display: block; color: var(--text-dim); font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.hub-field select {
  appearance: none;
  background: var(--bg-elevated) url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23a5a499' stroke-width='2' fill='none'/%3E%3C/svg%3E") no-repeat right 14px center;
  color: var(--text); border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 15px; font-weight: 600; padding: 13px 42px 13px 16px; min-width: 240px;
  cursor: pointer;
}
.hub-panel { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 26px; }
.hub-hero { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.hub-price { font-family: var(--display); font-weight: 700; font-size: 64px; line-height: 1; }
.hub-unit { font-family: var(--display); font-size: 18px; }
.hub-chip {
  font-size: 12px; font-weight: 700; padding: 4px 12px; border-radius: 999px;
  border: 1px solid; align-self: center;
}
.hub-meta { color: var(--text-dim); font-size: 13px; margin-top: 8px; }
.hub-stats { display: flex; gap: 12px; margin-top: 22px; flex-wrap: wrap; }
.stat {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 16px; min-width: 120px;
}
.stat .s-label { color: var(--text-faint); font-size: 11px; font-weight: 600; letter-spacing: 0.03em; }
.stat .s-value { font-family: var(--display); font-size: 20px; font-weight: 700; margin-top: 2px; }
.stat .s-sub { color: var(--text-dim); font-size: 11px; margin-top: 2px; }

.chart-box { position: relative; margin-top: 26px; }
.chart-box svg { display: block; width: 100%; height: auto; }
.chart-tip {
  position: absolute; pointer-events: none; display: none;
  background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
  padding: 6px 10px; font-size: 12px; white-space: nowrap;
  transform: translate(-50%, -130%);
}
.chart-tip .tip-val { font-family: var(--display); font-weight: 700; font-size: 14px; }
.chart-tip .tip-time { color: var(--text-dim); }

details.table-view { margin-top: 18px; }
details.table-view summary { color: var(--text-dim); font-size: 13px; cursor: pointer; }
details.table-view table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 13px; }
details.table-view th, details.table-view td { text-align: left; padding: 6px 10px; border-top: 1px solid var(--border); color: var(--text-dim); }
details.table-view th { color: var(--text-faint); font-weight: 600; }

.hub-external { text-align: left; }
.hub-external h3 { font-family: var(--display); font-size: 22px; margin-bottom: 8px; }
.hub-external p { color: var(--text-dim); max-width: 62ch; margin-bottom: 16px; }

/* ---- Footer ---- */
footer { border-top: 1px solid var(--border); padding: 36px 0 48px; margin-top: 40px; }
.foot { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.foot .f-left { display: flex; align-items: center; gap: 10px; }
.foot img { width: 20px; height: 26px; }
.foot .f-name { font-family: var(--display); font-weight: 700; }
.foot p, .foot a { color: var(--text-dim); font-size: 13px; }
.foot .f-right { text-align: right; }
.disclaimer { color: var(--text-faint); font-size: 12px; margin-top: 18px; max-width: 78ch; }

/* ---- Responsive ---- */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 36px; padding: 40px 0 52px; }
  .features, .coverage { grid-template-columns: 1fr; }
  .nav-links a:not(.nav-cta) { display: none; }
  .hub-price { font-size: 48px; }
  .foot .f-right { text-align: left; }
}
