/* ============================================================================
   tokens.css — VALUES ONLY
   ----------------------------------------------------------------------------
   Every colour, size, duration and easing in this project is declared here and
   nowhere else. guard.sh fails the build on a literal in any other stylesheet.

   Why: TLG's three-layer split survives only because a script enforces it.
   Without the guard it decays inside two sessions. That is measured.

   Numbers marked "measured" come from the IDML, not from taste.
   ========================================================================== */

:root {
  /* ---- palette --------------------------------------------------- measured
     IDML swatch names kept so a value can be traced back to the file. */
  --c-cyan:    #00BAE9;   /* "MWM Cyan"    rgb(0,186,233)   — Über uns   */
  --c-magenta: #E5007D;   /* "MGM Magenta" rgb(229,0,125)   — Portfolio  */
  --c-gelb:    #FFE600;   /* "MGM Gelb"    rgb(255,230,0)   — Referenzen */
  --c-schwarz: #262626;   /* header band   rgb(38,38,38)    — Kontakt    */

  --c-ink:        #ffffff;
  --c-ink-dim:    rgba(255, 255, 255, 0.72);
  --c-ink-on-gelb: #262626;   /* yellow needs dark text to stay legible */
  --c-shade:      rgba(0, 0, 0, 0.38);

  /* ---------------------------------------------------------------------
     PANEL AND FOOTER OPACITY — MEASURED, not chosen.

     These were all rgba(0,0,0,0.38), which is far too see-through: over the
     blue machine photo the footer read as a blue box, and the Kontakt panel
     was an unreadable wash instead of the solid dark card the design draws.

     Fitted from the PDF by comparing the same photo inside and outside each
     panel and solving for (colour, alpha):

       footer     the green channel goes 0 -> 30 inside the panel, and black
                  cannot ADD green, so it is not black at all: it is the brand
                  grey #262626 at 0.80. Four samples agree.
       Kontakt    grey 45 at 0.94 - effectively a solid card.
       coloured   the cyan panel fits its brand colour at 0.73 with a residual
                  of 5 per sample, the cleanest fit of the four.
     --------------------------------------------------------------------- */
  /* There is no --c-footer any more. The footer is the page's own colour at
     --c-panel-veil, exactly like the panels, so on Start and Kontakt — where
     the page's colour IS --c-schwarz — it comes out at the old rgba(38,38,38,
     0.80) on its own, and on the other three it comes out cyan, magenta or
     yellow. One rule instead of a constant that could only ever be right on
     two pages out of five. */
  /* THE SCRIM. Every inner page in the document lays a black rectangle at 50%
     over the whole background photograph, 1700x1542, before anything else is
     drawn. The start page does NOT have it — there the only 50% black is the
     425-unit band across the cards, which is --c-band below.
     Missing it is why the Kontakt page looked wrong: the panels were sitting
     on a bright photograph instead of a dark one, so the white text had far
     less to sit against than the drawing shows. */
  --c-scrim:      rgba(0, 0, 0, 0.50);
  /* A halo under the slider dots. They are 10px of white or accent sitting on
     an unpredictable photograph, and on a phone that is the whole control. */
  --c-dot-halo:   rgba(0, 0, 0, 0.65);
  /* Black tinted 85% is rgb(38,38,38), the same value as --c-schwarz, drawn at
     80% like every other panel. The old rgba(45,45,45,0.94) came from fitting
     pixels in the PDF while the scrim above was unknown, so the scrim's own
     darkness was absorbed into this alpha. */
  --c-panel-dark: rgba(38, 38, 38, 0.80);
  /* The band across the middle of the four cards. MEASURED, not chosen: the
     photo reads (4,149,215) outside it and (2,75,108) inside — exactly half.
     It is black at 50%, NOT the accent colour. */
  --c-band:       rgba(0, 0, 0, 0.50);
  /* 0.80, not the 0.73 fitted earlier. The document sets Opacity="80" on the
     panel, the footer, the footer notch, the portfolio tiles and the person
     name box alike — one value for every coloured plane on the page. Solving
     the alpha back out of the PDF agrees: fitting pixels across the portfolio
     panel's left edge gives 0.82-0.87 for a plane the file states is 0.80, and
     the tiles fit to the same 0.85-0.87, so they are the same plane, not an
     opaque one. The earlier 0.73 was that same fit made without the scrim. */
  --c-panel-veil: 0.80;

  /* THE NAME BOX IS NOT A PANEL. It is much thinner than one, which is the
     point: the person who is NOT being shown is a ghost of a box with the
     machine visible straight through it, and only becomes solid when their
     photograph arrives.
     The IDML claims that frame is opacity 100 — it is not what ships, so the
     pixels decide. Fitting the PDF across the box's RIGHT edge (its left edge
     has the arrow sitting on it, which poisoned an earlier attempt) gives
     alpha 0.412 / 0.422 / 0.434 per channel, solving to colour (30,178,208) —
     MWM Cyan, so the fit is sound. The same method run on the cyan text panel
     beside it, which the file states is 0.80, returns 0.77, so it reads about
     4% low. 0.42 corrected the same way is 0.45. */
  --c-namebox-veil: 0.45;

  /* WHAT SITS BEHIND A PORTRAIT.
     Both portraits are cut-outs: 611,474 of Janot's pixels have alpha 0, and
     the alpha channel is a silhouette of the man, not a rectangle. With no
     fill behind him the printing machine on the page background showed
     straight through his shoulders. The document does not leave it
     transparent either — the frame holding the photo is filled Tint/[Black]
     60%, which is 60% black ink on white paper, so: */
  --c-portrait-bg: rgb(102, 102, 102);

  /* --accent is re-declared per screen by [data-accent]; every arrow, panel,
     rule and nav underline reads it. One line changes the whole page. */
  --accent:     var(--c-cyan);
  --accent-ink: var(--c-ink);
  /* A link tinted with --accent disappears on the Kontakt page, where the
     accent IS the near-black page colour. --accent-link is the accent
     everywhere it is legible and plain ink where it is not. */
  --accent-link: var(--c-cyan);

  /* ---- type ------------------------------------------------------ measured
     Design sizes are points on a 1700pt-tall page, so each is a fraction of
     viewport height. The clamp FLOOR is the important half: pure vh scaling
     gives 12.7px body at 1440x900 and 10.8px at 1366x768, both unreadable.
     Spec 4.1. */
  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;

  --fs-card:   clamp(28px, 2.88vh, 58px);   /* 49pt  — card label        */
  --fs-social: max(20px, calc(var(--footer-w-vw) * 0.0873));   /* 37pt of a 425 box */
  --fs-body:   clamp(15px, 1.41vh, 26px);   /* 24pt  — body, eyebrow     */
  --fs-nav:    clamp(11px, 1.29vh, 24px);   /* 22pt  — nav links; floor is
                                               lower than body because five
                                               items must fit 390px */
  /* THE TILE TYPE IS SIZED BY THE TILE, NOT BY THE VIEWPORT.
     Every other size here is a fraction of the page height, which is right
     while the design's proportions hold. The tiles are the one place they do
     not: --cell is height-bound on a 16:10 screen, so the box shrank while a
     `clamp(13px, ...)` floor held the type still, and four of the eight tiles
     were cut off mid-word once the text was set in capitals.
     The document sets 20pt in a 299-unit tile, so the type is 6.69% of the
     tile. Tying it to --cell keeps that ratio at every viewport, which is what
     makes the same ten lines fit that fit on the drawing. The 10px floor is a
     legibility backstop for absurd sizes only. Mobile overrides this outright;
     there --cell is meaningless.

     WHY THE BACKSTOP IS 8px AND NOT 10px. The ratio is scale-invariant: hold
     it and the tile wraps to the same ten lines at every size, so it fits at
     every size. A floor is the only thing that can break that, and a 10px one
     did — below 750px of viewport height the type stopped shrinking with the
     box and the tallest tile was cut off, by 5px at 1366x650, by 17px at
     1280x600 and by 35px at 1366x560. Those are ordinary laptop windows once
     the browser's own chrome is subtracted.
     8px is not a small choice either: 20pt on the document's 1698-unit page IS
     8px once the page is 680px tall. Honouring the ratio further down is more
     faithful than holding the type still and losing a line of the text. */
  --fs-tag:    max(8px, calc(var(--cell) * 0.0669));   /* 20pt of a 299 tile */
  /* THE FOOTER'S TYPE IS SIZED BY THE FOOTER, NOT BY THE VIEWPORT.
     Same trap as the portfolio tiles. The footer is a fixed-WIDTH box —
     --footer-w, 25% of the page — but its type was a fraction of viewport
     HEIGHT. On the document's square page those are the same thing; on a
     16:10 window they are not, and the text came out visibly small inside its
     box. Measured at 1440x900: the address was 4.17% of the footer's width
     against the document's 5.65%, and the links 3.61% against 4.47%.
     The document's own ratios, against its 425-unit footer:
       address / company  24pt    -> 5.65%
       legal links        19pt    -> 4.47%
       Xing and LinkedIn  37.11pt -> 8.73%
     The floors are legibility backstops for a narrow window; mobile overrides
     --footer-w to 92% and these come out larger there anyway. */
  /* THE FOUR FOOTER LINKS SIT ON ONE LINE, AND THE FLOOR IS WHAT DECIDED IT.
     Measured on the Kontakt spread: all four words are on ONE baseline at
     y 517.5, spanning x -185.0 to 178.5 — 363.5 of the footer's 425 units,
     85.5% — at 19pt with a 19-unit gap between each. Our footer is 239px at
     1440x900, so the document's own ratio asks for 10.7px, and the 13px floor
     was overriding it and pushing "Kontakt" onto a second line.
     Fawad: "in the design the things are in one line and not like this."
     Arithmetic, so it can be checked rather than eyeballed: the four words are
     16.14 ems of text plus three gaps, so at 4.47% each they need
     16.14*0.0447 + 3*0.0447 = 85.6% of the footer, and .footer's 6% padding
     leaves 88%. It fits, with about 6px to spare at 1440x900. */
  --fs-legal:  max(10px, calc(var(--footer-w-vw) * 0.0447));   /* 19pt of a 425 box */

  /* THE THREE DOCUMENT PAGES — Impressum, Datenschutz, AGB.
     They are the only pages on this site that are READ rather than looked at,
     so they do not take their type from the grid: --cell is height-bound and
     was setting a 3000-word privacy policy at 15px. Fawad: "why is the
     impressum so shitty and small... no one can read this shit."
     Sized off the viewport's WIDTH, which is what the measure depends on. */
  --fs-doc:    clamp(17px, 1.15vw, 22px);
  /* THE PAGE TITLE IS THE BIGGEST THING ON THE PAGE. It was .eyebrow at
     --fs-body — about 15px — sitting above 42px headings, so "IMPRESSUM" was
     the SMALLEST type on its own page and every section heading shouted over
     it. Fawad: "WHY THE FUCK ... made H2 bigger and h1 10px". h1 > h2 > h3 >
     body, and it stays that way at every width because all four are clamps on
     the same axis. */
  --fs-doc-h1: clamp(31px, 3.00vw, 58px);
  --fs-doc-h2: clamp(24px, 1.75vw, 34px);
  --fs-doc-h3: clamp(19px, 1.20vw, 24px);

  /* THE MASTHEAD ON A DOCUMENT PAGE IS AN ORDINARY HEADER BAR.
     Everywhere else the mark is 16vh against a 9.3vh band, so it hangs well
     below the band and over the photograph — deliberate, and the reason the
     first attempt here grew the band to 18.4vh to keep the white-lettered logo
     off white paper. That left five small nav words floating in a huge black
     slab. Fawad: "why the bloody fuck dont fucking make the logo fucking small
     in the legal pages? so that fucking navigation doesnt look so fucking
     stupid". So on these three the mark shrinks to fit the band instead, at a
     proportion rather than a fixed height, which holds on a phone too. */
  --legal-head-h: var(--header-h);
  --legal-logo-h: calc(var(--header-h) * 0.82);
  --legal-logo-y: calc(var(--header-h) * 0.09);
  --fs-footer: max(15px, calc(var(--footer-w-vw) * 0.0565));   /* 24pt of a 425 box */
  --fs-name:   clamp(13px, 1.06vh, 19px);   /* 18pt  — person name box   */

  --lh-body: 1.20;   /* InDesign auto-leading is 120%, measured */
  --lh-tag:  1.40;   /* 28pt leading on 20pt = 1.40, measured */
  --lh-tight: 1.05;

  /* SIGNED OFF 2026-09-10. Konny, the designer, after seeing the real Acumin
     beside four self-hostable fonts (docs/schriftvergleich.html): "Lass uns mal
     bei der von dir eingesetzten Archivo bleiben." Acumin cannot be
     self-hosted — it would load from Adobe on every visit, put each visitor's
     IP on Adobe's servers, and force a cookie banner onto a site that
     otherwise makes no third-party request at all. This is a decision, not a
     shortcut; do not "restore" Acumin later.

     Archivo replaces Acumin. 95% width matches Acumin SemiCondensed to 0.5%:
     "Über uns Portfolio Referenzen" is 841px in Acumin, 845px in Archivo.
     NEVER use font-style: oblique — it renders upright. Spec 7.1. */
  --w-display: 900;
  --w-body:    400;
  --w-tag:     600;
  --stretch-display: 95%;
  --stretch-body:   100%;
  /* The tiles are the ONE place 95% is wrong, and it is wrong because the
     document uses two different Acumin cuts, not one:
       SemiCondensed UltraBlack Italic  -> card labels, eyebrows, names
       SemiCondensed Semibold Italic    -> portfolio tiles only
     Archivo's width axis does not track Acumin's identically across weights.
     Measured against the PDF's own glyph advances, per character per em:
       card labels at 95%  0.584 / 0.593 / 0.491  vs  0.574 / 0.567 / 0.502
       tiles      at 95%  0.623                  vs  0.573   -> 8.7% too wide
       tiles      at 86%  0.575                  vs  0.573   -> 0.3%
     So the display cut stays at 95% and the tile cut gets its own value. This
     is what lets KONFEKTIONSMOEGLICHKEITEN sit on one line, as it does on the
     drawing, instead of dropping a lone N onto an eleventh. */
  --stretch-tag:     86%;

  /* ---- layout ---------------------------------------------------- measured
     Horizontal values are % of viewport WIDTH, vertical are vh. On the square
     design ratio they agree; on a wide screen the panel becomes wider and
     shorter, which is the approved reflow rule. Spec 4.2. */
  --header-h:   9.30vh;
  --panel-x:   10.59%;
  --panel-y:   24.12vh;
  --panel-w:   38.06%;
  --panel-h:   38.06vh;
  /* THE TEXT INSET INSIDE A PANEL, MEASURED FROM THE FILE.
     Every panel in the document insets its text frame by 77 units on a
     647-unit panel - Referenzen, Uber uns and Portfolio all three - which is
     11.90%. Ours was 4.53%, well under half. Fawad: "left and right there is
     so much more padding."

     The vertical is NOT a padding at all: the text frame is CENTRED in the
     panel. Referenzen 141.9 above and 141.9 below, Uber uns 69.9 and 69.9,
     Portfolio 84.3 and 84.3 - always equal, always whatever the text needs.
     So --panel-pad-y is only a floor for when the text nearly fills the box;
     .panel centres its content and the padding stops it touching the edge. */
  --panel-pad-x: 11.90%;
  /* 4%, not the document's 13%. The 13% is not a padding in the file, it is
     what centring happens to leave: the text frame is centred and the space
     above and below is whatever is spare. Here the panel is proportionally
     shorter than the document's - our grid keeps the cells square, so on a
     16:9 screen a two-cell panel is 397px tall where the drawing's is 647 of
     1700 - and the wider inset the drawing DOES specify costs height. At 6%
     the Portfolio panel overflowed its box by 6px and grew a scrollbar. This
     is a floor, not the spacing; the centring does the spacing. */
  --panel-pad-y: 4%;

  /* ---------------------------------------------------------------------
     PERCENT vs VIEWPORT UNITS — read this before adding a size token.

     A design percentage is a fraction of the PAGE. A CSS percentage is a
     fraction of the PARENT. They only agree when the parent is the viewport.
     This bit us four times in one session: the footer arrow rendered 14px
     instead of 58, the person arrow 10px instead of 58, the tile notch 5px
     instead of 35, and every portfolio tile came out 236px instead of 300 —
     which then made the text overflow its own box.

     RULE: if the element's parent is not full-width, use the vw twin.
     --------------------------------------------------------------------- */
  /* ---------------------------------------------------------------------
     THE CONTENT GRID — one 4-column grid, used by every inner page.

     Measured from the IDML: content spans x 10.59%..89.41%, four columns at
     a pitch of 20.35%, boxes 17.06-17.65% square, rows at 24.12 / 44.53 /
     64.94 with a pitch of 20.42.

     --cell is a SQUARE sized by whichever runs out first, the width or the
     height. That is the whole point: sizing a box by width while positioning
     rows by height is what made the Referenzen gallery overlap itself by
     116px on every desktop, and the two Über uns portraits sit on top of each
     other. With one --cell driving both axes it cannot happen at any size.
     --------------------------------------------------------------------- */
  --grid-top:    24.12vh;
  /* Room below the grid for BOTH the slider dots and the footer handle.
     At 5.6vh they collided: dots landed at 863px on a 900px screen and
     the handle occupies 863-885. */
  --grid-bottom:  8.40vh;
  --grid-w:      78.82vw;
  /* THE CONTENT COLUMN, AS AN ACTUAL WIDTH.
     --grid-w is the column the DESIGN draws: 1340 of 1700, x 180 to 1520. But
     the grid on screen is four SQUARE cells and three gaps, and --cell is
     height-bound on any wide screen, so the real column is narrower than
     --grid-w almost everywhere. Measured at 1440x900: --grid-w resolves to
     1135px and the grid is actually 817px.

     Everything that has to line up with the content therefore has to be built
     from the same four-cells-and-three-gaps sum, not from --grid-w. The header
     is the case that mattered: in the document the last nav word, "Kontakt",
     ends at x 1520.0 - EXACTLY the column's right edge - and ours was ending
     at 1375 against a column ending at 1129. Fawad: "the navigation is exact
     width as the content of the page... the logo should be exactly to the edge
     of the content on the left side and the nav should finish where the
     content of the page finishes." */
  --content-w: calc(4 * var(--cell) + 3 * var(--gap));
  --gap:          2.60vh;
  --grid-h:      calc(100vh - var(--grid-top) - var(--grid-bottom));
  --cell: min(
            calc((var(--grid-w) - 3 * var(--gap)) / 4),
            calc((var(--grid-h) - 2 * var(--gap)) / 3)
          );

  --box:      17.06%;      /* person photo, name box, gallery image */
  --box-h:    17.06vh;
  --tile:     17.65%;      /* portfolio tile */
  --tile-vw:  17.65vw;     /* the same tile, inside a narrower parent */
  --tile-h:   17.65vh;
  --tile-gap-x:  2.70%;    /* 20.35% pitch - 17.65% box */
  --tile-gap-vw: 0.60vw;   /* pitch 20.35 - tile 17.65 - chevron 2.10 */
  --tile-gap-y:  2.76vh;
  --notch-vw:    2.10vw;
  /* The chevron measured against the TILE rather than the page.
     In the document a tile is 299 units wide and its chevron 41, so the
     chevron is 13.7% of the tile. Tying it to --cell keeps that ratio at every
     viewport; tying it to vw did not, because --cell is height-bound on a
     16:10 screen and the chevron drifted to 16% of the tile there.
     Clamped to --gap so it can never reach into the next tile: the document's
     gap is wider than its chevron, ours is not. */
  /* AND IT MUST NOT TOUCH THE NEXT TILE. In the document a tile runs to 480,
     its arrow tips at 520.7 and the next tile starts at 526 — 5.3 units of
     air, 1.77% of the tile. Clamping to the whole gap made the tip land
     exactly on the neighbour's edge, so every row read as one joined-up
     ribbon instead of separate cards. Fawad: "the arrows in portfolio... they
     are not touching the other box at all." 0.82 of the gap leaves the same
     proportion of air the drawing does. */
  --notch: min(calc(var(--cell) * 0.137), calc(var(--gap) * 0.82));

  /* Arrows are NOT square, and the whole site draws ONE triangle: composing
     the IDML group transforms gives 40.7 x 81.5 units for the person arrow and
     the portfolio notch, and the same shape on its side, 81.5 x 40.7, for the
     footer handle. Every one of them is EXACTLY 1:2.

     WHY THE PERSON ARROW IS NO LONGER vw x vh.
     It was --arrow-pw: 2.40vw and --arrow-ph: 4.79vh. Those are the document's
     own percentages, but the document's page is square, so 2.40 and 4.79 only
     make a 1:2 triangle when vw equals vh. Measured at 1440x900 the arrow came
     out 35 x 43 - a ratio of 1.25, a fat stub instead of the slim spike the
     drawing shows. Tying it to --cell, which IS the person box (measured: both
     187px at 1440x900), holds the ratio at every viewport. Same reasoning as
     --notch above.
       40.7 / 290 = 14.03% of the box wide
       81.5 / 290 = 28.07% of the box tall
     THE FOOTER HANDLE HAD THE SAME FAULT and is now fixed the same way. It
     was 4.79vw by 2.40vh, which measured 69 x 22 at 1440x900 - a ratio of
     3.19 where the drawing is 2.00, so the triangle was a third too flat. Its
     three points are (809.5, 1674.5) (891.0, 1674.5) (850.3, 1633.8): 81.5
     wide, 40.7 tall, pointing up, centred on a footer panel 425 wide. So it
     is 19.18% of the footer's width across and 9.58% of that same width down.
     Both are driven off --footer-w-vw, one axis, so the shape cannot drift.

     --arrow-fh ALSO SETS THE BOTTOM CLEARANCE on Portfolio, Referenzen and
     Kontakt (layout.css: 3vh + --footer-peek + --arrow-fh). Making it taller
     takes height away from those grids, so the 55-combination sweep was
     re-run after this change, not before. */
  --arrow-fw: calc(var(--footer-w-vw) * 0.1918);   /* footer handle width  */
  --arrow-fh: calc(var(--footer-w-vw) * 0.0958);   /* footer handle height */
  --arrow-pw: calc(var(--cell) * 0.1403);   /* person arrow width  */
  --arrow-ph: calc(var(--cell) * 0.2807);   /* person arrow height */

  /* logo overhangs the header onto the cards. Measured from PDF page 1. */
  --logo-x:   12.00%;
  --logo-y:    0.90vh;
  --logo-h:   16.00vh;

  /* WALTER, THE MASCOT, measured off MWM_Website_Layout_261019_V6_FINAL.pdf
     (19 Oct). Every page draws him in the same square beside the logo:
       logo    x 209.8 .. 414.4   y 31.4 .. 292.2   (204.6 x 260.8)
       mascot  x 422.9 .. 617.3   y 58.8 .. 253.2   (194.4 square)
     So, as fractions of the LOGO'S HEIGHT, which is the one length the logo
     already has on every screen and in every state:
       194.4 / 260.8 = 0.7454   his size
         8.4 / 260.8 = 0.0323   the gap to the logo's right edge
        27.4 / 260.8 = 0.1051   how far below the logo's top he starts
     Tied to --logo-h, he grows and shrinks with the logo at every viewport,
     and on a phone the scroll shrink (scale on .brand) takes him along.
     The client's three sliders (WordPress, per page) multiply these. */
  --mascot-box: calc(var(--logo-h) * 0.7454);
  --mascot-gap: calc(var(--logo-h) * 0.0323);
  --mascot-top: calc(var(--logo-h) * 0.1051);

  /* band: 34.4%..59.4% of the PAGE. The cards start at --header-h, so inside
     a card that is 27.68%..55.24% of the card's own height. */
  --band-top:    27.68%;
  --band-h:      27.56%;
  --label-mid:   41.50%;

  /* THE FOOTER IS SIZED OFF THE CELL, NOT OFF THE VIEWPORT'S WIDTH.
     It was --footer-w: 25% and --footer-w-vw: 25vw, which are the document's
     own numbers - 425 of 1700. But 25vw on a wide screen is enormous, and the
     footer's type and its arrow are both fractions of that width, so the box,
     its text and its arrow all inflated together while every other thing on
     the page stayed put: everything else is built from --cell, which is
     height-bound. Fawad: "the kontakt box in the bottom, it increases size
     when i go to wider screen. that is a fucking bug... fonts are also
     increasing. but only for that box and nothing else."

     In the document the footer is 425 units and a cell is 301.85, so the
     footer is 1.408 cells. Off --cell it now grows and shrinks with the rest
     of the page, and the arrow - which is 19.18% and 9.58% of it - comes back
     to the size the drawing shows. */
  /* A FLOOR, SO THE ONE-LINE ROW OF LINKS CANNOT BREAK.
     --cell is height-bound, so on a short window (a 1366x768 laptop, say) the
     footer shrinks below 224px, --fs-legal hits its own 10px floor, the type
     stops shrinking with the box, and "Kontakt" drops onto a second line —
     which is exactly what the document does not do. 224px is the width at
     which the document's own ratio lands on 10px (224 * 0.0447 = 10.01), so
     above it every number is the drawing's and below it the whole footer stops
     shrinking together instead of coming apart. It still GROWS with --cell,
     which is the bug Fawad reported: "it increases size when i go to wider
     screen" was about a footer tied to the viewport, not to the grid. */
  --footer-w:    max(224px, calc(var(--cell) * 1.408));
  --footer-x:    calc(50% - var(--footer-w) / 2);
  /* The same width as a LENGTH. --footer-w is a percentage, which is right for
     `width` on a fixed element but silently wrong for font-size: there a
     percentage means "of the parent's font size", so calc(25% * 0.0565) came
     out as 1.41% of 15px and the max() floor swallowed it whole. Rule 5 of the
     guard exists for this exact family of mistake. */
  --footer-w-vw: max(224px, calc(var(--cell) * 1.408));
  /* Open: panel top 74.86%, bottom flush with the viewport (74.86 + 25.14 =
     100.00). Closed: panel top 98.32%, so a 1.68% sliver stays on screen with
     the arrow sitting on it. Both measured from the IDML, pages 1 and 2. */
  --footer-h:    25.14vh;
  --footer-peek:  1.68vh;

  /* --gap was redefined here as 1.76% and silently beat the grid's 2.60vh.
     A percentage gap resolves against the GRID's own size, so --cell was
     computed from a circular value and the Referenzen grid ran 138px past
     the bottom of a 1080px screen. One token, one definition. */
  --gap-legacy: 1.76%;   /* 30pt on 1700 - kept for reference, unused */
  --gap-h:    1.76vh;
  --border:   2px;

  /* ---- motion ---------------------------------------------------- taste
     Durations and easings are brand values exactly like colours, so they live
     here and motion.css consumes them. A 0.3s literal in layout.css is the
     same mistake as a #00BAE9 literal. */
  /* THE CARD SEQUENCE IS 900ms, NOT 1240. And it lands.
     Fawad, twice: "the animation is still kind of slow and there is
     milisecond that the page just stays in that image full screen."

     Measured, not guessed. The hero grows 360 -> 1440px at 1440x900 under
     --ease-out over 1240ms. Solving that curve:
         within 8px of full bleed at  841ms
         within 1px of full bleed at 1025ms
         animation actually ends at  1240ms
     So the picture LOOKED finished and the page then sat on it for another
     fifth of a second doing nothing visible, because the swap waits for the
     animation's clock, not for the motion. --ease-out is 96% done at half
     time; the rest is a crawl.

     Two changes, both measured. The sequence is 900ms, and it uses its own
     curve --ease-card, which reaches 37% in the first 100ms where --ease-out
     reached 33% - so it gets moving FASTER than before - and leaves a dead
     tail of 59ms instead of 215ms.

     Then Fawad, after 1.1.7: "the animation is much better. but can we make
     the image getting bigger a little faster, just a little." 900 -> 800.

     --anim-scale MULTIPLIES the card sequence and nothing else. It exists so
     the speed can be tuned from the WordPress settings screen without any
     duration being restated anywhere: the plugin only ever prints this one
     number. 1 is what is built here. site/js/cards.js applies it.

     It is a PLAIN NUMBER, and --dur-card stays a plain time, on purpose.
     Writing --dur-card as calc(450ms * var(--anim-scale)) would be tidier CSS
     and would break the JavaScript: getPropertyValue returns the substituted
     string, not a resolved length, so cards.js would read
     "calc(450ms * 1)", fail its endsWith('ms') test and silently fall back to
     the old hardcoded 680/560. */
  --anim-scale: 1;
  --dur-card:   450ms;   /* card slides to slot 1, siblings leave */
  --dur-expand: 350ms;   /* card grows to full bleed             */
  /* 420ms read as a second, separate beat after the card had already landed.
     Measured on the real animation at 1440x900: the card is within 1px of full
     bleed at 855ms of 900, the swap lands on the next frame, and the content
     then took another 420ms to become solid. 320ms arrives with the card
     instead of after it. */
  --dur-panel:  320ms;   /* content panels fade in               */
  --dur-arrow:  520ms;   /* photo reveal on Über uns             */
  --dur-arrow-travel: 900ms; /* Über uns arrow rides round its box to
                            the other side ('follow' mode)       */
  --dur-swap:   380ms;   /* person photo / name box cross-fade   */
  --dur-footer: 380ms;
  --dur-slide:  560ms;   /* referenzen slider                    */
  --dur-mascot: 1200ms;  /* Walter hops in beside the logo: two hops. Was
                            560ms, one pop; Konny asked for longer. */
  /* THE PANELS DO NOT WAIT ANY MORE.
     This was 180ms. Measured on the card transition: the swap lands one frame
     after the card stops growing, then this delay held the screen on a bare
     photograph for 180ms before the content began a 420ms fade. Fawad, 5 Sep:
     "there is like a little delay between the image being full size and the
     content appearing... the moment it gets full the content apears." */
  --delay-panel: 0ms;

  --ease-out:   cubic-bezier(0.22, 1, 0.36, 1);
  --ease-inout: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-arrow: cubic-bezier(0.4, 0, 0.2, 1);
  /* The card sequence only. --ease-out ends at zero velocity from a long way
     out, which is right for a panel fading in and wrong for a card that has
     to hand over to a page the instant it lands. Read by site/js/cards.js. */
  --ease-card:  cubic-bezier(0.2, 0.7, 0.3, 1);

  --slider-interval: 6500ms;

  --z-bg: 0;
  --z-cards: 10;
  --z-content: 20;
  --z-footer: 30;
  --z-header: 40;
  /* Above the header, because the sheet covers the bar it was opened from. */
  --z-menu: 50;
}

