/* Projektportal – Oberfläche im Stil des Apple Store */

:root {
  --text: #1d1d1f;
  --grey: #6e6e73;
  --grey-light: #86868b;
  --line: #d2d2d7;
  --bg: #f5f5f7;
  --card: #ffffff;
  --link: #0066cc;
  --button: #0071e3;
  --button-hover: #0077ed;
  --orange: #b64400;
  --radius: 18px;
  --shadow: 2px 4px 12px rgba(0, 0, 0, .08);
  --shadow-hover: 2px 4px 16px rgba(0, 0, 0, .16);
  --content: 980px;
  --gutter: max(22px, calc((100vw - var(--content)) / 2));
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -.022em;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

button { font-family: inherit; letter-spacing: inherit; }

img { display: block; max-width: 100%; }

.app { flex: 1; }

/* Kopfzeile */

.globalnav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 44px;
  background: rgba(250, 250, 252, .8);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, .06);
}

.globalnav-inner {
  max-width: 1024px;
  height: 100%;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 12px;
  letter-spacing: -.01em;
}

.globalnav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
}
.globalnav-brand:hover { text-decoration: none; opacity: .8; }

.globalnav-logo { width: 20px; height: 20px; }

.globalnav-links { display: flex; gap: 28px; flex: 1; }

.globalnav-links a,
.globalnav-user a,
.globalnav-user button {
  color: rgba(0, 0, 0, .8);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font-size: 12px;
}
.globalnav-links a:hover,
.globalnav-user a:hover,
.globalnav-user button:hover { color: var(--text); text-decoration: none; }
.globalnav-links a.active { color: var(--text); font-weight: 600; }

.globalnav-user {
  display: flex;
  align-items: center;
  gap: 18px;
  white-space: nowrap;
}

.globalnav-user .who {
  color: var(--grey);
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Abschnitte */

.section { padding: 0 0 56px; }

.section-head {
  padding: 0 var(--gutter);
  margin: 0 0 24px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.section-title {
  margin: 0;
  font-size: 28px;
  line-height: 1.14;
  font-weight: 600;
  letter-spacing: .007em;
}

.grey { color: var(--grey); }

.store-hero {
  padding: 64px var(--gutter) 40px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
}

.store-hero h1 {
  margin: 0;
  max-width: 620px;
  font-size: 48px;
  line-height: 1.08;
  font-weight: 600;
  letter-spacing: -.003em;
}

.store-hero-aside {
  font-size: 14px;
  line-height: 1.43;
  min-width: 200px;
  text-align: left;
}
.store-hero-aside strong { display: block; font-weight: 600; }

/* Runde Projekt-Navigation wie die Produktleiste */

.chips {
  display: flex;
  gap: 30px;
  overflow-x: auto;
  padding: 8px var(--gutter) 40px;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }

.chip {
  flex: 0 0 auto;
  width: 96px;
  text-align: center;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.29;
}
.chip:hover { text-decoration: none; }
.chip:hover .chip-img { transform: scale(1.04); }

.chip-img {
  width: 80px;
  height: 80px;
  margin: 0 auto 10px;
  border-radius: 50%;
  background: var(--card);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .3s ease;
}
.chip-img img { width: 100%; height: 100%; object-fit: cover; }

.chip-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Kachel-Karussell */

.shelf { position: relative; }

.shelf-track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-left: var(--gutter);
  padding: 10px var(--gutter) 30px;
  scrollbar-width: none;
}
.shelf-track::-webkit-scrollbar { display: none; }

.shelf-nav {
  display: flex;
  justify-content: flex-end;
  gap: 18px;
  padding: 0 var(--gutter);
}

.round-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 0;
  background: rgba(210, 210, 215, .64);
  color: rgba(0, 0, 0, .56);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .2s, color .2s, opacity .2s;
}
.round-btn:hover { background: rgba(223, 223, 227, .7); color: rgba(0, 0, 0, .64); }
.round-btn:disabled { opacity: .42; cursor: default; }
.round-btn svg { width: 16px; height: 16px; }

.card {
  flex: 0 0 auto;
  scroll-snap-align: start;
  width: 400px;
  height: 500px;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  color: var(--text);
  transition: box-shadow .3s cubic-bezier(0, 0, .5, 1), transform .3s cubic-bezier(0, 0, .5, 1);
}
.card:hover { box-shadow: var(--shadow-hover); transform: scale(1.01); text-decoration: none; }

.card-copy { padding: 30px 30px 0; }

