/* ------------------------------------------------------------
   XP-style desktop: wallpaper, shortcuts on the right, and the
   selected app floating in the middle with a card of text.
   ------------------------------------------------------------ */

:root {
  --xp-font: Tahoma, Verdana, "Segoe UI", sans-serif;
  --title-font: "Trebuchet MS", "Segoe UI", Tahoma, sans-serif;
  --ui-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --select: #316ac5;
  --desktop: #3a6ea5;
}

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

html, body { margin: 0; }

body {
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  font: 12px/1.4 var(--xp-font);
  color: #000;
  background: var(--desktop);
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

/* ---------- Wallpapers (crossfade) ---------- */

.wallpapers {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: var(--desktop);
}

.wp {
  position: absolute;
  inset: 0;
  opacity: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  transition: opacity .6s ease;
}

.wp.active { opacity: 1; }

/* Pixel shimmer that trails the mouse on About (drawn by site.js) */
.shimmer {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* No crossfade on first paint (e.g. when the page opens on #signal) */
.preload .wp { transition: none; }

/* ---------- Desktop shortcuts ---------- */

.icons {
  position: fixed;
  top: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  display: flex;
  flex-flow: column wrap-reverse;
  align-content: flex-start;
  gap: 10px 6px;
  pointer-events: none;
}

.icon {
  pointer-events: auto;
  width: 88px;
  padding: 3px 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  color: #fff;
  text-decoration: none;
  outline: none;
  cursor: default;
  user-select: none;
  -webkit-user-select: none;
}

.icon-img {
  position: relative;
  width: 48px;
  height: 48px;
}

.icon-img img {
  display: block;
  width: 48px;
  height: 48px;
  border-radius: 11px;
  filter: drop-shadow(1px 2px 2px rgba(0, 0, 0, .45));
}

.icon-img .arrow {
  position: absolute;
  left: -3px;
  bottom: -3px;
  z-index: 2;
  width: 15px;
  height: 15px;
}

/* Selected tint, masked to the icon's own shape */
.icon-img .tint {
  position: absolute;
  inset: 0;
  display: none;
  border-radius: 11px;
  background: var(--select);
  opacity: .55;
  -webkit-mask-size: cover;
  mask-size: cover;
}

.icon.selected .tint { display: block; }

.icon-label {
  max-width: 86px;
  padding: 1px 3px 2px;
  font-size: 12px;
  line-height: 1.25;
  text-align: center;
  overflow-wrap: anywhere;
  text-shadow: 1px 1px 1px #000, 0 0 3px rgba(0, 0, 0, .55);
}

.icon-label .nw { white-space: nowrap; }

.icon.selected .icon-label {
  background: var(--select);
  text-shadow: none;
}

.icon:focus-visible .icon-label {
  outline: 1px dotted #fff;
  outline-offset: 0;
}

/* ---------- Stage ---------- */

.stage {
  position: relative;
  z-index: 1;
  padding: 0 130px;
}

.scene {
  display: none;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

/* First screen: the app, its card and the "More" button, centered in the window */
.hero {
  box-sizing: border-box;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  padding: 28px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 30px;
}

.scene.active {
  display: flex;
  animation: rise .5s cubic-bezier(.2, .7, .2, 1);
}

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

/* ---------- Phones ---------- */

.phones {
  --h: min(50vh, 540px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 34px;
}

/* No device frame: the screenshot floats on a soft shadow */
.phone {
  --r: calc(var(--h) * .056);
  margin: 0;
  border-radius: var(--r);
}

.phone img {
  display: block;
  height: var(--h);
  width: auto;
  aspect-ratio: 596 / 1296;
  border-radius: var(--r);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, .07),
    0 28px 56px rgba(0, 0, 0, .24),
    0 8px 18px rgba(0, 0, 0, .12);
}

.scene[data-tone="dark"] .phone img {
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, .16),
    0 28px 56px rgba(0, 0, 0, .5),
    0 8px 18px rgba(0, 0, 0, .25);
}

/* Mac app: transparent cut-out with its own shadows */
.float.mac {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  --mac-h: min(62vh, 700px);
  max-height: var(--mac-h);
  margin: calc(var(--mac-h) * -.03) 0 calc(var(--mac-h) * -.06);
  filter: drop-shadow(0 18px 22px rgba(0, 0, 0, .22));
}

/* ---------- Description card ---------- */

.card {
  width: min(460px, 100%);
  padding: 18px 20px 20px;
  border-radius: 18px;
  font-family: var(--ui-font);
  color: #1d1d1f;
  background: rgba(255, 255, 255, .8);
  border: 1px solid rgba(255, 255, 255, .7);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .22), 0 2px 6px rgba(0, 0, 0, .08);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  backdrop-filter: blur(22px) saturate(160%);
}

.card-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.card-head .avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
  filter: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .2);
}

