/* ============================================================================
   GME PATTERN TRACKER - Landing page (/)
   Layered on gme-dashboard.css: uses its design tokens (--ds-*, --gme-*) and
   reuses .glass-panel, .panel-header/.panel-title/.panel-body, .gme-logo*,
   .tv-*, .site-footer/.footer-* and .insider-type-badge unchanged. Only
   landing-specific layout lives here (prefix lp-). No hardcoded colours.
   ============================================================================ */

.lp {
  --lp-max: 1200px;
  --lp-gutter: var(--ds-space-4);
  --lp-section-gap: calc(var(--ds-space-8) * 2);
  font-size: 1rem;
  background:
    radial-gradient(ellipse 80% 50% at 15% -10%, var(--gme-red-glow), transparent 60%),
    radial-gradient(ellipse 60% 40% at 100% 10%, var(--ds-accent-glow), transparent 65%),
    var(--ds-bg-void);
  background-attachment: fixed;
}

.lp-container {
  width: 100%;
  max-width: var(--lp-max);
  margin: 0 auto;
  padding: 0 var(--lp-gutter);
}

.lp-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.lp-skip {
  position: absolute;
  left: var(--ds-space-2);
  top: calc(-1 * var(--ds-space-8) * 2);
  z-index: var(--z-modal);
  padding: var(--ds-space-2) var(--ds-space-4);
  background: var(--ds-bg-space);
  color: var(--ds-text-primary);
  border: 1px solid var(--ds-border-accent);
  border-radius: var(--ds-radius-md);
}
.lp-skip:focus { top: var(--ds-space-2); }

.lp a { color: var(--ds-accent-400); }
.lp :focus-visible {
  outline: 2px solid var(--ds-accent-400);
  outline-offset: 2px;
}

/* ---- Ambient game background (#ambient-canvas from gme-dashboard.css) ----
   Same canvas + ThemeManager as the dashboard, dimmed further here because
   the landing page has long runs of text directly over it. Invisible until
   landing.js starts it (after first paint, never with reduced motion). */
.lp #ambient-canvas {
  opacity: 0;
  transition: opacity 1.2s ease-out;
  /* The dashboard's blur/saturate filter re-composites the full-screen
     canvas every frame (~40% of frame time without a GPU); dimming alone
     keeps it soft enough behind text. */
  filter: none;
}
.lp.lp-bg-on #ambient-canvas { opacity: 0.28; }
.lp main,
.lp .lp-footer {
  position: relative;
  z-index: var(--z-panels);
}
.lp-title,
.lp-pitch,
.lp-h2,
.lp-lede,
.lp-signoff { text-shadow: 0 1px 12px var(--ds-bg-void); }

/* ---- Header ---------------------------------------------------------- */
.lp-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: var(--ds-bg-panel);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--ds-border-subtle);
}
.lp-header-inner {
  display: flex;
  align-items: center;
  gap: var(--ds-space-6);
  min-height: 64px;
}
.lp-logo { text-decoration: none; }
.lp-logo .gme-logo-text { display: flex; flex-direction: column; }
.lp-nav {
  display: flex;
  gap: var(--ds-space-5);
  margin-left: auto;
}
.lp-nav a {
  color: var(--ds-text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
}
.lp-nav a:hover { color: var(--ds-text-primary); }

/* ---- Buttons (landing CTAs) -------------------------------------------- */
.lp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--ds-space-2);
  min-height: 44px;
  padding: var(--ds-space-2) var(--ds-space-5);
  border-radius: var(--ds-radius-md);
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: var(--ds-transition-fast);
  white-space: nowrap;
}
.lp .lp-btn--primary {
  background: var(--gme-red);
  color: var(--ds-text-primary);
  box-shadow: 0 0 18px var(--gme-red-glow);
}
.lp .lp-btn--primary:hover {
  background: var(--gme-red-light);
  box-shadow: var(--ds-shadow-glow);
}
.lp .lp-btn--ghost {
  background: var(--ds-bg-surface);
  color: var(--ds-text-primary);
  border-color: var(--ds-border-default);
}
.lp .lp-btn--ghost:hover { border-color: var(--ds-border-accent); background: var(--ds-bg-hover); }
.lp .lp-btn--soon {
  background: var(--ds-bg-surface);
  color: var(--ds-text-secondary);
  border: 1px dashed var(--ds-border-default);
  cursor: default;
}
.lp-btn--sm { min-height: 36px; padding: var(--ds-space-1) var(--ds-space-4); font-size: 0.875rem; }

