/* Shared pieces: reset, type stacks, light/dark pictures, the button, reveals, the tile card and the drawn macOS row.
   The page's own layout, the Mac, the pill, the art and the lit words are in style.css.
   Colours come only from ../hub/tokens.css (var(--…)), plus the black/white keywords. Logical properties throughout
   (inline/block), so ?lang=he lays out right to left without extra rules. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); overflow-x: clip;
  font: 400 17px/1.5 var(--font-text); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
:root {
  /* SF Pro on Apple devices; Hebrew falls through to the system Hebrew face (SF Hebrew on a Mac), then Noto/Arial. */
  --font-text: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "Helvetica Neue", "Arial Hebrew", "Noto Sans Hebrew", system-ui, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", "Arial Hebrew", "Noto Sans Hebrew", system-ui, sans-serif;
  /* New York on Apple devices (ui-serif), then good book faces; Hebrew uses the system's Hebrew serif. */
  --font-serif: ui-serif, "New York", "Iowan Old Style", "Charter", Georgia, "Times New Roman", "Noto Serif Hebrew", serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, monospace;
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-spring: cubic-bezier(.22, 1.12, .36, 1);
  --gutter: clamp(16px, 5vw, 64px);
  --measure: 1180px;
}
:lang(he) { --font-display: -apple-system, BlinkMacSystemFont, "SF Hebrew", "Arial Hebrew", "Noto Sans Hebrew", system-ui, sans-serif; }
img { display: block; max-inline-size: 100%; block-size: auto; }
a { color: var(--sky-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
button { font: inherit; color: inherit; }
kbd { display: inline-grid; place-items: center; min-inline-size: 1.55em; block-size: 1.55em; padding-inline: .3em; margin-inline: .08em;
  font: 500 .72em/1 var(--font-text); color: var(--ink); background: var(--surface); border-radius: 6px; vertical-align: .14em;
  box-shadow: inset 0 0 0 1px var(--hairline), 0 1px 0 rgb(var(--shade-rgb) / .08); }
.skip { position: absolute; inset-inline-start: 12px; inset-block-start: -60px; z-index: 50; padding: 8px 12px; background: var(--surface); border-radius: 8px; }
.skip:focus { inset-block-start: 12px; }
.sr { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* One picture per look. Pages pass ?theme= for screenshots; otherwise the system setting picks. */
.l-dark { display: none; }
:root[data-theme="dark"] .l-dark { display: block; }
:root[data-theme="dark"] .l-light { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .l-dark { display: block; }
  :root:not([data-theme="light"]) .l-light { display: none; }
}

/* The one black button. Charcoal in light, light ink in dark (tokens --primary / --on-primary). */
.btn { display: inline-flex; align-items: center; gap: 10px; block-size: 52px; padding-inline: 26px; border-radius: 999px;
  background: var(--primary); color: var(--on-primary); font: 500 17px/1 var(--font-text); letter-spacing: -.01em;
  transition: transform .2s var(--ease-out), box-shadow .2s var(--ease-out);
  box-shadow: 0 1px 0 color-mix(in srgb, white 16%, transparent) inset, 0 10px 24px -10px rgb(var(--shade-rgb) / .45); }
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: scale(.98); }
.btn svg { inline-size: 18px; block-size: 18px; }
.btn.small { block-size: 36px; padding-inline: 16px; font-size: 14px; gap: 7px; }
.btn.small svg { inline-size: 14px; block-size: 14px; }

/* Reveal on scroll: rise + unblur once. Reduced motion / ?still=1 → shown, no movement. */
[data-reveal] { opacity: 0; transform: translateY(18px); filter: blur(4px);
  transition: opacity .7s var(--ease-out), transform .9s var(--ease-out), filter .7s var(--ease-out);
  transition-delay: var(--d, 0s); }
[data-reveal].in { opacity: 1; transform: none; filter: none; }
.still [data-reveal] { opacity: 1; transform: none; filter: none; transition: none; }

/* ---------- Moving tiles ---------- */
/* Install help: the macOS Security row, drawn (not a screenshot), tiny */
.osrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--hairline); font: 400 13px/1.35 var(--font-text); color: var(--ink); }
.osrow span:last-child { flex: none; padding: 5px 10px; border-radius: 7px; background: var(--well); box-shadow: inset 0 0 0 1px var(--hairline), 0 0 0 3px color-mix(in srgb, var(--sky) 55%, transparent); font-weight: 500; }
.display em, .title em { font-style: normal; }
