/* wgmonitor landing — terminal/dashboard matched theme */

:root {
  --bg: #f8fafc;
  --bg-elev: #ffffff;
  --bg-soft: #f1f5f9;
  --fg: #0f172a;
  --fg-muted: #64748b;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  
  --brand: #0d9488;
  --brand-hover: #0f766e;
  --brand-fg: #ffffff;
  --brand-soft: rgba(13, 148, 136, 0.1);
  
  --accent: #10b981;
  --accent-soft: rgba(16, 185, 129, 0.15);
  
  --warn: #f59e0b;
  --danger: #ef4444;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.04);
  --shadow-md: 0 4px 12px -2px rgb(0 0 0 / 0.08);
  --shadow-lg: 0 10px 25px -5px rgb(0 0 0 / 0.12);
  
  --radius: 0.5rem;
  --radius-lg: 1rem;
  --max-width: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #020617;
    --bg-elev: #0f172a;
    --bg-soft: #1e293b;
    --fg: #f1f5f9;
    --fg-muted: #94a3b8;
    --border: #1e293b;
    --border-strong: #334155;
    
    --brand: #2dd4bf;
    --brand-hover: #5eead4;
    --brand-fg: #020617;
    --brand-soft: rgba(45, 212, 191, 0.15);
    
    --accent: #34d399;
    --accent-soft: rgba(52, 211, 153, 0.15);
    --warn: #fbbf24;
    --danger: #f87171;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.5);
    --shadow-md: 0 4px 12px -2px rgb(0 0 0 / 0.6);
    --shadow-lg: 0 10px 25px -5px rgb(0 0 0 / 0.7);
  }
}

:root[data-theme="dark"] {
  --bg: #020617;
  --bg-elev: #0f172a;
  --bg-soft: #1e293b;
  --fg: #f1f5f9;
  --fg-muted: #94a3b8;
  --border: #1e293b;
  --border-strong: #334155;
  
  --brand: #2dd4bf;
  --brand-hover: #5eead4;
  --brand-fg: #020617;
  --brand-soft: rgba(45, 212, 191, 0.15);
  
  --accent: #34d399;
  --accent-soft: rgba(52, 211, 153, 0.15);
  --warn: #fbbf24;
  --danger: #f87171;
  
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.5);
  --shadow-md: 0 4px 12px -2px rgb(0 0 0 / 0.6);
  --shadow-lg: 0 10px 25px -5px rgb(0 0 0 / 0.7);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  padding: 0 24px;
}

a {
  color: var(--brand);
  text-decoration: none;
  transition: color 0.15s;
}
a:hover { text-decoration: underline; }

code, pre {
  font-family: var(--font-mono);
  font-size: 0.9em;
}
code {
  background: var(--bg-soft);
  color: var(--fg);
  padding: 0.2em 0.4em;
  border-radius: 4px;
  border: 1px solid var(--border);
}
pre {
  background: var(--bg-elev);
  color: var(--fg);
  padding: 16px;
  border-radius: var(--radius);
  overflow-x: auto;
  border: 1px solid var(--border);
  margin: 12px 0;
  box-shadow: var(--shadow-sm);
}
pre code {
  background: transparent;
  border: none;
  padding: 0;
}

h1, h2, h3 {
  line-height: 1.2;
  margin: 0 0 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  color: var(--fg);
}
h2 {
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  margin-top: 0;
}
h3 {
  font-size: 1.1rem;
  margin: 0 0 6px;
}

p {
  margin: 0 0 12px;
  color: var(--fg);
}
.lede {
  color: var(--fg-muted);
  font-size: 1.15rem;
  max-width: 60ch;
  line-height: 1.65;
}

/* ---------- top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  padding: 16px 24px;
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.topbar.scrolled {
  border-bottom-color: var(--border);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--fg);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--brand);
  color: var(--brand-fg);
  font-size: 1rem;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand) 20%, transparent);
}
.nav-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.nav-link {
  padding: 8px 12px;
  color: var(--fg-muted);
  font-weight: 500;
  font-size: 0.95rem;
  border-radius: var(--radius);
  transition: color 0.15s, background 0.15s;
}
.nav-link:hover {
  color: var(--fg);
  background: var(--bg-elev);
  text-decoration: none;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  line-height: 1.2;
  transition: all 0.15s;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn-primary {
  background: var(--brand);
  color: var(--brand-fg);
  border: 1px solid transparent;
}
.btn-primary:hover {
  background: var(--brand-hover);
  box-shadow: var(--shadow-sm);
}
.btn-ghost {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--border-strong);
}
.btn-ghost:hover {
  background: var(--bg-soft);
  border-color: var(--brand);
}
.btn-lg { padding: 12px 20px; font-size: 1rem; }

.theme-toggle {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--fg-muted);
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.theme-toggle:hover {
  background: var(--bg-soft);
  color: var(--fg);
  border-color: var(--brand);
}

/* ---------- hero ---------- */
.hero {
  padding: 80px 0 40px;
  text-align: center;
}
.hero h1 {
  max-width: 20ch;
  margin: 0 auto 20px;
}
.hero .lede {
  margin: 0 auto 32px;
}
.hero-cta {
  display: inline-flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 16px;
}
.hero-note {
  color: var(--fg-muted);
  font-size: 0.9rem;
  margin: 0 auto 48px;
}

