html, body { height: 100%; margin: 0; }
body { overflow: hidden; background: #fff; font-family: "Roboto", system-ui, -apple-system, Segoe UI, Arial, sans-serif; }

/* 3D Hintergrund */
#start3d {
  position: fixed;
  inset: 0;
  z-index: 0;
}
#start3d canvas {
  width: 100vw;
  height: 100vh;
  display: block;
}

/* Overlay */
.ui {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  display: grid;
  place-items: start center;
  padding: 22px 16px 0;
  color: #000;
}

.site-header, .title, .main-nav, .nav, .site-footer,
.projects-strip, .lbe-modal { pointer-events: auto; }

/* Titel – mobile first: 2 Zeilen (wie Screenshot) */
.site-title {
  margin: 0 0 14px 0;
  text-align: center;
  letter-spacing: 0.06em;
  line-height: 0.92;
}
.site-title .w1 {
  display: block;
  font-weight: 900;
  font-size: clamp(36px, 10vw, 64px);
}
.site-title .w2 {
  display: block;
  font-weight: 300;
  font-size: clamp(28px, 9vw, 58px);
}
/* Main Nav */
.nav {
  display: flex;
  justify-content: center;
  gap: 20px;
  list-style: none;
  padding: 0;
  margin: 8px 0 0 0;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .14em;
  align-items: center;
}

.nav a, .nav-btn {
  color: #000;
  text-decoration: none;
  background: transparent;
  border: 0;
  padding: 6px 6px;
  font: inherit;
  cursor: pointer;
}
.nav a:hover, .nav-btn:hover { text-decoration: underline; }

.caret { margin-left: 6px; font-size: 12px; }

/* Projects Strip (kein Hintergrund!) */
.projects-strip {
  position: fixed;
  z-index: 12;
  overflow: hidden;

  /* wird per JS gesetzt:
     top, left, width */
  height: 200px;          /* Bild + Pfeile */
}
.title{
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.projects-track {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  will-change: transform;
  padding-left: 0;
}

/* Card: Titel + quadratisches Cover-Bild */
.project-card {
  width: 160px;
  text-decoration: none;
  color: #000;
  user-select: none;
}
.project-img {
  width: 160px;
  height: 160px;
  border-radius: 14px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: 0 10px 30px rgba(0,0,0,0.16);
}
/* Modal ohne Backlayer: kein dunkler Overlay */
.lbe-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: transparent; /* wichtig */
}

:root{
  --modal-w: 90vw;
  --modal-h: 90vh;
}

.lbe-modal-panel{
  width: var(--modal-w);
  height: var(--modal-h);
  border-radius: 18px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 60px rgba(0,0,0,0.20);
  position: relative;
  overflow: hidden;
}

.lbe-modal-panel.lbe-modal-panel--fullscreen{
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  border-radius: 0;
}

/* Modal Header */
.lbe-modal-header{
  position:absolute;
  left:0;
  right:0;
  top:0;
  height:60px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 18px;
  box-sizing:border-box;
  border-bottom:1px solid rgba(0,0,0,0.08);
  background:rgba(255,255,255,0.7);
  backdrop-filter:blur(8px);
}

.lbe-modal-actions{
  display:flex;
  align-items:center;
  gap:8px;
  flex-shrink:0;
}

/* Info Button */
.lbe-modal-info{
  width:38px;
  height:38px;
  border-radius:999px;
  border:0;
  background:rgba(255,255,255,0.7);
  font-size:16px;
  font-weight:600;
  cursor:pointer;
}

.lbe-modal-fs{
  width:38px;
  height:38px;
  border-radius:999px;
  border:0;
  background:rgba(255,255,255,0.7);
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#000;
  padding:0;
}
.lbe-modal-fs:hover{ background:rgba(255,255,255,0.95); }

/* Body unter Header */
.lbe-modal-body{
  position:absolute;
  top:60px;
  left:0;
  right:0;
  bottom:0;
}

/* Info View */
.lbe-modal-info-view{
  position:absolute;
  inset:0;
  padding:28px;
  overflow:auto;
  font-size:14px;
  line-height:1.6;
}
.lbe-modal-header{
  gap: 10px;
  z-index: 2;
}

.lbe-modal-title{
  margin: 0;
  font-size: 14px;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 600;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-right: 8px;
}

.lbe-modal-close{
  position: relative;
  right: auto;
  top: auto;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,0.7);
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
}
.lbe-modal-close:hover{ background: rgba(255,255,255,0.95); }

.lbe-modal-body{
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  top: 60px; /* exakt Header-Höhe */
}

.lbe-modal-frame{
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: transparent;
}

/* Footer */
.site-footer{
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 11;
  display: flex;
  justify-content: center;
  padding: 14px;
}
.footer-link{
  color: #000;
  text-decoration: none;
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: .85;
}
.footer-link:hover { text-decoration: underline; opacity: 1; }

/* Desktop Tuning */
@media (min-width: 900px) {
  .ui { padding-top: 30px; }
  .nav { font-size: 14px; gap: 22px; }
  .project-card, .project-img { width: 180px; }
  .project-img { height: 180px; }
  .projects-strip { height: 220px; }
}

/* Hidden MUSS immer wirklich unsichtbar sein (falls irgendwo überschrieben) */
[hidden] { display: none !important; }

/* Modal muss klickbar sein – egal was sonst pointer-events macht */
.lbe-modal,
.lbe-modal * { pointer-events: auto !important; }

/* Modal sicher über dem Rest der Seite */
.lbe-modal { z-index: 9999 !important; }

/* ---- Modal Projects View ---- */
.lbe-modal-projects{
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 18px;
  box-sizing: border-box;
}

/* Stripe im Modal ist NICHT fixed */
.projects-strip--modal{
  position: relative;
  left: auto;
  right: auto;
  top: auto;
  height: 200px;
  width: 100%;
  max-width: 980px;
  overflow: visible;
}

/* viewport füllt den Bereich zwischen den Buttons */
.projects-strip--modal .projects-viewport{
  overflow: hidden;
}

/* bisschen Luft nach unten/oben im Panel */
@media (min-width: 900px) {
  .projects-strip--modal{
    max-width: 1100px;
    height: 220px;
  }
}
/* Modal-Stripe: niemals umbrechen */
.projects-strip--modal .projects-track{
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
}

.projects-strip--modal .project-card{
  flex: 0 0 auto;
  display: block;
}
.projects-strip--modal .projects-viewport{
  overflow: hidden;
}
/* Filmleiste: viewport + Pfeile */
.projects-viewport{
  height: 100%;
  overflow: hidden;
}

.strip-btn{
  position: absolute;
  top: 22px;               /* passt zur Card-Höhe */
  width: 30px;
  height: 36px;
  border: 0;
  border-radius: 6px;
  background: rgba(255,255,255,0.65);
  backdrop-filter: blur(8px);
  cursor: pointer;
  z-index: 2;
}
.strip-btn-left{ left: 10px; }
.strip-btn-right{ right: 10px; }

/* Track braucht etwas seitlichen Abstand wegen Buttons */
.projects-track{
  padding-left: 56px;
  padding-right: 56px;
}
.projects-strip { pointer-events: auto; }
