/* Octomux site. Layout: deep-sea hero band (copy left, pixel octopus right, framed screenshot under it),
   then alternating text/screenshot rows, a feature grid, a tinted "how it works" band, install, FAQ, closing call. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/assets/fonts/bricolage-latin.woff2") format("woff2");
  font-weight: 200 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Silkscreen";
  src: url("/assets/fonts/silkscreen-latin.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}

/* Dark is the brand look; light is the pale lavender version. */
:root {
  --bg: #0c0a1d; --band: #110e26; --surface: #15122b; --raise: #1d1938; --fg: #eeecff; --muted: #a7a3cc; --line: #2b2650;
  --hl: #c4b5fd; --tag: #f9a8d4; --violet: #8b5cf6; --btn-bg: #eeecff; --btn-fg: #0c0a1d; --bubble: rgba(196, 181, 253, .14);
  --glow: rgba(139, 92, 246, .45); --st-work: #c4b5fd; --st-input: #fcd34d; --st-done: #86efac;
  --display: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --pixel: "Silkscreen", ui-monospace, Menlo, monospace;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f7f5ff; --band: #efebff; --surface: #ffffff; --raise: #ebe6ff; --fg: #1a1640; --muted: #575380; --line: #ddd6fa;
    --hl: #6d28d9; --tag: #be185d; --violet: #7c3aed; --btn-bg: #1a1640; --btn-fg: #ffffff; --bubble: rgba(124, 58, 237, .10);
    --glow: rgba(109, 40, 217, .28); --st-work: #6d28d9; --st-input: #a16207; --st-done: #15803d;
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #f7f5ff; --band: #efebff; --surface: #ffffff; --raise: #ebe6ff; --fg: #1a1640; --muted: #575380; --line: #ddd6fa;
  --hl: #6d28d9; --tag: #be185d; --violet: #7c3aed; --btn-bg: #1a1640; --btn-fg: #ffffff; --bubble: rgba(124, 58, 237, .10);
  --glow: rgba(109, 40, 217, .28); --st-work: #6d28d9; --st-input: #a16207; --st-done: #15803d;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.6 var(--body); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p a, .faq a, .thanks a { color: var(--hl); text-underline-offset: 3px; }
h1, h2, h3 { text-wrap: balance; }
code, kbd { font-family: var(--mono); font-size: .88em; }
p code, .faq code { background: var(--raise); border-radius: 5px; padding: 1px 5px; white-space: nowrap; }
kbd { background: var(--raise); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: 0 6px; white-space: nowrap; }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: 1180px; margin-inline: auto; padding-left: var(--gutter); padding-right: var(--gutter-r); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--btn-bg); color: var(--btn-fg); padding: 8px 12px; border-radius: 8px; z-index: 20; }
.skip:focus { left: 8px; }

.eyebrow { font: 400 12px/1.4 var(--pixel); color: var(--hl); letter-spacing: .04em; margin: 0; }
.tag { font: 400 11px/1.4 var(--pixel); color: var(--tag); letter-spacing: .03em; }

/* ---------- Hero band ---------- */
.hero-band { position: relative; overflow: hidden; padding-bottom: 24px; }
.hero-band > *:not(.bubbles) { position: relative; }
.bubbles { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 18px; padding-top: max(18px, env(safe-area-inset-top, 0px)); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 700 19px/1 var(--display); letter-spacing: -.01em; }
.brand-mark { width: 28px; height: 23px; }
.navlinks { display: flex; align-items: center; gap: 22px; font-size: 14.5px; }
.navlinks a { color: var(--muted); text-decoration: none; }
.navlinks a:hover { color: var(--fg); }
.navlinks .nav-dl { color: var(--btn-fg); background: var(--btn-bg); padding: 7px 14px; border-radius: 999px; font-weight: 600; }
.navlinks .nav-dl:hover { color: var(--btn-fg); }
.theme-btn { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; padding: 0; }
.theme-btn:hover { color: var(--fg); }
.theme-btn svg { width: 15px; height: 15px; shape-rendering: crispEdges; }
.theme-btn .i-moon { display: none; }
:root[data-theme="light"] .theme-btn .i-sun { display: none; }
:root[data-theme="light"] .theme-btn .i-moon { display: block; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .theme-btn .i-sun { display: none; }
  :root:not([data-theme="dark"]) .theme-btn .i-moon { display: block; }
}

.hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 40px; align-items: center; padding-block: 56px 36px; }
.hero h1 { font: 800 clamp(42px, 6.4vw, 80px)/.98 var(--display); letter-spacing: -.035em; margin: 16px 0 0; }
.hero h1 .hl { color: var(--hl); }
.lede { color: var(--muted); font-size: 18.5px; line-height: 1.6; max-width: 46ch; margin: 22px 0 0; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 30px; }
.ctas.center { justify-content: center; }
.btn { display: inline-flex; align-items: center; gap: 9px; background: var(--btn-bg); color: var(--btn-fg); font: 600 15.5px/1 var(--body); padding: 15px 22px; border-radius: 12px; text-decoration: none; box-shadow: 0 4px 0 var(--violet); transition: transform .12s ease, box-shadow .12s ease; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 5px 0 var(--violet); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--violet); }
.cmd { display: inline-flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 9px 9px 9px 14px; max-width: 100%; min-width: 0; }
.cmd code { font-size: 13.5px; white-space: nowrap; overflow-x: auto; min-width: 0; scrollbar-width: none; }
.cmd code::-webkit-scrollbar { display: none; }
.cmd.wide { display: flex; }
.cmd.wide code { flex: 1; }
.copy { font: 400 10.5px/1 var(--pixel); background: var(--raise); color: var(--hl); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; cursor: pointer; white-space: nowrap; flex: none; }
.copy:hover { border-color: var(--violet); }
.meta { margin: 16px 0 0; font-size: 13.5px; color: var(--muted); }

