:root {
  --bg: #141414;
  --surface: #1c1c1c;
  --surface-2: #242424;
  --line: rgba(255, 255, 255, 0.08);
  --text: #f7f7f7;
  --muted: #9a9a9a;
  --cream: #f0dcc8;
  --cream-ink: #2b2725;
  --radius-card: 24px;
  --font: "Instrument Sans", system-ui, sans-serif;
  --font-brand: "Comfortaa", var(--font);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; gap: 32px;
  padding: 14px 28px;
  transition: background 0.3s, backdrop-filter 0.3s;
}
.nav.scrolled { background: rgba(20, 20, 20, 0.72); backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 8px; font-family: var(--font-brand); font-weight: 700; font-size: 22px; letter-spacing: -0.02em; }
.brand-icon { width: 34px; height: 34px; object-fit: contain; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.nav-links { display: flex; align-items: center; gap: 22px; font-size: 14px; color: var(--muted); }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.pill-mcp { background: #e9e9e9; color: #141414; font-weight: 700; font-size: 11px; padding: 5px 9px; border-radius: 999px; }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.search {
  display: flex; align-items: center; gap: 8px; width: 220px;
  background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line);
  border-radius: 999px; padding: 9px 14px; color: var(--muted);
}
.search input { background: none; border: 0; outline: 0; flex: 1; min-width: 0; font-size: 14px; color: var(--text); }
.search kbd { font-family: var(--font); font-size: 11px; border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 52px; padding: 0 26px; border-radius: 999px;
  font-weight: 500; font-size: 16px; cursor: pointer; border: 0;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-sm { height: 40px; padding: 0 20px; font-size: 15px; }
.btn-cream { background: var(--cream); color: var(--cream-ink); box-shadow: 0 8px 30px rgba(240, 220, 200, 0.18), inset 0 -2px 0 rgba(0,0,0,.08); }
.btn-cream:hover { box-shadow: 0 12px 40px rgba(240, 220, 200, 0.3); }
.btn-ghost { background: linear-gradient(#3a3a3a, #262626); color: var(--text); border: 1px solid rgba(255,255,255,.12); box-shadow: inset 0 1px 0 rgba(255,255,255,.12); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100vh; display: grid; place-items: center; overflow: hidden; perspective: 1200px; }
.tiles { position: absolute; inset: 0; }
.tile {
  position: absolute; width: var(--w); left: var(--x); top: var(--y);
  opacity: var(--o); filter: blur(var(--b));
  transform: translate3d(var(--px, 0), var(--py, 0), 0);
  transition: transform 0.6s cubic-bezier(.2,.7,.2,1);
  will-change: transform;
}
.tile img { width: 100%; animation: float var(--d) ease-in-out infinite alternate; animation-delay: var(--dl); }
@keyframes float {
  from { transform: translateY(-10px) rotate(calc(var(--r) - 3deg)); }
  to   { transform: translateY(14px)  rotate(calc(var(--r) + 3deg)); }
}
.hero-inner { position: relative; z-index: 2; text-align: center; padding: 120px 16px 80px; }
.mascot { width: 150px; margin: 0 auto 18px; animation: bob 4s ease-in-out infinite; filter: drop-shadow(0 20px 30px rgba(0,0,0,.6)); }
@keyframes bob { 50% { transform: translateY(-10px); } }
h1 { font-size: clamp(48px, 7.2vw, 96px); font-weight: 500; line-height: 1; letter-spacing: -0.035em; }
.accent { color: var(--cream); }
.lead { margin: 26px auto 34px; max-width: 660px; font-size: 18px; line-height: 1.55; color: #bdbdbd; }
.cta { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.hero-fade { position: absolute; inset: auto 0 0 0; height: 200px; background: linear-gradient(transparent, var(--bg)); z-index: 1; pointer-events: none; }
.hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse 50% 45% at 50% 50%, rgba(20,20,20,.9), transparent 70%); z-index: 1; pointer-events: none; }

/* ---------- Browse ---------- */
.browse { max-width: 1320px; margin: 0 auto; padding: 120px 24px 60px; }
h2 { font-size: clamp(34px, 4.4vw, 56px); font-weight: 500; letter-spacing: -0.03em; line-height: 1.06; margin-bottom: 48px; }
.big-search {
  display: flex; align-items: center; gap: 12px; max-width: 520px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 16px;
  padding: 15px 18px; color: var(--muted); margin-bottom: 28px;
}
.big-search input { background: none; border: 0; outline: 0; flex: 1; font-size: 15px; color: var(--text); }
.toolbar { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; flex: 1; mask-image: linear-gradient(90deg, #000 90%, transparent); }
.chip {
  flex: none; display: inline-flex; gap: 6px; align-items: center;
  padding: 8px 14px; border-radius: 999px; font-size: 13px; cursor: pointer;
  background: transparent; border: 1px solid transparent; color: #cfcfcf;
}
.chip small { color: var(--muted); font-size: 11px; }
.chip:hover { background: var(--surface-2); }
.chip.on { background: #f2f2f2; color: #141414; }
.chip.on small { color: #666; }
.sort { background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 9px 14px; font-size: 13px; }
.meta-row { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 13px; margin-bottom: 18px; }
.view-toggle { display: flex; gap: 6px; }
.btn-filter, .vt { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 7px 12px; cursor: pointer; color: var(--muted); }
.vt.on { color: var(--text); background: #333; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid.rows { grid-template-columns: 1fr; }
.card {
  background: var(--surface); border-radius: var(--radius-card); padding: 14px;
  border: 1px solid var(--line); transition: transform 0.35s, border-color 0.35s;
  opacity: 0; transform: translateY(24px);
}
.card.in { opacity: 1; transform: none; transition: opacity .6s, transform .6s, border-color .3s; }
.card:hover { border-color: rgba(255,255,255,.18); }
.shot { position: relative; background: #101010; border-radius: 16px; height: 420px; display: grid; place-items: center; overflow: hidden; }
.shot img { height: 92%; width: auto; border-radius: 22px; box-shadow: 0 20px 50px rgba(0,0,0,.5); transition: transform .5s; }
.card:hover .shot img { transform: scale(1.03); }
.shot .nav-arrow {
  position: absolute; top: 50%; translate: 0 -50%; width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,.9); color: #111; border: 0; cursor: pointer; opacity: 0; transition: opacity .2s;
}
.card:hover .nav-arrow { opacity: 1; }
.nav-arrow.l { left: 10px; } .nav-arrow.r { right: 10px; }
.shot .counter { position: absolute; bottom: 10px; right: 12px; font-size: 11px; background: rgba(0,0,0,.6); padding: 3px 8px; border-radius: 999px; color: #ddd; }
.app-row { display: flex; align-items: center; gap: 10px; margin: 14px 4px 10px; }
.app-icon { width: 36px; height: 36px; border-radius: 9px; flex: none; display: grid; place-items: center; font-weight: 700; font-size: 15px; }
.app-name { font-weight: 600; font-size: 15px; }
.app-cat { color: var(--muted); font-size: 12px; }
.app-screens { margin-left: auto; color: var(--muted); font-size: 12px; }
.stats { display: flex; justify-content: space-between; align-items: baseline; padding: 0 4px 4px; font-size: 13px; color: var(--muted); }
.stats b { color: var(--text); font-size: 17px; font-weight: 600; margin-right: 4px; }
.more { display: flex; justify-content: center; margin-top: 40px; }

/* ---------- Trusted ---------- */
.trusted { padding: 80px 0 100px; text-align: center; color: var(--muted); }
.trusted p { font-size: 14px; margin-bottom: 28px; }
.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent); }
.marquee-track { display: flex; gap: 64px; width: max-content; animation: scroll 40s linear infinite; }
.marquee-track span { font-size: 24px; font-weight: 600; color: #6f6f6f; letter-spacing: -0.02em; white-space: nowrap; }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 48px 28px 0; overflow: hidden; }
.footer-links { display: flex; flex-wrap: wrap; gap: 24px; font-size: 14px; color: var(--muted); }
.footer-links a:hover { color: var(--text); }
.copy { margin-top: 18px; font-size: 13px; color: #666; }
.wordmark {
  font-family: var(--font-brand); font-weight: 700; text-align: center;
  font-size: 17vw; line-height: .8; letter-spacing: -0.05em; margin-top: 40px;
  background: linear-gradient(#2a2a2a, var(--bg) 85%); -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s, transform .7s; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .nav-links { display: none; }
  .grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
  .nav { padding: 12px 16px; gap: 12px; }
  .search { display: none; }
  .grid { grid-template-columns: 1fr; }
  .browse { padding: 80px 16px 40px; }
  .hide-sm { display: none; }
  .lead { font-size: 16px; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .mascot { width: 120px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .card, .reveal { opacity: 1; transform: none; }
}

/* ================= Supermuse additions ================= */
:root { --mono: "JetBrains Mono", ui-monospace, monospace; --amber: #f5b86b; --green: #63d297; }
code { font-family: var(--mono); font-size: .88em; }
.section-lead { color: #b5b5b5; font-size: 17px; line-height: 1.6; max-width: 620px; margin: -28px 0 36px; }
.section-lead code { background: var(--surface-2); padding: 2px 6px; border-radius: 6px; color: var(--cream); }
.hero-meta { margin-top: 22px; font-size: 13px; color: #8a8a8a; letter-spacing: .01em; }
.hf-emoji { margin-right: 8px; font-size: 18px; }

/* chat "screens" inside scenario cards */
.shot.chat { display: flex; flex-direction: column; place-items: stretch; padding: 0; background: #0f0f0f; }
.chat-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; font-family: var(--font-brand); font-weight: 700; font-size: 13px; border-bottom: 1px solid var(--line); }
.chat-head img { width: 22px; height: 22px; border-radius: 6px; background: transparent; box-shadow: none; transform: none !important; }
.chat-head .lang { margin-left: auto; font-family: var(--font); font-size: 10px; font-weight: 600; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; }
.chat-body { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; scroll-behavior: smooth; scrollbar-width: none; }
.msg { font-size: 12.5px; line-height: 1.5; max-width: 88%; white-space: pre-line; overflow-wrap: anywhere; animation: pop .35s ease both; }
@keyframes pop { from { opacity: 0; transform: translateY(6px); } }
.msg.user { align-self: flex-end; background: var(--cream); color: var(--cream-ink); padding: 8px 12px; border-radius: 14px 14px 4px 14px; }
.msg.agent { align-self: flex-start; background: var(--surface-2); padding: 9px 12px; border-radius: 14px 14px 14px 4px; }
.msg.call, .msg.result { align-self: flex-start; max-width: 100%; font-family: var(--mono); font-size: 11px; padding: 7px 10px; border-radius: 10px; white-space: normal; }
.msg.call { background: rgba(245, 184, 107, .08); border: 1px solid rgba(245, 184, 107, .25); color: #e8d2b3; }
.msg.call.gated { background: rgba(240, 220, 200, .14); border-color: var(--cream); }
.msg.result { background: rgba(99, 210, 151, .06); border: 1px dashed rgba(99, 210, 151, .25); color: #9fbfae; }
.msg .fn { display: block; font-weight: 500; margin-bottom: 2px; color: var(--amber); }
.msg.result .fn { color: var(--green); }
.msg code { font-size: 10.5px; opacity: .9; }
.app-cat code { color: #7d7d7d; font-size: 11px; }
.badge { font-size: 11px; border: 1px solid var(--line); border-radius: 999px; padding: 3px 9px; color: var(--muted); }
.badge.gate { border-color: rgba(240,220,200,.5); color: var(--cream); background: rgba(240,220,200,.08); }
.empty { color: var(--muted); }
.grid.rows .card { display: grid; grid-template-columns: 1.4fr 1fr; gap: 0 20px; align-items: center; }
.grid.rows .shot { grid-row: span 2; }

/* tools */
.tools-section { max-width: 1320px; margin: 0 auto; padding: 100px 24px 40px; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.tool { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 10px; transition: border-color .3s, transform .3s; }
.tool:hover { border-color: rgba(255,255,255,.2); transform: translateY(-3px); }
.tool code { color: var(--amber); font-size: 13px; overflow-wrap: anywhere; }
.tool p { color: #b0b0b0; font-size: 13.5px; line-height: 1.5; flex: 1; }
.tool .badge { align-self: flex-start; }
.tool.gated { border-color: rgba(240,220,200,.35); background: linear-gradient(160deg, rgba(240,220,200,.08), var(--surface) 60%); }
.tool.gated code { color: var(--cream); }

/* quickstart */
.quickstart { max-width: 1320px; margin: 0 auto; padding: 100px 24px 40px; display: grid; grid-template-columns: 1fr 1.25fr; gap: 48px; align-items: center; }
.quickstart h2 { margin-bottom: 44px; }
.checks { list-style: none; display: grid; gap: 10px; color: #cfcfcf; font-size: 15px; }
.checks li::before { content: "✓"; color: var(--cream); margin-right: 10px; }
.checks code { color: var(--cream); }
.code-card { background: #0d0d0d; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.code-head { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.dots { display: flex; gap: 6px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: #333; }
.tabs { display: flex; gap: 4px; }
.tab, .copy-btn { background: none; border: 1px solid transparent; border-radius: 999px; padding: 5px 12px; font-size: 12.5px; color: var(--muted); cursor: pointer; }
.tab.on { background: var(--surface-2); color: var(--text); border-color: var(--line); }
.copy-btn { margin-left: auto; border-color: var(--line); }
.copy-btn:hover { color: var(--text); }
.code-card pre { font-family: var(--mono); font-size: 13px; line-height: 1.7; padding: 20px 22px; color: #d9d9d9; overflow-x: auto; white-space: pre; min-height: 260px; }

.disclaimer { margin-top: 22px; max-width: 760px; font-size: 12.5px; line-height: 1.6; color: #7a7a7a; }

@media (max-width: 900px) {
  .quickstart { grid-template-columns: 1fr; }
  .grid.rows .card { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .tools-section, .quickstart { padding: 70px 16px 30px; }
  .section-lead { font-size: 15px; }
  .code-card pre { font-size: 11.5px; }
}
