/* ------------------------------------------------------------------
 * Chunky landing page — chunky-rag.com
 * Plain CSS, no framework, no build step.
 * ------------------------------------------------------------------ */

:root {
  --bg: #0b0f18;
  --bg-2: #10151f;
  --surface: #151b28;
  --surface-2: #1c2434;
  --border: #262f42;
  --border-strong: #384158;
  --text-1: #e6ebf5;
  --text-2: #b6bfd0;
  --text-muted: #7b859c;
  --primary: #4c8bf5;
  --primary-hover: #6fa4ff;
  --accent: #f8c86b;
  --radius: 8px;
  --radius-lg: 14px;
  --radius-pill: 999px;
  --shadow-1: 0 1px 2px rgba(0,0,0,0.4);
  --shadow-2: 0 6px 24px rgba(0,0,0,0.35);
  --max-width: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text-1);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 12px; color: var(--text-2); }
h1, h2, h3, h4 { color: var(--text-1); line-height: 1.15; letter-spacing: -0.015em; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.92em; background: var(--surface); padding: 1px 6px; border-radius: 4px; color: var(--text-1); }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 32px;
  background: rgba(11, 15, 24, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}
.brand-icon { width: 32px; height: 32px; border-radius: 7px; }
.brand-name { font-size: 17px; letter-spacing: -0.01em; }
.brand-tag { font-size: 12px; color: var(--text-muted); font-weight: 400; margin-left: 4px; }
.site-nav {
  display: flex;
  gap: 24px;
  font-size: 14px;
}
.site-nav a { color: var(--text-2); transition: color 120ms ease; }
.site-nav a:hover { color: var(--text-1); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, transform 120ms ease;
  text-decoration: none;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover { background: var(--primary-hover); }
.btn-ghost {
  background: transparent;
  color: var(--text-1);
  border-color: var(--border-strong);
}
.btn-ghost:hover { background: var(--surface-2); }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 14px; font-size: 13px; }

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 60px;
  align-items: center;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 64px 32px 80px;
}
.hero h1 {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 700;
  margin: 0 0 20px;
  letter-spacing: -0.025em;
}
.lead {
  font-size: 17px;
  color: var(--text-2);
  max-width: 60ch;
  margin: 0 0 14px;
}
.lead-tight { margin-top: 0; }
.hero-cta {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}
.hero-meta {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
  display: flex;
  gap: 20px;
  font-size: 13px;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.hero-meta li::before {
  content: "▸";
  color: var(--primary);
  margin-right: 6px;
}
.hero-art img {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-2);
}

/* ---------- Sections ---------- */
.section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 72px 32px;
}
.section-alt {
  background: var(--bg-2);
  max-width: none;
  padding: 72px 32px;
}
.section-alt > * { max-width: var(--max-width); margin-left: auto; margin-right: auto; }
.section-h2 {
  font-size: clamp(26px, 3.4vw, 36px);
  margin: 0 0 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.section-lead {
  font-size: 16px;
  max-width: 64ch;
  margin: 0 0 40px;
}

/* ---------- Feature grid ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}
.feature {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color 120ms ease, transform 120ms ease;
}
.feature:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}
.feature-icon {
  font-size: 32px;
  line-height: 1;
  margin-bottom: 14px;
}
.feature h3 {
  font-size: 17px;
  margin: 0 0 8px;
  font-weight: 600;
}
.feature p {
  font-size: 14px;
  margin: 0;
}

/* ---------- MCP section ---------- */
.mcp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-bottom: 40px;
}
.mcp-block {
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.mcp-block h3 {
  font-size: 18px;
  margin: 0 0 14px;
}
.tool-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 14px;
  color: var(--text-2);
}
.tool-list li {
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
}
.tool-list li:last-child { border-bottom: 0; }
.tool-list code {
  color: var(--primary);
  background: transparent;
  padding: 0;
  font-weight: 500;
}
.mcp-example {
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.mcp-example h3 { font-size: 17px; margin: 0 0 12px; }
.mcp-example blockquote {
  margin: 12px 0;
  padding: 16px 20px;
  border-left: 3px solid var(--primary);
  background: var(--surface-2);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-1);
  font-size: 15px;
}

/* ---------- Use cases ---------- */
.use-case-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}
.use-case {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.use-case h3 {
  font-size: 16px;
  margin: 0 0 10px;
  color: var(--primary);
}
.use-case p {
  font-size: 14px;
  margin: 0;
}
.use-case em { color: var(--text-1); font-style: italic; }

/* ---------- Download ---------- */
.download-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.download-card {
  padding: 28px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.download-os {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 2px;
}
.download-req {
  font-size: 12.5px;
  color: var(--text-muted);
  margin: 0 0 8px;
}
.download-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.download-row .btn { flex: 1; min-width: 0; }
.download-note {
  font-size: 12.5px;
  color: var(--text-muted);
  margin: 4px 0 0;
}
.download-alt {
  margin-top: 28px;
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
}
.download-alt a { color: var(--primary); text-decoration: underline; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 48px 32px 24px;
  background: var(--bg-2);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  max-width: var(--max-width);
  margin: 0 auto 32px;
}
.footer-grid h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin: 0 0 12px;
  font-weight: 600;
}
.footer-grid ul {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 14px;
}
.footer-grid li { padding: 4px 0; }
.footer-grid a { color: var(--text-2); }
.footer-grid a:hover { color: var(--text-1); }
.footer-tag { color: var(--text-muted); font-size: 13px; margin-top: 10px; }
.footer-copy {
  text-align: center;
  font-size: 12.5px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding-top: 20px;
  max-width: var(--max-width);
  margin: 0 auto;
}
.footer-copy a {
  color: var(--primary);
  text-decoration: underline;
  text-decoration-color: rgba(76, 139, 245, 0.4);
  text-underline-offset: 2px;
}
.footer-copy a:hover {
  color: var(--primary-hover);
  text-decoration-color: var(--primary-hover);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 32px; padding: 40px 24px 56px; }
  .hero-art { order: -1; max-width: 480px; margin: 0 auto; }
  .mcp-grid { grid-template-columns: 1fr; }
  .download-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .site-nav { gap: 16px; }
  .site-nav a:nth-child(2) { display: none; } /* hide "MCP" nav item to fit */
}
@media (max-width: 560px) {
  .site-header { padding: 12px 20px; flex-wrap: wrap; }
  .brand-tag { display: none; }
  .site-nav { width: 100%; justify-content: space-between; }
  .section { padding: 48px 24px; }
  .section-alt { padding: 48px 24px; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-cta { flex-direction: column; }
  .hero-cta .btn { width: 100%; }
  .download-row { flex-direction: column; }
}

/* ---------- Scroll-reveal (JS-toggled) ---------- */
.js-fade {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 480ms ease, transform 480ms ease;
  will-change: opacity, transform;
}
.js-fade-in {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .js-fade { opacity: 1; transform: none; }
}
