[data-ref-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-ref-reveal].ref-visible {
  opacity: 1;
  transform: translateY(0);
}

.ref-objekt__media[data-ref-reveal] {
  transform: none;
  clip-path: inset(6% 6% 6% 6% round 14px);
  transition:
    opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
    clip-path 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.ref-objekt__media[data-ref-reveal].ref-visible {
  clip-path: inset(0% 0% 0% 0% round 14px);
}


@keyframes refFadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes refSlideFromLeft {
  from { opacity: 0; transform: translateX(-80px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes refLineGrow {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

@keyframes refBgZoom {
  from { transform: scale(1.08); }
  to   { transform: scale(1); }
}

@keyframes refScrollPulse {
  0%, 100% { transform: scaleY(1);   opacity: 0.4; }
  50%      { transform: scaleY(0.5); opacity: 1; }
}

@keyframes refFloat {
  0%   { transform: translate(0, 0); }
  100% { transform: translate(var(--tx, 40px), var(--ty, -40px)); }
}

.ref-hero {
  position: relative;
  min-height: 55vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.ref-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.ref-hero__bg-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  animation: refBgZoom 12s ease-out forwards;
}

.ref-hero__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      to bottom,
      rgba(37, 44, 55, 0.45) 0%,
      rgba(37, 44, 55, 0.78) 60%,
      rgba(37, 44, 55, 0.94) 100%
    );
}

.ref-hero__overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 55% 45% at 50% 65%,
    rgba(193, 203, 184, 0.1) 0%,
    transparent 65%
  );
}

.ref-hero__particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.ref-hero__particle {
  position: absolute;
  border-radius: 50%;
  background: var(--sage);
  animation: refFloat var(--dur, 10s) var(--del, 0s) ease-in-out infinite alternate;
  pointer-events: none;
}

.ref-hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding-top: clamp(7rem, 14vw, 11rem);
  padding-bottom: clamp(3.5rem, 7vw, 5.5rem);
}

.ref-hero__label {
  display: inline-block;
  font-family: 'Thirsty Rough', Georgia, serif;
  font-size: clamp(1.25rem, 1vw + 0.85rem, 1.6rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--sage);
  margin-bottom: 1.25rem;
  animation: refFadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both;
}

.ref-hero__headline {
  font-family: 'Geared Slab', 'Roboto Slab', Georgia, serif;
  font-size: clamp(2.5rem, 5vw + 0.75rem, 4.5rem);
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.03em;
  line-height: 1.06;
  margin-bottom: 1rem;
  animation: refSlideFromLeft 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both;
}

.ref-hero__headline em {
  font-family: 'Thirsty Rough', Georgia, serif;
  font-style: normal;
  font-weight: 700;
  color: var(--sage);
}

.ref-hero__subtitle {
  font-family: 'Lato', sans-serif;
  font-size: clamp(0.95rem, 1.1vw + 0.4rem, 1.15rem);
  font-weight: 300;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.75;
  max-width: 460px;
  margin-inline: auto;
  animation: refFadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.45s both;
}

.ref-hero__line {
  width: 48px;
  height: 3px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 2px;
  margin: 1.75rem auto 0;
  transform-origin: center;
  animation: refLineGrow 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.7s both;
  opacity: 0.6;
}

.ref-hero__scroll {
  position: absolute;
  bottom: 2rem;
  right: clamp(1.5rem, 4vw, 3rem);
  z-index: 3;
  opacity: 0.45;
  transition: opacity 0.3s;
}
@media (hover: hover) { .ref-hero__scroll:hover { opacity: 1; } }

.ref-hero__scroll-line {
  width: 1px;
  height: 55px;
  background: linear-gradient(to bottom, transparent, var(--sage));
  animation: refScrollPulse 2.5s ease-in-out infinite;
}


.ref-stack {
  background: var(--white);
  padding-top: var(--space-xl, 4rem) !important;
  padding-bottom: 0 !important;
}

.ref-stack__header {
  text-align: center;
  max-width: 640px;
  margin-inline: auto;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.ref-stack__header .corp-section-intro {
  margin-inline: auto;
}

.ref-stack__cards {
  position: relative;
}

.ref-stack__card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 420px;
  position: sticky;
  top: 80px;
  background: var(--white);
  border-top: 1px solid var(--shark-08);
  overflow: hidden;
}

.ref-stack__card--reverse {
  direction: rtl;
}

.ref-stack__card--reverse > * {
  direction: ltr;
}

