/* GRAPHICA Flow site — chrome.css — v1.27 (no X for the full screen; the hand-over to the tablets: the line, sparks and river only fade, only the words blur; the start screen's turning phone and "touch to start"); before: v1.26 (the skip button sits left of Play / Pause; both go away before the tablets, is-hub-near); before: v1.25 (the hand-over leaves the ground alone: only the things on it pull back and go out; before: v1.24,the hand-over to the film scene: the old picture pulls back, blurs and goes out; before: v1.23, every round button of the site is Martin's Liquid Glass (ios-glass.js), also the X on a light page; before: v1.22, the skip-to-demos button, bottom middle; before: v1.21, no page scroll bar over the scene; the X is frosted light glass over a light page; before: v1.20, the X is the Play button's clear glass; before: v1.19, the film scene's layer over the page, ?hub=1; the X's F11 hint; before: v1.18, "[ SPACE ]": capitals, thinner, 15% smaller; before: v1.17, "[ Space ]" in thin Roboto Flex; before: v1.16, the corner buttons are 25% bigger, clearer glass and sit square in their corners; "[ Space ]" beside the play button on a computer; before: v1.15, the small logo at the top fades in and out slowly and softly; before: v1.14, the play button is clear glass, as the iPhone's liquid glass, no yellow; before: v1.13, yellow glass; before: v1.12, no stage line anywhere, only the play button, bottom right; before: v1.11, a phone shows only the play button, bottom right; before: v1.10, the stage words never touch; before: the stage map has no frame; a round glowing play button; the Space hint)
   What stays on the screen the whole time: the header (the small logo), the stage map with the play / pause
   button at the bottom, and the skip link. Quiet glass, pill shapes, one round icon. The call button
   (.call-pill) is the one in the last scene. The curtain is the dark the page comes up out of (scripts/curtain.js).
   The stage map's line is a small copy of the thread (warm → pale → cold, softly glowing), and the active stage
   sends out a slow ripple, as in the interview app. */

/* ---- the curtain: the page comes up out of the dark; it lifts over --curtain-fade (set by scripts/curtain.js) ---- */
.site-curtain {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--ground);
  opacity: 1;
  pointer-events: none;
  transition: opacity var(--curtain-fade, 1.8s) var(--ease-out);

  /* if the script never lifts it, it goes by itself after --curtain-failsafe: the page is never left dark */
  animation: curtain-failsafe 0.6s var(--ease-out) var(--curtain-failsafe, 8s) forwards;
}

.site-curtain.is-lifted {
  opacity: 0;
}

