/* Home page refinements, mainly for phones and touch screens. */

/* Hero headlines use the same white/gold pairing as the solutions page. */
.main-slider__one-item__content .main-slider__title {
  color: var(--ogency-white);
}
.main-slider__title .main-slider__title-accent {
  color: var(--ogency-base);
}

/* Client logos: the white treatment turns logos with an opaque black plate
   into a solid white box. Show those in grayscale on their own plate instead. */
.page-wrapper .main-slider > .container .client-carousel__one .client-carousel__one__item img[src$="brands/1.svg"],
.page-wrapper .main-slider > .container .client-carousel__one .client-carousel__one__item img[src$="brands/1.svg"]:hover {
  -webkit-filter: grayscale(1) contrast(1.15) brightness(1.2) !important;
  filter: grayscale(1) contrast(1.15) brightness(1.2) !important;
}

/* Service cards: touch screens have no hover, so the card in the middle of
   the viewport opens on its own (see assets/js/home.js). */
@media (hover: none), (pointer: coarse) {
  .feature-one__item.is-active .feature-one__item__content {
    transform: scale(1, 0);
    transform-origin: bottom center;
  }
  .feature-one__item.is-active .feature-one__item__hover-content {
    transform: scale(1, 1);
  }
  .feature-one__item__hover-content > * {
    opacity: 0;
    transform: translate3d(0, 10px, 0);
    transition: opacity 360ms ease, transform 520ms cubic-bezier(.22, 1, .36, 1);
  }
  .feature-one__item.is-active .feature-one__item__hover-content > * {
    opacity: 1;
    transform: none;
  }
  .feature-one__item.is-active .feature-one__item__hover-content > :nth-child(1) { transition-delay: 180ms; }
  .feature-one__item.is-active .feature-one__item__hover-content > :nth-child(2) { transition-delay: 260ms; }
  .feature-one__item.is-active .feature-one__item__hover-content > :nth-child(3) { transition-delay: 340ms; }
}

/* Contact: the form carries the section on smaller screens; the decorative
   photo collage below it only added a long scroll. */
@media (max-width: 991px) {
  .contact-one .col-lg-6:has(> .ogency-stretch-element-inside-column) { display: none; }
  .contact-one .contact-one__left .section-title { margin-bottom: 28px; }
}

@media (max-width: 767px) {
  /* Less empty space between the header and the hero headline. */
  .main-slider__one-item { padding-top: 116px; }
}

@media (prefers-reduced-motion: reduce) {
  .feature-one__item__hover-content > * { transition: none; }
}

/* Leistungsfinder ("Die passenden Lösungen"): the visitor picks what slows
   them down, a gold frame glides to the choice and the matching services
   move to the top of the list (FLIP in assets/js/home.js). Without JS the
   question is hidden and the plain list remains. */
.lf {
  --lf-rule: rgba(var(--ogency-white-rgb), .1);
  --lf-muted: rgba(var(--ogency-white-rgb), .66);
  --lf-ease: cubic-bezier(.2, .8, .2, 1);
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 64px;
  align-items: start;
  margin-top: 8px;
}
.lf:not(.is-live) { grid-template-columns: minmax(0, 1fr); }
.lf:not(.is-live) .lf__ask,
.lf:not(.is-live) .lf__summary { display: none; }

/* Question and options */
.lf__ask { min-width: 0; margin: 0; padding: 0; border: 0; }
@media (min-width: 992px) {
  .lf__ask { position: sticky; top: 120px; }
}
.lf__question {
  float: none;
  width: 100%;
  margin: 0 0 22px;
  padding: 0;
  color: var(--ogency-white);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.3;
}
.lf__options { position: relative; display: grid; gap: 8px; }
.lf__option { position: relative; display: block; margin: 0; cursor: pointer; }
.lf__option input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.lf__option span {
  position: relative;
  z-index: 1;
  display: block;
  padding: 16px 20px 16px 48px;
  border: 1px solid var(--lf-rule);
  color: var(--lf-muted);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
  pointer-events: none;
  transition: color 300ms ease, border-color 300ms ease;
}
.lf__option span::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 50%;
  width: 12px;
  height: 12px;
  margin-top: -6px;
  border: 1px solid rgba(var(--ogency-white-rgb), .35);
  transition: background-color 300ms ease, border-color 300ms ease, transform 300ms var(--lf-ease);
}
.lf__option:hover span { color: var(--ogency-white); border-color: rgba(var(--ogency-white-rgb), .26); }
.lf__option input:checked + span { color: var(--ogency-white); border-color: transparent; }
.lf__option input:checked + span::before {
  border-color: var(--ogency-base);
  background-color: var(--ogency-base);
  transform: rotate(45deg) scale(.8);
}
.lf__option input:focus-visible + span { outline: 2px solid var(--ogency-base); outline-offset: 3px; }