.octo-stage { display: grid; justify-items: center; gap: 18px; }
#octo { width: min(320px, 100%); height: auto; aspect-ratio: 16 / 15; image-rendering: pixelated; }
.states { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.chip { font: 400 11px/1 var(--pixel); padding: 7px 10px; border-radius: 7px; border: 1px solid var(--line); background: var(--surface); display: inline-flex; align-items: center; gap: 7px; }
.chip::before { content: ""; width: 7px; height: 7px; background: currentColor; }
.chip.working { color: var(--st-work); } .chip.input { color: var(--st-input); } .chip.done { color: var(--st-done); }
.chip.working::before { animation: blink 1.2s steps(2, jump-none) infinite; }
@keyframes blink { 50% { opacity: .25; } }

.agents { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 18px; padding-block: 8px 34px; color: var(--muted); font-size: 14.5px; }
.agents-label { font: 400 11px var(--pixel); color: var(--hl); }
.agents ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.agents li { white-space: nowrap; }

.hero-shot { margin-block: 0; }
.frame { border-radius: 16px; padding: 10px; background: linear-gradient(180deg, var(--raise), var(--surface)); border: 1px solid var(--line); box-shadow: 0 30px 90px -24px var(--glow); }
.frame img { border-radius: 8px; width: 100%; }
figcaption { font-size: 13.5px; color: var(--muted); margin: 14px 4px 0; }

/* ---------- Sections ---------- */
.section { padding-block: 96px; }
.section > h2, .closing h2 { font: 800 clamp(32px, 4.6vw, 54px)/1.04 var(--display); letter-spacing: -.03em; margin: 12px 0 0; max-width: 22ch; }
.band { background: var(--band); border-block: 1px solid var(--line); }

.show { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 48px; align-items: center; margin-top: 72px; }
.show.flip .show-copy { order: 2; }
.show-copy h3 { font: 700 clamp(24px, 2.6vw, 30px)/1.15 var(--display); letter-spacing: -.02em; margin: 0; }
.show-copy p { color: var(--muted); margin: 14px 0 0; max-width: 48ch; }
.show-copy em { font-style: normal; color: var(--fg); }
.show-media { margin: 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 24px 60px -30px var(--glow); background: var(--surface); }
.show-media img, .show-media video { width: 100%; }
.for-light { display: none; }
:root[data-theme="light"] .for-light { display: block; }
:root[data-theme="light"] .for-dark { display: none; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .for-light { display: block; }
  :root:not([data-theme="dark"]) .for-dark { display: none; }
}

.grid { list-style: none; padding: 0; margin: 96px 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.grid li { background: var(--bg); padding: 26px 24px 28px; display: grid; gap: 8px; align-content: start; min-width: 0; }
.grid h3 { margin: 0; font: 700 19px/1.2 var(--display); letter-spacing: -.01em; }
.grid p { margin: 0; color: var(--muted); font-size: 14.5px; }

/* How it works */
.how { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; margin-top: 48px; align-items: start; }
.diagram { list-style: none; margin: 0; padding: 0; display: grid; }
.node { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; display: grid; gap: 6px; }
.node-k { font: 500 15px var(--mono); color: var(--hl); }
.node-v { color: var(--muted); font-size: 14.5px; }
.node.holders { box-shadow: 8px 8px 0 -1px var(--surface), 8px 8px 0 0 var(--line), 16px 16px 0 -1px var(--surface), 16px 16px 0 0 var(--line); margin-right: 16px; margin-bottom: 16px; }
.link { display: grid; justify-items: start; padding: 6px 0 6px 28px; position: relative; min-height: 46px; align-content: center; }
.link::before { content: ""; position: absolute; left: 20px; top: 0; bottom: 0; border-left: 2px dashed var(--line); }
.link span { font: 400 10.5px var(--pixel); color: var(--muted); padding-left: 12px; }
.how-copy { display: grid; gap: 30px; }
.how-copy h3 { margin: 0; font: 700 21px/1.2 var(--display); }
.how-copy p { margin: 8px 0 0; color: var(--muted); }

/* Install */
.install { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; margin-top: 48px; align-items: start; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 26px; }
.steps li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 16px; }
.steps .n { width: 40px; height: 40px; display: grid; place-items: center; font: 400 15px var(--pixel); color: var(--btn-fg); background: var(--violet); border-radius: 8px; }
:root[data-theme="light"] .steps .n { color: #fff; }
.steps h3 { margin: 0; font: 700 20px/1.25 var(--display); }
.steps p { margin: 6px 0 0; color: var(--muted); }
.brew-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 26px; display: grid; gap: 16px; min-width: 0; }
.brew-card h3 { margin: 0; font: 700 20px var(--display); }
.facts { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; color: var(--muted); font-size: 14.5px; }
.facts li { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 10px; }
.facts li::before { content: ""; width: 6px; height: 6px; margin-top: 9px; background: var(--violet); }

/* FAQ */
.faq { margin-top: 40px; display: grid; gap: 10px; max-width: 820px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.faq summary { cursor: pointer; list-style: none; padding: 18px 52px 18px 20px; font: 600 16.5px/1.4 var(--body); position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); font: 400 16px var(--pixel); color: var(--hl); }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0; padding: 0 20px 20px; color: var(--muted); max-width: 70ch; }

/* Closing */
.closing { padding-block: 110px 100px; display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; }
.closing > * { max-width: 100%; }
.closing-mark { width: 64px; height: 52px; }
.closing h2 { margin-top: 22px; }

/* Footer */
.footer { border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px); }
.foot { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px 40px; padding-block: 40px; align-items: start; }
.foot-brand p { margin: 10px 0 0; color: var(--muted); font-size: 14px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: 14.5px; }
.foot-links a { color: var(--muted); text-decoration: none; }
.foot-links a:hover { color: var(--fg); }
.thanks { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 13px; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .how, .install { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .hero { grid-template-columns: minmax(0, 1fr); padding-top: 20px; gap: 28px; }
  .octo-stage { order: -1; justify-items: start; }
  #octo { width: 150px; }
  .states { justify-content: flex-start; }
  .show, .show.flip { grid-template-columns: minmax(0, 1fr); gap: 24px; margin-top: 56px; }
  .show.flip .show-copy { order: 0; }
  .hide-sm { display: none; }
  .section { padding-block: 72px; }
  .foot { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  .grid { grid-template-columns: minmax(0, 1fr); }
  .lede { font-size: 17px; }
  .ctas { flex-direction: column; align-items: stretch; }
  .btn { justify-content: center; }
  .cmd { width: 100%; }
  .cmd code { flex: 1; white-space: normal; overflow-wrap: anywhere; line-height: 1.45; }
  .frame { padding: 6px; border-radius: 12px; }
  .navlinks { gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