@keyframes curtain-failsafe {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

/* ---- the start screen: black, one word. A press puts the site on the full screen and the black lifts over
   --gate-fade (scripts/start-gate.js) ---- */
.start-gate {
  position: fixed;
  inset: 0;
  z-index: 210;
  display: grid;
  place-items: center;
  background: var(--ground);
  opacity: 1;
  transition: opacity var(--gate-fade, 1.4s) var(--ease-out);
}

.start-gate[hidden] {
  display: none;
}

.start-gate.is-opening {
  opacity: 0;
  pointer-events: none;
}

/* the Play of the films (showreel/engine/gate-designs.css draws it): this button only gives it its box and fades it out on a press.
   It never changes size or opacity when it gets the focus; the only focus look is the Play's own glow on hover. */
.start-gate__button {
  appearance: none;
  position: relative;
  width: calc(var(--gk-fs0) * 6.4);
  height: calc(var(--gk-fs0) * 2);
  padding: 0;
  border: 0;
  background: none;
  color: var(--pale);
  font: inherit;
  cursor: pointer;
}

.start-gate__button:focus,
.start-gate__button:focus-visible {
  outline: none;
}

/* pressed: the Play fades out to plain black (--gate-label-fade, scripts/start-gate.js) */
.start-gate.is-leaving .start-gate__button {
  opacity: 0;
  cursor: default;
  transition: opacity var(--gate-label-fade, 0.7s) var(--ease-out);
}

/* an upright phone: the turning phone under the Play (gate-designs.css draws it); after a press that could not turn the
   phone, the help line too */
.start-gate__turn {
  position: absolute;
  inset: 0;
  display: none;
  pointer-events: none;
}

.start-gate.is-upright .start-gate__turn {
  display: block;
}

.start-gate.is-stuck .gk-help {
  display: block;
}

/* the site's film on an upright phone (scripts/turn-pause.js): black with the turning phone; the film waits under it */
.site-turn {
  position: fixed;
  inset: 0;
  z-index: 205;
  display: none;
  background: #000;
}

.site-turn.is-up {
  display: block;
}

/* ---- skip link: visible only when focused from the keyboard ---- */
.skip-link {
  position: fixed;
  left: var(--gutter);
  top: 10px;
  z-index: 80;
  padding: 0.6em 1em;
  border-radius: var(--radius-pill);
  background: var(--pale);
  color: var(--warm-ink);
  font-weight: var(--weight-medium);
  text-decoration: none;
  translate: 0 -160%;
  transition: translate var(--fade-quick) var(--ease-out);
}

.skip-link:focus-visible {
  translate: 0 0;
}

/* ---- header ---- */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 60;
  height: var(--header-h);
  padding: env(safe-area-inset-top, 0) var(--gutter) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.site-header > * {
  pointer-events: auto;
}

.site-header__brand {
  display: block;
  width: clamp(118px, 11vw, 168px);
  color: var(--ink);
  text-decoration: none;
  --logo-fade-out: calc(var(--header-logo-fade-out) * 1s);

  opacity: 0;
  visibility: hidden;
  transition:
    opacity var(--logo-fade-out) var(--ease-soft),
    visibility 0s linear var(--logo-fade-out);
}

/* the small logo shows only while no big logo is on screen (scripts/header.js); it fades in and out softly */
.site-header.is-small-logo .site-header__brand {
  opacity: 1;
  visibility: visible;
  transition:
    opacity calc(var(--header-logo-fade-in) * 1s) var(--ease-soft),
    visibility 0s;
}

.site-header__wordmark {
  display: none;
}

/* ---- the call button: a pill with a round icon ---- */
.call-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
  padding: 0.34em 1.15em 0.34em 0.34em;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: var(--ground-glass);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  color: var(--ink);
  font-size: var(--t-small);
  font-weight: var(--weight-medium);
  font-stretch: var(--stretch-label);
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
  transition:
    border-color var(--fade-quick) var(--ease-out),
    box-shadow var(--fade-quick) var(--ease-out);
}

.call-pill:hover,
.call-pill:focus-visible {
  border-color: rgba(254, 194, 49, 0.6);
  box-shadow: 0 8px 24px -10px rgba(254, 194, 49, 0.5);
}

.call-pill__icon {
  display: grid;
  place-items: center;
  width: 2.2em;
  height: 2.2em;
  border-radius: 50%;
  background: var(--warm);
  color: var(--warm-ink);
}

.call-pill__icon svg {
  width: 1.05em;
  height: 1.05em;
  fill: currentcolor;
}

.call-pill--large {
  font-size: var(--t-body);
}

/* ---- stage map ---- */
/* ---- play / pause button: the only thing left of the old stage map, bottom right on every screen
   (Martin, 2026-10-15: no stage line anywhere) ---- */
.stage-map-host {
  position: fixed;
  right: calc(env(safe-area-inset-right, 0px) + var(--corner-inset));
  bottom: calc(env(safe-area-inset-bottom, 0px) + var(--corner-inset));
  z-index: 60;
}

.stage-map {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* "[ Space ]": the key that plays and pauses, only where there is a keyboard and a mouse (a phone shows nothing) */
.stage-map__key {
  display: none;
  color: var(--ink);
  --key-size-share: 0.85; /* 15% smaller than the small text */
  --key-weight: 100; /* the thinnest Roboto Flex has */

  font-family: var(--font); /* Roboto Flex, thin and light */
  font-size: calc(var(--t-small) * var(--key-size-share));
  font-weight: var(--key-weight);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.6;
  white-space: nowrap;
  user-select: none;
}

@media (hover: hover) and (pointer: fine) {
  .stage-map__key {
    display: block;
  }
}

.stage-map__play {
  display: inline-flex;
  align-items: center;
  padding: 0;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}

/* the label is for screen readers only */
.stage-map__play-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* the round button (play / pause here, and the skip button): Martin's Liquid Glass (ios-glass.js: reflection,
   refraction, rim light, as in the glass bench); this file only gives it the size and the place */
.stage-map__icon {
  position: relative;
  display: grid;
  place-items: center;
  width: var(--corner-button);
  height: var(--corner-button);
  border-radius: 50%;
  color: var(--ink);
}
.stage-map__glyph {
  width: 58%;
  height: 58%;
  filter: var(--glass-glyph-shadow);
  fill: currentcolor;
  stroke: currentcolor;
}

.stage-map__glyph-play {
  stroke-width: 1.7;
  stroke-linejoin: round;
}

