/*
 * Open Palette — landing page.
 *
 * Dark ground, the icon's three dots (blue, pink, amber) as the only colour, and liquid-glass
 * windows drawn with the same values as the app's own launcher (src/renderer/src/styles.css and
 * tokens.css, dark theme).
 */

:root {
  color-scheme: dark;

  --bg: #0a0b12;
  --ink: #eef0f7;
  --ink-2: rgb(238 240 247 / 0.7);
  --ink-3: rgb(238 240 247 / 0.58);

  --blue: #4c6ef5;
  --pink: #ec5b9b;
  --amber: #f0b429;
  --blue-ink: #8fa3ff;
  --pink-ink: #f48bbb;
  --amber-ink: #f5c75a;
  --accent: #7b8cff;

  /* The launcher, as in the app's dark theme. */
  --l-glass: rgb(22 22 28 / 0.4);
  --l-edge: rgb(255 255 255 / 0.13);
  --l-raised: rgb(255 255 255 / 0.07);
  --l-raised-border: rgb(255 255 255 / 0.1);
  --l-sheen: rgb(255 255 255 / 0.1);
  --l-selected: rgb(255 255 255 / 0.13);
  --l-selected-border: rgb(255 255 255 / 0.13);
  --l-selected-shadow: inset 0 1px 0 rgb(255 255 255 / 0.16), 0 6px 18px rgb(0 0 0 / 0.2);
  --l-ink: rgb(255 255 255 / 0.92);
  --l-muted: rgb(255 255 255 / 0.56);
  --l-faint: rgb(255 255 255 / 0.46);
  --l-line: rgb(255 255 255 / 0.08);
  --l-keycap: rgb(255 255 255 / 0.1);

  --font: "Geist", -apple-system, "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

a {
  color: #c9d1ff;
}

a:hover {
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

h1,
h2,
h3,
p,
dl,
dd {
  margin: 0;
}

kbd {
  font-family: inherit;
}

.i {
  width: 1em;
  height: 1em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 16px;
  top: -64px;
  z-index: 20;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
}

.skip:focus {
  top: 16px;
}

/* ── Navigation ─────────────────────────────────────────── */

.nav {
  position: relative;
  z-index: 5;
  max-width: 1248px;
  min-height: 72px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
}

.brand:hover {
  color: var(--ink);
}

.nav-links {
  display: flex;
  gap: 32px;
  font-size: 14px;
}

.nav-links a {
  padding: 12px 0;
  color: var(--ink-2);
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--ink);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

@media (max-width: 760px) {
  .nav-links {
    display: none;
  }
}

/* ── Buttons ────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition:
    transform 0.2s var(--ease-out),
    background-color 0.2s ease,
    box-shadow 0.2s ease;
}

.btn .i {
  width: 18px;
  height: 18px;
}

.btn:active {
  transform: translateY(1px) scale(0.98);
}

.btn-sm {
  height: 44px;
  padding: 0 16px;
  border-radius: 10px;
  font-size: 14px;
}

.btn-lg {
  height: 50px;
  padding: 0 22px;
  font-size: 15px;
}

.btn-xl {
  height: 56px;
  padding: 0 28px;
  border-radius: 14px;
  font-size: 16px;
}

.btn-light {
  background: var(--ink);
  color: var(--bg);
  box-shadow: 0 10px 40px rgb(76 110 245 / 0.35);
}

.btn-light:hover {
  background: #fff;
  color: var(--bg);
  transform: translateY(-1px);
}

.btn-ghost {
  background: rgb(255 255 255 / 0.06);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.14);
  color: var(--ink);
  font-weight: 500;
}

.btn-ghost:hover {
  background: rgb(255 255 255 / 0.1);
  color: var(--ink);
}

.btn-plain {
  color: var(--ink);
  font-weight: 500;
}

.btn-plain:hover {
  background: rgb(255 255 255 / 0.06);
  color: var(--ink);
}

@media (max-width: 480px) {
  .nav-actions .btn-plain {
    display: none;
  }
}

/* ── Section rail: the icon's pill, standing up, lit by the chapter in view ── */

.rail {
  position: fixed;
  left: 28px;
  top: 50%;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 28px;
  padding: 6px 0;
  border-radius: 14px;
  background: rgb(10 11 18 / 0.6);
  box-shadow: inset 0 0 0 1.5px rgb(255 255 255 / 0.6);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transform: translate(-12px, -50%);
  transition:
    opacity 0.4s ease,
    transform 0.5s var(--ease-out);
}

.rail.is-on {
  opacity: 1;
  pointer-events: auto;
  transform: translate(0, -50%);
}

.rail-link {
  display: grid;
  place-items: center;
  width: 44px;
  height: 30px;
}

.rail-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--c);
  opacity: 0.3;
  transition:
    opacity 0.3s ease,
    transform 0.3s var(--ease-out),
    box-shadow 0.3s ease;
}