/* ---- per-screen accent ---------------------------------------------------
   The only place a screen name meets a colour. */
[data-accent="cyan"]    { --accent: var(--c-cyan);    --accent-ink: var(--c-ink);         --accent-link: var(--c-cyan); }
[data-accent="magenta"] { --accent: var(--c-magenta); --accent-ink: var(--c-ink);         --accent-link: var(--c-magenta); }
[data-accent="gelb"]    { --accent: var(--c-gelb);    --accent-ink: var(--c-ink-on-gelb); --accent-link: var(--c-gelb); }
[data-accent="schwarz"] { --accent: var(--c-schwarz); --accent-ink: var(--c-ink);         --accent-link: var(--c-ink); }

/* ---- mobile --------------------------------------------------------------
   The square design has no mobile layout, so these are new values, not
   measured ones. Panels go full-width; the card grid becomes rows. */
@media (max-width: 768px) {
  :root {
    /* The logo must not eat the nav's room: at 390px the header holds a 5-item
       nav AND the mark, and the design never drew this case. */
    --logo-x:  16%;
    --logo-y:  0.6vh;
    /* THE LOGO IS THE BRAND AND ON A PHONE IT HAS THE BAR TO ITSELF.
       It was 6.4vh, squeezed small to leave room for five nav words that never
       fitted anyway. The hamburger frees that room, so the mark can be the
       size the document gives it — 16vh, the same as the desktop — and it
       drops back once the visitor starts reading so it stops covering the
       page. js/nav.js sets data-scrolled on <html>. */
    --logo-h:  16vh;
    /* THE SHRUNK LOGO HAS TO SIT IN THE BAR, NOT ON ITS EDGE.
       As a RATIO, because it is applied with scale rather than height — see
       .brand in layout.css. It was 0.44, which is 59px of a 135px mark, and
       the mark starts 5px from the top: 5 + 59 = 64, exactly the height of the
       bar, so the logo ended flush against the bottom edge with no air at all.
       Fawad: "it kind of sits very awkwardly in the top. like there is no
       padding bottom and stuff."

       0.33 is 44px, and --logo-scrolled-y drops it a further 5px, so it sits
       10px from the top of a 64px bar with 10px under it — centred, with the
       air on both sides. transform-origin is top left and translate is applied
       BEFORE scale, so the offset is not itself scaled. */
    --logo-scrolled-scale: 0.33;
    --logo-scrolled-y: 0.6vh;
    /* --header-h was declared twice here, 9vh and then 7.6vh. The second one
       won and the first was dead weight that read like the real value. */
    --header-h: 7.6vh;
    --panel-x: 6%;
    --panel-w: 88%;
    --panel-y: 16vh;
    --panel-h: auto;
    --box: 40%;
    --tile: 42%;
    --tile-vw: 42vw;
    --tile-gap-vw: 3vw;
    --notch-vw: 3vw;
    /* --cell is a desktop measurement; on a 390px phone it computes to 59px
       and a tile-relative size would set this text at 4px. The mobile tiles
       are a two-column stack sized by width instead, so the type goes back to
       a plain viewport-height clamp. */
    /* Sized against the tile's WIDTH here, because that is what the long words
       have to fit into: two columns of a 390px screen leave about 155px of
       text, and KONFEKTIONSMOEGLICHKEITEN needs 24 characters at 0.575em each.
       At 13.5px that came to 186px and broke mid-word in three tiles. */
    --fs-tag: clamp(10px, 2.7vw, 15px);
    --notch: 2.2vw;   /* must stay under the 3vw gutter between two tiles */
    --footer-x: 4%;
    --footer-w: 92%;
    --footer-w-vw: 92vw;
    /* THE FOOTER'S TYPE IS NOT SIZED OFF THE FOOTER ANY MORE ON A PHONE.
       The document's ratios are fractions of a 425-unit panel on a 1700-unit
       page - a quarter of the width. Here the panel is 92vw, nearly the whole
       screen, so the same fractions blew the type up: --fs-footer came out at
       5.2vw, 22px on a 430px phone, LARGER than the 20px it is on a 1440px
       desktop. Fawad: "what will happen to the box with those fucking big
       fonts when there is also impressum, datenschutz, and social icons...
       that will be half of the page." He is right - it would be.
       On a phone these are plain reading sizes. */
    --fs-footer: 16px;
    --fs-legal:  13px;
    --fs-social: 20px;
    /* 8px of the panel showing, as asked, instead of 1.68vh (16px on a tall
       phone). The arrow sits on top of that sliver and is the control. */
    --footer-peek: 8px;
    /* The same 19.18 / 9.58 of the footer's width, which is 92vw here. That
       is 17.64vw x 8.81vw - bigger than the old 14vw x 3vh in both directions,
       and this handle is the tap target that opens the footer, so bigger is
       the right direction on a phone. */
    --arrow-fw: calc(var(--footer-w-vw) * 0.1918);
    --arrow-fh: calc(var(--footer-w-vw) * 0.0958);
    /* THE LOWER ARROW HANGS OFF THE LEFT OF THE BOX, SO IT MUST FIT THE
       GUTTER. At 8vw x 6vh it measured 31 x 51 on a 390px screen, and the
       page only leaves 22px to the left of the person box - the tip was
       chopped off by the edge of the screen. 5vw is 19.5px there, inside the
       gutter at every phone width because the gutter is a percentage too.
       Both are vw, so the shape stays the document's 1:2 instead of the 1.62
       that 8vw x 6vh produced. */
    --arrow-pw: 5vw;
    --arrow-ph: 10vw;
  }
}

/* ---- reduced motion ------------------------------------------------------
   Every translate and scale becomes an opacity fade. Nothing becomes
   unreachable; only the movement goes. */
@media (prefers-reduced-motion: reduce) {
  :root {
    --dur-card:   1ms;
    --dur-expand: 1ms;
    --dur-arrow:  1ms;
    --dur-arrow-travel: 1ms;
    --dur-slide:  1ms;
    /* The footer is a translate too, and it was the one movement left running
       here. --dur-panel and --dur-swap stay as they are on purpose: motion.css
       redefines panel-in to opacity-only under this query, so what is left of
       both of them is a fade, which is what reduced motion asks for. */
    --dur-footer: 1ms;
    --dur-mascot: 1ms;
    --delay-panel: 0ms;
  }
}
