:root {
  --bg: #0a0e17;
  --bg-elevated: #111827;
  --border: rgba(148, 163, 184, 0.12);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #34d399;
  --blue: #60a5fa;
  --violet: #a78bfa;
  --rose: #fb7185;
  --emerald: #34d399;
  --amber: #fbbf24;
  --sky: #38bdf8;
  --radius: 14px;
  --font: "DM Sans", system-ui, sans-serif;
  --display: "Instrument Serif", Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
}

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  z-index: 0;
}

.wrap {
  width: min(1120px, 92vw);
  margin-inline: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: inherit;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--emerald), #059669);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.brand-text { font-weight: 600; font-size: 0.95rem; }
.nav-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.875rem;
}
.nav-top a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}
.nav-top a:hover { color: var(--text); }
.nav-cta {
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  color: var(--accent) !important;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}
.theme-picker {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: var(--muted);
}
.theme-picker span {
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.theme-picker select {
  max-width: 12rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 0.8rem;
  padding: 0.3rem 0.45rem;
}

/* Hero */
.hero {
  position: relative;
  z-index: 1;
  padding: 4rem 0 3rem;
  background:
    radial-gradient(ellipse 80% 60% at 70% -10%, color-mix(in srgb, var(--accent) 18%, transparent), transparent),
    radial-gradient(ellipse 50% 40% at 10% 20%, rgba(96, 165, 250, 0.08), transparent);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2.5rem;
  align-items: start;
}
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .nav-top a { display: none; }
  .nav-top .theme-picker { display: flex; }
}
.eyebrow {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--emerald);
  margin: 0 0 0.75rem;
}
.hero h1 {
  font-family: var(--display);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 400;
  line-height: 1.08;
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
}
.hero h1 em {
  font-style: italic;
  color: #a7f3d0;
}
.lead {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 34ch;
  margin: 0 0 1.75rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.65rem 1.2rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: transform 0.15s, background 0.15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--emerald);
  color: #022c22;
}
.btn-ghost {
  border: 1px solid var(--border);
  color: var(--text);
}

/* Status panel */
.status-panel {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  padding: 1.5rem;
  animation: fadeUp 0.6s ease both;
}
.panel-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin: 0 0 1rem;
}
.health-ring {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  margin-bottom: 1rem;
}
.health-value {
  font-size: 3rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(135deg, #6ee7b7, var(--emerald));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.health-unit {
  font-size: 0.85rem;
  color: var(--muted);
}
.status-stats {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.status-stats strong { color: var(--text); }
.status-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.chip {
  font-size: 0.7rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
}
.chip.ok { border-color: rgba(52, 211, 153, 0.35); color: #6ee7b7; }
.chip.fail { border-color: rgba(251, 113, 133, 0.35); color: #fda4af; }

/* Solutions */
.solutions {
  position: relative;
  z-index: 1;
  padding: 3rem 0 4rem;
}
.section-head { margin-bottom: 2rem; }
.section-head.compact { margin-bottom: 1.25rem; }
.section-head h2 {
  font-family: var(--display);
  font-size: 1.85rem;
  font-weight: 400;
  margin: 0 0 0.5rem;
}
.section-head p {
  margin: 0;
  color: var(--muted);
  max-width: 52ch;
}
.solutions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}
.solution-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  animation: fadeUp 0.5s ease both;
  transition: border-color 0.2s, transform 0.2s;
}
.solution-card:hover {
  transform: translateY(-2px);
  border-color: rgba(148, 163, 184, 0.22);
}
.solution-card[data-accent="blue"] { border-top: 3px solid var(--blue); }
.solution-card[data-accent="violet"] { border-top: 3px solid var(--violet); }
.solution-card[data-accent="rose"] { border-top: 3px solid var(--rose); }
.solution-card[data-accent="emerald"] { border-top: 3px solid var(--emerald); }
.solution-head h3 {
  margin: 0 0 0.25rem;
  font-size: 1.1rem;
}
.solution-head p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}
.product-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.product-item {
  padding: 0.85rem;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border);
}
.product-item h4 {
  margin: 0 0 0.35rem;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.badge {
  font-size: 0.65rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.badge.live { background: rgba(52, 211, 153, 0.15); color: #6ee7b7; }
.badge.beta { background: rgba(251, 191, 36, 0.15); color: #fcd34d; }
.product-item p {
  margin: 0 0 0.6rem;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.45;
}
.product-link {
  font-size: 0.8rem;
  color: var(--emerald);
  text-decoration: none;
  font-weight: 500;
}
.product-link:hover { text-decoration: underline; }

/* Roadmap */
.roadmap {
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--border);
}
.roadmap-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.roadmap-list li {
  padding: 0.6rem 1rem;
  border-radius: 999px;
  border: 1px dashed var(--border);
  font-size: 0.85rem;
  color: var(--muted);
}
.roadmap-list strong { color: var(--text); font-weight: 500; }

/* Recent */
.recent {
  padding: 0 0 3rem;
}
.recent-list {
  list-style: none;
  padding: 1rem 1.25rem;
  margin: 0;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(17, 24, 39, 0.5);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  font-size: 0.82rem;
  color: var(--muted);
}
.recent-list li::before {
  content: "✓ ";
  color: var(--emerald);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0 2rem;
  font-size: 0.8rem;
  color: var(--muted);
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.75rem 1rem;
}
.footer-inner > p:first-child { justify-self: start; margin: 0; }
.footer-links {
  display: flex;
  gap: 1rem;
  margin: 0;
  justify-self: end;
}
.footer-stats {
  justify-self: center;
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted);
}
.footer-stats #ads-counter {
  min-height: 1.25rem;
}
@media (max-width: 640px) {
  .footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .footer-inner > p:first-child,
  .footer-links { justify-self: center; }
}
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--text); }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
