/* Page openings v3 (12 Nov 2026): start, booking, pay, account, privacy, terms, safeguarding, procyon-*, 404.
   Loaded after site-v3.css. Colours are the --ib-* tokens only. Prefix pg-. Pairs with assets/js/pages-v3.js.
   The placeholder .pg-open is in each page's HTML and is purely decorative (aria-hidden). Without JavaScript it shows a
   static figure drawn in CSS; with JavaScript the canvas and readouts are drawn into it; with reduced motion the canvas
   shows one still. Nothing here touches a form, a field, a button or a link. */

:root { --pg-in: cubic-bezier(.23, 1, .32, 1); --pg-move: cubic-bezier(.77, 0, .175, 1); }

/* ---------- hero pages: text left, figure right on desktop; figure between H1 and copy on a phone ---------- */
.pg-hero { position: relative; overflow-x: clip; isolation: isolate; }
.pg-hero > .ib-container { position: relative; z-index: 1; display: flex; flex-direction: column; }
.pg-hero > .ib-container > * { order: 4; }
.pg-hero > .ib-container > .ib-eyebrow { order: 1; align-self: flex-start; }
.pg-hero > .ib-container > h1 { order: 2; }
.pg-hero > .ib-container > .pg-open { order: 3; }
.pg-open { position: relative; z-index: 0; width: 100%; height: clamp(270px, 76vw, 340px); margin: 1.25rem 0 .25rem; border-radius: var(--ib-radius-lg); }
.pg-open canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; cursor: grab; }
.pg-open canvas:active { cursor: grabbing; }

@media (min-width: 1000px) {
  .pg-hero { min-height: min(35rem, 74vh); display: flex; align-items: center; }
  .pg-hero > .ib-container { display: block; width: 100%; }
  .pg-hero > .ib-container > *:not(.pg-open) { max-width: min(35rem, 46vw) !important; }
  .pg-hero > .ib-container > .pg-open { position: absolute; z-index: -1; right: calc(-1 * max(0px, (100vw - 80rem) / 2)); top: -5rem; bottom: -4rem; width: min(52vw, 46rem); height: auto; margin: 0; border-radius: 0;
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 16%); mask-image: linear-gradient(to right, transparent 0, #000 16%); }
  .pg-hero > .ib-container > .pg-open canvas { cursor: grab; }
}

/* ---------- readouts: glass cells with rolling digits ---------- */
.pg-ro { position: absolute; left: 0; right: 0; bottom: .6rem; display: flex; gap: .5rem; justify-content: flex-end; padding: 0 .5rem; pointer-events: none; }
@media (min-width: 1000px) { .pg-ro { padding-right: max(.5rem, calc((100vw - 80rem) / 2 + 1rem)); } }
@media (min-width: 1000px) and (max-width: 1280px) { .pg-ro { padding-right: 1rem; } }
.pg-cell { min-width: 5.3rem; padding: .42rem .7rem .46rem; border-radius: .7rem; border: 1px solid var(--ib-line); background: color-mix(in srgb, var(--ib-card-bg) 78%, transparent);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); box-shadow: var(--ib-shadow); display: flex; flex-direction: column; gap: .12rem; }
.pg-lab { font-size: .64rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ib-ink-muted); font-weight: 600; line-height: 1; }
.pg-odo { display: inline-flex; font-size: 1.32rem; line-height: 1; height: 1em; overflow: hidden; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ib-ink); letter-spacing: -.01em; }
.pg-dg { display: inline-block; height: 1em; width: .62em; overflow: hidden; position: relative; }
.pg-dg::before { content: "0\A 1\A 2\A 3\A 4\A 5\A 6\A 7\A 8\A 9"; white-space: pre; display: block; line-height: 1; text-align: center; transform: translateY(calc(var(--d, 0) * -1em)); transition: transform .55s var(--pg-move); }
.pg-ch { display: inline-block; line-height: 1; white-space: pre; }
@media (max-width: 480px) { .pg-cell { min-width: 0; flex: 1 1 0; padding: .38rem .5rem .42rem; } .pg-odo { font-size: 1.12rem; } .pg-lab { font-size: .58rem; letter-spacing: .08em; } .pg-ro { gap: .35rem; padding: 0 .1rem; } }

/* ---------- the account band and the 404 stage ---------- */
.pg-band { position: relative; border-bottom: 1px solid var(--ib-line); background: radial-gradient(ellipse at top right, color-mix(in srgb, var(--ib-accent) 8%, transparent), transparent 55%), var(--ib-bg); }
.pg-band .pg-open { width: 100%; max-width: 72rem; margin: 0 auto; border-radius: 0; height: clamp(250px, 62vw, 330px); }
.pg-404 { position: relative; overflow: hidden; isolation: isolate; min-height: min(36rem, 78vh); display: flex; align-items: center; }
.pg-404 > .pg-open { position: absolute; z-index: 0; inset: 0; width: 100%; height: 100%; margin: 0; border-radius: 0; }
.pg-404 > .ib-container { position: relative; z-index: 1; width: 100%; }

/* ---------- no JavaScript: a static figure drawn in CSS (hidden as soon as the canvas is in) ---------- */
.pg-open:not(.pg-ready) { background:
  radial-gradient(circle at 56% 46%, color-mix(in srgb, var(--ib-ink) 74%, var(--ib-accent)) 0 13%, transparent 13.4%),
  radial-gradient(circle at 56% 46%, color-mix(in srgb, var(--ib-accent) 22%, transparent) 0 26%, transparent 27%),
  repeating-radial-gradient(ellipse 34% 20% at 56% 46%, transparent 0 94%, color-mix(in srgb, var(--ib-accent) 55%, transparent) 95% 98%, transparent 99% 200%); }

@media (prefers-reduced-motion: reduce) { .pg-dg::before { transition: none; } }

/* ---------- 404: the graph is the stage behind the copy ---------- */
.pg-404 > .pg-open { pointer-events: none; }
.pg-404 > .pg-open canvas { cursor: crosshair; touch-action: pan-y; }
@media (min-width: 1000px) {
  .pg-404 > .ib-container { text-align: left; max-width: 38rem; margin-left: max(1.5rem, calc((100vw - 80rem) / 2 + 1.5rem)); margin-right: auto; }
  .pg-404 .ib-lost-constellation { margin-left: 0; }
}
.pg-404 .pg-ro { padding-right: max(.5rem, calc((100vw - 80rem) / 2 + 1rem)); }

/* account: both views start hidden until the sign-in check answers; reserve the room so the footer starts below the
   fold instead of jumping down when a view appears (live CLS 0.108 at 1440). Layout only, the form is untouched. */
.ib-section:has(> .ib-container > [data-auth-view]) { min-height: calc(100vh - 300px); }
