/* tonecommand.com theme. The palette is the app's own: the same near-black
   ground, the cyan live-path colour, blue links, amber for anything that
   changes something. One look, committed, so the site reads as the tool. */

:root {
  --bg: #0d0f0d;
  --bg-raised: #131715;
  --bg-code: #0a0c0b;
  --line: #333a45;
  --text: #d8dde5;
  --muted: #9aa3ad;
  --cyan: #2fe6ff;
  --blue: #6ea8fe;
  --purple: #b98cff;
  --amber: #ffb454;
  --green: #42ffa9;
  --mono: "SF Mono", "Menlo", "Cascadia Code", "Consolas", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --measure: 46rem;
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--cyan); text-decoration: underline; }
img { max-width: 100%; height: auto; }
code, pre, kbd { font-family: var(--mono); font-size: 0.92em; }
code { background: var(--bg-raised); border: 1px solid var(--line); border-radius: 4px; padding: 0.05em 0.35em; }
pre {
  background: var(--bg-code); border: 1px solid var(--line); border-radius: 8px;
  padding: 1rem 1.1rem; overflow-x: auto; line-height: 1.5;
}
pre code { background: none; border: 0; padding: 0; }
pre.mermaid { background: var(--bg-raised); text-align: center; }

/* header */
.top {
  display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap;
  padding: 0.85rem 1.25rem; border-bottom: 1px solid var(--line);
  background: rgba(13, 15, 13, 0.92); position: sticky; top: 0; z-index: 5;
  backdrop-filter: blur(8px);
}
.brand { display: flex; align-items: center; gap: 0.6rem; color: var(--text); font-weight: 700; letter-spacing: 0.02em; }
.brand:hover { text-decoration: none; color: var(--cyan); }
.brand img { border-radius: 8px; }
.nav { display: flex; gap: 0.15rem; flex-wrap: wrap; margin-left: auto; }
.nav a { color: var(--muted); padding: 0.35rem 0.7rem; border-radius: 6px; font-size: 0.95rem; }
.nav a:hover { color: var(--text); background: var(--bg-raised); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--cyan); }
.gh { color: var(--muted); font-size: 0.9rem; border: 1px solid var(--line); border-radius: 6px; padding: 0.3rem 0.7rem; }
.gh:hover { color: var(--text); text-decoration: none; border-color: var(--muted); }

main { max-width: var(--measure); margin: 0 auto; padding: 2rem 1.25rem 4rem; }
main.wide { max-width: 64rem; }

/* hero */
.hero { text-align: center; padding: 2.5rem 0 1.5rem; }
.hero-logo { border-radius: 24px; box-shadow: 0 0 0 1px var(--line), 0 0 48px rgba(47, 230, 255, 0.15); }
.kicker { color: var(--cyan); font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.22em; margin: 1.5rem 0 0.5rem; }
.hero h1 { font-size: clamp(2rem, 6vw, 3.2rem); line-height: 1.1; margin: 0.25rem 0 1rem; letter-spacing: -0.01em; }
.lead { font-size: 1.1rem; color: var(--text); max-width: 40rem; margin: 0 auto; text-align: left; }
.lead p { margin: 0; }
.cta { display: flex; gap: 0.6rem; justify-content: center; flex-wrap: wrap; margin: 1.5rem 0 0.75rem; }
.version { color: var(--muted); font-size: 0.9rem; }
.pitch { color: var(--muted); }