.ref-stack__card:nth-child(2) { box-shadow: 0 -4px 20px rgba(37,44,55,0.06); }
.ref-stack__card:nth-child(3) { box-shadow: 0 -4px 20px rgba(37,44,55,0.08); }
.ref-stack__card:nth-child(4) { box-shadow: 0 -4px 20px rgba(37,44,55,0.1); }
.ref-stack__card:nth-child(5) { box-shadow: 0 -4px 20px rgba(37,44,55,0.12); }

.ref-stack__card:last-of-type {
  margin-bottom: 60vh;
}

.ref-stack__image {
  overflow: hidden;
}

.ref-stack__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

@media (hover: hover) { .ref-stack__card:hover .ref-stack__image img {
  transform: scale(1.03);
} }

.ref-stack__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2rem, 5vw, 4rem);
  position: relative;
  overflow: hidden;
}

.ref-stack__step {
  position: absolute;
  top: -0.15em;
  right: 0.1em;
  font-family: 'Geared Slab', 'Roboto Slab', Georgia, serif;
  font-size: clamp(8rem, 15vw, 14rem);
  font-weight: 800;
  color: rgba(193,203,184,0.18);
  line-height: 1;
  pointer-events: none;
  z-index: 0;
}

.ref-stack__card--reverse .ref-stack__step {
  right: auto;
  left: 0.1em;
}

.ref-stack__label {
  font-family: 'Thirsty Rough', Georgia, serif;
  font-size: clamp(1.25rem, 1vw + 0.85rem, 1.6rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--sage);
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}

.ref-stack__title {
  font-family: 'Geared Slab', 'Roboto Slab', Georgia, serif;
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 700;
  color: var(--shark);
  margin-bottom: 0.75rem;
  line-height: 1.15;
  position: relative;
  z-index: 1;
}

.ref-stack__text {
  font-family: 'Lato', sans-serif;
  font-size: 0.95rem;
  color: var(--shark-60);
  line-height: 1.7;
  max-width: 400px;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
}

.ref-stack__stats {
  display: flex;
  gap: 2rem;
  position: relative;
  z-index: 1;
}

.ref-stack__stat {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.ref-stack__stat-value {
  font-family: 'Geared Slab', 'Roboto Slab', Georgia, serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--shark);
}

.ref-stack__stat-label {
  font-family: 'Lato', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--shark-60);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ref-stack__spacer {
  height: 1px;
}

@media (max-width: 768px) {
  .ref-stack__card {
    grid-template-columns: 1fr;
    min-height: auto;
    top: 64px;
  }
  .ref-stack__card--reverse {
    direction: ltr;
  }
  .ref-stack__image {
    aspect-ratio: 16/10;
  }
  .ref-stack__card:last-of-type {
    margin-bottom: 40vh;
  }
  .ref-stack__step {
    font-size: 6rem;
  }
}


/* Legacy, ungenutzt */
.ref-portfolio {
  background: var(--white);
  padding-block: clamp(5rem, 9vw, 8rem);
}

.ref-portfolio__header {
  margin-bottom: clamp(3rem, 6vw, 5rem);
}

.ref-portfolio__header-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: end;
}

.ref-portfolio__headline {
  font-family: 'Geared Slab', 'Roboto Slab', Georgia, serif;
  font-size: clamp(2rem, 3vw + 0.5rem, 3rem);
  font-weight: 800;
  color: var(--shark);
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.ref-portfolio__intro {
  font-family: 'Lato', sans-serif;
  font-size: 0.92rem;
  color: var(--shark-60);
  line-height: 1.75;
}

.ref-objekt {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(2.5rem, 5vw, 5rem);
  align-items: center;
  padding-block: clamp(2.5rem, 5vw, 4rem);
  border-bottom: 1px solid var(--shark-08);
}

.ref-objekt:last-child { border-bottom: none; }

.ref-objekt--flipped {
  grid-template-columns: 1fr 1.2fr;
}

.ref-objekt--flipped .ref-objekt__media {
  order: 1;
}

.ref-objekt--flipped .ref-objekt__content {
  order: 0;
}

.ref-objekt__image {
  aspect-ratio: 3/2;
  border-radius: 14px;
  overflow: hidden;
  background: #d8d8d8;
  position: relative;
  box-shadow: 0 10px 36px rgba(37, 44, 55, 0.08);
}

.ref-objekt__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: relative;
  z-index: 1;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
@media (hover: hover) { .ref-objekt__image:hover img { transform: scale(1.04); } }

.ref-objekt__image::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #e0e0e0, #c8c8c8);
  z-index: 0;
}

