/* ============================================
   STUDIO DA — Projekte & Musterprojekt Pages
   Portfolio grid, filters, timeline, slider
   ============================================ */

/* ===========================================
   FILTER BAR
   =========================================== */
.filter-bar {
  position: sticky;
  top: 72px;
  z-index: calc(var(--z-nav) - 1);
  background: var(--color-glass);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-md) 0;
  transition: box-shadow var(--duration-normal);
}

.filter-bar.has-shadow {
  box-shadow: var(--shadow-sm);
}

.filter-bar__inner {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.filter-bar__inner::-webkit-scrollbar {
  display: none;
}

.filter-btn {
  padding: 0.6rem 1.4rem;
  font-family: var(--font-body);
  font-size: var(--text-caption);
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  background: transparent;
  color: var(--color-text-secondary);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-full);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--duration-normal) var(--ease-out);
}

.filter-btn:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.filter-btn--active {
  background: var(--color-text);
  color: var(--color-bg);
  border-color: var(--color-text);
}

.filter-btn--active:hover {
  background: var(--color-text);
  color: var(--color-bg);
  opacity: 0.85;
}

/* Result count */
.filter-bar__count {
  margin-left: auto;
  font-size: var(--text-caption);
  color: var(--color-text-tertiary);
  white-space: nowrap;
  padding-right: var(--space-xs);
}


/* ===========================================
   PROJECT GRID
   =========================================== */
.projects-section {
  padding: var(--section-pad) 0;
  min-height: 60vh;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
}

@media (max-width: 1024px) {
  .project-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .project-grid {
    grid-template-columns: 1fr;
  }
}

/* Project Card */
.project-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all var(--duration-normal) var(--ease-out);
  opacity: 1;
  transform: scale(1) translateY(0);
}

.project-card:hover {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-lg);
  transform: translateY(-6px);
}

.project-card.hiding {
  opacity: 0;
  transform: scale(0.95) translateY(10px);
  pointer-events: none;
}

.project-card.hidden {
  display: none;
}

.project-card.showing {
  animation: cardShow 0.5s var(--ease-out) forwards;
}

@keyframes cardShow {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.project-card__image {
  aspect-ratio: 16/10;
  overflow: hidden;
  position: relative;
}

.project-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-out);
}

.project-card:hover .project-card__image img {
  transform: scale(1.06);
}

.project-card__badge {
  position: absolute;
  top: var(--space-md);
  left: var(--space-md);
  padding: 0.3rem 0.8rem;
  background: var(--color-glass-dark);
  backdrop-filter: blur(10px);
  color: var(--color-accent);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border-on-dark);
}

.project-card__body {
  padding: var(--space-lg) var(--space-xl) var(--space-xl);
}

.project-card__title {
  font-family: var(--font-display);
  font-size: var(--text-h4);
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: var(--space-sm);
  line-height: var(--leading-snug);
}

.project-card__meta {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  font-size: var(--text-caption);
  color: var(--color-text-tertiary);
}

.project-card__meta-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.project-card__meta-item svg {
  width: 14px;
  height: 14px;
  opacity: 0.6;
}

.project-card__meta-divider {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--color-text-tertiary);
  opacity: 0.4;
}


/* ===========================================
   MUSTERPROJEKT TEASER
   =========================================== */
.mp-teaser {
  position: relative;
  padding: var(--space-5xl) 0;
  background: #3A3630;
  overflow: hidden;
}

.mp-teaser::before {
  content: '';
  position: absolute;
  top: -30%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--color-accent-glow) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.4;
}

.mp-teaser::after {
  content: '';
  position: absolute;
  bottom: -20%;
  right: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(176,137,104,0.10) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(80px);
}

.mp-teaser__content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.mp-teaser__label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 0.4rem 1rem;
  background: var(--color-accent-light);
  border: 1px solid rgba(176,137,104,0.25);
  border-radius: var(--radius-full);
  font-size: var(--text-caption);
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-2xl);
}

.mp-teaser__title {
  font-size: var(--text-h1);
  color: var(--color-text-on-dark);
  line-height: var(--leading-tight);
  margin-bottom: var(--space-lg);
}