.btn {
  display: inline-block; padding: 0.6rem 1.1rem; border: 1px solid var(--line);
  border-radius: 8px; color: var(--text); background: var(--bg-raised); font-weight: 600;
}
.btn:hover { text-decoration: none; border-color: var(--cyan); color: var(--cyan); }
.btn.primary { background: var(--cyan); color: #04151a; border-color: var(--cyan); }
.btn.primary:hover { background: #7cf0ff; color: #04151a; }

/* prose */
.prose h1 { font-size: 2.1rem; line-height: 1.15; margin: 0.5rem 0 1rem; letter-spacing: -0.01em; }
.prose h2 { font-size: 1.45rem; margin: 2.75rem 0 0.75rem; padding-top: 0.5rem; border-top: 1px solid var(--line); }
.prose h3 { font-size: 1.12rem; margin: 1.75rem 0 0.5rem; }
.prose h4 { font-size: 1rem; margin: 1.25rem 0 0.4rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.prose p, .prose ul, .prose ol { margin: 0.75rem 0; }
.prose li { margin: 0.3rem 0; }
.prose li > p { margin: 0.3rem 0; }
.prose blockquote {
  margin: 0.75rem 0; padding: 0.4rem 1rem; border-left: 3px solid var(--purple);
  color: var(--text); background: var(--bg-raised); border-radius: 0 6px 6px 0;
}
.prose blockquote p { margin: 0.3rem 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
.prose img { border-radius: 8px; border: 1px solid var(--line); display: block; margin: 1rem auto; }
.prose p[align="center"] img, .prose p[align="center"] { text-align: center; }
.prose strong { color: #fff; }
.prose table { border-collapse: collapse; width: 100%; font-size: 0.95rem; margin: 1rem 0; }
.prose th, .prose td { border: 1px solid var(--line); padding: 0.5rem 0.65rem; text-align: left; vertical-align: top; }
.prose th { background: var(--bg-raised); }
.tablewrap { overflow-x: auto; }
.crumbs { color: var(--muted); font-size: 0.9rem; margin: 0 0 0.25rem; }
.meta { color: var(--muted); font-size: 0.92rem; }
.note { border: 1px solid var(--line); border-left: 3px solid var(--amber); background: var(--bg-raised); padding: 0.6rem 1rem; border-radius: 0 6px 6px 0; }
.srcnote { color: var(--muted); font-size: 0.85rem; border-top: 1px solid var(--line); padding-top: 1rem; margin-top: 2.5rem; }
.band { margin-top: 3rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.band h2 { font-size: 1.45rem; }

/* docs index */
.doclist { list-style: none; padding: 0; margin: 1.25rem 0; }
.doclist li { display: grid; grid-template-columns: 15rem 1fr; gap: 0.5rem 1rem; padding: 0.7rem 0; border-top: 1px solid var(--line); }
.doclist li:last-child { border-bottom: 1px solid var(--line); }
.doclist span { color: var(--muted); }
@media (max-width: 40rem) { .doclist li { grid-template-columns: 1fr; gap: 0.15rem; } }

/* gallery */
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr)); gap: 1.25rem; margin-top: 1.5rem; }
.gallery figure { margin: 0; }
.gallery img { border: 1px solid var(--line); border-radius: 8px; width: 100%; }
.gallery figcaption { color: var(--muted); font-size: 0.9rem; margin-top: 0.5rem; }

/* recipes */
.cards { list-style: none; padding: 0; margin: 1.5rem 0; display: grid; gap: 1rem; }
.card { border: 1px solid var(--line); border-radius: 10px; padding: 1rem 1.25rem; background: var(--bg-raised); }
.card h2 { margin: 0 0 0.4rem; font-size: 1.2rem; border: 0; padding: 0; }
.card p { margin: 0.3rem 0; }

.merch { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1rem 0; }

/* footer */
.foot { border-top: 1px solid var(--line); padding: 2rem 1.25rem 3rem; text-align: center; color: var(--muted); font-size: 0.88rem; }
.foot .tagline { color: var(--cyan); font-family: var(--mono); letter-spacing: 0.2em; font-size: 0.78rem; }
.foot p { max-width: var(--measure); margin: 0.5rem auto; }

/* pygments, dark */
.hl { background: transparent; }
.hl .k, .hl .kn, .hl .kd { color: var(--purple); }
.hl .s, .hl .s1, .hl .s2, .hl .sd { color: var(--green); }
.hl .c, .hl .c1, .hl .cm { color: var(--muted); font-style: italic; }
.hl .n, .hl .nx { color: var(--text); }
.hl .nb, .hl .nf { color: var(--blue); }
.hl .m, .hl .mi, .hl .mf { color: var(--amber); }
.hl .o { color: var(--cyan); }

/* small screens: nothing may widen the page. Long URLs wrap, diagrams and
   images scale, the kicker loses its letter-spacing. */
main { overflow-wrap: anywhere; }
.prose img, .hero-logo { max-width: 100%; height: auto; }
pre.mermaid { overflow-x: auto; }
pre.mermaid svg { max-width: 100%; height: auto; }
.gallery img, .prose p[align="center"] img { width: 100%; }
@media (max-width: 40rem) {
  .kicker { letter-spacing: 0.1em; font-size: 0.72rem; }
  .hero { padding-top: 1.25rem; }
  .top { gap: 0.6rem; }
  .nav { margin-left: 0; }
}

/* video thumbnails: a play button, so a still reads as a video */
a.video { position: relative; display: block; max-width: 820px; margin: 1rem auto; border-radius: 10px; overflow: hidden; }
a.video img { display: block; margin: 0; border: 1px solid var(--line); border-radius: 10px; width: 100%; }
a.video .play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 96px; height: 68px; display: flex; align-items: center; justify-content: center;
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.6)); opacity: 0.92; transition: transform 0.15s, opacity 0.15s;
}
a.video .play svg { width: 96px; height: 68px; }
a.video:hover .play { opacity: 1; transform: translate(-50%, -50%) scale(1.08); }
a.video .video-label {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 0.55rem 1rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.75)); color: #fff;
  font-weight: 600; font-size: 0.95rem; text-align: center;
}
a.video:hover { text-decoration: none; }