/* The frame that glides to the chosen option. */
.lf__marker {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  border: 1px solid rgba(var(--ogency-base-rgb), .7);
  background: rgba(var(--ogency-base-rgb), .06);
  box-shadow: inset 3px 0 0 var(--ogency-base);
  pointer-events: none;
  transition: transform 520ms var(--lf-ease), width 520ms var(--lf-ease), height 520ms var(--lf-ease);
}
.lf__marker.is-instant { transition: none; }

/* Results */
.lf__summary {
  margin: 0 0 14px;
  color: var(--lf-muted);
  font-size: 15px;
  line-height: 1.5;
}
.lf__list { margin: 0; border-top: 1px solid var(--lf-rule); }
.lf-svc {
  position: relative;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 40px;
  gap: 22px;
  align-items: center;
  padding: 24px 8px 24px 20px;
  border-bottom: 1px solid var(--lf-rule);
  background-color: transparent;
  transition: opacity 420ms ease, background-color 300ms ease;
}
/* Gold edge that draws down on matching services. */
.lf-svc::before {
  content: "";
  position: absolute;
  left: 0;
  top: -1px;
  bottom: -1px;
  width: 2px;
  background: var(--ogency-base);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 520ms var(--lf-ease);
}
.lf-svc.is-match::before { transform: scaleY(1); transition-delay: 220ms; }
.lf-svc.is-muted { opacity: .42; }
.lf-svc.is-muted:is(:hover, :focus-within) { opacity: 1; }

.lf-svc__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid var(--lf-rule);
  color: var(--ogency-base);
  font-size: 26px;
  transition: border-color 300ms ease;
}
.lf-svc__icon > span { line-height: 1; }
.lf-svc.is-match .lf-svc__icon { border-color: rgba(var(--ogency-base-rgb), .6); }

.lf-svc__title { margin: 0 0 6px; font-size: 21px; font-weight: 600; line-height: 1.3; }
.lf-svc__title a { color: var(--ogency-white); transition: color 300ms ease; }
/* The title link covers the whole row: one link per service, one tap target. */
.lf-svc__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.lf-svc__title a:focus-visible { outline: none; }
.lf-svc:has(.lf-svc__title a:focus-visible) { outline: 2px solid var(--ogency-base); outline-offset: -2px; }

/* Base text and "why it helps" share one grid cell and cross-fade. */
.lf-svc__copy { display: grid; }
.lf-svc__copy > p {
  grid-area: 1 / 1;
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  transition: opacity 360ms ease, transform 420ms var(--lf-ease);
}
.lf-svc__text { color: var(--lf-muted); }
.lf-svc__why { color: var(--ogency-white); opacity: 0; transform: translateY(8px); }
.lf-svc.is-match .lf-svc__text { opacity: 0; transform: translateY(-8px); }
.lf-svc.is-match .lf-svc__why { opacity: 1; transform: none; transition-delay: 160ms; }

.lf-svc__arrow {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--lf-rule);
  color: var(--ogency-white);
  font-size: 14px;
  transition: border-color 300ms ease, color 300ms ease;
}
.lf-svc__arrow span { transition: transform 360ms var(--lf-ease); }
.lf-svc:is(:hover, :focus-within) { background-color: rgba(var(--ogency-white-rgb), .03); }
.lf-svc:is(:hover, :focus-within) .lf-svc__title a { color: var(--ogency-base); }
.lf-svc:is(:hover, :focus-within) .lf-svc__arrow { border-color: var(--ogency-base); color: var(--ogency-base); }
.lf-svc:is(:hover, :focus-within) .lf-svc__arrow span { transform: rotate(-90deg); }

.lf__cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 28px;
}
.lf__cta-text { margin: 0; max-width: 46ch; color: var(--lf-muted); font-size: 15px; line-height: 1.6; }
.lf__cta-btn { flex: none; }
/* The themed section darkens .ogency-btn; this one is the primary action. */
.project-one--overview-themed .lf .lf__cta-btn { background-color: var(--ogency-base); color: var(--ogency-white); }
.project-one--overview-themed .lf .lf__cta-btn:hover { color: var(--ogency-base); }

.svc-section .project-one__all-btn { border: 1px solid rgba(var(--ogency-white-rgb), .18); }

