/* ChakataStat marketing site — plain CSS, no build step, no framework. */

:root {
  --color-bg: #ffffff;
  --color-bg-alt: #f5f8f6;
  --color-surface: #ffffff;
  --color-text: #14171a;
  --color-text-muted: #52606b;
  --color-primary: #107c41;
  --color-primary-dark: #0b5c30;
  --color-primary-contrast: #ffffff;
  --color-border: #e3e8e6;
  --wedge-purple: #533eff;
  --wedge-orange: #e16200;
  --wedge-green: #279d00;

  --container-width: 1120px;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 23, 20, 0.06), 0 8px 24px rgba(16, 23, 20, 0.05);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto,
    Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #0f1412;
    --color-bg-alt: #141a17;
    --color-surface: #171f1b;
    --color-text: #eef2f0;
    --color-text-muted: #9fb0a8;
    --color-primary: #2fae6c;
    --color-primary-dark: #4fc584;
    --color-primary-contrast: #08130d;
    --color-border: #23302a;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  line-height: 1.15;
  margin: 0 0 0.5em;
  font-weight: 700;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--color-primary);
}

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--color-primary);
  color: var(--color-primary-contrast);
  padding: 12px 16px;
  z-index: 100;
}

.skip-link:focus {
  left: 16px;
  top: 16px;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn-lg {
  padding: 14px 24px;
  font-size: 1.05rem;
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-primary-contrast);
}

.btn-primary:hover {
  background: var(--color-primary-dark);
}

.btn-secondary {
  background: var(--color-surface);
  color: var(--color-text);
  border-color: var(--color-border);
}

.btn-secondary:hover {
  border-color: var(--color-primary);
}

.btn-disabled {
  background: var(--color-surface);
  color: var(--color-text-muted);
  border-color: var(--color-border);
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-ghost {
  background: transparent;
  color: var(--color-text);
}

.btn-ghost:hover {
  color: var(--color-primary);
}

/* Header / nav */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--color-bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--color-text);
  font-weight: 700;
  font-size: 1.1rem;
}

.brand-mark {
  display: block;
}

.nav-links {
  display: flex;
  gap: 28px;
  margin-left: auto;
}

.nav-links a {
  color: var(--color-text-muted);
  text-decoration: none;
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--color-text);
}

.nav-cta {
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 4px 0;
  background: var(--color-text);
}

/* Hero */

.hero {
  padding: 88px 0 96px;
  background: linear-gradient(180deg, var(--color-bg-alt), var(--color-bg) 70%);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0 0 12px;
}

.hero h1 {
  font-size: clamp(2.2rem, 4vw, 3.2rem);
}

.lede {
  font-size: 1.15rem;
  color: var(--color-text-muted);
  max-width: 52ch;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin: 28px 0 16px;
}

.hero-platforms {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin: 0;
}

.hero-visual {
  display: flex;
  justify-content: center;
}

.hero-visual img {
  width: 100%;
  max-width: 340px;
  filter: drop-shadow(0 20px 40px rgba(16, 23, 20, 0.18));
}

/* Sections */

section h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
}

.section-lede {
  color: var(--color-text-muted);
  max-width: 62ch;
  font-size: 1.05rem;
}

.features {
  padding: 88px 0;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 40px;
}

.feature-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.feature-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.4em;
}

.feature-card p {
  color: var(--color-text-muted);
  margin: 0;
}

.screenshots {
  padding: 88px 0;
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 40px;
}

.screenshot-card {
  margin: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 8px;
  box-shadow: var(--shadow);
}

.screenshot-card img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: calc(var(--radius) - 4px);
  cursor: zoom-in;
}

.screenshot-card figcaption {
  padding: 12px 6px 4px;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  text-align: center;
}

/* Lightbox */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5vh 5vw;
  background: rgba(8, 12, 10, 0.86);
  cursor: zoom-out;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease;
}

.lightbox.open {
  opacity: 1;
  visibility: visible;
}

.lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  cursor: default;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.22);
}

.analyze {
  padding: 72px 0;
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.analyze-inner {
  display: grid;
  grid-template-columns: 0.4fr 1fr;
  gap: 48px;
  align-items: center;
}

.analyze-number {
  font-size: 4.5rem;
  font-weight: 800;
  color: var(--color-primary);
  margin: 0;
  line-height: 1;
}

.analyze-caption {
  color: var(--color-text-muted);
  margin: 8px 0 0;
}

.analyze-copy p {
  color: var(--color-text-muted);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 16px 0 0;
  list-style: none;
}

.tag-list li {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.85rem;
  font-weight: 600;
}

.download {
  padding: 96px 0;
  text-align: center;
}

.download-buttons {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 28px;
}

.download-note {
  max-width: 52ch;
  margin: 20px auto 0;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 32px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.footer-inner p {
  margin: 0;
}

/* Responsive */

@media (max-width: 860px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    order: -1;
  }

  .hero-visual img {
    max-width: 220px;
  }

  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .analyze-inner {
    grid-template-columns: 1fr;
    text-align: left;
  }
}

@media (max-width: 640px) {
  .nav-links,
  .nav-cta {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .site-header.nav-open .nav-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    padding: 16px 24px 24px;
    gap: 16px;
  }

  .feature-grid,
  .screenshot-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
  }
}
