/* Infinity Films – Seite /projekte
   Baut auf css/style.css auf (Farben, Schriften, .h-statement). Der Prisma-Raum bleibt, der Rest ist offen gesetzt:
   Bereiche als grosse Wörter, Index statt Kartenraster, Kinoansicht statt Box. */

[hidden] { display: none !important; }
.pj-page { background: var(--night); }
.pj-nav { display: flex; gap: 26px; list-style: none; margin: 0 0 0 auto; padding: 0; }
.pj-nav a { color: var(--text-2); text-decoration: none; font-size: 15px; }
.pj-nav a:hover, .pj-nav a[aria-current="page"] { color: var(--text); }
.pj-short { display: none; }

/* ---------- Kopf ---------- */
.pj-intro { padding-top: clamp(120px, 14vw, 170px); }
.pj-intro .h-statement { font-size: clamp(56px, 9vw, 150px); }
.pj-intro .lead { margin-top: 28px; max-width: 46ch; }

/* Bereiche: drei grosse Wörter, das gewählte hell und unterstrichen */
.pj-tabs { display: flex; flex-wrap: wrap; gap: 6px clamp(20px, 3vw, 44px); margin-top: clamp(40px, 5vw, 64px); }
.pj-tab {
  position: relative; display: inline-flex; align-items: flex-start; gap: 4px; padding: 6px 0 12px; border: 0; background: none; cursor: pointer;
  font-family: var(--display); font-weight: 500; font-stretch: 82%; font-size: clamp(30px, 3.6vw, 54px); line-height: 1; letter-spacing: -.025em; color: var(--faint);
  transition: color .25s;
}
.pj-tab sup { font-family: var(--body); font-stretch: 100%; font-size: 14px; letter-spacing: 0; color: inherit; opacity: .8; margin-top: .2em; font-variant-numeric: tabular-nums; }
.pj-tab::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--ice); transform: scaleX(0); transform-origin: 0 50%; transition: transform .45s var(--ease); }
.pj-tab:hover { color: var(--text-2); }
.pj-tab[aria-pressed="true"] { color: var(--text); }
.pj-tab[aria-pressed="true"]::after { transform: scaleX(1); }