.eyebrow {
  margin: 0 0 6px;
  font-size: 12px;
  line-height: 1.33;
  font-weight: 600;
  letter-spacing: -.01em;
  text-transform: uppercase;
  color: var(--grey);
}
.eyebrow.new { color: var(--orange); }

.card-title {
  margin: 0;
  font-size: 28px;
  line-height: 1.14;
  font-weight: 600;
  letter-spacing: .007em;
}

.card-sub {
  margin: 8px 0 0;
  font-size: 17px;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-media {
  flex: 1;
  min-height: 0;
  margin-top: 20px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
}
.card-media img { width: 100%; height: 100%; object-fit: cover; }

.placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #fbfbfd 0%, #e8e8ed 100%);
  color: #a1a1a6;
}
.placeholder svg { width: 56px; height: 56px; }
.chip-img .placeholder svg { width: 32px; height: 32px; }

/* Raster „Alle Projekte“ */

.search {
  position: relative;
  width: 260px;
}
.search input {
  width: 100%;
  height: 36px;
  padding: 0 14px 0 36px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card);
  font: inherit;
  font-size: 14px;
  color: var(--text);
  outline: none;
}
.search input:focus { border-color: var(--button); box-shadow: 0 0 0 3px rgba(0, 113, 227, .2); }
.search svg {
  position: absolute;
  left: 12px;
  top: 10px;
  width: 16px;
  height: 16px;
  color: var(--grey-light);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  padding: 0 var(--gutter);
}

.tile {
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  overflow: hidden;
  color: var(--text);
  display: flex;
  flex-direction: column;
  transition: box-shadow .3s cubic-bezier(0, 0, .5, 1), transform .3s cubic-bezier(0, 0, .5, 1);
}
.tile:hover { box-shadow: var(--shadow-hover); transform: scale(1.01); text-decoration: none; }

.tile-media { aspect-ratio: 4 / 3; background: var(--bg); overflow: hidden; }
.tile-media img { width: 100%; height: 100%; object-fit: cover; }

.tile-copy { padding: 18px 22px 22px; }
.tile-title { margin: 0; font-size: 21px; line-height: 1.19; font-weight: 600; letter-spacing: .011em; }
.tile-meta { margin: 6px 0 0; font-size: 14px; color: var(--grey); }

.empty {
  margin: 0 var(--gutter);
  padding: 48px 24px;
  border-radius: var(--radius);
  background: var(--card);
  text-align: center;
  color: var(--grey);
}

.more-row { text-align: center; padding: 28px 0 0; }

/* Schaltflächen */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 28px;
  padding: 8px 16px;
  border-radius: 980px;
  border: 1px solid transparent;
  background: var(--button);
  color: #fff;
  font-size: 14px;
  line-height: 1.29;
  cursor: pointer;
  transition: background .2s;
}
.btn:hover { background: var(--button-hover); text-decoration: none; }
.btn.large { padding: 12px 22px; font-size: 17px; }
.btn.secondary { background: transparent; color: var(--link); border-color: var(--link); }
.btn.secondary:hover { background: var(--link); color: #fff; }
.btn:disabled { opacity: .4; cursor: default; }

.link-more {
  background: none;
  border: 0;
  padding: 0;
  color: var(--link);
  font-size: 17px;
  cursor: pointer;
}
.link-more::after { content: " ›"; }
.link-more:hover { text-decoration: underline; }

/* Projektseite */

.ribbon {
  position: sticky;
  top: 44px;
  z-index: 40;
  height: 52px;
  background: rgba(251, 251, 253, .8);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, .08);
}
.ribbon-inner {
  max-width: 1024px;
  height: 100%;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.ribbon-title {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: .011em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ribbon-links { display: flex; align-items: center; gap: 22px; font-size: 12px; white-space: nowrap; }
.ribbon-links a { color: rgba(0, 0, 0, .8); }
.ribbon-links .btn { padding: 4px 11px; font-size: 12px; }

.product {
  padding: 48px var(--gutter) 24px;
}

.crumbs { font-size: 12px; color: var(--grey); margin: 0 0 12px; }
.crumbs a { color: var(--grey); }

.product-title {
  margin: 0;
  font-size: 48px;
  line-height: 1.08;
  font-weight: 600;
  letter-spacing: -.003em;
}

.product-meta { margin: 10px 0 0; font-size: 17px; color: var(--grey); }

.product-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 40px;
  align-items: start;
  padding: 32px var(--gutter) 56px;
}

/* Galerie */

.gallery { min-width: 0; }

.stage {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  background: var(--card);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.stage img,
.stage video { width: 100%; height: 100%; object-fit: contain; cursor: zoom-in; }
.stage video { cursor: default; background: #000; }

.stage .round-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
}
.stage:hover .round-btn { opacity: 1; }
.stage .round-btn.prev { left: 16px; }
.stage .round-btn.next { right: 16px; }
.stage .round-btn:disabled { opacity: 0; }

.stage-count {
  position: absolute;
  right: 16px;
  bottom: 14px;
  padding: 4px 10px;
  border-radius: 980px;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  font-size: 12px;
}

.file-stage {
  text-align: center;
  color: var(--grey);
  padding: 24px;
}
.file-stage svg { width: 72px; height: 72px; color: var(--grey-light); margin: 0 auto 12px; display: block; }
.file-stage .file-name { color: var(--text); font-weight: 600; margin: 0 0 14px; word-break: break-word; }

.dots { display: flex; justify-content: center; gap: 10px; margin: 18px 0 0; }
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  background: rgba(0, 0, 0, .25);
  cursor: pointer;
}
.dot.active { background: rgba(0, 0, 0, .8); }

.thumbs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 16px 2px 4px;
  scrollbar-width: none;
}
.thumbs::-webkit-scrollbar { display: none; }
.thumb {
  flex: 0 0 auto;
  width: 72px;
  height: 72px;
  border-radius: 12px;
  border: 2px solid transparent;
  background: var(--card);
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--grey-light);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb svg { width: 28px; height: 28px; }
.thumb.active { border-color: var(--button); }

