/* fluGATO · flugato.com */

@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/JetBrainsMono-Regular.woff") format("woff");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/JetBrainsMono-Bold.woff") format("woff");
  font-weight: 700;
  font-display: swap;
}

:root {
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --bg: #fafaf8;
  --bg-2: #f0f0ee;
  --surface: #ffffff;
  --rule: #d9dbe0;
  --text: #1e2026;
  --muted: #5f6673;
  --orange: #d9741c;
  --orange-ink: #b85e0f;
  --fur: #ec963c;
  --ok: #168c3e;
  --warn: #a06d00;
  --fail: #c82a1e;
  --skip: #8d93a0;
  --shelf: #7a5a3a;
  --shelf-edge: #5a3f28;
  --rack: #2a2d36;
  --term-bg: #181a20;
  --term-text: #dcdfe6;
  --term-muted: #7d8694;
  --term-ok: #50d278;
  --term-warn: #f0c328;
  --term-fail: #f05a4b;
  --term-rule: #3a3e48;
  --term-alt: #1f2229;
  --banner-ok: #187040;
  --banner-warn: #806008;
  --banner-fail: #8c261e;
  --banner-skip: #3e4454;
  --laser: #ff3b30;
  --focus: #2f6fdd;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c0e12;
    --bg-2: #13161c;
    --surface: #181a20;
    --rule: #2c3039;
    --text: #e6e9ee;
    --muted: #8f98a6;
    --orange: #ec963c;
    --orange-ink: #f3ad66;
    --ok: #50d278;
    --warn: #f0c328;
    --fail: #f05a4b;
    --skip: #69707e;
    --shelf: #6b4c2f;
    --shelf-edge: #3e2a18;
    --rack: #1b1e26;
    --focus: #7fb0ff;
    color-scheme: dark;
    }
}

:root[data-theme="dark"] {
  --bg: #0c0e12;
  --bg-2: #13161c;
  --surface: #181a20;
  --rule: #2c3039;
  --text: #e6e9ee;
  --muted: #8f98a6;
  --orange: #ec963c;
  --orange-ink: #f3ad66;
  --ok: #50d278;
  --warn: #f0c328;
  --fail: #f05a4b;
  --skip: #69707e;
  --shelf: #6b4c2f;
  --shelf-edge: #3e2a18;
  --rack: #1b1e26;
  --focus: #7fb0ff;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  overflow-x: hidden;
}
main, header, footer { max-width: 1120px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
h1, h2, h3 { font-family: var(--mono); font-weight: 700; letter-spacing: -0.01em; line-height: 1.15; margin: 0 0 0.5em; }
h2 { font-size: clamp(1.5rem, 1.1rem + 1.8vw, 2.3rem); max-width: 22ch; text-wrap: balance; }
p { margin: 0 0 1em; }
a { color: var(--orange-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--text); }
code, pre, .mono { font-family: var(--mono); }
p code, li code, dt code { font-size: 0.92em; background: var(--bg-2); border: 1px solid var(--rule); border-radius: 5px; padding: 0.05em 0.35em; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 3px; }
img, canvas { max-width: 100%; height: auto; }
.cat-canvas { image-rendering: pixelated; image-rendering: crisp-edges; display: block; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; background: var(--orange); color: #141010; padding: 8px 12px; border-radius: 6px; font-family: var(--mono); z-index: 10; }
.skip:focus { top: 12px; }
.ok { color: var(--ok); } .warn { color: var(--warn); } .fail { color: var(--fail); } .sk { color: var(--skip); }
.muted { color: var(--muted); }
.o { color: var(--orange); }

/* ---------- header ---------- */
.top {
  display: flex; align-items: center; gap: 20px;
  padding-top: 18px; padding-bottom: 18px;
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  /* the band runs the full width of the window, not just the content column */
  box-shadow: 0 0 0 100vmax color-mix(in srgb, var(--bg) 86%, transparent);
  clip-path: inset(0 -100vmax);
  backdrop-filter: blur(10px);
}
.wordmark { text-decoration: none; margin-right: auto; }
.wm { font-family: var(--mono); font-weight: 700; font-size: 1.55rem; letter-spacing: -0.02em; display: inline-flex; color: var(--text); }
.wm-l { display: inline-block; transform: translateY(0); transition: transform 60ms linear, color 60ms linear; }
.wm-g { color: var(--orange); }
.nav { display: flex; gap: 4px 18px; flex-wrap: wrap; font-family: var(--mono); font-size: 0.9rem; }
.nav a { color: var(--muted); text-decoration: none; padding: 4px 0; border-bottom: 1px solid transparent; }
.nav a:hover { color: var(--text); border-bottom-color: var(--orange); }
.theme { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--rule); background: var(--surface); color: var(--text); cursor: pointer; }
.theme:hover { border-color: var(--orange); }
.theme .i-moon { display: none; }
:root[data-theme="dark"] .theme .i-sun { display: none; }
:root[data-theme="dark"] .theme .i-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme .i-sun { display: none; }
  :root:not([data-theme="light"]) .theme .i-moon { display: block; }
}
@media (max-width: 720px) {
  .nav { display: none; }
}

