/* Tilelume website. Plain CSS, no build step, no web font. Dark only, by design.
   The palette follows the app (app/Design/BRAND.md §3): warm glass, warm white
   text and coral as the "lit tile". Controls are filled surfaces, never
   hairline boxes. Motion explains cause and effect; nothing loops. */

/* ---------- Tokens ---------- */
:root {
  color-scheme: dark;

  --bg: #07060d;
  --bg-raise: #0d0b19;
  --surface: rgba(226, 222, 255, 0.045);
  --surface-2: rgba(226, 222, 255, 0.07);
  --surface-3: rgba(226, 222, 255, 0.11);

  --text: #f3f1ff;
  --text-2: rgba(240, 238, 255, 0.68);
  --text-3: rgba(240, 238, 255, 0.46);

  /* Coral, from AccentChoice.coral: fill sits behind white text, tint is for
     coral text on dark, top is the light end of the lit-tile gradient. */
  --accent: #a49bff;
  --accent-fill: #6d5ff5;
  --accent-top: #8f80ff;
  --accent-wash: rgba(109, 95, 245, 0.2);
  --accent-stroke: rgba(143, 128, 255, 0.7);

  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Segoe UI", system-ui, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 32px);
  --r-lg: 28px;
  --r-md: 18px;
  --r-sm: 10px;

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --spring: cubic-bezier(0.32, 1.25, 0.5, 1);
  --spring-t: 0.42s;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  min-height: 100vh;
  overflow-x: clip;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 650; text-wrap: balance; }
p { text-wrap: pretty; }
.nowrap { white-space: nowrap; }

kbd {
  display: inline-block;
  min-width: 1.6em;
  padding: 0.08em 0.42em;
  border-radius: 6px;
  background: var(--surface-3);
  box-shadow: inset 0 1px 0 rgba(226, 222, 255, 0.08), 0 1px 0 rgba(0, 0, 0, 0.35);
  color: var(--text);
  font: 500 0.86em/1.5 var(--sans);
  font-variant-numeric: tabular-nums;
  text-align: center;
  white-space: nowrap;
}
code {
  padding: 0.1em 0.35em;
  border-radius: 6px;
  background: var(--surface-2);
  font: 0.88em var(--mono);
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  left: 16px; top: 12px;
  z-index: 200;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; }

/* Focus rings only for keyboard navigation (site.js sets data-modality). Thin, with an offset. */
:focus { outline: none; }
html[data-modality="keyboard"] :focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 3px;
}
html:not([data-modality]) :focus-visible { outline: 1px solid var(--accent); outline-offset: 3px; }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Buttons ---------- */
.btn {
  --h: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: var(--h);
  padding: 0 20px;
  border: 0;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), transform 0.2s var(--spring), filter 0.2s var(--ease);
}
.btn:active { transform: scale(0.97); }
.btn-sm { --h: 36px; padding: 0 14px; border-radius: 11px; font-size: 14px; }
.btn-lg { --h: 56px; padding: 0 26px; border-radius: 16px; font-size: 16px; }