/* ------------------------------------------------------------------ */
/* motion layer                                                         */
/* ------------------------------------------------------------------ */
html { background: var(--bg); }
html.fx-on body { background: transparent; }
.fluid-bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.fx-toggle {
  position: fixed; left: 14px; bottom: 14px; z-index: 60; padding: 6px 10px; cursor: pointer;
  font: 12px/1.4 var(--mono); letter-spacing: 0.04em; color: var(--cyan);
  background: rgba(13, 15, 13, 0.6); border: 1px solid rgba(47, 230, 255, 0.35); border-radius: 6px;
  backdrop-filter: blur(4px);
}
.fx-toggle:hover { border-color: var(--cyan); }
html.fx-on .top { background: rgba(13, 15, 13, 0.72); }
html.fx-on .feature, html.fx-on .card, html.fx-on .stats > div, html.fx-on .prose blockquote,
html.fx-on pre, html.fx-on .cmdbar { background: rgba(19, 23, 21, 0.72); backdrop-filter: blur(6px); }

.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); transition-delay: calc(var(--i, 0) * 70ms); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* hero, two columns */
.hero2 { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 3rem; align-items: center; padding: 3.5rem 0 2.5rem; min-height: 70vh; }
.hero2 .kicker { margin: 0 0 0.75rem; }
.hero2 h1 { font-size: clamp(2.4rem, 5.2vw, 4rem); line-height: 1.04; margin: 0 0 1.25rem; letter-spacing: -0.02em; }
.hero2 .glow { color: var(--cyan); text-shadow: 0 0 28px rgba(47, 230, 255, 0.35); }
.hero2 .lead { font-size: 1.08rem; color: var(--text); margin: 0 0 1.25rem; max-width: 36rem; }
.hero2 .cta { justify-content: flex-start; margin: 1.25rem 0 0.5rem; }
.hero2 .version { color: var(--muted); font-size: 0.9rem; margin: 0.75rem 0 0; }
.hero-panel { margin: 0; transform-style: preserve-3d; will-change: transform; }
.hero-panel img {
  display: block; width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(47, 230, 255, 0.12), 0 0 60px rgba(47, 230, 255, 0.08);
}
.hero-panel figcaption { color: var(--muted); font-size: 0.85rem; text-align: center; margin-top: 0.75rem; }
@media (max-width: 60rem) { .hero2 { grid-template-columns: 1fr; gap: 2rem; min-height: 0; padding-top: 2rem; } }

/* the command bar: the app's own words, COMMAND and SEND */
.cmdbar {
  display: flex; align-items: center; gap: 0.75rem; margin: 1.25rem 0 0.25rem; padding: 0.7rem 0.9rem;
  border: 1px solid var(--line); border-radius: 10px; background: var(--bg-raised); font-family: var(--mono); font-size: 0.95rem;
  box-shadow: inset 0 0 0 1px rgba(47, 230, 255, 0.08);
}
.cmdlabel { color: var(--cyan); font-size: 0.72rem; letter-spacing: 0.18em; }
.cmdbar .typed { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; }
.cmdbar .caret { width: 2px; height: 1.1em; background: var(--cyan); margin-left: -0.5rem; animation: blink 1s steps(2) infinite; }
.cmdsend { color: #04151a; background: var(--cyan); font-weight: 700; font-size: 0.75rem; letter-spacing: 0.12em; padding: 0.35rem 0.65rem; border-radius: 6px; }
@keyframes blink { to { opacity: 0; } }

/* primary button light sweep */
.btn.sweep { position: relative; overflow: hidden; }
.btn.sweep::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  animation: sweep 3.2s ease-in-out infinite;
}
@keyframes sweep { 0%, 55% { left: -60%; } 100% { left: 130%; } }
@media (prefers-reduced-motion: reduce) { .btn.sweep::after, .cmdbar .caret { animation: none; } }

