/* BDS-Hub. Layout: linke Seitenleiste (Navigation + Suche), rechts Inhalt mit Seitentitel, Toolbar und großen Kacheln. */
@font-face { font-family: "Rubik"; src: url("fonts/rubik-var.woff2") format("woff2"); font-weight: 300 900; font-display: swap; }
@font-face { font-family: "BDS FreeHand"; src: url("fonts/bds-freehand.woff2") format("woff2"); font-display: swap; }
:root {
  --grau: #222222;
  --dunkelgrau: #131313;
  --kachel: #2b2b2b;
  --kachel-hover: #323232;
  --linie: #3a3a3a;
  --offwhite: #F9F6F4;
  --gedimmt: #b9b4b0;
  --tuerkis: #1EA2B1;
  --gelb: #DFD934;
  --rot: #EA1B0A;
  --weiss: #FFFFFF;
  --hell: #ECE9E6;
  --font: "Rubik", system-ui, -apple-system, "Segoe UI", sans-serif;
  --hand: "BDS FreeHand", "Rubik", cursive;
  --radius: 8px;
  --side: 272px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
html, body { margin: 0; }
body { background: var(--grau); color: var(--offwhite); font-family: var(--font); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--gelb); outline-offset: 2px; }
.ico { width: 22px; height: 22px; flex-shrink: 0; fill: currentColor; }

/* Typo nach BDS Styles Library */
h1, h2, h3 { text-transform: uppercase; font-weight: 700; margin: 0; text-wrap: balance; letter-spacing: 0.01em; }
h1 { font-size: clamp(36px, 5vw, 56px); line-height: 1.05; }
h2 { font-size: clamp(26px, 3vw, 36px); line-height: 1.1; }
h3 { font-size: 18px; line-height: 1.25; font-weight: 600; letter-spacing: 0.03em; }
p { margin: 0; max-width: 65ch; }
.lead { font-size: 20px; line-height: 1.35; }
.muted { color: var(--gedimmt); font-size: 14px; line-height: 1.45; }
.hand { font-family: var(--hand); color: var(--gelb); font-weight: 400; text-transform: none; }

/* Badge */
.badge { display: inline-block; background: var(--rot); color: var(--weiss); text-transform: uppercase; font-weight: 700; border-radius: 3px; letter-spacing: 0.02em; line-height: 1; white-space: nowrap; }
.badge.l { font-size: 20px; padding: 8px 10px 7px; }
.badge.m { font-size: 14px; padding: 6px 8px 5px; }
.badge.s { font-size: 10px; padding: 4px 5px 3px; }

/* ---------- Shell ---------- */
.shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100vh; }
body.collapsed { --side: 84px; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--dunkelgrau); border-right: 1px solid var(--linie); display: flex; flex-direction: column; gap: 18px; padding: calc(18px + env(safe-area-inset-top, 0px)) 14px 20px max(14px, env(safe-area-inset-left, 0px)); z-index: 30; }
.side-top { display: flex; align-items: center; gap: 12px; padding: 4px 4px 0; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; flex: 1; }
.brand-mark { width: 44px; height: 44px; border-radius: 8px; background: var(--grau); display: grid; place-items: center; flex-shrink: 0; border: 1px solid var(--linie); }
.brand-mark img { width: 28px; height: auto; }
.brand b { font-size: 16px; letter-spacing: 0.06em; white-space: nowrap; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 6px; border: 1px solid var(--linie); background: transparent; color: var(--gedimmt); cursor: pointer; flex-shrink: 0; }
.icon-btn:hover { color: var(--offwhite); border-color: var(--gedimmt); }
.icon-btn .ico { width: 20px; height: 20px; }
body.collapsed .collapse-btn .ico { transform: rotate(180deg); }

