/* Guided tours of the native Mac apps. A white page, the app window as the stage, a spotlight that moves to the part each step is about, and the narration under it. Each tour page sets --accent. Light only, like the rest of the site. */
:root {
  color-scheme: light;
  --bg: #ffffff;
  --panel: #f6f7f9;
  --rule: #e3e6eb;
  --ink: #0f1419;
  --muted: #5b6573;
  --accent: #1f3a68;
  --dim: rgba(15, 20, 25, 0.34);
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Inter", "Helvetica Neue", Arial, system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.page { max-width: 76rem; margin: 0 auto; padding: 1.25rem max(16px, env(safe-area-inset-left)) 3rem; display: grid; gap: 1.25rem; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }
.mark { width: 2.25rem; height: 2.25rem; border-radius: 0.6rem; background: var(--accent); color: #fff; display: grid; place-items: center; font-family: var(--serif); font-weight: 600; font-size: 1.15rem; flex: none; }
.brand h1 { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 1.35rem; letter-spacing: -0.01em; line-height: 1.1; }
.brand p { margin: 0; color: var(--muted); font-size: 0.85rem; }
.back { font-size: 0.85rem; color: var(--muted); text-decoration: none; border: 1px solid var(--rule); border-radius: 999px; padding: 0.35rem 0.85rem; }
.back:hover { color: var(--ink); border-color: var(--muted); }

/* The app window */
.window { border-radius: 12px; border: 1px solid var(--rule); background: var(--panel); box-shadow: 0 30px 70px -40px rgba(15, 20, 25, 0.45), 0 2px 6px -2px rgba(15,20,25,0.08); overflow: hidden; }
.stage { position: relative; aspect-ratio: 16 / 9.6; overflow: hidden; background: var(--panel); cursor: pointer; }
.layer { position: absolute; transform-origin: 0 0; transition: transform 1.1s cubic-bezier(.22,.8,.24,1); will-change: transform; }
.layer img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 0.6s ease; }
.layer img.on { opacity: 1; }
.spot { position: absolute; border-radius: 8px; box-shadow: 0 0 0 2px var(--accent), 0 0 0 200vmax var(--dim); transition: all 1.1s cubic-bezier(.22,.8,.24,1), opacity .4s ease; pointer-events: none; }
.spot.off { opacity: 0; }
.progress { height: 3px; background: var(--rule); }
.progress b { display: block; height: 100%; width: 0; background: var(--accent); }

/* Narration */
.say { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem 2rem; align-items: start; }
.count { font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.say h2 { margin: 0.2rem 0 0.4rem; font-family: var(--serif); font-weight: 600; font-size: clamp(1.35rem, 2.6vw, 1.85rem); letter-spacing: -0.01em; line-height: 1.15; text-wrap: balance; }
.say p { margin: 0; color: var(--muted); max-width: 46rem; min-height: 3.1em; }
.ctrls { display: flex; gap: 0.5rem; align-items: center; }
.ctrls button { height: 2.5rem; min-width: 2.5rem; padding: 0 0.9rem; border-radius: 999px; border: 1px solid var(--rule); background: var(--bg); cursor: pointer; font-size: 0.9rem; }
.ctrls button:hover { border-color: var(--muted); }
.ctrls .primary { background: var(--accent); border-color: var(--accent); color: #fff; }

.chapters { display: flex; gap: 0.4rem; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.chapters button { border: 1px solid var(--rule); background: var(--bg); border-radius: 999px; padding: 0.3rem 0.75rem; font-size: 0.8rem; color: var(--muted); cursor: pointer; }
.chapters button[aria-current="step"] { color: #fff; background: var(--accent); border-color: var(--accent); }
.note { font-size: 0.8rem; color: var(--muted); border-top: 1px solid var(--rule); padding-top: 0.9rem; }

@media (max-width: 700px) {
  .say { grid-template-columns: minmax(0, 1fr); }
  }
@media (prefers-reduced-motion: reduce) {
  .layer, .spot, .layer img { transition: none; }
}
