/* Sansation (SIL Open Font License), hosted here instead of Google Fonts: no visitor data goes to Google. One complete file
   per weight (Latin and Latin Extended, ž ć …) — split files with unicode-range left Safari without the 400 for body text */
@font-face { font-family: "Sansation"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/sansation-400.ttf) format("truetype"); }
@font-face { font-family: "Sansation"; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/sansation-700.ttf) format("truetype"); }

.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* entitet. — shared styles for every page after the entrance. Values follow brand/corporate_identity_de.md. */
:root { --paper: #faf9f6; --ink: #000000; --m: clamp(16px, 2.2vw, 32px); --line: rgba(0, 0, 0, .14);
        /* the logo is the largest type on every page: all text sizes derive from its letter height */
        --logo: clamp(108px, 10vw, 156px); --logo-h: calc(var(--logo) * 298 / 2229); }
html, body { margin: 0; background: var(--paper); color: var(--ink); font: 400 15px/1.45 "Sansation", sans-serif; letter-spacing: -.01em; }
a { color: inherit; text-decoration: none; }

/* header: logo left, menu right, floating over everything; header.js paints both pixel by pixel from what lies under them */
.bar { position: fixed; top: 0; left: 0; right: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; padding: var(--m); pointer-events: none; }
.bar a { pointer-events: auto; }
.bar img { width: var(--logo); display: block; }
.bar nav { display: none; }   /* header.js turns it into the menu button below */
#ink { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 9; pointer-events: none; }   /* above the menu too: logo and cursor stay */
html.inked [data-ink] { color: transparent; }   /* the real elements stay for clicks, focus and screen readers */
html.inked #logo { opacity: 0; }

/* heading (B3): lowercase, ends in a period, pulled 130 % wide; the box is 1/1.3 of its column so long titles wrap in it */
/* size: the ascenders stay below the logo's height (cap height of Sansation ≈ .7 em) */
.h { margin: 0; width: calc(100% / 1.3); font: 700 calc(var(--logo-h) * 1.25)/1 "Sansation"; letter-spacing: -.025em; transform: scaleX(1.3); transform-origin: 0 50%; }

