/* keitgen.de - home page styles (loaded only on / and /en; all other pages use site.css).
   Built from the approved mockup _Resources/2026-09_modern_idea_v2/style.css.
   Stacked hard-contrast blocks, no dark mode (every block sets its own colours). */

/* IBM Plex Sans latin file is a variable font (weights 100-700), so one rule covers all weights. */
@font-face { font-family: 'Plex'; font-weight: 100 700; font-display: swap; src: url('/fonts/ibm-plex-sans-400-latin.woff2') format('woff2'); }
@font-face { font-family: 'PlexMono'; font-weight: 400; font-display: swap; src: url('/fonts/ibm-plex-mono-400-latin.woff2') format('woff2'); }
/* Source Serif 4 latin file is a variable font (weight and optical size axes). */
@font-face { font-family: 'Serif'; font-weight: 200 900; font-display: swap; src: url('/fonts/source-serif-4-400-latin.woff2') format('woff2'); }
@font-face { font-family: 'PlexMono'; font-weight: 500; font-display: swap; src: url('/fonts/ibm-plex-mono-500-latin.woff2') format('woff2'); }

:root {
  --red: #D43049; --ink: #141312; --paper: #FAF9F7; --paper-2: #EFECE6; --slate: #2C3A4F;
  --sans: 'Plex', 'Helvetica Neue', Arial, sans-serif; --mono: 'PlexMono', ui-monospace, monospace;
  --serif: 'Serif', 'Iowan Old Style', Georgia, serif;
  --gut: clamp(20px, 4vw, 56px);
  /* Type scale - every section uses only these: label (mono caps), headline + subhead (sans bold),
     body (serif, usually in two equal columns), key sentence (body size, bold) */
  --fs-body: clamp(18px, 1.45vw, 21px); --lh-body: 1.55;
  --fs-sub: clamp(22px, 2.1vw, 28px);
}
* { box-sizing: border-box; }
html { font-family: var(--sans); font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; background: var(--ink); }
body { margin: 0; }
a { color: inherit; }
button { font: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
/* Bilingual text: paired lang spans, the inactive language is hidden via data-lang on <html> */
[data-lang="de"] [lang="en"], [data-lang="en"] [lang="de"] { display: none; }
.block { position: relative; overflow: hidden; padding: clamp(80px, 12vh, 140px) var(--gut); }
.wrap { max-width: 1240px; margin: 0 auto; }
.wrap .mark { font: 500 12px var(--mono); letter-spacing: .12em; text-transform: uppercase; margin: 0 0 28px; display: flex; gap: 14px; }
.wrap .mark .n { opacity: .6; }
h2 { font-weight: 600; font-size: clamp(34px, 4.6vw, 64px); line-height: 1.02; letter-spacing: -0.035em; margin: 0 0 32px; max-width: 18em; text-wrap: balance; }
/* Body text: one size and line height for every paragraph in every section */
.cols2 p, .split p, .hon .body, .contact .note { font-family: var(--serif); font-size: var(--fs-body); line-height: var(--lh-body); }
/* Key sentence: body size, bold, across both columns */
.wrap .key { font-weight: 600; }
.cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px clamp(28px, 4vw, 64px); }
.cols2 p { margin: 0 0 1em; }