.mp-teaser__text {
  font-size: var(--text-body-lg);
  color: var(--color-text-on-dark-secondary);
  line-height: var(--leading-relaxed);
  max-width: 55ch;
  margin-bottom: var(--space-2xl);
}

.mp-teaser__btn-wrap {
  display: flex;
  gap: var(--space-md);
  align-items: center;
}


/* ===========================================
   MUSTERPROJEKT — CINEMATIC HERO
   =========================================== */
.mp-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--color-bg-dark);
}

.mp-hero__bg {
  position: absolute;
  inset: 0;
}

.mp-hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.08);
  animation: heroZoom 20s var(--ease-out) forwards;
}

.mp-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(17,17,17,0.9) 0%,
    rgba(17,17,17,0.5) 40%,
    rgba(17,17,17,0.3) 100%
  );
}

.mp-hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: var(--space-4xl) var(--gutter);
  max-width: 900px;
}

.mp-hero__overline {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  margin-bottom: var(--space-xl);
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out) 0.3s forwards;
  color: rgba(255, 255, 255, 0.8);
  font-size: var(--text-overline);
  font-weight: 600;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
}

.mp-hero__overline::before,
.mp-hero__overline::after {
  content: '';
  width: 40px;
  height: 1px;
  background: var(--color-accent);
  opacity: 0.5;
}

.mp-hero__title {
  font-size: clamp(2.5rem, 6vw, 5.5rem);
  color: var(--color-text-on-dark);
  line-height: 1.05;
  margin-bottom: var(--space-xl);
  letter-spacing: -0.03em;
  text-align: center;
}

.mp-hero__title .line {
  display: block;
  overflow: hidden;
}

.mp-hero__title .line span {
  display: block;
  transform: translateY(120%);
  animation: lineReveal 1s var(--ease-out) forwards;
}

.mp-hero__title .line:nth-child(2) span {
  animation-delay: 0.15s;
}

.mp-hero__subtitle {
  font-size: var(--text-body-lg);
  color: var(--color-text-on-dark-secondary);
  letter-spacing: var(--tracking-wide);
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out) 0.6s forwards;
}

.mp-hero__scroll {
  position: absolute;
  bottom: var(--space-2xl);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  color: var(--color-text-on-dark-secondary);
  font-size: var(--text-caption);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out) 1s forwards;
  z-index: 2;
}

.mp-hero__scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--color-accent), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}


/* ===========================================
   PROJECT STECKBRIEF (Fact Sheet)
   =========================================== */
.steckbrief {
  padding: var(--section-pad) 0;
  background: var(--color-bg);
}

.steckbrief__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
}

@media (max-width: 1024px) {
  .steckbrief__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .steckbrief__grid {
    grid-template-columns: 1fr;
  }
}

.steckbrief__item {
  padding: var(--space-xl) var(--space-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: all var(--duration-normal) var(--ease-out);
  position: relative;
  overflow: hidden;
}

.steckbrief__item::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: width var(--duration-slow) var(--ease-out);
}

.steckbrief__item:hover::before {
  width: 100%;
}

.steckbrief__item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}

.steckbrief__label {
  font-size: var(--text-caption);
  font-weight: 600;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-text-tertiary);
  margin-bottom: var(--space-xs);
}

.steckbrief__value {
  font-family: var(--font-display);
  font-size: var(--text-h4);
  font-weight: 500;
  color: var(--color-text);
  line-height: var(--leading-snug);
}

.steckbrief__value--accent {
  color: var(--color-accent);
}


/* ===========================================
   INTERACTIVE TIMELINE
   =========================================== */
.timeline-section {
  padding: var(--section-pad) 0;
  background: var(--color-bg-alt);
}

.timeline {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
}

/* Vertical line */
.timeline::before {
  content: '';
  position: absolute;
  left: 40px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--color-border);
}

/* Progress fill */
.timeline__progress {
  position: absolute;
  left: 40px;
  top: 0;
  width: 2px;
  height: 0;
  background: var(--color-accent);
  transition: height 0.3s var(--ease-out);
  z-index: 1;
}

