/* Slap Alert. Colours are the monkey's own palette (Sources/Sprites.swift) and the note's paper. */
:root {
  --ink: #2a1708;
  --ink-soft: #5b4636;
  --outline: #3a200e;
  --fur: #7a4a24;
  --paper: #fff8ec;
  --card: #ffffff;
  --note: #ffe45c;
  --note-shade: #d6a014;
  --vine: #3e8e3a;
  --line: rgba(58, 32, 14, 0.14);
  --code-bg: rgba(58, 32, 14, 0.07);
  --wall-a: #ffd7a8;
  --wall-b: #f59e7b;
  --wall-c: #7f6cc4;
  --shadow: 4px 4px 0 rgba(0, 0, 0, 0.28);
  --edge-glow: 0 0 0 0 transparent;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #f6ead9;
    --outline: #0b0603;
    --edge-glow: 0 0 0 2px rgba(246, 234, 217, 0.22);
    --ink-soft: #c9b7a3;
    --paper: #1d140d;
    --card: #2a1e15;
    --line: rgba(246, 234, 217, 0.14);
    --code-bg: rgba(246, 234, 217, 0.08);
    --wall-a: #3a2a5c;
    --wall-b: #7a3e52;
    --wall-c: #1d2b4a;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #f6ead9;
  --outline: #0b0603;
  --edge-glow: 0 0 0 2px rgba(246, 234, 217, 0.22);
  --ink-soft: #c9b7a3;
  --paper: #1d140d;
  --card: #2a1e15;
  --line: rgba(246, 234, 217, 0.14);
  --code-bg: rgba(246, 234, 217, 0.08);
  --wall-a: #3a2a5c;
  --wall-b: #7a3e52;
  --wall-c: #1d2b4a;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}
img { max-width: 100%; }
a { color: inherit; }
code, pre { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.86em; }
code { background: var(--code-bg); padding: 0.1em 0.35em; border-radius: 4px; }
pre { background: var(--code-bg); padding: 14px 16px; border-radius: 8px; overflow-x: auto; line-height: 1.45; }
pre code { background: none; padding: 0; }
.muted { color: var(--ink-soft); }
.fine { color: var(--ink-soft); font-size: 0.85rem; margin-top: 14px; }

main, .top, footer { max-width: 1080px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
@media (min-width: 720px) { main, .top, footer { padding-left: 32px; padding-right: 32px; } }

.top { display: flex; align-items: center; justify-content: space-between; padding-top: 18px; padding-bottom: 18px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; text-decoration: none; }
.brand img { image-rendering: pixelated; }

/* Chunky pixel buttons, like the note's border and drop shadow. */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--note); color: #2a1708; text-decoration: none; font-weight: 800;
  padding: 13px 20px; border: 4px solid var(--outline); box-shadow: var(--edge-glow), var(--shadow);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}
.button:hover { transform: translate(-1px, -1px); box-shadow: var(--edge-glow), 5px 5px 0 rgba(0, 0, 0, 0.28); }
.button:active { transform: translate(3px, 3px); box-shadow: var(--edge-glow), 1px 1px 0 rgba(0, 0, 0, 0.28); }
.button:focus-visible { outline: 3px solid var(--vine); outline-offset: 3px; }
.button.ghost { background: var(--card); color: var(--ink); }
.button.small { padding: 6px 14px; border-width: 3px; box-shadow: var(--edge-glow), 3px 3px 0 rgba(0, 0, 0, 0.28); }
.button.wide { width: 100%; }
.price-tag:not(:empty) { background: rgba(58, 32, 14, 0.12); padding: 1px 8px; border-radius: 3px; }

.hero { display: grid; gap: 36px; align-items: center; padding: 24px 0 64px; }
@media (min-width: 900px) { .hero { grid-template-columns: 1fr 1.15fr; gap: 48px; padding-top: 40px; } }
h1 { font-size: clamp(2.4rem, 7vw, 3.9rem); line-height: 1.02; letter-spacing: -0.03em; margin: 0 0 18px; }
h2 { font-size: clamp(1.5rem, 4vw, 2rem); letter-spacing: -0.02em; margin: 0 0 18px; }
h3 { margin: 0 0 6px; font-size: 1.12rem; }
.lede { font-size: 1.2rem; color: var(--ink-soft); margin: 0 0 26px; max-width: 34em; }
.ctas { display: flex; flex-wrap: wrap; gap: 14px; }