.card-head img {
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .22));
}

.card h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.2;
}

.card .lead {
  margin: 3px 0 0;
  font-size: 14px;
  color: #5e5e63;
}

.card .desc {
  margin: 0 0 16px;
  font-size: 15px;
  line-height: 1.55;
}

.card-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 18px;
  border-radius: 999px;
  background: #1d1d1f;
  color: #fff;
  font: 600 14px/1 var(--ui-font);
  text-decoration: none;
  transition: transform .15s ease, background-color .15s ease;
}

.cta:hover { background: #000; transform: translateY(-1px); }
.cta:active { transform: translateY(0); }
.cta:focus-visible { outline: 2px solid var(--select); outline-offset: 3px; }

.meta {
  font-size: 13px;
  color: #6e6e73;
}

.meta .downloads {
  font-weight: 600;
  color: #1d1d1f;
}

.scene[data-tone="dark"] .meta .downloads { color: rgba(255, 255, 255, .92); }

.card .desc a {
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.card .desc a:hover { text-decoration-thickness: 2px; }

.cta[hidden] { display: none; }

.cta.secondary {
  background: transparent;
  color: inherit;
  box-shadow: inset 0 0 0 1.5px currentColor;
}

.cta.secondary:hover { background: rgba(0, 0, 0, .06); }

/* Dark scenes get a dark card */
.scene[data-tone="dark"] .card {
  color: #f5f5f7;
  background: rgba(22, 22, 30, .62);
  border-color: rgba(255, 255, 255, .12);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .45);
}

.scene[data-tone="dark"] .lead { color: rgba(255, 255, 255, .66); }
.scene[data-tone="dark"] .meta { color: rgba(255, 255, 255, .55); }
.scene[data-tone="dark"] .cta { background: #fff; color: #111; }
.scene[data-tone="dark"] .cta:hover { background: #e9e9ef; }
.scene[data-tone="dark"] .desc a { color: #9cc9ff; }

/* ---------- "More" button and the story panel ---------- */

.more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: -12px;
  padding: 8px 14px 8px 16px;
  border-radius: 999px;
  font: 600 13px/1 var(--ui-font);
  color: #1d1d1f;
  text-decoration: none;
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(255, 255, 255, .7);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .16);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  transition: transform .15s ease, background-color .15s ease;
}
.more:hover { background: rgba(255, 255, 255, .9); transform: translateY(2px); }
.more { transition: transform .15s ease, background-color .15s ease, opacity .25s ease, visibility .25s; }
.more.is-hidden { opacity: 0; visibility: hidden; transform: translateY(6px); pointer-events: none; }
.more:focus-visible { outline: 2px solid var(--select); outline-offset: 3px; }
.scene[data-tone="dark"] .more {
  color: #f5f5f7;
  background: rgba(22, 22, 30, .62);
  border-color: rgba(255, 255, 255, .14);
}
.scene[data-tone="dark"] .more:hover { background: rgba(40, 40, 52, .75); }

.card.story {
  width: min(620px, 100%);
  margin-bottom: 18vh;
  padding: 26px 30px 28px;
  scroll-margin: 28px;
}
.card.story:focus { outline: none; }

.story .eyebrow {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #6e6e73;
}
.story p { margin: 0 0 14px; font-size: 16px; line-height: 1.6; }
.story p a {
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.story > :last-child { margin-bottom: 0; }          /* the story ends on its last paragraph or figure */

.story-fig { margin: 22px 0 20px; }
.fig-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 18px;
  padding: 22px 18px 18px;
  border-radius: 14px;
}
.fig-row figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.fig-row figcaption, .fig-caption { font-size: 12.5px; line-height: 1.35; color: #6e6e73; text-align: center; }
.fig-caption { margin-top: 10px; text-wrap: balance; }
.fig-row figcaption { white-space: pre-line; }

.fig-tuner .fig-row { padding: 26px 18px; background: #f4f2ee; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06); }
.fig-tuner.is-dark .fig-row {                       /* the app's dark background */
  background: linear-gradient(#2a2a2a, #343232, #2a2a2a);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
}

.fig-bubbles .fig-row { background: linear-gradient(#ffe6f2, #ffd0e7); gap: 10px; }
.fig-bubbles figure { width: 92px; }
.fig-bubbles img { width: 64px; height: 64px; }

/* Story figures you can press: the Tuner play button and the bubbles (sounds from the apps) */
.toy {
  appearance: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
}
.toy img { display: block; pointer-events: none; -webkit-user-drag: none; }
.toy:focus-visible, .sound-toggle:focus-visible { outline: 2px solid #1a73e8; outline-offset: 3px; border-radius: 12px; }

/* Tuner playground. Each control stacks its images (light/dark, up/down or off/on) and shows
   the one marked .cur. Sizes follow the app's points: --k is CSS pixels per point. */
.tuner-toy { --k: .85; display: flex; align-items: center; justify-content: center; gap: 36px; }
.tuner-arrows { display: flex; gap: 6px; }
.tuner-toy .toy { display: grid; }
.tuner-toy .toy img { grid-area: 1 / 1; height: auto; visibility: hidden; }
.tuner-toy .toy img.cur { visibility: visible; }
.tuner-press { margin: -8px -3px; padding: 8px 3px; }  /* a bigger target than the small arrow */
.tuner-press img { width: calc(32px * var(--k)); }
.tuner-play img { width: calc(332px * var(--k)); }
.tuner-mode { justify-items: end; align-items: center; }
.tuner-mode img[data-theme="light"] { width: calc(78px * var(--k)); }
.tuner-mode img[data-theme="dark"] { width: calc(79px * var(--k)); }

.fig-bubbles .fig-row { touch-action: pan-y; }      /* drag sideways to pop several, like the app */
.bubble { display: grid; border-radius: 50%; }
.bubble img { grid-area: 1 / 1; }
.bubble .popped { opacity: 0; }
.bubble.is-popped { cursor: default; }
.bubble.is-popped .unpopped { opacity: 0; }
.bubble.is-popped .popped { opacity: .6; }         /* same as the app */
.bubble.just-popped { animation: pop .18s ease-out; }
@keyframes pop { 0% { transform: scale(1.08); } 100% { transform: scale(1); } }
.bubble-reset { border-radius: 50%; transition: opacity .2s, transform .1s; }
.bubble-reset:active:not(:disabled) { transform: scale(.978); }
.bubble-reset:disabled { opacity: .35; cursor: default; }

.fig-controls { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 4px 10px; }
.sound-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px 3px 7px;
  border: 1px solid rgba(0, 0, 0, .14);
  border-radius: 999px;
  background: #fff;
  font: inherit;
  color: #3a3a3c;
  cursor: pointer;
}
.sound-toggle:hover { background: #f5f5f7; }
.sound-toggle .slash, .sound-toggle[aria-pressed="false"] .waves { display: none; }
.sound-toggle[aria-pressed="false"] .slash { display: inline; }
.sound-toggle[aria-pressed="false"] { color: #8e8e93; }

.phones.gallery { margin: calc(56px - 18vh) 0 18vh; align-items: flex-start; }
/* Tuner: light and dark pattern library sheets either side of the dark mode screenshot (corners are in the PNGs) */
.pattern-lib { margin: 0; }
.pattern-lib img {
  display: block;
  width: auto;
  height: var(--h);
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .18)) drop-shadow(0 4px 10px rgba(0, 0, 0, .1));
}

/* BPM Bot: the app's three steps (white cards on a dotted line) beside a sticky beatmatching demo */
.walk { width: min(1040px, 100%); margin: calc(56px - 18vh) 0 18vh; color: #fff; }
.walk .sky-label { margin-bottom: 28px; }
.walk-grid { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 48px; align-items: start; }
.walk-steps { position: relative; display: flex; flex-direction: column; gap: 72px; margin: 0; padding: 0; list-style: none; }
.walk-steps::before {                               /* the dotted line that joins the cards */
  content: "";
  position: absolute;
  top: 190px;                                       /* from the middle of the first step to the last */
  bottom: 190px;
  left: 30px;
  border-left: 3px dotted rgba(255, 255, 255, .7);
}
.walk-step { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px; align-items: center; }
.step-card {
  position: relative;
  padding: 18px 20px 20px;
  border-radius: 14px;
  background: #fff;
  color: #16161d;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .35);
}
.step-num { font: 700 12px/1 var(--ui-font); letter-spacing: .08em; text-transform: uppercase; color: #5a5bd8; }
.step-card p { margin: 8px 0 0; font-size: 18px; line-height: 1.4; font-weight: 500; }
.walk-shot { --h: 380px; }
.walk-shot img { width: auto; }

.walk-viz { position: sticky; top: max(24px, calc(50vh - 200px)); }
.viz-panel {
  padding: 16px 18px 18px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 18px;
  background: rgba(18, 18, 30, .82);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.viz-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.viz-title { font: 600 12px/1 var(--ui-font); letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .6); }
.viz-dots { display: flex; gap: 6px; }
.viz-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, .25); transition: background .3s; }
.viz-panel[data-step="1"] .viz-dots i:nth-child(1),
.viz-panel[data-step="2"] .viz-dots i:nth-child(-n + 2),
.viz-panel[data-step="3"] .viz-dots i { background: #8b8cff; }
.viz-labels { display: flex; justify-content: space-between; font: 500 12px/1.2 var(--ui-font); color: rgba(255, 255, 255, .7); }
.viz-labels b { color: #fff; font-weight: 700; }
.viz-play b { color: #a5a6ff; }
.viz-cue { opacity: 0; transition: opacity .5s; }
.viz-cue b { color: #ffb27a; }
.viz-panel:not([data-step="1"]) .viz-cue { opacity: 1; }
.viz-waves { display: block; width: 100%; height: 170px; margin: 8px 0 12px; }
.viz-slider {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 54px;
  gap: 12px;
  align-items: center;
  margin-top: 20px;                                  /* room for the target label above the track */
  visibility: hidden;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .4s, transform .4s, visibility .4s;
}
.viz-panel[data-step="3"] .viz-slider { visibility: visible; opacity: 1; transform: none; }
.viz-slider label { font: 600 12px/1 var(--ui-font); color: rgba(255, 255, 255, .75); }
/* A custom slider, so the thumb's size is known and the target tick sits exactly over its center */
.viz-track { --thumb: 18px; position: relative; height: var(--thumb); }
.viz-target {
  position: absolute;
  bottom: calc(100% + 7px);
  left: calc(var(--thumb) / 2 + (100% - var(--thumb)) * var(--at));
  transform: translateX(-50%);
  font: 600 10px/1 var(--ui-font);
  color: #ffb27a;
  white-space: nowrap;
}
.viz-target::after {                                 /* a tick down to the track */
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  width: 1px;
  height: 6px;
  background: #ffb27a;
}
.viz-slider input {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  height: var(--thumb);
  margin: 0;
  background: transparent;
  cursor: pointer;
}
.viz-slider input {                                  /* orange up to the thumb's center (--fill is set by the script) */
  --fill-at: calc(var(--thumb) / 2 + (100% - var(--thumb)) * var(--fill, .5));
}
.viz-slider input::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, #ffb27a var(--fill-at), rgba(255, 255, 255, .22) var(--fill-at));
}
.viz-slider input::-moz-range-track {
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, #ffb27a var(--fill-at), rgba(255, 255, 255, .22) var(--fill-at));
}
.viz-slider input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: var(--thumb);
  height: var(--thumb);
  margin-top: -6px;                                  /* centers the thumb on the 6px track */
  border: 0;
  border-radius: 50%;
  background: #ffb27a;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .5);
}
.viz-slider input::-moz-range-thumb {
  width: var(--thumb);
  height: var(--thumb);
  border: 0;
  border-radius: 50%;
  background: #ffb27a;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .5);
}
.viz-slider input:focus-visible { outline: 2px solid #ffb27a; outline-offset: 4px; border-radius: 9px; }
.viz-readout { font: 700 13px/1 var(--ui-font); text-align: right; font-variant-numeric: tabular-nums; }
.viz-status { min-height: 2.9em; margin: 12px 0 0; font-size: 14px; line-height: 1.45; color: rgba(255, 255, 255, .85); }
.viz-panel.is-matched .viz-status { color: #9dffb8; }

/* BPM Corrector: labeled rows of screens (other screens, skin ideas, wireframes). They carry their own shadows. */
.gallery-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(1040px, 100%);
  margin: calc(40px - 18vh) 0 18vh;
}
.gallery-block + .gallery-block { margin-top: calc(96px - 18vh); }
.gallery-block .sky-label {
  margin-bottom: 12px;
  padding: 7px 14px 6px;
  border-radius: 999px;
  background: rgba(10, 30, 60, .38);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #fff;
}
.gallery-wireframes-and-inspo .mac-shot { width: 232px; }
/* Inspiration: small skins and keygens, scattered like pictures dropped on the desktop */
.inspo {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 18px 22px;
  max-width: 980px;
  margin-top: 34px;
  padding: 0 10px;
}
.inspo-pic {
  display: block;
  width: auto;
  height: var(--h, 130px);
  border: 4px solid #fff;
  border-radius: 3px;
  box-shadow: 0 10px 22px rgba(0, 0, 0, .35), 0 2px 5px rgba(0, 0, 0, .25);
  transform: rotate(var(--tilt, 0deg));
  transition: transform .2s ease;
}
.inspo-pic:hover { transform: rotate(0deg) scale(1.06); }
.macs.gallery { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; width: 100%; }
.mac-shot { width: 300px; margin: 0; }
.mac-shot img { display: block; width: 100%; height: auto; }
.macs.gallery figcaption { margin-top: 2px; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .75), 0 0 10px rgba(0, 20, 60, .55); }
.gallery figure { display: flex; flex-direction: column; align-items: center; }
.gallery figcaption {
  margin-top: 16px;
  font: 500 13px/1.3 var(--ui-font);
  color: rgba(0, 0, 0, .58);
  text-align: center;
}
.scene[data-tone="dark"] .gallery figcaption { color: rgba(255, 255, 255, .78); text-shadow: 0 1px 3px rgba(0, 0, 0, .6); }

/* Under Signal's story: the page darkens, reviews scatter like stars, then requests that got built */
.dusk {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 30%, #04102e 0%, #01040e 75%);
  opacity: var(--dusk, 0);
  transition: opacity .25s linear;
}
.dusk[data-for="bpm-bot"] { background: radial-gradient(ellipse at 50% 30%, #150c30 0%, #040209 75%); }
.sky, .requests { width: min(1040px, 100%); color: #fff; }
.sky { margin: 0 0 120px; }
.requests { margin-bottom: 18vh; }
.sky-label {
  margin: 0 0 36px;
  text-align: center;
  font: 600 12px/1 var(--ui-font);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .5);
}

.reviews {                                          /* a loose 3-column scatter */
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: start;
  gap: 64px 36px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.review {
  grid-column: var(--col, auto);
  justify-self: var(--js);
  width: min(var(--w), 100%);
  margin-top: var(--mt, 0);
  transform: translateY(var(--dy));
  text-align: center;
}
.review p { margin: 6px 0 0; color: rgba(255, 255, 255, .9); text-shadow: 0 1px 12px rgba(0, 0, 0, .5); text-wrap: balance; }
.review-xl p { font-size: 36px; line-height: 1.22; font-weight: 600; }
.review-xl .stars { font-size: 16px; }
.review-lg p { font-size: 26px; line-height: 1.25; font-weight: 600; }
.review-md p { font-size: 19px; line-height: 1.4; font-weight: 500; }
.review-sm p { font-size: 15.5px; line-height: 1.5; color: rgba(255, 255, 255, .75); }
.stars {
  display: inline-block;
  font-size: 13px;
  letter-spacing: 3px;
  color: #ffe7a3;
  text-shadow: 0 0 6px rgba(255, 214, 120, .9), 0 0 16px rgba(255, 200, 90, .5);
  animation: twinkle 4.5s ease-in-out var(--tw, 0s) infinite;
}
@keyframes twinkle { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }

.masonry { columns: 3 260px; column-gap: 18px; }
.request {
  display: inline-block;
  box-sizing: border-box;
  width: 100%;
  margin: 0 0 18px;
  padding: 14px 14px 16px;
  break-inside: avoid;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 18px;
  background: rgba(12, 16, 34, .72);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .35);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.request img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 0 14px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 10px;
}
.request h3 { margin: 0 2px 8px; font: 600 15px/1.3 var(--ui-font); }
.request blockquote { margin: 0 2px; }
.request blockquote p { margin: 0 0 5px; font-size: 15px; line-height: 1.5; color: rgba(255, 255, 255, .88); }
.request footer { font-size: 12px; color: rgba(255, 255, 255, .5); }
.request .after {
  margin: 12px 2px 0;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, .1);
  font-size: 14px;
  line-height: 1.45;
  color: rgba(255, 255, 255, .85);
}
.request .after span { display: block; margin-bottom: 3px; font-size: 12px; color: rgba(255, 255, 255, .5); }

.scene[data-tone="dark"] .story .eyebrow,
.scene[data-tone="dark"] .fig-row figcaption,
.scene[data-tone="dark"] .fig-caption { color: rgba(255, 255, 255, .55); }
.scene[data-tone="dark"] .story p a { color: #9cc9ff; }

/* ---------- About ---------- */

.about-apps {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 22px;
}

.about-apps a {
  display: block;
  border-radius: 22px;
  transition: transform .15s ease;
}

.about-apps a:hover { transform: translateY(-3px); }
.about-apps a:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }

.about-apps img {
  display: block;
  width: 84px;
  height: 84px;
  border-radius: 20px;
  filter: drop-shadow(0 12px 16px rgba(0, 0, 0, .28));
}

/* ---------- "Coming soon" message box (XP style) ---------- */

.msgbox {
  position: fixed;
  z-index: 100;
  top: 42%;
  left: 50%;
  width: min(380px, calc(100vw - 24px));
  transform: translate(-50%, -50%);
  padding: 0 3px 3px;
  background: #ece9d8;
  border-radius: 8px 8px 0 0;
  box-shadow:
    inset -1px -1px #00138c, inset 1px 1px #0831d9,
    inset -2px -2px #001ea0, inset 2px 2px #166aee,
    inset -3px -3px #003bda, inset 3px 3px #0855dd,
    0 12px 32px rgba(0, 0, 0, .35);
}

.xp-title {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  margin: 0 -3px;
  padding: 0 5px 0 9px;
  border: 1px solid #0831d9;
  border-right-color: #001ea0;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(180deg,
    #0997ff 0%, #0053ee 8%, #0050ee 40%, #0066ff 88%,
    #0066ff 93%, #005bff 95%, #003dd7 96%, #003dd7 100%);
  color: #fff;
  font: bold 13px var(--title-font);
  text-shadow: 1px 1px #0f1089;
}

.xp-title-text {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.xp-close {
  flex: none;
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  padding: 0;
  border: 1px solid #fff;
  border-radius: 3px;
  background: radial-gradient(circle at 90% 90%,
    #cc4600 0%, #dc6527 55%, #cd7546 70%, #ffccb2 90%, #fff 100%);
  cursor: pointer;
}

.msgbox-body {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 14px 10px;
}

.msgbox-body svg { flex: none; }
.msgbox-body p { margin: 6px 0 0; font-size: 12.5px; line-height: 1.5; }

.msgbox-actions {
  display: flex;
  justify-content: center;
  padding: 0 0 12px;
}

.xp-btn {
  min-width: 75px;
  min-height: 25px;
  padding: 3px 14px;
  border: 1px solid #003c74;
  border-radius: 3px;
  background: linear-gradient(180deg, #fff 0%, #ecebe6 86%, #d6d0c5 100%);
  box-shadow:
    inset -1px 1px #cee7ff, inset 1px 2px #98b8ea,
    inset -2px 2px #bcd4f6, inset 1px -1px #89ade4, inset 2px -2px #89ade4;
  font: 12px var(--xp-font);
  cursor: pointer;
}

.xp-btn:hover {
  box-shadow:
    inset -1px 1px #fff0cf, inset 1px 2px #fdd889,
    inset -2px 2px #fbc761, inset 2px -2px #e5a01a;
}

.xp-btn:focus-visible { outline: 1px dotted #000; outline-offset: -4px; }

/* Articulate: password box (same XP window, with a field and OK / Cancel) */
.msgbox-password .msgbox-body { padding-bottom: 4px; }
.pw-main { flex: 1; min-width: 0; }
.pw-field { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 12px; }
.pw-field input {
  flex: 1;
  min-width: 0;
  height: 23px;
  box-sizing: border-box;
  padding: 2px 5px;
  border: 1px solid #7f9db9;
  border-radius: 0;
  background: #fff;
  color: #000;
  font: 12px var(--xp-font);
}
.pw-input { -webkit-text-security: disc; text-security: disc; }   /* dots, without being a password field */
.pw-field input:focus { outline: 1px solid #3c7fb1; outline-offset: 0; border-color: #3c7fb1; }
.msgbox-body .pw-error { min-height: 18px; margin: 6px 0 0; color: #c00; font-size: 12px; line-height: 18px; }
.pw-actions { justify-content: flex-end; gap: 6px; padding: 0 12px 12px; }

.msgbox.is-wrong { animation: pw-shake .34s ease; }
@keyframes pw-shake {
  0%, 100% { transform: translate(-50%, -50%); }
  20% { transform: translate(calc(-50% - 7px), -50%); }
  40% { transform: translate(calc(-50% + 6px), -50%); }
  60% { transform: translate(calc(-50% - 4px), -50%); }
  80% { transform: translate(calc(-50% + 2px), -50%); }
}
@media (prefers-reduced-motion: reduce) { .msgbox.is-wrong { animation: none; } }

/* ---------- Phones (small screens) ---------- */

@media (max-width: 640px) {
  .icons {
    position: relative;
    inset: auto;
    flex-flow: row wrap;
    justify-content: center;
    gap: 6px 0;
    padding: 12px 4px 2px;
    pointer-events: auto;
  }

  .icons { flex-wrap: nowrap; }
  .icon { flex: 1 1 0; min-width: 0; max-width: 64px; width: auto; padding: 3px 0; }
  .icon-label { max-width: 100%; padding: 1px 1px 2px; font-size: 10.5px; }
  .msgbox-password { top: 30%; }
  .pw-field input { height: 30px; font-size: 16px; }

  .stage { padding: 16px 14px 32px; }

  .hero { min-height: 0; padding: 0; gap: 24px; }
  .more { margin-top: -10px; }

  .card.story { margin: 24px 0 0; padding: 20px 18px 22px; }
  /* BPM Bot: no sticky demo on phones; each card sits above its screenshot */
  .walk { margin: 48px 0 0; }
  .walk-steps { gap: 40px; }
  .walk-steps::before { display: none; }
  .walk-step:not(:first-child)::before {             /* a short dotted link from the screenshot above */
    content: "";
    position: absolute;
    top: -40px;
    left: 24px;
    height: 40px;
    border-left: 3px dotted rgba(255, 255, 255, .7);
  }
  .walk-step { grid-template-columns: 1fr; justify-items: center; gap: 18px; }
  .step-card { justify-self: stretch; }
  .step-card p { font-size: 16px; }
  .walk-shot { --h: min(60vh, 120vw); }

  /* Reviews alternate left and right instead of scattering; requests stack in one column */
  .sky { margin: 64px 0 64px; }
  .reviews { display: flex; flex-direction: column; gap: 30px; }
  .review { align-self: center; width: auto; max-width: 92%; margin-top: 0; transform: none; }
  .review-xl p { font-size: 27px; }
  .review-lg p { font-size: 23px; }
  .review-md p { font-size: 17px; }
  .review-sm p { font-size: 15px; }
  .requests { margin-bottom: 0; }
  .masonry { columns: 1; }
  /* Several extra screenshots: a row you swipe through, edge to edge */
  .phones.gallery, .macs.gallery {
    align-self: stretch;
    justify-content: flex-start;
    margin: 28px -14px 0;
    padding: 4px 14px 36px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 14px;
    scrollbar-width: none;
  }
  .phones.gallery::-webkit-scrollbar { display: none; }
  .gallery figure { flex: none; scroll-snap-align: center; }
  .gallery-block, .gallery-block + .gallery-block { margin: 40px 0 0; }
  .gallery-block .sky-label { margin-bottom: 0; }
  .gallery-wireframes-and-inspo .mac-shot { width: 74vw; }
  .inspo { gap: 14px; margin-top: 24px; }
  .inspo-pic { height: calc(var(--h, 130px) * .72); }
  .macs.gallery { flex-wrap: nowrap; margin-top: 4px; }
  .mac-shot { width: 74vw; }
  .gallery figure:first-child { margin-left: auto; }   /* centered when it fits, scrollable when not */
  .gallery figure:last-child { margin-right: auto; }
  .story p { font-size: 15px; }
  .fig-row { padding: 18px 10px 14px; gap: 12px; }
  .fig-bubbles .fig-row { flex-wrap: nowrap; gap: 2px; padding-inline: 6px; }
  .fig-bubbles figure { width: 54px; }
  .fig-bubbles img { width: 44px; height: 44px; }
  .fig-row figcaption { font-size: 11px; }
  /* Tuner playground in two rows, like the app: arrows and dark mode above, play below */
  .tuner-toy {
    --k: .76;
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "arrows . mode" "play play play";
    gap: 16px 0;
    width: max-content;
    margin: 0 auto;
  }
  .tuner-arrows { grid-area: arrows; }
  .tuner-play { grid-area: play; }
  .tuner-mode { grid-area: mode; }

  .phones { --h: min(52vh, 118vw); gap: 18px; }
  .phones.two { --h: min(46vh, 64vw); }

  .float.mac { --mac-h: 60vh; }

  .card { padding: 16px 16px 18px; }
  .card .desc { font-size: 14.5px; }

  .about-apps { gap: 12px; }
  .about-apps img { width: 52px; height: 52px; border-radius: 12px; }
}

@media (max-width: 900px) {
  .walk-grid { grid-template-columns: minmax(0, 1fr); }
  .walk-viz { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .wp { transition: none; }
  .scene.active { animation: none; }
  .cta, .about-apps a, .more, .bubble-reset { transition: none; }
  .bubble.just-popped { animation: none; }
  .stars { animation: none; }
  .inspo-pic { transition: none; }
  .viz-cue, .viz-slider, .viz-dots i { transition: none; }
  .dusk { transition: none; }
}