.ref-objekt__meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.ref-objekt__type {
  font-family: 'Lato', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cobalt);
}

.ref-objekt__divider {
  width: 24px;
  height: 2px;
  background: var(--sage);
  border-radius: 1px;
  opacity: 0.6;
}

.ref-objekt__location {
  font-family: 'Lato', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--shark-60);
}

.ref-objekt__title {
  font-family: 'Geared Slab', 'Roboto Slab', Georgia, serif;
  font-size: clamp(1.4rem, 2vw + 0.4rem, 1.85rem);
  font-weight: 800;
  color: var(--shark);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 0.85rem;
}

.ref-objekt__desc {
  font-family: 'Lato', sans-serif;
  font-size: 0.88rem;
  color: var(--shark-60);
  line-height: 1.75;
  margin-bottom: 1.5rem;
}

.ref-objekt__stats {
  display: flex;
  gap: 2rem;
}

.ref-objekt__stat {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.ref-objekt__stat-value {
  font-family: 'Geared Slab', 'Roboto Slab', Georgia, serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--shark);
}

.ref-objekt__stat-label {
  font-family: 'Lato', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--shark-60);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}


.ref-testimonials {
  background: var(--off-white, #f8f6f3);
  padding-block: clamp(4rem, 8vw, 7rem);
}

.ref-testimonials__layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}

.ref-testimonials__intro {
  padding-top: clamp(1rem, 3vw, 3rem);
}

.ref-testimonials__headline {
  font-family: 'Geared Slab', 'Roboto Slab', Georgia, serif;
  font-size: clamp(2rem, 3.5vw + 0.5rem, 3.2rem);
  font-weight: 800;
  color: var(--shark);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.ref-testimonials__sub {
  font-family: 'Lato', sans-serif;
  font-size: clamp(0.95rem, 1vw + 0.3rem, 1.05rem);
  color: var(--shark-60);
  line-height: 1.6;
}

.ref-testimonials__carousel {
  position: relative;
  overflow: hidden;
}

.ref-testimonials__track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.ref-testimonials__slide {
  min-width: 100%;
  padding: 0 2px;
}

.ref-testimonials__card {
  background: var(--white);
  border: 1px solid var(--shark-08);
  border-radius: 14px;
  padding: clamp(1.75rem, 3vw, 2.5rem);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.ref-testimonials__card-top {
  display: flex;
  align-items: center;
}

.ref-testimonials__quote-icon {
  flex-shrink: 0;
}

.ref-testimonials__quote {
  font-family: 'Lato', sans-serif;
  font-size: clamp(0.95rem, 1.1vw + 0.2rem, 1.1rem);
  color: var(--shark);
  line-height: 1.7;
}

.ref-testimonials__author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ref-testimonials__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--shark-08);
  flex-shrink: 0;
}

.ref-testimonials__name {
  display: block;
  font-family: 'Lato', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--shark);
  line-height: 1.3;
}

.ref-testimonials__role {
  display: block;
  font-family: 'Lato', sans-serif;
  font-size: 0.78rem;
  color: var(--shark-60);
  line-height: 1.3;
}

.ref-testimonials__controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.5rem;
  padding: 0 2px;
}

.ref-testimonials__dots {
  display: flex;
  gap: 0.5rem;
}

.ref-testimonials__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(37,44,55,0.15);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease;
}

.ref-testimonials__dot--active {
  background: var(--shark);
  transform: scale(1.25);
}

@media (hover: hover) { .ref-testimonials__dot:hover {
  background: var(--shark-60);
} }

.ref-testimonials__arrows {
  display: flex;
  gap: 0.5rem;
}

.ref-testimonials__arrow {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--shark-40, rgba(37,44,55,0.4));
  background: none;
  color: var(--shark);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

@media (hover: hover) { .ref-testimonials__arrow:hover {
  border-color: var(--cobalt);
  color: var(--white);
  background: var(--cobalt);
  transform: scale(1.05);
} }

@media (max-width: 768px) {
  .ref-testimonials__layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}


@keyframes refSlideLeft {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-50%, 0, 0); }
}

@keyframes refSlideRight {
  from { transform: translate3d(-50%, 0, 0); }
  to   { transform: translate3d(0, 0, 0); }
}

.ref-gallery {
  background: var(--white);
  padding-block: clamp(5rem, 9vw, 8rem);
  overflow: hidden;
}

