/* Layout concept: a clean white desk with a few pastel keycaps on it.
   One centred 1120px column, a split hero with a live Mac demo, then a bento grid of features. */
:root {
  --paper: #ffffff;
  --wash: #f6f6fa;
  --ink: #15151c;
  --muted: #6a6a7c;
  --line: #e9e9f1;
  --accent: #3b55f6;
  --accent-soft: #eef1ff;

  /* Sticker pastels: one per feature, never used for text */
  --mint: #d3f6e4;
  --lemon: #fff3b3;
  --lilac: #e8e0ff;
  --peach: #ffe2d4;
  --sky: #dcebff;

  --cap-edge: #d9d9e4;
  --shadow: 0 1px 2px rgba(21, 21, 28, .04), 0 12px 32px -12px rgba(21, 21, 28, .12);

  --font-display: "Bricolage Grotesque", ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
  --font-body: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --radius: 22px;
  --ease-pop: cubic-bezier(.34, 1.56, .64, 1);
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

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

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; letter-spacing: -.035em; line-height: 1.02; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(2.8rem, 7vw, 5.2rem); }
h2 { font-size: clamp(2rem, 4.4vw, 3.2rem); }
h3 { font-size: 1.35rem; letter-spacing: -.02em; line-height: 1.15; }
p { margin: 0; }
.lede { font-size: clamp(1.08rem, 1.6vw, 1.25rem); color: var(--muted); max-width: 34em; }
.eyebrow {
  font: 500 .78rem/1 var(--font-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
}
.muted { color: var(--muted); }

/* ---------- Keycap: the one recurring object on the page ---------- */
.kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2em;
  height: 2em;
  padding: 0 .5em;
  border-radius: .5em;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 2px 0 var(--cap-edge), 0 4px 10px -4px rgba(21, 21, 28, .12);
  font: 500 .9em/1 var(--font-mono);
  color: var(--ink);
  vertical-align: middle;
  transition: transform .12s ease, box-shadow .12s ease, background .2s;
}
.kbd.is-down, .kbd.press {
  transform: translateY(2px);
  box-shadow: 0 0 0 var(--cap-edge), 0 1px 3px -1px rgba(21, 21, 28, .15);
  background: var(--accent-soft);
}
.keys { display: inline-flex; align-items: center; gap: .3em; white-space: nowrap; }
.keys .plus { color: var(--muted); font: 400 .85em var(--font-mono); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .6em;
  height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: 500 1rem var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s var(--ease-pop), box-shadow .2s, background .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); color: var(--paper); box-shadow: 0 8px 20px -8px rgba(21, 21, 28, .5); }