.stage-map__glyph-pause {
  stroke: none;
}

.stage-map__play:not(.is-playing) .stage-map__glyph-pause,
.stage-map__play.is-playing .stage-map__glyph-play {
  display: none;
}

/* ---- the skip button (scripts/skip-to-demos.js): once the film has been seen, a round glass button, bottom middle, on
   the level of Play / Pause; it takes the page to the demo films. The glass is the round button's own (.stage-map__icon).
   It comes with a scale, never an opacity (the glass rule: nothing above a glass element fades), and goes when the scene covers the page ---- */
.skip-demos {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + var(--corner-inset));
  z-index: 60;
  translate: -50% 0;
  scale: 0.4;
  visibility: hidden;
  transition:
    scale var(--fade-slow) var(--ease-out),
    visibility 0s linear var(--fade-slow);
}

.skip-demos.is-shown {
  scale: 1;
  visibility: visible;
  transition:
    scale var(--fade-slow) var(--ease-out),
    visibility 0s;
}

.is-hub-on .skip-demos {
  display: none;
}

/* the skip button sits in the row of Play / Pause, just left of it (Martin 2026-11-17: "next to the play button") */
.stage-map > .skip-demos {
  position: static;
  translate: none;
}

/* before the scene with the tablets the round buttons go away (Martin 2026-11-17), with a scale, never an opacity
   (the glass rule), and come back if the visitor scrolls back (scripts/hub-handoff.js is-hub-near) */
.stage-map-host {
  transition:
    scale var(--fade-slow) var(--ease-out),
    visibility 0s;
}

.is-hub-near .stage-map-host {
  scale: 0.4;
  visibility: hidden;
  transition:
    scale var(--fade-slow) var(--ease-out),
    visibility 0s linear var(--fade-slow);
}
/* ---- the local model of the whole site (?hub=1, scripts/hub-handoff.js): the film scene comes up over the page
   after the steps. It fades with opacity only (no glass inside the page fades with it); the X stays above it ---- */
.hub-layer {
  position: fixed;
  inset: 0;
  z-index: 220;
  background: var(--ground);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity var(--hub-fade, 1.6s) var(--ease-soft),
    visibility 0s linear var(--hub-fade, 1.6s);
}

.hub-layer.is-on {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition:
    opacity var(--hub-fade, 1.6s) var(--ease-soft),
    visibility 0s;
}

.hub-layer iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/* the old picture (the line, the steps) goes out of focus while the scene comes over it, the two overlapping a little
   (Martin 2026-11-17); the scene comes up in --hub-fade seconds, and so does the blur */
/* the seamless hand-over (Martin 2026-11-17, night): while it goes out of focus the old picture also pulls back (the
   camera backs away from it) and goes out; the scene's camera keeps backing away from the same moment, so nothing on
   the screen stands still or empty. The ground and its vignette are NOT in this: the scene's ground goes on from this
   very light (hub-handoff.js startScene), so the colours never move towards black. Nothing with glass is in here */
.is-hub-on .world > :not(.world-ground):not(.veil),
.is-hub-on .copy-layer {
  transform: scale(var(--hub-page-pullback, 0.9));
  transform-origin: 50% 50%;
  opacity: 0;
  transition:
    transform var(--hub-fade, 1.2s) cubic-bezier(0.2, 0.6, 0.3, 1),
    opacity var(--hub-fade, 1.2s) var(--ease-soft);
}

/* only the words go out of focus; the line, the sparks, the river and its swirls only fade (Martin 2026-11-18: a blur
   over the whole drawn world is far too heavy for a tablet) */
.is-hub-on .copy-layer {
  filter: blur(var(--hub-page-blur, 14px));
  transition:
    filter var(--hub-fade, 1.2s) var(--ease-soft),
    transform var(--hub-fade, 1.2s) cubic-bezier(0.2, 0.6, 0.3, 1),
    opacity var(--hub-fade, 1.2s) var(--ease-soft);
}

/* the scene covers the page sooner than the page goes out (--hub-cover): the edges of the shrinking old picture are
   never seen on their own */
.hub-layer.is-on {
  transition:
    opacity var(--hub-cover, 0.6s) cubic-bezier(0.2, 0.7, 0.3, 1),
    visibility 0s;
}

/* the page's own scroll bar does nothing once the scene is over it (Martin 2026-11-16: "the scroller does nothing, it
   should not be there"); its pale edge also showed beside the films as a blinking white line */
.is-hub-on {
  scrollbar-width: none;
}

.is-hub-on::-webkit-scrollbar {
  display: none;
}


