/* Shared base of the "tape-out" design: fonts, tokens, reset, hero shell, layer palette,
   buttons, frames, footer and the EN/DE switch. Pages set --a (accent) and add their own parts. */
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("/assets/fonts/inter-v19-latin-regular.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url("/assets/fonts/inter-v19-latin-500.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 700; font-display: swap; src: url("/assets/fonts/inter-v19-latin-700.woff2") format("woff2"); }
@font-face { font-family: "Source Code Pro"; font-weight: 400; font-display: swap; src: url("/assets/fonts/source-code-pro-v30-latin-regular.woff2") format("woff2"); }
@font-face { font-family: "Source Code Pro"; font-weight: 600; font-display: swap; src: url("/assets/fonts/source-code-pro-v30-latin-600.woff2") format("woff2"); }

:root {
  --bg: #090b0e; --panel: #0e1115; --line: #1c2128; --line-2: #29303a;
  --fg: #e6e8eb; --muted: #8b939f; --dim: #5b636e;
  --ok: #4caf7d; --bad: #e05a47;
  --a: #5cc8f2;
  --sans: "Inter", system-ui, sans-serif; --mono: "Source Code Pro", ui-monospace, monospace;
  --ease: cubic-bezier(.16, 1, .3, 1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); color: var(--fg); font-family: var(--sans); -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }
body { overflow-x: hidden; line-height: 1.6; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img { display: block; max-width: 100%; height: auto; }
ul { list-style: none; }
code { font-family: var(--mono); font-size: .9em; color: var(--a); }
.mono { font-family: var(--mono); }
::selection { background: var(--a); color: #000; }
:focus-visible { outline: 1px solid var(--a); outline-offset: 3px; }

/* Language: only the active language is shown */
html[lang="de"] [data-l="en"], html[lang="en"] [data-l="de"] { display: none !important; }
/* Language switch: a short fade instead of re-running entrance animations or swapping letters */
html.lang-switching [data-l] { transition: opacity .12s ease !important; }
html.lang-out [data-l] { opacity: 0 !important; }
html.lang-switching .hero-copy > *, html.lang-settled .hero-copy > * { animation: none; opacity: 1; transform: none; }
.lang-switch { display: inline-flex; border: 1px solid var(--line-2); font-family: var(--mono); font-size: 11.5px; pointer-events: auto; }
.lang-switch button { padding: 3px 8px; color: var(--muted); }
.lang-switch button + button { border-left: 1px solid var(--line-2); }
.lang-switch button[aria-pressed="true"] { background: var(--fg); color: var(--bg); }
.lang-switch button:hover:not([aria-pressed="true"]) { color: var(--fg); }

/* Hero shell; each page draws its own canvas */
.hero { position: relative; height: 100svh; min-height: 640px; overflow: hidden; cursor: crosshair; }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgb(9 11 14 / .95) 0%, rgb(9 11 14 / .8) 36%, rgb(9 11 14 / .1) 72%), linear-gradient(0deg, var(--bg) 0%, transparent 26%); }
.hero-top { position: absolute; z-index: 2; inset: 0 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 32px; background: linear-gradient(180deg, rgb(9 11 14 / .9), transparent); font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.hero-top a:hover { color: var(--fg); }
.hero-top nav { display: flex; align-items: center; gap: 22px; }
.hero-copy { position: absolute; z-index: 2; left: 32px; bottom: 96px; max-width: 620px; }
.hero h1 { font-size: clamp(54px, 8vw, 124px); font-weight: 700; letter-spacing: -.055em; line-height: .9; margin-bottom: 22px; }
.hero .tag { font-size: clamp(20px, 2vw, 28px); font-weight: 500; letter-spacing: -.02em; line-height: 1.3; margin-bottom: 14px; }
.hero .intro { color: var(--muted); font-size: 16px; max-width: 520px; margin-bottom: 28px; }
.hero-copy > * { opacity: 0; transform: translateY(16px); animation: up 1s var(--ease) forwards; }
.hero-copy > :nth-child(2) { animation-delay: .08s; } .hero-copy > :nth-child(3) { animation-delay: .16s; } .hero-copy > :nth-child(4) { animation-delay: .24s; } .hero-copy > :nth-child(5) { animation-delay: .32s; }
@keyframes up { to { opacity: 1; transform: none; } }
.readout { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; display: flex; gap: 28px; align-items: center; padding: 12px 32px; border-top: 1px solid var(--line); background: rgb(9 11 14 / .85); backdrop-filter: blur(8px); font-family: var(--mono); font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; pointer-events: none; }
.readout b { color: var(--fg); font-weight: 400; }
.readout .hint { margin-left: auto; color: var(--dim); }

.btn { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 13.5px; padding: 11px 18px; border: 1px solid var(--line-2); background: rgb(14 17 21 / .8); transition: border-color .25s, color .25s, background .25s; }
.btn:hover { border-color: var(--a); color: var(--a); }
.btn i { width: 8px; height: 8px; background: var(--a); }

/* Layout with the layer palette as section nav */
.layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 64px; max-width: 1240px; margin: 0 auto; padding: 0 32px; }
.palette { position: sticky; top: 0; align-self: start; padding-top: 96px; height: 100vh; z-index: 5; }
.palette .title { font-family: var(--mono); font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 14px; padding-left: 4px; }
.palette a { display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 10px; padding: 7px 4px; font-size: 14px; color: var(--muted); transition: color .2s; }
.palette a:hover, .palette a.active { color: var(--fg); }
.palette a.active .sw { outline: 1px solid currentColor; outline-offset: 2px; }
.palette .layer { font-family: var(--mono); font-size: 11px; color: var(--dim); }
.sw { width: 16px; height: 12px; border: 1px solid var(--c, var(--a)); background: repeating-linear-gradient(45deg, var(--c, var(--a)) 0 1px, transparent 1px 4px); }
main { padding-bottom: 80px; }
.s-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 18px; }
.s-head .sw { flex: none; transform: translateY(-3px); }
.s-head h2 { font-size: clamp(30px, 3.4vw, 46px); font-weight: 500; letter-spacing: -.035em; line-height: 1.05; }
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* Frame with corner marks */
.frame { position: relative; padding: 10px; }
.frame::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(var(--line-2), var(--line-2)) 0 0 / 14px 1px no-repeat, linear-gradient(var(--line-2), var(--line-2)) 0 0 / 1px 14px no-repeat,
    linear-gradient(var(--line-2), var(--line-2)) 100% 0 / 14px 1px no-repeat, linear-gradient(var(--line-2), var(--line-2)) 100% 0 / 1px 14px no-repeat,
    linear-gradient(var(--line-2), var(--line-2)) 0 100% / 14px 1px no-repeat, linear-gradient(var(--line-2), var(--line-2)) 0 100% / 1px 14px no-repeat,
    linear-gradient(var(--line-2), var(--line-2)) 100% 100% / 14px 1px no-repeat, linear-gradient(var(--line-2), var(--line-2)) 100% 100% / 1px 14px no-repeat; }

