/* The loader (Figma frames 92:10 "Loader FR 1" desktop and 92:50 "Loader FR 3" mobile; updated 2026-11-16: no glow under the dome,
   a huge black counter running off the screen). The first page of a visit plays it in full (with the 0 to 100 count); between pages
   the same cover with the logo comes down and lifts again, without the count (js/loader.js).
   Hidden by default, so a page without JS never sees it. An inline <head> script adds
   html.js and html.is-loading before first paint, which is the only thing that shows it.
   The whole frame fits every screen (cofounder, 2026-11-16: "the entire frame from figma is visible"): a position across the frame
   is that share of the screen's width, a position down it that share of the screen's height (1440 x 1024 on desktop, 450 x 1024 on a
   phone); the logo and the counter keep their proportions at --s, one frame pixel scaled by the tighter of the two. */
/* the counter's font, here too: Impressum, Datenschutz and the error page do not load css/v2.css (the same file, so it is fetched once) */
@font-face {
  font-family: 'Google Sans Flex';
  src: url('../assets/fonts/GoogleSansFlex.woff2') format('woff2');
  font-weight: 1 1000; font-style: normal; font-display: swap;
}
.loader { display: none; }
html.js.is-loading .loader {
  display: block;
  position: fixed; left: 0; top: 0; z-index: 10000;    /* above everything */
  width: 100vw;          /* 100vw takes in the scrollbar's reserved gutter, which showed as a black strip beside the dome */
  height: 100vh; height: 100lvh;
  overflow: hidden; pointer-events: none;
  color: #fff; font-family: 'Google Sans Flex', 'Geom', system-ui, sans-serif;
  /* desktop: the 1440 x 1024 frame. dome = 172 white + 286 half-ellipse = 458 tall; panel edge ry = 286 */
  --s: min(100vw / 1440, 100vh / 1024);
  --dome-h: 44.73vh;       /* 458 of 1024 */
  --dome-ry: 27.93vh;      /* 286 of 1024 */
  --panel-ry: 27.93vh;
  --logo-top: 10.84vh;     /* 111 of 1024 */
  --logo-w: calc(375 * var(--s));
  --count-size: calc(300 * var(--s));   /* Google Sans Flex black, 300px in the frame (Figma FR1) */
  --count-x: 88.61vw;      /* its centre, 1276 of 1440: it runs off the right edge, as in the frame */
  --count-top: 78.52vh;    /* its line's top, 804 of 1024: it runs off the bottom, as in the frame */
}
/* While scroll is locked the gutter stays reserved, so when the lock lifts the scrollbar takes its place and the page
   does not shift by a scrollbar width. Accepted trade-off: on classic-scrollbar desktops the reserved 15px shows as a
   strip of the html background (black here) beside the cover instead of a scrollbar track, which beats a reflow.
   Overlay scrollbars (macOS, phones) reserve nothing. It is scoped to the lock on purpose. */
html.js.is-loading { scrollbar-gutter: stable; background: #000; } /* the reserved gutter shows black beside the cover: the browser paints it
   with the background colour only (a white-over-black gradient came out all white), and not reserving it would shift the page 15px
   when the lock lifts; overlay scrollbars (phones, macOS) have no gutter */
html.js.is-loading, html.js.is-loading body { overflow: hidden; }  /* scroll is locked only while it runs */

/* black sheet. It is taller than the viewport by its curved edge, so at rest the edge sits below the fold;
   lifting it by its own height brings the ellipse up through the page and off the top. */
html.js.is-loading .loader__panel {
  position: absolute; left: 0; right: 0; top: 0;
  height: calc(100vh + var(--panel-ry)); height: calc(100lvh + var(--panel-ry));
  background: #000;
  border-radius: 0 0 50% 50% / 0 0 var(--panel-ry) var(--panel-ry);
  will-change: transform;
}

/* white dome (the sand glow that used to sit under it is gone in the updated frames: plain black there) */
html.js.is-loading .loader__dome {
  position: absolute; left: 0; right: 0; top: 0;
  height: var(--dome-h);
  will-change: transform;
}
html.js.is-loading .loader__dome::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: var(--dome-h);
  background: #fff;
  border-radius: 0 0 50% 50% / 0 0 var(--dome-ry) var(--dome-ry);
}
/* the logo sits in the dome, so it leaves with it; 375 x 223.5, centred, its top 111 down the 1440 frame */
html.js.is-loading .loader__logo {
  position: absolute; display: block; left: 50%; top: var(--logo-top); width: var(--logo-w); height: auto; translate: -50% 0;
}

/* counter (Figma FR1 / FR3): Google Sans Flex black, huge, its line's top at --count-top and centred on --count-x, so it runs off
   the screen (right and bottom on desktop, the bottom on a phone). The box is a viewport wide, centred there; the numbers roll
   inside it (js/loader.js). The floor keeps its top clear of the dome when the viewport is short and wide. */
html.js.is-loading .loader__count {
  position: absolute; left: calc(var(--count-x) - 50vw); width: 100vw;
  top: max(var(--count-top), var(--dome-h) + 1vh);
  height: 1.25em; font-size: var(--count-size); line-height: 1.25; font-weight: 900;
  text-align: center; overflow: hidden;
  font-variant-numeric: tabular-nums;
}
html.js.is-loading .loader__num { position: absolute; left: 0; right: 0; top: 0; will-change: transform; }

/* Page transition (js/loader.js): the same cover and reveal, with the logo and no counter. is-transition is set by the inline head
   script on arrival and by loader.js while the cover comes down. The cover also takes the pointer, so nothing behind it can be clicked. */
html.js.is-loading.is-transition .loader { pointer-events: auto; }
html.js.is-loading.is-transition .loader__count { display: none; }

@media (max-width: 767px) {
  html.js.is-loading .loader {
    /* mobile: the 450 x 1024 frame. dome = 172 + 200 = 357 tall (ry 200); panel edge ry = 185 */
    --s: min(100vw / 450, 100vh / 1024);
    --dome-h: 34.86vh;       /* 357 of 1024 */
    --dome-ry: 19.53vh;      /* 200 of 1024 */
    --panel-ry: 18.07vh;     /* 185 of 1024 */
    --logo-top: 7.91vh;      /* 81 of 1024 */
    --logo-w: calc(253 * var(--s));   /* 56.22% of 450 */
    --count-size: calc(300 * var(--s));
    --count-x: 57.33vw;      /* centred on 258 of 450 */
    --count-top: 74.32vh;    /* 761 of 1024 */
  }
}