/* ---------- hero ---------- */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 32px 48px; align-items: center;
  padding: 36px 0 56px;
}
.kicker { font-family: var(--mono); color: var(--orange-ink); font-size: 0.9rem; margin-bottom: 14px; letter-spacing: 0.02em; }
h1 { font-size: clamp(2.2rem, 1.3rem + 3vw, 3.4rem); margin-bottom: 18px; }
.lead { font-size: 1.1rem; max-width: 56ch; color: var(--text); }

.install { margin-top: 26px; scroll-margin-top: 90px; }
.install-line {
  display: flex; align-items: center; gap: 12px;
  background: var(--term-bg); color: var(--term-text); border: 1px solid var(--term-rule);
  border-radius: 10px; padding: 12px 10px 12px 16px; font-family: var(--mono); font-size: 0.98rem;
  box-shadow: 0 10px 40px -20px rgba(0, 0, 0, 0.6);
}
.install-line .prompt { color: #86b5ff; }
.install-line code { flex: 1; min-width: 0; white-space: nowrap; overflow-x: auto; scrollbar-width: none; }
.install-line code::-webkit-scrollbar { display: none; }
.copy {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  background: var(--fur); color: #1c1008; border: 0; border-radius: 7px;
  padding: 8px 12px; font-family: var(--mono); font-weight: 700; font-size: 0.85rem; cursor: pointer;
}
.copy:hover { background: #ffb05c; }
.copy:focus-visible { outline-color: #fff; }
.copy.is-done { background: var(--term-ok); }
.install-notes { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 12px 0 8px; font-family: var(--mono); font-size: 0.82rem; color: var(--muted); }
.install-notes span::before { content: "·"; margin-right: 8px; color: var(--orange); }
.install-notes code { background: none; border: 0; padding: 0; color: var(--text); font-size: 1em; }
.install-more { font-size: 0.95rem; color: var(--muted); margin: 0; }

.hero-cat { min-width: 0; }
.shelf { position: relative; background: var(--rack); border-radius: 14px; padding: 18px 0 0; overflow: hidden; touch-action: manipulation; border: 1px solid var(--rule); cursor: crosshair; }
.shelf .cat-canvas { position: relative; z-index: 2; width: 100%; }
.shelf-board { height: 14px; background: linear-gradient(var(--shelf), var(--shelf-edge)); position: relative; z-index: 2; }
.rack { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 10px 14px 12px; }
.rack span { height: 18px; border-radius: 3px; background: #2f3340; position: relative; }
.rack span::before, .rack span::after { content: ""; position: absolute; top: 6px; width: 6px; height: 6px; border-radius: 50%; background: #4ad07a; }
.rack span::before { right: 24px; opacity: 0.9; }
.rack span::after { right: 12px; background: #f0c328; animation: blink 1.3s steps(2, start) infinite; }
.rack span:nth-child(odd)::after { animation-delay: 0.6s; }
.rack span:nth-child(3n)::before { background: #f05a4b; }
@keyframes blink { to { opacity: 0.25; } }
.hint { font-family: var(--mono); font-size: 0.78rem; color: var(--muted); margin: 10px 2px 0; min-height: 1.4em; }

@media (max-width: 860px) {
  .hero { grid-template-columns: minmax(0, 1fr); padding-top: 16px; }
  .hero-text, .hero-cat { min-width: 0; }
  .hero-cat { order: -1; }
}

/* ---------- terminal demo ---------- */
.demo { padding: 10px 0 70px; }
.term { background: var(--term-bg); color: var(--term-text); border: 1px solid var(--term-rule); border-radius: 12px; overflow: hidden; font-family: var(--mono); font-size: 0.86rem; line-height: 1.5; box-shadow: 0 30px 60px -40px rgba(0,0,0,.7); }
.term-bar { display: flex; align-items: center; gap: 7px; padding: 10px 12px; background: #23262e; border-bottom: 1px solid var(--term-rule); }
.term-bar .dot { width: 11px; height: 11px; border-radius: 50%; }
.term-bar .r { background: #ff5f57; } .term-bar .y { background: #febc2e; } .term-bar .g { background: #28c840; }
.term-title { margin-left: auto; margin-right: auto; color: var(--term-muted); font-size: 0.8rem; }
.term-body { position: relative; min-height: 440px; padding: 14px 16px 12px; }
.term-out { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.term-out .ok { color: var(--term-ok); } .term-out .warn { color: var(--term-warn); } .term-out .o { color: var(--fur); } .term-out .m { color: var(--term-muted); }
.term-out .p { color: #86b5ff; }
.cursor { display: inline-block; width: 0.6em; height: 1.1em; background: var(--term-text); vertical-align: -0.2em; animation: cur 1s steps(2, start) infinite; }
@keyframes cur { to { opacity: 0; } }
.dash { position: relative; }
.dash-top { display: flex; gap: 8px; padding: 2px 4px 8px; color: var(--term-text); }
.dash-top .muted { color: var(--term-muted); }
.dash-right { margin-left: auto; text-align: right; }
.wm-small { font-weight: 700; }
.banner { display: flex; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: 6px; color: #fff; font-weight: 700; background: var(--banner-ok); margin-bottom: 12px; }
.banner.is-warn { background: var(--banner-warn); } .banner.is-fail { background: var(--banner-fail); } .banner.is-skip { background: var(--banner-skip); }
.banner-right { font-weight: 400; color: #fff; opacity: 0.9; text-align: right; }
.rows { list-style: none; margin: 0; padding: 0; width: min(100%, 640px); }
.rows li { display: grid; grid-template-columns: 16px 96px 1fr; gap: 10px; padding: 2px 6px; opacity: 0; transform: translateX(-6px); }
.rows li.in { opacity: 1; transform: none; transition: opacity 180ms ease, transform 180ms ease; }
.rows li:nth-child(even) { background: var(--term-alt); }
.rows .d, .rows .d.sk { color: var(--skip); }
.rows .d.ok { color: var(--term-ok); } .rows .d.warn { color: var(--term-warn); } .rows .d.fail { color: var(--term-fail); }
.rows .n { font-weight: 700; }
.rows .v { overflow-wrap: anywhere; }
.rows .v.m { color: var(--term-muted); }
.dash-cat { position: absolute; right: 8px; bottom: 44px; }
.keys { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 26px; padding-top: 10px; border-top: 1px solid var(--term-rule); color: var(--term-muted); }
.keys b { color: var(--fur); font-weight: 700; }
.scenarios { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; font-family: var(--mono); font-size: 0.85rem; }
.scen-label { color: var(--muted); margin-right: 4px; }
.chip { border: 1px solid var(--rule); background: var(--surface); color: var(--text); border-radius: 999px; padding: 6px 14px; font: inherit; cursor: pointer; }
.chip:hover { border-color: var(--orange); }
.chip.is-on { background: var(--orange); border-color: var(--orange); color: #1c1008; font-weight: 700; }
.chip-ghost { margin-left: auto; color: var(--muted); }
@media (max-width: 520px) {
  .install-line { flex-wrap: wrap; padding: 12px 12px; }
  .install-line code { flex-basis: 100%; white-space: pre-wrap; overflow-wrap: anywhere; }
  .install-line .prompt { display: none; }
  .copy { margin-left: auto; }
}
@media (max-width: 720px) {
  .term { font-size: 0.74rem; }
  .term-body { min-height: 400px; padding: 12px 10px; }
  .rows li { grid-template-columns: 12px 78px 1fr; gap: 6px; }
  .dash-right, .banner-right { display: none; }
  .dash-cat { position: static; display: flex; justify-content: flex-end; margin: -6px 0 0; }
  .keys { margin-top: 10px; }
  .chip-ghost { margin-left: 0; }
}

/* ---------- sections ---------- */
section { scroll-margin-top: 80px; }
.section-lead { color: var(--muted); max-width: 60ch; margin-bottom: 28px; }
.checks, .root, .scripts, .screens { padding: 40px 0 70px; border-top: 1px solid var(--rule); }

.check-grid { list-style: none; margin: 0 0 36px; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.check-grid li { background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; padding: 14px 16px; display: grid; gap: 4px; font-size: 0.95rem; }
.check-grid b { font-family: var(--mono); color: var(--orange-ink); font-size: 0.85rem; letter-spacing: 0.04em; }
.check-grid b::before { content: "● "; color: var(--ok); }
.check-grid span { color: var(--text); }

.moods { display: flex; flex-wrap: wrap; gap: 10px 26px; justify-content: center; }
.moods figure { margin: 0; text-align: center; }
.moods img { image-rendering: pixelated; image-rendering: crisp-edges; width: 112px; height: auto; }
.moods figcaption { font-family: var(--mono); font-size: 0.82rem; color: var(--muted); margin-top: 4px; }

.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; padding: 20px 22px; }
.card-accent { border-color: var(--orange); box-shadow: 0 0 0 3px color-mix(in srgb, var(--orange) 18%, transparent); }
.card h3 { font-size: 1.25rem; margin-bottom: 2px; }
.card h3 code { color: var(--orange-ink); }
.card-sub { font-family: var(--mono); font-size: 0.82rem; color: var(--muted); margin-bottom: 14px; }
.card ul { margin: 0 0 14px; padding-left: 1.2em; }
.card li { margin-bottom: 4px; }
.card-foot { margin: 0; color: var(--muted); font-size: 0.95rem; }
.aside { margin: 22px 0 0; color: var(--muted); max-width: 70ch; font-size: 0.95rem; }

.code { background: var(--term-bg); color: var(--term-text); border: 1px solid var(--term-rule); border-radius: 12px; padding: 18px 20px; font-size: 0.84rem; line-height: 1.5; overflow-x: auto; margin: 0 0 18px; }
.code .c-prompt { color: #86b5ff; } .code .c-cmd { color: #fff; font-weight: 700; } .code .c-muted { color: var(--term-muted); }
.code .ok { color: var(--term-ok); } .code .warn { color: var(--term-warn); } .code .fail { color: var(--term-fail); } .code .ok-b { color: var(--term-ok); font-weight: 700; }
.flags { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px 20px; margin: 0; }
.flags div { display: grid; gap: 2px; }
.flags dt code { color: var(--orange-ink); }
.flags dd { margin: 0; color: var(--muted); font-size: 0.95rem; }

.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
@media (max-width: 720px) { .gallery { grid-template-columns: minmax(0, 1fr); } }
.gallery figure { margin: 0; }
.gallery img { display: block; width: 100%; border-radius: 10px; border: 1px solid var(--rule); box-shadow: 0 20px 40px -30px rgba(0,0,0,.6); }
.gallery figcaption { font-family: var(--mono); font-size: 0.8rem; color: var(--muted); margin-top: 8px; }
.gallery figure:first-child { grid-column: 1 / -1; max-width: 760px; }

/* ---------- pocket ---------- */
.pocket { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); min-width: 0; gap: 32px 48px; align-items: center; padding: 40px 0 70px; border-top: 1px solid var(--rule); }
.pocket p { color: var(--text); max-width: 56ch; }
.device { justify-self: center; width: min(100%, 420px); background: #2b2e36; border-radius: 18px; padding: 16px 18px 16px; border: 1px solid #40454f; position: relative; box-shadow: 0 30px 50px -30px rgba(0,0,0,.8); }
.panel { background: #0c0e12; color: #e6e9ee; border-radius: 6px; aspect-ratio: 3 / 2; font-family: var(--mono); font-size: 0.8rem; display: grid; grid-template-rows: auto 1fr; overflow: hidden; }
.panel-top { display: flex; justify-content: space-between; padding: 8px 12px; font-weight: 700; border-bottom: 1px solid #22262e; }
.panel-top .o { color: var(--fur); }
.panel-scene { position: relative; display: grid; align-content: end; }
.panel-scene .cat-canvas { width: 100%; }
.panel-shelf { height: 8px; background: linear-gradient(#6b4c2f, #3e2a18); }
.panel-msg { position: absolute; left: 12px; top: 14px; padding: 6px 10px; border: 1px solid #3a3e48; border-radius: 4px; color: #e6e9ee; background: #13161c; font-size: 0.78rem; }
@media (max-width: 860px) { .pocket { grid-template-columns: minmax(0, 1fr); } }

/* ---------- footer ---------- */
.foot { display: flex; gap: 20px; align-items: flex-start; padding: 36px 16px 50px; border-top: 1px solid var(--rule); font-size: 0.92rem; }
.foot-cat img { image-rendering: pixelated; image-rendering: crisp-edges; width: 84px; height: auto; }
.foot-credit { font-family: var(--mono); margin-bottom: 4px; }
.foot-licence { font-family: var(--mono); color: var(--muted); margin-bottom: 10px; }
.foot-small { color: var(--muted); font-size: 0.85rem; max-width: 70ch; margin: 0; }

@media (prefers-reduced-motion: reduce) {
  .rack span::after, .cursor { animation: none; }
  .wm-l { transition: none; }
  .rows li { transition: none; }
}