/* The pretend Mac screen the monkey lives in. */
.screen {
  position: relative; width: 100%; aspect-ratio: 16 / 10; overflow: hidden;
  border: 4px solid var(--outline); border-radius: 10px; box-shadow: var(--edge-glow), 6px 6px 0 rgba(0, 0, 0, 0.25);
  background:
    radial-gradient(120% 90% at 85% 10%, var(--wall-a), transparent 60%),
    radial-gradient(120% 120% at 10% 100%, var(--wall-c), transparent 65%),
    var(--wall-b);
}
.screen canvas { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; }  /* above the note: the hand lands on it */
.menubar {
  position: absolute; left: 0; right: 0; top: 0; z-index: 2; height: 24px;
  display: flex; align-items: center; gap: 14px; padding: 0 12px;
  background: rgba(255, 255, 255, 0.55); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  font-size: 12px; color: #1c1c1e;
}
.menubar .apple { width: 11px; height: 13px; background: #1c1c1e; border-radius: 5px 5px 6px 6px; }
.menubar .spacer { flex: 1; }
.menubar .menu-icon { width: 15px; height: 15px; image-rendering: pixelated; }
@media (max-width: 480px) { .menubar span:not(.apple):not(.spacer) { display: none; } .menubar span:last-child { display: inline; } }
.note {
  position: absolute; z-index: 0; image-rendering: pixelated; transform-origin: 50% 50%;
  rotate: -2deg; pointer-events: none;
}
.note.slap-in { animation: slap-in 0.3s linear both; }
.note.fall { animation: fall 0.28s ease-in both; }
@keyframes slap-in {
  0% { opacity: 0; scale: 1.18; rotate: -9deg; }
  15% { opacity: 1; }
  45% { scale: 0.95; }
  60% { rotate: -0.9deg; }
  75% { scale: 1.02; }
  100% { opacity: 1; scale: 1; rotate: -2deg; }
}
@keyframes fall { to { opacity: 0; translate: 0 28px; } }

section { padding: 56px 0; border-top: 2px dashed var(--line); }
.hero { border-top: 0; }

.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; gap: 22px; }
@media (min-width: 820px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { counter-increment: step; background: var(--card); border: 3px solid var(--outline); box-shadow: var(--edge-glow), var(--shadow); padding: 22px 22px 14px; }
.steps li::before {
  content: counter(step); display: inline-grid; place-items: center; width: 34px; height: 34px; margin-bottom: 12px;
  background: var(--note); color: #2a1708; border: 3px solid var(--outline); font-weight: 900;
}
.steps p { margin: 0 0 10px; }

.note-grid { display: grid; gap: 26px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.note-grid figure { margin: 0; }
.note-grid img { display: block; width: 100%; max-width: 280px; height: auto; image-rendering: pixelated; }
.note-grid figcaption { color: var(--ink-soft); font-size: 0.92rem; margin-top: 6px; }

.private { display: grid; gap: 40px; }
@media (min-width: 900px) { .private { grid-template-columns: 1fr 1fr; } }
.private p { margin: 0 0 14px; }
.private > div, .hero > * { min-width: 0; }   /* let the code block scroll instead of widening the page */

.buy { display: grid; place-items: center; }
.card { width: 100%; max-width: 440px; background: var(--card); border: 4px solid var(--outline); box-shadow: var(--edge-glow), 8px 8px 0 rgba(0, 0, 0, 0.25); padding: 28px; text-align: center; }
.card h2 { margin-bottom: 4px; }
.big-price { font-size: 3rem; font-weight: 900; letter-spacing: -0.03em; margin: 4px 0 0; line-height: 1.1; }
.big-price [data-pending] { font-size: 1.6rem; letter-spacing: -0.01em; }
.card ul { text-align: left; margin: 22px 0 26px; padding: 0; list-style: none; }
.card li { padding: 7px 0 7px 30px; position: relative; border-bottom: 1px solid var(--line); }
.card li::before { content: ""; position: absolute; left: 4px; top: 13px; width: 12px; height: 12px; background: var(--note); border: 3px solid var(--outline); }

.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq details p { margin: 10px 0 0; color: var(--ink-soft); }

footer { padding-top: 32px; padding-bottom: 48px; color: var(--ink-soft); font-size: 0.9rem; border-top: 2px dashed var(--line); }

/* Thanks page */
.thanks { max-width: 720px; padding: 32px 0 64px; border-top: 0; }
.license-box {
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.82rem; word-break: break-all;
  background: var(--card); border: 3px solid var(--outline); padding: 16px; margin: 16px 0; user-select: all;
}
.row { display: flex; flex-wrap: wrap; gap: 14px; margin: 18px 0; }
.status { padding: 14px 16px; border: 3px dashed var(--line); }
.status.error { border-color: #c42828; color: #c42828; }
.thanks ol { padding-left: 1.2em; }
.thanks li { margin-bottom: 8px; }
.prose h2 { font-size: 1.25rem; margin: 30px 0 8px; }
.prose p { margin: 0 0 12px; }