/* stat strip */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin: 1rem 0 3rem; }
.stats > div { padding: 1.2rem 1.1rem; background: var(--bg-raised); border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 0.3rem; }
.stats > div:last-child { border-right: 0; }
.stats strong { color: #fff; font-size: 1.7rem; line-height: 1.1; letter-spacing: -0.01em; }
.stats span { color: var(--muted); font-size: 0.88rem; line-height: 1.4; }
@media (max-width: 40rem) { .stats > div { border-right: 0; border-bottom: 1px solid var(--line); } .stats > div:last-child { border-bottom: 0; } }

/* numbered sections */
.home .block { padding: 4rem 0 1rem; border-top: 1px solid var(--line); }
.home .block .kicker { margin: 0 0 0.4rem; font-size: 0.72rem; }
.home .block > h2 { border: 0; padding: 0; margin: 0 0 1rem; font-size: clamp(1.8rem, 3.4vw, 2.6rem); letter-spacing: -0.02em; line-height: 1.1; }
.home .statement > h2 { font-size: clamp(2rem, 4vw, 3rem); }
.home .statement p { font-size: 1.15rem; max-width: 42rem; }
.home .statement p strong { color: var(--cyan); font-size: 1.6rem; display: inline-block; margin: 0.5rem 0; text-shadow: 0 0 24px rgba(47, 230, 255, 0.35); }

/* feature cards */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.feature { border: 1px solid var(--line); border-radius: 12px; padding: 1.25rem 1.3rem; background: var(--bg-raised); transition: border-color 0.2s, transform 0.2s; }
.feature:hover { border-color: rgba(47, 230, 255, 0.5); transform: translateY(-2px); }
.feature h3 { margin: 0 0 0.6rem; font-size: 1.12rem; color: #fff; }
.feature ul { padding-left: 1.1rem; }
.feature li { font-size: 0.95rem; }
.feature blockquote { margin: 0.5rem 0; padding: 0.35rem 0.8rem; font-size: 0.92rem; }

/* prompt chips */
.say { display: grid; grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr)); gap: 1.25rem 2rem; margin-top: 1rem; }
.saygroup h3 { margin: 0 0 0.5rem; font-size: 0.85rem; color: var(--cyan); letter-spacing: 0.12em; text-transform: uppercase; }
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.45rem; }
.chips li { font-family: var(--mono); font-size: 0.86rem; line-height: 1.45; padding: 0.55rem 0.8rem; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-raised); color: var(--text); }
.chips li::before { content: "> "; color: var(--cyan); }

/* screenshot cards */
.shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 1rem; margin: 1.25rem 0 2rem; }
.shot { margin: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--bg-raised); transition: border-color 0.2s, transform 0.2s; }
.shot:hover { border-color: rgba(47, 230, 255, 0.5); transform: translateY(-2px); }
.shot img { display: block; width: 100%; height: auto; border: 0; border-radius: 0; margin: 0; }
.shot figcaption { padding: 0.7rem 0.9rem; font-size: 0.86rem; color: var(--muted); }
.home .block, #install { scroll-margin-top: 4.5rem; }

/* merch cards: the shop's own product photos, linking straight to the product */
.merchgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1rem; margin: 1.25rem 0; }
.merchcard { display: flex; flex-direction: column; gap: 0.35rem; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--bg-raised); color: var(--text); transition: border-color 0.2s, transform 0.2s; }
.merchcard:hover { border-color: rgba(47, 230, 255, 0.5); transform: translateY(-2px); text-decoration: none; color: var(--text); }
.merchimg { display: block; aspect-ratio: 1 / 1; background: #000; }
.merchimg img { width: 100%; height: 100%; object-fit: cover; display: block; border: 0; border-radius: 0; margin: 0; }
.merchimg.placeholder { background: linear-gradient(135deg, #131715, #0d0f0d); }
.merchprice { padding: 0.6rem 1rem 0; color: var(--cyan); font-family: var(--mono); font-size: 0.9rem; }
.merchname { padding: 0 1rem; font-weight: 600; color: #fff; }
.merchcta { padding: 0 1rem 0.9rem; color: var(--muted); font-size: 0.88rem; }
