@font-face{font-family:"Body";src:url("fonts/hanken-grotesk-latin.woff2") format("woff2");font-weight:100 900;font-display:swap}
@font-face{font-family:"Klausi";src:url("fonts/newsreader-latin.woff2") format("woff2");font-weight:200 800;font-display:swap}

/* Direction C "Systemkarte": dark screen theme, red as the only accent (it is the logo's bracket color) */
:root{
  --night:#17181b; --night-raised:#1f2125; --night-deep:#111214; --line:#35373c;
  --paper:#eef0f2; --paper-soft:#a9afb8; --signal-grey:#5d636c;
  --red:#ff4d5e; --red-hover:#ff7a86; --on-red:#17181b;
  --print-red:#b5152f; --print-ink:#12161d;
  --gutter:clamp(20px,4vw,56px); --header-height:72px;
  --mono:ui-monospace,"SF Mono","Cascadia Mono",Menlo,Consolas,monospace;
}

/* Base */
*{box-sizing:border-box;margin:0}
html{scroll-behavior:smooth;scroll-padding-top:var(--header-height);accent-color:var(--red);color-scheme:dark;scrollbar-color:var(--signal-grey) var(--night)}
body{font:400 1.125rem/1.6 "Body",sans-serif;background:var(--night);color:var(--paper)}
main{overflow-x:clip}
::selection{background:var(--red);color:var(--on-red)}
h1,h2,h3{font-family:"Body",sans-serif;font-weight:750;line-height:1.05;letter-spacing:-.022em;text-wrap:balance}
p{text-wrap:pretty}
a{color:inherit;text-underline-offset:.28em;text-decoration-thickness:1px}
:focus-visible{outline:2px solid var(--red);outline-offset:4px}
svg{display:block;max-width:100%}
.wrap{width:100%;max-width:1360px;margin-inline:auto;padding-inline:var(--gutter)}
.skip{position:absolute;left:12px;top:-100px;z-index:20;padding:10px 16px;background:var(--paper);color:var(--night)}
.skip:focus{top:12px}

/* Header */
.header{position:sticky;top:0;z-index:10;isolation:isolate;border-bottom:1px solid rgb(255 255 255 / .08)}
/* Frosted glass on its own layer. It is twice as tall as the header so the blur already knows the
   content that is about to slide underneath (no popping at the bottom edge); the mask cuts it back. */
