/* Forma's own page, from the Forma brand kit. Two looks, one layout:
   light is cream paper with hard-edged stickers, dark is night purple with neon.
   Everything that moves stops under [data-calm], set by the "Too loud?" button. */

:root {
  --ink: #1A0B2E;
  --pink: #FF2E93;
  --yellow: #FFE600;
  --orange: #FF7A1A;
  --lime: #B6FF1A;
  --purple: #A13DFF;
  --blue: #3D5AFE;
  --cyan: #00E5FF;

  --bg: #FFF3E8;
  --text: var(--ink);
  --dim: #5B4A78;
  --line: rgba(26, 11, 46, 0.14);
  --surface: #FFFFFF;
  --dot: rgba(26, 11, 46, 0.1);

  --display: "Fredoka", "Arial Rounded MT Bold", ui-rounded, sans-serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;

  --pad: clamp(20px, 5vw, 64px);
  --max: 1240px;
  --spring: cubic-bezier(0.3, 1.6, 0.5, 1);
  --out: cubic-bezier(0.2, 0.7, 0.2, 1);
}

:root[data-theme="dark"] {
  --bg: #12071F;
  --text: #F7F0FF;
  --dim: #BBA9D8;
  --line: rgba(247, 240, 255, 0.16);
  --surface: #1E0F3A;
  --dot: rgba(247, 240, 255, 0.09);
}

