:root {
  --paper: #ecebf1;
  --surface: #ffffff;
  --key: #ffffff;
  --key-edge: #c9c7d3;
  --deck: #d9d7e1;
  --ink: #262238;
  --muted: #6b6680;
  --bean: #f4a9b8;
  --fur: #e8602f;
  --fur-ink: #ffffff;
  --rounded: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1f1d2b;
    --surface: #2a2738;
    --key: #353146;
    --key-edge: #15131f;
    --deck: #18161f;
    --ink: #f1eef8;
    --muted: #a7a2b8;
    --bean: #e78da0;
    --fur: #ff8a57;
    --fur-ink: #1f1d2b;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 18px/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 3px solid var(--fur);
  outline-offset: 3px;
}

.page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 800 1.25rem/1 var(--rounded);
  text-decoration: none;
}

.brand img {
  width: 36px;
  height: 36px;
}

.top nav {
  display: flex;
  gap: 24px;
  font-size: 0.95rem;
}

.top nav a {
  text-decoration: none;
  color: var(--muted);
}

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

h1,
h2,
h3 {
  font-family: var(--rounded);
  margin: 0;
}

h1 {
  font-size: clamp(2.6rem, 5.2vw, 4.4rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.025em;
}

h2 {
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 28px;
}

h3 {
  font-size: 1.1rem;
  font-weight: 750;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 56px;
  align-items: center;
  padding: 48px 0 64px;
}

.lede {
  font-size: 1.2rem;
  color: var(--muted);
  max-width: 34ch;
  margin: 24px 0 32px;
}

.store {
  display: inline-block;
  padding: 14px 22px;
  border-radius: 14px;
  background: var(--ink);
  color: var(--paper);
  font: 700 1rem/1.2 var(--rounded);
}

.note {
  margin: 14px 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.demo {
  position: relative;
}

.window {
  position: relative;
  background: var(--surface);
  border-radius: 14px;
  box-shadow: 0 1px 0 var(--key-edge), 0 24px 48px -28px rgba(38, 34, 56, 0.45);
  overflow: hidden;
}

.titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  font-size: 0.8rem;
  color: var(--muted);
  border-bottom: 1px solid var(--paper);
}

.titlebar i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--key-edge);
}

.titlebar span {
  margin-left: 8px;
}

.editor {
  min-height: 132px;
  padding: 18px 20px 22px;
  font: 15px/1.6 var(--mono);
  overflow-wrap: anywhere;
}

.editor::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: 1.1em;
  margin-left: 1px;
  vertical-align: text-bottom;
  background: var(--fur);
  animation: blink 1s steps(1) infinite;
}

.locked-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  background: rgba(20, 18, 30, 0.7);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  color: #fff;
  font: 750 1.15rem/1.4 var(--rounded);
  transition: opacity 0.25s;
}

.locked-layer small {
  display: block;
  font: 500 0.85rem/1.4 var(--body);
  opacity: 0.85;
}

.demo:not(.guarded) .locked-layer {
  opacity: 0;
  pointer-events: none;
}

.keyboard {
  margin-top: 18px;
  padding: 14px;
  border-radius: 16px;
  background: var(--deck);
  position: relative;
  display: grid;
  gap: 8px;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

.row {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.key {
  flex: 0 1 46px;
  height: 44px;
  border: 0;
  border-radius: 8px;
  background: var(--key);
  color: var(--ink);
  box-shadow: 0 2px 0 var(--key-edge);
  font: 500 0.95rem var(--body);
  cursor: pointer;
  transition: transform 0.06s, background 0.06s;
}

.key.space {
  flex-basis: 300px;
}

.key.down {
  transform: translateY(2px);
  background: var(--bean);
  box-shadow: none;
}

.psst {
  position: absolute;
  top: -22px;
  right: 14px;
  padding: 10px 18px;
  border-radius: 20px 20px 4px 20px;
  background: var(--fur);
  color: var(--fur-ink);
  font: 800 1.2rem/1 var(--rounded);
  opacity: 0;
  transform: translateY(8px) scale(0.9);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}

.psst.show {
  opacity: 1;
  transform: none;
}

.psst[data-level="1"] {
  font-size: 1.5rem;
}

.psst[data-level="2"] {
  font-size: 1.85rem;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  font-size: 0.95rem;
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.switch input {
  appearance: none;
  -webkit-appearance: none;
  width: 42px;
  height: 24px;
  margin: 0;
  border-radius: 12px;
  background: var(--key-edge);
  position: relative;
  cursor: pointer;
  transition: background 0.15s;
}

.switch input::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.15s;
}

.switch input:checked {
  background: var(--fur);
}

.switch input:checked::after {
  transform: translateX(18px);
}

.walk {
  border: 0;
  border-radius: 10px;
  padding: 10px 16px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 2px 0 var(--key-edge);
  font: 650 0.95rem var(--rounded);
  cursor: pointer;
}

.walk:active {
  transform: translateY(2px);
  box-shadow: none;
}

.hint {
  margin: 12px 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

section.block {
  padding: 72px 0;
  border-top: 1px solid var(--key-edge);
}

.steps {
  list-style: none;
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
  margin: 0;
  padding: 0;
}

.steps li {
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  display: grid;
  place-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
  border-radius: 8px;
  background: var(--key);
  box-shadow: 0 2px 0 var(--key-edge);
  font: 800 1.1rem var(--rounded);
}

.steps p,
.details p {
  margin: 8px 0 0;
  color: var(--muted);
  max-width: 38ch;
}

kbd {
  font: 600 0.9em var(--body);
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--key);
  box-shadow: 0 1px 0 var(--key-edge);
  color: var(--ink);
  white-space: nowrap;
}

.details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 36px 56px;
  margin: 0;
}

.details dd {
  margin: 0;
}

.details dt {
  font: 750 1.1rem var(--rounded);
}

.faq {
  max-width: 720px;
}

.faq details {
  border-bottom: 1px solid var(--key-edge);
  padding: 18px 0;
}

.faq summary {
  font: 700 1.1rem var(--rounded);
  cursor: pointer;
}

.faq details p {
  margin: 10px 0 0;
  color: var(--muted);
}

footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  padding: 32px 0 48px;
  border-top: 1px solid var(--key-edge);
  font-size: 0.9rem;
  color: var(--muted);
}

footer nav {
  display: flex;
  gap: 20px;
}

.prose {
  max-width: 68ch;
  padding: 32px 0 80px;
}

.prose h1 {
  font-size: clamp(2.2rem, 4vw, 3rem);
  margin-bottom: 8px;
}

.prose h2 {
  font-size: 1.3rem;
  margin: 40px 0 8px;
}

.prose p,
.prose li {
  color: var(--muted);
}

.prose strong {
  color: var(--ink);
}

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

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 40px;
    padding-top: 24px;
  }

  .steps,
  .details {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .top nav a:not(:last-child) {
    display: none;
  }

  .keyboard {
    padding: 10px 6px;
    gap: 6px;
  }

  .row {
    gap: 4px;
  }

  .key {
    height: 38px;
    font-size: 0.8rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