.header::before{content:"";position:absolute;inset:0 0 -100% 0;z-index:-1;pointer-events:none;background:rgb(23 24 27 / .62);-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);-webkit-mask-image:linear-gradient(to bottom,#000 50%,transparent 50%);mask-image:linear-gradient(to bottom,#000 50%,transparent 50%);transform:translateZ(0)}
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){.header::before{background:rgb(23 24 27 / .94)}}
.header-inner{min-height:var(--header-height);display:flex;align-items:center;justify-content:space-between;gap:24px}
.logo{font-size:1.65rem;font-weight:800;letter-spacing:-.01em;text-decoration:none;line-height:1;color:#fff;padding-block:10px}
.logo span{color:var(--red)}
.nav{display:flex;flex-wrap:wrap;gap:clamp(8px,2.2vw,28px);font-size:1rem;font-weight:550}
.nav a{padding:10px 4px;text-decoration:none;color:var(--paper)}
.nav a:hover{color:var(--red-hover)}
.nav a[aria-current]{text-decoration:underline;text-decoration-color:var(--red);text-decoration-thickness:2px}

/* Shared */
.eyebrow{font:500 .85rem/1.4 var(--mono);letter-spacing:.06em;text-transform:uppercase;color:var(--red);margin-bottom:20px}
.eyebrow::before{content:"// ";color:var(--signal-grey)}
.lead{font-size:clamp(1.15rem,1.5vw,1.375rem);line-height:1.55;color:var(--paper-soft);max-width:34em}
.actions{display:flex;flex-wrap:wrap;align-items:center;gap:16px 28px;margin-top:40px}
.button{display:inline-block;padding:14px 26px;background:var(--red);color:var(--on-red);text-decoration:none;font-weight:700;transition:background .25s}
.button:hover{background:var(--red-hover)}
.button:focus-visible{outline-color:var(--paper)}
.text-link{padding-block:10px;font-weight:600}
.text-link:hover{color:var(--red)}
.section{padding-block:clamp(72px,10vw,136px)}
.section-title{font-size:clamp(2.3rem,4.6vw,4.25rem);margin-bottom:28px}
.split{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:56px clamp(40px,6vw,104px);align-items:center}

/* Hero with the system map */
.hero-backdrop{background:radial-gradient(circle,#2b2e34 1px,transparent 1.2px) 0 0/26px 26px;-webkit-mask-image:radial-gradient(ellipse 70% 80% at 72% 45%,#000 30%,transparent 75%);mask-image:radial-gradient(ellipse 70% 80% at 72% 45%,#000 30%,transparent 75%);position:absolute;inset:0;pointer-events:none}
.hero-stage{position:relative}
.hero{position:relative;display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr);gap:32px clamp(32px,5vw,80px);align-items:center;min-height:calc(100svh - var(--header-height) - 76px);padding-block:48px}
.hero h1{font-size:clamp(2.75rem,5.2vw,5.25rem);margin-bottom:32px}
.hero h1 span{display:block}
.hero h1 em{font-style:normal;color:var(--red);white-space:nowrap}
.map{width:100%;max-width:600px;justify-self:end;overflow:visible}
.map-ring{fill:none;stroke:var(--line);stroke-width:1;stroke-dasharray:2 6}
.map-route{fill:none;stroke:var(--signal-grey);stroke-width:1.4;stroke-dasharray:5 7;animation:flow 2.4s linear infinite}
.map-route.is-product{stroke:var(--red);stroke-width:2.4;animation-duration:1.6s}
.map-node{fill:var(--signal-grey)}
.map-node.is-product{fill:var(--red)}
.map-pulse{fill:none;stroke:var(--red);stroke-width:1.5;transform-box:fill-box;transform-origin:center;animation:pulse 2.4s ease-out infinite}
.map-label{font:500 17px "Body",sans-serif;fill:var(--paper);transition:fill .2s}
.map-label.is-product{font-weight:700}
.map-caption{font:400 12.5px var(--mono);fill:var(--paper-soft);letter-spacing:.02em}
.map-hit{fill:transparent}
.map-node{transition:fill .2s,r .2s}
.map-route{transition:stroke .2s}
.map-link:hover .map-route,.map-link:focus-visible .map-route{stroke:var(--red);stroke-width:2.4}
.map-link:hover .map-node,.map-link:focus-visible .map-node{fill:var(--red);r:11px}
.map-link:hover .map-label,.map-link:focus-visible .map-label{fill:var(--red-hover)}
.map-hub{fill:var(--night-raised);stroke:var(--red);stroke-width:2}
.map-logo{font:800 27px "Body",sans-serif;fill:#fff}
.map-logo tspan{fill:var(--red)}
.map a:focus-visible{outline:none}
.map a:focus-visible .map-label{text-decoration:underline}
@keyframes flow{to{stroke-dashoffset:-48}}
@keyframes pulse{from{transform:scale(1);opacity:.9}to{transform:scale(2.6);opacity:0}}

/* Facts strip */
.facts{border-block:1px solid var(--line)}
.facts ul{list-style:none;padding:0;display:flex;flex-wrap:wrap;justify-content:space-between;gap:8px 32px;padding-block:24px;font:500 .95rem var(--mono);letter-spacing:.01em}
.facts li::before{content:"";display:inline-block;width:8px;height:8px;margin-right:12px;border-radius:50%;background:var(--signal-grey);vertical-align:.12em}
.facts li.is-product::before{background:var(--red)!important}

/* Klausi */
.product-band{background:var(--night-raised);border-block:1px solid var(--line)}
.product-facts{display:grid;grid-template-columns:auto 1fr;gap:10px 28px;margin-top:32px;font-size:1rem}
.product-facts dt{font-weight:700}
.product-facts dd{color:var(--paper-soft)}
.live-dot{display:inline-block;width:9px;height:9px;margin-right:10px;border-radius:50%;background:#3ddc84;box-shadow:0 0 0 0 rgb(61 220 132 / .6);animation:live 2s ease-out infinite;vertical-align:.08em}
@keyframes live{to{box-shadow:0 0 0 9px rgb(61 220 132 / 0)}}
.product{margin:0;padding:clamp(18px,3vw,40px);border-radius:10px;background:#f4f1e8;color:#1a1915}
.product-head{display:flex;align-items:center;gap:12px;margin-bottom:24px;font:600 1.75rem/1 "Klausi",serif}
.product-mark{width:34px;height:34px}
.product table{width:100%;border-collapse:collapse;background:#fff;font-size:.95rem;font-variant-numeric:tabular-nums}
.product th,.product td{padding:12px 14px;text-align:left;border-bottom:1px solid #e5e1d6}
.product tr>:last-child{text-align:right}
.product .message{width:fit-content;margin:20px 0 0 auto;padding:10px 15px;border-radius:14px;background:#1a1915;color:#f4f1e8;font-size:.95rem}
.product .promise{margin-top:24px;font:500 clamp(1.5rem,2.4vw,2rem)/1.2 "Klausi",serif}
.product figcaption{margin-top:16px;font-size:.875rem;color:#57544c}

/* Services */
.services{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));border-top:1px solid var(--line)}
.service{padding:40px clamp(0px,3vw,40px) 48px 0;border-bottom:1px solid var(--line)}
.service:nth-child(even){padding-left:clamp(24px,3vw,40px);border-left:1px solid var(--line)}
.service-number{display:block;font:500 .9rem var(--mono);color:var(--red);margin-bottom:20px}
.service h3{font-size:clamp(1.75rem,2.6vw,2.4rem);margin-bottom:16px}
.service p{max-width:31em;color:var(--paper-soft)}
.service .result{margin-top:14px;color:var(--paper);font-weight:600}

/* Experience and profile */
.experience{list-style:none;padding:0;margin-top:48px;border-bottom:1px solid var(--line)}
.experience li{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:baseline;gap:8px 32px;padding-block:28px;border-top:1px solid var(--line)}
.experience strong{font-size:clamp(1.75rem,3.4vw,3rem);font-weight:750;letter-spacing:-.02em;line-height:1.05}
.experience span{color:var(--paper-soft)}
.experience .is-product strong{color:var(--red)}
.experience .is-product a{text-decoration:none}
.experience .is-product a:hover{text-decoration:underline}
.profile{align-items:start}
.profile p+p{margin-top:20px}

/* Closing */
.closing{background:var(--night-deep);border-top:2px solid var(--red)}
.contact-mail{font-size:clamp(1.15rem,2.2vw,1.75rem)}
.footer{background:var(--night-deep);color:var(--paper-soft);font-size:.95rem}
.footer-inner{display:flex;flex-wrap:wrap;justify-content:space-between;gap:8px 32px;padding-block:24px;border-top:1px solid var(--line)}
.footer nav{display:flex;flex-wrap:wrap;gap:24px}
.footer a{display:inline-block;padding-block:8px}

/* Subpages */
.page-hero{padding-block:clamp(64px,9vw,128px)}
.page-hero h1{font-size:clamp(2.6rem,6vw,5.5rem);margin-bottom:28px;max-width:14em}
.decision{display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);gap:16px 64px;padding-block:40px;border-top:1px solid var(--line)}
.decision h2{font-size:clamp(1.75rem,3vw,2.5rem)}
.decision p{max-width:36em;color:var(--paper-soft)}
.decision a{color:var(--paper)}
.decisions{padding-block:56px}
.legal{max-width:880px;padding-block:72px 104px;overflow-wrap:break-word}
.legal h1{font-size:clamp(2.2rem,6vw,4rem);margin-bottom:32px;hyphens:manual}
.legal h2{font-size:1.65rem;margin:44px 0 14px}
.legal h3{font-size:1.3rem;margin:28px 0 10px}
.legal p,.legal ul,.legal address{font-size:1.0625rem;font-style:normal;margin-bottom:14px;max-width:70ch}
.legal ul{padding-left:22px}

@media(max-width:960px){
  .hero{grid-template-columns:minmax(0,1fr);min-height:0;padding-block:56px 40px}
  .map{justify-self:center;max-width:520px}
}
@media(max-width:860px){
  .split,.decision{grid-template-columns:minmax(0,1fr)}
  .services{grid-template-columns:minmax(0,1fr)}
  .service,.service:nth-child(even){padding:32px 0 40px;border-left:0}
}
@media(max-width:600px){
  /* Phones: compact sticky bar with logo and navigation in one row */
  :root{--header-height:56px;--gutter:16px}
  .header-inner{gap:10px}
  .logo{font-size:1.3rem}
  .nav{flex-wrap:wrap;justify-content:flex-end;gap:0 clamp(9px,2.8vw,18px);font-size:.875rem}
  .nav a{padding:14px 0}
  .facts ul{flex-direction:column}
  .product th,.product td{padding:10px 8px}
  /* System map: larger type so labels stay readable when the drawing is scaled down */
  .map-label{font-size:25px}
  .map-caption{font-size:19px;transform:translateY(8px)}
  .map-pulse{stroke-width:2.5}
}
/* Very narrow screens, or a header grown tall through enlarged text (flagged by site.js):
   two rows, and the header scrolls away instead of covering the content */
@media(max-width:20.5em){
  :root{--header-height:0px}
  .header{position:static}
  .header-inner{flex-direction:column;align-items:stretch;justify-content:center;gap:0;padding-block:6px 2px}
  .nav{flex-wrap:wrap;justify-content:space-between;gap:4px}
  .nav a{padding:10px 0}
}
html:has(.header.is-tall){--header-height:0px}
.header.is-tall{position:static}
.header.is-tall .header-inner{flex-direction:column;align-items:stretch;justify-content:center;gap:0;padding-block:6px 2px}
.header.is-tall .nav{flex-wrap:wrap;justify-content:space-between;gap:4px}
.header.is-tall .nav a{padding:10px 0}
@media(prefers-reduced-motion:reduce){
  *{scroll-behavior:auto!important;transition:none!important;animation:none!important}
  .map-pulse{display:none}
}

/* Reflow with enlarged text on narrow screens */
@media(max-width:600px){
  body{overflow-wrap:break-word}
  .hero h1,.page-hero h1{font-size:min(2.75rem,14vw)}
  .section-title,.experience strong,.service h3,.decision h2{font-size:min(2.1rem,12vw)}
  .hero>*,.split>*,.experience li>*,.button,.text-link{min-width:0;max-width:100%}
  .experience span{hyphens:auto}
  .product-facts{grid-template-columns:minmax(0,1fr);gap:0}
  .product-facts dd{margin-bottom:10px}
  .product table{table-layout:fixed}
  .product th:last-child,.product td:last-child{width:30%}
  .product th,.product td,.product-head{overflow-wrap:anywhere}
  .product .message{max-width:100%}
  .legal h1,.legal h2,.legal h3{font-size:min(2rem,10vw)}
  .legal h2{font-size:min(1.65rem,9vw)}
  .legal h3{font-size:min(1.3rem,8vw)}
}

/* Print: the original logo on white paper, black text, red brackets */
@media print{
  html{color-scheme:light}
  body,.header,.product-band,.closing,.footer{background:#fff!important;color:var(--print-ink)!important}
  .logo{color:var(--print-ink)}
  .logo span,.eyebrow,.service-number,.experience .is-product strong,.hero h1 em{color:var(--print-red)}
  .facts li.is-product::before{background:var(--print-red)!important}
  .lead,.service p,.decision p,.product-facts dd,.experience span,.footer{color:#3a4049!important}
  .header{position:static}
  .header::before{display:none}
  .nav,.skip,.map,.actions .button{display:none}
  .section,.page-hero{padding-block:24px}
  .hero{min-height:0}
  a[href^="http"]::after{content:" (" attr(href) ")";font-size:.85em}
  .product{border:1px solid #ccc}
}

/* Contact data rendered from data attributes, so it is not in the page text */
.masked-mail::after{content:attr(data-user) "\0040" attr(data-domain)}
.masked-phone::after{content:attr(data-area) " " attr(data-number)}
.masked-address{white-space:pre-line}
.masked-address::after{content:attr(data-street) "\A" attr(data-city)}

/* Motion for browsers that support it; content stays visible everywhere else */
/* Scroll-driven: every effect is tied to the scroll position, not to time, and runs off the main thread.
   Effects finish while the element is still in the lower part of the viewport, so content is settled
   before the reader gets to it. Borders and rules never move; only the content inside them does. */
@media(prefers-reduced-motion:no-preference){
  @view-transition{navigation:auto}
  @supports(animation-timeline:view()){
    /* 1 Reading progress: a red signal line along the bottom edge of the header */
    .header::after{content:"";position:absolute;left:0;right:0;bottom:-1px;height:2px;background:var(--red);transform-origin:left;animation:grow-x linear both;animation-timeline:scroll(root)}

    /* 2 Hero: over the first screen of scrolling the text lifts away and the map tips back into the depth */
    .hero>div:first-child{animation:hero-text-exit linear both;animation-timeline:scroll(root);animation-range:0 75vh}
    .map{animation:map-exit linear both;animation-timeline:scroll(root);animation-range:0 85vh;transform-origin:50% 70%}
    .map-hub{animation:hub-glow linear both;animation-timeline:scroll(root);animation-range:0 45vh}

    /* 3 Facts strip: items switch on one after another while the first screen scrolls */
    .facts li{animation:fact-on linear both;animation-timeline:scroll(root);animation-range:5vh 30vh}
    .facts li:nth-child(2){animation-range:15vh 40vh}
    .facts li:nth-child(3){animation-range:25vh 50vh}
    .facts li:nth-child(4){animation-range:35vh 60vh}

    /* 4 Headlines wipe up out of a mask */
    .section-title,.page-hero h1{animation:title-wipe linear both;animation-timeline:view();animation-range:entry 0% cover 25%}

    /* 5 Klausi card tips upright from lying flat, like a sheet laid on the table */
    .product{animation:card-settle linear both;animation-timeline:view();animation-range:entry 0% entry 75%;transform-origin:50% 100%}

    /* 6 Services: the red rules draw towards each other on one line, then the content rises.
       Both cards of a row share one timeline (the row's first card), so their rules stay level. */
    .services{timeline-scope:--service-row-1,--service-row-2}
    .service:nth-child(1){view-timeline:--service-row-1}
    .service:nth-child(3){view-timeline:--service-row-2}
    .service{position:relative}
    .service::before{content:"";position:absolute;left:0;right:0;top:-2px;height:3px;background:var(--red);transform-origin:left;animation:line-draw linear both;animation-range:entry 0% cover 22%}
    .service:nth-child(even)::before{transform-origin:right}
    .service>*{animation:rise linear both;animation-range:entry 5% cover 25%}
    .service:nth-child(-n+2)::before,.service:nth-child(-n+2)>*{animation-timeline:--service-row-1}
    .service:nth-child(n+3)::before,.service:nth-child(n+3)>*{animation-timeline:--service-row-2}

    /* 7 Experience rows: the dividers stay put, the content sweeps in from alternating sides */
    .experience li{view-timeline:--experience-row}
    .experience li>*{animation:slide-in-left linear both;animation-timeline:--experience-row;animation-range:entry 0% cover 25%}
    .experience li:nth-child(even)>*{animation-name:slide-in-right}
    .decision>*{animation:rise linear both;animation-timeline:view();animation-range:entry 0% cover 25%}

    /* 8 Closing: the red rule opens from the centre, the headline scales up */
    .closing{position:relative;border-top-color:transparent}
    .closing::before{content:"";position:absolute;left:0;right:0;top:-3px;height:4px;background:var(--red);animation:grow-x linear both;animation-timeline:view();animation-range:entry 0% cover 25%}
    .closing .section-title{animation:closing-title linear both;animation-timeline:view();animation-range:entry 10% cover 30%}

    @keyframes grow-x{from{transform:scaleX(0)}}
    @keyframes hero-text-exit{to{transform:translateY(-140px) scale(.94);opacity:0;filter:blur(6px)}}
    @keyframes map-exit{to{transform:perspective(800px) rotateX(62deg) rotateZ(-14deg) scale(.7);opacity:0}}
    @keyframes hub-glow{to{stroke-width:10;fill:#3a141b}}
    @keyframes fact-on{from{opacity:.12;transform:translateY(18px)}}
    @keyframes title-wipe{from{clip-path:inset(0 0 100% 0);transform:translateY(.7em);opacity:0}to{clip-path:inset(-10% -10% -20% -10%)}}
    @keyframes card-settle{from{transform:perspective(900px) rotateX(58deg) translateY(160px) scale(.82);opacity:.1}}
    @keyframes rise{from{opacity:0;transform:translateY(90px)}}
    @keyframes line-draw{from{transform:scaleX(0)}}
    @keyframes slide-in-left{from{opacity:0;transform:translateX(-30vw)}}
    @keyframes slide-in-right{from{opacity:0;transform:translateX(30vw)}}
    @keyframes closing-title{from{transform:scale(.8);opacity:0}}
  }
}
@media print{
  *{animation:none!important}
  .hero-backdrop,.live-dot{display:none}
  .eyebrow::before{content:none}
}
