:root {
  --bg: #fbfaf7; --surface: #ffffff; --ink: #14151a; --ink2: #4f5059; --muted: #8b8c94;
  --line: #e9e7e1; --band: #ecebe6; --a: #2a78d6; --b: #eb6834; --a-soft: #e3eefb; --b-soft: #fde8dd;
  --shadow: 0 1px 2px rgba(20, 21, 26, .05), 0 8px 28px rgba(20, 21, 26, .07);
  --accent-ink: #ffffff; --stage: #1c1d22;
  --head: "Bricolage Grotesque", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1014; --surface: #17181d; --ink: #f3f2ee; --ink2: #b8b7b0; --muted: #85858c;
    --line: #26272d; --band: #2a2b31; --a: #5aa0f0; --b: #f5844f; --a-soft: #14263d; --b-soft: #3a2014;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 30px rgba(0, 0, 0, .35); --accent-ink: #0b0b0b;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1014; --surface: #17181d; --ink: #f3f2ee; --ink2: #b8b7b0; --muted: #85858c;
  --line: #26272d; --band: #2a2b31; --a: #5aa0f0; --b: #f5844f; --a-soft: #14263d; --b-soft: #3a2014;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 30px rgba(0, 0, 0, .35); --accent-ink: #0b0b0b;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--body); overflow-x: hidden; position: relative; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
h1, h2, h3 { font-family: var(--head); letter-spacing: -0.01em; }
h2 { font-size: clamp(24px, 3.4vw, 34px); line-height: 1.15; margin: 0 0 22px; }
h3 { font-size: 18px; margin: 10px 0 4px; }
a { color: var(--a); }
.muted { color: var(--muted); }

/* soft colour washes behind the top of the page */
.glow {
  position: absolute; inset: 0 0 auto 0; height: 720px; z-index: 0; pointer-events: none;
  background:
    radial-gradient(520px 340px at 82% 18%, color-mix(in srgb, var(--a) 18%, transparent), transparent 70%),
    radial-gradient(460px 320px at 62% 52%, color-mix(in srgb, var(--b) 16%, transparent), transparent 70%);
}

/* nav */
.nav { display: flex; align-items: center; justify-content: space-between; padding-top: 22px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 800 19px var(--head); color: var(--ink); text-decoration: none; }
.brand svg { width: 28px; height: 28px; }
.brand path { fill: none; stroke-width: 4; stroke-linecap: round; }
.ln-a { stroke: var(--a); } .ln-b { stroke: var(--b); }
.nav-cta { font-weight: 600; text-decoration: none; padding: 7px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }

/* hero */
.hero { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: 30px; align-items: center; padding-top: 30px; padding-bottom: 30px; }
.chip { display: inline-block; margin: 0 0 16px; padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 600;
        color: var(--ink2); background: var(--surface); border: 1px solid var(--line); }
h1 { font-size: clamp(38px, 6.2vw, 64px); line-height: 1.02; margin: 0 0 18px; font-weight: 800; }
.hl { background: linear-gradient(90deg, var(--a), var(--b)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sub { font-size: 19px; color: var(--ink2); max-width: 32ch; margin: 0 0 26px; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-art svg { width: 100%; height: auto; overflow: visible; }
.hero-art path { fill: none; stroke-linecap: round; }
.hero-art .main { stroke-width: 6; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 7s ease-in-out infinite; }
.hero-art .main.a { stroke: var(--a); }
.hero-art .main.b { stroke: var(--b); animation-delay: .6s; }
.hero-art .faint path { stroke-width: 2; opacity: .3; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw-faint 7s ease-in-out infinite; }
.hero-art .faint.a path { stroke: var(--a); } .hero-art .faint.b path { stroke: var(--b); animation-delay: .6s; }
.hero-art .target { fill: none; stroke: var(--a); stroke-width: 3; }
.hero-art .start { fill: var(--ink); }
.hero-art .tag rect { fill: var(--surface); stroke: var(--line); }
.hero-art .tag text { font: 600 13px var(--body); text-anchor: middle; }
.hero-art .t-a text { fill: var(--a); } .hero-art .t-b text { fill: var(--b); }
.hero-art .tag, .hero-art .note { animation: fade 7s ease-in-out infinite; }
.hero-art .note path { stroke: var(--ink2); stroke-width: 1.6; stroke-dasharray: 3 3; fill: none; }
.hero-art .note path + path { stroke-dasharray: none; }
.hero-art .note text { font: 600 13px var(--body); fill: var(--ink2); }
@keyframes draw { 0% { stroke-dashoffset: 1; opacity: 1; } 28%, 92% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes draw-faint { 0% { stroke-dashoffset: 1; opacity: .3; } 28%, 92% { stroke-dashoffset: 0; opacity: .3; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes fade { 0%, 30% { opacity: 0; } 38%, 92% { opacity: 1; } 100% { opacity: 0; } }

/* buttons */
.btn { font: 600 15px var(--body); padding: 12px 22px; border-radius: 999px; cursor: pointer; text-decoration: none;
       border: 1px solid var(--line); background: var(--surface); color: var(--ink); display: inline-flex; align-items: center; }
.btn.primary { background: var(--ink); border-color: var(--ink); color: var(--bg); box-shadow: var(--shadow); }
.btn.primary:hover { transform: translateY(-1px); }
.btn.ghost:hover { border-color: var(--muted); }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.btn:focus-visible, .nav-cta:focus-visible { outline: 2px solid var(--a); outline-offset: 2px; }

/* why */
.why { position: relative; padding-top: 40px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 22px; box-shadow: var(--shadow); }
.card p { margin: 0; color: var(--ink2); }
.icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; }
.icon svg { width: 26px; height: 26px; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.i-a { background: var(--a-soft); } .i-a svg { stroke: var(--a); }
.i-b { background: var(--b-soft); } .i-b svg { stroke: var(--b); }
.i-c { background: color-mix(in srgb, var(--ink) 8%, transparent); } .i-c svg { stroke: var(--ink); }
.usecases { margin-top: 28px; padding: 28px; border-radius: 24px;
            background: linear-gradient(120deg, var(--a-soft), var(--b-soft)); }
.usecases h3 { font-size: clamp(20px, 2.6vw, 26px); line-height: 1.2; margin: 0 0 18px; max-width: 26ch; }
.uc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.uc { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px;
      background: var(--surface); box-shadow: var(--shadow); font-size: 16px; }
.uc b { font-family: var(--head); font-weight: 600; }
.uc-icon { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center;
           background: linear-gradient(135deg, var(--a), var(--b)); }
.uc-icon svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* how */
.steps-row { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.steps-row li { display: flex; flex-direction: column; gap: 4px; padding: 20px; border-radius: 18px; border: 1px dashed var(--line); }
.steps-row .n { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font: 800 15px var(--head);
                background: linear-gradient(135deg, var(--a), var(--b)); color: #fff; margin-bottom: 6px; }
.steps-row b { font-family: var(--head); font-size: 18px; }
.steps-row li > span:last-child { color: var(--ink2); }

/* studio */
.studio { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 24px; box-shadow: var(--shadow); }
.studio-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.studio-head h2 { margin: 0; }
.pills { list-style: none; display: flex; gap: 6px; padding: 4px; margin: 0; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); flex-wrap: wrap; }
.pills li { padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--muted); }
.pills li.active { background: var(--ink); color: var(--bg); }
.pills li.done { color: var(--ink2); }
.studio-body { display: grid; grid-template-columns: 230px 1fr; gap: 24px; align-items: start; }
.howto { background: var(--bg); border-radius: 16px; padding: 16px; border: 1px solid var(--line); }
.howto p { margin: 8px 0 0; font-size: 14px; color: var(--ink2); }
.figure { width: 100%; }
.figure .body, .figure .chair, .figure .arm { stroke-linecap: round; fill: none; }
.figure .body { stroke: var(--ink2); stroke-width: 4; }
.figure circle.body { fill: var(--ink2); stroke: none; }
.figure .chair { stroke: var(--line); stroke-width: 4; }
.figure .arm { stroke: var(--b); stroke-width: 5; }
.figure .hand { fill: var(--b); }
.figure .spot { fill: none; stroke: var(--a); stroke-width: 2.5; }
.figure .upper, .figure .fore { transform-box: view-box; }
.figure .upper { transform-origin: 60px 38px; animation: reach 3.2s ease-in-out infinite; }
.figure .fore { transform-origin: 90px 38px; animation: bend 3.2s ease-in-out infinite; }
@keyframes reach { 0%, 15% { transform: rotate(75deg); } 45%, 60% { transform: rotate(0deg); } 88%, 100% { transform: rotate(75deg); } }
@keyframes bend { 0%, 15% { transform: rotate(-75deg); } 45%, 60% { transform: rotate(0deg); } 88%, 100% { transform: rotate(-75deg); } }
@media (prefers-reduced-motion: reduce) {
  .figure .upper, .figure .fore, .hero-art .main, .hero-art .faint path, .hero-art .tag, .hero-art .note { animation: none; stroke-dashoffset: 0; opacity: 1; }
}

.stage { position: relative; width: min(100%, calc(54vh * 4 / 3)); aspect-ratio: 4 / 3; background: var(--stage); border-radius: 18px; overflow: hidden; transform: scaleX(-1); }
.stage video, .stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.placeholder { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
               color: #8b8c94; font-size: 15px; transform: scaleX(-1); }
.placeholder svg { width: 40px; height: 40px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.dots { display: flex; gap: 8px; margin: 16px 0 0; }
.dots span { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line); transition: background .2s, border-color .2s, transform .2s; }
.dots span.on { transform: scale(1.15); }
.dots.a span.on { background: var(--a); border-color: var(--a); }
.dots.b span.on { background: var(--b); border-color: var(--b); }
.status { font: 600 19px var(--head); margin: 12px 0 14px; min-height: 1.5em; }
.buttons { display: flex; flex-wrap: wrap; gap: 10px; }

/* results */
.results { margin-top: 26px; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 26px; box-shadow: var(--shadow); }
.results h2 { font-size: clamp(22px, 3vw, 30px); }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 0 0 20px; }
.tile { border-radius: 16px; padding: 14px 16px; background: var(--bg); border: 1px solid var(--line); }
.tile:nth-child(1) { background: var(--b-soft); border-color: transparent; }
.tile:nth-child(2) { background: var(--a-soft); border-color: transparent; }
.tile .v { font: 800 30px var(--head); line-height: 1.1; }
.tile .k { font-size: 14px; color: var(--ink2); margin-top: 4px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.panel { border: 1px solid var(--line); border-radius: 16px; padding: 14px; }
.panel h3 { margin: 0 0 6px; font-size: 16px; }
.chart { width: 100%; overflow: hidden; }
.chart svg { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }

footer { display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--muted); font-size: 14px; padding-top: 40px; padding-bottom: 48px; }
footer a { color: var(--ink2); }

@media (max-width: 480px) { .uc-grid { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 32px; }
  .hero-art { max-width: 460px; }
  .cards, .steps-row { grid-template-columns: 1fr; }
  .uc-grid { grid-template-columns: 1fr 1fr; }
  .usecases { padding: 20px; }
  .studio-body { grid-template-columns: 1fr; }
  .howto { display: flex; gap: 14px; align-items: center; }
  .howto .figure { width: 140px; flex: none; }
  .pair, .tiles { grid-template-columns: 1fr; }
  .studio, .results { padding: 18px; border-radius: 20px; }
}

/* app shell: side panel on desktop, tabs across the top on phones */
.shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 26px; padding: 24px 16px;
        border-right: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 70%, transparent); backdrop-filter: blur(8px); z-index: 5; }
.side .brand { padding: 0 8px; }
.tabs { display: flex; flex-direction: column; gap: 4px; }
.tabs a { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px;
          color: var(--ink2); text-decoration: none; font-weight: 600; font-size: 15px; }
.tabs a svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tabs a:hover { background: color-mix(in srgb, var(--ink) 5%, transparent); color: var(--ink); }
.tabs a[aria-current="page"] { background: var(--ink); color: var(--bg); }
.tabs a:focus-visible { outline: 2px solid var(--a); outline-offset: 2px; }
.badge { width: 8px; height: 8px; border-radius: 50%; background: var(--b); margin-left: auto; }
.side-foot { margin-top: auto; padding: 0 8px; font-size: 13px; color: var(--muted); }
.side-foot p { margin: 4px 0; }
.side-foot a { color: var(--ink2); }
.content { min-width: 0; padding: 28px 36px 60px; }
.view { position: relative; max-width: 1000px; animation: viewin .25s ease; }
@keyframes viewin { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .view { animation: none; } }
.overview { padding-bottom: 20px; }
.view[data-view="try"] .steps-row { margin-bottom: 18px; }
.view[data-view="try"] .steps-row li { padding: 14px 16px; }
.results { margin-top: 0; }
.empty { text-align: center; padding: 70px 20px; border: 1px dashed var(--line); border-radius: 24px; }
.empty svg { width: 56px; height: 56px; fill: none; stroke-width: 2.4; stroke-linecap: round; }
.empty svg path:first-child { stroke: var(--a); } .empty svg path:last-child { stroke: var(--b); }
.empty h2 { margin: 12px 0 6px; }
.empty p { color: var(--ink2); margin: 0 0 20px; }
.empty .cta { justify-content: center; }
.about h2 { margin-bottom: 18px; }
.how-list { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 10px; max-width: 640px; counter-reset: h; }
.how-list li { counter-increment: h; position: relative; padding: 14px 16px 14px 56px; border-radius: 16px; background: var(--surface);
               border: 1px solid var(--line); color: var(--ink2); }
.how-list li::before { content: counter(h); position: absolute; left: 16px; top: 13px; width: 28px; height: 28px; border-radius: 50%;
                       display: grid; place-items: center; font: 800 14px var(--head); color: #fff; background: linear-gradient(135deg, var(--a), var(--b)); }
.how-list b { color: var(--ink); font-family: var(--head); }
.note { color: var(--ink2); font-size: 14px; }

@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side, .tabs { min-width: 0; }
  .view[data-view="try"] .steps-row { display: none; }
  .side { position: sticky; top: 0; height: auto; flex-direction: row; align-items: center; flex-wrap: wrap; gap: 10px;
          padding: 10px 14px; border-right: 0; border-bottom: 1px solid var(--line); }
  .side .brand { padding: 0; font-size: 17px; }
  .tabs { flex-direction: row; gap: 2px; overflow-x: auto; width: 100%; scrollbar-width: none; }
  .tabs a { padding: 8px 11px; font-size: 14px; gap: 7px; white-space: nowrap; }
  .tabs a svg { width: 17px; height: 17px; }
  .side-foot { display: none; }
  .content { padding: 18px 16px 50px; }
}