.search { position: relative; }
.search-box { display: flex; align-items: center; gap: 10px; border: 1px solid var(--linie); border-radius: 8px; padding: 0 12px; height: 46px; background: var(--grau); }
.search-box:focus-within { border-color: var(--tuerkis); }
.search-box .ico { color: var(--gedimmt); width: 20px; height: 20px; }
.search-box input { all: unset; flex: 1; min-width: 0; font-size: 15px; color: var(--offwhite); }
.search-box input::placeholder { color: var(--gedimmt); }
.kbd { font-size: 12px; color: var(--gedimmt); border: 1px solid var(--linie); border-radius: 4px; padding: 2px 6px; white-space: nowrap; }
.results { position: absolute; left: 0; right: 0; top: 52px; background: var(--grau); border: 1px solid var(--linie); border-radius: 8px; padding: 6px; max-height: 60vh; overflow-y: auto; box-shadow: 0 12px 32px #00000080; z-index: 40; }
.results a { display: grid; gap: 1px; padding: 9px 10px; border-radius: 6px; text-decoration: none; }
.results a:hover, .results a.sel { background: var(--kachel-hover); }
.results b { font-size: 14px; font-weight: 500; }
.results span { font-size: 12px; color: var(--gedimmt); }
.results .none { padding: 10px; font-size: 14px; color: var(--gedimmt); }

.nav { display: grid; gap: 2px; }
.nav-label { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gedimmt); padding: 14px 12px 6px; }
.nav a { display: flex; align-items: center; gap: 14px; padding: 11px 12px; border-radius: 8px; text-decoration: none; color: var(--gedimmt); font-size: 15px; font-weight: 500; white-space: nowrap; }
.nav a:hover { color: var(--offwhite); background: var(--kachel); }
.nav a[aria-current="page"] { color: var(--offwhite); background: var(--kachel-hover); }
.nav a[aria-current="page"] .ico { color: var(--tuerkis); }
.side-foot { margin-top: auto; padding: 12px; }
body.collapsed .brand b, body.collapsed .nav a span, body.collapsed .nav-label, body.collapsed .search, body.collapsed .side-foot { display: none; }
body.collapsed .side-top { flex-direction: column; }
body.collapsed .nav a { justify-content: center; padding: 12px 0; }

.topbar { display: none; }
.scrim { display: none; }

