* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ── Skip Link (Accessibility) ── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  padding: 0.5rem 1rem;
  background: #101010;
  color: #fff;
  border-radius: 4px;
  z-index: 9999;
  font-size: 0.9rem;
  text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 1rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:root {
  --bg: #E4E4E8;
  --lift-zone: 5vh;
  --w-full: 960px;                              /* Volle Breite (2 Spalten) */
  --w-half: calc((var(--w-full) - 45px) / 2);   /* Halbe Breite (1 Spalte) */
}

html {
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  font-family: "Space Grotesk", "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: #101010;
}

/* ── Header ── */
.header-wrap {
  position: relative;
  height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.header-inner {
  max-width: 480px;
  width: 100%;
}

.header-line {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.15;
}

p.header-line {
  font-weight: 400;
}

/* ── Scroll area ── */
.scroll {
  padding: 0 2rem 30vh;
}

/* ── Panel ── */
.panel {
  padding: var(--lift-zone) 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: calc(var(--w-full) + 4rem);
  margin-left: auto;
  margin-right: auto;
}

/* ── Neuro Card (Base) ── */
.neuro-card {
  max-width: var(--w-half);
  width: 100%;
  padding: 2.5rem;
  border-radius: 6px;
  background: var(--bg);
  will-change: box-shadow;

  box-shadow:
    calc(var(--lift, 0) * -14px)
    calc(var(--lift, 0) * -14px)
    calc(var(--lift, 0) * 40px)
    rgba(255, 255, 255, var(--lift, 0)),

    calc(var(--lift, 0) * 14px)
    calc(var(--lift, 0) * 14px)
    calc(var(--lift, 0) * 40px)
    rgba(140, 140, 160, calc(var(--lift, 0) * 0.5));
}

.neuro-card h2 {
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
  transform: scale(calc(0.95 + var(--fade, 0) * 0.05));
  transform-origin: left top;
}

.neuro-card p {
  font-size: 1rem;
  line-height: 1.6;
  color: #5a5a5a;
  transform: scale(calc(0.95 + var(--fade, 0) * 0.05));
  transform-origin: left top;
}

/* ── Zitate ── */
.quote-intro {
  font-size: 0.85rem;
  color: #999;
  margin-bottom: 0.25rem;
}

.quote {
  font-family: "Playfair Display", Georgia, serif;
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.5;
  color: #3a3a3a;
  border-left: 2px solid #c0c0c4;
  padding-left: 1rem;
  margin: 0.5rem 0;
  transform: scale(calc(0.95 + var(--fade, 0) * 0.05));
  transform-origin: left top;
}

/* ── Portrait ── */
.portrait {
  float: left;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0.25rem 1rem 0.5rem 0;
  shape-outside: circle(50%);
}

/* ── Text Gallery Card ── */
.text-gallery-card {
  max-width: var(--w-full);
  padding: 0;
  position: relative;
}

.text-gallery-track {
  display: flex;
  overflow-x: scroll;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  cursor: grab;
}

.text-gallery-track::-webkit-scrollbar {
  display: none;
}

.text-gallery-slide {
  width: 100%;
  min-width: 100%;
  flex-shrink: 0;
  padding: 2.5rem;
  scroll-snap-align: start;
  box-sizing: border-box;
}

.text-gallery-card .gallery-dots {
  padding: 0 0 1.5rem;
}

/* ── Lately at ── */
.latelyat-card {
  max-width: var(--w-full);
}

.latelyat-marquee {
  overflow: hidden;
  padding-block: 8px;
  width: 100%;
  margin-top: 1.5rem;
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.latelyat-track {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  width: max-content;
  will-change: transform;
}

.latelyat-logo {
  flex: 0 0 220px;
  width: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 64px;
}

.latelyat-logo img {
  display: block;
  height: auto;
  width: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  opacity: 0.4;
}

.latelyat-sep {
  flex-shrink: 0;
  color: rgba(0, 0, 0, 0.15);
  font-size: 1.5rem;
  font-weight: 300;
  user-select: none;
}

/* ── Skills Card ── */
.skills-card {
  max-width: var(--w-full);
}

.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  transform: scale(calc(0.95 + var(--fade, 0) * 0.05));
  transform-origin: left top;
}

.skill-pill {
  padding: 0.45rem 1rem;
  border-radius: 50px;
  font-size: 0.85rem;
  color: #5a5a5a;
  background: var(--bg);
  box-shadow:
    -3px -3px 6px rgba(255, 255, 255, 0.7),
    3px 3px 6px rgba(140, 140, 160, 0.25);
}

/* ── Experience List ── */
.experience-list {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1.25rem;
}

.experience-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.exp-agency {
  font-size: 1rem;
  font-weight: 600;
  color: #101010;
}

.exp-role {
  font-size: 0.9rem;
  color: #5a5a5a;
}

.exp-year {
  font-size: 0.8rem;
  color: #999;
}

/* ── Marquee Card ── */
.marquee-card {
  max-width: var(--w-full);
  padding: 1.5rem;
  overflow: hidden;
}

/* ── Moodfilm Card ── */
.moodfilm-card {
  max-width: var(--w-full);
  padding: 0;
  overflow: hidden;
  background: transparent;
  line-height: 0;
  box-shadow: none;
}

.moodfilm {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
}

.moodfilm-card .video-player video {
  width: 100%;
  height: auto;
  display: block;
}

.video-label {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.8);
  text-transform: uppercase;
  pointer-events: none;
  z-index: 4;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.marquee-track {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  overflow: hidden;
}

.marquee-content {
  display: inline-flex;
  white-space: nowrap;
  will-change: transform;
}

.marquee-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100px;
  height: 100px;
  border-radius: 6px;
  background: transparent;
  flex-shrink: 0;
  padding: 1rem;
  margin-right: 0.75rem;
}