@media (max-width: 1199px) {
  .lf { gap: 40px; }
}
@media (max-width: 991px) {
  .lf { grid-template-columns: minmax(0, 1fr); gap: 36px; margin-top: 0; }
  .lf__options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lf__option span { height: 100%; padding: 14px 14px 14px 38px; font-size: 15px; }
  .lf__option span::before { left: 14px; }
}
@media (max-width: 767px) {
  .lf__question { font-size: 19px; margin-bottom: 16px; }
  .lf-svc { grid-template-columns: 44px minmax(0, 1fr); gap: 16px; padding: 20px 4px 20px 16px; }
  .lf-svc__icon { width: 44px; height: 44px; font-size: 22px; }
  .lf-svc__arrow { display: none; }
  .lf-svc__title { font-size: 18px; }
  .lf__cta { flex-direction: column; align-items: flex-start; gap: 16px; }
  .project-one--overview-themed .project-one__mobile-action { margin-top: 30px; }
}
@media (max-width: 400px) {
  .lf__options { grid-template-columns: minmax(0, 1fr); }
}
@media (hover: none), (pointer: coarse) {
  .lf-svc.is-muted:is(:hover, :focus-within) { opacity: .42; }
}

@media (prefers-reduced-motion: reduce) {
  .lf__marker,
  .lf__option span,
  .lf__option span::before,
  .lf-svc,
  .lf-svc::before,
  .lf-svc__copy > p,
  .lf-svc__arrow span { transition: none; }
}

/* "Partner auf Augenhöhe": the photo opens like a viewfinder while the section
   is pinned, then the statement slides in line by line. Scroll-scrubbed via
   --reveal and --text (0..1) from assets/js/home.js; without JS or with reduced
   motion it is a plain image with its caption. */
.hb-reveal {
  --ix: 26%;
  --iy: 20%;
  --reveal: 1;
  --text: 1;
  --inv: calc(1 - var(--reveal));
  position: relative;
  margin-top: 8px;
}
.hb-reveal__frame {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: var(--ogency-black);
}
.hb-reveal__frame img {
  display: block;
  width: 100%;
  height: auto;
}
.hb-reveal__frame::before,
.hb-reveal__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
/* Darkens the photo while it is still a small window. */
.hb-reveal__frame::before { background: #050506; opacity: calc(var(--inv) * .28); }
/* Keeps the caption legible. */
.hb-reveal__frame::after {
  background:
    linear-gradient(0deg, rgba(5, 5, 6, .94) 0%, rgba(5, 5, 6, .62) 34%, rgba(5, 5, 6, .12) 64%, rgba(5, 5, 6, 0) 80%),
    linear-gradient(90deg, rgba(5, 5, 6, .72) 0%, rgba(5, 5, 6, .22) 46%, rgba(5, 5, 6, 0) 66%);
  opacity: calc(.3 + var(--text) * .7);
}
.hb-reveal__caption {
  position: absolute;
  left: clamp(20px, 6vw, 110px);
  right: clamp(20px, 6vw, 110px);
  bottom: clamp(32px, 9vh, 110px);
  z-index: 2;
  max-width: 760px;
  text-align: left;
}
.hb-reveal__line { display: block; overflow: hidden; }
.hb-reveal__line > span { display: inline-block; }
.hb-reveal__eyebrow {
  margin-bottom: 18px;
  color: var(--ogency-base);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.hb-reveal__headline {
  color: var(--ogency-white);
  font-size: clamp(42px, 6.4vw, 104px);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -.045em;
  padding-bottom: .06em;
}
.hb-reveal__headline em { font-style: normal; color: var(--ogency-base); }
.hb-reveal__text {
  max-width: 460px;
  margin-top: 22px;
  color: rgba(var(--ogency-white-rgb), .8);
  font-size: clamp(15px, 1.2vw, 18px);
  line-height: 1.7;
}
.hb-reveal__corner { display: none; }

/* Live, pinned version. */
.page-wrapper:has(.hb-reveal--live) { overflow: clip; }
.hb-reveal--live {
  height: 240vh;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-top: 0;
}
.hb-reveal--live .hb-reveal__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}
.hb-reveal--live .hb-reveal__frame {
  position: absolute;
  inset: 0;
  clip-path: inset(calc(var(--inv) * var(--iy)) calc(var(--inv) * var(--ix)));
}
.hb-reveal--live .hb-reveal__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  transform: scale(calc(1.3 - var(--reveal) * .3));
  transform-origin: 50% 55%;
  will-change: transform;
}
.hb-reveal--live .hb-reveal__line > span {
  transform: translate3d(0, calc((1 - var(--l)) * 115%), 0);
  opacity: calc(var(--l) * 1.6);
  will-change: transform;
}
.hb-reveal--live .hb-reveal__eyebrow { --l: clamp(0, calc(var(--text) * 2.6), 1); }
.hb-reveal--live .hb-reveal__headline:nth-child(2) { --l: clamp(0, calc((var(--text) - .14) * 2.6), 1); }
.hb-reveal--live .hb-reveal__headline:nth-child(3) { --l: clamp(0, calc((var(--text) - .28) * 2.6), 1); }
.hb-reveal--live .hb-reveal__text { --l: clamp(0, calc((var(--text) - .44) * 2.2), 1); }