.gallery-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  font-size: 14px;
  color: var(--grey);
}
.gallery-actions .media-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gallery-actions a { white-space: nowrap; font-size: 14px; }

/* Seitenspalte wie das Kauf-Panel */

.panel {
  position: sticky;
  top: 116px;
  border-radius: var(--radius);
  background: var(--card);
  padding: 28px;
}
.panel h2 { margin: 0 0 16px; font-size: 21px; line-height: 1.19; font-weight: 600; }
.facts { margin: 0; }
.facts div { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid #e8e8ed; font-size: 14px; }
.facts div:first-child { border-top: 0; padding-top: 0; }
.facts dt { color: var(--grey); }
.facts dd { margin: 0; font-weight: 600; text-align: right; }
.panel .btn { width: 100%; margin-top: 22px; }
.panel-note { margin: 20px 0 0; font-size: 14px; line-height: 1.43; white-space: pre-line; color: var(--text); }

/* Texte */

.texts { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; padding: 0 var(--gutter); }

.text-card {
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 220px;
}
.text-card h3 { margin: 0; font-size: 21px; line-height: 1.19; font-weight: 600; letter-spacing: .011em; }
.text-card .eyebrow { margin: 0; }
.text-card .text-preview {
  margin: 0;
  font-size: 14px;
  line-height: 1.43;
  color: var(--grey);
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.text-card .text-preview a { color: var(--link); }
.text-card .text-preview a:hover { text-decoration: underline; }
.text-card .row { margin-top: auto; padding-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.text-card .count { font-size: 12px; color: var(--grey-light); }

/* Blatt (Text lesen) und Lichtbox */

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, .48);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 60px 20px;
  animation: fade .25s ease;
}

.sheet {
  position: relative;
  width: 100%;
  max-width: 816px;
  border-radius: var(--radius);
  background: var(--card);
  padding: 60px 76px 56px;
  animation: rise .35s cubic-bezier(.2, .8, .2, 1);
}
.sheet h2 { margin: 0 0 6px; font-size: 40px; line-height: 1.1; font-weight: 600; letter-spacing: 0; }
.sheet .sheet-meta { margin: 0 0 28px; color: var(--grey); font-size: 14px; }
.sheet .sheet-body { white-space: pre-wrap; word-wrap: break-word; font-size: 17px; line-height: 1.6; }
.sheet .sheet-body a,
.panel-note a { color: var(--link); overflow-wrap: anywhere; }
.sheet .sheet-body a:hover,
.panel-note a:hover { text-decoration: underline; }
.sheet .sheet-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 0 0 32px; }

.close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 0;
  background: #333336;
  color: #d6d6d7;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.close-btn:hover { background: #474747; color: #fff; }