.marquee-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  opacity: 0.35;
}


/* ── Gallery Grid (2 Spalten Desktop, 1 Spalte Mobile) ── */
.panel-galleries {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 45px;
}

/* ── Gallery Card ── */
.gallery-card {
  max-width: none;
  padding: 1rem;
  position: relative;
}

.gallery-track {
  display: flex;
  gap: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  border-radius: 6px;
  cursor: grab;
  align-items: flex-start;
  transition: height 0.3s ease;
}

.gallery-track::-webkit-scrollbar {
  display: none;
}

.gallery-slide {
  position: relative;
  flex: 0 0 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.gallery-slide img,
.gallery-slide video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
}

/* ── Custom Video Player ── */
.video-player {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  line-height: 0;
}
.video-player video {
  border-radius: 0;
}

.video-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.12);
  cursor: pointer;
  transition: opacity 0.3s;
  z-index: 2;
}
.video-player.playing .video-play-overlay {
  opacity: 0;
  pointer-events: none;
}
.video-play-overlay svg {
  width: 48px;
  height: 48px;
  fill: #fff;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3));
}

.video-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.75rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.45));
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 3;
}
.video-player:hover .video-controls,
.video-player.paused .video-controls {
  opacity: 1;
}

.video-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #fff;
  padding: 0.15rem;
  opacity: 0.9;
  display: flex;
  align-items: center;
}
.video-btn:hover { opacity: 1; }
.video-btn svg {
  width: 18px;
  height: 18px;
  fill: #fff;
}

.video-progress {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  position: relative;
}
.video-progress-fill {
  height: 100%;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.85);
  width: 0%;
  pointer-events: none;
}

.gallery-cover .cover-logo {
  width: auto;
  height: auto;
  border-radius: 0;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

.gallery-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding-top: 1rem;
  z-index: 2;
}

.gallery-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  cursor: pointer;
  border-radius: 50%;
  background: var(--bg);
  box-shadow:
    inset 2px 2px 4px rgba(140, 140, 160, 0.4),
    inset -2px -2px 4px rgba(255, 255, 255, 0.7);
  transition: box-shadow 0.25s, transform 0.25s;
}

.gallery-dot.active {
  transform: scale(1.3);
  box-shadow:
    inset 3px 3px 5px rgba(140, 140, 160, 0.5),
    inset -3px -3px 5px rgba(255, 255, 255, 0.8);
}

/* ── Vimeo Embed ── */
.vimeo-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 default, überschrieben per JS */
  border-radius: 6px;
  overflow: hidden;
}

.vimeo-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 6px;
}

/* ── Gallery Cover Slide ── */
.gallery-cover .cover-inner {
  aspect-ratio: 1 / 1;
  width: 100%;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  position: relative;
  container-type: inline-size;
  transform: scale(calc(0.95 + var(--fade, 0) * 0.05));
  transform-origin: center center;
}