/* ---- Hero ---------------------------------------------------------- */
.lp-hero { padding: calc(var(--ds-space-8) * 2) 0 var(--ds-space-8); }
.lp-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: var(--ds-space-8);
  align-items: center;
}
.lp-kicker {
  font-family: var(--ds-font-mono);
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ds-accent-400);
  margin-bottom: var(--ds-space-3);
}
.lp-title {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: var(--ds-space-4);
}
.lp-title .accent,
.lp-h2 .accent { color: var(--gme-red-light); }
.lp-pitch {
  font-size: 1.15rem;
  color: var(--ds-text-secondary);
  max-width: 34em;
  margin-bottom: var(--ds-space-6);
}
.lp-pitch strong { color: var(--ds-text-primary); }
.lp-cta { display: flex; flex-wrap: wrap; gap: var(--ds-space-3); }
.lp-cta--center { justify-content: center; margin-top: var(--ds-space-8); }
.lp-trust {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--ds-space-2) var(--ds-space-5);
  margin-top: var(--ds-space-6);
  color: var(--ds-text-muted);
  font-size: 0.8rem;
  font-family: var(--ds-font-mono);
}
.lp-trust li::before { content: "\2713\00a0"; color: var(--signal-bullish); }
.lp-hero-chart .panel-title { font-size: 0.75rem; }

/* ---- Sections ------------------------------------------------------ */
.lp-section { padding: var(--ds-space-8) 0; scroll-margin-top: 72px; }
.lp-section + .lp-section { margin-top: var(--ds-space-8); }
.lp-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--ds-space-2) var(--ds-space-4);
  margin-bottom: var(--ds-space-6);
}
.lp-h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; line-height: 1.2; }
.lp-lede { flex: 1 0 100%; color: var(--ds-text-secondary); }

/* ---- Badges & tags ------------------------------------------------- */
.lp-badge,
.lp-tag {
  display: inline-block;
  font-family: var(--ds-font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 2px var(--ds-space-2);
  border-radius: var(--ds-radius-sm);
  border: 1px solid var(--ds-border-default);
  color: var(--ds-text-secondary);
  background: var(--ds-bg-surface);
}
.lp-badge--ai { color: var(--ds-warning-base); border-color: var(--ds-warning-base); background: transparent; }
.lp-tag--live { color: var(--signal-bullish); border-color: var(--signal-bullish-glow); }
.lp-tag--docs { color: var(--ds-accent-400); border-color: var(--ds-accent-glow); }

/* ---- Video ----------------------------------------------------------- */
.lp-video-panel { padding: var(--ds-space-4); max-width: 960px; }
.lp-video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  border-radius: var(--ds-radius-md);
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 30%, var(--gme-red-glow), transparent 55%),
    radial-gradient(circle at 75% 70%, var(--ds-accent-glow), transparent 55%),
    var(--ds-bg-deep);
}
.lp-video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.lp-video-facade {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--ds-space-2);
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--ds-text-primary);
  font: inherit;
  cursor: pointer;
}
.lp-video-play-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--gme-red);
  box-shadow: var(--ds-shadow-glow);
  position: relative;
  transition: var(--ds-transition-fast);
}
.lp-video-play-icon::after {
  content: "";
  position: absolute;
  left: 29px;
  top: 22px;
  border-style: solid;
  border-width: 14px 0 14px 22px;
  border-color: transparent transparent transparent var(--ds-text-primary);
}
.lp-video-facade:hover .lp-video-play-icon { transform: scale(1.06); }
.lp-video-facade-text { font-weight: 600; font-size: 1.1rem; }
.lp-video-facade-sub,
.lp-video-empty-sub { font-size: 0.8rem; color: var(--ds-text-secondary); }
.lp-video-frame.lp-video-empty {
  aspect-ratio: auto;
  min-height: 240px;
}
.lp-video-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--ds-space-2);
  text-align: center;
  padding: var(--ds-space-6);
}
.lp-video-empty-title { font-weight: 600; font-size: 1.1rem; }
.lp-video-noscript { position: absolute; inset: auto 0 var(--ds-space-4); text-align: center; }
.lp-disclosure {
  margin-top: var(--ds-space-3);
  font-size: 0.8rem;
  color: var(--ds-text-secondary);
}
.lp-disclosure strong { color: var(--ds-text-primary); }

