:root {
  --yellow: #facc15;
  --yellow-ink: #1c1917;
  --bg: #fafaf9;
  --surface: #ffffff;
  --surface-2: #f5f5f4;
  --text: #1c1917;
  --muted: #57534e;
  --border: #e7e5e4;
  --code-bg: #1c1917;
  --code-text: #fafaf9;
  --link: #a16207;
  --radius: 16px;
  --max: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0a09;
    --surface: #1c1917;
    --surface-2: #292524;
    --text: #fafaf9;
    --muted: #a8a29e;
    --border: #292524;
    --code-bg: #000000;
    --link: #facc15;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
img { max-width: 100%; display: block; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.small { font-size: 15px; color: var(--muted); }

/* Header */
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; color: var(--text); text-decoration: none; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.site-nav { display: flex; gap: 22px; font-size: 15px; }
.site-nav a { color: var(--muted); text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); }

/* Hero */
.hero { padding: 40px 0 64px; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  grid-template-areas: "copy demo" "install demo";
  grid-template-rows: auto 1fr;
  column-gap: 56px;
}
.hero-copy { grid-area: copy; padding-top: 24px; }
.hero-demo { grid-area: demo; }
.hero-install { grid-area: install; }
.hero-copy, .hero-demo, .hero-install { min-width: 0; }
h1 { font-size: clamp(38px, 5.2vw, 58px); line-height: 1.04; letter-spacing: -0.03em; margin: 0 0 16px; }
.lede { font-size: 20px; color: var(--muted); margin: 0 0 32px; max-width: 30em; }

.hero-install h2 { font-size: 15px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 0 0 14px; }
.install { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.install li { counter-increment: step; position: relative; padding-left: 42px; }
.install li::before {
  content: counter(step); position: absolute; left: 0; top: -1px; width: 28px; height: 28px; border-radius: 50%;
  background: var(--yellow); color: var(--yellow-ink); font-weight: 700; font-size: 15px; display: grid; place-items: center;
}
.command { margin: 10px 0 8px; display: flex; background: var(--code-bg); color: var(--code-text); border-radius: 10px; overflow: hidden; }
.command code { flex: 1; min-width: 0; padding: 12px 14px; font: 13.5px/1.5 var(--mono); overflow-x: auto; white-space: nowrap; }
.command button { border: 0; background: #292524; color: var(--code-text); font: 600 14px var(--font); padding: 0 16px; cursor: pointer; }
.command button:hover { background: #44403c; }

.demo-steps { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 18px 0 0; padding: 0; font-size: 14px; }
.demo-steps li { padding: 5px 12px; border-radius: 999px; color: var(--muted); transition: background 0.3s, color 0.3s; }
.demo-steps li.on { background: var(--yellow); color: var(--yellow-ink); font-weight: 600; }

/* Sections */
section { padding: 56px 0 64px; border-top: 1px solid var(--border); }
section h2 { font-size: clamp(26px, 3.4vw, 34px); letter-spacing: -0.02em; margin: 0 0 24px; }
.can-do { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 20px 40px; }
.can-do li { color: var(--muted); }
.can-do strong { color: var(--text); }
.fine { margin: 36px 0 0; font-size: 15px; color: var(--muted); }

/* ───────── The animated scene ───────── */
.scene { position: relative; width: 100%; aspect-ratio: 100 / 66; container-type: inline-size; user-select: none; }

/* MacBook */
.mac { position: absolute; left: 0; top: 0; width: 84cqw; }
.mac-lid { margin: 0 4cqw; background: #0d0d0e; border-radius: 2.6cqw 2.6cqw 0.6cqw 0.6cqw; padding: 1.3cqw 1.3cqw 2.2cqw; box-shadow: inset 0 0 0 0.2cqw #3a3a3c, 0 2cqw 4cqw -1cqw rgba(0, 0, 0, 0.35); }
.display { position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 0.6cqw; background: #000; }
.mac-base {
  height: 2.4cqw; margin-top: -0.1cqw; border-radius: 0 0 2.4cqw 2.4cqw / 0 0 1.6cqw 1.6cqw;
  background: linear-gradient(#e7e7ea, #b9b9be 55%, #8e8e93);
  box-shadow: 0 1.8cqw 3cqw -1cqw rgba(0, 0, 0, 0.5);
  position: relative;
}
.mac-base::before { content: ""; position: absolute; left: 50%; top: 0; width: 13cqw; height: 0.9cqw; transform: translateX(-50%); border-radius: 0 0 1cqw 1cqw; background: linear-gradient(#a1a1a6, #c7c7cc); }

.spaces { position: absolute; inset: 0; transition-property: transform; }
.space { position: absolute; inset: 0; }
.space-2 { left: 100%; right: -100%; }
.space-2 .wallpaper { background: radial-gradient(120% 90% at 80% 0%, #bae6fd 0%, #38bdf8 35%, #1d4ed8 70%, #172554 100%); }
.win-music { left: 18%; top: 14%; width: 62%; height: 64%; }
.music { position: absolute; inset: 3.6cqw 0 0 0; display: flex; gap: 2cqw; padding: 2.2cqw; }
.album { width: 40%; aspect-ratio: 1; border-radius: 1cqw; background: linear-gradient(135deg, #f43f5e, #a855f7 55%, #3b82f6); box-shadow: 0 0.8cqw 1.6cqw rgba(0, 0, 0, 0.2); }
.tracks { flex: 1; display: grid; align-content: start; gap: 1.1cqw; }
.tracks b { height: 1.6cqw; width: 70%; border-radius: 0.5cqw; background: #44403c; margin-bottom: 0.6cqw; }
.tracks span { height: 0.9cqw; border-radius: 0.45cqw; background: #e7e5e4; }
.wallpaper { position: absolute; inset: 0; background: radial-gradient(120% 90% at 20% 0%, #fde68a 0%, #f59e0b 38%, #b45309 68%, #451a03 100%); }
.menubar { position: absolute; left: 0; right: 0; top: 0; height: 4.6%; display: flex; align-items: center; gap: 2.6cqw; padding: 0 1.6cqw; font-size: 1.15cqw; color: #1c1917; background: rgba(255, 255, 255, 0.55); backdrop-filter: blur(6px); z-index: 5; }
.menubar b { font-weight: 700; }
.menu-time { margin-left: auto; font-style: normal; }

.win { position: absolute; background: #fff; border-radius: 1cqw; overflow: hidden; box-shadow: 0 1.2cqw 3cqw rgba(0, 0, 0, 0.35), 0 0 0 0.1cqw rgba(0, 0, 0, 0.15); transition: transform 0.35s ease, filter 0.35s ease; z-index: 1; filter: brightness(0.93) saturate(0.9); }
.win.front { z-index: 3; filter: none; }
.win.pop { transform: scale(1.015); }
.titlebar { height: 3.6cqw; display: flex; align-items: center; gap: 0.7cqw; padding: 0 1.2cqw; background: #f3f3f2; border-bottom: 0.1cqw solid #e2e2e0; }
.titlebar i { width: 1cqw; height: 1cqw; border-radius: 50%; background: #d6d3d1; }
.win.front .titlebar i:nth-child(1) { background: #ff5f57; }
.win.front .titlebar i:nth-child(2) { background: #febc2e; }
.win.front .titlebar i:nth-child(3) { background: #28c840; }
.url { flex: 0 0 40%; height: 1.9cqw; margin: 0 auto; border-radius: 0.6cqw; background: #e7e5e4; }

.win-browser { left: 6%; top: 9%; width: 64%; height: 72%; }
.viewport { position: absolute; inset: 3.6cqw 0 0 0; overflow: hidden; }
.page { padding: 1.6cqw 2cqw; transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
.pg-hero { height: 9cqw; border-radius: 0.8cqw; background: linear-gradient(120deg, #fef3c7, #fde68a); margin-bottom: 1.4cqw; }
.pg-line { height: 0.9cqw; border-radius: 0.45cqw; background: #e7e5e4; margin: 0 0 0.9cqw; }
.w50 { width: 50%; } .w60 { width: 60%; } .w65 { width: 65%; } .w70 { width: 70%; } .w75 { width: 75%; } .w80 { width: 80%; }
.pg-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1cqw; margin: 1.4cqw 0; }
.pg-cards div { height: 6cqw; border-radius: 0.7cqw; background: #f5f5f4; box-shadow: inset 0 0 0 0.1cqw #e7e5e4; }

.win-notes { left: 30%; top: 15%; width: 60%; height: 66%; }
.notes { position: absolute; inset: 3.6cqw 0 0 0; display: flex; }
.notes-side { width: 30%; background: #f7f6f3; border-right: 0.1cqw solid #e7e5e4; padding: 1.2cqw 1cqw; display: grid; align-content: start; gap: 0.8cqw; }
.notes-side span { height: 2.6cqw; border-radius: 0.6cqw; background: #ebe9e4; }
.notes-side span.on { background: #fde68a; }
.notes-body { flex: 1; padding: 1.6cqw 2cqw; font-size: 1.45cqw; color: #1c1917; }
.note-title { font-weight: 700; font-size: 2cqw; margin-bottom: 1cqw; }
.note-line { min-height: 2.2cqw; line-height: 2.2cqw; white-space: nowrap; }
.note-line::before { content: "○"; color: #a8a29e; margin-right: 0.8cqw; }
.caret { display: none; width: 0.15cqw; height: 1.7cqw; background: #d97706; vertical-align: middle; margin-left: 0.1cqw; animation: blink 1s steps(1) infinite; }
.caret.on { display: inline-block; }
@keyframes blink { 50% { opacity: 0; } }

.dock { position: absolute; left: 50%; bottom: 1.6%; transform: translateX(-50%); display: flex; gap: 0.9cqw; padding: 0.8cqw; border-radius: 1.6cqw; background: rgba(255, 255, 255, 0.35); backdrop-filter: blur(8px); box-shadow: inset 0 0 0 0.1cqw rgba(255, 255, 255, 0.45); z-index: 4; }
.dock .app { width: 4.2cqw; height: 4.2cqw; border-radius: 1cqw; }
.dock .app.running::before { bottom: -0.65cqw; }
.dock .app.bounce { animation: bounce 0.5s ease; }
@keyframes bounce { 40% { transform: translateY(-1.4cqw); } }

.cursor { position: absolute; width: 1.7cqw; left: 50%; top: 50%; z-index: 9; transition-property: left, top; transition-timing-function: cubic-bezier(0.35, 0, 0.25, 1); filter: drop-shadow(0 0.15cqw 0.25cqw rgba(0, 0, 0, 0.35)); }
.cursor.typing { opacity: 0; }
.click-ring { position: absolute; width: 3cqw; height: 3cqw; margin: -1.5cqw 0 0 -1.5cqw; border-radius: 50%; border: 0.25cqw solid rgba(255, 255, 255, 0.9); z-index: 8; animation: ring 0.45s ease-out forwards; pointer-events: none; }
@keyframes ring { from { transform: scale(0.3); opacity: 1; } to { transform: scale(1.3); opacity: 0; } }

/* App icons, shared by the Mac and the phone */
.app { position: relative; display: block; flex: none; box-shadow: inset 0 0 0 0.08cqw rgba(0, 0, 0, 0.12); }
.app::after { content: ""; position: absolute; inset: 24%; }
.app.running::before { content: ""; position: absolute; left: 50%; width: 0.45cqw; height: 0.45cqw; margin-left: -0.225cqw; border-radius: 50%; background: rgba(28, 25, 23, 0.7); }
.app.ic-files { background: linear-gradient(#60a5fa, #2563eb); }
.app.ic-files::after { inset: 30% 22% 26%; border-radius: 12%; background: #fff; box-shadow: 0 -0.35em 0 -0.12em #dbeafe; }
.app.ic-browser { background: linear-gradient(#fb923c, #ea580c); }
.app.ic-browser::after { border-radius: 50%; border: 0.32cqw solid #fff; inset: 22%; }
.app.ic-notes { background: linear-gradient(#fde047, #facc15); }
.app.ic-notes::after { inset: 28% 22%; background: repeating-linear-gradient(#92400e 0 12%, transparent 12% 33%); }
.app.ic-mail { background: linear-gradient(#38bdf8, #0284c7); }
.app.ic-mail::after { inset: 32% 20%; border-radius: 8%; background: #fff; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 0 0, 50% 55%, 100% 0); }
.app.ic-music { background: linear-gradient(#fb7185, #e11d48); }
.app.ic-music::after { inset: 28% 32% 26% 30%; border-radius: 50% 50% 50% 50% / 30% 30% 70% 70%; background: #fff; }

/* iPhone */
.iphone {
  position: absolute; right: 0; bottom: 0; width: 25.5cqw; aspect-ratio: 71.5 / 149;
  padding: 0.9cqw; border-radius: 4.6cqw;
  background: linear-gradient(145deg, #4b4b4f, #1d1d1f 35%, #0b0b0c 65%, #3a3a3c);
  box-shadow: inset 0 0 0 0.25cqw #6e6e73, 0 2.6cqw 4cqw -1cqw rgba(0, 0, 0, 0.55), 0 0.4cqw 1cqw rgba(0, 0, 0, 0.3);
  z-index: 10;
}
.iphone::before, .iphone::after { content: ""; position: absolute; width: 0.4cqw; border-radius: 0.2cqw; background: #2c2c2e; }
.iphone::before { left: -0.3cqw; top: 18%; height: 7%; box-shadow: 0 5cqw 0 #2c2c2e; }
.iphone::after { right: -0.3cqw; top: 26%; height: 11%; }
.iphone-screen { position: relative; height: 100%; border-radius: 3.8cqw; overflow: hidden; background: #000; }
.island { position: absolute; left: 50%; top: 1.4%; width: 30%; height: 3.4%; transform: translateX(-50%); border-radius: 999px; background: #000; z-index: 6; }
.status { position: absolute; left: 0; right: 0; top: 1.6%; display: flex; justify-content: space-between; padding: 0 9%; font-size: 1.15cqw; font-weight: 600; color: #fff; z-index: 5; }
.status-icons { display: flex; gap: 0.5cqw; align-items: center; }
.status-icons i { width: 1.3cqw; height: 0.8cqw; background: linear-gradient(90deg, #fff 0 20%, transparent 20% 27%, #fff 27% 47%, transparent 47% 54%, #fff 54% 74%, transparent 74% 80%, #fff 80%); clip-path: polygon(0 75%, 100% 0, 100% 100%, 0 100%); }
.status-icons b { width: 1.8cqw; height: 0.85cqw; border-radius: 0.25cqw; background: #fff; }
.pad { position: absolute; left: 4%; right: 4%; top: 9%; bottom: 15%; border-radius: 3cqw; background: linear-gradient(#232222, #171616); box-shadow: inset 0 0 0 0.1cqw rgba(255, 255, 255, 0.07); }
/* The pad's one-handed affordances, drawn like the app: the scroll strip lights up in the
   app's accent blue while a thumb is on it, and a small handle marks the bottom edge. */
.strip-glow { position: absolute; left: 0; top: 0; bottom: 0; width: 26%; border-radius: 3cqw 0 0 3cqw; background: linear-gradient(90deg, rgba(115, 179, 255, 0.16), rgba(115, 179, 255, 0)); opacity: 0; transition: opacity 0.2s ease-out; }
.strip { position: absolute; left: 1.6cqw; top: 50%; width: 0.5cqw; height: 18%; transform: translateY(-50%); border-radius: 999px; background: rgba(255, 255, 255, 0.13); transition: height 0.3s cubic-bezier(0.3, 1.4, 0.5, 1), width 0.3s, background 0.2s; }
.edge { position: absolute; left: 50%; bottom: 2.6%; width: 18%; height: 0.55cqw; transform: translateX(-50%); border-radius: 999px; background: rgba(255, 255, 255, 0.16); transition: background 0.2s, width 0.3s; }
.pad.strip-on .strip-glow { opacity: 1; }
.pad.strip-on .strip { width: 0.8cqw; height: 42%; background: rgba(115, 179, 255, 0.85); }
.pad.edge-on .edge { width: 26%; background: rgba(115, 179, 255, 0.85); }
.pdock { position: absolute; left: 4%; right: 4%; bottom: 4.2%; height: 9%; display: flex; align-items: center; justify-content: space-between; padding: 0 3%; border-radius: 2.4cqw; background: #222121; box-shadow: inset 0 0 0 0.1cqw rgba(255, 255, 255, 0.07); }
.pdock .app { width: 3.3cqw; height: 3.3cqw; border-radius: 0.8cqw; transition: transform 0.15s; }
.pdock .app.running::before { bottom: -0.75cqw; background: rgba(255, 255, 255, 0.55); }
.pdock .app.front::before { background: #fff; }
.pdock .app.pressed { transform: scale(0.86); }
.key-btn { width: 3.6cqw; height: 3.6cqw; border-radius: 50%; display: grid; place-items: center; background: #333131; color: #e7e5e4; font-size: 1.6cqw; }
.key-btn svg { width: 2cqw; height: 2cqw; }
.home-bar { position: absolute; left: 50%; bottom: 1.1%; width: 34%; height: 0.55%; transform: translateX(-50%); border-radius: 999px; background: rgba(255, 255, 255, 0.85); z-index: 7; }

.kb { position: absolute; left: 0; right: 0; bottom: 0; padding: 1.2% 1.4% 9%; background: #2b2b2d; transform: translateY(101%); transition: transform 0.38s cubic-bezier(0.2, 0.8, 0.2, 1); z-index: 4; }
.kb.up { transform: none; }
.kb-bar { display: flex; gap: 0.5cqw; padding: 0 0 1.2%; margin-bottom: 1.6%; border-bottom: 0.1cqw solid rgba(255, 255, 255, 0.08); }
.kb-bar span { flex: 1; text-align: center; font-size: 0.85cqw; color: #d6d3d1; background: #3a3a3c; border-radius: 0.5cqw; padding: 0.4cqw 0; }
.kb-row { display: flex; justify-content: center; gap: 0.45cqw; margin-bottom: 0.9cqw; }
.kb-row span { flex: 0 0 calc((100% - 4.05cqw) / 10); height: 3.2cqw; border-radius: 0.5cqw; background: #6b6b6f; color: #fff; font-size: 1.35cqw; display: grid; place-items: center; box-shadow: 0 0.12cqw 0 rgba(0, 0, 0, 0.45); transition: background 0.08s, transform 0.08s; }
.kb-row span.mod { background: #464649; flex-basis: calc((100% - 4.05cqw) / 10 * 1.35); font-size: 1.1cqw; }
.kb-row span.space { flex: 1 1 auto; }
.kb-row span.hit { background: #a8a8ad; transform: scale(1.12); }

.finger { position: absolute; left: 50%; top: 50%; width: 5.4cqw; height: 5.4cqw; margin: -2.7cqw 0 0 -2.7cqw; border-radius: 50%; z-index: 8; opacity: 0; transform: scale(1.4);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.55) 0 30%, rgba(255, 255, 255, 0.18) 55%, rgba(255, 255, 255, 0) 70%);
  transition-property: left, top, opacity, transform; transition-timing-function: cubic-bezier(0.35, 0, 0.25, 1), cubic-bezier(0.35, 0, 0.25, 1), ease, ease; }
.finger.down { opacity: 1; transform: scale(1); }

/* Prose pages */
.prose { max-width: 720px; padding: 48px 24px 72px; margin: 0 auto; }
.prose h1 { font-size: clamp(34px, 5vw, 48px); margin-top: 0; }
.prose h2 { font-size: 24px; margin: 40px 0 10px; }
.prose h3 { font-size: 18px; margin: 28px 0 6px; }
.prose .meta { color: var(--muted); }
.prose code { font: 0.9em var(--mono); background: var(--surface-2); padding: 2px 6px; border-radius: 6px; }
.prose details { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 18px; margin: 10px 0; }
.prose summary { font-weight: 600; cursor: pointer; }
.prose details p { margin: 10px 0 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 28px 0 40px; font-size: 14px; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.site-footer nav { display: flex; gap: 18px; }
.site-footer a { color: var(--muted); }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "copy" "demo" "install"; grid-template-rows: none; }
  .hero-copy { padding-top: 8px; }
  .lede { margin-bottom: 28px; }
  .hero-install { margin-top: 40px; }
  .can-do { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .wrap { padding: 0 16px; }
  .prose { padding: 40px 16px 56px; }
  .demo-steps { font-size: 13px; gap: 4px; }
}