.rail-link:hover .rail-dot {
  opacity: 0.6;
}

.rail-link[aria-current="true"] .rail-dot {
  opacity: 1;
  transform: scale(1.25);
  box-shadow: 0 0 14px var(--c);
}

@media (max-width: 1200px) {
  .rail {
    display: none;
  }
}

/* ── Hero ───────────────────────────────────────────────── */

/* Full-width sections clip their own glows, so nothing pushes the page sideways on a phone. */
.hero,
.chapter,
.included,
.source,
.finale {
  overflow-x: clip;
}

.hero {
  position: relative;
  padding: 72px 24px 24px;
  text-align: center;
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 920px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 32px;
  padding: 0 14px 0 10px;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.03);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.12);
  color: rgb(238 240 247 / 0.78);
  font-size: 13px;
}

.tri {
  display: flex;
  gap: 4px;
}

.tri-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
}

.tri-dot:nth-child(2) {
  background: var(--pink);
}

.tri-dot:nth-child(3) {
  background: var(--amber);
}

h1 {
  font-size: clamp(44px, 7vw, 92px);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.lede {
  max-width: 640px;
  color: var(--ink-2);
  font-size: 19px;
  text-wrap: pretty;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 8px;
}

.cta-row-start {
  justify-content: flex-start;
}

.rise {
  animation: rise 1s var(--ease-out) var(--d, 0s) both;
}

@keyframes rise {
  from {
    opacity: 0;
    filter: blur(6px);
    transform: translateY(14px);
  }
}

.replay-hint {
  margin-top: 8px;
  color: var(--ink-3);
  font-size: 13px;
}

.replay-hint kbd {
  padding: 1px 6px;
  border-radius: 5px;
  background: rgb(255 255 255 / 0.08);
  color: var(--ink-2);
}

@media (hover: none) {
  .replay-hint {
    visibility: hidden;
  }
}

/* ── The launcher: a window of glass with brighter panes floating inside ── */

.launcher {
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: hidden;
  padding: 10px;
  border-radius: 24px;
  background-color: var(--l-glass);
  box-shadow:
    0 40px 100px rgb(0 0 0 / 0.5),
    inset 0 0 0 1px var(--l-edge);
  -webkit-backdrop-filter: blur(40px) saturate(1.6);
  backdrop-filter: blur(40px) saturate(1.6);
  color: var(--l-ink);
  font-size: 14px;
  text-align: left;
}

.search {
  position: relative;
  display: flex;
  flex: none;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 0 12px 0 16px;
  border: 1px solid var(--l-raised-border);
  border-radius: 16px;
  background: var(--l-raised);
  box-shadow: inset 0 1px 0 var(--l-sheen);
  font-size: 18px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.search-icon {
  width: 18px;
  height: 18px;
  color: var(--l-muted);
}

.search-sm {
  gap: 10px;
  height: 46px;
  padding: 0 14px;
  font-size: 15px;
}

.ph,
.ph-static {
  color: rgb(255 255 255 / 0.4);
}

.ph {
  position: absolute;
  left: 44px;
  opacity: 0;
}

.crumb {
  padding: 3px 10px;
  border-radius: 9px;
  background: var(--l-keycap);
  color: var(--l-muted);
  font-size: 12px;
}

.query {
  display: flex;
  align-items: center;
  height: 24px;
}

.caret {
  display: inline-block;
  width: 2px;
  height: 22px;
  margin-left: 1px;
  border-radius: 1px;
  background: var(--accent);
  vertical-align: middle;
  animation: blink 1s steps(1) infinite;
}

.caret-pink {
  height: 18px;
  margin-left: 4px;
  background: var(--pink-ink);
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.tabs {
  display: flex;
  flex: none;
  align-items: center;
  gap: 4px;
  height: 32px;
  overflow: hidden;
  padding: 0 4px 0 2px;
  white-space: nowrap;
}

.tab-f {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--l-muted);
  font-size: 12.5px;
  font-weight: 500;
}

.tab-f.on {
  border-color: var(--l-selected-border);
  background: var(--l-selected);
  box-shadow: var(--l-selected-shadow);
  color: var(--l-ink);
}

.count {
  color: var(--l-faint);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.tabs-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  color: var(--l-faint);
  font-size: 12px;
}

.content {
  display: flex;
  flex: 1;
  gap: 6px;
  min-height: 0;
}

.results {
  flex: 1;
  min-width: 0;
  padding: 2px 0;
}

.content .results {
  flex: 0 0 52%;
}

.heading {
  padding: 8px 12px 4px;
  color: var(--l-muted);
  font-size: 12px;
  font-weight: 500;
}

.row {
  display: flex;
  align-items: center;
  gap: 11px;
  height: 42px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 12px;
}

.sel {
  border-color: var(--l-selected-border);
  background: var(--l-selected);
  box-shadow: var(--l-selected-shadow);
}

.row-text {
  display: flex;
  flex: 1;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.row-title {
  overflow: hidden;
  font-size: 14.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-title b {
  font-weight: 650;
}

.acc {
  flex: none;
  color: var(--l-faint);
  font-size: 12px;
}

/* Glossy icon tiles, lit from above like the glass around them. */
.tile {
  display: grid;
  flex: none;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: linear-gradient(180deg, color-mix(in oklab, var(--c) 72%, white), var(--c) 70%);
  box-shadow:
    inset 0 0.5px 0 rgb(255 255 255 / 0.45),
    inset 0 0 0 0.5px rgb(0 0 0 / 0.14),
    0 1px 2px rgb(0 0 0 / 0.12);
  color: #fff;
}

.tile .i {
  width: 14px;
  height: 14px;
  stroke-width: 2.3;
}

.preview {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding: 16px 18px;
  border: 1px solid var(--l-raised-border);
  border-radius: 16px;
  background: var(--l-raised);
  box-shadow: inset 0 1px 0 var(--l-sheen);
}

.preview-title {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.preview-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13.5px;
  line-height: 1.5;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.box {
  position: relative;
  flex: none;
  width: 14px;
  height: 14px;
  margin-top: 3px;
  border: 1.5px solid var(--l-faint);
  border-radius: 4px;
}

.check.done {
  color: var(--l-muted);
  text-decoration: line-through;
}

.done .box {
  border-color: var(--accent);
  background: var(--accent);
}

.done .box::after {
  content: "";
  position: absolute;
  left: 3.5px;
  top: 0.5px;
  width: 3px;
  height: 7px;
  border: solid #fff;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}

.meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--l-line);
  font-size: 12px;
}

.meta div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.meta dt {
  color: var(--l-muted);
}

/* The floating action bar. */
.bar {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 44px;
  padding: 0 6px 0 14px;
  border: 1px solid var(--l-raised-border);
  border-radius: 14px;
  background: var(--l-raised);
  box-shadow: inset 0 1px 0 var(--l-sheen);
  color: var(--l-muted);
  font-size: 12.5px;
  white-space: nowrap;
}

.bar-end {
  justify-content: flex-end;
}

.bar-context,
.bar-actions,
.bar-primary,
.bar-more {
  display: inline-flex;
  align-items: center;
}

.bar-context {
  gap: 8px;
}

.mark {
  color: var(--l-faint);
}

.bar-actions {
  gap: 4px;
}

.bar-primary,
.bar-more {
  gap: 8px;
  height: 32px;
  padding: 0 8px 0 12px;
  border: 1px solid transparent;
  border-radius: 10px;
}

.bar-primary {
  border-color: var(--l-selected-border);
  background: var(--l-selected);
  box-shadow: var(--l-selected-shadow);
  color: var(--l-ink);
  font-weight: 500;
}

.bar kbd,
.tabs-hint kbd {
  padding: 0 6px;
  border-radius: 6px;
  background: var(--l-keycap);
  color: var(--l-muted);
  font-size: 11.5px;
  font-weight: 400;
  line-height: 20px;
}

.bar-more kbd + kbd {
  margin-left: -5px;
}

@media (max-width: 640px) {
  .preview,
  .tabs-hint,
  .bar-more {
    display: none;
  }

  .content .results {
    flex: 1;
  }
}

/* ── Hero stage: the icon opens into the launcher ─────────
 * The pill grows into the search field and its dots bloom into the lights behind the glass.
 * The stage's base styles describe the finished launcher, so without animation (reduced
 * motion, or once it has played) the page simply shows the launcher.
 */

.stage {
  position: relative;
  max-width: 1100px;
  height: 548px;
  margin: 40px auto 0;
}

.orbs {
  position: absolute;
  inset: -80px -160px;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
}

.orb-blue {
  left: 12%;
  top: 2%;
  width: 460px;
  height: 460px;
  background: var(--blue);
  filter: blur(110px);
  opacity: 0.55;
}

.orb-pink {
  right: 10%;
  top: 16%;
  width: 440px;
  height: 440px;
  background: var(--pink);
  filter: blur(115px);
  opacity: 0.42;
}

.orb-amber {
  left: 36%;
  bottom: -4%;
  width: 420px;
  height: 420px;
  background: var(--amber);
  filter: blur(125px);
  opacity: 0.3;
}

.win {
  position: absolute;
  left: 50%;
  top: 24px;
  display: block;
  width: min(800px, 100%);
  height: 500px;
  transform: translateX(-50%);
}

.win-dots {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  opacity: 0;
}

.win-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--blue);
}

.win-dot:nth-child(2) {
  background: var(--pink);
}

.win-dot:nth-child(3) {
  background: var(--amber);
}

.win-ui {
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 480px;
}

.stage.is-playing .win {
  animation: morph 4.8s var(--ease-in-out) both;
}

.stage.is-playing .win-dots {
  animation: dots-out 4.8s ease both;
}

.stage.is-playing .win-dot {
  animation: hop 0.9s cubic-bezier(0.3, 0, 0.3, 1) 0.2s both;
}

.stage.is-playing .win-dot:nth-child(2) {
  animation-delay: 0.34s;
}

.stage.is-playing .win-dot:nth-child(3) {
  animation-delay: 0.48s;
}

.stage.is-playing .orbs {
  animation: bloom 4.8s var(--ease-out) both;
}

.stage.is-playing .win-ui {
  animation: ui-in 4.8s ease both;
}

.stage.is-playing .ph {
  animation: placeholder 4.8s linear both;
}

.stage.is-playing .ch {
  animation: type 0.01s linear 3s both;
}

.stage.is-playing .ch:nth-child(3) {
  animation-delay: 3.14s;
}

.stage.is-playing .ch:nth-child(4) {
  animation-delay: 3.28s;
}

.stage.is-playing .ch:nth-child(5) {
  animation-delay: 3.42s;
}

.stage.is-playing .tabs,
.stage.is-playing .results > *,
.stage.is-playing .preview,
.stage.is-playing .bar {
  animation: row-in 0.5s var(--ease-out) 3.7s both;
}

.stage.is-playing .results > :nth-child(2) {
  animation-delay: 3.76s;
}

.stage.is-playing .results > :nth-child(3) {
  animation-delay: 3.82s;
}

.stage.is-playing .results > :nth-child(4) {
  animation-delay: 3.88s;
}

.stage.is-playing .results > :nth-child(5) {
  animation-delay: 3.94s;
}

.stage.is-playing .results > :nth-child(6) {
  animation-delay: 4s;
}

.stage.is-playing .results > :nth-child(7) {
  animation-delay: 4.06s;
}

.stage.is-playing .preview {
  animation-delay: 3.95s;
}

.stage.is-playing .bar {
  animation-delay: 4.1s;
}

@keyframes morph {
  0%,
  29% {
    width: 168px;
    height: 64px;
    padding: 0;
    border-radius: 32px;
    background-color: rgb(22 23 36 / 0.94);
    box-shadow:
      0 20px 50px rgb(0 0 0 / 0.4),
      inset 0 0 0 5px #fff;
  }

  50%,
  75% {
    width: min(800px, 100%);
    height: 72px;
    padding: 10px;
    border-radius: 24px;
    background-color: var(--l-glass);
    box-shadow:
      0 40px 100px rgb(0 0 0 / 0.5),
      inset 0 0 0 1px var(--l-edge);
  }
}

@keyframes dots-out {
  0%,
  27% {
    opacity: 1;
    transform: none;
  }

  42%,
  100% {
    opacity: 0;
    transform: scale(2.4);
  }
}

@keyframes hop {
  0%,
  46%,
  100% {
    transform: translateY(0);
  }

  18% {
    transform: translateY(-16px);
  }

  32% {
    transform: translateY(2px);
  }
}

@keyframes bloom {
  0%,
  25% {
    opacity: 0;
    transform: scale(0.06);
  }

  66% {
    opacity: 1;
    transform: none;
  }
}

@keyframes ui-in {
  0%,
  44% {
    opacity: 0;
  }
}

@keyframes placeholder {
  0%,
  50% {
    opacity: 0;
  }

  53%,
  61% {
    opacity: 1;
  }

  62%,
  100% {
    opacity: 0;
  }
}

@keyframes type {
  from {
    font-size: 0;
  }

  to {
    font-size: 18px;
  }
}

@keyframes row-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

/* ── Chapters ───────────────────────────────────────────── */

.chapter {
  padding: 180px 24px 0;
}

#find {
  padding-top: 140px;
}

.chapter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(460px, 100%), 1fr));
  align-items: center;
  gap: 72px;
  max-width: 1200px;
  margin: 0 auto;
}