/* Viewfinder corners that travel outwards with the opening frame. */
.hb-reveal--live .hb-reveal__corner {
  display: block;
  position: absolute;
  z-index: 3;
  width: 30px;
  height: 30px;
  border: 0 solid var(--ogency-base);
  opacity: clamp(0, calc(var(--inv) * 1.6), 1);
  pointer-events: none;
}
.hb-reveal__corner--tl { top: calc(var(--inv) * var(--iy) - 14px); left: calc(var(--inv) * var(--ix) - 14px); border-top-width: 2px !important; border-left-width: 2px !important; }
.hb-reveal__corner--tr { top: calc(var(--inv) * var(--iy) - 14px); right: calc(var(--inv) * var(--ix) - 14px); border-top-width: 2px !important; border-right-width: 2px !important; }
.hb-reveal__corner--bl { bottom: calc(var(--inv) * var(--iy) - 14px); left: calc(var(--inv) * var(--ix) - 14px); border-bottom-width: 2px !important; border-left-width: 2px !important; }
.hb-reveal__corner--br { bottom: calc(var(--inv) * var(--iy) - 14px); right: calc(var(--inv) * var(--ix) - 14px); border-bottom-width: 2px !important; border-right-width: 2px !important; }

@media (max-width: 767px) {
  .hb-reveal { --ix: 8%; --iy: 27%; }
  .hb-reveal--live { height: 210vh; }
  .hb-reveal__frame::after {
    background: linear-gradient(0deg, rgba(5, 5, 6, .92) 0%, rgba(5, 5, 6, .55) 42%, rgba(5, 5, 6, 0) 72%);
  }
  .hb-reveal__eyebrow { font-size: 11px; margin-bottom: 14px; }
  .hb-reveal__text { margin-top: 16px; }
  /* Without the pinned stage the caption sits below the photo on phones. */
  .hb-reveal:not(.hb-reveal--live) .hb-reveal__caption { position: static; margin-top: 24px; }
  .hb-reveal:not(.hb-reveal--live) .hb-reveal__frame::after { display: none; }
}

