/* Galerie als Einstieg in die bestehende Werkstatt. Exportgestaltung bleibt in render.js. */
:root { --gallery-width: 1240px; }
html { scroll-behavior: smooth; scroll-padding-top: 110px; }
body { overflow-x: clip; }
.top { min-height: 96px; border-bottom: 1px solid var(--haar); padding: 12px max(24px, calc((100vw - 1400px)/2)); gap: 24px; flex-wrap: wrap; }
.brand { gap: 14px; flex-shrink: 0; }
.brand img { width: 122px; height: auto; }
:root[data-mode="nacht"] .brand img { filter: invert(1); }
.brand span { font-family: var(--font); font-size: 12px; text-transform: none; letter-spacing: 0; }
.top-links { display: flex; align-items: center; gap: 24px; }
.top-links a { text-decoration: none; font-size: 14px; font-weight: 600; padding: 8px 0; }
.top-links a:hover,.top-links a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--akzent); text-decoration-thickness: 3px; text-underline-offset: 7px; }
.top .pill { border: 0; font-family: var(--font); font-size: 12px; text-decoration: none; padding: 6px; }
.top #mode { border: 0; border-radius: 0; width: auto; min-height: 54px; justify-content: center; gap: 10px; padding: 4px; cursor: pointer; }
.switch-plate { display: block; flex-shrink: 0; position: relative; width: 36px; height: 46px; border-radius: 5px; background: #eee; border: 1px solid #bbb; box-shadow: 0 2px 4px #0002,inset 0 1px 0 #fff; }
.switch-rocker { position: absolute; inset: 5px; border-radius: 2px; background: linear-gradient(#fff,#d7d7d7); border: 1px solid #aaa; box-shadow: 0 2px 2px #0003; transform: perspective(90px) rotateX(15deg); transition: transform .25s,box-shadow .25s; }
.switch-rocker::before { content: 'I'; position: absolute; top: 1px; left: 0; right: 0; text-align: center; color: #777; font: 9px/12px Arial,sans-serif; }
.switch-rocker::after { content: '○'; position: absolute; bottom: 1px; left: 0; right: 0; text-align: center; color: #777; font: 11px/12px Arial,sans-serif; }
.light-switch[aria-checked="true"] .switch-rocker { transform: perspective(90px) rotateX(-15deg); box-shadow: 0 -2px 2px #0003; }
.light-switch[aria-checked="true"] .switch-rocker::before { color: #b94c00; font-weight: bold; }
#mode-label { white-space: nowrap; }
.top .sync { font-size: 10px; max-width: 104px; }
.shell { display: block; min-height: calc(100vh - 170px); }
main { max-width: var(--gallery-width); margin: 0 auto; padding: 36px 28px 90px; }
main > h1.st { font-family: var(--font); font-size: clamp(34px,5vw,62px); font-stretch: 100%; font-weight: 700; text-transform: none; line-height: 1.05; letter-spacing: -.045em; }
main h2.st { font-stretch: 100%; text-transform: none; font-weight: 700; line-height: 1.1; font-size: clamp(26px,3vw,40px); }
.rule { border-top-width: 1px; padding-top: 22px; margin-top: 42px; }
.card { border-color: var(--haar); padding: 22px; }
.btn { border-width: 1px; border-color: var(--haar); border-radius: 2px; }
.gallery-main { padding-top: 4px; }
.welcome-banner { display: grid; grid-template-columns: 1fr 1.15fr; gap: 44px; margin: 24px 0 38px; padding: clamp(24px,4vw,48px); background: var(--akzent); color: #111; }
.welcome-banner h1 { font-size: clamp(30px,3.5vw,46px); font-weight: 650; letter-spacing: -.04em; line-height: 1.1; }
.welcome-banner h1 span { display: block; margin-top: 22px; font-size: .65em; line-height: 1.25; letter-spacing: -.02em; font-weight: 500; }
.welcome-copy { font-size: 15px; line-height: 1.6; }
.welcome-copy p { margin: 0 0 18px; max-width: 60ch; }
.welcome-copy p:last-child { margin-bottom: 0; }
.welcome-copy strong { font-weight: 750; }
.welcome-fund { border-top: 1px solid #1114; padding-top: 18px; }
.welcome-together { font-size: 17px; line-height: 1.45; font-weight: 600; }
.tool-directory { border-top: 1px solid var(--haar); padding-top: 24px; }
.tool-directory > summary { cursor: pointer; font-weight: 600; }
.werkzeug-verzeichnis { display: grid; grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); gap: 28px; padding: 24px 0; }
.werkzeug-verzeichnis h4 { font-size: 14px; margin: 0 0 12px; }
.werkzeug-verzeichnis a { display: block; padding: 6px 0; font-size: 14px; text-decoration: none; }
.werkzeug-verzeichnis a:hover { text-decoration: underline; }
.werkzeug-verzeichnis .nav-fold summary { cursor: pointer; font-size: 14px; font-weight: 600; }
.werkzeug-verzeichnis .team-nav { grid-column: 1/-1; }
.werkzeug-verzeichnis .team-nav > div { margin-top: 24px; }
.eyebrow { font-family: var(--mono); font-size: 11px; color: var(--mute); letter-spacing: .035em; margin: 0 0 14px; }
.text-link,.text-button { display: inline-block; font-size: 14px; font-weight: 600; padding: 7px 0; text-decoration: none; border: 0; background: none; color: var(--ink); cursor: pointer; }
.text-link:hover,.text-button:hover { text-decoration: underline; text-decoration-thickness: 2px; text-decoration-color: var(--akzent); }
.freude-hero { display: grid; grid-template-columns: 1.25fr 1fr; align-items: center; min-height: min(660px,calc(100svh - 180px)); gap: 36px; }
.hero-stage { perspective: 900px; position: relative; min-width: 0; }
.hero-stage img { width: 100%; height: auto; background: #fff; transform: rotateX(var(--tilt-x,0deg)) rotateY(var(--tilt-y,0deg)); transition: transform .5s ease; }
.hero-stage.new-beat img { animation: new-beat .6s ease both; }
.hero-copy { padding: 30px 0; }
.hero-copy h2 { font-family: var(--font); font-size: clamp(40px,5.1vw,66px); font-weight: 650; font-stretch: 100%; line-height: 1.03; letter-spacing: -.055em; max-width: 12ch; }
.hero-copy .ink-word { display: block; position: relative; width: max-content; }
.hero-copy .ink-word::after { content: ''; position: absolute; left: 1%; bottom: -8px; height: 5px; width: 105%; background: var(--akzent); transform: rotate(-3deg); transform-origin: left; animation: underline-in 1s .35s both; }
.hero-intro { font-size: 20px; line-height: 1.5; max-width: 26ch; margin: 30px 0 20px; }
.hero-caption { font-size: 13px; color: var(--mute); max-width: 30ch; min-height: 2.8em; }
.hero-copy .row { margin: 20px 0 18px; gap: 18px; }
.hero-next { border: 0; background: var(--ink); color: var(--bg); min-height: 48px; padding: 12px 18px; }
.hero-next:hover { background: var(--akzent); color: #111; }
.frame-counter { font: 10px var(--mono); color: var(--mute); }
.tool-shortcuts { display: flex; gap: 28px; align-items: center; flex-wrap: wrap; padding: 24px 0; border-top: 1px solid var(--haar); border-bottom: 1px solid var(--haar); }
.tool-shortcuts .eyebrow { margin: 0 auto 0 0; }
.gallery-section { margin-top: 100px; }
.section-heading { display: flex; gap: 24px; align-items: flex-end; justify-content: space-between; margin-bottom: 30px; }
.section-heading h2,.make-something h2 { font-size: clamp(30px,4vw,48px); font-weight: 600; letter-spacing: -.045em; line-height: 1.05; }
.section-heading .eyebrow { margin-bottom: 12px; }
.works-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 70px 44px; }
.work-card { min-width: 0; }
.image-button { display: block; padding: 0; border: 0; width: 100%; background: #fff; cursor: zoom-in; overflow: hidden; }
.image-button img { width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; transition: transform .65s cubic-bezier(.2,.7,.3,1); }
@media (hover:hover) { .image-button:hover img { transform: scale(1.035) rotate(-1deg); } }
.work-caption { padding: 20px 2px 0; }
.work-caption h3,.postcard-item h3 { font-size: 20px; font-weight: 600; line-height: 1.25; letter-spacing: -.015em; }
.work-caption .eyebrow { font-size: 10px; display: block; margin-bottom: 10px; }
.work-caption p { color: var(--mute); font-size: 14px; margin: 10px 0 8px; }
.work-caption .row { gap: 24px; }
.merch-rail { position: relative; display: grid; grid-auto-columns: calc((100% - 32px)/3); grid-auto-flow: column; gap: 32px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; padding: 5px 0 20px; }
.merch-rail .work-card { scroll-snap-align: start; }
.merch-rail .work-caption h3 { font-size: 18px; }
.merch-rail .row { gap: 4px; flex-direction: column; align-items: flex-start; }
.round-control { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--haar); border-radius: 50%; background: var(--bg); color: var(--ink); cursor: pointer; font-size: 20px; transition: background .2s; }
.round-control:hover { background: var(--akzent); color: #111; }
.round-control[aria-pressed="true"] { border-color: var(--ink); }
.merch-after { display: grid; grid-template-columns: 1fr 2fr; gap: 40px; align-items: start; margin-top: 28px; }
.fund-note { font-size: 15px; line-height: 1.65; max-width: 58ch; padding-left: 18px; border-left: 3px solid var(--akzent); margin: 0; }
.fund-note b { display: block; font-weight: 600; }
.postcards-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 28px; }
.postcard-flip { width: 100%; aspect-ratio: 1.414; position: relative; display: block; padding: 0; border: 0; cursor: pointer; background: none; perspective: 1200px; }
.postcard-front,.postcard-back { position: absolute; inset: 0; background: white; color: #111; box-shadow: 0 7px 22px #00000012; border: 1px solid #eee; backface-visibility: hidden; transition: transform .7s cubic-bezier(.2,.8,.2,1); display: block; overflow: hidden; }
.postcard-front { transform: rotateY(0); }
.postcard-front > img:first-child { position: absolute; height: 85%; width: 75%; top: 2%; left: 12.5%; object-fit: contain; }
.postcard-front b { position: absolute; bottom: 8%; left: 6%; font-size: clamp(10px,1.1vw,15px); font-weight: 600; max-width: 73%; text-align: left; }
.postcard-front .postcard-logo { position: absolute; right: 5%; bottom: 6%; width: 17%; height: auto; }
.postcard-back { transform: rotateY(-180deg); display: grid; grid-template-columns: 1fr 1fr; align-items: center; padding: 8%; white-space: pre-line; text-align: left; font-size: 12px; }
.postcard-back .address-lines { border-left: 1px solid #ccc; padding-left: 20px; line-height: 2.5; }
.flipped .postcard-front { transform: rotateY(180deg); }
.flipped .postcard-back { transform: rotateY(0); }
.postcard-item h3 { margin-top: 24px; font-size: 17px; }
.postcard-item p,.postcard-item small { font-size: 12px; color: var(--mute); }
.postcard-item .row { gap: 12px; margin-bottom: 12px; }
.postcard-item .text-link,.postcard-item .text-button { font-size: 12px; }
.make-something { margin-top: 100px; padding: 42px 0; border-top: 1px solid var(--haar); }
.make-something p { color: var(--mute); }
.collection-title { font-size: clamp(40px,5vw,70px); font-weight: 600; line-height: 1.05; letter-spacing: -.05em; margin-top: 26px; max-width: 16ch; }
.collection-tabs { display: flex; gap: 32px; margin: 35px 0 45px; padding-bottom: 20px; border-bottom: 1px solid var(--haar); }
.gallery-main > .fund-note { margin: 50px 0 24px; }
.work-detail > img { width: 100%; max-height: 52vh; object-fit: contain; background: white; }
.work-detail .row { margin-top: 22px; }
dialog { border-width: 1px; max-width: min(920px,96vw); }
.request-items { margin-top: 44px; }
.request-item { display: grid; grid-template-columns: 140px minmax(0,1fr) auto; gap: 28px; align-items: center; padding: 24px 0; border-bottom: 1px solid var(--haar); }
.request-item > img { width: 140px; height: 140px; object-fit: contain; background: white; }
.request-item .form2 { margin-top: 18px; }
.request-items ~ .fund-note { margin-top: 36px; }
.postcard-editor { display: grid; grid-template-columns: minmax(220px,.7fr) minmax(0,1.3fr); gap: 40px; align-items: start; margin-top: 44px; }
.postcard-preview { background: white; border: 1px solid var(--haar); box-shadow: 0 10px 25px #0001; width: 100%; aspect-ratio: 1.41; }
.postcard-preview img { width: 100%; height: 100%; object-fit: contain; }
.werkstatt-footer { padding: 26px max(28px,calc((100vw - 1184px)/2)); border-top: 1px solid var(--haar); display: flex; gap: 24px; flex-wrap: wrap; font-size: 12px; color: var(--mute); }
.werkstatt-footer span { margin-right: auto; }
.will-reveal { opacity: 0; transform: translateY(20px); transition: opacity .65s,transform .65s; }
.will-reveal.in-view { opacity: 1; transform: translateY(0); }
@keyframes new-beat { 0% { opacity: .2; transform: translateY(12px) rotate(-2deg); } 100% { opacity: 1; transform: translateY(0) rotate(0); } }
@keyframes underline-in { from { transform: rotate(-3deg) scaleX(0); } to { transform: rotate(-3deg) scaleX(1); } }
@media (max-width: 1100px) {
  .top { gap: 16px; padding: 12px 24px; }
  .top-links { gap: 16px; }
  .top .sync { display: none; }
  .brand span { display: none; }
}
@media (max-width: 800px) {
  .top { min-height: 90px; gap: 12px; padding: 10px 18px; }
  .brand img { width: 94px; }
  .top-links { order: 10; flex-basis: 100%; gap: 0; justify-content: space-between; }
  .top-links a { font-size: 13px; padding: 3px 0; }
  .top #who:not([hidden]) { display: inline-flex; max-width: 130px; overflow-wrap: anywhere; }
  main { padding: 26px 20px 60px; }
  .freude-hero { gap: 10px; min-height: auto; }
  .welcome-banner { grid-template-columns: 1fr; gap: 26px; margin-top: 12px; }
  .welcome-banner h1 { max-width: 26ch; }
  .hero-copy h2 { font-size: clamp(38px,7vw,58px); }
  .hero-intro { font-size: 16px; margin-top: 24px; }
  .hero-copy .eyebrow { font-size: 9px; }
  .hero-next { font-size: 12px; padding: 10px 12px; }
  .hero-copy .row { gap: 10px; }
  .tool-shortcuts { gap: 18px; padding: 18px 0; }
  .tool-shortcuts .eyebrow { flex-basis: 100%; }
  .tool-shortcuts a { font-size: 12px; }
  .gallery-section { margin-top: 70px; }
  .merch-rail { grid-auto-columns: calc((100% - 24px)/2); gap: 24px; }
  .postcards-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 35px 24px; }
  .postcard-front b { font-size: 12px; }
  .postcard-editor { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .top { gap: 8px; }
  .top .pill { font-size: 11px; }
  .top #mode { width: auto; height: auto; }
  .freude-hero { grid-template-columns: 1fr; gap: 0; }
  .hero-stage { width: 92%; margin: 0 auto; }
  .hero-copy { padding: 2px 0 30px; }
  .hero-copy h2 { font-size: 48px; max-width: 100%; }
  .hero-copy .ink-word { display: inline-block; margin-left: 3px; }
  .hero-intro { max-width: 100%; margin-top: 25px; }
  .hero-caption { max-width: 100%; min-height: auto; }
  .hero-copy .row { margin: 18px 0 12px; }
  .section-heading { align-items: flex-start; gap: 16px; }
  .section-heading > .text-link { max-width: 80px; font-size: 12px; }
  .section-heading h2 { font-size: 33px; }
  .section-heading .eyebrow { font-size: 9px; }
  .slider-controls { gap: 4px; flex-wrap: nowrap; }
  .round-control { width: 36px; height: 36px; font-size: 17px; }
  .merch-rail { grid-auto-columns: 82%; gap: 20px; }
  .merch-after { grid-template-columns: 1fr; gap: 20px; }
  .works-grid,.postcards-grid { grid-template-columns: 1fr; gap: 50px; }
  .postcard-front b { font-size: 15px; }
  .postcard-back { font-size: 14px; }
  .request-item { grid-template-columns: 90px minmax(0,1fr); gap: 18px; }
  .request-item > img { width: 90px; height: 90px; }
  .request-item > button { grid-column: 2; justify-self: start; }
  .request-item .form2 { grid-template-columns: 1fr; }
  .werkstatt-footer { gap: 18px; }
  .werkstatt-footer span { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .will-reveal { opacity: 1; transform: none; }
  .hero-stage img { transform: none!important; }
}
