/* Twinmouse: twinmouse.app
   Apple-style: system type with optical tracking, light/dark tokens, translucent nav,
   interruptible spring motion (app.js), reduced motion and transparency respected. */

:root {
  --bg: #fbfbfd;
  --bg-sunk: #f5f5f7;
  --card: #ffffff;
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #86868b;
  --hair: rgba(0, 0, 0, 0.08);
  --hair-strong: rgba(0, 0, 0, 0.16);
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --accent-text: #0066cc;
  --accent-soft: rgba(0, 113, 227, 0.12);
  --success: #248a3d;
  --danger: #d70015;
  --nav-bg: rgba(251, 251, 253, 0.72);
  --shadow-card: 0 1px 1px rgba(0, 0, 0, 0.03), 0 6px 24px rgba(0, 0, 0, 0.05);
  --shadow-float: 0 2px 6px rgba(0, 0, 0, 0.08), 0 18px 48px rgba(0, 0, 0, 0.14);

  --bezel: #1d1d1f;
  --bezel-edge: #3a3a3c;
  --stand-1: #d2d2d7;
  --stand-2: #a1a1a6;
  --win-bg: rgba(255, 255, 255, 0.96);
  --win-bar: #f3f3f5;
  --win-line: rgba(0, 0, 0, 0.1);
  --win-text: #1d1d1f;
  --wall-a: radial-gradient(120% 100% at 18% 0%, #e3edff 0%, #a9c6ff 42%, #6b97f2 100%);
  --wall-b: radial-gradient(120% 100% at 85% 0%, #ffe4d1 0%, #f7a88f 45%, #b8679b 100%);
  --sel: rgba(0, 113, 227, 0.26);
  --taskbar: rgba(255, 255, 255, 0.5);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable Display", "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --gutter: max(20px, env(safe-area-inset-left));

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-sunk: #0d0d0f;
    --card: #161618;
    --text: #f5f5f7;
    --text-2: #a1a1a6;
    --text-3: #86868b;
    --hair: rgba(255, 255, 255, 0.1);
    --hair-strong: rgba(255, 255, 255, 0.2);
    --accent: #0a84ff;
    --accent-hover: #2b95ff;
    --accent-text: #2997ff;
    --accent-soft: rgba(41, 151, 255, 0.16);
    --success: #30d158;
    --danger: #ff453a;
    --nav-bg: rgba(0, 0, 0, 0.68);
    --shadow-card: 0 0 0 1px rgba(255, 255, 255, 0.06);
    --shadow-float: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 18px 48px rgba(0, 0, 0, 0.6);

    --bezel: #0b0b0c;
    --bezel-edge: #3a3a3c;
    --stand-1: #48484a;
    --stand-2: #2c2c2e;
    --win-bg: rgba(36, 36, 40, 0.97);
    --win-bar: #2c2c30;
    --win-line: rgba(255, 255, 255, 0.12);
    --win-text: #f5f5f7;
    --wall-a: radial-gradient(120% 100% at 18% 0%, #3a5aa8 0%, #22397a 45%, #0f1b45 100%);
    --wall-b: radial-gradient(120% 100% at 85% 0%, #a2566a 0%, #6d2f62 48%, #2c1437 100%);
    --sel: rgba(41, 151, 255, 0.38);
    --taskbar: rgba(16, 18, 32, 0.55);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.47 var(--font);
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 0.15em; }

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 60%, transparent);
  outline-offset: 2px;
  border-radius: 6px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.wrap { width: min(1080px, 100% - 2 * var(--gutter)); margin-inline: auto; }

/* ---------- nav: translucent material, hairline only once content scrolls under it ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease-out);
}
.nav.scrolled { border-bottom-color: var(--hair); }
.nav-in {
  display: flex; align-items: center; justify-content: space-between;
  height: 52px;
}
.brand {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--text); font-weight: 600; font-size: 1.0625rem; letter-spacing: -0.02em;
}
.brand:hover { text-decoration: none; }
.brand svg { width: 26px; height: 26px; flex: none; border-radius: 6px; }
.nav-cta {
  font-size: 0.875rem; font-weight: 500; color: #fff; background: var(--accent);
  padding: 6px 14px; border-radius: 980px; letter-spacing: -0.01em;
  transition: background-color 0.2s, transform 0.1s ease-out;
}
.nav-cta:hover { background: var(--accent-hover); text-decoration: none; }
.nav-cta:active { transform: scale(0.96); }

/* ---------- hero ---------- */
.hero { padding: clamp(56px, 9vw, 112px) 0 clamp(24px, 4vw, 48px); text-align: center; }
.eyebrow {
  margin: 0 0 14px; font-size: clamp(0.9375rem, 1.6vw, 1.1875rem); font-weight: 600;
  color: var(--accent-text); letter-spacing: -0.01em;
}
h1 {
  margin: 0 auto;
  font: 700 clamp(2.5rem, 8.2vw, 6rem)/1.04 var(--font-display);
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.lead {
  margin: 22px auto 0; max-width: 33ch;
  font-size: clamp(1.1875rem, 2.3vw, 1.5rem); line-height: 1.38; letter-spacing: -0.017em;
  color: var(--text-2); text-wrap: pretty;
}

/* ---------- waitlist form ---------- */
.join { margin: 34px auto 0; max-width: 440px; }
.join-row { display: flex; gap: 10px; }
.join input[type="email"] {
  flex: 1; min-width: 0; height: 48px; padding: 0 16px;
  font: inherit; font-size: 1.0625rem; color: var(--text);
  background: var(--card); border: 1px solid var(--hair-strong); border-radius: 12px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.join input[type="email"]::placeholder { color: var(--text-3); }
.join input[type="email"]:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.join .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 22px; border: 0; border-radius: 12px;
  font: inherit; font-size: 1.0625rem; font-weight: 500; letter-spacing: -0.01em;
  color: #fff; background: var(--accent); cursor: pointer; white-space: nowrap;
  transition: background-color 0.2s, transform 0.1s ease-out, opacity 0.2s;
}
.btn:hover { background: var(--accent-hover); text-decoration: none; }
.btn:active { transform: scale(0.97); }
.btn[disabled] { opacity: 0.7; cursor: progress; }
.btn .spin {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.45); border-top-color: #fff;
  animation: spin 0.8s linear infinite; display: none;
}
.btn.busy .spin { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.join-note { margin: 12px 0 0; font-size: 0.875rem; color: var(--text-3); letter-spacing: -0.005em; }
.join-note.err { color: var(--danger); }
.join-done {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  height: 48px; font-size: 1.0625rem; font-weight: 500; color: var(--success);
  animation: arrive 0.5s var(--ease-out) both;
}
.join-done svg { width: 22px; height: 22px; }
@keyframes arrive { from { opacity: 0; transform: scale(0.94); } to { opacity: 1; transform: none; } }

@media (max-width: 480px) {
  .join-row { flex-direction: column; }
  .btn { width: 100%; }
}

/* ---------- demo stage ---------- */
.stage {
  position: relative; margin: clamp(48px, 7vw, 80px) auto 0; max-width: 1000px;
  user-select: none; -webkit-user-select: none;
  touch-action: pan-y;
}
.desk { display: flex; gap: clamp(14px, 3.4vw, 40px); align-items: flex-start; }
.display { flex: 1; margin: 0; min-width: 0; }
.bezel {
  padding: clamp(4px, 0.9vw, 10px);
  background: var(--bezel);
  border-radius: clamp(10px, 1.7vw, 18px);
  box-shadow: inset 0 0 0 1px var(--bezel-edge), var(--shadow-float);
  transition: box-shadow 0.5s var(--ease-out);
}
.display.active .bezel {
  box-shadow: inset 0 0 0 1px var(--bezel-edge), 0 0 0 2px color-mix(in srgb, var(--accent) 55%, transparent), var(--shadow-float);
}
.screen {
  position: relative; aspect-ratio: 16 / 10; overflow: hidden;
  border-radius: clamp(6px, 0.9vw, 9px);
  container-type: inline-size;
}
/* invisible surface over both screens and the gap between them: the real pointer hides here */
.track { position: absolute; z-index: 4; cursor: none; touch-action: pan-y; }
.screen.a { background: var(--wall-a); }
.screen.b { background: var(--wall-b); }
.neck {
  width: 16%; height: clamp(16px, 3.2vw, 36px); margin: 0 auto;
  background: linear-gradient(90deg, var(--stand-2), var(--stand-1) 50%, var(--stand-2));
}
.foot {
  width: 38%; height: clamp(4px, 0.7vw, 7px); margin: 0 auto;
  border-radius: 0 0 6px 6px / 0 0 4px 4px;
  background: linear-gradient(180deg, var(--stand-1), var(--stand-2));
}
.display figcaption {
  margin-top: 14px; text-align: center; font-size: 0.875rem; font-weight: 500; color: var(--text-2);
}

/* edges light up briefly when the cursor crosses */
.edge {
  position: absolute; top: 6%; bottom: 6%; width: 3px; opacity: 0; pointer-events: none;
  background: linear-gradient(180deg, transparent, #fff 30%, #fff 70%, transparent);
  filter: blur(1.5px);
}
.edge.r { right: 0; }
.edge.l { left: 0; }
.edge.flash { animation: flash 0.7s var(--ease-out); }
@keyframes flash { 0% { opacity: 0; } 18% { opacity: 0.95; } 100% { opacity: 0; } }

/* mock desktop contents, sized in container units so they scale with the screen */
.taskbar {
  position: absolute; left: 0; right: 0; bottom: 0; height: 6cqw;
  display: flex; align-items: center; justify-content: center; gap: 1.3cqw;
  background: var(--taskbar);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.taskbar i { width: 3.2cqw; height: 3.2cqw; border-radius: 0.8cqw; background: rgba(255, 255, 255, 0.85); box-shadow: 0 0.2cqw 0.5cqw rgba(0, 0, 0, 0.12); }
.taskbar i:nth-child(1) { background: #4f8df5; }
.taskbar i:nth-child(3) { background: #f2b33d; }
.taskbar i:nth-child(5) { background: #39b36b; }
.topbar {
  position: absolute; left: 0; right: 0; top: 0; height: 4.2cqw;
  display: flex; align-items: center; justify-content: space-between; padding: 0 2cqw;
  background: rgba(0, 0, 0, 0.82); color: #fff; font-size: 2.1cqw; font-weight: 600; letter-spacing: 0;
}
.topbar b { width: 6cqw; height: 1.7cqw; border-radius: 1cqw; background: rgba(255, 255, 255, 0.28); }
.topbar s { display: flex; gap: 0.9cqw; }
.topbar s::before, .topbar s::after { content: ""; width: 1.5cqw; height: 1.5cqw; border-radius: 50%; background: rgba(255, 255, 255, 0.7); }

.win {
  position: absolute; width: 60cqw; border-radius: 1.6cqw; overflow: hidden;
  background: var(--win-bg); color: var(--win-text);
  box-shadow: 0 0.4cqw 1cqw rgba(0, 0, 0, 0.1), 0 2.5cqw 6cqw rgba(0, 0, 0, 0.22);
}
.a .win { left: 8cqw; top: 9cqw; }
.b .win { right: 8cqw; top: 12cqw; width: 58cqw; }
.win-bar {
  height: 5cqw; display: flex; align-items: center; padding: 0 2.2cqw;
  background: var(--win-bar); font-size: 2.2cqw; font-weight: 600; color: var(--text-2); letter-spacing: 0;
}
.a .win-bar { justify-content: space-between; }
.a .win-bar span:last-child { letter-spacing: 1.6cqw; font-weight: 400; }
.b .win-bar { justify-content: center; position: relative; }
.b .win-bar::after {
  content: ""; position: absolute; right: 2cqw; width: 2.4cqw; height: 2.4cqw; border-radius: 50%;
  background: var(--win-line);
}
.win-body { padding: 3cqw 3.4cqw 3.6cqw; display: grid; gap: 2.2cqw; }
.bar { display: block; height: 1.7cqw; border-radius: 1cqw; background: var(--win-line); }
.w40 { width: 40%; } .w48 { width: 48%; } .w62 { width: 62%; } .w66 { width: 66%; }
.w72 { width: 72%; } .w78 { width: 78%; } .w84 { width: 84%; }
.txt { margin: 0; height: 3.6cqw; display: flex; align-items: center; font-size: 3cqw; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; }
[data-copy] {
  --sel-p: 0;
  padding: 0.2cqw 0.4cqw; margin: 0 -0.4cqw; border-radius: 0.6cqw;
  background: linear-gradient(var(--sel), var(--sel)) no-repeat 0 0 / calc(var(--sel-p) * 100%) 100%;
}
[data-copy].clearing { transition: background-size 0.4s var(--ease-out); }
[data-paste] { border-radius: 0.6cqw; transition: opacity 0.45s var(--ease-out), background-color 0.9s var(--ease-out); }
[data-paste].fresh { background-color: var(--sel); }
[data-paste].gone { opacity: 0; }
.caret { width: 0.35cqw; height: 3.4cqw; margin-left: 0.3cqw; background: var(--accent); border-radius: 0.2cqw; opacity: 0; }
.caret.on { animation: blink 1.06s steps(1) infinite; }
@keyframes blink { 0%, 55% { opacity: 1; } 56%, 100% { opacity: 0; } }

/* the cursor and the clipboard chip that travels with it */
.cursor, .chip { position: absolute; left: 0; top: 0; pointer-events: none; will-change: transform; }
.cursor { width: 22px; height: 30px; opacity: 0; transition: opacity 0.3s; z-index: 3; }
.stage.ready .cursor { opacity: 1; }
.cursor svg { display: block; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, 0.35)); }
.chip {
  z-index: 2; display: flex; align-items: center; gap: 6px;
  padding: 5px 9px 5px 7px; border-radius: 8px;
  font-size: 12px; font-weight: 600; letter-spacing: -0.005em; white-space: nowrap;
  color: var(--text); background: var(--card); box-shadow: var(--shadow-float);
  opacity: 0; scale: 0.6; transform-origin: 0 0;
  transition: opacity 0.25s var(--ease-out), scale 0.35s cubic-bezier(0.3, 1.4, 0.5, 1);
}
.chip svg { width: 14px; height: 14px; color: var(--accent); }
.chip.on { opacity: 1; scale: 1; }
.chip.drop { opacity: 0; scale: 0.4; transition: opacity 0.3s var(--ease-out), scale 0.3s var(--ease-out); }
@media (max-width: 640px) {
  .cursor { width: 16px; height: 22px; }
  .chip { font-size: 10px; padding: 3px 7px 3px 5px; gap: 4px; }
  .chip svg { width: 11px; height: 11px; }
}

.stage-info { margin-top: 26px; display: grid; justify-items: center; gap: 10px; }
.pill {
  display: inline-flex; align-items: center;
  padding: 7px 14px 7px 12px; border-radius: 980px;
  background: var(--bg-sunk); box-shadow: inset 0 0 0 1px var(--hair);
  font-size: 0.875rem; color: var(--text-2);
}
.pill .dot { margin-right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px color-mix(in srgb, var(--success) 22%, transparent); }
.pill .who { margin-left: 0.3em; position: relative; display: inline-grid; color: var(--text); font-weight: 600; }
.pill .who span { grid-area: 1 / 1; transition: opacity 0.3s var(--ease-out), transform 0.4s var(--ease-out); }
.pill .who span:not(.on) { opacity: 0; transform: translateY(6px); }
.hint { margin: 0; font-size: 0.8125rem; color: var(--text-3); }
.hint .touch { display: none; }
@media (hover: none), (pointer: coarse) {
  .hint .mouse { display: none; }
  .hint .touch { display: inline; }
}

/* ---------- sections ---------- */
section.block { padding: clamp(80px, 11vw, 140px) 0 0; }
.head { text-align: center; max-width: 720px; margin: 0 auto clamp(40px, 6vw, 64px); }
h2 {
  margin: 0; font: 700 clamp(2rem, 5.2vw, 3.5rem)/1.07 var(--font-display);
  letter-spacing: -0.03em; text-wrap: balance;
}
.head p { margin: 16px auto 0; max-width: 36ch; font-size: clamp(1.0625rem, 1.9vw, 1.3125rem); line-height: 1.42; color: var(--text-2); letter-spacing: -0.015em; text-wrap: pretty; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card {
  padding: 30px 28px 32px; border-radius: 22px; background: var(--card); box-shadow: var(--shadow-card);
}
.card .ico { width: 34px; height: 34px; color: var(--accent-text); margin-bottom: 18px; }
.card h3 { margin: 0 0 8px; font: 600 1.3125rem/1.2 var(--font-display); letter-spacing: -0.02em; }
.card p { margin: 0; color: var(--text-2); }
@media (max-width: 900px) {
  .grid { grid-template-columns: 1fr 1fr; }
  }
@media (max-width: 600px) {
  .grid { grid-template-columns: 1fr; }
}

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 48px); counter-reset: step; }
.step { text-align: center; }
.step::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 44px; height: 44px; margin: 0 auto 18px; border-radius: 50%;
  font: 600 1.125rem/1 var(--font-display); color: var(--accent-text); background: var(--accent-soft);
}
.step h3 { margin: 0 0 6px; font: 600 1.25rem/1.25 var(--font-display); letter-spacing: -0.02em; }
.step p { margin: 0 auto; max-width: 28ch; color: var(--text-2); }
@media (max-width: 700px) { .steps { grid-template-columns: 1fr; } }

.price {
  max-width: 460px; margin: 0 auto; padding: clamp(32px, 5vw, 48px); border-radius: 28px; text-align: center;
  background: var(--card); box-shadow: var(--shadow-card);
}
.amount { font: 700 clamp(3.5rem, 9vw, 5rem)/1 var(--font-display); letter-spacing: -0.04em; }
.amount small { font-size: 0.3em; font-weight: 600; letter-spacing: -0.01em; color: var(--text-2); margin-left: 6px; }
.price ul { list-style: none; margin: 28px 0 30px; padding: 0; display: grid; gap: 12px; text-align: left; }
.price li { display: flex; gap: 12px; align-items: flex-start; }
.price li svg { flex: none; width: 20px; height: 20px; margin-top: 2px; color: var(--success); }
.price .btn { width: 100%; }

.faq { max-width: 760px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--hair); }
.faq details:first-child { border-top: 1px solid var(--hair); }
.faq summary {
  list-style: none; cursor: pointer; padding: 22px 40px 22px 0; position: relative;
  font: 600 1.1875rem/1.3 var(--font-display); letter-spacing: -0.017em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 10px; height: 10px; margin-top: -7px;
  border-right: 2px solid var(--text-3); border-bottom: 2px solid var(--text-3); transform: rotate(45deg);
  transition: transform 0.35s var(--ease-out), margin-top 0.35s var(--ease-out);
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details p { margin: -6px 0 24px; color: var(--text-2); max-width: 62ch; }

.cta { text-align: center; padding-bottom: clamp(80px, 11vw, 140px); }
.cta .join { margin-top: 30px; }

footer {
  border-top: 1px solid var(--hair); padding: 22px 0 calc(28px + env(safe-area-inset-bottom));
  font-size: 0.8125rem; color: var(--text-3);
}
.foot-in { display: flex; flex-wrap: wrap; gap: 10px 22px; justify-content: space-between; }
.foot-in nav { display: flex; gap: 22px; }
footer a { color: var(--text-2); }

/* ---------- reveal on scroll (only when JS runs and motion is allowed) ---------- */
.js-reveal [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out); }
.js-reveal [data-reveal].in { opacity: 1; transform: none; }

/* ---------- plain pages (privacy, thanks, 404) ---------- */
.doc { padding: clamp(48px, 8vw, 96px) 0 clamp(64px, 9vw, 120px); max-width: 720px; }
.doc h1 { margin: 0 0 8px; max-width: none; font-size: clamp(2.25rem, 6vw, 3.5rem); text-align: left; }
.doc .updated { margin: 0 0 40px; color: var(--text-3); font-size: 0.9375rem; }
.doc h2 { margin: 40px 0 10px; font-size: 1.5rem; letter-spacing: -0.02em; }
.doc p, .doc li { color: var(--text-2); }
.doc ul { padding-left: 1.2em; }
.center { text-align: center; }
.center h1 { text-align: center; margin-inline: auto; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js-reveal [data-reveal] { opacity: 1; transform: none; transition: none; }
  .edge.flash { animation: none; }
  .chip, .pill .who span, [data-paste], .bezel { transition: opacity 0.2s; }
  .pill .who span:not(.on) { transform: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .nav { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; border-bottom-color: var(--hair); }
}
@media (prefers-contrast: more) {
  :root { --hair: rgba(127, 127, 127, 0.6); --text-2: var(--text); --text-3: var(--text); }
  .card, .price { box-shadow: 0 0 0 1px var(--hair); }
}