/* ---- Feature cards --------------------------------------------------- */
.lp-features {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--ds-space-4);
}
.lp-feature { padding: var(--ds-space-5); }
.lp-feature h3 { font-size: 1.05rem; margin: var(--ds-space-3) 0 var(--ds-space-2); }
.lp-feature p { color: var(--ds-text-secondary); font-size: 0.9rem; }

/* ---- Live panels ----------------------------------------------------- */
.lp-live-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--ds-space-4);
}
.lp-live-wide { grid-column: 1 / -1; }
.lp-live-panel[data-span="rows"] { grid-row: span 2; }
.lp-live-grid { align-items: start; }
.lp-live-panel .panel-header { flex-wrap: wrap; gap: var(--ds-space-1) var(--ds-space-3); }
.lp-live-panel .panel-title { font-size: 0.8rem; }
.lp-source {
  font-family: var(--ds-font-mono);
  font-size: 0.68rem;
  color: var(--ds-text-muted);
}
.lp-highlight { color: var(--ds-text-secondary); margin-bottom: var(--ds-space-3); font-size: 0.9rem; }
.lp-highlight:empty { display: none; }
.lp-highlight strong { color: var(--signal-bullish); }
.lp-table-wrap { overflow-x: auto; }
.lp-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.lp-table th,
.lp-table td {
  text-align: left;
  padding: var(--ds-space-2) var(--ds-space-2);
  border-bottom: 1px solid var(--ds-border-subtle);
  white-space: nowrap;
}
.lp-table th { color: var(--ds-text-muted); font-weight: 500; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 1px; }
.lp-table .num { text-align: right; font-family: var(--ds-font-mono); }
.lp-table .lp-name { white-space: normal; }
.lp-filings { list-style: none; }
.lp-filings li {
  display: flex;
  align-items: baseline;
  gap: var(--ds-space-3);
  padding: var(--ds-space-2) 0;
  border-bottom: 1px solid var(--ds-border-subtle);
  font-size: 0.85rem;
}
.lp-filing-type {
  min-width: 5.5em;
  font-family: var(--ds-font-mono);
  font-weight: 600;
  color: var(--ds-text-primary);
}
.lp-filing-date { color: var(--ds-text-muted); font-family: var(--ds-font-mono); margin-left: auto; white-space: nowrap; }
.lp-filings a { text-decoration: none; }
.lp-filings a:hover { text-decoration: underline; }
.lp-chart { height: 260px; width: 100%; }
.lp-ftd-stats,
.lp-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--ds-space-3);
  margin-bottom: var(--ds-space-4);
}
.lp-stat dt,
.lp-stat .lp-stat-label { color: var(--ds-text-muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 1px; }
.lp-stat dd,
.lp-stat .lp-stat-value { font-family: var(--ds-font-mono); font-size: 1.25rem; font-weight: 600; color: var(--ds-text-primary); }
.lp-stat .lp-delta-up { color: var(--signal-bullish); }
.lp-stat .lp-delta-down { color: var(--signal-bearish); }
.lp-stat-sub { display: block; font-size: 0.72rem; color: var(--ds-text-muted); font-family: var(--ds-font-sans); font-weight: 400; }
.lp-asof { margin-top: var(--ds-space-3); font-size: 0.75rem; color: var(--ds-text-muted); }
.lp-asof:empty { display: none; }
.lp-loading,
.lp-error { color: var(--ds-text-muted); font-size: 0.85rem; padding: var(--ds-space-2) 0; }

/* ---- Why ------------------------------------------------------------- */
.lp-why-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--ds-space-4);
}
.lp-why-card { padding: var(--ds-space-5); }
.lp-why-card h3 { font-size: 1.05rem; margin-bottom: var(--ds-space-2); }
.lp-why-card p { color: var(--ds-text-secondary); font-size: 0.92rem; }
.lp-why-cave { border-color: var(--ds-border-accent); }