.close-btn svg { width: 14px; height: 14px; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: rgba(0, 0, 0, .92);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fade .2s ease;
}
.lightbox img { max-width: 92vw; max-height: 88vh; object-fit: contain; border-radius: 6px; }
.lightbox .round-btn { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255, 255, 255, .18); color: #fff; }
.lightbox .round-btn:hover { background: rgba(255, 255, 255, .3); }
.lightbox .round-btn.prev { left: 24px; }
.lightbox .round-btn.next { right: 24px; }
.lightbox .close-btn { background: rgba(255, 255, 255, .18); color: #fff; }
.lightbox .stage-count { bottom: 24px; right: 50%; transform: translateX(50%); }

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }

/* Anmeldung */

.signin {
  max-width: 480px;
  margin: 0 auto;
  padding: 96px 22px 80px;
  text-align: center;
}
.signin-logo { width: 64px; height: 64px; margin: 0 auto 24px; }
.signin h1 { margin: 0; font-size: 40px; line-height: 1.1; font-weight: 600; }
.signin .lead { margin: 12px 0 36px; color: var(--grey); font-size: 17px; }

.field-pill {
  position: relative;
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  transition: border-color .2s, box-shadow .2s;
}
.field-pill:focus-within { border-color: var(--button); box-shadow: 0 0 0 4px rgba(0, 113, 227, .18); }
.field-pill input {
  flex: 1;
  height: 56px;
  padding: 0 16px;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 17px;
  outline: none;
  color: var(--text);
  min-width: 0;
}
.field-pill .go {
  width: 32px;
  height: 32px;
  margin-right: 12px;
  border-radius: 50%;
  border: 1.5px solid var(--grey-light);
  background: transparent;
  color: var(--grey-light);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.field-pill .go:hover { border-color: var(--text); color: var(--text); }
.field-pill .go svg { width: 14px; height: 14px; }
.signin .hint { margin: 18px 0 0; font-size: 14px; color: var(--grey); }
.signin .error { margin: 14px 0 0; font-size: 14px; color: #e30000; min-height: 20px; }
.signin .link-more { font-size: 14px; margin-top: 18px; }
.signin .link-more::after { content: ""; }

.notice {
  max-width: 560px;
  margin: 0 auto;
  padding: 120px 22px;
  text-align: center;
}
.notice h1 { margin: 0 0 12px; font-size: 40px; line-height: 1.1; font-weight: 600; }
.notice p { color: var(--grey); margin: 0 0 28px; }

/* Laden, Meldungen, Fußzeile */

.loading { display: flex; justify-content: center; padding: 140px 0; }
.spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid rgba(0, 0, 0, .1);
  border-top-color: var(--grey);
  animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  z-index: 200;
  max-width: min(560px, calc(100vw - 40px));
  padding: 14px 22px;
  border-radius: 14px;
  background: rgba(29, 29, 31, .92);
  color: #fff;
  font-size: 14px;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s, transform .3s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.footer {
  border-top: 1px solid var(--line);
  background: var(--bg);
  font-size: 12px;
  color: var(--grey);
}
.footer-inner { max-width: 980px; margin: 0 auto; padding: 18px 22px 24px; }
.footer p { margin: 0; }

/* Tablet und Handy */

@media (max-width: 1068px) {
  .product-layout { grid-template-columns: minmax(0, 1fr); }
  .panel { position: static; }
}

@media (max-width: 734px) {
  body { font-size: 17px; }
  .globalnav-inner { gap: 16px; padding: 0 16px; }
  .globalnav-links { display: none; }
  .globalnav-user .who { display: none; }
  .globalnav-brand span { max-width: 52vw; overflow: hidden; text-overflow: ellipsis; }
  .store-hero { flex-direction: column; align-items: flex-start; padding-top: 40px; gap: 20px; }
  .store-hero h1 { font-size: 32px; line-height: 1.125; }
  .section-title { font-size: 24px; line-height: 1.17; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 14px; }
  .search { width: 100%; }
  .card { width: 300px; height: 420px; }
  .card-copy { padding: 24px 24px 0; }
  .card-title { font-size: 24px; line-height: 1.17; }
  .chips { gap: 20px; }
  .chip { width: 80px; font-size: 12px; }
  .chip-img { width: 64px; height: 64px; }
  .ribbon-title { font-size: 17px; }
  .product { padding-top: 32px; }
  .product-title { font-size: 32px; line-height: 1.125; }
  .stage .round-btn { opacity: 1; }
  .sheet-backdrop { padding: 0; }
  .sheet { min-height: 100%; border-radius: 0; padding: 64px 22px 40px; }
  .sheet h2 { font-size: 28px; }
  .lightbox .round-btn.prev { left: 10px; }
  .lightbox .round-btn.next { right: 10px; }
}

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