footer { border-top: 1px solid var(--line); padding: 26px 32px 32px; display: flex; justify-content: space-between; align-items: center; gap: 12px 24px; flex-wrap: wrap; font-family: var(--mono); font-size: 12px; color: var(--dim); }
footer a { margin-left: 18px; } footer a:hover { color: var(--fg); }

@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 0 20px; }
  .hero::after { background: linear-gradient(0deg, var(--bg) 0%, rgb(9 11 14 / .92) 48%, rgb(9 11 14 / .35) 82%); }
  .hero-copy { left: 20px; right: 20px; bottom: 76px; }
  .hero-top, .readout { padding-left: 20px; padding-right: 20px; }
  .hero-top nav { gap: 14px; }
  .readout .hint, .readout .opt { display: none; }
  /* The palette becomes a sticky, horizontally scrolling bar of section chips */
  .palette { display: flex; align-items: center; gap: 6px; height: auto; padding: 10px 20px; margin: 0 -20px; overflow-x: auto; scrollbar-width: none;
    background: rgb(9 11 14 / .88); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
  .palette::-webkit-scrollbar { display: none; }
  .palette .title, .palette .layer { display: none; }
  .palette a { flex: none; display: flex; gap: 8px; padding: 5px 10px; font-size: 13px; border: 1px solid var(--line-2); white-space: nowrap; }
  .palette a .sw { width: 12px; height: 9px; }
  .palette a.active { border-color: var(--c, var(--a)); }
  .palette a.active .sw { outline: 0; }
  footer { padding: 22px 20px 28px; }
  footer a { margin-left: 0; margin-right: 16px; }
}
@media (max-width: 420px) { .hero-top { font-size: 12px; } .hero-top nav { gap: 12px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01s !important; transition-duration: .01s !important; } html { scroll-behavior: auto; } }
