/* Gesture Mouse — landing page. Colours and rules follow brand/BRAND.md. */

:root {
  --ink: #F4F6FA; --panel: #FFFFFF; --line: #DADDEA;
  --paper: #0B0D3A; --dim: #565A7E;
  --accent: #0072B5; --on-accent: #FFFFFF;
  --ok: #3F8C00; --fire: #C25E00; --fault: #C62834;
  --radius: 14px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #0B0C1F; --panel: #14163A; --line: #2B2E5E;
    --paper: #F3F3FF; --dim: #9296C2;
    --accent: #4CC9F0; --on-accent: #0B0D3A;
    --ok: #98ED13; --fire: #FF9A3C; --fault: #FF5468;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--ink); color: var(--paper);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h2 { font-size: clamp(1.5rem, 4vw, 2rem); }
p { margin: 0 0 1em; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.dim { color: var(--dim); }
.small { font-size: .875rem; }
.eyebrow {
  color: var(--accent); font-size: .75rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; margin-bottom: .5rem;
}
section { padding: 56px 0; scroll-margin-top: 60px; }  /* clear the sticky header on #links */
section + section { border-top: 1px solid var(--line); }

/* header */
.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--ink) 88%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 12px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--paper); text-decoration: none; }
.brand img { width: 34px; height: 34px; }
.top nav { margin-left: auto; display: flex; gap: 18px; }
.top nav a { color: var(--dim); text-decoration: none; font-size: .9rem; }
.top nav a:hover { color: var(--paper); }
@media (max-width: 560px) { .top nav a:not(.cta) { display: none; } }

/* light/dark logo swap */
.for-dark { display: none; }
@media (prefers-color-scheme: dark) { .for-light { display: none; } .for-dark { display: block; } }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 999px; border: 1px solid var(--line);
  background: transparent; color: var(--paper); font: inherit; font-weight: 600;
  text-decoration: none; cursor: pointer;
}
.btn.primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 2px;
}

/* hero */
.hero .wrap { display: grid; gap: 32px; align-items: center; grid-template-columns: 1fr; }
@media (min-width: 860px) { .hero .wrap { grid-template-columns: 1.1fr .9fr; } }
.hero h1 { font-size: clamp(2rem, 7vw, 3.25rem); letter-spacing: -.02em; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lead { font-size: 1.15rem; color: var(--dim); max-width: 34em; }
.hero-logo { width: min(360px, 80%); margin: 0 auto; }

/* download panel */
.download { margin-top: 24px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.download .meta { margin-top: 10px; font-size: .85rem; color: var(--dim); word-break: break-all; }
.download .qr { display: none; gap: 16px; align-items: center; margin-top: 16px; }
.download .qr img { width: 112px; height: 112px; border-radius: 8px; }
.is-desktop .download .qr { display: flex; }
.status-note { font-size: .9rem; color: var(--dim); margin: 0 0 12px; }

/* cards */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card h3 { font-size: 1.05rem; }
.card .ico { font-size: 1.6rem; line-height: 1; margin-bottom: 10px; }

/* steps — each is a button that shows that step on the demo phone */
.install-grid { display: grid; gap: 40px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); align-items: center; }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.steps li { counter-increment: step; position: relative; }
.steps li::before { content: counter(step); position: absolute; left: 18px; top: 16px; z-index: 1; pointer-events: none;
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--line); color: var(--paper); font-weight: 700; transition: background .2s, color .2s; }
.step { display: grid; gap: 4px; width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer;
  padding: 16px 18px 16px 64px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .2s, box-shadow .2s; }
.step:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.step-title { font-weight: 700; }
.step-body { color: var(--dim); font-size: .95rem; }
.steps li.active::before { background: var(--accent); color: var(--on-accent); }
.step.active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.step:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* compatibility table */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; min-width: 480px; background: var(--panel); }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: .92rem; }
th { color: var(--dim); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
tr:last-child td { border-bottom: 0; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600; }
.pill.works { color: var(--ok); border: 1px solid var(--ok); }
.pill.partly { color: var(--fire); border: 1px solid var(--fire); }
.pill.no { color: var(--fault); border: 1px solid var(--fault); }

/* call-to-action card */
.cta-card { margin-top: 24px; padding: 22px; border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line));
  background: color-mix(in srgb, var(--accent) 10%, var(--panel));
  display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; justify-content: space-between; }
.cta-card h3 { font-size: 1.15rem; margin-bottom: .25em; }
.cta-card p { margin: 0; max-width: 34em; }
.cta-card .btn { flex: none; }
@media (max-width: 560px) { .cta-card .btn { width: 100%; } }

