/* Muzzle: one dark world, the colours of the logo. Rounded display type that echoes the
   wordmark, a plain friendly body face, and monospace for anything people type in chat. */
:root {
  --ink: #141826;        /* the logo's navy, the page ground */
  --panel: #1b2033;      /* raised surfaces */
  --panel-2: #22283f;    /* inputs, hovers */
  --line: #2e3552;       /* borders and rules */
  --text: #f4f1ea;       /* cream, as in the logo's speech bubble */
  --muted: #a9b0c6;      /* secondary text, 7:1 on --ink */
  --accent: #ff7a45;     /* the logo's orange */
  --accent-ink: #1a0d06; /* text on orange */
  --good: #3ecf8e;
  --warn: #f5b83d;
  --bad: #ff6b6b;
  --display: 'Fredoka', 'Nunito', ui-rounded, system-ui, sans-serif;
  --body: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --radius: 14px;
  --max: 1160px;
  color-scheme: dark;
  /* layout: one column of sections at phone width, two columns from ~900px */
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: #ffa27a; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.08; margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
p { margin: 0; }
code, .mono { font-family: var(--mono); font-size: 0.88em; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(20, 24, 38, 0.92);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); margin-right: auto; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.brand span { font-family: var(--display); font-weight: 600; font-size: 22px; letter-spacing: 0.06em; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--muted); text-decoration: none; padding: 8px 12px; border-radius: 10px; font-weight: 600; font-size: 15px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); background: var(--panel); }
.menu-btn { display: none; background: none; border: 1px solid var(--line); border-radius: 10px; width: 44px; height: 44px; padding: 0; cursor: pointer; }
.menu-btn svg { margin: auto; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px; border-radius: 12px; border: 1px solid transparent;
  font-weight: 700; font-size: 16px; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .12s ease, background .12s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #ff8f61; color: var(--accent-ink); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn-ghost:hover { background: var(--panel); color: var(--text); }
.btn-small { min-height: 38px; padding: 0 14px; font-size: 14px; border-radius: 10px; }

@media (max-width: 860px) {
  .menu-btn { display: flex; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 64px;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--ink); border-bottom: 1px solid var(--line); padding: 10px 16px 16px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 14px 12px; font-size: 17px; }
  .nav .btn { margin-top: 8px; }
}