/* Service cards share one crop regardless of their source dimensions. */
.feature-one__item__img img {
  display: block;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.feature-one__item__img img[src*="prozess-bausteine"] {
  object-position: 28% center;
}

/* Contact (index): the photo no longer stretches over the whole form height.
   It keeps a calm, limited height and stays in view while the form scrolls. */
@media (min-width: 992px) {
  /* clip (not hidden) on the ancestors so the photo can stay sticky */
  .contact-one,
  .contact-one .ogency-stretch-element-inside-column { overflow: clip; }
  .contact-one .ogency-stretch__image {
    position: sticky;
    top: 110px;
    height: min(760px, calc(100vh - 150px));
  }
  .contact-one .ogency-stretch__image img { object-position: 60% 30%; }
  .contact-one .ogency-stretch__image__angle-middle { border-width: 190px 0 250px 130px; }
}

/* Contact form (index only, About keeps the roomier version): compact enough
   that heading and complete form fit into one desktop viewport. */
.contact-one .contact-one__left { padding: 72px 0; }
.contact-one .contact-one__left .section-title { margin-bottom: 24px; }
.contact-one .contact-one__form-box.contact-form--refined { padding: 26px 28px 24px; }
.contact-one .contact-form--refined .contact-one__form-intro { margin-bottom: 18px; font-size: 14px; line-height: 1.6; }
.contact-one .contact-form--refined .contact-one__input-box { margin-bottom: 12px; }
.contact-one .contact-form--refined .contact-one__input-box > label { margin-bottom: 6px; }
.contact-one .contact-one__form-box.contact-form--refined .contact-one__input-box :is(input, select) { height: 46px; padding: 0 14px; font-size: 15px; }
.contact-one .contact-one__form-box.contact-form--refined .contact-one__input-box select { padding-right: 40px; background-position: right 14px center; }
.contact-one .contact-one__form-box.contact-form--refined .contact-one__input-box textarea { height: 110px; padding: 12px 14px; font-size: 15px; }
.contact-one .contact-form--refined .contact-one__form-hint { margin: -2px 0 14px; font-size: 12.5px; }
/* privacy note and submit share one row */
.contact-one .contact-form--refined .row > div:has(.text-message-box) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 20px;
}
.contact-one .contact-form--refined .row > div:has(.text-message-box) .text-message-box { grid-column: 1 / -1; }
.contact-one .contact-form--refined .contact-one__privacy { margin: 2px 0 0; font-size: 12.5px; line-height: 1.5; }
.contact-one .contact-form--refined .contact-one__btn-box { margin: 0; }
.contact-one .contact-form--refined .contact-form__submit { padding: 13px 30px 14px; }
@media (max-width: 991px) {
  .contact-one .contact-one__left { padding: 64px 0 48px; }
}
@media (max-width: 575px) {
  .contact-one .contact-one__form-box.contact-form--refined { padding: 22px 18px; }
  .contact-one .contact-form--refined .row > div:has(.text-message-box) { grid-template-columns: minmax(0, 1fr); row-gap: 16px; }
  .contact-one .contact-form--refined .contact-form__submit { width: 100%; }
}
/* Short desktop screens (e.g. 1366×768 laptops): a little tighter still. */
@media (min-width: 992px) and (max-height: 860px) {
  .contact-one .contact-one__left { padding: 48px 0; }
  .contact-one .contact-one__left .section-title { margin-bottom: 18px; }
  .contact-one .contact-one__left .section-title__title { font-size: clamp(30px, 2.6vw, 38px); }
  .contact-one .contact-one__form-box.contact-form--refined { padding: 20px 24px; }
  .contact-one .contact-form--refined .contact-one__form-intro { margin-bottom: 12px; }
  .contact-one .contact-form--refined .contact-one__input-box { margin-bottom: 10px; }
  .contact-one .contact-one__form-box.contact-form--refined .contact-one__input-box :is(input, select) { height: 42px; }
  .contact-one .contact-one__form-box.contact-form--refined .contact-one__input-box textarea { height: 84px; }
  .contact-one .contact-form--refined .contact-one__form-hint { margin-bottom: 10px; }
}

/* Imagefilm in der Über-uns-Sektion: nur das Video, rechteckig (statt rundem Bild), groß als Bühne.
   Die beiden animierten Bälle bleiben als Hintergrundeffekt hinter dem Video. */
.about-one__thumb--video .about-one__thumb__round--top,
.about-one__thumb--video .about-one__thumb__round--bottom {
  z-index: 0;
}

.about-one__video {
  position: relative;
  z-index: 1;
  margin: 0;
}

.about-one__video .hero-video__stage {
  box-shadow: 0 40px 80px -36px rgba(0, 0, 0, .9);
}

/* helles Poster: Verlauf nur unten hinter der Beschriftung */
.about-one__video .hero-video__shade {
  background: linear-gradient(0deg, rgba(5, 5, 6, .86) 0%, rgba(5, 5, 6, .6) 24%, rgba(5, 5, 6, 0) 52%);
}

.about-one__video .hero-video__media {
  transition: transform .9s cubic-bezier(.2, .8, .2, 1);
}

.about-one__video:not(.is-playing):has(.hero-video__play:hover, .hero-video__play:focus-visible) .hero-video__media {
  transform: scale(1.03);
}

.about-one__video figcaption {
  display: flex;
  justify-content: flex-end;
  padding-top: 18px;
}

.about-one__values {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 0;
  margin: 26px 0 0;
}

.about-one__values li {
  color: rgba(255, 255, 255, .72);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  line-height: 1.5;
  text-transform: uppercase;
}

.about-one__values li + li::before {
  content: "";
  display: inline-block;
  width: 1px;
  height: 12px;
  margin: 0 16px;
  vertical-align: -1px;
  background: rgba(255, 255, 255, .22);
}

.about-one__values li:last-child {
  color: var(--ogency-base);
}

@media (min-width: 992px) {
  .about-one__row--video {
    align-items: center;
  }

  .about-one__row--video .about-one__content {
    padding-left: clamp(8px, 1.6vw, 28px);
  }
}

/* auf breiten Bildschirmen läuft das Video etwas in den linken Rand */
@media (min-width: 1400px) {
  .about-one__thumb--video {
    margin-left: -64px;
  }
}

/* kleiner Ball: auf dem Desktop links neben dem Video, darunter rechts oben hinter dem Video */
@media (max-width: 991px) {
  .about-one__thumb--video .about-one__thumb__round--bottom {
    left: auto;
    right: -22px;
    bottom: auto;
    top: -22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .about-one__video .hero-video__media {
    transition: none;
  }
}
