/*
 * phone.css: the page re-composed for a phone.
 *
 * index.php links this file last, with media="(max-width: 767px)", so nothing in it can
 * reach a tablet or a desktop. It is not a second design: it takes the same pieces and
 * sets them for a narrow, tall screen that is held in one hand and scrolled with a thumb.
 *
 * What it changes, in page order:
 *   spacing   one scale for the whole page (--section-y and friends), about 40% tighter
 *   calls     one small floating button (base.css) instead of a bar across the bottom
 *   cover     the browser (the moving preview) leads at full width; the handset is a
 *             small second device and the project buttons sit beside it
 *   work      each project is one composed block: words, then the browser at full
 *             width with the handset tucked into its corner, then the link
 *   media     the board and the two platform panels are set densely
 *   services  no pin: the deck assembles as it scrolls into place, then the eight
 *             services follow as rows (services.js has the matching phone branch)
 *   the held sections (console, inbox, software, process) take much less scroll
 *
 * Rules that must beat a `html.motion-ready ...` rule in a section file repeat that prefix.
 */

/* ---------- type: body copy a size up, for reading at arm's length ---------- */

:root { --fs-body: 1.0625rem; }

/* ---------- spacing: one scale ---------- */

:root {
  --section-y: clamp(56px, 15vw, 72px);
  --stack-tight: 12px;    /* heading to its sentence */
  --stack: 22px;          /* words to the visual under them */
  --stack-loose: 36px;    /* one block to the next inside a section */
}

/* ---------- the header ---------- */

/* On a phone the header stays where it is. It used to slide away while reading down, and
   with nothing fixed at the top, Safari on current iPhones draws the page straight up
   under the clock and battery. A header that is always there gives that strip a solid
   ground. It also keeps clear of the status bar where the browser reports one. */
html.header-away .site-header { transform: none; }
.site-header { padding-top: env(safe-area-inset-top, 0px); }
body { padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0px)); }
/* Safari colours that strip from the fixed thing it finds at the very top edge of the page.
   The paper grain (base.css) is a fixed layer over everything, header included, and because
   it is a pseudo-element Safari reads it as the page itself: it never got as far as the
   header, found nothing fixed, and let the page show through behind the clock. On a phone
   the grain now starts under the header, so the header is what Safari finds. */
html::after { top: calc(var(--header-h) + env(safe-area-inset-top, 0px)); }
.turn-ctrl { min-height: 44px; gap: 0 8px; }
/* the name at a readable size: a long one takes two lines (every name shares one cell,
   so the cell is two lines deep for all of them and nothing moves when it changes) */
.turn-name--big { padding-bottom: .2em; font-size: 1rem; line-height: 1.08; }
.turn-name--big .turn-name__t { white-space: normal; }
/* its address: supporting detail, clearly smaller than the name */
.turn-url { font-size: .71875rem; letter-spacing: .02em; }