/* faq */
details { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 18px; margin-bottom: 10px; }
summary { cursor: pointer; font-weight: 600; padding: 16px 0; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; float: right; color: var(--accent); font-weight: 700; }
details[open] summary::after { content: "–"; }
details > div { padding-bottom: 16px; color: var(--dim); }

/* forms */
form { display: grid; gap: 14px; }
label { display: grid; gap: 6px; font-weight: 600; font-size: .92rem; }
input[type=text], input[type=email], select, textarea {
  font: inherit; color: var(--paper); background: var(--ink); border: 1px solid var(--line);
  border-radius: 10px; padding: 12px 14px; min-height: 48px; width: 100%;
}
textarea { min-height: 110px; resize: vertical; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.row2 { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 600px) { .row2 { grid-template-columns: 1fr 1fr; } }
fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
legend { font-weight: 600; font-size: .92rem; margin-bottom: 6px; }
.radios { display: flex; flex-wrap: wrap; gap: 8px; }
.radios label { display: inline-flex; flex-direction: row; align-items: center; gap: 8px; font-weight: 500;
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; cursor: pointer; }
.radios input { accent-color: var(--accent); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }  /* honeypot */
.form-msg { min-height: 1.5em; font-size: .92rem; margin: 0; }
.form-msg.ok { color: var(--ok); } .form-msg.err { color: var(--fault); }

/* footer */
footer { border-top: 1px solid var(--line); padding: 32px 0 48px; color: var(--dim); font-size: .88rem; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; }
footer a { color: var(--dim); }

/* ---- interactive demo phone (Install and connect) ----
   Drawn in CSS in the app's dark palette whatever the page theme, since it
   shows the app. data-step on #demo picks the screen. */
.demo-wrap { margin: 0; }
.demo-cap { text-align: center; color: var(--dim); font-size: .9rem; margin-top: 14px; min-height: 1.4em; }
.phone { width: min(280px, 78vw); margin: 0 auto; aspect-ratio: 9 / 19; border-radius: 36px; padding: 12px;
  background: #0B0C1F; border: 3px solid var(--line); box-shadow: 0 30px 60px rgba(11,13,58,.35); }
.phone .scr { position: relative; height: 100%; border-radius: 26px; background: #0B0C1F; overflow: hidden;
  font-size: 11px; color: #F3F3FF; }
.phone .screen { position: absolute; inset: 0; display: flex; flex-direction: column;
  opacity: 0; visibility: hidden; transition: opacity .35s, visibility .35s; }
.phone[data-step="1"] .s1, .phone[data-step="2"] .s2,
.phone[data-step="3"] .app, .phone[data-step="4"] .app { opacity: 1; visibility: visible; }

/* 1 — download page */
.s1 { align-items: center; padding: 0 16px; }
.urlbar { align-self: stretch; margin: 14px 0 26px; padding: 6px 10px; border-radius: 999px; background: #14163A;
  color: #9296C2; font-size: 9.5px; text-align: center; }
.s1-logo { width: 72px; height: 72px; }
.s1-title { font-weight: 700; font-size: 15px; margin: 8px 0 18px; }
.fake-btn { background: #4CC9F0; color: #0B0D3A; font-weight: 700; border-radius: 999px; padding: 9px 18px; }
.progress { width: 80%; height: 5px; border-radius: 99px; background: #2B2E5E; margin-top: 18px; overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; background: #98ED13; }
.phone[data-step="1"] .progress span { animation: fill 2.2s ease-out .4s forwards; }
@keyframes fill { to { width: 100%; } }
.s1-note { color: #9296C2; margin-top: 8px; font-size: 9.5px; }

/* 2 — Android's install-unknown-apps screen */
.s2 { padding: 22px 14px; background: #101125; }
.s2-head { font-size: 15px; font-weight: 700; margin-bottom: 18px; }
.s2-app { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; color: #9296C2; }
.s2-icon { width: 20px; height: 20px; border-radius: 50%; background: conic-gradient(#e33 0 33%, #fc3 0 66%, #3a3 0); }
.s2-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px;
  border-radius: 12px; background: #14163A; }
.toggle { width: 34px; height: 20px; border-radius: 99px; background: #2B2E5E; position: relative; flex: none; }
.toggle i { position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #9296C2; }
.phone[data-step="2"] .toggle { animation: tog-bg .3s ease 1.1s forwards; }
.phone[data-step="2"] .toggle i { animation: tog-knob .3s ease 1.1s forwards; }
@keyframes tog-bg { to { background: #4CC9F0; } }
@keyframes tog-knob { to { left: 17px; background: #0B0D3A; } }
.s2-install { margin-top: auto; align-self: flex-end; color: #4CC9F0; font-weight: 700; padding: 8px 4px; opacity: .3; }
.phone[data-step="2"] .s2-install { animation: appear .3s ease 1.6s forwards; }
@keyframes appear { to { opacity: 1; } }

/* 3 / 4 — the app */
.phone .strip { display: flex; align-items: center; gap: 7px; padding: 14px 12px 10px; }
.phone .dot { width: 8px; height: 8px; border-radius: 50%; background: #9296C2; transition: background .3s; }
.phone[data-step="4"] .dot { background: #98ED13; box-shadow: 0 0 8px #98ED13; }
.phone .st4, .phone[data-step="4"] .st3 { display: none; }
.phone[data-step="4"] .st4 { display: inline; }
.phone .gear { margin-left: auto; width: 24px; height: 24px; border-radius: 50%; border: 1px solid #2B2E5E;
  display: grid; place-items: center; color: #4CC9F0; }
.phone .tabs { display: flex; background: #14163A; }
.phone .tabs span { flex: 1; text-align: center; padding: 8px 0; color: #9296C2; }
.phone .tabs span.on { color: #4CC9F0; box-shadow: inset 0 -2px #4CC9F0; }
.phone .pad { flex: 1; margin: 10px; border: 1px solid #2B2E5E; border-radius: 10px; position: relative; touch-action: none; }
.phone[data-step="4"] .pad { cursor: grab; border-color: #3a3f7a; }
.phone .pad-hint { position: absolute; inset: auto 0 44% 0; text-align: center; color: #9296C2; opacity: 0;
  transition: opacity .3s; pointer-events: none; }
.phone[data-step="4"] .pad:not(.used) .pad-hint { opacity: 1; }
.phone .touch { position: absolute; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%;
  border: 2px solid #4CC9F0; left: 35%; top: 55%; opacity: 0; transition: opacity .3s; pointer-events: none; }
.phone[data-step="4"] .touch { opacity: 1; animation: glide 4s ease-in-out infinite; }
.phone .pad.used .touch { animation: none; }
.phone .pad.dragging .touch { background: rgba(76,201,240,.2); }
@keyframes glide { 0%, 100% { left: 30%; top: 60%; } 50% { left: 66%; top: 32%; } }
.phone .kb { position: absolute; right: 8px; bottom: 8px; width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid #2B2E5E; background: transparent; color: #F3F3FF; font: inherit; display: grid; place-items: center; cursor: pointer; }
.phone .kb[aria-pressed="true"] { background: #2B2E5E; }
.phone .btns { display: flex; gap: 6px; padding: 0 10px 14px; }
.phone .btns span { flex: 1; text-align: center; border: 1px solid #2B2E5E; border-radius: 999px; padding: 7px 0; color: #4CC9F0; }
.fake-kb { display: none; flex-direction: column; gap: 6px; padding: 10px 6px 14px; background: #1b1d44;
  text-align: center; font-size: 10px; letter-spacing: .35em; }
.scr.kb-open .fake-kb { display: flex; }
.scr.kb-open .btns { display: none; }
.perm { position: absolute; inset: 0; background: rgba(5,6,18,.6); display: flex; align-items: flex-end; padding: 10px;
  opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; }
.phone[data-step="3"] .perm { opacity: 1; visibility: visible; }
.perm-box { width: 100%; background: #1b1d44; border-radius: 16px; padding: 14px; }
.perm-t { line-height: 1.45; margin-bottom: 12px; }
.perm-b { display: grid; gap: 6px; }
.perm-b span { text-align: center; padding: 7px; border-radius: 999px; background: #14163A; color: #4CC9F0; }
.perm-b span:first-child { background: #4CC9F0; color: #0B0D3A; font-weight: 700; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .phone .screen, .phone .perm { transition: none; }
  .phone[data-step="4"] .touch { animation: none; }
  .phone[data-step="1"] .progress span { animation: none; width: 100%; }
  .phone[data-step="2"] .toggle { animation: none; background: #4CC9F0; }
  .phone[data-step="2"] .toggle i { animation: none; left: 17px; background: #0B0D3A; }
  .phone[data-step="2"] .s2-install { animation: none; opacity: 1; }
}