.chapter-grid-top {
  align-items: start;
}

.chapter-copy {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pill-ind {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 8px;
  border-radius: 12px;
  box-shadow: inset 0 0 0 1.5px rgb(255 255 255 / 0.7);
}

.pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.22);
}

.pill-dot.on {
  background: var(--c);
  box-shadow: 0 0 12px var(--c);
}

.label {
  font-size: 15px;
  font-weight: 500;
}

h2 {
  font-size: clamp(36px, 4.4vw, 58px);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.body {
  max-width: 520px;
  color: var(--ink-2);
  font-size: 18px;
  text-wrap: pretty;
}

.text-link {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 8px;
  min-height: 44px;
  color: var(--amber-ink);
  font-weight: 500;
  text-decoration: none;
}

.text-link:hover {
  color: #fff;
}

.arrow {
  width: 16px;
  height: 16px;
  transition: transform 0.2s var(--ease-out);
}

.text-link:hover .arrow {
  transform: translateX(3px);
}

.visual {
  position: relative;
}

.glow {
  position: absolute;
  width: 420px;
  max-width: 100%;
  height: 420px;
  border-radius: 50%;
  background: var(--c);
  filter: blur(130px);
  opacity: 0.3;
  pointer-events: none;
}

.visual-find {
  min-height: 420px;
}

.card-calc {
  position: relative;
  width: min(560px, 100%);
  margin-left: auto;
}

.calc {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  height: 62px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-variant-numeric: tabular-nums;
}

.calc.sel {
  border-color: var(--l-selected-border);
}

.calc-expr {
  overflow: hidden;
  color: var(--l-muted);
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calc-eq {
  color: rgb(255 255 255 / 0.4);
  font-size: 18px;
}

.calc-result {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-align: right;
}

.card-clip {
  position: absolute;
  left: 0;
  bottom: 0;
  width: min(360px, 74%);
  border-radius: 20px;
  background-color: rgb(30 30 42 / 0.66);
}

.card-clip .row {
  height: 38px;
}

.card-clip .row-title {
  font-size: 13.5px;
}

.mono {
  font-family: var(--mono);
}

.card-clip .mono {
  font-size: 12.5px;
}

/* Notes window, as in src/renderer/src/notes/notes.css: the list floats on its own pane,
   the word count sits under the title, and the formatting toolbar floats at the bottom. */
.notes {
  position: relative;
  width: min(600px, 100%);
  padding: 0;
  gap: 0;
}

.notes-head {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 48px;
  padding: 0 14px;
  color: var(--l-muted);
}

.notes-head .i {
  width: 16px;
  height: 16px;
}

.notes-heading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  min-width: 0;
  margin: 0 8px;
  white-space: nowrap;
}

.notes-title {
  color: var(--l-ink);
  font-size: 13px;
  font-weight: 600;
}

.notes-subtitle {
  color: var(--l-faint);
  font-size: 11px;
}

.notes-tools {
  display: flex;
  justify-content: flex-end;
  gap: 14px;
}

.notes-body {
  display: grid;
  grid-template-columns: 216px 1fr;
  grid-template-rows: minmax(0, 1fr);
  height: 400px;
}

.notes-side {
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin: 0 0 8px 8px;
  border: 1px solid var(--l-raised-border);
  border-radius: 16px;
  background: var(--l-raised);
  box-shadow: inset 0 1px 0 var(--l-sheen);
}

.notes-find {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  margin: 8px 8px 6px;
  padding: 0 10px;
  border: 1px solid rgb(255 255 255 / 0.1);
  border-radius: 10px;
  background: rgb(255 255 255 / 0.07);
  color: rgb(255 255 255 / 0.45);
  font-size: 13px;
}

.notes-list {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  min-height: 0;
  overflow: hidden;
  padding: 2px 6px 6px;
}

.note {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: 10px;
}

.note b {
  font-size: 13.5px;
  font-weight: 500;
}

.note-meta {
  overflow: hidden;
  color: var(--l-muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.note-preview {
  margin-left: 4px;
  color: var(--l-faint);
}

.notes-foot {
  display: flex;
  align-items: center;
  height: 34px;
  padding: 0 14px;
  border-top: 1px solid var(--l-line);
  color: var(--l-faint);
  font-size: 12px;
}

.notes-editor {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* The note as the editor shows it: Markdown, formatted. */
.notes-text {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: 10px 28px 12px;
  font-size: 15px;
  line-height: 1.6;
}

.n-h1,
.n-h2 {
  margin: 0.7em 0 0.25em;
  font-weight: 650;
  letter-spacing: -0.015em;
  line-height: 1.3;
}

.n-h1 {
  margin-top: 0;
  font-size: 24px;
}

.n-h2 {
  font-size: 19px;
}

.notes-text b {
  font-weight: 650;
}

.n-link {
  color: #a5b1ff;
  text-decoration: underline;
  text-decoration-color: rgb(165 177 255 / 0.45);
  text-underline-offset: 2px;
}

.n-code {
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--l-keycap);
  font-family: var(--mono);
  font-size: 0.88em;
}

.n-quote {
  margin: 0.4em 0;
  padding-left: 14px;
  border-left: 3px solid rgb(255 255 255 / 0.16);
  color: var(--l-muted);
}

.n-pre {
  margin: 0.5em 0 0;
  padding: 10px 14px;
  border: 1px solid var(--l-raised-border);
  border-radius: 10px;
  background: var(--l-raised);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.55;
}

.notes-text .box {
  width: 16px;
  height: 16px;
  margin-top: 4px;
  border-radius: 5px;
}

.notes-text .done .box::after {
  left: 4.5px;
  top: 1.5px;
  width: 3.5px;
  height: 8px;
  border-width: 0 1.75px 1.75px 0;
}

.n-toolbar-wrap {
  display: flex;
  flex: none;
  justify-content: center;
  padding: 0 12px 10px;
}

.n-toolbar {
  display: flex;
  align-items: center;
  gap: 2px;
  max-width: 100%;
  height: 42px;
  overflow: hidden;
  padding: 0 5px;
  border: 1px solid var(--l-raised-border);
  border-radius: 14px;
  background: var(--l-raised);
  box-shadow:
    inset 0 1px 0 var(--l-sheen),
    0 6px 18px rgb(0 0 0 / 0.08);
  color: var(--l-muted);
}

.n-tb {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 32px;
  height: 32px;
  padding: 0 6px;
  border: 1px solid transparent;
  border-radius: 9px;
}

.n-tb .i {
  width: 17px;
  height: 17px;
}

.n-tb-menu {
  padding: 0 5px 0 7px;
}

.n-tb.on {
  border-color: var(--l-selected-border);
  background: var(--l-selected);
  color: var(--l-ink);
}

.n-tb .n-chevron {
  width: 12px;
  height: 12px;
  stroke-width: 2.5;
  opacity: 0.7;
}

.n-divider {
  flex: none;
  width: 1px;
  height: 18px;
  margin: 0 4px;
  background: var(--l-line);
}

.files {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
  font-size: 13px;
}

.file {
  padding: 6px 10px;
  border-radius: 8px;
  background: rgb(255 255 255 / 0.06);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.1);
}

.file-more {
  background: none;
  box-shadow: none;
  color: var(--ink-3);
}

/* The counter rolls 1 → 5 → ∞ when it scrolls into view. */
.counter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
  margin-top: 12px;
}

.counter {
  min-width: 120px;
  height: 120px;
  overflow: hidden;
  font-size: 120px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  line-height: 120px;
  letter-spacing: -0.05em;
}

.counter-track {
  display: flex;
  flex-direction: column;
  transform: translateY(-600px);
}

.count-n {
  height: 120px;
}

.inf {
  color: var(--pink-ink);
}

.js .counter:not(.is-in) .counter-track {
  transform: translateY(0);
}

.js .counter.is-in .counter-track {
  animation: count 2.4s cubic-bezier(0.7, 0, 0.25, 1) 0.3s both;
}

@keyframes count {
  0% {
    transform: translateY(0);
  }

  16% {
    transform: translateY(-120px);
  }

  32% {
    transform: translateY(-240px);
  }

  48% {
    transform: translateY(-360px);
  }

  64% {
    transform: translateY(-480px);
  }

  100% {
    transform: translateY(-600px);
  }
}

.counter-label {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* Extension code */

.visual-extend {
  min-height: 500px;
}

.code {
  position: relative;
  width: min(560px, 100%);
  overflow: hidden;
  border-radius: 16px;
  background: #10111a;
  box-shadow:
    0 30px 80px rgb(0 0 0 / 0.5),
    inset 0 0 0 1px rgb(255 255 255 / 0.1);
}

.code-tabs {
  display: flex;
  gap: 2px;
  padding: 8px 8px 0;
  border-bottom: 1px solid var(--l-line);
  font-family: var(--mono);
  font-size: 12px;
}

.tab {
  padding: 8px 12px;
  color: rgb(255 255 255 / 0.5);
}

.tab.on {
  border-radius: 8px 8px 0 0;
  background: rgb(255 255 255 / 0.06);
  color: rgb(255 255 255 / 0.88);
}

.code pre {
  margin: 0;
  overflow-x: auto;
  padding: 20px 22px 24px;
  color: rgb(255 255 255 / 0.82);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.75;
}

.code .c {
  color: rgb(255 255 255 / 0.42);
}

.code .k {
  color: var(--pink-ink);
}

.code .p {
  color: var(--blue-ink);
}

.code .s {
  color: var(--amber-ink);
}

.card-links {
  position: absolute;
  right: 0;
  bottom: -10px;
  width: min(380px, 80%);
  background-color: rgb(30 30 42 / 0.66);
}

.card-links .row {
  height: 40px;
}

/* Phones: the layered windows stack, so nothing covers the text underneath. */
@media (max-width: 640px) {
  .visual-find,
  .visual-extend {
    min-height: 0;
  }

  .card-clip,
  .card-links {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    width: 100%;
    margin-top: 16px;
  }

  .notes-body {
    grid-template-columns: 1fr;
    height: auto;
  }

  .notes-side {
    display: none;
  }
}

/* ── Included commands ──────────────────────────────────── */

.included {
  position: relative;
  padding: 180px 0 0;
}

.included-glow {
  position: absolute;
  left: 50%;
  top: 58%;
  width: min(760px, 90%);
  height: 300px;
  border-radius: 50%;
  background: var(--amber);
  filter: blur(150px);
  opacity: 0.14;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.included-head {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  max-width: 800px;
  margin: 0 auto 64px;
  padding: 0 24px;
  text-align: center;
}

.included-head .body {
  max-width: 560px;
}

.marquees {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Standing still (no script, or reduced motion), each row wraps and centres. */
.marquee-track {
  display: flex;
  justify-content: center;
  padding: 0 24px;
}

.marquee-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Moving: main.js repeats each row so it can slide forever, fading out at the edges. */
.marquee.is-moving {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.is-moving .marquee-track {
  justify-content: flex-start;
  width: max-content;
  padding: 0;
  animation: marquee var(--duration, 60s) linear infinite;
}

.marquee-reverse.is-moving .marquee-track {
  animation-direction: reverse;
}

.is-moving .marquee-list {
  flex-wrap: nowrap;
  padding-right: 14px;
}

.marquee.is-moving:hover .marquee-track {
  animation-play-state: paused;
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

.chip {
  display: flex;
  flex: none;
  align-items: center;
  gap: 12px;
  height: 60px;
  padding: 0 22px 0 12px;
  border-radius: 18px;
  background: rgb(255 255 255 / 0.045);
  box-shadow:
    inset 0 0 0 1px rgb(255 255 255 / 0.1),
    inset 0 1px 0 rgb(255 255 255 / 0.06);
  white-space: nowrap;
}

.marquee-reverse .chip {
  background: rgb(255 255 255 / 0.03);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.08);
}

.chip .tile {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.chip .tile .i {
  width: 19px;
  height: 19px;
  stroke-width: 2.2;
}

.chip-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  text-align: left;
}

.chip-title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.chip-from {
  color: var(--ink-3);
  font-size: 12.5px;
}

.included-cta {
  position: relative;
  margin-top: 56px;
  padding: 0 24px;
}

.btn-amber {
  background: var(--amber);
  color: #1a1305;
}

.btn-amber:hover {
  background: var(--amber-ink);
  color: #1a1305;
  transform: translateY(-1px);
}

@media (max-width: 640px) {
  .included {
    padding-top: 140px;
  }

  .marquee.is-moving {
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  }

  .marquees,
  .marquee-list {
    gap: 10px;
  }

  .is-moving .marquee-list {
    padding-right: 10px;
  }

  .chip {
    gap: 10px;
    height: 52px;
    padding: 0 16px 0 10px;
    border-radius: 15px;
  }

  .chip .tile {
    width: 30px;
    height: 30px;
    border-radius: 9px;
  }

  .chip .tile .i {
    width: 16px;
    height: 16px;
  }

  .chip-title {
    font-size: 14.5px;
  }

  .chip-from {
    font-size: 12px;
  }
}

/* ── Open source ────────────────────────────────────────── */

.source {
  padding: 200px 24px 0;
}

.roadmap {
  padding: 28px 28px 12px;
  border-radius: 20px;
  background: rgb(255 255 255 / 0.03);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.1);
}

.roadmap h3 {
  margin-bottom: 8px;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 600;
}

.roadmap ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.roadmap li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 0;
  border-bottom: 1px solid rgb(255 255 255 / 0.07);
  font-size: 16px;
}

.roadmap li:last-child {
  border-bottom: 0;
}

.roadmap li::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c);
}

/* ── Download ───────────────────────────────────────────── */

.finale {
  position: relative;
  padding: 200px 24px 140px;
  text-align: center;
}

.finale-glow {
  position: absolute;
  left: 50%;
  top: 46%;
  width: min(900px, 100%);
  height: 360px;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.finale-orb {
  position: absolute;
  top: 0;
  width: 360px;
  max-width: 60%;
  height: 360px;
  border-radius: 50%;
  background: var(--c);
  filter: blur(130px);
  opacity: 0.26;
}

.finale-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

.big-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  width: 196px;
  height: 80px;
  border-radius: 40px;
  background: rgb(22 23 36 / 0.9);
  box-shadow: inset 0 0 0 6px #fff;
}

.big-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--blue);
  animation: hop 2.4s cubic-bezier(0.3, 0, 0.3, 1) infinite both;
}

