/* Homepage v2 (layered on top of style.css). Wide layout, centred hero, cards and an animated demo.
   CSS only: the site's CSP allows no scripts and no inline styles. */

.home main.wide { max-width: 72rem; padding: 0 1.5rem; }

/* ---------- Navigation ---------- */
.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 2rem;
  width: 100%; max-width: 72rem; margin: 0 auto; padding: 1rem 1.5rem;
  background: rgba(11, 13, 16, 0.85);
  backdrop-filter: blur(8px);
}
.nav-logo img { display: block; height: 26px; width: auto; }
.nav-links { display: flex; gap: 1.6rem; flex: 1; }
.nav-links a { color: var(--muted); border: 0; font-size: 0.95rem; }
.nav-links a:hover { color: var(--text); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: 0.8rem 1.4rem; border-radius: 999px;
  background: var(--accent); color: #06130b; font-weight: 600; border: 0;
}
.btn:hover { background: #a3f7c3; }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.9rem; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--panel); }

/* ---------- Hero ---------- */
.hero { text-align: center; padding: 5rem 0 3rem; }
.hero h1 { font-size: clamp(2.6rem, 7vw, 4.6rem); line-height: 1.04; }
.lead { max-width: 40rem; margin: 1.5rem auto 0; color: var(--muted); font-size: 1.15rem; }
.hero-cta { display: flex; gap: 0.8rem; justify-content: center; flex-wrap: wrap; margin: 2rem 0 3.5rem; }

/* Animated demo window: lines appear one by one, hold, then reset (12 s loop). */
.demo {
  max-width: 44rem; margin: 0 auto; text-align: left;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 30px 80px -30px rgba(124, 242, 168, 0.18);
  overflow: hidden;
}
.demo-bar { display: flex; align-items: center; gap: 6px; padding: 0.7rem 1rem; border-bottom: 1px solid var(--line); }
.demo-bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.demo-bar em { margin-left: auto; font: 0.75rem var(--mono); color: var(--muted); font-style: normal; }
.demo-body { padding: 1.1rem 1.25rem 1.3rem; font: 0.9rem/1.75 var(--mono); min-height: 15.5rem; }
.demo-body p { margin: 0; }
.demo-body b { display: inline-block; width: 3.6rem; font-weight: 500; }
.demo-body .you { color: var(--muted); }
.demo-body .ag { color: var(--accent); }
.demo-body code { color: var(--text); }
.demo-body .out { padding-left: 3.6rem; color: var(--accent); }
.d { opacity: 0; animation: line 12s infinite; }
.d1 { animation-delay: 0s; } .d2 { animation-delay: 1.2s; } .d3 { animation-delay: 2.2s; }
.d4 { animation-delay: 3.2s; } .d5 { animation-delay: 4.4s; } .d6 { animation-delay: 6s; } .d7 { animation-delay: 7.2s; }
/* Each line: fade in, stay until ~92% of the loop, fade out together, restart. Delays shift the start. */
@keyframes line {
  0% { opacity: 0; transform: translateY(4px); }
  4%, 70% { opacity: 1; transform: none; }
  78%, 100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .d { opacity: 1; animation: none; }
}

/* ---------- Works with ---------- */
.works { text-align: center; padding: 2rem 0 1rem; }
.eyebrow { margin: 0 0 1rem; font: 600 0.75rem var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: center; }
.chips li { padding: 0.45rem 0.9rem; border: 1px solid var(--line); border-radius: 999px; font-size: 0.92rem; }

/* ---------- Generic blocks ---------- */
.block { padding: 4.5rem 0 0; }
.block h2, .final h2 { margin: 0 0 2rem; text-align: center; font-size: clamp(1.7rem, 4vw, 2.5rem); letter-spacing: -0.02em; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.card, .feat { padding: 1.4rem; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; }
.card h3, .feat h3 { margin: 0 0 0.5rem; font-size: 1.05rem; }
.card p, .feat p { margin: 0; color: var(--muted); font-size: 0.97rem; }
.feat .k { display: block; margin-bottom: 0.6rem; }
code { font-family: var(--mono); font-size: 0.9em; }

/* How it works */
.steps { list-style: none; padding: 0; margin: 0 0 2rem; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.steps li { display: flex; gap: 0.9rem; }
.steps .k { flex: none; display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; border: 1px solid var(--accent); }
.steps h3 { margin: 0.2rem 0 0.4rem; font-size: 1.05rem; }
.steps p { margin: 0; color: var(--muted); font-size: 0.97rem; }
.block .term { max-width: 44rem; margin: 0 auto; }

/* FAQ (native <details>, no script) */
.faq { max-width: 46rem; margin: 0 auto; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); padding: 1rem 0.2rem; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--accent); font-family: var(--mono); }
.faq details[open] summary::after { content: "−"; }
.faq p { margin: 0.7rem 0 0; color: var(--muted); }

/* Final CTA */
.final { text-align: center; padding: 5rem 0 5rem; }
.final .lead { margin-bottom: 1.8rem; }

/* ---------- Footer ---------- */
.foot { width: 100%; max-width: 72rem; border-top: 1px solid var(--line); }
.foot-cols { display: grid; grid-template-columns: 2fr repeat(4, 1fr); gap: 1.5rem; padding: 1rem 0 2rem; }
.foot-cols img { height: 24px; width: auto; }
.foot h4 { margin: 0 0 0.7rem; color: var(--text); font-size: 0.85rem; }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin: 0.35rem 0; }
.foot a { color: var(--muted); border: 0; }
.foot a:hover { color: var(--text); }
.foot .legal { font-size: 0.8rem; }