.timeline__phase {
  position: relative;
  padding-left: 100px;
  padding-bottom: var(--space-4xl);
  opacity: 1;
  transform: translateY(0);
  transition: all var(--duration-slower) var(--ease-out);
}

/* JS-enhanced: hide phases for reveal animation */
.timeline--js .timeline__phase {
  opacity: 0;
  transform: translateY(30px);
}

.timeline__phase:last-child {
  padding-bottom: 0;
}

.timeline__phase.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Phase number circle */
.timeline__number {
  position: absolute;
  left: 20px;
  top: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--color-bg-alt);
  border: 2px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text-tertiary);
  z-index: 2;
  transition: all var(--duration-normal) var(--ease-out);
}

.timeline__phase.visible .timeline__number {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-bg-dark);
  box-shadow: 0 0 0 6px var(--color-accent-light);
}

.timeline__header {
  margin-bottom: var(--space-lg);
}

.timeline__title {
  font-family: var(--font-display);
  font-size: var(--text-h3);
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: var(--space-xs);
}

.timeline__duration {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--text-caption);
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-accent);
}

.timeline__duration-bar {
  display: block;
  height: 4px;
  background: var(--color-accent-light);
  border-radius: var(--radius-full);
  margin-top: var(--space-sm);
  overflow: hidden;
  max-width: 300px;
}

.timeline__duration-fill {
  height: 100%;
  background: var(--color-accent);
  border-radius: var(--radius-full);
  width: 0;
  transition: width 1s var(--ease-out) 0.3s;
}

.timeline__phase.visible .timeline__duration-fill {
  width: 100%;
}

.timeline__body {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
  transition: all var(--duration-normal) var(--ease-out);
}

.timeline__body:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--color-accent-light);
}

.timeline__description {
  font-size: var(--text-body);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-lg);
}

.timeline__description p + p {
  margin-top: var(--space-md);
}

.timeline__deliverables {
  margin-bottom: var(--space-lg);
}

.timeline__deliverables-title {
  font-size: var(--text-small);
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-text);
  margin-bottom: var(--space-sm);
}

.timeline__deliverables-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.timeline__deliverable {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.8rem;
  background: var(--color-accent-light);
  border-radius: var(--radius-full);
  font-size: var(--text-caption);
  font-weight: 500;
  color: var(--color-accent);
}

.timeline__deliverable::before {
  content: '✓';
  font-size: 0.7rem;
  font-weight: 700;
}

.timeline__image {
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 16/9;
}

.timeline__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 768px) {
  .timeline::before {
    left: 20px;
  }

  .timeline__progress {
    left: 20px;
  }

  .timeline__number {
    left: 0;
    width: 38px;
    height: 38px;
    font-size: 0.9rem;
  }

  .timeline__phase {
    padding-left: 60px;
    padding-bottom: var(--space-3xl);
  }
}


/* ===========================================
   BEFORE / AFTER SLIDER
   =========================================== */
.ba-slider-section {
  padding: var(--section-pad) 0;
  background: var(--color-bg-dark);
}

.ba-slider {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  aspect-ratio: 16/9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: col-resize;
  user-select: none;
  -webkit-user-select: none;
}

.ba-slider__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ba-slider__img--before {
  z-index: 1;
  filter: grayscale(1) brightness(0.7) contrast(1.2) sepia(0.3);
}

.ba-slider__img--after {
  z-index: 2;
  clip-path: inset(0 0 0 50%);
}

.ba-slider__handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  background: var(--color-accent);
  z-index: 3;
  transform: translateX(-50%);
  box-shadow: 0 0 12px rgba(176,137,104,0.25);
}

.ba-slider__handle::before,
.ba-slider__handle::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 0;
  height: 0;
  border: 6px solid transparent;
}

.ba-slider__handle::before {
  right: 100%;
  margin-right: 6px;
  margin-top: -6px;
  border-right-color: var(--color-accent);
}