/* ---- Install --------------------------------------------------------- */
.lp-install .panel-header { gap: var(--ds-space-3); }
.lp-code {
  margin: 0;
  padding: var(--ds-space-4);
  overflow-x: auto;
  font-family: var(--ds-font-mono);
  font-size: 0.82rem;
  line-height: 1.7;
  color: var(--ds-text-primary);
  background: var(--ds-bg-deep);
}
.lp-copy {
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  min-height: 32px;
  padding: var(--ds-space-1) var(--ds-space-3);
  color: var(--ds-text-primary);
  background: var(--ds-bg-surface);
  border: 1px solid var(--ds-border-default);
  border-radius: var(--ds-radius-sm);
  cursor: pointer;
}
.lp-copy:hover { border-color: var(--ds-border-accent); }
.lp-install-foot { padding: var(--ds-space-3) var(--ds-space-4) var(--ds-space-4); font-size: 0.85rem; color: var(--ds-text-secondary); }
.lp-install-foot code { font-family: var(--ds-font-mono); font-size: 0.8rem; color: var(--ds-text-primary); }

.lp-soon-note { padding: var(--ds-space-4) var(--ds-space-4) 0; color: var(--ds-text-secondary); }
.lp-code--muted { color: var(--ds-text-muted); margin-top: var(--ds-space-4); }

/* ---- Community sign-off ------------------------------------------------ */
.lp-signoff {
  text-align: center;
  padding: calc(var(--ds-space-8) * 2) var(--lp-gutter) var(--ds-space-8);
}
.lp-signoff-line {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--ds-text-primary);
}
.lp-signoff-sub { margin-top: var(--ds-space-2); color: var(--ds-text-secondary); }

/* ---- Footer (extends .site-footer) ------------------------------------- */
.lp-footer { max-width: none; margin-top: var(--ds-space-8); padding-bottom: var(--ds-space-8); }
.lp-footer-h {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--ds-text-muted);
  margin: var(--ds-space-4) 0 var(--ds-space-2);
}
.lp-footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--ds-space-3) var(--ds-space-6);
  margin-top: var(--ds-space-6);
  padding-top: var(--ds-space-4);
  border-top: 1px solid var(--ds-border-subtle);
  font-size: 0.85rem;
}
.lp-footer-bottom a { text-decoration: none; }
.lp-footer-bottom a:hover { text-decoration: underline; }
.lp-footer-bottom .lp-built {
  margin-left: auto;
  font-size: 0.72rem;
  color: var(--ds-text-muted);
}

/* ---- Responsive ------------------------------------------------------ */
@media (max-width: 1023px) {
  .lp-features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lp-nav { display: none; }
  .lp-header-inner { justify-content: space-between; }
}
@media (max-width: 767px) {
  .lp { background-attachment: scroll; }
  .lp-hero { padding-top: var(--ds-space-8); }
  .lp-hero-grid,
  .lp-live-grid,
  .lp-why-grid,
  .lp-features { grid-template-columns: minmax(0, 1fr); }
  .lp-logo .gme-logo-subtitle,
  .lp-hide-sm { display: none; }
  .lp-header-inner { gap: var(--ds-space-3); }
  .lp-header .lp-btn--sm { padding: var(--ds-space-1) var(--ds-space-3); font-size: 0.8rem; }
  .lp-logo .gme-logo-title { font-size: 1rem; }
  .lp-live-panel[data-span="rows"] { grid-row: auto; }
  .lp-cta .lp-btn { flex: 1 1 100%; }
  .lp-chart { height: 220px; }
  .lp-table .lp-col-price { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .lp #ambient-canvas { display: none; }
  .lp *,
  .lp *::before,
  .lp *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