/* The app's colors. --c is the color, --on is the text that sits on it. */
.c-pink { --c: var(--pink); --on: var(--ink); }
.c-yellow { --c: var(--yellow); --on: var(--ink); }
.c-orange { --c: var(--orange); --on: var(--ink); }
.c-lime { --c: var(--lime); --on: var(--ink); }
.c-cyan { --c: var(--cyan); --on: var(--ink); }
.c-purple { --c: var(--purple); --on: #fff; }
.c-blue { --c: var(--blue); --on: #fff; }
.c-white { --c: #fff; --on: var(--ink); }

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

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

body {
  margin: 0;
  overflow-x: clip;
  color: var(--text);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  background-color: var(--bg);
  /* Dot grid on the kit's gradient, cream to pink or night to magenta */
  background-image:
    radial-gradient(var(--dot) 1.2px, transparent 1.5px),
    linear-gradient(160deg, #FFF3E8 0%, #FFE9EE 55%, #FFD6E8 100%);
  background-size: 26px 26px, 100% 100%;
  transition: background-color 0.3s, color 0.3s;
}
:root[data-theme="dark"] body {
  background-image:
    radial-gradient(var(--dot) 1.2px, transparent 1.5px),
    radial-gradient(60vw 50vh at 12% 8%, rgba(61, 90, 254, 0.24), transparent 70%),
    radial-gradient(50vw 50vh at 92% 22%, rgba(0, 229, 255, 0.14), transparent 70%),
    radial-gradient(70vw 60vh at 80% 62%, rgba(161, 61, 255, 0.24), transparent 70%),
    radial-gradient(60vw 60vh at 12% 92%, rgba(255, 46, 147, 0.22), transparent 70%);
  background-size: 26px 26px, 100% 100%, 100% 100%, 100% 100%, 100% 100%;
}

a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
::selection { background: var(--pink); color: var(--ink); }
:focus-visible { outline: 3px solid var(--pink); outline-offset: 3px; border-radius: 6px; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: max(var(--pad), env(safe-area-inset-left));
  padding-right: max(var(--pad), env(safe-area-inset-right));
}

.for-dark { display: none; }
:root[data-theme="dark"] .for-light { display: none; }
:root[data-theme="dark"] .for-dark { display: block; }

/* ---------- the sticker ---------- */

.pop {
  border: 3px solid var(--ink);
  border-radius: 20px;
  color: var(--on, var(--ink));
  background: var(--c, var(--surface));
  box-shadow: 5px 6px 0 var(--ink);
}
:root[data-theme="dark"] .pop {
  --glow: var(--c, var(--cyan));
  border: 2px solid var(--glow);
  color: var(--text);
  background: color-mix(in srgb, var(--glow) 14%, #1A0B2E);
  box-shadow: 0 0 22px color-mix(in srgb, var(--glow) 55%, transparent), inset 0 0 18px color-mix(in srgb, var(--glow) 14%, transparent);
}

/* ---------- type ---------- */

.h {
  margin: 0;
  font: 700 clamp(40px, 5.6vw, 78px)/1.08 var(--display);
  letter-spacing: -0.015em;
}
.h--xl { font-size: clamp(58px, 9.4vw, 138px); line-height: 1; }
:root[data-theme="dark"] .h { text-shadow: 0 0 0.32em rgba(255, 255, 255, 0.5); }

.pill {
  display: inline-block;
  padding: 0.02em 0.26em 0.08em;
  border: 0.05em solid var(--ink);
  border-radius: 0.26em;
  color: var(--on, var(--ink));
  background: var(--c, var(--yellow));
  box-shadow: 0.06em 0.07em 0 var(--ink);
  rotate: -2deg;
  text-shadow: none;
}
:root[data-theme="dark"] .pill {
  border-color: transparent;
  box-shadow: 0 0 0.5em color-mix(in srgb, var(--c, var(--yellow)) 75%, transparent);
  text-shadow: none;
}

.kicker {
  margin: 0;
  font: 600 13px/1.3 var(--display);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
}

.body {
  max-width: 31em;
  margin: 22px 0 0;
  font-size: clamp(16px, 1.35vw, 18px);
  color: var(--dim);
}

.soon {
  display: inline-flex;
  align-items: center;
  height: 52px;
  padding: 0 24px;
  border: 3px solid var(--ink);
  border-radius: 16px;
  color: var(--ink);
  background: var(--c);
  box-shadow: 4px 5px 0 var(--ink);
  font: 600 17px/1 var(--display);
  white-space: nowrap;
}
:root[data-theme="dark"] .soon {
  border-color: transparent;
  box-shadow: 0 0 26px color-mix(in srgb, var(--c) 70%, transparent);
}

/* ---------- floating icons: a neon cut and a sticker cut of each ---------- */

.i-bolt { --l: url(/assets/forma/icons/bolt-l.webp); --d: url(/assets/forma/icons/bolt-d.webp); }
.i-bell { --l: url(/assets/forma/icons/bell-l.webp); --d: url(/assets/forma/icons/bell-d.webp); }
.i-star { --l: url(/assets/forma/icons/star-l.webp); --d: url(/assets/forma/icons/star-d.webp); }
.i-heart { --l: url(/assets/forma/icons/heart-l.webp); --d: url(/assets/forma/icons/heart-d.webp); }
.i-sparkle { --l: url(/assets/forma/icons/sparkle-l.webp); --d: url(/assets/forma/icons/sparkle-d.webp); }
.i-sparkles { --l: url(/assets/forma/icons/sparkles-l.webp); --d: url(/assets/forma/icons/sparkles-d.webp); }
.i-bulb { --l: url(/assets/forma/icons/lightbulb-l.webp); --d: url(/assets/forma/icons/lightbulb-d.webp); }
.i-pencil { --l: url(/assets/forma/icons/pencil-l.webp); --d: url(/assets/forma/icons/pencil-d.webp); }
.i-note { --l: url(/assets/forma/icons/stickynote-l.webp); --d: url(/assets/forma/icons/stickynote-d.webp); }
.i-plane { --l: url(/assets/forma/icons/paperplane-l.webp); --d: url(/assets/forma/icons/paperplane-d.webp); }
.i-clock { --l: url(/assets/forma/icons/clock-l.webp); --d: url(/assets/forma/icons/clock-d.webp); }
.i-check { --l: url(/assets/forma/icons/check-l.webp); --d: url(/assets/forma/icons/check-d.webp); }
.i-squiggle { --l: url(/assets/forma/icons/squiggle-l.webp); --d: url(/assets/forma/icons/squiggle-d.webp); }
.i-pop { --l: url(/assets/forma/icons/pop-l.webp); --d: url(/assets/forma/icons/pop-d.webp); }
.i-cart { --l: url(/assets/forma/icons/cart-l.webp); --d: url(/assets/forma/icons/cart-d.webp); }
.i-lock { --l: url(/assets/forma/icons/lock-l.webp); --d: url(/assets/forma/icons/lock-d.webp); }
.i-unlock { --l: url(/assets/forma/icons/unlock-l.webp); --d: url(/assets/forma/icons/unlock-d.webp); }
.i-inbox { --l: url(/assets/forma/icons/inbox-l.webp); --d: url(/assets/forma/icons/inbox-d.webp); }
.i-arrow { --l: url(/assets/forma/icons/arrowcurved-l.webp); --d: url(/assets/forma/icons/arrowcurved-d.webp); }

.ico, .ico-in, .ico-inline {
  background: var(--l) center / contain no-repeat;
}
:root[data-theme="dark"] .ico,
:root[data-theme="dark"] .ico-in,
:root[data-theme="dark"] .ico-inline { background-image: var(--d); }

.scene { position: relative; }
.ico {
  position: absolute;
  z-index: 0;
  left: var(--x);
  top: var(--y);
  width: var(--s);
  height: var(--s);
  rotate: var(--r, 0deg);
  pointer-events: none;
}
.ico-in { display: block; width: 100%; height: 100%; }

/* A deliberately uneven beat, so nothing moves in step */
.wobble { animation: wobble 2.7s ease-in-out infinite; }
.bob { animation: bob 3.3s ease-in-out infinite; }
.spin { animation: spin 11s linear infinite; }
.ring { animation: ring 3.1s ease-in-out infinite; transform-origin: 50% 12%; }
@keyframes wobble { 0%, 100% { transform: rotate(-7deg) scale(1); } 50% { transform: rotate(8deg) scale(1.06); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-15px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes ring {
  0%, 52%, 100% { transform: rotate(0); }
  58% { transform: rotate(18deg); }
  66% { transform: rotate(-16deg); }
  74% { transform: rotate(11deg); }
  82% { transform: rotate(-7deg); }
  90% { transform: rotate(3deg); }
}

/* ---------- top bar ---------- */

.top {
  position: sticky;
  top: 0;
  z-index: 50;
  padding-top: env(safe-area-inset-top);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 2px solid transparent;
  transition: border-color 0.3s;
}
.top.is-scrolled { border-bottom-color: var(--line); }
.top__inner { display: flex; align-items: center; justify-content: space-between; gap: 14px; height: 68px; }
.top__id { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand { display: block; flex: none; transition: transform 0.35s var(--spring); }
.brand:hover { transform: rotate(-3deg) scale(1.06); }
.brand img { width: 104px; height: auto; }
.top__by { font: 500 13px/1 var(--display); color: var(--dim); white-space: nowrap; }
.top__by:hover { color: var(--text); }
.top__nav { display: flex; align-items: center; gap: clamp(10px, 2vw, 24px); }
.top__link { font: 500 15px/1 var(--display); color: var(--dim); transition: color 0.2s; }
.top__link:hover { color: var(--text); }

.calm {
  height: 38px;
  padding: 0 14px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  color: var(--ink);
  background: var(--yellow);
  box-shadow: 2px 3px 0 var(--ink);
  font: 600 14px/1 var(--display);
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.25s var(--spring);
}
.calm:hover { transform: rotate(-3deg) scale(1.05); }
.calm[aria-pressed="true"] { background: var(--surface); color: var(--text); }
:root[data-theme="dark"] .calm { border-color: transparent; box-shadow: 0 0 16px rgba(255, 230, 0, 0.55); }
:root[data-theme="dark"] .calm[aria-pressed="true"] { border-color: var(--line); box-shadow: none; }

.toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: none;
  cursor: pointer;
  transition: transform 0.25s var(--spring), border-color 0.2s;
}
.toggle:hover { border-color: var(--dim); transform: rotate(8deg); }
.toggle__icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.toggle__icon--sun,
:root[data-theme="dark"] .toggle__icon--moon { display: none; }
:root[data-theme="dark"] .toggle__icon--sun { display: block; }

/* ---------- hero ---------- */

.hero { padding: clamp(28px, 4vw, 56px) 0 clamp(56px, 7vw, 96px); overflow: clip; }
.hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  align-items: center;
  gap: clamp(32px, 4vw, 64px);
}
.hero h1 { margin-top: 16px; font-size: clamp(58px, 7.6vw, 112px); }
.lede { max-width: 28em; margin: 26px 0 0; font-size: clamp(17px, 1.5vw, 20px); color: var(--dim); }
.hero__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 22px; margin-top: 32px; }
.hint { display: inline-flex; align-items: center; gap: 8px; font: 500 15px/1.2 var(--display); color: var(--dim); }
.ico-inline { flex: none; width: 34px; height: 34px; }

.bounce { display: inline-block; white-space: nowrap; }
.bounce .ch-l { display: inline-block; white-space: pre; }

/* The board */
.board {
  padding: 14px;
  border: 3px solid var(--ink);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: 7px 8px 0 var(--ink);
  position: relative;
  /* Room on its right for the "Try them!" nudge, when the page margin alone isn't enough */
  margin-right: max(0px, calc(132px - max(var(--pad), (100vw - var(--max)) / 2 + var(--pad))));
}
:root[data-theme="dark"] .board {
  border: 2px solid var(--cyan);
  background: rgba(18, 7, 31, 0.6);
  box-shadow: 0 0 34px rgba(0, 229, 255, 0.45), inset 0 0 26px rgba(0, 229, 255, 0.08);
}
.board__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 2px 4px 12px; }
.board__title { margin: 0; font: 600 18px/1 var(--display); }
/* A nudge at the buttons from just outside the board, gone once they've been used */
.try {
  position: absolute;
  z-index: 3;
  top: 12px;
  left: calc(100% + 18px);
  display: flex;
  align-items: center;
  gap: 8px;
  width: 104px;
  margin: 0;
  font: 700 17px/1.1 var(--display);
  color: var(--text);
  transition: opacity 0.4s var(--out);
  animation: try-nudge 1.5s ease-in-out infinite;
}
.try .ico-inline { width: 42px; height: 42px; rotate: -32deg; transform: scaleX(-1); }
.try.is-done { opacity: 0; animation: none; pointer-events: none; }
@keyframes try-nudge { 50% { transform: translateX(-7px); } }
@keyframes try-nudge-up { 50% { transform: translateY(-4px); } }
.seg { display: flex; gap: 6px; }
.seg__btn {
  height: 38px;
  padding: 0 14px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  color: var(--ink);
  background: #fff;
  font: 600 14px/1 var(--display);
  cursor: pointer;
  transition: transform 0.25s var(--spring), background-color 0.2s;
}
.seg__btn:hover { transform: translateY(-2px) rotate(-2deg); }
.seg__btn[aria-pressed="true"] { background: var(--yellow); box-shadow: 2px 3px 0 var(--ink); }
:root[data-theme="dark"] .seg__btn { border-color: var(--line); color: var(--text); background: transparent; }
:root[data-theme="dark"] .seg__btn[aria-pressed="true"] { border-color: transparent; color: var(--ink); background: var(--yellow); box-shadow: 0 0 16px rgba(255, 230, 0, 0.55); }

.board__notes {
  position: relative;
  height: clamp(480px, 46vw, 600px);
}

.note {
  position: absolute;
  left: calc(var(--px, 0) * 1%);
  top: calc(var(--py, 0) * 1%);
  width: 44%;
  padding: 12px 13px;
  border: 3px solid var(--ink);
  border-radius: 16px;
  color: var(--on);
  background: var(--c);
  box-shadow: 4px 5px 0 var(--ink);
  font: 600 clamp(12.5px, 1.1vw, 14.5px)/1.34 var(--sans);
  rotate: var(--nr, 0deg);
  cursor: grab;
  touch-action: pan-y; /* a swipe up or down still scrolls the page on a phone */
  user-select: none;
  -webkit-user-select: none;
  transition: left 0.7s var(--spring), top 0.7s var(--spring), rotate 0.5s var(--spring), scale 0.25s var(--spring), box-shadow 0.2s;
}
.note:hover { scale: 1.03; }
.note.is-held { z-index: 40; scale: 1.08; cursor: grabbing; box-shadow: 9px 12px 0 var(--ink); transition: rotate 0.2s, scale 0.2s, box-shadow 0.2s; }
.note--loud { font-weight: 700; text-align: center; }
.note strong { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.note ul { list-style: none; margin: 6px 0 0; padding: 0; font-weight: 500; }
.note li { position: relative; padding-left: 18px; }
.note li::before { content: ""; position: absolute; left: 0; top: 0.26em; width: 11px; height: 11px; border: 2px solid currentColor; border-radius: 50%; }
.note li.is-done { text-decoration: line-through; opacity: 0.55; }
.note li.is-done::before { background: currentColor; }
.note--photo { padding: 0; overflow: hidden; }
.note--photo img { width: 100%; height: auto; pointer-events: none; }
.note--photo span { display: block; padding: 7px 10px; text-align: center; }
.tally { padding: 1px 8px; border: 2px solid currentColor; border-radius: 99px; font: 600 12px/1.3 var(--display); }

:root[data-theme="dark"] .note {
  border: 2px solid var(--c);
  color: var(--text);
  background: color-mix(in srgb, var(--c) 15%, #1A0B2E);
  box-shadow: 0 0 16px color-mix(in srgb, var(--c) 55%, transparent);
}
:root[data-theme="dark"] .note.c-white { --c: #E4D8FF; }
:root[data-theme="dark"] .note.is-held { box-shadow: 0 0 34px color-mix(in srgb, var(--c) 85%, transparent); }

/* Highlighted words: the marker runs across them */
.hl {
  padding: 0 0.14em;
  border-radius: 0.2em;
  color: var(--ink);
  background: linear-gradient(var(--hl, var(--pink)), var(--hl, var(--pink))) 0 0 / 100% 100% no-repeat;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* ---------- tape ---------- */

.tapes { position: relative; z-index: 3; height: 128px; margin: clamp(-18px, -1vw, 0px) 0 0; overflow: clip; pointer-events: none; }
.tape {
  position: absolute;
  z-index: 2;
  left: -4%;
  right: -4%;
  top: 26px;
  overflow: hidden;
  padding: 11px 0 12px;
  border-block: 3px solid var(--ink);
  color: var(--ink);
  background: var(--c);
  rotate: -1.8deg;
  font: 700 22px/1 var(--display);
  white-space: nowrap;
}
.tape--back { z-index: 1; top: 40px; rotate: 2deg; }
:root[data-theme="dark"] .tape { border-color: transparent; box-shadow: 0 0 26px color-mix(in srgb, var(--c) 65%, transparent); }
.tape__run { display: inline-block; animation: tape 34s linear infinite; }
.tape--back .tape__run { animation-direction: reverse; animation-duration: 42s; }
@keyframes tape { to { transform: translateX(-50%); } }

/* ---------- screenshots ---------- */

.band { position: relative; padding: clamp(40px, 6vw, 80px) 0 clamp(16px, 3vw, 32px); }
.band__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: clamp(24px, 3vw, 40px); }
.band h2 { margin-top: 12px; }
.band__hint { display: none; margin: 0; font: 500 15px/1.2 var(--display); color: var(--dim); }

.shots__track {
  display: flex;
  gap: clamp(14px, 1.6vw, 22px);
  list-style: none;
  margin: 0;
  padding: 16px max(var(--pad), calc((100vw - var(--max)) / 2 + var(--pad))) 30px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-padding-inline: max(var(--pad), calc((100vw - var(--max)) / 2 + var(--pad)));
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.shots__track::-webkit-scrollbar { display: none; }
.shots__track li {
  flex: none;
  width: clamp(220px, 23vw, 290px);
  scroll-snap-align: start;
  rotate: -1.6deg;
  transition: rotate 0.4s var(--spring), scale 0.4s var(--spring);
}
.shots__track li:nth-child(even) { rotate: 1.6deg; }
.shots__track li:hover { rotate: 0deg; scale: 1.03; }
.shots__track img {
  width: 100%;
  height: auto;
  border-radius: clamp(22px, 2.4vw, 30px);
  box-shadow: 0 0 0 3px var(--ink), 6px 8px 0 3px var(--ink);
  user-select: none;
  -webkit-user-drag: none;
}
:root[data-theme="dark"] .shots__track img { box-shadow: 0 0 26px rgba(161, 61, 255, 0.6); }

@media (hover: hover) and (pointer: fine) {
  .band__hint { display: block; }
  .shots__track { cursor: grab; scroll-snap-type: none; }
  .shots__track.is-dragging { cursor: grabbing; }
}

/* ---------- chapters ---------- */

.ch { padding-top: clamp(72px, 9vw, 128px); }
.ch__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(32px, 6vw, 96px);
}
.ch--flip .ch__text { order: 2; }
.ch .h { margin-top: 14px; }

.ticks { list-style: none; max-width: 31em; margin: 26px 0 0; padding: 0; }
.ticks li {
  position: relative;
  padding: 10px 0 10px 34px;
  border-top: 2px dashed var(--line);
  font-weight: 500;
}
.ticks li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 12px;
  width: 20px;
  height: 20px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--c);
}
:root[data-theme="dark"] .ticks li::before { border-color: transparent; box-shadow: 0 0 10px var(--c); }

/* The colored stage each clip or demo stands on: the kit's stripes */
.stage {
  display: flex;
  justify-content: center;
  margin: 0;
  padding: clamp(28px, 4vw, 52px) clamp(20px, 3vw, 40px);
  border: 3px solid var(--ink);
  border-radius: 34px;
  background:
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.24) 0 14px, transparent 14px 30px),
    var(--c);
  box-shadow: 7px 8px 0 var(--ink);
  rotate: 1.4deg;
}
.ch--flip .stage { rotate: -1.4deg; }
:root[data-theme="dark"] .stage {
  border: 2px solid var(--c);
  background:
    repeating-linear-gradient(-45deg, color-mix(in srgb, var(--c) 10%, transparent) 0 14px, transparent 14px 30px),
    rgba(18, 7, 31, 0.6);
  box-shadow: 0 0 36px color-mix(in srgb, var(--c) 50%, transparent), inset 0 0 30px color-mix(in srgb, var(--c) 10%, transparent);
}

.phone {
  width: min(100%, 300px);
  overflow: hidden;
  border: 9px solid var(--ink);
  border-radius: 46px;
  background: var(--ink);
  box-shadow: 6px 8px 0 rgba(26, 11, 46, 0.85);
  rotate: -3deg;
  transform: translateZ(0);
  transition: rotate 0.5s var(--spring), scale 0.5s var(--spring);
}
.ch--flip .phone { rotate: 3deg; }
.stage:hover .phone { rotate: 0deg; scale: 1.02; }
.phone video { width: 100%; height: auto; }
:root[data-theme="dark"] .phone { border-color: #000; box-shadow: 0 0 30px color-mix(in srgb, var(--c) 70%, transparent); }

/* ---------- try-it demos ---------- */

.stage--demo { padding: clamp(24px, 4vw, 48px); }

.list { --c: #fff; --on: var(--ink); width: min(100%, 400px); padding: 20px; rotate: -1.5deg; }
:root[data-theme="dark"] .list { --c: var(--lime); }
.list__head { display: flex; align-items: center; justify-content: space-between; font: 700 24px/1.1 var(--display); }
.list__head .tally { font-size: 14px; transition: scale 0.3s var(--spring); }
.list__head .tally.is-bump { scale: 1.3; }
.list__bar { height: 10px; margin: 12px 0 8px; border: 2px solid currentColor; border-radius: 99px; overflow: hidden; }
.list__bar span { display: block; height: 100%; width: 25%; background: currentColor; transition: width 0.5s var(--spring); }
.list__items { list-style: none; margin: 0; padding: 0; }
.list__items li { overflow: hidden; transition: max-height 0.4s var(--out), opacity 0.3s; max-height: 60px; }
.list__items li.is-gone { max-height: 0; opacity: 0; }
.list__items label { display: flex; align-items: center; gap: 12px; padding: 9px 0; font-weight: 500; cursor: pointer; }
.list__items input {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  width: 24px;
  height: 24px;
  margin: 0;
  border: 2.5px solid currentColor;
  border-radius: 50%;
  background: transparent center / 14px no-repeat;
  cursor: pointer;
  transition: scale 0.3s var(--spring), background-color 0.15s;
}
.list__items input:hover { scale: 1.14; }
.list__items input:checked {
  background-color: var(--ink);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5 6.5 12 13 4.5' fill='none' stroke='%23fff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  scale: 1.08;
}
:root[data-theme="dark"] .list__items input:checked { border-color: var(--lime); background-color: var(--lime); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5 6.5 12 13 4.5' fill='none' stroke='%231A0B2E' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.list__items span { background: linear-gradient(currentColor, currentColor) 0 55% / 0 2px no-repeat; transition: background-size 0.3s var(--out), opacity 0.3s; }
.list__items input:checked + span { background-size: 100% 2px; opacity: 0.55; }
.list__clear {
  display: block;
  width: 100%;
  height: 44px;
  margin-top: 12px;
  border: 2.5px solid currentColor;
  border-radius: 12px;
  background: none;
  font: 600 15px/1 var(--display);
  cursor: pointer;
  transition: transform 0.25s var(--spring);
}
.list__clear:hover { transform: rotate(-1deg) scale(1.02); }

.marker { --c: #fff; --on: var(--ink); width: min(100%, 420px); padding: 22px; rotate: 1.2deg; }
.marker__note { margin: 0; font: 600 20px/1.45 var(--sans); transition: font-size 0.3s var(--spring); }
.marker__note.is-bold { font-weight: 800; }
.marker__note.is-italic { font-style: italic; }
.marker__note.is-big { font-size: 27px; }
.marker__tools { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 20px; padding-top: 16px; border-top: 2px dashed var(--line); }
.marker__swatches, .marker__styles { display: flex; gap: 8px; }
.dot {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 2.5px solid var(--ink);
  border-radius: 50%;
  background: var(--c);
  cursor: pointer;
  transition: scale 0.25s var(--spring);
}
.dot:hover { scale: 1.14; }
.dot[aria-pressed="true"] { outline: 3px solid currentColor; outline-offset: 2px; }
:root[data-theme="dark"] .dot { border-color: transparent; box-shadow: 0 0 10px var(--c); }
.tool {
  width: 38px;
  height: 34px;
  padding: 0;
  border: 2.5px solid currentColor;
  border-radius: 10px;
  background: none;
  font: 600 15px/1 var(--sans);
  cursor: pointer;
  transition: transform 0.25s var(--spring);
}
.tool:hover { transform: translateY(-2px); }
.tool[aria-pressed="true"] { color: var(--ink); background: var(--yellow); border-color: var(--ink); }
.marker .hl { transition: background 0.2s; }

/* ---------- spaces ---------- */

.spaces { padding-top: clamp(80px, 10vw, 140px); }
.spaces__head .h { margin-top: 14px; }
.tiles {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: clamp(12px, 1.6vw, 22px);
  list-style: none;
  margin: clamp(32px, 4vw, 52px) 0 0;
  padding: 0;
}
.tile strong { display: block; margin-top: 10px; font: 600 16px/1.2 var(--display); }
.tile__art {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  padding: 22%;
  border: 3px solid var(--ink);
  border-radius: 24%;
  background:
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.26) 0 8px, transparent 8px 18px),
    var(--c);
  box-shadow: 4px 5px 0 var(--ink);
  transition: rotate 0.35s var(--spring), scale 0.35s var(--spring);
}
.tile:nth-child(odd) .tile__art { rotate: -3deg; }
.tile:nth-child(even) .tile__art { rotate: 3deg; }
.tile:hover .tile__art { rotate: 0deg; scale: 1.08; }
:root[data-theme="dark"] .tile__art {
  border: 2px solid var(--c);
  background: color-mix(in srgb, var(--c) 14%, #1A0B2E);
  box-shadow: 0 0 22px color-mix(in srgb, var(--c) 55%, transparent);
}

/* ---------- privacy: always the night look ---------- */

#private { padding-top: clamp(80px, 10vw, 140px); }
.vault {
  display: grid;
  grid-template-columns: auto 1.3fr 0.7fr;
  align-items: center;
  gap: clamp(24px, 4vw, 56px);
  padding: clamp(28px, 5vw, 72px);
  border-radius: 36px;
  color: #F7F0FF;
  background:
    radial-gradient(60% 90% at 90% 0%, rgba(0, 229, 255, 0.22), transparent 70%),
    radial-gradient(60% 90% at 0% 100%, rgba(255, 46, 147, 0.28), transparent 70%),
    #12071F;
  box-shadow: 7px 8px 0 var(--ink);
}
:root[data-theme="dark"] .vault { box-shadow: 0 0 40px rgba(182, 255, 26, 0.3); outline: 2px solid var(--lime); }
.vault .kicker, .vault .body { color: #BBA9D8; }
.vault .h { margin-top: 14px; text-shadow: 0 0 0.32em rgba(255, 255, 255, 0.5); }
.vault .pill { border-color: transparent; box-shadow: 0 0 0.5em color-mix(in srgb, var(--c) 75%, transparent); }
.vault__lock {
  width: clamp(84px, 9vw, 124px);
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  transition: rotate 0.4s var(--spring), scale 0.4s var(--spring);
}
.vault__lock:hover { rotate: -8deg; scale: 1.08; }
.vault__lock .ico-in { background-image: var(--d); }
.vault__list { display: grid; gap: 12px; list-style: none; margin: 0; padding: 0; }
.vault__list .pop {
  --glow: var(--c);
  padding: 11px 16px;
  border: 2px solid var(--c);
  border-radius: 14px;
  color: #F7F0FF;
  background: color-mix(in srgb, var(--c) 14%, #1A0B2E);
  box-shadow: 0 0 16px color-mix(in srgb, var(--c) 50%, transparent);
  font: 600 16px/1.2 var(--display);
}
.vault__list li:nth-child(odd) { rotate: -1.4deg; }
.vault__list li:nth-child(even) { rotate: 1.4deg; }

/* ---------- closing ---------- */

.closer { padding: clamp(96px, 12vw, 170px) 0 clamp(80px, 11vw, 150px); overflow: clip; text-align: center; }
.closer__inner { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; }
.closer__icon {
  width: clamp(120px, 14vw, 180px);
  margin-bottom: 30px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  filter: drop-shadow(0 18px 34px rgba(161, 61, 255, 0.55));
  animation: wobble 2.7s ease-in-out infinite;
}
.closer__icon img { width: 100%; height: auto; }
.closer .body { margin-inline: auto; margin-bottom: 30px; }

/* ---------- footer ---------- */

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-top: 36px;
  padding-bottom: calc(36px + env(safe-area-inset-bottom));
  border-top: 2px dashed var(--line);
}
.foot .brand img { width: 120px; }
.foot__id p { margin: 10px 0 0; font-size: 14px; color: var(--dim); }
.foot__id p a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.foot__links { display: flex; flex-wrap: wrap; gap: 10px 24px; font: 500 15px/1.2 var(--display); color: var(--dim); }
.foot__links a:hover { color: var(--text); }

/* ---------- entrances ---------- */

.reveal [data-pop] {
  opacity: 0;
  transform: translateY(26px) scale(0.92) rotate(-1.5deg);
  transition: opacity 0.45s var(--out), transform 0.8s var(--spring);
}
.reveal [data-pop].is-in { opacity: 1; transform: none; }

/* Headline letters jump in one at a time */
.reveal .bounce .ch-l { opacity: 0; transform: translateY(0.6em) rotate(8deg) scale(0.7); transition: opacity 0.2s, transform 0.7s var(--spring); transition-delay: calc(var(--i) * 38ms + 120ms); }
.reveal .bounce.is-in .ch-l { opacity: 1; transform: none; }

/* Highlight words get slammed down like a stamp, once their heading is in */
.reveal .slam { opacity: 0; transform: scale(2.2) rotate(9deg); transition: opacity 0.12s, transform 0.5s cubic-bezier(0.2, 1.5, 0.4, 1); transition-delay: 0.38s; }
.reveal .slam.is-in { opacity: 1; transform: none; }

/* Notes get thrown onto the board */
.reveal .note { opacity: 0; transform: translateY(70px) scale(0.5) rotate(18deg); }
.reveal .note.is-landed {
  opacity: 1;
  transform: none;
  transition: left 0.7s var(--spring), top 0.7s var(--spring), rotate 0.5s var(--spring), scale 0.25s var(--spring), box-shadow 0.2s, opacity 0.2s, transform 0.75s var(--spring);
  transition-delay: 0s;
}

.reveal .tile[data-pop] { transform: translateY(-110px) rotate(14deg) scale(0.8); transition-delay: calc(var(--i, 0) * 70ms); }
.reveal .tile[data-pop].is-in { transform: none; }

/* ---------- the loud layer ---------- */

/* The opening: a wall of app-colored tiles, the wordmark slams on, then every tile pops */
.tiles-in { display: none; }
.intro .tiles-in {
  display: block;
  position: fixed;
  z-index: 100;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  animation: gone 0.01s linear 1.9s forwards;
}
@keyframes gone { to { visibility: hidden; } }
.tiles-in i {
  position: absolute;
  width: 14.8%;
  height: 20.6%;
  animation: tile-pop 0.42s cubic-bezier(0.5, -0.5, 0.7, 0.4) var(--d) forwards;
}
@keyframes tile-pop { to { transform: scale(0) rotate(40deg); } }
.tiles-in img {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  width: min(62vw, 520px);
  height: auto;
  translate: -50% -50%;
  animation: mark-slam 0.5s cubic-bezier(0.2, 1.5, 0.4, 1) both, mark-out 0.3s ease-in 0.82s forwards;
}
@keyframes mark-slam { from { transform: scale(2.6) rotate(-12deg); opacity: 0; } }
@keyframes mark-out { to { transform: scale(0.2) rotate(14deg); opacity: 0; } }

/* The thoughts, behind everything */
.noise { position: fixed; z-index: -1; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* The noise meter: empties as you scroll */
.meter { display: flex; align-items: center; gap: 2px; }
.meter b { margin-right: 6px; font: 600 13px/1 var(--display); color: var(--dim); }
.meter i { width: 5px; height: 18px; border-radius: 2px; background: var(--line); transition: background-color 0.25s, scale 0.3s var(--spring); }
.meter i.is-on { scale: 1 1.14; }
.meter i:nth-of-type(-n+3).is-on { background: var(--lime); }
.meter i:nth-of-type(n+4):nth-of-type(-n+7).is-on { background: var(--yellow); }
.meter i:nth-of-type(n+8).is-on { background: var(--pink); }

/* Light confetti's shockwave */
.pow {
  position: fixed;
  z-index: 89;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border: 4px solid var(--c, var(--pink));
  border-radius: 50%;
  pointer-events: none;
}

/* Every heading's letters jump in; in the dark they flicker on like a neon sign */
.wd { display: inline-block; white-space: nowrap; }
.ltr, .ch-l { display: inline-block; transition: transform 0.4s var(--spring); }
.reveal .ltr {
  opacity: 0;
  transform: translateY(0.55em) rotate(9deg) scale(0.7);
  transition: opacity 0.2s, transform 0.7s var(--spring);
  transition-delay: calc(var(--i, 0) * 24ms + 60ms);
}
.reveal .is-in .ltr { opacity: 1; transform: none; }
:root[data-theme="dark"].reveal .is-in .ltr { animation: neon-on 0.85s steps(1) calc(var(--i, 0) * 26ms + 60ms) both; }
@keyframes neon-on {
  0% { opacity: 0; }
  20% { opacity: 1; }
  28% { opacity: 0.15; }
  44% { opacity: 1; }
  52% { opacity: 0.3; }
  64%, 100% { opacity: 1; }
}
/* Run the pointer along a heading and the letters hop */
.is-in .ltr:hover,
.is-in .ch-l:hover,
[data-calm] .ltr:hover { transform: translateY(-0.13em) rotate(-7deg) scale(1.08); transition-delay: 0s; }

/* Highlight pills are made of jelly */
.pill { transition: scale 0.3s var(--spring); }
.pill:hover { animation: jelly 0.65s; }
.tile:hover .tile__art { animation: jelly 0.65s; }
@keyframes jelly {
  0% { scale: 1 1; }
  25% { scale: 1.16 0.86; }
  45% { scale: 0.9 1.12; }
  65% { scale: 1.06 0.95; }
  82% { scale: 0.98 1.03; }
  100% { scale: 1 1; }
}

/* Loose icons drift away from the pointer, each at its own depth; click one and it pops */
.ico { will-change: translate; transition: opacity 0.2s, scale 0.35s var(--spring); }
.ico.is-popped { scale: 0; opacity: 0; }

/* Surfaces lean toward the pointer */
[data-tilt].is-tilting { transition: transform 0.12s linear !important; }
.phone { will-change: translate; }

/* Notes follow the hand exactly, and fly when thrown */
.note.is-held,
.reveal .note.is-landed.is-held,
.reveal .note.is-landed.is-flying,
.note.is-flying { transition: rotate 0.2s, scale 0.2s, box-shadow 0.2s, opacity 0.2s, transform 0.75s var(--spring); }
.board.is-hit { animation: board-hit 0.45s; }
@keyframes board-hit {
  20% { transform: translate(-5px, 4px) rotate(-0.7deg); }
  45% { transform: translate(4px, -3px) rotate(0.5deg); }
  70% { transform: translate(-2px, 2px); }
}

/* The care-free lock slams shut */
.vault__lock.is-slam { animation: lock-slam 0.6s var(--spring); }
@keyframes lock-slam { 0% { transform: scale(1.7) rotate(-14deg); } 100% { transform: none; } }

/* Scatter to Snap, big: on a large screen the screenshots start as a pile and get dealt out */
.band.is-pinned .band__pin {
  position: sticky;
  top: 68px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: calc(100vh - 68px);
  overflow: hidden;
}
.band.is-pinned .band__head { width: 100%; }
.band.is-pinned { padding: 0; }
.band.is-pinned .shots__track {
  position: relative;
  display: block;
  overflow: visible;
  height: calc((100vh - 335px));
  padding: 0;
  cursor: default;
}
.band.is-pinned .shots__track li {
  position: absolute;
  top: 0;
  left: 0;
  width: calc((100vh - 335px) * 0.4613);
  rotate: 0deg;
  scale: 1;
  transition: none;
  will-change: transform;
}

/* ---------- calm: holds still ---------- */

[data-calm] *,
[data-calm] *::before,
[data-calm] *::after {
  animation: none !important;
  transition-duration: 0.01ms !important;
  transition-delay: 0s !important;
}
[data-calm] { scroll-behavior: auto; }
/* The tiles only leave by animating, so with animation off they must not show at all */
[data-calm] .tiles-in { display: none !important; }
[data-calm] [data-pop],
[data-calm] .ch-l,
[data-calm] .slam,
[data-calm] .note,
[data-calm] .ltr { opacity: 1 !important; transform: none !important; }
[data-calm] .tape { transform: rotate(0) !important; }

/* ---------- small screens ---------- */

/* Too tight for the hero's loose icons: they'd land on the text */
@media (max-width: 1180px) {
  .hero .wide { display: none; }
}

@media (max-width: 1000px) {
  .tiles { grid-template-columns: repeat(3, 1fr); }
  .vault { grid-template-columns: auto 1fr; }
  .vault__list { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .hero__grid, .ch__grid { grid-template-columns: minmax(0, 1fr); }
  .ch--flip .ch__text { order: 0; }
  .top__link { display: none; }
  .meter { display: none; }
  .wide { display: none; }
  .ico { --s: 60px !important; }
  .ch .ico { left: auto; right: 4%; top: clamp(40px, 8vw, 80px); }
  .h--xl,
  .hero h1 { font-size: clamp(58px, 15vw, 120px); }
  .board__notes { height: 560px; }
  /* The board fills the width here: sit under the buttons, pointing up */
  .board { margin-right: 0; }
  .board__bar { flex-wrap: wrap; row-gap: 6px; }
  .try { position: static; order: 3; width: 100%; flex-direction: row-reverse; justify-content: flex-start; padding-right: 8px; font-size: 15px; animation-name: try-nudge-up; }
  .try .ico-inline { width: 30px; height: 30px; rotate: 0deg; transform: none; }
}

@media (max-width: 560px) {
  .top__by { display: none; }
  .brand img { width: 88px; }
  .board { padding: 10px; border-radius: 24px; }
  .note { font-size: 12px; padding: 9px 10px; border-radius: 13px; }
  .tape { font-size: 18px; }
  .tapes { height: 104px; }
  .stage { border-radius: 26px; }
  .phone { width: min(100%, 250px); border-width: 7px; border-radius: 38px; }
  .marker__note { font-size: 18px; }
  .marker__note.is-big { font-size: 24px; }
  .vault { grid-template-columns: 1fr; border-radius: 28px; }
  .closer .ico { display: none; }
}