/* ---------- Small screens ---------- */
@media (max-width: 820px) {
  .grid3, .steps { grid-template-columns: 1fr; }
  .foot-cols { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
  .nav { justify-content: space-between; }
  .hero { padding-top: 3rem; }
}

/* ---------- Inner pages (/openclaw, /mcp, /compare/...) ---------- */
.page { max-width: 48rem; margin: 0 auto; padding: 4rem 0 0; }
.page .crumbs { margin: 0 0 1.2rem; font: 0.8rem var(--mono); color: var(--muted); }
.page .crumbs a { color: var(--muted); border: 0; }
.page h1 { font-size: clamp(2.1rem, 5.5vw, 3.2rem); line-height: 1.08; }
.page h2 { margin: 3.2rem 0 1rem; font-size: clamp(1.4rem, 3.2vw, 1.9rem); letter-spacing: -0.02em; }
.page h3 { margin: 1.6rem 0 0.4rem; font-size: 1.1rem; }
.page p, .page li { color: var(--muted); }
.page p strong, .page li strong { color: var(--text); }
.page ul, .page ol { padding-left: 1.2rem; }
.page li { margin: 0.35rem 0; }
.page .lead { margin: 1.2rem 0 0; max-width: none; }
.page .hero-cta { justify-content: flex-start; margin: 1.8rem 0 0; }
.page .term { margin: 1rem 0; }
.page .grid3 { grid-template-columns: repeat(2, 1fr); }
.page .faq { max-width: none; }
.note { font-size: 0.85rem; }

/* Comparison table */
.cmp { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: 0.95rem; }
.cmp th, .cmp td { padding: 0.7rem 0.6rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.cmp thead th { color: var(--text); font-size: 0.85rem; }
.cmp td:first-child { color: var(--text); width: 34%; }
.cmp td { color: var(--muted); }
.cmp .us { color: var(--accent); }
@media (max-width: 820px) { .page .grid3 { grid-template-columns: 1fr; } .cmp { font-size: 0.85rem; } }

/* 'Paste this into your agent' block on the homepage */
.block h3.paste { max-width: 44rem; margin: 2rem auto 0.6rem; font-size: 1rem; }
.paste-note { max-width: 44rem; margin: 0.5rem auto 0; color: var(--muted); }