.ba-slider__handle::after {
  left: 100%;
  margin-left: 6px;
  margin-top: -6px;
  border-left-color: var(--color-accent);
}

.ba-slider__knob {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
  transition: transform var(--duration-fast);
}

.ba-slider:active .ba-slider__knob {
  transform: translate(-50%, -50%) scale(1.1);
}

.ba-slider__knob svg {
  width: 24px;
  height: 24px;
  color: var(--color-bg-dark);
}

.ba-slider__label {
  position: absolute;
  top: var(--space-lg);
  z-index: 4;
  padding: 0.4rem 1rem;
  background: var(--color-glass-dark);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-sm);
  font-size: var(--text-caption);
  font-weight: 600;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-text-on-dark);
  border: 1px solid var(--color-border-on-dark);
}

.ba-slider__label--before {
  left: var(--space-lg);
}

.ba-slider__label--after {
  right: var(--space-lg);
  color: var(--color-accent);
}


/* ===========================================
   KEY NUMBERS
   =========================================== */
.key-numbers {
  padding: var(--section-pad) 0;
  background: var(--color-bg);
}

.key-numbers__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-lg);
}

@media (max-width: 1024px) {
  .key-numbers__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 640px) {
  .key-numbers__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.key-number {
  text-align: center;
  padding: var(--space-xl);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  transition: all var(--duration-normal) var(--ease-out);
}

.key-number:hover {
  border-color: var(--color-accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.key-number__value {
  font-family: var(--font-display);
  font-size: var(--text-h2);
  font-weight: 500;
  color: var(--color-accent);
  line-height: 1;
  margin-bottom: var(--space-xs);
}

.key-number__unit {
  font-family: var(--font-body);
  font-size: var(--text-small);
  font-weight: 400;
}

.key-number__label {
  font-size: var(--text-caption);
  color: var(--color-text-tertiary);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}


/* ===========================================
   MASONRY GALLERY
   =========================================== */
.gallery-section {
  padding: var(--section-pad) 0;
  background: var(--color-bg-alt);
}

.gallery-grid {
  columns: 3;
  column-gap: var(--space-lg);
}

@media (max-width: 1024px) {
  .gallery-grid {
    columns: 2;
  }
}

@media (max-width: 640px) {
  .gallery-grid {
    columns: 1;
  }
}

.gallery-item {
  break-inside: avoid;
  margin-bottom: var(--space-lg);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  position: relative;
}

.gallery-item img {
  width: 100%;
  display: block;
  transition: transform var(--duration-slow) var(--ease-out);
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(17,17,17,0);
  transition: background var(--duration-normal);
}

.gallery-item:hover::after {
  background: rgba(17,17,17,0.15);
}

.gallery-item__zoom {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  opacity: 0;
  z-index: 2;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--duration-normal) var(--ease-out);
}

.gallery-item:hover .gallery-item__zoom {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.gallery-item__zoom svg {
  width: 18px;
  height: 18px;
  color: var(--color-bg-dark);
}


/* ===========================================
   MUSTERPROJEKT CTA
   =========================================== */
.mp-cta {
  position: relative;
  padding: var(--space-5xl) 0;
  background: var(--color-bg-dark);
  overflow: hidden;
}

.mp-cta::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -15%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--color-accent-glow) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
}

.mp-cta__content {
  position: relative;
  z-index: 1;
  text-align: center;
}

.mp-cta__title {
  font-size: var(--text-h1);
  color: var(--color-text-on-dark);
  margin-bottom: var(--space-md);
}

.mp-cta__text {
  font-size: var(--text-body-lg);
  color: var(--color-text-on-dark-secondary);
  max-width: 50ch;
  margin: 0 auto var(--space-2xl);
}


/* ===========================================
   PAGE HERO ADJUSTMENT FOR PROJEKTE
   =========================================== */
.page-hero--projekte .page-hero__title {
  max-width: 22ch;
}

/* ===========================================
   TRUST PROOF & PROMISES — Responsive
   =========================================== */
@media (width <= 768px) {
  .trust-proof__grid {
    grid-template-columns: 1fr !important;
  }
}