.big-dot:nth-child(2) {
  background: var(--pink);
  animation-delay: 0.14s;
}

.big-dot:nth-child(3) {
  background: var(--amber);
  animation-delay: 0.28s;
}

.finale-title {
  font-size: clamp(48px, 7vw, 96px);
  line-height: 1;
  letter-spacing: -0.05em;
}

.finale .btn-light {
  box-shadow: 0 10px 40px rgb(236 91 155 / 0.3);
}

.alt-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 24px;
  font-size: 14px;
}

.alt-links a {
  padding: 12px 0;
  text-decoration: none;
}

.fine {
  max-width: 440px;
  color: var(--ink-3);
  font-size: 13px;
}

/* ── Footer ─────────────────────────────────────────────── */

.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: 1248px;
  margin: 0 auto;
  padding: 28px 24px 40px;
  border-top: 1px solid rgb(255 255 255 / 0.07);
  color: var(--ink-3);
  font-size: 13px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}

.footer nav a {
  color: var(--ink-2);
  text-decoration: none;
}

.footer nav a:hover {
  color: var(--ink);
}

/* ── Scroll reveals (only when JavaScript can undo them) ── */

.js .reveal {
  opacity: 0;
  filter: blur(10px);
  transform: translateY(28px);
  transition:
    opacity 0.9s var(--ease-out) var(--d, 0s),
    filter 0.9s var(--ease-out) var(--d, 0s),
    transform 0.9s var(--ease-out) var(--d, 0s);
}

.js .reveal.is-in {
  opacity: 1;
  filter: none;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    /* biome-ignore lint/complexity/noImportantStyles: must beat every animation on the page */
    animation: none !important;
    /* biome-ignore lint/complexity/noImportantStyles: must beat every transition on the page */
    transition: none !important;
  }

  .js .reveal {
    opacity: 1;
    filter: none;
    transform: none;
  }

  .js .counter:not(.is-in) .counter-track {
    transform: translateY(-600px);
  }
}