/* split page: two equal halves */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.pics { display: grid; }
.pics img { width: 100%; height: auto; display: block; }
/* pairs: the front views full width, side and back next to each other below (sound.) */
.pics.pairs { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.pics.pairs .wide { grid-column: 1 / -1; }
/* a picture that is not there yet when the page opens waits invisibly and fades in once decoded (header.js);
   pictures already in the cache show at once — no second fade on top of the page transition */
main img { transition: opacity .5s ease; }
main img.wait { opacity: 0; }
@media (prefers-reduced-motion: reduce) { main img { transition: none; } }
.info { position: sticky; top: 0; align-self: start; padding: calc(var(--m) * 2 + 56px) var(--m) var(--m) calc(var(--m) * 1.5); }
.info:first-child { padding-left: var(--m); }
.info .h { margin-bottom: 1.4em; }
.info p { margin: 0 0 1.1em; max-width: 46ch; font-size: clamp(15px, 1.15vw, 18px); line-height: 1.45; }
.info p:last-of-type { margin-bottom: 1.6em; }
/* one row per fact: the line belongs to the row, so label and value always share it */
dl { margin: 0; border-top: 1px solid var(--line); }
dl > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: baseline; column-gap: var(--m); padding: .55em 0 .5em; border-bottom: 1px solid var(--line); }
dt, dd { margin: 0; }
dt { width: calc(100% / 1.3); font: 700 calc(var(--logo-h) * .9)/1 "Sansation"; letter-spacing: -.025em; transform: scaleX(1.3); transform-origin: 0 50%; }
dd { font-size: clamp(15px, 1.15vw, 18px); }
.full { margin: 0; position: sticky; top: 0; height: 100svh; }
/* stacked page (about): the picture across the top half of the screen, the text beneath it — on phones the same */
.stack .full { position: relative; height: 50svh; aspect-ratio: auto; }   /* not the phones' square: it would widen the page */
.stack .info { position: static; padding: calc(var(--m) * 2) var(--m) calc(var(--m) * 3); }
.stack .info > p { max-width: 62ch; }
.stack .info dl { margin-top: 2.4em; }
.stack dl > div { padding: 1.3em 0 1.4em; }   /* more air between services, clients, manifesto */
/* pills (about, services): one colour each, from the palette */
.pills { display: flex; flex-wrap: wrap; gap: .35em; margin: 0; padding: 0; list-style: none; }
.pills li { padding: .3em .78em .34em; border-radius: 999px; font-size: .8em; line-height: 1.2; }
.pills .ink { background: var(--ink); color: var(--paper); }
.pills .plum { background: #752d3c; color: var(--paper); }
.pills .amethyst { background: #a98cbd; color: var(--ink); }
.pills .grey { background: #c9cacd; color: var(--ink); }
.info dd p { margin: 0 0 .8em; font-size: inherit; max-width: 46ch; } .info dd p:last-child { margin-bottom: 0; }
@media (max-width: 860px) { .stack dl > div { grid-template-columns: minmax(0, 1fr); row-gap: .7em; padding: 1.2em 0 1.3em; } }   /* phones: label above, text full width */
/* desktop: one grid for the whole text — labels (about., services., …) in a narrow column, every text in the wide one,
   so intro, services, clients and manifesto all start at the same edge */
@media (min-width: 861px) {
  .stack .info { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 3fr); column-gap: var(--m); align-items: start; }
  .stack .info .h { grid-column: 1; grid-row: 1 / span 2; margin: 0; }
  .stack .info > p { grid-column: 2; }
  .stack .info dl { grid-column: 1 / -1; }
  .stack dl > div { grid-template-columns: minmax(0, 1fr) minmax(0, 3fr); }
}   /* paragraphs inside a fact (the manifesto) */
.full img { width: 100%; height: 100%; object-fit: cover; display: block; }

@media (max-width: 860px) {
  :root { --logo: clamp(124px, 36vw, 156px); }   /* phones: the logo a size up */
  .split { grid-template-columns: 1fr; }
  .info, .info:first-child { position: static; padding: calc(var(--m) * 2 + 40px) var(--m) calc(var(--m) * 2); }
  .pics + .info { padding-top: var(--m); }   /* below the pictures, the header no longer needs room */
  .full { position: static; height: auto; aspect-ratio: 1; }
}

/* the logo image only holds the place (header.js draws it): out of the pointer's way, so Safari's Live Text doesn't
   read it as text and show the text cursor — the link around it takes the pointer */
.bar a { cursor: pointer; }
#logo { pointer-events: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }

/* contact: the address is the page — big, in the headings' stretch, low in the first screen; the place and the imprint small */
.contact .info { min-height: 100svh; box-sizing: border-box; display: flex; flex-direction: column; justify-content: flex-end;
                 padding: calc(var(--m) * 2 + 56px) var(--m) calc(var(--m) * 2); position: static; }
.contact .info .h { margin-bottom: .9em; }
.contact .lead { margin: 0 0 1.6em; max-width: 34ch; font-size: clamp(17px, 1.5vw, 24px); line-height: 1.35; }
.contact .mail { margin: 0; max-width: none; font: 700 clamp(22px, calc((100vw - 2 * var(--m)) / 12.4), 150px)/1 "Sansation"; letter-spacing: -.03em; }
.contact .mail a { display: inline-block; transform: scaleX(1.3); transform-origin: 0 50%; }
.contact .mail span { display: inline-block; transform-origin: 0 50%; transition: scale .8s cubic-bezier(.16, 1, .3, 1); }
.contact .mail a:hover span, .contact .mail a:focus-visible span { scale: 1.06 1; }   /* the stretch pulls a little further */
.contact .mail a:focus-visible { outline: none; }
.contact .social { margin: 1.6em 0 0; font-size: clamp(15px, 1.15vw, 18px); }
.contact .social a { border-bottom: 1px solid currentColor; }
.contact .where { margin: 0; font-size: clamp(15px, 1.15vw, 18px); line-height: 1.6; }
.contact .where a, .info dd a { border-bottom: 1px solid currentColor; }
/* text pages without a picture (imprint): the grid of the about page, with room for the header */
.stack.plain .info { padding-top: calc(var(--m) * 2 + 120px); }
.stack.plain .info > p { color: rgba(0, 0, 0, .55); }

/* menu button: three of the logo's dots (its shape, w:h 1.13, a size up), centred on the logo's height;
   header.js draws them with the ink, so they take their colour from what lies under them. They grow on hover and while open */
.bar .menu { pointer-events: auto; display: flex; align-items: center; gap: calc(var(--logo-h) * .24); height: calc(var(--logo-h) + 28px); padding: 14px; margin: -14px;
             border: 0; background: none; color: var(--ink); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.bar .menu .dot { width: calc(var(--logo-h) * .42); height: calc(var(--logo-h) * .372); border-radius: 50%; background: currentColor; flex: none;
                  transition: transform .45s cubic-bezier(.16, 1, .3, 1); }
.bar .menu .dot:nth-child(2) { transition-delay: .04s; } .bar .menu .dot:nth-child(3) { transition-delay: .08s; }
html.inked .bar .menu .dot { opacity: 0; }   /* drawn by the ink */
.bar .menu:hover .dot, .bar .menu:focus-visible .dot, html.menu-open .bar .menu .dot { transform: scale(1.35); }
.bar { transition: z-index 0s .5s; }   /* closing: the button stays above the layer until it has faded */
html.menu-open .bar { z-index: 8; transition: none; }   /* the button stays on top of the layer */
.bar .menu:focus-visible { outline: none; }   /* keyboard focus shows as the grown dot, not a ring */

/* menu layer: warm black over the blurred page, the pages as big stretched headings rising in one after the other */
.menu-layer { position: fixed; inset: 0; z-index: 7; display: grid; place-content: center; background: rgba(13, 12, 11, .62);
              -webkit-backdrop-filter: blur(26px); backdrop-filter: blur(26px); opacity: 0; visibility: hidden; transition: opacity .5s ease, visibility 0s .5s; }
html.menu-open { overflow: hidden; }
html.menu-open .menu-layer { opacity: 1; visibility: visible; transition: opacity .5s ease; }
.menu-layer nav { display: grid; justify-items: center; font: 700 clamp(32px, 4vw, 64px)/1.12 "Sansation"; letter-spacing: -.025em; }
.menu-layer a { color: #f2f0ec; opacity: 0; transform: scaleX(1.3) translateY(16px); filter: blur(4px);
                transition: opacity .35s, transform .35s, filter .35s, scale .7s cubic-bezier(.16, 1, .3, 1); }
html.menu-open .menu-layer a { opacity: 1; transform: scaleX(1.3); filter: none; transition: opacity .6s ease, transform .9s cubic-bezier(.16, 1, .3, 1), filter .6s ease, scale .7s cubic-bezier(.16, 1, .3, 1); }
html.menu-open .menu-layer a:nth-child(2) { transition-delay: .07s, .07s, .07s, 0s; }
html.menu-open .menu-layer a:nth-child(3) { transition-delay: .14s, .14s, .14s, 0s; }
html.menu-open .menu-layer a:nth-child(4) { transition-delay: .21s, .21s, .21s, 0s; }
.menu-layer a:hover, .menu-layer a:focus-visible { scale: 1.12 1; outline: none; }
/* the imprint link, small at the foot of the menu layer */
.menu-layer a.legal, html.menu-open .menu-layer a.legal { position: absolute; left: 0; right: 0; bottom: calc(var(--m) * 1.5); text-align: center;
  font: 400 clamp(13px, 1vw, 15px)/1 "Sansation"; letter-spacing: 0; transform: none; filter: none; scale: none; }
html.menu-open .menu-layer a.legal { opacity: .6; } html.menu-open .menu-layer a.legal:hover { opacity: 1; }   /* hover: the word pulls wider, like the headings' stretch */
@media (prefers-reduced-motion: reduce) { .menu-layer, .menu-layer a, .bar .menu, .bar .menu .dot { transition: none !important; } }

/* cursor: the dot from the logo, drawn by header.js into the ink layer, so it takes its colour from what lies under it */
html.dot, html.dot * { cursor: none !important; }

/* home: the projects one below the other, each a full screen; ravel. keeps the split (in light and in the dark) */
.home .project { position: relative; height: 100svh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
.home .project.single { grid-template-columns: minmax(0, 1fr); }
.home picture { display: block; min-height: 0; }
.home img { width: 100%; height: 100%; object-fit: cover; display: block; background: #c9cacd; }
.home .project { color: var(--ink); }   /* the whole picture leads to the project */
.home .project .phone { display: none; }   /* phones only: the second picture of a pair */
.home .caption { position: absolute; left: var(--m); bottom: var(--m); width: max-content; }   /* plain text: it scrolls with the page, no lag */
@media (max-width: 860px) { .home .project { grid-template-columns: minmax(0, 1fr); } .home .project img + img { display: none; } }   /* phones: only the light picture */
@media (max-width: 860px) { .home .project.pair { grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); } .home .project.pair .phone { display: block; transform: scaleX(-1); } }   /* mirrored: the two chairs face each other */   /* phones, sound.: light above, dark below, each half the height (a gentler crop than one tall picture) */

/* page transitions (header.js): the page isn't reloaded — the next one is fetched and swapped in, and one WebGL pass
   melts the pictures on screen into the next page's: a ridged noise field drags the old picture one way and the new one
   the other, it swells a little, and at the middle a veil of warm black (with the menu's blur) lies over it.
   States on <html>: warping (the canvas stands in for the pictures), leaving / arriving (the text out of sight). */
body::after { content: ""; position: fixed; inset: 0; z-index: 7; pointer-events: none; background: rgba(13, 12, 11, .5);
              -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); opacity: var(--veil, 0); }   /* the veil; header.js sets --veil per frame */
main { position: relative; z-index: 1; }   /* page content above the warp canvas */
#warp { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }   /* header.js fixes its size in px */
html.warping main img { visibility: hidden; }   /* the warp canvas shows them meanwhile */
main :is(h1, p, dl, .caption) { transition: opacity .9s ease var(--d, 0s), transform 1.1s cubic-bezier(.16, 1, .3, 1) var(--d, 0s); }
main p { --d: .08s; } main dl { --d: .16s; }   /* arriving: heading, text, facts one after the other */
html.leaving main :is(h1, p, dl, .caption) { opacity: 0; transform: translateY(-10px); transition: opacity .3s ease, transform .4s ease-in; }
html.arriving main :is(h1, p, dl, .caption) { opacity: 0; transform: translateY(16px); transition: none; }
@media (prefers-reduced-motion: reduce) { main :is(h1, p, dl, .caption) { transition: none !important; } }