/* ---------- Raum: über die ganze Breite, ohne Rahmen ---------- */
.pj-space-wrap { margin-top: clamp(40px, 5vw, 72px); }
.pj-space {
  position: relative; height: min(84vh, 820px); min-height: 520px; overflow: hidden;
  border-block: 1px solid var(--line); perspective: 1100px; perspective-origin: 50% 45%; cursor: grab; touch-action: pan-y; outline: none;
  background: radial-gradient(55% 55% at 50% 42%, #0e2a3a 0%, #070b13 55%, var(--night) 100%);
}
.pj-space:active { cursor: grabbing; }
.pj-space::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 42%; pointer-events: none;
  background: linear-gradient(0deg, var(--night) 0%, transparent 100%), repeating-linear-gradient(90deg, #8ef3e60d 0 1px, transparent 1px 80px);
}
.pj-world { position: absolute; left: 50%; top: 45%; transform-style: preserve-3d; }
.pane {
  position: absolute; left: 0; top: 0; width: var(--pw, 360px); transform-style: preserve-3d;
  transition: transform 1.1s var(--ease); cursor: pointer; border: 0; background: none; padding: 0; color: var(--text); text-align: left;
}
.pane-in {
  position: relative; border-radius: 14px; overflow: hidden; border: 1px solid #8ef3e655; background: var(--surface-2);
  box-shadow: 0 0 0 1px #ffffff08 inset, 0 30px 60px #0009, 0 0 40px color-mix(in srgb, var(--c) 18%, transparent);
  transition: box-shadow .25s, border-color .25s;
}
.pane:hover .pane-in, .pane:focus-visible .pane-in { border-color: var(--c); box-shadow: 0 0 0 1px var(--c) inset, 0 30px 60px #0009, 0 0 60px color-mix(in srgb, var(--c) 45%, transparent); }
.pane:focus-visible { outline: none; }
.pane-media { position: relative; aspect-ratio: 16 / 9; background: #000; }
.pane-media img, .pane-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pane-media video { opacity: 0; transition: opacity .3s; }
.pane-media video.is-on { opacity: 1; }
/* Projekte mit Reels: Hochformat-Poster nebeneinander */
.pane-media.is-reels { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); grid-template-rows: minmax(0, 1fr); gap: 3px; background: #05070c; overflow: hidden; }
.pane-media.is-reels img { position: relative; inset: auto; width: 100%; height: 100%; min-height: 0; object-fit: cover; }
.pane-media.is-reels .pane-blur { position: absolute; inset: 0; filter: blur(18px) brightness(.5); transform: scale(1.2); }
.pane-media.is-reels .pane-blur + img { position: absolute; top: 0; left: 50%; width: auto; height: 100%; aspect-ratio: 9 / 16; transform: translateX(-50%); z-index: 1; }
.pane-badge { position: absolute; right: 8px; bottom: 8px; z-index: 2; padding: 4px 10px; border-radius: 999px; background: #05070ccc; color: var(--text); font-size: 12px; }
.pane-cap { padding: 12px 14px 14px; display: grid; gap: 3px; }
.pane-cap b { font-family: var(--display); font-weight: 500; font-stretch: 88%; font-size: 20px; line-height: 1.1; }
.pane-cap small { font-size: 13px; color: var(--muted); }
.pane-glare { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, transparent 30%, #ffffff12 45%, transparent 60%); }

/* Kategorien als Textschalter oben im Raum */
.pj-ui { position: absolute; inset: 22px 0 auto; z-index: 2; pointer-events: none; }
.pj-ui > * { pointer-events: auto; }
.pj-chips { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.pj-chip { position: relative; min-height: 40px; padding: 0 0 0 14px; border: 0; background: none; color: var(--muted); font-size: 15px; cursor: pointer; white-space: nowrap; transition: color .2s; }
.pj-chip::before { content: ""; position: absolute; left: 0; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--c, var(--ice)); opacity: .45; transition: opacity .2s, transform .2s; }
.pj-chip:hover { color: var(--text); }
.pj-chip[aria-pressed="true"] { color: var(--text); }
.pj-chip[aria-pressed="true"]::before { opacity: 1; transform: scale(1.3); }

/* Unten: welches Projekt gerade vorne ist, dazu Pfeile */
.pj-bottom { position: absolute; inset: auto 0 22px; z-index: 2; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; pointer-events: none; }
.pj-bottom > * { pointer-events: auto; }
.pj-now { margin: 0; display: grid; gap: 6px; }
.pj-depth { font-family: var(--display); font-weight: 500; font-stretch: 85%; font-size: clamp(22px, 2.2vw, 32px); line-height: 1.05; color: var(--text); }
.pj-depth b { font-weight: 500; color: var(--ice); margin-right: 10px; font-variant-numeric: tabular-nums; }
.pj-depth i { font-style: normal; color: var(--muted); }
.pj-hint { font-size: 13px; color: var(--muted); }
.pj-steps { display: flex; gap: 10px; }
.pj-arrow { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--line-2); background: #05070cb3; color: var(--text); cursor: pointer; transition: border-color .2s, transform .2s var(--ease); }
.pj-arrow svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.pj-arrow:hover { border-color: var(--ice); }
.pj-arrow:active { transform: scale(.95); }

/* ---------- Index ---------- */
.pj-list-wrap { padding-block: clamp(96px, 11vw, 150px) 40px; }
.pj-list-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px; }
.pj-list-head h2 { margin: 0; font-family: var(--display); font-weight: 500; font-stretch: 80%; font-size: clamp(44px, 6vw, 96px); line-height: .92; letter-spacing: -.035em; }
.pj-list-head p { margin: 0; color: var(--muted); font-size: 15px; }
.pj-cols, .pj-row { display: grid; grid-template-columns: minmax(0, 2.3fr) minmax(0, 1.5fr) minmax(0, 1fr) 4.5rem minmax(0, 1fr); gap: 24px; }
.pj-cols { margin-top: 40px; padding-bottom: 12px; border-bottom: 1px solid var(--line-2); font-size: 13px; color: var(--faint); }
.pj-cols span:last-child { text-align: right; }
.pj-list { list-style: none; padding: 0; margin: 0; }
.pj-row {
  position: relative; align-items: baseline; padding: 22px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--text-2);
  font-size: 15px; transition: padding .35s var(--ease), background .3s;
}
.pj-row::before { content: ""; position: absolute; left: 0; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: var(--c); opacity: 0; transform: scale(.4); transition: opacity .25s, transform .35s var(--ease); }
.pj-row-titel { font-family: var(--display); font-weight: 500; font-stretch: 82%; font-size: clamp(26px, 2.6vw, 40px); line-height: 1; letter-spacing: -.02em; color: var(--text); transition: color .25s; }
.pj-row-meta { display: contents; }
.pj-row-format { text-align: right; font-variant-numeric: tabular-nums; }
.pj-row-jahr { font-variant-numeric: tabular-nums; }
.pj-row-thumb { display: none; }
.pj-row:hover, .pj-row:focus-visible { padding-left: 22px; background: linear-gradient(90deg, #ffffff06, transparent 60%); outline: none; }
.pj-row:hover::before, .pj-row:focus-visible::before { opacity: 1; transform: scale(1); }
.pj-row:hover .pj-row-titel, .pj-row:focus-visible .pj-row-titel { color: var(--c); }

/* Vorschau, die über dem Index mit der Maus mitschwebt */
.pj-float { position: fixed; left: 0; top: 0; z-index: 30; width: clamp(280px, 24vw, 380px); border-radius: 12px; overflow: hidden; pointer-events: none; opacity: 0; transition: opacity .25s; box-shadow: 0 30px 70px #000c, 0 0 0 1px color-mix(in srgb, var(--c, #8ef3e6) 55%, transparent); }
.pj-float.is-on { opacity: 1; }

/* ---------- Anfrage ---------- */
.pj-cta { padding-block: clamp(80px, 10vw, 140px); }
.pj-cta .h-statement { font-size: clamp(40px, 5.4vw, 88px); max-width: 18ch; }
.pj-cta-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 30px; margin-top: 40px; }
.pj-link { color: var(--text-2); text-underline-offset: .25em; padding-block: 12px; }
.pj-link:hover { color: var(--text); }

/* ---------- Kinoansicht eines Projekts ---------- */
.pj-sheet { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; background: #03050af5; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); overflow: auto; }
.pj-x { position: fixed; top: 18px; right: 18px; z-index: 2; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--line-2); background: #05070ccc; color: var(--text); cursor: pointer; transition: border-color .2s, transform .3s var(--ease); }
.pj-x svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.pj-x:hover { border-color: var(--ice); transform: rotate(90deg); }
.pj-sheet-in {
  width: min(1360px, 100% - 2 * var(--gutter)); max-height: 100dvh; overflow: auto; padding-block: 80px 48px;
  display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr); gap: clamp(32px, 4vw, 72px); align-items: start; animation: pj-rise .5s var(--ease);
}
@keyframes pj-rise { from { transform: translateY(28px); opacity: 0; } }
.pj-sheet-left { min-width: 0; }
.pj-sheet-media { position: relative; aspect-ratio: 16 / 9; background: #000 center / cover; border-radius: 14px; overflow: hidden; box-shadow: 0 40px 90px #000c; }
.pj-sheet-media video, .pj-sheet-media iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.pj-sheet-media .pj-novideo { position: absolute; left: 14px; bottom: 12px; font-size: 13px; color: var(--text); background: #05070ccc; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-2); text-decoration: none; }
.pj-sheet-body { display: flex; flex-direction: column; gap: 18px; min-width: 0; padding-top: 8px; }
.pj-sheet-cat { margin: 0; font-size: 14px; color: var(--ice); }
.pj-sheet-body h2 { margin: 0; font-family: var(--display); font-weight: 500; font-stretch: 80%; font-size: clamp(40px, 4.6vw, 76px); line-height: .92; letter-spacing: -.035em; text-wrap: balance; }
.pj-sheet-text { color: var(--text-2); margin: 0; font-size: 17px; line-height: 1.55; max-width: 46ch; }
.pj-meta { margin: 6px 0 0; display: grid; }
.pj-meta div { display: flex; justify-content: space-between; gap: 18px; padding-block: 12px; border-top: 1px solid var(--line); font-size: 15px; }
.pj-meta div:last-child { border-bottom: 1px solid var(--line); }
.pj-meta dt { color: var(--muted); }
.pj-meta dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.pj-sheet-actions { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 6px; }
.pj-sheet-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 18px; }
.pj-sheet-nav button { display: grid; gap: 4px; padding: 14px 0 0; border: 0; border-top: 1px solid var(--line-2); background: none; color: var(--text); cursor: pointer; text-align: left; transition: border-color .25s; }
.pj-sheet-nav button:last-child { text-align: right; }
.pj-sheet-nav small { font-size: 13px; color: var(--muted); }
.pj-sheet-nav span { font-family: var(--display); font-weight: 500; font-stretch: 85%; font-size: 20px; line-height: 1.1; }
.pj-sheet-nav button:hover { border-top-color: var(--ice); }

/* Reels in der Kinoansicht */
.pj-sheet-reels { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; padding-top: 16px; }
.pj-reel { margin: 0; display: grid; gap: 8px; }
.pj-reel figcaption { font-size: 13px; line-height: 1.35; color: var(--text-2); }
.pj-reel-media { position: relative; }
.pj-reel video { display: block; width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 12px; background: #000; border: 1px solid var(--line-2); }
.pj-reel-play { position: absolute; inset: 0; display: grid; place-items: center; padding: 0; border: 0; border-radius: 12px; background: transparent; cursor: pointer; }
.pj-reel-play svg { width: 56px; height: 56px; transition: opacity .2s, transform .2s var(--ease); }
.pj-reel-play:hover svg { transform: scale(1.06); }
.pj-reel.is-playing .pj-reel-play svg { opacity: 0; }
.pj-reel.is-playing.is-loading .pj-reel-play svg { opacity: .6; }
.pj-reel.is-playing video { border-color: var(--ice); }

/* Nur Reels: ein Reel gross auf der Bühne, die weiteren als Vorschauen daneben */
.pj-sheet-in.is-reelmode { grid-template-columns: auto minmax(320px, 1fr); }
.pj-sheet-reels.is-stage { display: flex; gap: 14px; padding: 0; align-items: flex-start; }
.pj-stage .pj-reel video { width: auto; height: min(76dvh, 760px); max-width: 100%; box-shadow: 0 40px 90px #000c; }
.pj-stage .pj-reel figcaption { font-size: 15px; color: var(--text); max-width: calc(min(76dvh, 760px) * 9 / 16); }
.pj-stage .pj-reel-play svg { width: 72px; height: 72px; }
.pj-thumbs { display: flex; flex-direction: column; gap: 10px; width: 92px; max-height: min(76dvh, 760px); overflow-y: auto; padding-right: 4px; scrollbar-width: thin; }
.pj-thumbs .pj-reel { flex: none; }
.pj-thumbs .pj-reel figcaption { display: none; }
.pj-thumbs .pj-reel video { border-radius: 8px; opacity: .7; transition: opacity .2s, border-color .2s; }
.pj-thumbs .pj-reel:hover video { opacity: 1; border-color: var(--ice); }
.pj-thumbs .pj-reel-play svg { width: 28px; height: 28px; }

/* ---------- Ohne 3D: Raum ausblenden, Index reicht ---------- */
.no-space .pj-space-wrap { display: none; }
.no-space .pj-list-wrap { padding-top: 56px; }

@media (max-width: 860px) {
  .pj-nav { display: none; }
  .pj-long { display: none; }
  .pj-short { display: inline; }
  .nav .btn-primary { margin-left: auto; }
  .pj-tabs { gap: 4px 18px; }
  .pj-tab { font-size: clamp(26px, 8vw, 36px); }
  .pj-space { --pw: 230px; height: 72vh; min-height: 480px; }
  .pj-chips { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; padding-bottom: 4px; scrollbar-width: none; }
  .pj-chip { flex: 0 0 auto; }
  .pj-hint { display: none; }
  .pj-depth { font-size: 20px; }
  .pj-cols { display: none; }
  .pj-row { grid-template-columns: 116px minmax(0, 1fr); gap: 6px 16px; align-items: center; padding: 16px 0; }
  .pj-row-thumb { display: block; grid-row: span 2; border-radius: 8px; overflow: hidden; }
  .pj-row-thumb .pane-badge { display: none; }
  .pj-row-titel { font-size: 24px; align-self: end; }
  .pj-row-meta { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: 13px; color: var(--muted); align-self: start; }
  .pj-row-meta span:empty { display: none; }
  .pj-row-format { text-align: left; color: var(--text-2); }
  .pj-row-kunde { display: none; }
  .pj-row:hover, .pj-row:focus-visible { padding-left: 0; }
  .pj-sheet { place-items: start center; }
  .pj-sheet-in, .pj-sheet-in.is-reelmode { grid-template-columns: minmax(0, 1fr); padding-block: 76px 40px; }
  .pj-x { top: 12px; right: 12px; width: 46px; height: 46px; }
  .pj-sheet-reels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pj-sheet-reels.is-stage { flex-direction: column; align-items: center; }
  .pj-stage .pj-reel video { height: min(64svh, 600px); }
  .pj-thumbs { flex-direction: row; width: 100%; max-height: none; overflow-x: auto; overflow-y: hidden; padding: 0 0 4px; }
  .pj-thumbs .pj-reel { width: 68px; }
}
@media (prefers-reduced-motion: reduce) {
  .pane { transition: none; }
  .pj-sheet-in { animation: none; }
  .pj-row { transition: none; }
}