/* BRAND.md "selected": the coral gradient with a 25% white top inner highlight. */
.btn-primary {
  color: #fff;
  background: linear-gradient(180deg, #7d70ff, var(--accent-fill));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 8px 24px -10px rgba(109, 95, 245, 0.7);
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-price { font-variant-numeric: tabular-nums; opacity: 0.82; font-weight: 500; }
.btn-quiet { color: var(--text); background: var(--surface-2); }
.btn-quiet:hover { background: var(--surface-3); }

.text-link, .inline-link { color: var(--accent); font-weight: 500; }
.text-link { display: inline-flex; align-items: center; gap: 6px; }
.text-link svg { width: 16px; height: 16px; transition: transform 0.25s var(--spring); }
.text-link:hover svg { transform: translateX(3px); }
.inline-link:hover, .text-link:hover { color: var(--accent-top); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
}
/* No bar at the top of the page: the sky runs right up to the edge. Once the page
   scrolls, a blur fades in behind the nav and feathers out instead of ending in a line. */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0 0 -28px;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(7, 6, 13, 0.82), rgba(7, 6, 13, 0.5) 70%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent);
  mask-image: linear-gradient(180deg, #000 55%, transparent);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}
.site-header.is-scrolled::before { opacity: 1; }
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 64px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 650; font-size: 16px; letter-spacing: -0.01em; }
.brand img { border-radius: 7px; }
.nav-links { display: flex; gap: 4px; }
.nav-links a {
  padding: 7px 12px;
  border-radius: 9px;
  color: var(--text-2);
  font-size: 14px;
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.nav-links a:hover { color: var(--text); background: var(--surface); }

/* ---------- Hero ---------- */
.hero { padding-top: clamp(40px, 6vw, 72px); }
.hero-top {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr);
  align-items: end;
  gap: clamp(28px, 5vw, 72px);
}
.hero h1 {
  font-size: clamp(44px, 6.6vw, 90px);
  line-height: 0.96;
  letter-spacing: -0.048em;
  font-weight: 680;
}
/* The full stop is a lit tile. */
.tile-stop {
  display: inline-block;
  width: 0.17em;
  height: 0.17em;
  margin-left: 0.05em;
  border-radius: 0.045em;
  background: linear-gradient(180deg, var(--accent-top), var(--accent-fill));
  box-shadow: inset 0 0.012em 0 rgba(255, 255, 255, 0.35);
}
.hero-side { display: grid; gap: 22px; justify-items: start; padding-bottom: 6px; }
.lede { color: var(--text-2); font-size: clamp(17px, 1.5vw, 19px); line-height: 1.5; max-width: 30em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; }
.fine { color: var(--text-3); font-size: 13px; }

/* ---------- Demo: a small Mac desktop ---------- */
.demo { margin-top: clamp(36px, 5vw, 56px); }
.js .demo { animation: rise 0.9s var(--ease) 0.1s both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

.display {
  padding: clamp(5px, 0.6vw, 8px);
  border-radius: clamp(16px, 1.9vw, 24px);
  background: linear-gradient(180deg, #1a1733, #0c0b18 40%);
  box-shadow:
    inset 0 1px 0 rgba(226, 222, 255, 0.1),
    inset 0 0 0 1px rgba(226, 222, 255, 0.04),
    0 60px 120px -40px rgba(0, 0, 0, 0.9),
    0 30px 120px -30px rgba(109, 95, 245, 0.55);
}
.screen {
  container-type: inline-size;
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: calc(clamp(16px, 1.9vw, 24px) - clamp(5px, 0.6vw, 8px));
  /* A violet dusk wallpaper: soft light from the top left, a rose glow low right. */
  background:
    radial-gradient(55% 75% at 14% 4%, rgba(160, 140, 255, 0.7), transparent 62%),
    radial-gradient(50% 65% at 92% 18%, rgba(86, 66, 230, 0.6), transparent 66%),
    radial-gradient(65% 70% at 84% 112%, rgba(240, 140, 196, 0.6), transparent 62%),
    radial-gradient(60% 60% at 12% 112%, rgba(58, 38, 190, 0.85), transparent 70%),
    linear-gradient(160deg, #2c2474, #1b1652 55%, #2c1d58);
  user-select: none;
  -webkit-user-select: none;
}
/* Soft dunes of light across the wallpaper. */
.screen::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(130% 70% at 30% 125%, transparent 58%, rgba(255, 255, 255, 0.07) 61%, transparent 68%),
    radial-gradient(120% 80% at 85% 140%, transparent 60%, rgba(255, 220, 240, 0.06) 63%, transparent 70%),
    radial-gradient(140% 90% at 0% -40%, transparent 62%, rgba(200, 190, 255, 0.06) 65%, transparent 72%);
}
.menubar {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: max(2.2cqw, 13px);
  padding: 0 1.4cqw;
  background: rgba(14, 10, 40, 0.32);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
  color: rgba(255, 255, 255, 0.86);
  font-size: max(1cqw, 6px);
  font-weight: 600;
}
.mb-left, .mb-right { display: flex; align-items: center; gap: 1.3cqw; }
.mb-left b, .mb-left i, .mb-right > i { display: block; height: max(0.55cqw, 3px); border-radius: 1cqw; }
.mb-left b { width: 3.2cqw; background: rgba(255, 255, 255, 0.85); }
.mb-left i { width: 2.4cqw; background: rgba(255, 255, 255, 0.4); }
.mb-left i:nth-child(3) { width: 1.8cqw; }
.mb-right > i { width: 1.6cqw; background: rgba(255, 255, 255, 0.5); }
.mb-mark { width: max(1.4cqw, 9px); height: max(1.4cqw, 9px); color: #fff; transition: color 0.2s; }
.mb-mark.is-active { color: var(--accent-top); }
.mb-time { font-variant-numeric: tabular-nums; }

.desk {
  position: absolute;
  inset: max(2.2cqw, 13px) 0 0;
  --g: max(0.85cqw, 4px);
  --r: max(1cqw, 6px);
}
/* Windows and the snap preview share one geometry: a unit rect mapped into
   the desk with even gaps (BRAND.md §2: gaps are always even). */
.win, .snap-preview {
  position: absolute;
  left: calc(var(--g) + var(--x) * (100% - var(--g)));
  top: calc(var(--g) + var(--y) * (100% - var(--g)));
  width: calc(var(--w) * (100% - var(--g)) - var(--g));
  height: calc(var(--h) * (100% - var(--g)) - var(--g));
  border-radius: var(--r);
}
.win {
  z-index: var(--z, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(34, 30, 60, 0.97), rgba(24, 21, 44, 0.97));
  box-shadow:
    inset 0 0 0 1px rgba(226, 222, 255, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0.8cqw 2.4cqw -0.6cqw rgba(6, 4, 24, 0.6);
  transition:
    left var(--spring-t) var(--spring), top var(--spring-t) var(--spring),
    width var(--spring-t) var(--spring), height var(--spring-t) var(--spring),
    box-shadow 0.25s var(--ease);
}
.win.is-front {
  box-shadow:
    inset 0 0 0 1px rgba(226, 222, 255, 0.11),
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 2.2cqw 5cqw -1cqw rgba(6, 4, 24, 0.8),
    0 0 4cqw -1cqw rgba(109, 95, 245, 0.35);
}
.win.is-dragging, .demo.is-instant .win { transition: box-shadow 0.25s var(--ease); }
.win.is-scripted { transition-duration: 0.75s; transition-timing-function: cubic-bezier(0.45, 0, 0.25, 1); }

.win-bar {
  position: relative;
  flex: none;
  display: flex;
  align-items: center;
  height: max(2.4cqw, 14px);
  padding: 0 0.9cqw;
  background: rgba(226, 222, 255, 0.035);
  cursor: grab;
  touch-action: none;
  outline: none;
}
.win.is-dragging .win-bar { cursor: grabbing; }
html[data-modality="keyboard"] .win-bar:focus-visible { outline: none; box-shadow: inset 0 0 0 1px var(--accent); }
.lights { display: flex; gap: 0.5cqw; }
.lights i { display: block; width: max(0.85cqw, 5px); height: max(0.85cqw, 5px); border-radius: 50%; background: rgba(255, 255, 255, 0.18); }
.win.is-front .lights i:nth-child(1) { background: #ff5f57; }
.win.is-front .lights i:nth-child(2) { background: #febc2e; }
.win.is-front .lights i:nth-child(3) { background: #28c840; }
.win.is-front .win-bar { background: rgba(226, 222, 255, 0.06); }
.win-title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.45);
  font-size: max(0.95cqw, 6px);
  font-weight: 600;
}
.win.is-front .win-title { color: rgba(255, 255, 255, 0.85); }
.win-url {
  position: absolute;
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38%;
  height: 62%;
  border-radius: 0.6cqw;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.55);
  font-size: max(0.85cqw, 5px);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  transform: translateX(-50%);
}
.win.is-front .win-url { color: rgba(255, 255, 255, 0.8); }
.win-body { flex: 1; min-height: 0; overflow: hidden; }

.sk { display: block; width: var(--l); height: max(0.5cqw, 2px); margin-top: 0.75cqw; border-radius: 1cqw; background: rgba(226, 222, 255, 0.12); }
.sk-h { height: max(0.9cqw, 4px); margin-top: 0; background: rgba(226, 222, 255, 0.55); }
.sk-gap { margin-top: 1.6cqw; }

.browser { padding: 1.2cqw 1.4cqw; }
.b-hero {
  position: relative;
  height: 36%;
  margin-bottom: 1.2cqw;
  border-radius: 0.7cqw;
  overflow: hidden;
  background:
    radial-gradient(80% 120% at 0% 0%, rgba(160, 145, 255, 0.95), transparent 60%),
    radial-gradient(70% 110% at 100% 100%, rgba(240, 146, 190, 0.75), transparent 60%),
    #3d3194;
}
.b-tile { position: absolute; border-radius: 0.45cqw; background: rgba(255, 255, 255, 0.24); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4); }
.b-t1 { left: 8%; top: 18%; width: 30%; height: 64%; background: rgba(255, 255, 255, 0.88); }
.b-t2 { left: 41%; top: 18%; width: 22%; height: 30%; }
.b-t3 { left: 41%; top: 52%; width: 22%; height: 30%; }
.b-kicker { color: var(--accent); font-size: max(0.75cqw, 5px); font-weight: 650; letter-spacing: 0.06em; text-transform: uppercase; }
.b-title { margin: 0.3cqw 0 0.2cqw; color: #fff; font: 650 max(1.5cqw, 8px)/1.15 var(--display); letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.b-cards { display: flex; gap: 0.8cqw; margin-top: 1.4cqw; height: 16%; }
.b-cards span { flex: 1; border-radius: 0.6cqw; background: rgba(226, 222, 255, 0.06); }

.notes { display: flex; font-size: max(0.9cqw, 5px); }
.n-side { flex: 0 0 32%; margin: 0; padding: 0.8cqw 0.6cqw; list-style: none; background: rgba(226, 222, 255, 0.03); }
.n-side li { display: grid; gap: 0.15cqw; padding: 0.55cqw 0.7cqw; border-radius: 0.5cqw; white-space: nowrap; overflow: hidden; }
.n-side b { color: rgba(255, 255, 255, 0.85); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.n-side span { color: rgba(255, 255, 255, 0.4); font-size: 0.85em; }
.n-side li.on { background: rgba(109, 95, 245, 0.32); }
.win.is-front .n-side li.on { background: linear-gradient(180deg, var(--accent-top), var(--accent-fill)); }
.win.is-front .n-side li.on span { color: rgba(255, 255, 255, 0.7); }
.n-main { flex: 1; min-width: 0; padding: 1.3cqw 1.6cqw; color: rgba(255, 255, 255, 0.72); white-space: nowrap; overflow: hidden; }
.n-main p { position: relative; padding-left: 1.5cqw; margin-top: 0.55cqw; overflow: hidden; text-overflow: ellipsis; }
.n-main p::before { content: ""; position: absolute; left: 0; top: 0.2em; width: 0.9em; height: 0.9em; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3); }
.n-main p.n-done { color: rgba(255, 255, 255, 0.4); text-decoration: line-through; }
.n-main p.n-done::before { background: var(--accent-fill); box-shadow: none; }
.n-main .n-title { padding: 0; margin: 0 0 0.9cqw; color: #fff; font: 650 max(1.4cqw, 8px)/1.15 var(--display); letter-spacing: -0.02em; text-decoration: none; }
.n-main .n-title::before { display: none; }

.term {
  padding: 1cqw 1.2cqw;
  background: rgba(10, 8, 22, 0.7);
  color: #dcd8f0;
  font: 500 max(0.9cqw, 5px)/1.7 var(--mono);
  white-space: nowrap;
}
.term p { overflow: hidden; text-overflow: clip; }
.t-p { color: var(--accent); }
.t-dim { color: rgba(220, 216, 240, 0.45); }
.t-ok { color: #8be0b0; }
.t-caret { display: inline-block; width: 0.55em; height: 1.1em; vertical-align: -0.2em; background: #dcd8f0; animation: caret 1.1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }

/* Tilelume's snap preview: accentWash fill, accentStroke edge (BRAND.md §3). */
.snap-preview {
  z-index: 40;
  background: rgba(109, 95, 245, 0.28);
  box-shadow: inset 0 0 0 max(0.16cqw, 1.5px) var(--accent-stroke);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  transform: scale(0.985);
  pointer-events: none;
  transition:
    opacity 0.12s ease-out, transform 0.12s ease-out,
    left 0.3s var(--spring), top 0.3s var(--spring), width 0.3s var(--spring), height 0.3s var(--spring);
}
.snap-preview.is-on { opacity: 1; transform: none; }
.snap-preview.is-fresh { transition: opacity 0.12s ease-out, transform 0.12s ease-out; }

.toast {
  position: absolute;
  left: 50%;
  bottom: 2.4cqw;
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 0.9cqw;
  max-width: 92%;
  padding: 0.7cqw 1.3cqw 0.7cqw 0.8cqw;
  border-radius: 1.2cqw;
  background: rgba(24, 22, 44, 0.78);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
  box-shadow: 0 1cqw 3cqw rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: max(1.15cqw, 8px);
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, 6px);
  transition: opacity 0.18s ease-out, transform 0.18s ease-out;
  pointer-events: none;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.toast:empty { display: none; }
.toast-keys { display: flex; gap: 0.3cqw; }
.toast kbd { min-width: 1.9cqw; padding: 0.15cqw 0.45cqw; border-radius: 0.45cqw; font-size: max(1cqw, 7px); background: rgba(255, 255, 255, 0.12); box-shadow: none; }
.toast-text { overflow: hidden; text-overflow: ellipsis; }

.cursor {
  position: absolute;
  z-index: 90;
  left: calc(var(--cx, 60) * 1%);
  top: calc(var(--cy, 90) * 1%);
  width: max(2cqw, 12px);
  height: max(2cqw, 12px);
  margin: -0.3cqw 0 0 -0.4cqw;
  opacity: 0;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.4));
  transition: left 0.75s cubic-bezier(0.45, 0, 0.25, 1), top 0.75s cubic-bezier(0.45, 0, 0.25, 1), opacity 0.3s, transform 0.12s;
  pointer-events: none;
}
.cursor.is-on { opacity: 1; }
.cursor.is-down { transform: scale(0.88); }

/* The snap palette, as in the app: every layout with one key. */
.palette {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 85;
  width: min(86%, 64cqw);
  padding: 1.5cqw 1.6cqw 1.2cqw;
  border-radius: 1.6cqw;
  background: rgba(30, 27, 58, 0.72);
  -webkit-backdrop-filter: blur(22px) saturate(1.5);
  backdrop-filter: blur(22px) saturate(1.5);
  box-shadow: inset 0 1px 0 rgba(226, 222, 255, 0.1), 0 2cqw 6cqw rgba(0, 0, 0, 0.5);
  transform: translate(-50%, -50%) scale(0.985);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.12s ease-out, transform 0.12s ease-out, visibility 0s 0.12s;
}
.palette.is-on { opacity: 1; visibility: visible; transform: translate(-50%, -50%); transition-delay: 0s; }
.pal-head { display: flex; align-items: center; gap: 0.8cqw; margin-bottom: 1.1cqw; color: #fff; font-size: max(1.2cqw, 8px); font-weight: 600; }
.pal-head img { width: max(1.9cqw, 12px); height: max(1.9cqw, 12px); border-radius: 0.4cqw; }
.pal-group { display: grid; grid-template-columns: max(9cqw, 46px) 1fr; align-items: start; gap: 1cqw; margin-bottom: 0.9cqw; }
.pal-label { padding-top: 0.5cqw; color: rgba(255, 255, 255, 0.6); font-size: max(0.95cqw, 7px); font-weight: 600; }
.pal-row { display: flex; flex-wrap: wrap; gap: 0.7cqw; }
.pal-tile { display: grid; justify-items: center; gap: 0.4cqw; padding: 0; border: 0; background: none; cursor: pointer; outline: none; }
.pal-tile .glyph { width: max(5.4cqw, 30px); pointer-events: none; }
.pal-tile kbd { min-width: max(1.8cqw, 12px); padding: 0 0.3cqw; border-radius: 0.4cqw; font-size: max(0.9cqw, 7px); box-shadow: none; }
.pal-tile:hover .glyph, .pal-tile:focus-visible .glyph { --lit: rgba(109, 95, 245, 0.8); }
.pal-tile:focus-visible kbd { background: var(--accent-fill); }
.pal-foot { display: flex; gap: 0.8cqw; margin-top: 0.4cqw; color: rgba(255, 255, 255, 0.55); font-size: max(0.95cqw, 7px); }
.pal-foot strong { color: #fff; }

/* The strip under the screen: keycaps that work as buttons, and a live status. */
.try { display: grid; justify-items: center; gap: 14px; margin-top: 24px; text-align: center; }
.try-status { display: flex; align-items: center; gap: 10px; color: var(--text-2); font-size: 14px; }
.try-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); transition: background-color 0.25s var(--ease), box-shadow 0.25s var(--ease); }
.demo.is-armed .try-dot { background: var(--accent-top); box-shadow: 0 0 0 4px rgba(143, 128, 255, 0.16), 0 0 12px rgba(143, 128, 255, 0.9); }
.demo.is-armed .try-status { color: var(--text); }
.keys { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; padding: 6px; border-radius: 20px; background: rgba(226, 222, 255, 0.04); }
.key {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 44px;
  padding: 0 14px 0 7px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}
.key kbd {
  display: grid;
  place-items: center;
  min-width: 30px;
  height: 30px;
  padding: 0 7px;
  border-radius: 9px;
  background: linear-gradient(180deg, #2d2955, #1e1b3c);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.13), 0 2px 0 #0b0a1a, 0 4px 10px -2px rgba(0, 0, 0, 0.6);
  color: #fff;
  font: 600 13px/1 var(--sans);
  transition: transform 0.12s var(--ease), box-shadow 0.12s var(--ease), background 0.2s var(--ease);
}
.key:hover { color: var(--text); background: var(--surface-2); }
.key:active kbd, .key.is-pressed kbd { transform: translateY(2px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 0 0 #0b0a1a, 0 0 18px rgba(143, 128, 255, 0.55); }
.key.is-pressed { color: var(--text); }
.key.is-pressed kbd { background: linear-gradient(180deg, var(--accent-top), var(--accent-fill)); }
.try-note { color: var(--text-3); font-size: 13px; }
@media (hover: none) { .try-dot { display: none; } }
.try-note kbd { margin: 0 1px; font-size: 12px; }

/* ---------- Facts ---------- */
/* Four tiles, each with a small picture of what the number means. */
.facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: clamp(40px, 5vw, 64px);
}
.fact {
  position: relative;
  display: grid;
  align-content: end;
  gap: 2px;
  min-height: 188px;
  padding: 20px 22px 22px;
  border-radius: var(--r-md);
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(109, 95, 245, 0.2), transparent 60%),
    linear-gradient(180deg, rgba(226, 222, 255, 0.06), rgba(226, 222, 255, 0.025));
  box-shadow: inset 0 1px 0 rgba(226, 222, 255, 0.08);
  transition: transform 0.35s var(--spring);
}
.fact:hover { transform: translateY(-2px); }
.fact strong {
  font: 650 clamp(32px, 3.4vw, 44px)/1.05 var(--display);
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #fff 30%, #c9c1ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.fact > span { color: var(--text-3); font-size: 14px; }
.fact-art { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 6px; height: 64px; margin-bottom: 14px; }

/* $2.99: once, not monthly. */
.fp { padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.2; }
.fp.on { color: #fff; background: linear-gradient(180deg, var(--accent-top), var(--accent-fill)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 6px 18px -6px rgba(109, 95, 245, 0.8); }
.fp.off { color: var(--text-3); background: var(--surface-2); text-decoration: line-through; text-decoration-color: rgba(240, 238, 255, 0.35); }

/* 39: a little wall of layouts, one lit. */
.fact-glyphs { display: grid; grid-template-columns: repeat(4, 44px); gap: 6px; }
.fg { position: relative; height: 28px; border-radius: 6px; background: rgba(226, 222, 255, 0.07); }
.fg i {
  position: absolute;
  left: calc(3px + var(--x) * (100% - 5px));
  top: calc(3px + var(--y) * (100% - 5px));
  width: calc(var(--w) * (100% - 5px) - 1px);
  height: calc(var(--h) * (100% - 5px) - 1px);
  border-radius: 3px;
  background: rgba(226, 222, 255, 0.3);
}
.fg.on { background: var(--accent-wash); }
.fg.on i { background: linear-gradient(180deg, var(--accent-top), var(--accent-fill)); box-shadow: 0 0 12px rgba(143, 128, 255, 0.6); }

/* 100: a stack of moves to step back through. */
.fact-undo { position: relative; display: block; }
.fact-undo i { position: absolute; left: calc(var(--n) * 10px); top: calc(var(--n) * 7px); width: calc(100% - 82px); max-width: 150px; height: 26px; border-radius: 7px; background: rgba(226, 222, 255, calc(0.16 - var(--n) * 0.03)); }
.fact-undo i:nth-child(1) { --n: 4; } .fact-undo i:nth-child(2) { --n: 3; } .fact-undo i:nth-child(3) { --n: 2; } .fact-undo i:nth-child(4) { --n: 1; }
.fact-undo i:nth-child(5) { --n: 0; background: var(--accent-wash); box-shadow: inset 0 1px 0 rgba(226, 222, 255, 0.1); }
.fact-undo b { position: absolute; right: 0; top: 0; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; color: #fff; font-size: 15px; background: linear-gradient(180deg, var(--accent-top), var(--accent-fill)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28); }

/* 10: the languages. */
.fact-langs span { padding: 3px 8px; border-radius: 7px; color: var(--text-2); font-size: 12px; font-weight: 600; background: var(--surface-2); }
.fact-langs span:first-child { color: #fff; background: var(--accent-wash); }

/* ---------- Sections ---------- */
.section { padding-top: clamp(96px, 12vw, 160px); }
.section-head { display: grid; gap: 14px; max-width: 760px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head > p:not(.kicker) { color: var(--text-2); font-size: clamp(16px, 1.4vw, 18px); max-width: 38em; }
.section-head .text-link { margin-top: 4px; }
.kicker { color: var(--accent); font-size: 14px; font-weight: 600; letter-spacing: -0.005em; }
.section h2, .pricing h2 { font-size: clamp(34px, 4.6vw, 58px); line-height: 1.02; letter-spacing: -0.042em; }

/* A tile: one filled surface. Nested parts use concentric radii (outer − padding). */
.tile {
  --pad: clamp(20px, 2.4vw, 28px);
  position: relative;
  overflow: hidden;
  border-radius: var(--r-lg);
  background: var(--surface);
}
.tile-text { display: grid; gap: 8px; padding: var(--pad); }
.tile-text h3 { font-size: clamp(20px, 1.8vw, 24px); line-height: 1.15; letter-spacing: -0.025em; }
.tile-text p:not(.kicker) { color: var(--text-2); font-size: 15px; }

.shot img { width: 100%; }

/* ---------- How it works: arranged as Left two thirds + two quarters ---------- */
.ways {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 12px;
}
.way { display: flex; flex-direction: column; }
.way-drag { grid-row: span 2; }
.way .shot {
  flex: 1;
  min-height: 0;
  margin: 0 var(--pad) var(--pad);
  overflow: hidden;
  border-radius: calc(var(--r-lg) - var(--pad) + 6px);
}
.way .shot img { height: 100%; object-fit: cover; }
.way-drag .shot img { object-position: 50% 50%; }
.shot-top img { object-position: 50% 0; }
/* Small app panels show whole, never larger than their real 2× pixels, on the same dusk wallpaper they were captured on. */
.shot-fit {
  display: grid;
  place-items: center;
  flex: 1;
  padding: clamp(16px, 2.4vw, 28px);
  background:
    radial-gradient(70% 90% at 10% 0%, rgba(120, 100, 230, 0.55), transparent 65%),
    radial-gradient(60% 80% at 100% 100%, rgba(220, 150, 170, 0.45), transparent 65%),
    #3a3470;
}
.way .shot-fit img { width: 100%; max-width: 584px; height: auto; object-fit: contain; filter: drop-shadow(0 14px 28px rgba(14, 8, 40, 0.45)); }
.way .shot-small img { max-width: min(100%, 292px); }
.aside-note { display: flex; align-items: center; gap: 10px; margin-top: 16px; color: var(--text-3); font-size: 13px; }
.mini-glyph { position: relative; flex: none; width: 26px; height: 17px; border-radius: 4px; background: var(--surface-2); }
.mini-glyph i {
  position: absolute;
  left: calc(2px + var(--x) * (100% - 3px));
  top: calc(2px + var(--y) * (100% - 3px));
  width: calc(var(--w) * (100% - 3px) - 1px);
  height: calc(var(--h) * (100% - 3px) - 1px);
  border-radius: 1.5px;
  background: rgba(226, 222, 255, 0.3);
}
.mini-glyph i:first-child { background: var(--accent); }

/* ---------- Layouts ---------- */
.layouts {
  display: grid;
  grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 40px);
  align-items: start;
}
.preview {
  position: sticky;
  top: 96px;
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 24px 24px 22px;
  border-radius: var(--r-lg);
  background: var(--surface);
  text-align: center;
}
/* A big layout glyph that morphs between layouts. */
.preview-screen {
  --pi: 10px;
  --pg: 8px;
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  margin-bottom: 8px;
  border-radius: calc(var(--r-lg) - 24px + 6px);
  background:
    radial-gradient(70% 90% at 90% 110%, rgba(240, 146, 170, 0.22), transparent 62%), radial-gradient(80% 80% at 10% 0%, rgba(132, 112, 255, 0.3), transparent 60%),
    linear-gradient(170deg, #1b1838, #2b2658);
}
.preview-screen b {
  position: absolute;
  left: calc(var(--pi) + var(--x) * (100% - 2 * var(--pi) + var(--pg)));
  top: calc(var(--pi) + var(--y) * (100% - 2 * var(--pi) + var(--pg)));
  width: calc(var(--w) * (100% - 2 * var(--pi) + var(--pg)) - var(--pg));
  height: calc(var(--h) * (100% - 2 * var(--pi) + var(--pg)) - var(--pg));
  border-radius: 8px;
  background: linear-gradient(180deg, var(--accent-top), var(--accent-fill));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 10px 30px -12px rgba(109, 95, 245, 0.8);
  transition: left 0.45s var(--spring), top 0.45s var(--spring), width 0.45s var(--spring), height 0.45s var(--spring);
}
.preview-name { font: 650 22px/1.2 var(--display); letter-spacing: -0.02em; }
.preview-keys { min-height: 30px; color: var(--text-3); font-size: 14px; }
.preview-keys kbd { font-size: 14px; padding: 0.25em 0.6em; }

.wall { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 28px; }
.wall-label { margin-bottom: 10px; color: var(--text-2); font-size: 14px; font-weight: 600; }
.wall-label span { margin-left: 4px; color: var(--text-3); font-weight: 500; font-variant-numeric: tabular-nums; }
.wall-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }

/* Layout glyph (BRAND.md §2): screen 16:10, an inset, even gaps, the target tile lit. */
.glyph {
  --lit: rgba(226, 222, 255, 0.28);
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: var(--surface-2);
  cursor: pointer;
  container-type: inline-size;
  transition: background-color 0.25s var(--ease), transform 0.2s var(--spring);
}
.glyph b, .glyph i {
  --gi: 4.4cqi;
  --gg: 3.8cqi;
  position: absolute;
  left: calc(var(--gi) + var(--x) * (100% - 2 * var(--gi) + var(--gg)));
  top: calc(var(--gi) + var(--y) * (100% - 2 * var(--gi) + var(--gg)));
  width: calc(var(--w) * (100% - 2 * var(--gi) + var(--gg)) - var(--gg));
  height: calc(var(--h) * (100% - 2 * var(--gi) + var(--gg)) - var(--gg));
  border-radius: 4px;
}
.glyph i { background: rgba(226, 222, 255, 0.06); }
.glyph b { background: var(--lit); transition: background-color 0.25s var(--ease); }
.glyph:hover { --lit: rgba(143, 128, 255, 0.75); background: var(--surface-3); }
.glyph:active { transform: scale(0.97); }
.glyph[aria-pressed="true"] { background: var(--accent-wash); }
.glyph[aria-pressed="true"] b { background: linear-gradient(180deg, var(--accent-top), var(--accent-fill)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25); }

.custom {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(24px, 4vw, 56px);
  margin-top: 12px;
  padding: clamp(24px, 4vw, 48px);
}
.custom-text { display: grid; gap: 16px; justify-items: start; }
.custom-text h3 { font-size: clamp(26px, 2.8vw, 34px); line-height: 1.1; letter-spacing: -0.032em; }
.custom-text > p:not(.kicker) { color: var(--text-2); }
.custom-shot { justify-self: center; width: 100%; max-width: 600px; overflow: hidden; border-radius: 16px; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.8); }
.custom-shot img { width: 100%; }

.ticks { display: grid; gap: 10px; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; color: var(--text-2); font-size: 15px; }
.ticks svg { flex: none; width: 18px; height: 18px; margin-top: 2px; color: var(--accent); }

/* ---------- The app ---------- */
.app-stage {
  position: relative;
  margin: 0 auto;
  padding: 0 clamp(0px, 6vw, 96px) clamp(40px, 6vw, 72px) 0;
  max-width: 1080px;
}
.app-main { width: 100%; border-radius: clamp(10px, 1.4vw, 16px); box-shadow: 0 50px 100px -40px rgba(0, 0, 0, 0.9); }
.app-menu {
  position: absolute;
  right: 0;
  bottom: 0;
  width: clamp(150px, 26%, 270px);
  border-radius: 14px;
  box-shadow: 0 40px 80px -24px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(0, 0, 0, 0.4);
}

.features {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px;
  margin-top: clamp(56px, 7vw, 88px);
}
.feature { display: flex; flex-direction: column; }
.f-displays { grid-column: span 7; }
.f-keys { grid-column: span 5; }
.f-workspaces { grid-column: span 5; }
.f-rules { grid-column: span 7; }
.feature .tile-text { padding-bottom: 20px; }
.shot-bleed {
  flex: 1;
  min-height: 200px;
  margin-left: var(--pad);
  overflow: hidden;
  border-radius: 12px 0 0 0;
}
.shot-bleed img { height: 100%; min-height: 200px; object-fit: cover; object-position: 0 0; }

.more-title { margin: clamp(56px, 7vw, 80px) 0 20px; font-size: clamp(22px, 2.2vw, 28px); letter-spacing: -0.03em; }
.more { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.more li { display: grid; gap: 6px; align-content: start; padding: 22px; border-radius: var(--r-md); background: var(--surface); }
.more .ico { display: grid; place-items: center; width: 36px; height: 36px; margin-bottom: 8px; border-radius: 10px; background: var(--surface-2); color: var(--accent); }
.more .ico svg { width: 20px; height: 20px; }
.more h3 { font-size: 16px; letter-spacing: -0.015em; }
.more p { color: var(--text-2); font-size: 14px; }
.more kbd { font-size: 12px; }

/* ---------- Compare ---------- */
.chores { display: grid; gap: 8px; }
.chores li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) minmax(0, 1.15fr);
  gap: 24px;
  align-items: baseline;
  padding: 20px 24px;
  border-radius: var(--r-md);
  background: var(--surface);
}
.chores h3 { font-size: 16px; letter-spacing: -0.015em; }
.by-hand { color: var(--text-3); font-size: 15px; }
.with-t { color: var(--text); font-size: 15px; }
.chores-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) minmax(0, 1.15fr); gap: 24px; padding: 0 24px 6px; color: var(--text-3); font-size: 13px; font-weight: 600; }
.chores-head span:last-child { color: var(--accent); }
@media (max-width: 900px) {
  .chores-head { display: none; }
  .with-t::before { content: "With Tilelume"; display: block; margin-bottom: 2px; color: var(--accent); font-size: 12px; font-weight: 600; }
  .by-hand::before { content: "By hand"; display: block; margin-bottom: 2px; color: var(--text-3); font-size: 12px; font-weight: 600; }
}

/* ---------- Privacy ---------- */
.privacy { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.privacy .section-head { margin-bottom: 0; }
.privacy-points { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.privacy-points li { display: grid; gap: 6px; align-content: start; padding: 22px; border-radius: var(--r-md); background: var(--surface); }
.privacy-points .ico { display: grid; place-items: center; width: 36px; height: 36px; margin-bottom: 8px; border-radius: 10px; background: var(--surface-2); color: var(--accent); }
.privacy-points .ico svg { width: 20px; height: 20px; }
.privacy-points h3 { font-size: 16px; letter-spacing: -0.015em; }
.privacy-points p { color: var(--text-2); font-size: 14px; }

/* ---------- Pricing ---------- */
.pricing { display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.price-card {
  display: grid;
  gap: 22px;
  padding: clamp(24px, 3vw, 36px);
  border-radius: 32px;
  background:
    radial-gradient(90% 60% at 50% 0%, rgba(109, 95, 245, 0.22), transparent 70%),
    var(--bg-raise);
  box-shadow: inset 0 1px 0 rgba(226, 222, 255, 0.06), 0 40px 80px -40px rgba(0, 0, 0, 0.8);
}
.price-head { display: flex; align-items: center; gap: 14px; }
.price-head img { border-radius: 13px; }
.price-head div { display: grid; }
.price-head strong { font-size: 18px; letter-spacing: -0.02em; }
.price-head span { color: var(--text-3); font-size: 14px; }
.price { display: flex; align-items: baseline; gap: 10px; }
.amount { font: 680 clamp(64px, 8vw, 88px)/0.9 var(--display); letter-spacing: -0.055em; font-variant-numeric: tabular-nums; }
.once { color: var(--text-2); font-size: 18px; }
.price-card .btn { width: 100%; }
.mac-check { display: flex; align-items: center; gap: 8px; margin-top: -8px; color: var(--text-2); font-size: 14px; }
.mac-check::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 2px; background: #5ccf8e; }
.mac-check.is-no::before { background: #f0b45a; }
.price-fine { color: var(--text-3); font-size: 13px; }

.pricing-side { display: grid; gap: 16px; }
.pricing-lede { color: var(--text-2); font-size: clamp(16px, 1.4vw, 18px); max-width: 34em; }
.assure { display: grid; gap: 8px; margin-top: 12px; }
.assure div { padding: 18px 22px; border-radius: var(--r-md); background: var(--surface); }
.assure dt { font-weight: 600; letter-spacing: -0.01em; }
.assure dd { margin-top: 4px; color: var(--text-2); font-size: 15px; }

/* ---------- FAQ ---------- */
.faq { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.faq .section-head { position: sticky; top: 96px; margin-bottom: 0; }
.faq-list { display: grid; gap: 8px; }
.faq-list details { border-radius: var(--r-md); background: var(--surface); transition: background-color 0.2s var(--ease); }
.faq-list details[open] { background: var(--surface-2); }
.faq-list summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  list-style: none;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "";
  flex: none;
  width: 10px;
  height: 10px;
  border-right: 1.6px solid var(--text-3);
  border-bottom: 1.6px solid var(--text-3);
  transform: translateY(-3px) rotate(45deg);
  transition: transform 0.3s var(--spring);
}
.faq-list details[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.faq-list details > div { padding: 0 22px 20px; color: var(--text-2); font-size: 15px; }

/* ---------- Closing ---------- */
.closing { padding: clamp(120px, 14vw, 200px) 0 clamp(140px, 14vw, 200px); }
.closing-inner { display: grid; justify-items: center; gap: 18px; text-align: center; }
.closing-icon { width: 112px; height: 112px; margin-bottom: 8px; filter: drop-shadow(0 24px 40px rgba(109, 95, 245, 0.35)); }
.closing h2 { font-size: clamp(40px, 6vw, 76px); line-height: 1; letter-spacing: -0.048em; }
.closing p:not(.fine) { color: var(--text-2); font-size: clamp(16px, 1.4vw, 19px); }
.closing .btn { margin-top: 10px; }


/* ---------- Magic: the sky behind the hero and the closing section ---------- */
/* Fine grain over the whole page: it breaks up banding in the glows and adds a little texture. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 300;
  pointer-events: none;
  opacity: 0.06;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.hero, .closing { position: relative; isolation: isolate; }
.sky {
  position: absolute;
  inset: -64px 0 auto;
  height: calc(100% + 64px);
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 40%, transparent 78%);
  mask-image: linear-gradient(180deg, #000 0%, #000 40%, transparent 78%);
}
.mosaic { position: absolute; inset: 0; width: 100%; height: 100%; }

/* Slow aurora light. Big, soft and dim; it drifts, it never pulses. */
.aurora { position: absolute; inset: 0; filter: blur(70px) saturate(1.2); opacity: 0.9; }
.aurora i { position: absolute; display: block; border-radius: 50%; will-change: transform; }
.aurora .a1 { left: 8%; top: -18%; width: 52%; height: 70%; background: radial-gradient(closest-side, rgba(109, 95, 245, 0.55), transparent); animation: drift-a 26s ease-in-out infinite alternate; }
.aurora .a2 { right: 2%; top: -10%; width: 44%; height: 62%; background: radial-gradient(closest-side, rgba(200, 120, 220, 0.32), transparent); animation: drift-b 32s ease-in-out infinite alternate; }
.aurora .a3 { left: 30%; top: 22%; width: 46%; height: 50%; background: radial-gradient(closest-side, rgba(70, 60, 220, 0.4), transparent); animation: drift-c 38s ease-in-out infinite alternate; }
@keyframes drift-a { to { transform: translate(14%, 10%) scale(1.15); } }
@keyframes drift-b { to { transform: translate(-18%, 14%) scale(0.9); } }
@keyframes drift-c { to { transform: translate(10%, -12%) scale(1.2); } }

/* A cone of light from above, onto the headline. */
.beam {
  position: absolute;
  left: 50%;
  top: 0;
  width: min(1200px, 100%);
  height: 80%;
  transform: translateX(-50%);
  background: conic-gradient(from 180deg at 50% -8%, transparent 152deg, rgba(190, 180, 255, 0.10) 172deg, rgba(225, 220, 255, 0.16) 180deg, rgba(190, 180, 255, 0.10) 188deg, transparent 208deg);
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 85%);
  mask-image: linear-gradient(180deg, #000, transparent 85%);
}

/* "into place." catches the light. */
.lit-text {
  background: linear-gradient(180deg, #fff 10%, #c9c1ff 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lit-text .tile-stop { box-shadow: inset 0 0.012em 0 rgba(255, 255, 255, 0.35), 0 0 0.25em rgba(143, 128, 255, 0.7); }

/* The demo sits in a soft pool of violet light. */
.demo { position: relative; }
.demo::before {
  content: "";
  position: absolute;
  left: 8%; right: 8%; top: 12%; bottom: -6%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(109, 95, 245, 0.35), transparent);
  filter: blur(40px);
}

.stage-glow {
  position: absolute;
  left: 10%; right: 10%; top: 10%; bottom: 0;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(109, 95, 245, 0.3), rgba(200, 120, 220, 0.08) 60%, transparent);
  filter: blur(50px);
}
.app-stage { isolation: isolate; }

.price-wrap { position: relative; isolation: isolate; }
.price-halo {
  position: absolute;
  inset: -12% -16%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(109, 95, 245, 0.38), rgba(200, 120, 220, 0.1) 55%, transparent);
  filter: blur(40px);
}

/* The closing section: the mosaic rises over a horizon of light. The horizon belongs to
   the footer, so the planet's dark face carries straight on into it with no seam. */
.sky-closing {
  inset: 0;
  height: 100%;
  -webkit-mask-image: radial-gradient(62% 78% at 50% 88%, #000 28%, transparent 72%);
  mask-image: radial-gradient(62% 78% at 50% 88%, #000 28%, transparent 72%);
}
.site-footer { position: relative; isolation: isolate; }
.horizon {
  --rx: max(90vw, 600px);
  --ry: calc(var(--rx) * 0.42);
  --lift: 160px; /* how far the glow reaches up into the closing section */
  --rim: 44px;   /* the top of the arc sits this far above the footer */
  position: absolute;
  inset: calc(-1 * var(--lift)) 0 0;
  z-index: -1;
  pointer-events: none;
  background:
    /* Below the planet's middle it's all page colour, however tall the footer gets. */
    linear-gradient(180deg, transparent calc(var(--lift) - var(--rim) + var(--ry)), var(--bg) 0),
    /* The planet: page colour inside, a lit rim, a soft violet atmosphere around it. */
    radial-gradient(var(--rx) var(--ry) at 50% calc(var(--lift) - var(--rim) + var(--ry)),
      var(--bg) 97.6%, rgba(196, 186, 255, 0.95) 99.2%, rgba(143, 128, 255, 0.5) 100.4%, rgba(109, 95, 245, 0.16) 103%, transparent 109%),
    radial-gradient(calc(var(--rx) * 0.8) calc(var(--ry) * 0.75) at 50% calc(var(--lift) - var(--rim) + var(--ry) * 0.9),
      rgba(109, 95, 245, 0.42), rgba(109, 95, 245, 0.1) 70%, transparent);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 calc(var(--lift) - var(--rim) - 20px));
  mask-image: linear-gradient(180deg, transparent, #000 calc(var(--lift) - var(--rim) - 20px));
}
.closing-icon { filter: drop-shadow(0 24px 50px rgba(109, 95, 245, 0.55)); }

@media (prefers-reduced-motion: reduce) {
  .aurora i { animation: none; }
}
@media (max-width: 900px) {
  .price-halo { inset: -8% 0; }
}

/* ---------- Footer ---------- */
.site-footer { padding: 48px 0 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.footer-grid > * { display: grid; gap: 8px; align-content: start; }
.footer-grid p { color: var(--text); font-size: 14px; font-weight: 600; }
.footer-grid a, .footer-grid span { color: var(--text-3); font-size: 14px; }
.footer-grid a:hover { color: var(--text); }
.footer-brand p { max-width: 24em; color: var(--text-3); font-weight: 400; }
.footer-base { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 40px; color: var(--text-3); font-size: 13px; }
.footer-base a { text-decoration: underline; text-decoration-color: rgba(226, 222, 255, 0.3); text-underline-offset: 3px; }
.footer-base a:hover { color: var(--text-2); }

/* ---------- Sticky buy bar ---------- */
.buybar {
  position: fixed;
  left: 50%;
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 6px 6px 8px;
  border-radius: 18px;
  background: rgba(18, 16, 36, 0.82);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  backdrop-filter: blur(20px) saturate(1.4);
  box-shadow: inset 0 1px 0 rgba(226, 222, 255, 0.07), 0 20px 50px -16px rgba(0, 0, 0, 0.8);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 16px);
  transition: opacity 0.25s var(--ease), transform 0.35s var(--spring), visibility 0s 0.35s;
}
.buybar.is-on { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition-delay: 0s; }
.buybar img { border-radius: 7px; }
.buybar-text { display: grid; line-height: 1.2; padding-right: 8px; }
.buybar-text strong { font-size: 14px; }
.buybar-text span { color: var(--text-3); font-size: 12px; }
.buybar .btn { padding: 0 18px; }

/* ---------- Privacy policy page ---------- */
.doc { max-width: 720px; padding-top: clamp(48px, 7vw, 88px); padding-bottom: 96px; }
.doc h1 { font-size: clamp(40px, 5.4vw, 64px); line-height: 1; letter-spacing: -0.045em; margin-bottom: 14px; }
.doc .doc-lede { color: var(--text-2); font-size: 18px; margin-bottom: 8px; }
.doc .doc-date { color: var(--text-3); font-size: 14px; }
.doc h2 { margin: 48px 0 12px; font-size: 24px; letter-spacing: -0.025em; }
.doc p, .doc li { color: var(--text-2); }
.doc p + p { margin-top: 12px; }
.doc ul { display: grid; gap: 8px; margin-top: 12px; padding-left: 0; }
.doc li { position: relative; padding-left: 20px; }
.doc li::before { content: ""; position: absolute; left: 2px; top: 0.62em; width: 7px; height: 7px; border-radius: 2px; background: var(--accent); }
.doc strong { color: var(--text); }
.doc .kicker { margin-bottom: 8px; color: var(--accent); }
.doc ul + p { margin-top: 16px; }
.doc a:not(.btn) { color: var(--accent); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .nav-links { display: none; }
  .wall-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .hero-top { grid-template-columns: 1fr; align-items: start; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fact-glyphs { grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; }
  .ways { grid-template-columns: 1fr; }
  .way-drag { grid-row: auto; }
  .aside-note { display: none; }
  .layouts { grid-template-columns: 1fr; }
  .preview { position: static; grid-template-columns: 160px 1fr; text-align: left; justify-items: start; align-items: center; gap: 4px 18px; padding: 16px; }
  .preview-screen { grid-row: span 2; margin: 0; border-radius: 10px; --pi: 6px; --pg: 5px; }
  .preview-screen b { border-radius: 5px; }
  .preview-name { align-self: end; font-size: 18px; }
  .preview-keys { align-self: start; }
  .custom { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr; }
  .f-displays, .f-keys, .f-workspaces, .f-rules { grid-column: auto; }
  .more { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chores li { grid-template-columns: 1fr; gap: 10px; }
  .privacy, .pricing, .faq { grid-template-columns: 1fr; }
  .faq .section-head { position: static; }
  .pricing-side { order: -1; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .wall { grid-template-columns: 1fr; }
  .more, .privacy-points { grid-template-columns: 1fr; }
  .preview { grid-template-columns: 120px 1fr; }
  .app-menu { display: none; }
  .app-stage { padding: 0; }
  .keys { justify-content: flex-start; max-width: calc(100% + 2 * var(--gutter)); overflow-x: auto; flex-wrap: nowrap; margin: 0 calc(-1 * var(--gutter)); padding: 6px var(--gutter); border-radius: 0; background: none; scrollbar-width: none; }
  .keys::-webkit-scrollbar { display: none; }
  .key { flex: none; }
  .nav .btn-sm .btn-price { display: inline; }
  .fact { min-height: 0; padding: 16px; }
  .fact-art { height: auto; min-height: 30px; }
  .fact-undo { height: 58px; }
  .fp:nth-child(3), .fact-langs span:nth-child(n+4) { display: none; }
  .fact-glyphs .fg:nth-child(n+5) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