.ref-gallery__header {
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.ref-gallery__headline {
  font-family: 'Geared Slab', 'Roboto Slab', Georgia, serif;
  font-size: clamp(1.75rem, 2.5vw + 0.5rem, 2.5rem);
  font-weight: 800;
  color: var(--shark);
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 0.35rem;
}

.ref-gallery__sub {
  font-family: 'Lato', sans-serif;
  font-size: 0.88rem;
  color: var(--shark-60);
}

.ref-slider {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.ref-slider__row {
  overflow: hidden;
  contain: layout style paint;
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 5%,
    black 95%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 5%,
    black 95%,
    transparent 100%
  );
}

.ref-slider__track {
  display: flex;
  gap: 1rem;
  width: max-content;
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* Tempo an den Ferien-Referenzen-Slider angepasst (ruhiger): dort 7,0s bzw.
   5,83s pro Motiv. Bei 11 Motiven je Reihe -> links 77s, rechts 64s. */
.ref-slider__row[data-direction="left"] .ref-slider__track {
  animation: refSlideLeft 77s linear infinite;
}

.ref-slider__row[data-direction="right"] .ref-slider__track {
  animation: refSlideRight 64s linear infinite;
}

.ref-slider__slide {
  flex: 0 0 auto;
  width: clamp(300px, 26vw, 450px);
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  overflow: hidden;
  background: #d8d8d8;
  position: relative;
}

.ref-slider__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: relative;
  z-index: 1;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (hover: hover) { .ref-slider__slide:hover img {
  transform: scale(1.06);
} }

.ref-slider__slide::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #e0e0e0, #c8c8c8);
  z-index: 0;
}


.ref-cta {
  position: relative;
  padding-block: clamp(6rem, 11vw, 10rem);
  overflow: hidden;
}

.ref-cta__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.ref-cta__bg-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}

.ref-cta__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      to bottom,
      rgba(37, 44, 55, 0.7) 0%,
      rgba(37, 44, 55, 0.9) 100%
    );
}

.ref-cta__overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 50% 45% at 50% 50%,
    rgba(193, 203, 184, 0.08) 0%,
    transparent 70%
  );
}

.ref-cta__inner {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 520px;
  margin-inline: auto;
}

.ref-cta__label {
  display: inline-block;
  font-family: 'Lato', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 1rem;
}

.ref-cta__headline {
  font-family: 'Geared Slab', 'Roboto Slab', Georgia, serif;
  font-size: clamp(1.75rem, 3vw + 0.5rem, 2.75rem);
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin-bottom: 1rem;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

.ref-cta__text {
  font-family: 'Lato', sans-serif;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.7;
  max-width: 400px;
  margin-inline: auto;
  margin-bottom: 2.25rem;
}

.ref-cta__actions {
  display: flex;
  gap: 0.85rem;
  justify-content: center;
  flex-wrap: wrap;
}


@media (max-width: 1024px) {
  .ref-portfolio__header-layout { grid-template-columns: 1fr; gap: 1rem; }
  .ref-testimonials__grid { grid-template-columns: 1fr; max-width: 500px; margin-inline: auto; }
  .ref-slider__slide { width: clamp(220px, 28vw, 320px); }
}

@media (max-width: 768px) {
  .ref-hero { min-height: 45vh; }
  .ref-hero__headline { font-size: clamp(2rem, 9vw, 3rem); }
  .ref-hero__scroll { display: none; }

  .ref-objekt,
  .ref-objekt--flipped {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .ref-objekt--flipped .ref-objekt__media { order: 0; }
  .ref-objekt--flipped .ref-objekt__content { order: 1; }

  .ref-slider__slide { width: clamp(200px, 55vw, 280px); }
  .ref-slider { gap: 0.75rem; }

  .ref-cta__actions { flex-direction: column; }
  .ref-cta__actions .btn { width: 100%; justify-content: center; text-align: center; }

  .ref-objekt__media[data-ref-reveal] {
    clip-path: none;
    transform: translateY(28px);
  }
  .ref-objekt__media[data-ref-reveal].ref-visible {
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  [data-ref-reveal] {
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
  }
  .ref-hero__label,
  .ref-hero__headline,
  .ref-hero__subtitle,
  .ref-hero__line {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .ref-hero__bg-image { animation: none; }
  .ref-hero__scroll-line { animation: none; }
  .ref-hero__particle { animation: none; }
  .ref-slider__track { animation: none !important; }
}