.gallery-cover .cover-logo {
  width: 45%;
  height: 30%;
  object-fit: contain;
}

.gallery-cover .cover-title {
  font-size: clamp(3rem, 20cqi, 7rem);
  font-weight: 300;
  color: rgba(255, 255, 255, 0.9);
  text-align: center;
  line-height: 1.1;
}

.gallery-cover .cover-bottom {
  position: absolute;
  bottom: 2rem;
  left: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.gallery-cover .cover-tags {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.85);
  text-align: center;
  line-height: 1.8;
}

.gallery-cover .cover-text {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  line-height: 1.6;
}

/* ── Slide Caption Overlay ── */
.gallery-slide[data-caption] {
  position: relative;
}

.gallery-slide[data-caption]::after {
  content: attr(data-caption);
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 0.75rem 1rem 2rem;
  background: linear-gradient(rgba(0, 0, 0, 0.45), transparent);
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  line-height: 1.4;
  text-align: left;
  pointer-events: none;
}

/* ── Detail Slide (Branding etc.) ── */
.gallery-slide-detail {
  display: flex;
  align-items: center;
  justify-content: center;
}

.detail-inner {
  width: 100%;
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.detail-logo {
  max-width: 60%;
  max-height: 200px;
  object-fit: contain;
  border-radius: 0 !important;
}

.detail-text {
  font-size: 0.95rem !important;
  line-height: 1.7 !important;
  color: #5a5a5a !important;
  text-align: center;
  transform: none !important;
}

/* ── Contact Card ── */
.contact-card {
  max-width: 480px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.9rem 1.2rem;
  border: none;
  border-radius: 6px;
  background: var(--bg);
  font-family: inherit;
  font-size: 0.95rem;
  color: #101010;
  box-shadow:
    inset 4px 4px 8px rgba(140, 140, 160, 0.25),
    inset -4px -4px 8px rgba(255, 255, 255, 0.7);
  outline: none;
  transition: box-shadow 0.2s;
}

.contact-form input:focus,
.contact-form textarea:focus {
  box-shadow:
    inset 2px 2px 4px rgba(140, 140, 160, 0.3),
    inset -2px -2px 4px rgba(255, 255, 255, 0.8);
}

.contact-form textarea {
  resize: vertical;
}

.contact-form button {
  padding: 0.9rem 2rem;
  border: none;
  border-radius: 6px;
  background: var(--bg);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: #101010;
  cursor: pointer;
  box-shadow:
    -4px -4px 10px rgba(255, 255, 255, 0.8),
    4px 4px 10px rgba(140, 140, 160, 0.35);
  transition: box-shadow 0.2s, transform 0.15s;
}

.contact-form button:hover {
  transform: translateY(-1px);
  box-shadow:
    -5px -5px 12px rgba(255, 255, 255, 0.9),
    5px 5px 12px rgba(140, 140, 160, 0.4);
}

.contact-form button:active {
  transform: translateY(0);
  box-shadow:
    inset 2px 2px 5px rgba(140, 140, 160, 0.3),
    inset -2px -2px 5px rgba(255, 255, 255, 0.7);
}

/* ── Language Switch ── */
.panel-switch {
  padding: 0 2rem;
  min-height: auto;
}

.lang-switch {
  display: flex;
  justify-content: center;
}

.lang-track {
  width: 68px;
  height: 30px;
  padding: 0;
  border: none;
  font: inherit;
  border-radius: 50px;
  background: var(--bg);
  box-shadow:
    inset 4px 4px 8px rgba(140, 140, 160, 0.5),
    inset -4px -4px 8px rgba(255, 255, 255, 0.6);
  position: relative;
  cursor: pointer;
}

.lang-label {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.6rem;
  font-weight: 700;
  color: #aaa;
  user-select: none;
  pointer-events: none;
  transition: opacity 0.3s;
}

/* EN-Label links, DE-Label rechts */
.lang-label--en {
  left: 10px;
}
.lang-label--de {
  right: 10px;
}

/* Default: EN aktiv → Kugel links, EN verdeckt, DE sichtbar rechts */
.lang-label--en {
  opacity: 0;
}
.lang-label--de {
  opacity: 1;
}

/* DE aktiv → Kugel rechts, DE verdeckt, EN sichtbar links */
.lang-switch.lang-de .lang-label--en {
  opacity: 1;
}
.lang-switch.lang-de .lang-label--de {
  opacity: 0;
}

.lang-ball {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #f4f4f8, #d0d0d6 60%, #b8b8c0);
  box-shadow:
    3px 4px 8px rgba(100, 100, 120, 0.5),
    -2px -2px 5px rgba(255, 255, 255, 0.6),
    inset -2px -2px 4px rgba(140, 140, 160, 0.25),
    inset 2px 2px 4px rgba(255, 255, 255, 0.7);
  transition: left 0.3s ease;
  z-index: 1;
}

.lang-switch.lang-de .lang-ball {
  left: 41px;
}

/* ── Contact Success ── */
.contact-success {
  text-align: center;
  font-size: 1.1rem;
  color: #555;
  padding: 2rem 0;
}

/* ── Footer ── */
.site-footer {
  text-align: center;
  padding: 2rem;
  font-size: 0.8rem;
  color: #999;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .panel {
    padding: var(--lift-zone) 1rem;
  }

  .scroll {
    padding: 0 1rem 25vh;
  }

  .neuro-card {
    padding: 1.5rem;
  }

  .experience-list {
    grid-template-columns: 1fr;
  }

  .marquee-card {
    padding: 1rem;
  }

  .moodfilm-card {
    border-radius: 0;
  }

  .moodfilm {
    border-radius: 0;
  }

  .panel:has(.moodfilm-card) {
    padding-left: 0;
    padding-right: 0;
  }

  .marquee-logo {
    width: 75px;
    height: 75px;
    padding: 0.6rem;
  }

  .portrait {
    width: 100px;
    height: 100px;
  }

  .text-gallery-slide {
    padding: 1.5rem;
  }

  .gallery-card {
    padding: 1rem;
  }

}