/* ---------- eyebrow + kicker ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 24px;
  border: 1px solid var(--accent-soft);
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px var(--accent-soft); }
  50% { box-shadow: 0 0 0 6px transparent; }
}

.section-kicker {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--brand);
  text-transform: uppercase;
  margin-bottom: 12px;
}
.section-intro {
  max-width: 600px;
  margin: 0 auto 40px;
  text-align: center;
}
.section-intro p {
  color: var(--fg-muted);
  font-size: 1.05rem;
}
.section-block {
  padding: 64px 0;
}

/* ---------- hero preview ---------- */
.hero-preview {
  max-width: 900px;
  margin: 0 auto;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  text-align: left;
}
.preview-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--fg-muted);
  font-family: var(--font-mono);
}
.preview-dots { display: inline-flex; gap: 6px; }
.preview-dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-strong);
}
.preview-bar span:nth-child(2) { flex: 1; text-align: center; }
.preview-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-weight: 500;
}
.preview-live b {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 4px var(--accent);
}

.preview-body {
  display: grid;
  grid-template-columns: 180px 1fr;
  min-height: 320px;
}
.preview-sidebar {
  background: var(--bg-soft);
  border-right: 1px solid var(--border);
  padding: 16px 12px;
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--fg-muted);
}
.preview-sidebar strong {
  color: var(--fg);
  font-size: 1rem;
  margin-bottom: 16px;
  padding-left: 8px;
}
.preview-sidebar span {
  padding: 6px 8px;
  border-radius: 6px;
  font-weight: 500;
}
.preview-sidebar span.active {
  background: var(--brand-soft);
  color: var(--brand);
}

.preview-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.preview-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}
.preview-heading small {
  display: block;
  font-size: 0.75rem;
  color: var(--fg-muted);
  font-weight: 600;
  margin-bottom: 4px;
}
.preview-heading strong {
  font-size: 1.1rem;
  color: var(--fg);
}
.preview-heading em {
  font-style: normal;
  font-size: 0.8rem;
  color: var(--fg-muted);
}
.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
}
.metric-grid > div {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.metric-grid small {
  font-size: 0.7rem;
  color: var(--fg-muted);
  font-weight: 600;
}
.metric-grid strong {
  font-size: 1.4rem;
  font-family: var(--font-mono);
  color: var(--fg);
  font-weight: 600;
  margin: 4px 0;
}
.metric-grid .trend {
  font-size: 0.75rem;
  font-weight: 500;
}
.trend.up { color: var(--accent); }
.trend.neutral { color: var(--fg-muted); }

.preview-chart {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  position: relative;
  min-height: 120px;
}
.chart-label {
  display: block;
  font-size: 0.7rem;
  color: var(--fg-muted);
  font-weight: 600;
  margin-bottom: 12px;
}
:root {
  --chart-svg: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 80' preserveAspectRatio='none'><path d='M0 60 C 40 50, 80 30, 120 35 S 200 55, 240 40 S 320 10, 360 22 S 440 48, 480 38 S 560 18, 600 25' stroke='currentColor' stroke-width='2' fill='none'/></svg>");
}
.chart-line {
  width: 100%;
  height: 80px;
  position: relative;
  border-bottom: 1px dashed var(--border-strong);
}
.chart-line::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--chart-svg);
  color: var(--brand);
  background-repeat: no-repeat;
  background-size: 100% 100%;
}

/* ---------- steps ---------- */
.step-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 16px;
}
.step-list > li {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 16px;
  padding: 24px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 600;
  font-family: var(--font-mono);
}

/* ---------- features ---------- */
.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.feature-list > li {
  padding: 20px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
}
.feature-list h3 { margin: 0 0 4px; font-size: 1rem; }
.feature-list p { color: var(--fg-muted); margin: 0; font-size: 0.9rem; }
.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand);
}
.feature-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
}

/* ---------- closing CTA ---------- */
.closing-cta {
  text-align: center;
  padding: 64px 24px;
  border-radius: var(--radius-lg);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  margin: 0 auto;
  max-width: 800px;
}
.closing-cta h2 { margin: 0 0 12px; }
.closing-cta p { color: var(--fg-muted); margin: 0 auto 24px; max-width: 45ch; }

/* ---------- footer ---------- */
footer {
  margin-top: 64px;
  border-top: 1px solid var(--border);
  padding: 24px 0;
  color: var(--fg-muted);
  font-size: 0.9rem;
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-links { display: inline-flex; gap: 16px; }
.footer-links a { color: var(--fg-muted); }
.footer-links a:hover { color: var(--fg); text-decoration: none; }

/* ---------- mobile ---------- */
@media (max-width: 720px) {
  .nav-link { display: none; }
  .hero { padding: 48px 0 24px; }
  .section-block { padding: 48px 0; }
  .topbar { padding: 12px 20px; }
  main, .footer-inner { padding-left: 20px; padding-right: 20px; }
  .preview-body { grid-template-columns: 1fr; }
  .preview-sidebar { display: none; }
  .closing-cta { padding: 48px 20px; }
  .step-list > li { grid-template-columns: 36px minmax(0, 1fr); padding: 20px; gap: 12px; }
  .feature-list > li { grid-template-columns: 32px 1fr; padding: 16px; gap: 12px; }
}
@media (max-width: 480px) {
  h1 { line-height: 1.15; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
}

/* Reveal */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.reveal.in-view {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}