.main { min-width: 0; display: flex; flex-direction: column; }
.page-head { border-bottom: 1px solid var(--linie); padding: calc(32px + env(safe-area-inset-top, 0px)) max(20px, env(safe-area-inset-right, 0px)) 28px clamp(20px, 4vw, 56px); display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: flex-end; justify-content: space-between; }
.page-head .t { display: grid; gap: 8px; min-width: 0; }
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding: 18px max(20px, env(safe-area-inset-right, 0px)) 18px clamp(20px, 4vw, 56px); border-bottom: 1px solid var(--linie); }
.toolbar .search-box { width: min(360px, 100%); background: var(--dunkelgrau); }
.toolbar .count { margin-left: auto; color: var(--gedimmt); font-size: 14px; }
.content { padding: 40px max(20px, env(safe-area-inset-right, 0px)) 96px clamp(20px, 4vw, 56px); display: grid; gap: 64px; max-width: 1480px; width: 100%; }
.block { display: grid; gap: 22px; }
.block-head { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: flex-end; justify-content: space-between; }
.block-head .t { display: grid; gap: 4px; }
.block-head h2 { font-size: 22px; letter-spacing: 0.04em; }
footer { margin-top: auto; border-top: 1px solid var(--linie); padding: 28px max(20px, env(safe-area-inset-right, 0px)) calc(28px + env(safe-area-inset-bottom, 0px)) clamp(20px, 4vw, 56px); display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
footer img { height: 36px; width: auto; }

@media (max-width: 900px) {
  .shell { display: block; }
  .side { position: fixed; inset: 0 auto 0 0; width: min(300px, 86vw); height: 100%; transform: translateX(-105%); transition: transform .2s; box-shadow: 0 0 40px #000; }
  body.menu-open .side { transform: none; }
  body.menu-open .scrim { display: block; position: fixed; inset: 0; background: #000000a0; z-index: 25; }
  .collapse-btn { display: none !important; }
  body.collapsed { --side: 272px; }
  body.collapsed .brand b, body.collapsed .nav a span, body.collapsed .nav-label, body.collapsed .search, body.collapsed .side-foot { display: revert; }
  body.collapsed .nav a { justify-content: flex-start; padding: 11px 12px; }
  .topbar { display: flex; position: sticky; top: 0; z-index: 20; align-items: center; gap: 12px; background: var(--dunkelgrau); border-bottom: 1px solid var(--linie); padding: calc(10px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px)); }
  .topbar .brand img { height: 28px; width: auto; }
  .page-head, .toolbar, .content, footer { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .page-head { padding-top: 28px; }
}

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; font: 500 14px/1 var(--font); padding: 12px 16px; border-radius: 6px; border: 1.5px solid var(--offwhite); background: transparent; color: var(--offwhite); text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--offwhite); color: var(--dunkelgrau); }
.btn.primary { background: var(--tuerkis); border-color: var(--tuerkis); color: var(--dunkelgrau); font-weight: 600; }
.btn.primary:hover { background: var(--offwhite); border-color: var(--offwhite); }
.btn.small { padding: 8px 11px; font-size: 13px; }
.btn .ico { width: 18px; height: 18px; }
.btns { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.tag { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; padding: 4px 8px; border-radius: 4px; border: 1px solid var(--linie); color: var(--gedimmt); white-space: nowrap; }
.tag.wait { border-color: var(--gelb); color: var(--gelb); }
.tag.ok { border-color: var(--tuerkis); color: var(--tuerkis); }

/* ---------- Kacheln ---------- */
.card { background: var(--kachel); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.grid { display: grid; gap: 20px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .g4, .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } .card { padding: 22px; } }

/* Asset-Raster wie im E.ON Brand Space: große Kacheln, Asset zentriert, Name in eigener Leiste */
.assets { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.assets.small { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.assets.wide { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.asset { border: 1px solid var(--linie); border-radius: var(--radius); overflow: hidden; background: var(--kachel); display: flex; flex-direction: column; min-width: 0; text-decoration: none; }
.asset:hover { border-color: #5a5a5a; }
.asset .stage { aspect-ratio: 1; display: grid; place-items: center; padding: 18%; background: var(--dunkelgrau); position: relative; }
.asset .stage.light { background: var(--hell); }
.asset .stage.r43 { aspect-ratio: 4 / 3; padding: 14%; }
.asset .stage.r169 { aspect-ratio: 16 / 10; padding: 10%; }
.asset .stage img { max-width: 100%; max-height: 100%; width: auto; height: auto; }
.asset .stage img.fill { width: 100%; }
.asset .bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-top: 1px solid var(--linie); min-height: 56px; }
.asset .bar b { font-size: 14px; font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asset .acts { display: flex; gap: 6px; flex-shrink: 0; }
.mini { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; letter-spacing: 0.04em; padding: 6px 8px; border-radius: 5px; border: 1px solid var(--linie); text-decoration: none; color: var(--offwhite); background: transparent; cursor: pointer; }
.mini:hover { border-color: var(--tuerkis); color: var(--tuerkis); }
.mini .ico { width: 15px; height: 15px; }
.asset.ph .stage { background: repeating-linear-gradient(135deg, #1a1a1a 0 12px, #1d1d1d 12px 24px); color: #5f5f5f; }
.asset.ph .stage .ico { width: 56px; height: 56px; }

/* Startseite */
.hero { padding: calc(44px + env(safe-area-inset-top, 0px)) max(20px, env(safe-area-inset-right, 0px)) 0 clamp(20px, 4vw, 56px); display: grid; gap: 20px; }
.hero h1 { font-size: clamp(52px, 9vw, 112px); line-height: 1; }
.hero-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; }
.hero-note { display: flex; align-items: center; gap: 10px; font-size: 32px; line-height: 1; }
.hero-note svg { width: 72px; height: 44px; flex-shrink: 0; }
.wave-band { height: 80px; margin-top: 36px; background: url("svg/wellen/hero-welle.svg") no-repeat left center / auto 80px; }
.areas { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.area { position: relative; aspect-ratio: 1; background: var(--dunkelgrau); border: 1px solid var(--linie); border-radius: var(--radius); overflow: hidden; text-decoration: none; display: flex; flex-direction: column; justify-content: flex-end; padding: 26px 28px 28px; transition: border-color .15s, transform .15s; }
.area:hover, .area:focus-visible { border-color: var(--tuerkis); transform: translateY(-2px); }
.area .motif { position: absolute; top: -10%; right: -12%; width: 78%; height: 58%; pointer-events: none; }
.area .motif > * { position: absolute; }
.area .tx { position: relative; display: grid; gap: 10px; }
.area h3 { font-size: clamp(26px, 2.4vw, 32px); line-height: 1.02; font-weight: 700; letter-spacing: 0.01em; }
.area p { color: var(--gedimmt); font-size: 14px; line-height: 1.4; }
.m-dots { inset: 8% 0 0 8%; }
.m-dots i { position: absolute; width: 46%; aspect-ratio: 1; border-radius: 50%; }
.m-type { right: 14%; bottom: 0; font: 400 150px/0.8 var(--hand); color: var(--gelb); white-space: nowrap; }
.pv-colors { display: flex; width: 100%; height: 100%; }
.pv-colors i { flex: 1; }
.pv-type { display: flex; align-items: baseline; gap: 22px; }
.pv-type b { font-size: 76px; line-height: 1; }
.pv-type span { font-family: var(--hand); color: var(--gelb); font-size: 52px; }
.pv-doodles { display: flex; gap: 22px; align-items: center; }
.pv-doodles img { height: 74px; width: auto; }
.pv-md { font: 13px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--gedimmt); padding: 22px; align-self: start; justify-self: start; white-space: pre; }
.pv-ico { color: #5f5f5f; }
.pv-ico .ico { width: 64px; height: 64px; }

/* Farben */
.swatch { border-radius: var(--radius); overflow: hidden; background: var(--kachel); display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--linie); }
.swatch button.chip { all: unset; cursor: pointer; display: block; height: 170px; position: relative; }
.swatch button.chip:focus-visible { outline: 3px solid var(--gelb); outline-offset: -3px; }
.swatch button.chip span { position: absolute; left: 16px; bottom: 14px; font-size: 13px; font-weight: 600; opacity: 0; transition: opacity .15s; }
.swatch button.chip:hover span, .swatch button.chip:focus-visible span { opacity: 1; }
.swatch .info { padding: 22px; display: grid; gap: 6px; }
.swatch .info b { text-transform: uppercase; font-size: 16px; letter-spacing: 0.03em; margin-bottom: 4px; }
.val { all: unset; cursor: pointer; display: flex; justify-content: space-between; gap: 8px; font-size: 14px; padding: 5px 8px; margin-inline: -8px; border-radius: 4px; font-variant-numeric: tabular-nums; }
.val:hover, .val:focus-visible { background: #ffffff12; }
.val em { font-style: normal; color: var(--gedimmt); }
.role { font-size: 13px; color: var(--gedimmt); min-height: 1.4em; margin-top: 4px; }

/* Schriften */
.specimen { font-size: clamp(64px, 8vw, 112px); line-height: 1; font-weight: 700; }
.weights { display: grid; gap: 8px; font-size: 22px; }
.fh-sample { font-family: var(--hand); color: var(--gelb); font-size: clamp(56px, 7vw, 96px); line-height: 1; }
.table-wrap { overflow-x: auto; border-radius: var(--radius); background: var(--kachel); border: 1px solid var(--linie); }
table { border-collapse: collapse; width: 100%; font-size: 14px; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 14px 22px; border-bottom: 1px solid var(--linie); white-space: nowrap; }
th { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gedimmt); font-weight: 500; }
tr:last-child td { border-bottom: 0; }

/* Wellen + Badge-Generator */
.stage-box { background: var(--dunkelgrau); border-radius: 6px; padding: 32px 24px; display: grid; place-items: center; min-height: 220px; overflow-x: auto; }
label { display: grid; gap: 8px; font-size: 13px; color: var(--gedimmt); font-weight: 500; }
input[type=text], select { font: 400 16px/1.3 var(--font); color: var(--offwhite); background: var(--dunkelgrau); border: 1.5px solid var(--linie); border-radius: 6px; padding: 12px 14px; width: 100%; min-width: 0; }
input[type=text]:focus, select:focus { border-color: var(--tuerkis); outline: none; }
input[type=range] { accent-color: var(--tuerkis); width: 100%; }
.gen { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: end; }
@media (max-width: 640px) { .gen { grid-template-columns: 1fr; } }
.span2 { grid-column: span 2; }
@media (max-width: 760px) { .span2 { grid-column: auto; } }

/* Regeln + Medien: Bildkarten */
.shot { display: flex; flex-direction: column; border: 1px solid var(--linie); border-radius: var(--radius); overflow: hidden; background: var(--kachel); min-width: 0; }
.shot button.zoom { all: unset; cursor: zoom-in; display: block; background: #333333; position: relative; }
.shot button.zoom:focus-visible { outline: 3px solid var(--gelb); outline-offset: -3px; }
.shot button.zoom img { width: 100%; height: auto; }
.shot button.zoom .z { position: absolute; right: 12px; top: 12px; width: 34px; height: 34px; border-radius: 6px; background: #131313cc; display: grid; place-items: center; opacity: 0; transition: opacity .15s; }
.shot button.zoom:hover .z, .shot button.zoom:focus-visible .z { opacity: 1; }
.shot .z .ico { width: 18px; height: 18px; }
.shot .cap { padding: 18px 20px 20px; display: grid; gap: 6px; }
.shot .cap .k { display: flex; gap: 8px; flex-wrap: wrap; }
.rule { display: flex; gap: 12px; align-items: flex-start; font-size: 16px; font-weight: 500; line-height: 1.35; }
.rule .mark { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; }
.rule .mark.do { background: var(--tuerkis); }
.rule .mark.no { background: var(--rot); }
.rule .mark .ico { width: 18px; height: 18px; fill: none; stroke: var(--weiss); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.shot.textonly .noimg { aspect-ratio: 16 / 9; background: var(--dunkelgrau); display: grid; place-items: center; padding: 28px; text-align: center; }
.shot.textonly .noimg .big { font-size: 22px; font-weight: 600; max-width: 22ch; line-height: 1.3; }
.compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 900px) { .compare { grid-template-columns: 1fr; } }
.compare .col { display: grid; gap: 16px; align-content: start; background: var(--kachel); border: 1px solid var(--linie); border-radius: var(--radius); padding: 24px; }
.compare .col .shot { background: var(--grau); }

/* Lightbox */
dialog.lb { border: 0; padding: 0; background: transparent; max-width: min(1400px, 94vw); max-height: 92vh; color: var(--offwhite); }
dialog.lb::backdrop { background: #000000d9; }
dialog.lb img { max-width: 100%; max-height: 82vh; width: auto; margin: 0 auto; border-radius: 6px; }
dialog.lb .lb-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 2px 0; }
dialog.lb .lb-bar span { font-size: 15px; }

/* Style-Guide */
.md-wrap { position: relative; }
pre.md { margin: 0; background: var(--dunkelgrau); border: 1px solid var(--linie); border-radius: var(--radius); padding: 24px 64px 24px 24px; font: 13px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--gedimmt); overflow: auto; max-height: 560px; white-space: pre; }
.md-wrap .icon-btn { position: absolute; top: 12px; right: 12px; background: var(--kachel); color: var(--offwhite); }
.md-wrap .icon-btn:hover { border-color: var(--tuerkis); color: var(--tuerkis); }

/* Toast */
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 20px); background: var(--offwhite); color: var(--dunkelgrau); padding: 11px 18px; border-radius: 6px; font-weight: 600; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 60; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* Filter-Chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button { font: 500 13px/1 var(--font); padding: 9px 13px; border-radius: 999px; border: 1px solid var(--linie); background: transparent; color: var(--gedimmt); cursor: pointer; }
.chips button:hover { color: var(--offwhite); border-color: var(--gedimmt); }
.chips button[aria-pressed="true"] { background: var(--offwhite); border-color: var(--offwhite); color: var(--dunkelgrau); }

/* Beispiele: Mauerwerk-Raster für gemischte Formate */
.masonry { columns: 3 320px; column-gap: 20px; }
.masonry > * { break-inside: avoid; margin-bottom: 20px; }
.shot button.zoom.dark { background: var(--dunkelgrau); }

/* Ressourcen */
.res { display: flex; flex-direction: column; gap: 14px; background: var(--kachel); border: 1px solid var(--linie); border-radius: var(--radius); padding: 28px; min-width: 0; text-decoration: none; }
a.res:hover { border-color: var(--tuerkis); }
.res .res-ico { width: 52px; height: 52px; border-radius: 10px; background: var(--dunkelgrau); display: grid; place-items: center; color: var(--tuerkis); }
.res .res-ico .ico { width: 28px; height: 28px; }
.res .k { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.res .go { margin-top: auto; padding-top: 6px; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--tuerkis); }
.res .go .ico { width: 18px; height: 18px; }
.res.off { opacity: .7; }
.res.off .go { color: var(--gedimmt); }
dialog.lb .icon-btn { background: var(--kachel); color: var(--offwhite); }

/* Logo in der Seitenleiste (ohne Schriftzug) */
.brand .logo-full { height: 40px; width: auto; }
.brand .logo-mark { display: none; height: 36px; width: auto; }
body.collapsed .brand .logo-full { display: none; }
body.collapsed .brand .logo-mark { display: block; }
html.pre-collapsed body { --side: 84px; }
.close-btn { display: none !important; }
@media (max-width: 900px) {
  .close-btn { display: grid !important; }
  body.collapsed .brand .logo-full { display: block; }
  body.collapsed .brand .logo-mark { display: none; }
}
/* 3D-Objekte: etwas hellere Bühne, damit dunkle Objekte sichtbar bleiben */
#obj-grid .stage { background: #2f2f2f; padding: 14%; }
code { font: 13px ui-monospace, SFMono-Regular, Menlo, monospace; background: #ffffff12; padding: 2px 5px; border-radius: 4px; word-break: break-all; }
#wave-stage { min-height: 460px; padding: 48px; }
/* Feste Bühnen: Bild füllt die Bühne, Kacheln einer Reihe bleiben gleich hoch */
.asset .stage { min-height: 0; overflow: hidden; }
.asset .stage > img { width: 100%; height: 100%; object-fit: contain; }
.asset { align-self: start; }
.shot.textonly .noimg { aspect-ratio: 2 / 1; }
.nav a { padding: 9px 12px; }
.nav-label { padding: 12px 12px 4px; }
.side { gap: 14px; }
.content { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 640px) {
  .assets, .assets.small { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .assets.wide { grid-template-columns: 1fr; }
  .asset .bar { padding: 12px; flex-wrap: wrap; }
  .hero-note svg { transform: rotate(35deg); }
  .area h3 { font-size: 26px; }
}

/* Entspannter (Feedback Linus 11.11.): mehr Luft, linksbündig, Navigation unverändert */
:root { --gut: clamp(24px, 6vw, 112px); }
.page-head { padding: calc(96px + env(safe-area-inset-top, 0px)) var(--gut) 56px; border-bottom: 0; gap: 28px 48px; }
.page-head .t { gap: 18px; }
.page-head h1 { font-size: clamp(44px, 6vw, 80px); line-height: 1; }
.page-head p.muted { font-size: 19px; line-height: 1.5; color: var(--gedimmt); max-width: 60ch; }
.toolbar { padding: 0 var(--gut) 8px; border-bottom: 0; gap: 16px; }
.content { padding: 48px var(--gut) 160px; gap: 128px; max-width: 1600px; }
.block { gap: 36px; }
.block-head .t { gap: 10px; }
.block-head h2 { font-size: 28px; }
.block-head p.muted { font-size: 16px; }
.grid { gap: 32px; }
.assets { gap: 28px; }
.card { padding: 40px; gap: 24px; }
.res { padding: 36px; gap: 18px; }
.asset .bar { padding: 18px 20px; min-height: 64px; }
.shot .cap { padding: 24px 26px 28px; gap: 10px; }
.compare { gap: 32px; }
.compare .col { padding: 36px; gap: 24px; }
.masonry { column-gap: 32px; }
.masonry > * { margin-bottom: 32px; }
.hero { padding: calc(120px + env(safe-area-inset-top, 0px)) var(--gut) 0; gap: 32px; }
.hero .lead { font-size: 22px; line-height: 1.5; max-width: 52ch; }
.wave-band { margin-top: 72px; }
.areas { gap: 32px; }
.area { padding: 32px 34px 34px; }
footer { padding: 40px var(--gut) calc(40px + env(safe-area-inset-bottom, 0px)); }
@media (max-width: 900px) {
  .page-head { padding: 48px 20px 32px; }
  .toolbar { padding: 0 20px 4px; }
  .content { padding: 32px 20px 96px; gap: 80px; }
  .hero { padding: 56px 20px 0; }
  .wave-band { margin-top: 48px; }
  footer { padding: 32px 20px calc(32px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 640px) {
  .card, .res, .compare .col { padding: 26px; }
  .grid, .areas { gap: 20px; }
  .page-head p.muted, .hero .lead { font-size: 17px; }
}

/* ---------- Feinschliff (optischer Durchgang 11.11.): Marke unverändert, mehr Tiefe, Bewegung, Haptik ---------- */
:root { --ease: cubic-bezier(.2,.7,.2,1); --glow: #1EA2B124; }
::selection { background: var(--gelb); color: var(--dunkelgrau); }
html { scrollbar-color: #444 transparent; }
.side { scrollbar-width: thin; }

/* Atmosphäre: feines Korn + leichter Türkis-Schimmer oben rechts im Inhalt */
.main { position: relative; isolation: isolate; }
.main::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 720px; z-index: -1; pointer-events: none;
  background: radial-gradient(60% 70% at 88% 0%, var(--glow), transparent 70%), radial-gradient(40% 50% at 10% 10%, #DFD9340c, transparent 70%); }
body::after { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: .05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* Auftritt: Kopf und Inhalt erscheinen gestaffelt */
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes drift { to { background-position-x: -160px; } }
@keyframes wobble { 0%,100% { transform: rotate(-2deg); } 50% { transform: rotate(1.5deg) translateY(-2px); } }
.hero > *, .page-head .t > *, .page-head .btns { animation: rise .6s var(--ease) both; }
.hero > :nth-child(2), .page-head .t > :nth-child(2) { animation-delay: .06s; }
.hero > :nth-child(3), .page-head .t > :nth-child(3) { animation-delay: .12s; }
.page-head .btns { animation-delay: .16s; }

/* Startseite: Headline mit Gewicht, Notiz wackelt leicht, Welle läuft */
.hero h1 { letter-spacing: -0.01em; text-shadow: 0 6px 40px #0000004d; }
.hero-note { transform-origin: left center; animation: rise .7s var(--ease) .1s both, wobble 6s ease-in-out 1s infinite; }
.hero .lead { color: #ddd8d4; }
.wave-band { background-repeat: repeat-x; animation: drift 9s linear infinite; }
.page-head h1 { position: relative; padding-bottom: 22px; }
.page-head h1::after { content: ""; position: absolute; left: 2px; bottom: 0; width: 132px; height: 12px;
  background: url("svg/wellen/hero-welle.svg") repeat-x left center / auto 12px; opacity: .95; }

/* Bereichs-Kacheln: Akzentfarbe je Kachel, Motiv reagiert, Pfeil erscheint */
.areas { counter-reset: area; }
.area { --acc: var(--tuerkis); counter-increment: area; background: linear-gradient(180deg, #181818, var(--dunkelgrau) 60%);
  transition: border-color .25s var(--ease), transform .35s var(--ease), box-shadow .35s var(--ease); }
.area:nth-child(3n+2) { --acc: var(--gelb); }
.area:nth-child(3n) { --acc: var(--rot); }
.area::before { content: counter(area, decimal-leading-zero); position: absolute; left: 30px; top: 24px; font-size: 12px; font-weight: 600; letter-spacing: .12em; color: #6b6762; transition: color .25s; }
.area::after { content: "→"; position: absolute; right: 26px; bottom: 26px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  font-size: 18px; font-weight: 600; background: var(--acc); color: var(--dunkelgrau); opacity: 0; transform: translateX(-8px) scale(.85); transition: opacity .25s, transform .35s var(--ease); }
.area .motif { transition: transform .6s var(--ease); }
.area:hover, .area:focus-visible { border-color: var(--acc); transform: translateY(-4px); box-shadow: 0 24px 50px -24px #000, 0 0 0 1px var(--acc); }
.area:hover::before, .area:focus-visible::before { color: var(--acc); }
.area:hover::after, .area:focus-visible::after { opacity: 1; transform: none; }
.area:hover .motif, .area:focus-visible .motif { transform: translate(-3%, 3%) rotate(-3deg) scale(1.05); }
.area .tx { padding-right: 52px; }

/* Asset-, Bild- und Ressourcen-Kacheln: gleiche Haptik */
.asset, .shot, .res, .swatch { transition: border-color .2s, transform .3s var(--ease), box-shadow .3s var(--ease); }
.asset:hover, .shot:hover, a.res:hover, .swatch:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -22px #000; }
.asset:hover { border-color: #565656; }
.asset .stage { background: radial-gradient(circle at 50% 40%, #1d1d1d, var(--dunkelgrau) 75%); }
.asset .stage.light { background: var(--hell); }
#obj-grid .stage { background: radial-gradient(circle at 50% 38%, #3a3a3a, #262626 78%); }
.asset .stage > img { transition: transform .45s var(--ease); }
.asset:hover .stage > img { transform: scale(1.06); }
.asset.ph .stage { background: repeating-linear-gradient(135deg, #1a1a1a 0 12px, #1d1d1d 12px 24px); }
.res .res-ico { transition: background .25s, color .25s; }
a.res:hover .res-ico { background: var(--tuerkis); color: var(--dunkelgrau); }
.res .go .ico { transition: transform .25s var(--ease); }
a.res:hover .go .ico { transform: translateX(4px); }

/* Farben: größere Flächen, Klickfläche fühlbar */
.swatch button.chip { height: 200px; transition: filter .2s; }
.swatch button.chip:hover { filter: brightness(1.06); }
.swatch button.chip:active { filter: brightness(.94); }

/* Buttons + Chips: ruhig, aber spürbar */
.btn { transition: background .2s, color .2s, border-color .2s, transform .2s var(--ease), box-shadow .2s; }
.btn:hover { transform: translateY(-1px); }
.btn.primary { box-shadow: 0 8px 24px -10px #1EA2B1aa; }
.btn.primary:hover { box-shadow: 0 10px 28px -10px #F9F6F488; }
.btn:active, .mini:active, .chips button:active { transform: translateY(0) scale(.98); }
.chips button { transition: background .2s, color .2s, border-color .2s; }
.mini { transition: border-color .2s, color .2s; }

/* Navigation: nur der aktive Punkt bekommt eine Türkis-Kante */
.nav a { position: relative; transition: background .15s, color .15s; }
.nav a[aria-current="page"]::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--tuerkis); }
body.collapsed .nav a[aria-current="page"]::before { left: -14px; }

/* Lightbox + Toast */
dialog.lb[open] { animation: rise .35s var(--ease) both; }
dialog.lb::backdrop { backdrop-filter: blur(6px); }
.toast { box-shadow: 0 14px 40px -12px #000; }

@media (max-width: 900px) { .nav a[aria-current="page"]::before { left: -14px; } .area::before { left: 24px; top: 20px; } }
@media (max-width: 640px) { .area::after { right: 20px; bottom: 20px; width: 34px; height: 34px; } .page-head h1::after { width: 96px; } }
@media (hover: none) { .area::after { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .wave-band, .hero-note { animation: none !important; } .hero > *, .page-head .t > *, .page-head .btns { opacity: 1 !important; transform: none !important; } }