.btn-ghost { background: var(--paper); color: var(--ink); border-color: var(--line); }
.btn .kbd { font-size: .72rem; height: 1.9em; min-width: 1.9em; box-shadow: 0 2px 0 #3a3a46; background: #2a2a33; border-color: #3a3a46; color: #fff; }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 20;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.nav.scrolled { border-bottom-color: var(--line); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--paper); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font: 700 1.15rem var(--font-display); letter-spacing: -.02em; text-decoration: none; }
.brand .kbd { font-size: .85rem; border-radius: 9px; background: var(--ink); color: var(--paper); border-color: var(--ink); box-shadow: 0 2px 0 #000; }
.brand:hover .kbd { animation: tap .5s ease; }
.nav-links { display: flex; align-items: center; gap: 28px; font-size: .95rem; }
.nav-links a { text-decoration: none; }
.nav-links a:not(.btn) { color: var(--muted); transition: color .2s; }
.nav-links a:not(.btn):hover { color: var(--ink); }
.nav .btn { height: 38px; padding: 0 16px; font-size: .9rem; }
@media (max-width: 760px) { .nav-links a:not(.btn) { display: none; } }

/* ---------- Hero ---------- */
.hero { position: relative; padding-block: clamp(48px, 8vw, 96px) 40px; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: clamp(32px, 5vw, 64px); align-items: center; }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) { .win { grid-template-columns: 92px 1fr; } .files { grid-template-columns: repeat(3, 1fr); } .mac-bar .menus span:nth-child(n+4) { display: none; } }
.hero-copy { display: flex; flex-direction: column; gap: 26px; min-width: 0; position: relative; z-index: 2; }
.hero h1 .wiggle { display: inline-block; color: var(--accent); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero-note { font-size: .9rem; color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.hero-note .kbd { font-size: .78rem; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; width: fit-content;
  padding: 6px 14px 6px 8px; border-radius: 999px;
  background: var(--wash); border: 1px solid var(--line);
  font-size: .85rem; color: var(--muted);
}
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: #2fc477; box-shadow: 0 0 0 4px rgba(47, 196, 119, .18); animation: pulse 2.4s ease-in-out infinite; }

/* Floating keycaps behind the hero */
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.confetti .kbd { position: absolute; font-size: .95rem; opacity: .9; animation: float 7s ease-in-out infinite; }
.confetti .kbd:nth-child(1) { left: 3%; top: 14%; background: var(--lemon); animation-delay: -1s; }
.confetti .kbd:nth-child(2) { left: 44%; top: 6%; background: var(--lilac); animation-delay: -3s; }
.confetti .kbd:nth-child(3) { left: 40%; bottom: 8%; background: var(--mint); animation-delay: -5s; }
.confetti .kbd:nth-child(4) { right: 3%; top: 4%; background: var(--peach); animation-delay: -2s; }
.confetti .kbd:nth-child(5) { right: 6%; bottom: 2%; background: var(--sky); animation-delay: -4s; }
@media (max-width: 900px) { .confetti .kbd:nth-child(2), .confetti .kbd:nth-child(3) { display: none; } }

/* The fake Mac */
.stage { position: relative; min-width: 0; z-index: 1; }
.mac {
  position: relative;
  border-radius: 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 2px 4px rgba(21, 21, 28, .04), 0 30px 70px -24px rgba(40, 50, 120, .28);
  overflow: hidden;
  font-size: .82rem;
  user-select: none;
}
.mac-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  height: 30px; padding: 0 12px;
  background: var(--wash); border-bottom: 1px solid var(--line);
  font-size: .76rem; color: var(--muted);
}
.mac-bar .menus { display: flex; gap: 14px; white-space: nowrap; overflow: hidden; }
.mac-bar .menus b { color: var(--ink); font-weight: 600; }
.mac-bar .status { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.kp-icon {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 6px;
  background: var(--paper); border: 1px solid var(--line); font: 500 .7rem var(--font-mono); color: var(--ink);
  transition: background .3s, color .3s;
}
.kp-icon.strict { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.win { display: grid; grid-template-columns: 128px 1fr; min-height: 300px; }
.win-side { background: #fbfbfd; border-right: 1px solid var(--line); padding: 12px 10px; display: flex; flex-direction: column; gap: 4px; }
.lights { display: flex; gap: 7px; padding: 2px 4px 14px; }
.lights i { width: 11px; height: 11px; border-radius: 50%; display: block; }
.lights i:nth-child(1) { background: #ff6159; }
.lights i:nth-child(2) { background: #ffbd2e; }
.lights i:nth-child(3) { background: #28c941; }
.win-side .label { font-size: .66rem; color: var(--muted); padding: 6px 6px 2px; font-weight: 600; }
.win-side .row { padding: 5px 8px; border-radius: 6px; color: var(--ink); white-space: nowrap; }
.win-side .row.on { background: var(--accent-soft); color: var(--accent); }
.win-main { display: flex; flex-direction: column; min-width: 0; }
.toolbar { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.tb { width: 28px; height: 26px; border-radius: 7px; display: grid; place-items: center; color: var(--muted); transition: background .2s, color .2s; }
.tb svg { width: 15px; height: 15px; }
.tb.hit { background: var(--accent-soft); color: var(--accent); }
.toolbar .title { font-weight: 600; margin-right: auto; padding-left: 6px; }
.files { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px 8px; padding: 18px 14px; }
.file { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: .7rem; color: var(--ink); text-align: center; }
.file .ic { width: 42px; height: 34px; border-radius: 6px 6px 8px 8px; background: #8ab4ff; position: relative; }
.file .ic::before { content: ""; position: absolute; left: 0; top: -5px; width: 18px; height: 8px; border-radius: 4px 4px 0 0; background: #8ab4ff; }
.file:nth-child(3n+2) .ic, .file:nth-child(3n+2) .ic::before { background: #a5d8c2; }
.file:nth-child(3n) .ic, .file:nth-child(3n) .ic::before { background: #f5c9a8; }
.file.new .ic { animation: popIn .5s var(--ease-pop) both; }

.cursor {
  position: absolute; left: 0; top: 0; width: 22px; height: 22px; z-index: 5;
  transform: translate(60%, 70%);
  transition: transform 1.1s cubic-bezier(.65, 0, .35, 1);
  pointer-events: none;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .25));
}
.cursor svg { display: block; width: 100%; height: 100%; transition: transform .12s; }
.cursor.click svg { transform: scale(.82); }
.ripple { position: absolute; left: 2px; top: 2px; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%; border: 2px solid var(--accent); opacity: 0; }
.cursor.click .ripple { animation: ripple .55s ease-out; }

.bubble {
  position: absolute; left: 0; top: 0; z-index: 6;
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px 9px 14px; border-radius: 14px;
  background: rgba(21, 21, 28, .92); color: #fff;
  font-size: .8rem; white-space: nowrap;
  box-shadow: 0 14px 30px -10px rgba(21, 21, 28, .5);
  opacity: 0; transform: translateY(6px) scale(.9); transform-origin: top left;
  transition: opacity .25s, transform .35s var(--ease-pop);
  pointer-events: none;
}
.bubble.show { opacity: 1; transform: none; }
.bubble .kbd { font-size: .72rem; background: #2a2a33; color: #fff; border-color: #3a3a46; box-shadow: 0 2px 0 #0c0c10; }
.bubble .plus { color: #8d8da0; }
.stage-caption { margin-top: 14px; font-size: .85rem; color: var(--muted); display: flex; gap: 8px; align-items: center; justify-content: center; text-align: center; }

/* ---------- Marquee of apps ---------- */
.strip { padding-block: 30px 10px; }
.strip p { text-align: center; font-size: .88rem; color: var(--muted); margin-bottom: 18px; }
.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
/* Two identical groups; each ends with the same 12px as its gap, so -50% lands exactly on the seam */
.marquee-track { display: flex; width: max-content; animation: slide var(--marquee-time, 46s) linear infinite; }
.marquee-group { display: flex; gap: 12px; padding-right: 12px; flex: none; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 10px 8px 10px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--paper);
  font-size: .9rem; white-space: nowrap;
}
.chip img, .chip .app-ic { flex: none; width: 20px; height: 20px; border-radius: 5px; }
.chip .app-ic:not(svg) { display: grid; place-items: center; background: var(--c); color: #fff; font: 600 .7rem var(--font-body); }
.chip .kbd { font-size: .74rem; }

/* ---------- Sections ---------- */
section { scroll-margin-top: 80px; }
.section { padding-block: clamp(72px, 10vw, 120px) 0; }
.section-head { display: flex; flex-direction: column; gap: 16px; max-width: 720px; margin-bottom: 44px; }

/* ---------- Bento ---------- */
.bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.card {
  position: relative; display: flex; flex-direction: column; gap: 10px;
  padding: 26px; border-radius: var(--radius);
  background: var(--wash); border: 1px solid var(--line);
  overflow: hidden; min-width: 0;
  transition: transform .35s var(--ease-pop), box-shadow .35s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card p { color: var(--muted); font-size: .98rem; }
.card .art { margin-top: auto; padding-top: 18px; min-height: 170px; display: flex; align-items: flex-end; justify-content: center; }
.span-3 { grid-column: span 3; }
.span-2 { grid-column: span 2; }
.span-4 { grid-column: span 4; }
.span-6 { grid-column: span 6; }
.tint-mint { background: linear-gradient(180deg, var(--paper), var(--mint)); }
.tint-lemon { background: linear-gradient(180deg, var(--paper), var(--lemon)); }
.tint-lilac { background: linear-gradient(180deg, var(--paper), var(--lilac)); }
.tint-peach { background: linear-gradient(180deg, var(--paper), var(--peach)); }
.tint-sky { background: linear-gradient(180deg, var(--paper), var(--sky)); }
@media (max-width: 900px) { .span-2, .span-3, .span-4 { grid-column: span 3; } }
@media (max-width: 640px) { .bento { grid-template-columns: minmax(0, 1fr); } .span-2, .span-3, .span-4, .span-6 { grid-column: auto; } }

/* Menu art */
.menu {
  width: min(100%, 300px); background: rgba(255, 255, 255, .9); border: 1px solid var(--line);
  border-radius: 12px; padding: 6px; box-shadow: var(--shadow); font-size: .86rem; position: relative;
}
.menu .item { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 32px; padding: 0 10px; border-radius: 7px; white-space: nowrap; }
.menu .item span:last-child { font-family: var(--font-mono); color: var(--muted); font-size: .8rem; }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 6px; }
.menu .hl { position: absolute; left: 6px; right: 6px; top: 6px; height: 32px; border-radius: 7px; background: var(--accent-soft); box-shadow: inset 0 0 0 1.5px var(--accent); z-index: 0; animation: menuWalk 6s steps(1) infinite; }

/* Tooltip art */
.tip-art { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.tip {
  padding: 7px 12px; border-radius: 9px; background: var(--ink); color: #fff; font-size: .82rem; white-space: nowrap;
  position: relative; animation: tipBob 4s ease-in-out infinite;
}
.tip::after { content: ""; position: absolute; left: 50%; bottom: -5px; width: 10px; height: 10px; background: var(--ink); transform: translateX(-50%) rotate(45deg); border-radius: 2px; }
.tip mark { background: transparent; color: #fff; position: relative; font-family: var(--font-mono); }
.tip mark::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 2px; background: #7d92ff; transform-origin: left; animation: scan 4s ease-in-out infinite; }
.iconbtns { display: flex; gap: 8px; padding: 8px; border-radius: 12px; background: var(--paper); border: 1px solid var(--line); }
.iconbtns i { width: 34px; height: 34px; border-radius: 8px; background: var(--wash); display: block; }
.iconbtns i.on { background: var(--accent-soft); outline: 2px solid var(--accent); outline-offset: -2px; }
.tip-result { font-size: .82rem; color: var(--muted); display: flex; gap: 6px; align-items: center; }

/* Tool list art */
.tools { width: 100%; height: 190px; overflow: hidden; mask-image: linear-gradient(180deg, transparent, #000 18%, #000 82%, transparent); -webkit-mask-image: linear-gradient(180deg, transparent, #000 18%, #000 82%, transparent); }
.tools-track { display: flex; flex-direction: column; gap: 8px; animation: rise 18s linear infinite; }
.tool { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; background: var(--paper); border: 1px solid var(--line); font-size: .88rem; }
.tool small { color: var(--muted); font-size: .76rem; }
.tool .kbd { font-size: .72rem; }

/* Mode switch art */
.modes { display: flex; flex-direction: column; align-items: center; gap: 16px; width: 100%; }
.switch { position: relative; display: grid; grid-template-columns: 1fr 1fr; width: min(100%, 260px); padding: 4px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); font-size: .88rem; font-weight: 500; }
.switch span { position: relative; z-index: 1; text-align: center; padding: 8px 0; transition: color .3s; }
.switch .knob { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 999px; background: var(--ink); transition: transform .45s var(--ease-pop); }
.switch.strict .knob { transform: translateX(100%); }
/* The knob is the first span, so the labels are the 2nd and 3rd */
.switch:not(.strict) span:nth-of-type(2), .switch.strict span:nth-of-type(3) { color: #fff; }
.mode-text { font-size: .85rem; color: var(--muted); text-align: center; min-height: 2.8em; max-width: 26em; }

/* Packs art */
.packs { position: relative; width: 220px; height: 170px; }
.pack {
  position: absolute; left: 50%; bottom: 0; width: 150px; height: 120px; margin-left: -75px;
  border-radius: 16px; border: 1px solid var(--line); background: var(--paper); box-shadow: var(--shadow);
  padding: 14px; display: flex; flex-direction: column; justify-content: space-between; font-weight: 600; font-size: .9rem;
  transform-origin: 50% 120%; transition: transform .5s var(--ease-pop);
}
.pack small { font: 400 .72rem var(--font-mono); color: var(--muted); }
.pack .swatch { width: 26px; height: 26px; border-radius: 8px; }
.pack:nth-child(1) { transform: rotate(-12deg) translateX(-30px) translateY(-18px); }
.pack:nth-child(2) { transform: rotate(-4deg) translateX(-10px) translateY(-8px); }
.pack:nth-child(3) { transform: rotate(4deg) translateX(12px); }
.pack:nth-child(4) { transform: rotate(10deg) translateX(32px) translateY(8px); }
.card:hover .pack:nth-child(1) { transform: rotate(-24deg) translateX(-60px) translateY(-6px); }
.card:hover .pack:nth-child(2) { transform: rotate(-8deg) translateX(-20px) translateY(-14px); }
.card:hover .pack:nth-child(3) { transform: rotate(8deg) translateX(22px) translateY(-14px); }
.card:hover .pack:nth-child(4) { transform: rotate(24deg) translateX(62px) translateY(-6px); }
.pack-actions { position: relative; z-index: 2; justify-content: center; display: flex; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.tag { font: 500 .75rem var(--font-mono); padding: 4px 10px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); color: var(--muted); }

/* Teach flow art: a small app window on the left, the four steps on the right */
.card .teach-art { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 24px; align-items: center; justify-content: stretch; }
.teach-mac { width: 100%; }
.tw-toolbar { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.tw-toolbar .lights { padding: 0 6px 0 0; }
.tw-title { font-weight: 600; margin-right: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tw-btn { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 7px; border: 1px solid var(--line); background: var(--wash); color: var(--ink); font-size: .76rem; white-space: nowrap; transition: background .2s, border-color .2s, box-shadow .2s; }
.tw-btn svg { width: 12px; height: 12px; }
.tw-btn.hit { background: var(--accent-soft); border-color: var(--accent); }
.tw-btn.picked { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.tw-canvas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 16px 14px 70px; }
.tw-canvas span { height: 46px; border-radius: 8px; background: var(--c); }
.teach-hud {
  position: absolute; left: 50%; bottom: 14px; z-index: 4;
  display: flex; align-items: center; gap: 10px; max-width: calc(100% - 24px);
  padding: 9px 14px; border-radius: 12px; background: rgba(21, 21, 28, .92); color: #fff;
  font-size: .78rem; white-space: nowrap;
  opacity: 0; transform: translate(-50%, 8px); transition: opacity .25s, transform .35s var(--ease-pop), background .3s;
}
.teach-hud.show { opacity: 1; transform: translate(-50%, 0); }
.teach-hud.done { background: #1f9d5c; }
.teach-hud .rec { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #ff5f57; animation: blink 1s steps(2) infinite; }
.teach-hud.done .rec { background: #fff; animation: none; }
.teach-hud .keys:empty { display: none; }
.teach-hud .kbd { font-size: .7rem; background: #2a2a33; color: #fff; border-color: #3a3a46; box-shadow: 0 2px 0 #0c0c10; animation: popIn .3s var(--ease-pop) both; }
.teach-hud.done .kbd { background: rgba(255, 255, 255, .18); border-color: transparent; box-shadow: none; }
.kp-icon.teaching { background: #ff5f57; color: #fff; border-color: #ff5f57; }

.teach { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; width: 100%; counter-reset: none; }
.step {
  display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 14px;
  background: var(--paper); border: 1px solid var(--line); min-width: 0; opacity: .55;
  transition: border-color .3s, box-shadow .3s, opacity .3s;
}
.step.active { opacity: 1; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.step.done { opacity: 1; }
.step .num { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font: 600 .75rem var(--font-mono); transition: background .3s, color .3s; }
.step.active .num, .step.done .num { background: var(--accent); color: #fff; }
.step b { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 600; font-size: .92rem; }
.step b .kbd { font-size: .68rem; }
.step small { display: block; margin-top: 3px; color: var(--muted); font-size: .8rem; }
@media (max-width: 860px) { .card .teach-art { grid-template-columns: minmax(0, 1fr); } }
@keyframes blink { 50% { opacity: .25; } }

/* ---------- Stats ---------- */
.stats-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 900px) { .stats-grid { grid-template-columns: minmax(0, 1fr); } }
.panel { border-radius: var(--radius); border: 1px solid var(--line); background: var(--paper); box-shadow: var(--shadow); padding: 24px; display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.panel-head b { font: 600 1rem var(--font-body); }
.example { font: 500 .72rem var(--font-mono); padding: 4px 10px; border-radius: 999px; background: var(--lemon); color: #6b5a00; }
.big { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.big .num { font: 700 clamp(3rem, 7vw, 4.6rem)/1 var(--font-display); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.big .sub { color: var(--muted); }
.big .sub strong { color: var(--ink); font-weight: 600; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 560px) { .tiles { grid-template-columns: minmax(0, 1fr); } }
.tile { padding: 16px; border-radius: 16px; background: var(--wash); display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tile small { color: var(--muted); font-size: .8rem; }
.tile .v { font: 700 1.7rem/1.1 var(--font-display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.tile .delta { font-size: .78rem; color: #1f9d5c; }
.ring { display: flex; align-items: center; gap: 12px; }
.ring svg { width: 54px; height: 54px; transform: rotate(-90deg); flex: none; }
.ring circle { fill: none; stroke-width: 6; }
.ring .track { stroke: var(--line); }
.ring .bar { stroke: var(--accent); stroke-linecap: round; stroke-dasharray: 138.2; stroke-dashoffset: 40; transition: stroke-dashoffset 1.4s cubic-bezier(.22, 1, .36, 1); }
.spark { width: 100%; height: 34px; }
.spark path.line { fill: none; stroke: #1f9d5c; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.spark path.area { fill: var(--mint); }
.top-list { display: flex; flex-direction: column; gap: 10px; }
.top-row { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr) 3.4rem; gap: 12px; align-items: center; font-size: .88rem; }
.top-row .bar { height: 10px; border-radius: 999px; background: var(--wash); overflow: hidden; }
.top-row .bar i { display: block; height: 100%; border-radius: inherit; background: var(--accent); width: var(--w); transform-origin: left; animation: grow 1.4s cubic-bezier(.22, 1, .36, 1) both; }
.top-row:nth-child(2) .bar i { background: #7d92ff; }
.top-row:nth-child(3) .bar i { background: #a9b6ff; }
.top-row:nth-child(4) .bar i { background: #cdd5ff; }
.top-row .n { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); font-size: .82rem; }
.next-habit { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 14px; border: 1px dashed var(--cap-edge); font-size: .9rem; flex-wrap: wrap; }
.next-habit .label { font: 500 .72rem var(--font-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--accent); }

.side-col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.wrapped {
  position: relative; aspect-ratio: 4 / 5; max-width: 100%; border-radius: 26px; padding: 26px;
  background:
    radial-gradient(120% 80% at 0% 0%, var(--lilac), transparent 60%),
    radial-gradient(90% 70% at 100% 30%, var(--peach), transparent 60%),
    radial-gradient(100% 80% at 30% 100%, var(--mint), transparent 60%),
    var(--lemon);
  display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: var(--shadow); overflow: hidden;
  transform: rotate(-2.5deg); transition: transform .5s var(--ease-pop);
  animation: breathe 8s ease-in-out infinite;
}
.wrapped:hover { transform: rotate(0deg) scale(1.02); }
.wrapped .yr { font: 500 .78rem var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.wrapped .headline { font: 700 clamp(2rem, 4vw, 2.6rem)/1 var(--font-display); letter-spacing: -.04em; }
.wrapped .headline em { font-style: normal; color: var(--accent); }
.wrapped ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: .9rem; }
.wrapped li { display: flex; justify-content: space-between; gap: 10px; padding-bottom: 8px; border-bottom: 1px solid rgba(21, 21, 28, .1); }
.wrapped .foot { display: flex; justify-content: space-between; align-items: center; font-size: .8rem; }
.wrapped .sticker { position: absolute; right: 18px; top: 18px; width: 64px; height: 64px; animation: spin 18s linear infinite; }
.how { border-radius: var(--radius); background: var(--wash); padding: 22px; font-size: .92rem; color: var(--muted); display: flex; flex-direction: column; gap: 10px; }
.how b { color: var(--ink); font-weight: 600; }
.how .formula { font: 500 .82rem/1.6 var(--font-mono); color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; overflow-x: auto; }

/* ---------- Compare ---------- */
.compare { border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; }
.compare-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1.2fr); border-top: 1px solid var(--line); }
.compare-row:first-child { border-top: 0; background: var(--wash); font-weight: 600; }
.compare-row > div { padding: 18px 20px; min-width: 0; }
.compare-row > div:first-child { color: var(--muted); font-size: .92rem; }
.compare-row > div:last-child { background: var(--accent-soft); }
.compare-row:first-child > div:last-child { color: var(--accent); }
@media (max-width: 640px) {
  .compare-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .compare-row > div:first-child { grid-column: 1 / -1; padding-bottom: 0; font-weight: 600; color: var(--ink); }
  .compare-row:first-child > div:first-child { display: none; }
}

/* ---------- Privacy ---------- */
.privacy { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 40px; align-items: center; padding: clamp(28px, 5vw, 56px); border-radius: 32px; background: var(--ink); color: #f3f3f7; position: relative; overflow: hidden; }
.privacy h2 { color: #fff; }
.privacy .lede { color: #b4b4c6; }
.privacy .eyebrow { color: #9fb0ff; }
.privacy-copy { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.promises { display: grid; gap: 12px; min-width: 0; }
.promise { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: 16px; background: #1f1f28; border: 1px solid #2c2c38; }
.promise svg { width: 26px; height: 26px; flex: none; color: #9fb0ff; }
.promise b { display: block; color: #fff; font-weight: 600; margin-bottom: 2px; }
.promise span { color: #b4b4c6; font-size: .92rem; }
.promise code { font: .82rem var(--font-mono); color: #dfe3ff; word-break: break-all; }
.lock-shackle { animation: shackle 3.2s ease-in-out infinite; transform-origin: 50% 100%; }
@media (max-width: 860px) { .privacy { grid-template-columns: minmax(0, 1fr); } }

/* ---------- CTA ---------- */
.cta { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 22px; padding-block: clamp(80px, 12vw, 140px); position: relative; }
.cta h2 { font-size: clamp(2.4rem, 6vw, 4.2rem); }
.keyrow { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.keyrow .kbd { font-size: 1.1rem; min-width: 2.4em; height: 2.4em; }
.keyrow .kbd:nth-child(1) { background: var(--lemon); }
.keyrow .kbd:nth-child(2) { background: var(--lilac); }
.keyrow .kbd:nth-child(3) { background: var(--mint); }
.keyrow .kbd:nth-child(4) { background: var(--peach); }
.keyrow.typing .kbd { animation: tap 2.4s ease-in-out infinite; }
.keyrow.typing .kbd:nth-child(2) { animation-delay: .15s; }
.keyrow.typing .kbd:nth-child(3) { animation-delay: .3s; }
.keyrow.typing .kbd:nth-child(4) { animation-delay: .45s; }

footer { border-top: 1px solid var(--line); padding-block: 28px; font-size: .88rem; color: var(--muted); }
footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 12px 24px; flex-wrap: wrap; }
.foot-links { display: flex; gap: 18px; flex-wrap: wrap; }
.foot-links a { text-decoration: none; }
.foot-links a:hover { color: var(--ink); }
.foot-meta { display: flex; gap: 6px 18px; flex-wrap: wrap; }

/* ---------- Pricing ---------- */
.price-card {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px 48px; align-items: center;
  max-width: 880px; padding: clamp(24px, 4vw, 40px); border-radius: var(--radius);
  background: linear-gradient(180deg, var(--paper), var(--sky)); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.price-main { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
.price .amount { font: 700 clamp(3rem, 7vw, 4.2rem)/1 var(--font-display); letter-spacing: -.04em; }
.price .unit { color: var(--muted); font-weight: 500; }
.price-note { font-size: .9rem; color: var(--muted); }
.price-note a { color: var(--accent); text-underline-offset: 3px; }
.price-main .btn { margin-top: 6px; }
.price-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.price-list li { position: relative; padding-left: 30px; }
.price-list li::before {
  content: "✓"; position: absolute; left: 0; top: .1em; width: 20px; height: 20px; border-radius: 6px;
  display: grid; place-items: center; font: 600 .75rem/1 var(--font-mono);
  background: var(--paper); border: 1px solid var(--line); box-shadow: 0 2px 0 var(--cap-edge);
}
@media (max-width: 760px) { .price-card { grid-template-columns: minmax(0, 1fr); } }

/* ---------- FAQ ---------- */
.faq { max-width: 760px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 0; cursor: pointer; list-style: none; font: 600 1.12rem/1.3 var(--font-display); letter-spacing: -.01em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--line); box-shadow: 0 2px 0 var(--cap-edge); font: 500 1rem/1 var(--font-mono); transition: transform .25s var(--ease-pop); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); padding: 0 44px 20px 0; }
.faq a { color: var(--accent); text-underline-offset: 3px; }

/* ---------- Legal pages (/privacy, /terms, /refunds) ---------- */
.legal { max-width: 65ch; padding-block: clamp(48px, 8vw, 88px) clamp(64px, 10vw, 112px); }
.legal h1 { font-size: clamp(2.4rem, 6vw, 3.6rem); margin: 14px 0 10px; }
.legal .effective { font: 500 .85rem/1 var(--font-mono); color: var(--muted); }
.legal .lede { margin-bottom: 8px; }
.legal h2 { font-size: 1.5rem; letter-spacing: -.02em; line-height: 1.2; margin: 44px 0 10px; }
.legal h3 { font-size: 1.12rem; margin: 26px 0 6px; }
.legal p, .legal ul { margin: 0 0 14px; }
.legal ul { padding-left: 1.2em; }
.legal li { margin-bottom: 6px; }
.legal a:not(.btn) { color: var(--accent); text-underline-offset: 3px; }
.legal code { font: .88em var(--font-mono); background: var(--wash); padding: .1em .35em; border-radius: 6px; overflow-wrap: anywhere; }

/* Keypress toast */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 40;
  transform: translate(-50%, 20px); opacity: 0;
  display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 14px;
  background: rgba(21, 21, 28, .92); color: #fff; font-size: .88rem;
  transition: opacity .25s, transform .35s var(--ease-pop); pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast .kbd { font-size: .74rem; background: #2a2a33; color: #fff; border-color: #3a3a46; box-shadow: 0 2px 0 #0c0c10; }

/* ---------- Reveal on scroll: visible by default, only nudged ---------- */
.reveal { transition: transform .8s cubic-bezier(.22, 1, .36, 1), opacity .8s; }
.reveal.pending { transform: translateY(24px); opacity: .001; }

/* ---------- Keyframes ---------- */
@keyframes float { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-14px) rotate(4deg); } }
@keyframes tap { 0%, 70%, 100% { transform: translateY(0); box-shadow: 0 2px 0 var(--cap-edge), 0 4px 10px -4px rgba(21, 21, 28, .12); } 80% { transform: translateY(2px); box-shadow: 0 0 0 var(--cap-edge); } }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 3px rgba(47, 196, 119, .18); } 50% { box-shadow: 0 0 0 7px rgba(47, 196, 119, .06); } }
@keyframes slide { to { transform: translateX(-50%); } }
@keyframes rise { to { transform: translateY(-50%); } }
@keyframes ripple { from { opacity: .7; transform: scale(.3); } to { opacity: 0; transform: scale(1.6); } }
@keyframes popIn { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes menuWalk {
  0% { transform: translateY(0); } 16.6% { transform: translateY(32px); } 33.3% { transform: translateY(64px); }
  50% { transform: translateY(105px); } 66.6% { transform: translateY(137px); } 83.3% { transform: translateY(64px); }
}
@keyframes tipBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes scan { 0%, 20% { transform: scaleX(0); } 45%, 80% { transform: scaleX(1); } 100% { transform: scaleX(0); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes grow { from { transform: scaleX(0); } }
@keyframes breathe { 0%, 100% { background-position: 0 0; } 50% { background-position: 0 0; filter: hue-rotate(-8deg); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shackle { 0%, 60%, 100% { transform: translateY(0); } 75% { transform: translateY(-3px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal.pending { transform: none; opacity: 1; }
  .marquee-track, .marquee-group { flex-wrap: wrap; width: auto; justify-content: center; padding-right: 0; }
  .marquee-group[aria-hidden] { display: none; }
}

/* ---------- Packs panel card ---------- */
.pp-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 28px; align-items: center; background: linear-gradient(135deg, var(--paper), var(--sky) 140%); }
.pp-copy { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.pp-list { margin: 4px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: .95rem; }
.pp-list li { display: flex; gap: 10px; align-items: baseline; }
.pp-list li::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); transform: translateY(-2px); }
.yours { display: inline-block; font: 500 .68rem/1 var(--font-mono); padding: 3px 7px; border-radius: 999px; background: var(--lilac); color: #4b3a99; vertical-align: middle; }
.pp { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 10px; font-size: .86rem; min-width: 0; }
.pp-head { display: flex; justify-content: space-between; padding: 6px 8px 10px; }
.pp-app { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; }
.pp-app.open { background: var(--wash); }
.pp-name { flex: 1; font-weight: 500; }
.appicon { width: 26px; height: 26px; border-radius: 7px; background: var(--c); color: #fff; display: grid; place-items: center; font: 600 .66rem var(--font-body); flex: none; }
.mini-switch { width: 30px; height: 18px; border-radius: 999px; background: var(--line); position: relative; flex: none; transition: background .3s; }
.mini-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--paper); box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .3s var(--ease-pop); }
.mini-switch.on { background: #2fc477; }
.mini-switch.on::after { transform: translateX(12px); }
.pp-shortcuts { display: grid; gap: 2px; padding: 4px 4px 8px 44px; }
.pp-sc { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 5px 6px; border-radius: 8px; min-height: 36px; }
.pp-sc .kbd { font-size: .7rem; }
.pp-sc.off > span:first-child { color: var(--muted); text-decoration: line-through; }
.pp-sc.off .keys { opacity: .4; }
.pp-sc.rebinding { background: var(--accent-soft); }
.rebind { position: relative; display: inline-grid; justify-items: end; }
.rebind > * { grid-area: 1 / 1; }
.rebind .old { animation: rebindOld 5s ease-in-out infinite; }
.rebind .listening { font: 500 .74rem var(--font-mono); color: var(--accent); white-space: nowrap; align-self: center; opacity: 0; animation: rebindNew 5s ease-in-out infinite; }
.pp-foot { display: flex; gap: 8px; padding: 10px 8px 4px; border-top: 1px solid var(--line); margin-top: 6px; }
@keyframes rebindOld { 0%, 35%, 80%, 100% { opacity: 1; } 42%, 72% { opacity: 0; } }
@keyframes rebindNew { 0%, 35%, 80%, 100% { opacity: 0; } 42%, 72% { opacity: 1; } }
@media (max-width: 860px) { .pp-card { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 420px) { .pp-shortcuts { padding-left: 4px; } }