/* V2: keyboard access and motion preferences without changing the default layout. */
[hidden] { display: none !important; }
.video-play-overlay { border: 0; padding: 0; width: 100%; color: inherit; }
.video-player:focus-within .video-controls { opacity: 1; }
button:focus-visible, [role="slider"]:focus-visible,
.contact-form input:focus-visible, .contact-form textarea:focus-visible {
  outline: 2px solid #333; outline-offset: 3px;
}
.video-player button:focus-visible, .video-progress:focus-visible {
  outline-color: white; outline-offset: -2px;
}
.video-progress:focus-visible { outline-offset: 4px; }
.contact-status { margin-top: 1rem; }
.contact-status--error { color: #8b2020 !important; }
.contact-form button:disabled { opacity: 0.6; cursor: wait; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .neuro-card h2, .neuro-card p, .quote { transform: none; }
  .contact-form button:hover { transform: none; }
}
/* Measure text slides at their natural height instead of stretching to the track. */
.text-gallery-track { align-items: flex-start; }
/* Optical sizing: equal slots, individual sizes, original aspect ratios. */
.latelyat-logo--prettynasty img { height: 60px; transform: translateY(-8px); }
.latelyat-logo--grabarz img { width: 220px; }
.latelyat-logo--jobradloop img { width: 210px; }
.latelyat-logo--you img { height: 36px; }

/* Analytics consent: equal choices, readable at desktop and mobile sizes. */
#analytics-settings { display: block; margin: 0.75rem auto 0; border: 0; padding: 0.4rem; background: transparent; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; }
.analytics-consent { position: fixed; z-index: 100; bottom: 1rem; right: 1rem; width: min(520px, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); overflow-y: auto; padding: 1.5rem; border: 1px solid #c5c5cc; border-radius: 12px; background: #eeeef1; color: #242424; box-shadow: 0 8px 35px #0002; font-size: 0.9rem; line-height: 1.5; }
.analytics-consent h2 { font-size: 1.1rem; margin-bottom: 0.75rem; }
.analytics-consent details { margin-top: 0.75rem; }
.analytics-consent summary { cursor: pointer; }
.analytics-consent details p { margin: 0.75rem 0; }
.analytics-consent a { color: inherit; text-decoration: underline; }
.analytics-actions { display: flex; gap: 0.75rem; margin-top: 1rem; }
.analytics-actions button { flex: 1; min-height: 44px; padding: 0.65rem 0.8rem; border: 1px solid #777; border-radius: 6px; background: transparent; color: inherit; font: inherit; font-weight: 600; cursor: pointer; }
.analytics-actions button:hover { background: #dddde3; }
@media (max-width: 380px) { .analytics-actions { flex-direction: column; } }