/* ---------- top bar (sits on the first block) ---------- */
.top { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center;
  padding: 22px var(--gut); z-index: 5; font: 400 12px var(--mono); letter-spacing: .06em; color: #fff; }
.top .logo { height: 24px; display: block; filter: brightness(0) invert(1); }
.top .right { display: flex; gap: 22px; align-items: center; }
.top a { text-decoration: none; }
/* DE / EN toggle (inc/lang-toggle.php): current language full strength, the other one dimmed */
.lang-toggle { display: inline-flex; align-items: baseline; gap: 4px; }
.lang-link { padding: 4px 2px; opacity: .5; }
.lang-link.on { opacity: 1; font-weight: 500; }
.lang-link:hover { opacity: .8; }
.lang-sep { opacity: .5; }

/* ---------- home hero: red poster ---------- */
.hero { background: var(--red); color: #fff; display: grid; grid-template-columns: 1.35fr 1fr; min-height: 100vh; padding: 0; }
.hero .type { padding: 120px var(--gut) 0; display: flex; flex-direction: column; justify-content: space-between; }
.hero h1 { font-weight: 600; font-size: clamp(56px, 9vw, 148px); line-height: .88; letter-spacing: -0.045em; margin: 0; }
.hero h1 span { display: block; }
.hero h1 .thin { font-weight: 400; opacity: .55; }
.hero .sub { font-size: clamp(18px, 1.6vw, 22px); font-weight: 500; margin: 36px 0 6px; }
.hero .lead { font-size: clamp(16px, 1.4vw, 19px); opacity: .85; margin: 0; }
.hero .strip { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid rgba(255,255,255,.5); margin-top: 48px; }
.hero .strip a { padding: 16px 16px 40px 0; font-size: 15px; line-height: 1.35; text-decoration: none; }
.hero .strip b { display: block; font: 500 12px var(--mono); letter-spacing: .06em; margin-bottom: 6px; opacity: .75; }
/* Photo in original colour: any tint on skin reads as a mood (red = embarrassed, green/yellow = ill),
   so the red stays in the field next to it. The photo panel is light, so text over it turns dark. */
.hero .photo { position: relative; background: #EDEBE7; min-height: 420px; }
.hero .photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%;
  filter: saturate(.9) contrast(1.02) brightness(1.06); }
.hero .cap { position: absolute; bottom: 20px; left: 20px; font: 400 11.5px var(--mono); letter-spacing: .06em; text-decoration: none;
  color: var(--ink); background: rgba(250,249,247,.9); padding: 4px 8px; }
.hero .top .right { color: var(--ink); }

/* ---------- intro ---------- */
.intro { background: var(--paper-2); color: var(--ink); }
.intro .mark { color: var(--red); }
.intro .cols2 { color: #3A3835; }

/* ---------- 01 KI: switchable process graphs (with branches); AI docks into every step ---------- */
.ki { background: #fff; color: var(--ink); }
.ki .mark { color: var(--red); }
.ki h2 .r { color: var(--red); }
.scen { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 18px; }
.scen button { background: none; border: 1px solid #D8D4CC; color: #6B6660; padding: 6px 14px; border-radius: 20px; cursor: pointer; font: 500 12.5px var(--mono); letter-spacing: .03em; }
.scen button.on { border-color: var(--red); color: var(--ink); }
.graph { width: 100%; height: auto; display: block; overflow: visible; }
.graph .edge { fill: none; stroke: var(--ink); stroke-width: 1.5; }
.graph .fl { fill: none; stroke: var(--red); stroke-width: 3; stroke-dasharray: 10 12; stroke-linecap: round; opacity: 0; transition: opacity .6s ease; }
.graph.on .fl { opacity: 1; animation: pulse 1s linear infinite; }
@keyframes pulse { to { stroke-dashoffset: -22; } }
.graph .node rect { fill: #fff; stroke: var(--ink); stroke-width: 1.5; }
.graph .node text { font: 500 15px var(--sans); fill: var(--ink); text-anchor: middle; dominant-baseline: central; }
/* AI tags: loose dashed chat windows ("Heute") that dock into each step ("Ziel") */
.graph .tag { transition: transform .9s cubic-bezier(.6,0,.2,1); }
.graph .tag rect { fill: #fff; stroke: var(--red); stroke-width: 1.5; stroke-dasharray: 4 3; transition: width .3s ease, x .3s ease; }
.graph .tag text { font: 500 12px var(--mono); fill: #A65A66; text-anchor: middle; dominant-baseline: central; transition: opacity .3s ease; }
.graph .tag text.out { opacity: 0; }
.graph .tag .spark { opacity: 0; transition: opacity .4s ease; }
.graph .tag .spark path { fill: var(--red); }
.graph.on .tag .spark { opacity: 1; }
.graph.on .tag rect { stroke-dasharray: none; }
.graph.on .tag text { fill: var(--red); }
.state { font: 500 13px var(--mono); letter-spacing: .06em; text-transform: uppercase; min-height: 20px; margin: 18px 0 56px; }
.ki .cols2 { color: #3A3835; }
.ki .key { grid-column: 1 / -1; margin: 12px 0 0; color: var(--ink); }

/* ---------- 02 APPS: one stage that alternates between Sudoku and DataScan ---------- */
.apps { background: var(--ink); color: #EDE9E3; }
.apps .mark { color: var(--red); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 80px); align-items: center; }
.apps p { color: #B9B3AB; margin: 0 0 1em; }
.apps p a { color: #EDE9E3; }
.tabs { display: flex; gap: 6px; justify-content: center; margin: 0 0 14px; }
.tabs button { background: none; border: 1px solid #3A3632; color: #8C867E; padding: 6px 12px; border-radius: 20px; cursor: pointer; font: 500 12px var(--mono); letter-spacing: .04em; }
.tabs button.on { border-color: var(--red); color: #EDE9E3; }
.stage { position: relative; width: min(100%, 520px); aspect-ratio: 1; margin: 0 auto; }
.scene { position: absolute; inset: 0; opacity: 0; transition: opacity .6s ease; pointer-events: none; }
.scene.on { opacity: 1; pointer-events: auto; }
.apps .note { font: 400 12px var(--mono); color: #7C766F; margin: 14px 0 0; letter-spacing: .04em; text-align: center; min-height: 1.6em; }
/* Sudoku */
.grid { display: grid; grid-template-columns: repeat(9, 1fr); width: 100%; height: 100%; border: 2px solid #EDE9E3; }
.grid div { display: flex; align-items: center; justify-content: center; border: .5px solid #3A3632; font: 400 clamp(14px, 1.6vw, 22px) var(--mono); color: #EDE9E3; }
.grid div.bx-r { border-right: 2px solid #EDE9E3; }
.grid div.bx-b { border-bottom: 2px solid #EDE9E3; }
.grid div.given { font-weight: 500; }
.grid div.fill { color: var(--red); opacity: 0; transition: opacity .35s ease; }
.grid div.fill.on { opacity: 1; }
/* DataScan */
.scan { display: flex; flex-direction: column; gap: 14px; }
.cam { position: relative; flex: 0 0 48%; border-radius: 10px; background: radial-gradient(ellipse at 50% 40%, #2A2622, #0C0B0A 75%); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.label { background: #F4F1EA; border-radius: 4px; padding: 12px 16px 8px; width: 62%; box-shadow: 0 10px 30px rgba(0,0,0,.5); transform: rotate(-2deg); }
.bars { display: flex; height: 70px; align-items: stretch; gap: 0; }
.bars i { display: block; background: #111; }
.bars s { display: block; }
.label .digits { font: 500 12px var(--mono); color: #111; letter-spacing: .18em; text-align: center; margin-top: 4px; }
.corner { position: absolute; width: 26px; height: 26px; border: 3px solid #fff; opacity: .85; }
.corner.tl { top: 16%; left: 12%; border-right: 0; border-bottom: 0; }
.corner.tr { top: 16%; right: 12%; border-left: 0; border-bottom: 0; }
.corner.bl { bottom: 16%; left: 12%; border-right: 0; border-top: 0; }
.corner.br { bottom: 16%; right: 12%; border-left: 0; border-top: 0; }
.laser { position: absolute; left: 10%; right: 10%; height: 2px; background: var(--red); box-shadow: 0 0 12px 2px rgba(212,48,73,.8); top: 20%; }
.scene.on .laser { animation: laser 1.6s ease-in-out infinite alternate; }
@keyframes laser { from { top: 22%; } to { top: 76%; } }
.hit { position: absolute; inset: 0; background: rgba(212,48,73,.18); opacity: 0; transition: opacity .15s ease; }
.hit.flash { opacity: 1; }
.rows { flex: 1; border: 1px solid #3A3632; border-radius: 8px; overflow: hidden; font: 400 12.5px var(--mono); }
.rows .r { display: grid; grid-template-columns: 1.6fr 1fr .6fr; padding: 7px 12px; border-bottom: 1px solid #262320; color: #CFC9C0; }
.rows .r.h { color: #7C766F; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.rows .r.new { animation: rowin .4s ease; }
.rows .r span:last-child { text-align: right; }
@keyframes rowin { from { background: rgba(212,48,73,.25); } to { background: transparent; } }
.export { font: 400 11.5px var(--mono); color: #7C766F; text-align: right; letter-spacing: .04em; }
.export b { color: var(--red); font-weight: 500; }

/* ---------- 03 Datenschutz: redacted document ---------- */
.ds { background: var(--slate); color: #E8ECF2; }
.ds .mark { color: #9FB0C8; }
.ds p { color: #C3CCD9; }
.doc { background: #F4F2EC; color: #2A2826; padding: 32px 30px; font: 400 13px/1.9 var(--mono); transform: rotate(1.2deg); box-shadow: 0 20px 50px -20px rgba(0,0,0,.5); }
.doc .h { font-weight: 500; letter-spacing: .08em; text-transform: uppercase; font-size: 11.5px; border-bottom: 1px solid #C9C5BC; padding-bottom: 8px; margin-bottom: 12px; display: flex; justify-content: space-between; gap: 12px; }
.doc .row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.bar { display: inline-block; height: 14px; background: #141312; vertical-align: middle; transform-origin: left; transform: scaleX(0); transition: transform .5s cubic-bezier(.6,0,.2,1); }
.ds.in .bar { transform: scaleX(1); }
.doc .stamp { margin-top: 18px; display: inline-block; border: 2px solid var(--red); color: var(--red); font-weight: 500; letter-spacing: .12em; padding: 2px 10px; transform: rotate(-4deg); }

/* ---------- 04 honesty ---------- */
.hon { background: var(--paper); color: var(--ink); }
.hon .mark { color: var(--red); }
.hon ul { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.hon li { display: grid; grid-template-columns: 1.3fr 1fr; gap: 12px 48px; padding: 28px 0; border-bottom: 1px solid #D8D4CC; align-items: baseline; }
.hon .lead { font-weight: 600; font-size: var(--fs-sub); line-height: 1.15; letter-spacing: -0.02em; }
.hon .body { color: #5C5854; }

/* ---------- 05 contact ---------- */
.contact { background: var(--red); color: #fff; }
.contact .mark { color: #fff; }
/* Address comes from emailLink() (inc/header.php), decoded into a mailto: link by the footer script */
.contact .eml { font: 500 clamp(28px, 4.6vw, 64px) var(--mono); letter-spacing: -0.02em; text-decoration: none; border-bottom: 3px solid #fff; }
.contact .note { margin: 32px 0 0; opacity: .85; max-width: 32em; }

/* Shared footer (inc/footer.php), dark mono variant on the home page */
.site-footer { background: var(--ink); color: #8A8580; padding: 28px var(--gut); font: 400 12px var(--mono); }
.site-footer .rail { max-width: 1240px; margin: 0 auto; }
.footer-row { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: #EDE9E3; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

@media (max-width: 800px) {
  .hero, .cols2, .split, .hon li { grid-template-columns: 1fr; }
  .hero .photo { min-height: 62vh; order: -1; }
  .hero .top .logo { filter: none; } /* on phones the logo sits over the light photo: keep its own colours */
  .hero .type { padding-top: 32px; }
  .hero .strip { grid-template-columns: 1fr; }
  .hero .strip a { padding-bottom: 12px; }
  .doc { transform: none; }
}