/* ---------- views ---------- */
.view[hidden] { display: none; }
section { padding: 72px 0; }
.eyebrow { font-family: var(--mono); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.section-head { display: grid; gap: 12px; max-width: 680px; margin-bottom: 36px; }
.section-head h2 { font-size: clamp(30px, 5vw, 46px); }
.section-head p { color: var(--muted); }

/* ---------- hero ---------- */
.hero { padding: 56px 0 64px; border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 48px; align-items: center; position: relative; }
.hero h1 { font-size: clamp(44px, 7.2vw, 82px); margin: 14px 0 20px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lede { color: var(--muted); font-size: 19px; max-width: 34em; }
.hero .lede code { color: var(--text); background: var(--panel); padding: 2px 7px; border-radius: 6px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 30px; color: var(--muted); font-size: 15px; }
.facts b { color: var(--text); font-family: var(--display); font-weight: 600; font-size: 18px; margin-right: 4px; }

/* chat demo: a Yapin'-style channel where Muzzle catches one message */
.chat { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; box-shadow: 0 30px 60px -30px rgba(0,0,0,.6); }
.chat-top { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); color: var(--muted); font-weight: 600; font-size: 15px; }
.chat-top .hash { color: var(--muted); font-family: var(--mono); }
.chat-body { display: grid; gap: 14px; padding: 16px; }
.msg { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 10px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 15px; color: var(--ink); }
.avatar img { width: 36px; height: 36px; border-radius: 50%; }
.who { font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 6px; }
.who time { font-weight: 400; color: var(--muted); font-size: 12px; }
.bot-tag { font-size: 10px; font-weight: 800; letter-spacing: .06em; background: var(--accent); color: var(--accent-ink); padding: 1px 5px; border-radius: 4px; }
.say { color: #dcdfe9; font-size: 15px; overflow-wrap: anywhere; }
.say .cmd { font-family: var(--mono); color: var(--accent); font-size: 14px; }
.caught { position: relative; border-radius: 10px; padding: 8px 12px; background: var(--panel-2); color: transparent; text-shadow: 0 0 9px rgba(220,223,233,.5); user-select: none; overflow: hidden; font-size: 15px; }
.caught .bars { position: absolute; inset: 0; display: flex; justify-content: space-evenly; pointer-events: none; }
.caught .bars i { width: 7px; background: var(--accent); border-radius: 4px; animation: drop .55s cubic-bezier(.2,.8,.2,1) both; }
.caught .bars i:nth-child(2) { animation-delay: .08s; } .caught .bars i:nth-child(3) { animation-delay: .16s; }
.caught .bars i:nth-child(4) { animation-delay: .24s; } .caught .bars i:nth-child(5) { animation-delay: .32s; }
.caught-label { margin-top: 6px; font-size: 12px; color: var(--muted); font-family: var(--mono); }
@keyframes drop { from { transform: translateY(-105%); } to { transform: translateY(0); } }
.embed { margin-top: 6px; border-left: 4px solid var(--accent); background: var(--ink); border-radius: 8px; padding: 10px 12px; display: grid; gap: 6px; font-size: 14px; }
.embed strong { font-size: 14px; }
.embed .fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.embed .fields div { display: grid; gap: 1px; }
.embed .fields span { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  }
@media (max-width: 420px) {
  .embed .fields { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .hero-ctas .btn { flex: 1 1 100%; }
}

/* ---------- features: a spec sheet, command on the left, what it does on the right ---------- */
.spec { border-top: 1px solid var(--line); }
.spec-row { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 32px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.spec-row h3 { font-size: 26px; }
.spec-row .cmds { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.chip { font-family: var(--mono); font-size: 13px; background: var(--panel); border: 1px solid var(--line); color: var(--text); padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.chip.on { border-color: var(--accent); color: var(--accent); }
.spec-row p { color: var(--muted); max-width: 62ch; }
.spec-row p + p { margin-top: 10px; }
.spec-row .example { margin-top: 14px; font-family: var(--mono); font-size: 14px; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; overflow-x: auto; white-space: nowrap; }
@media (max-width: 760px) {
  .spec-row { grid-template-columns: minmax(0, 1fr); gap: 12px; }
}

/* ---------- trust ---------- */
.trust { background: var(--panel); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.trust-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 40px; }
.trust-item { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 14px; }
.trust-item .num { font-family: var(--mono); color: var(--accent); font-size: 14px; padding-top: 4px; }
.trust-item h3 { font-size: 21px; margin-bottom: 6px; }
.trust-item p { color: var(--muted); }
@media (max-width: 760px) { .trust-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; counter-reset: step; }
.step { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: grid; gap: 10px; align-content: start; }
.step::before { counter-increment: step; content: counter(step); font-family: var(--display); font-weight: 600; font-size: 40px; color: var(--accent); line-height: 1; }
.step h3 { font-size: 21px; }
.step p { color: var(--muted); font-size: 16px; }
@media (max-width: 760px) { .steps { grid-template-columns: minmax(0, 1fr); } }

/* ---------- dashboard teaser ---------- */
.teaser { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.teaser-shot { border: 1px solid var(--line); border-radius: 16px; background: var(--panel); padding: 16px; display: grid; gap: 10px; }
.mini-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; background: var(--ink); border-radius: 10px; font-weight: 600; font-size: 15px; }
.mini-row small { color: var(--muted); font-weight: 400; display: block; font-size: 13px; }
@media (max-width: 860px) { .teaser { grid-template-columns: minmax(0, 1fr); } }

/* ---------- toggle switch (shared with the dashboard) ---------- */
.switch { position: relative; width: 48px; height: 28px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; background: var(--line); border-radius: 999px; transition: background .15s; }
.switch span::after { content: ''; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--text); transition: transform .15s; }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(20px); background: #fff; }
.switch input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---------- commands ---------- */
.page-head { padding: 48px 0 24px; }
.page-head h1 { font-size: clamp(38px, 6vw, 60px); margin: 10px 0 12px; }
.page-head p { color: var(--muted); max-width: 60ch; }
.cmd-tools { display: grid; gap: 14px; position: sticky; top: 64px; z-index: 5; background: var(--ink); padding: 14px 0; border-bottom: 1px solid var(--line); }
.search { width: 100%; min-height: 48px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); }
.search::placeholder { color: var(--muted); }
.filters { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.filters button { flex: none; min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--muted); font-weight: 600; font-size: 14px; cursor: pointer; }
.filters button[aria-pressed="true"] { background: var(--text); color: var(--ink); border-color: var(--text); }
.cmd-list { display: grid; padding: 8px 0 72px; }
.cmd { border-bottom: 1px solid var(--line); }
.cmd > button { all: unset; box-sizing: border-box; width: 100%; display: grid; grid-template-columns: minmax(0, 200px) minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 18px 4px; cursor: pointer; }
.cmd > button:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.cmd-name { font-family: var(--mono); font-size: 17px; color: var(--accent); font-weight: 500; }
.cmd-desc { color: var(--text); font-size: 16px; }
.who-chip { font-size: 12px; font-weight: 700; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.cmd-more { padding: 0 4px 20px; display: grid; gap: 10px; }
.cmd-more[hidden] { display: none; }
.cmd-more .label { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.cmd-more pre { margin: 0; font-family: var(--mono); font-size: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; overflow-x: auto; }
.empty { color: var(--muted); padding: 40px 0; text-align: center; }
@media (max-width: 700px) {
  .cmd > button { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; }
  .cmd-desc { grid-column: 1 / -1; grid-row: 2; font-size: 15px; color: var(--muted); }
}

/* ---------- prose pages ---------- */
.prose { max-width: 70ch; padding-bottom: 80px; display: grid; gap: 16px; }
.prose h2 { font-size: 28px; margin-top: 18px; }
.prose ul { margin: 0; padding-left: 22px; display: grid; gap: 8px; }
.prose p, .prose li { color: #d6d9e4; }

/* ---------- Yapin' shoutout ---------- */
section.shoutout { padding: 8px 0 56px; }
.shoutout-box { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px; padding: 28px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); }
.shoutout-box > div { display: grid; gap: 8px; max-width: 60ch; }
.shoutout-box h2 { font-size: clamp(26px, 4vw, 34px); }
.shoutout-box p { color: var(--muted); }
@media (max-width: 520px) { .shoutout-box { padding: 22px; } .shoutout-box .btn { flex: 1 1 100%; } }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 36px 0 44px; color: var(--muted); font-size: 15px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 20px 32px; align-items: center; justify-content: space-between; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); }

/* ---------- dialog ---------- */
.dialog-backdrop { position: fixed; inset: 0; background: rgba(8, 10, 18, 0.7); z-index: 60; display: grid; place-items: center; padding: 16px; }
.dialog-backdrop[hidden] { display: none; }
.dialog { width: 100%; max-width: 480px; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 24px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; max-height: calc(100% - 32px); overflow-y: auto; }
.dialog > * { min-width: 0; }
.dialog h2 { font-size: 28px; }
.dialog ol { margin: 0; padding-left: 20px; display: grid; gap: 8px; color: #d6d9e4; }
.copy-row { display: flex; gap: 8px; }
.copy-row code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; background: var(--ink); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.note { color: var(--muted); font-size: 14px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--text); color: var(--ink); font-weight: 700; padding: 12px 18px; border-radius: 12px; z-index: 80; max-width: calc(100% - 32px); text-align: center; }
.toast[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
