/*
 * Shared editorial treatment for Kontakt, Karriere, Team and Leistungen.
 * Loaded after the page styles so states and page-specific refinements stay
 * consistent without changing the existing content or interactions.
 */

.team-page main,
.services-page main {
  overflow: clip;
}

/* Identical title, paragraph and action spacing on all four primary pages. */
.hero-copy-layout h1 {
  margin-bottom: 24px;
}

.hero-copy-layout .lede {
  margin-bottom: 0;
}

.hero-copy-layout .button-row {
  margin-top: 32px;
}

/* Remove the decorative adhesive-dot motif from all primary hero visuals. */
.contact-hub-hero__visual::before,
.career-studio-hero__gallery::before,
.editorial-hero__visual::before,
.services-page .hero-depth-ring::after {
  display: none;
}

.contact-hub-hero__visual,
.career-studio-hero__gallery {
  transform: none;
}

/* Softer card feedback: retain the paper surface and add only a quiet tint. */
.contact-path-card:focus-within,
.career-role-card:focus-within {
  border-color: rgba(158, 175, 159, 0.38);
  background:
    radial-gradient(circle at 100% 0, rgba(158, 175, 159, 0.14), transparent 42%),
    rgba(255, 255, 252, 0.97);
  color: var(--ink);
  box-shadow: 0 22px 48px -32px rgba(49, 67, 55, 0.44);
  transform: translateY(-3px);
}

.contact-path-card:focus-within .contact-path-card__number,
.career-role-card:focus-within .career-role-card__number {
  color: rgba(193, 140, 93, 0.82);
}

.contact-path-card:focus-within .eyebrow,
.contact-path-card:focus-within p:not(.eyebrow),
.career-role-card:focus-within .eyebrow,
.career-role-card:focus-within h3 span,
.career-role-card:focus-within p:not(.eyebrow) {
  color: var(--grass);
}

.contact-path-card:focus-within .button--primary,
.career-role-card:focus-within .button--primary {
  background: var(--moss);
  color: var(--moss-ink);
}

.contact-path-card:focus-within .button--outline {
  border-color: var(--clay);
  color: #9b683e;
}

.contact-path-card:focus-within .text-link {
  color: var(--moss-dark);
}

/* Team and services use the same spacious split-page heading. */
.editorial-hero {
  position: relative;
  padding-block: clamp(58px, 8vw, 104px) clamp(78px, 9vw, 124px);
  overflow: hidden;
  background:
    linear-gradient(120deg, rgba(240, 235, 229, 0.58), transparent 52%),
    var(--paper);
}

.editorial-hero .ambient--moss {
  top: -130px;
  left: -180px;
}

.editorial-hero .ambient--clay {
  right: -140px;
  bottom: -150px;
}

.editorial-hero__grid {
  position: relative;
  z-index: 2;
  align-items: center;
  gap: clamp(48px, 7vw, 92px);
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
}

.editorial-hero__copy {
  min-width: 0;
}

.editorial-hero__copy h1 {
  max-width: 740px;
  margin-bottom: 22px;
  font-size: clamp(3.65rem, 5.8vw, 5.7rem);
}

.editorial-hero__copy .lede {
  max-width: 620px;
  margin-bottom: 0;
}

.editorial-hero__visual {
  position: relative;
  min-width: 0;
  margin: 0;
  padding: 10px;
  border: 1px solid rgba(222, 216, 207, 0.82);
  border-radius: 52px 26px 52px 30px;
  background: rgba(255, 255, 252, 0.78);
  box-shadow: var(--shadow-float);
  transform: rotate(0.7deg);
}

.editorial-hero__visual::before {
  position: absolute;
  top: -28px;
  right: 12%;
  z-index: -1;
  width: 74px;
  height: 74px;
  border: 1px solid rgba(193, 140, 93, 0.32);
  border-radius: 50%;
  background: rgba(230, 220, 205, 0.62);
  content: "";
}

.editorial-hero__visual--team {
  overflow: hidden;
}

.editorial-hero__visual--team .organic-image {
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  border: 0;
  border-radius: 43px 20px 43px 22px;
  box-shadow: none;
  object-fit: contain;
}

.editorial-hero__visual--services {
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform: none;
}

.editorial-hero__visual--services::before {
  display: none;
}

.editorial-hero__visual--services .hero-organ-stage--services {
  min-height: clamp(430px, 38vw, 520px);
}

/* Team directory: portrait-friendly cards with the same quiet paper surfaces. */
.team-directory {
  background:
    radial-gradient(circle at 96% 8%, rgba(193, 140, 93, 0.08), transparent 26%),
    var(--paper);
}

.team-page .team-grid {
  gap: clamp(22px, 2.4vw, 30px);
}

.team-page .person-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  border-color: rgba(222, 216, 207, 0.82);
  border-radius: 30px 52px 30px 42px;
  background:
    radial-gradient(circle at 100% 0, rgba(193, 140, 93, 0.09), transparent 36%),
    rgba(255, 255, 252, 0.92);
  transition:
    border-color 0.32s ease,
    box-shadow 0.32s ease,
    transform 0.32s ease;
}

.team-page .person-card:nth-child(3n + 2) {
  border-radius: 46px 30px 48px 30px;
}

.team-page .person-card:nth-child(3n) {
  border-radius: 52px 30px 42px 30px;
}

.team-page .person-card__image {
  width: calc(100% - 18px);
  margin: 9px 9px 0;
  border-radius: 24px 43px 20px 28px;
}

.team-page .person-card:nth-child(3n + 2) .person-card__image {
  border-radius: 37px 20px 38px 20px;
}

.team-page .person-card__body {
  display: flex;
  min-height: 184px;
  flex: 1;
  flex-direction: column;
  padding: 26px 28px 30px;
}

.team-page .person-card__role {
  min-height: 0;
  margin-bottom: 13px;
}

.team-page .person-card h2 {
  margin: auto 0 0;
  font-size: clamp(1.55rem, 2.1vw, 1.9rem);
  overflow-wrap: break-word;
  text-wrap: balance;
}

.team-page .person-card:hover .person-card__image img {
  transform: none;
}

.team-page .practice-gallery {
  background:
    radial-gradient(circle at 4% 12%, rgba(158, 175, 159, 0.08), transparent 24%),
    rgba(240, 235, 229, 0.42);
}

.team-page .gallery-card {
  border-radius: 30px 46px 30px 38px;
}

.team-page .gallery-card:nth-child(even) {
  border-radius: 44px 26px 40px 26px;
}

/* Services: a desktop index for mouse navigation and editorial content cards. */
.services-page .service-list {
  padding-top: clamp(58px, 7vw, 92px);
  background:
    radial-gradient(circle at 4% 7%, rgba(158, 175, 159, 0.07), transparent 22%),
    radial-gradient(circle at 96% 28%, rgba(193, 140, 93, 0.07), transparent 24%),
    var(--paper);
}

.services-page .service-list > .shell {
  display: grid;
  gap: clamp(26px, 3.5vw, 44px);
}

.services-page .service-row {
  min-height: 0;
  gap: clamp(38px, 6vw, 76px);
  margin: 0;
  padding: clamp(28px, 4.5vw, 58px);
  scroll-margin-top: 130px;
  border: 1px solid rgba(222, 216, 207, 0.84);
  border-radius: 34px 54px 34px 46px;
  background:
    radial-gradient(circle at 100% 0, rgba(193, 140, 93, 0.08), transparent 34%),
    rgba(255, 255, 252, 0.91);
  box-shadow: var(--shadow-soft);
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  transition:
    border-color 0.32s ease,
    box-shadow 0.32s ease,
    transform 0.32s ease;
}

.services-page .service-row:nth-child(even) {
  border-radius: 52px 30px 46px 30px;
}

.services-page .service-row__media {
  padding: 8px;
  overflow: hidden;
  border: 1px solid rgba(222, 216, 207, 0.72);
  border-radius: 28px 45px 26px 34px;
  background: rgba(255, 255, 252, 0.72);
}

.services-page .service-row:nth-child(even) .service-row__media {
  border-radius: 42px 24px 38px 24px;
}

.services-page .service-row__image,
.services-page .service-row:nth-child(even) .service-row__image {
  aspect-ratio: 3 / 2;
  border: 0;
  border-radius: 21px 37px 19px 27px;
  box-shadow: none;
}

.services-page .service-row:nth-child(even) .service-row__image {
  border-radius: 34px 18px 30px 18px;
}

.services-page .service-row:hover .service-row__image {
  transform: none;
}

.services-page .service-row__copy h2 {
  font-size: clamp(2.15rem, 3.4vw, 3.55rem);
  hyphens: auto;
  overflow-wrap: break-word;
  text-wrap: balance;
  word-break: normal;
}

.services-page .service-row__copy p:not(.eyebrow):not(.service-note) {
  max-width: 64ch;
}

.services-page .service-row__copy .button--ghost {
  margin-top: 8px;
}

@media (hover: hover) and (pointer: fine) {
  .contact-path-card:hover,
  .career-role-card:hover {
    border-color: rgba(158, 175, 159, 0.38);
    background:
      radial-gradient(circle at 100% 0, rgba(158, 175, 159, 0.14), transparent 42%),
      rgba(255, 255, 252, 0.97);
    color: var(--ink);
    box-shadow: 0 22px 48px -32px rgba(49, 67, 55, 0.44);
    transform: translateY(-3px);
  }

  .contact-path-card:hover .contact-path-card__number,
  .career-role-card:hover .career-role-card__number {
    color: rgba(193, 140, 93, 0.82);
  }

  .contact-path-card:hover .eyebrow,
  .contact-path-card:hover p:not(.eyebrow),
  .career-role-card:hover .eyebrow,
  .career-role-card:hover h3 span,
  .career-role-card:hover p:not(.eyebrow) {
    color: var(--grass);
  }

  .contact-path-card:hover .button--primary,
  .career-role-card:hover .button--primary {
    background: var(--moss);
    color: var(--moss-ink);
  }

  .contact-path-card:hover .button--outline {
    border-color: var(--clay);
    color: #9b683e;
  }

  .contact-path-card:hover .text-link {
    color: var(--moss-dark);
  }

  .team-page .person-card:hover,
  .services-page .service-row:hover {
    border-color: rgba(158, 175, 159, 0.34);
    box-shadow: 0 22px 48px -32px rgba(49, 67, 55, 0.38);
    transform: translateY(-3px);
  }

  .team-page .person-card:hover .person-card__image img {
    transform: scale(1.012);
  }

  .services-page .service-row:hover .service-row__image {
    transform: scale(1.006);
  }
}

@media (min-width: 900px) {
  .services-page .service-index {
    position: relative;
    top: auto;
    z-index: 3;
    padding-block: 20px;
    border-block: 1px solid rgba(222, 216, 207, 0.8);
    background: rgba(240, 235, 229, 0.38);
    backdrop-filter: none;
  }

  .services-page .service-index__inner {
    display: grid;
    gap: 12px;
    padding-block: 0;
    overflow: visible;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .services-page .service-index a {
    min-width: 0;
    min-height: 58px;
    justify-content: space-between;
    padding: 12px 17px;
    border-color: rgba(222, 216, 207, 0.9);
    border-radius: 17px 26px 17px 22px;
    background: rgba(255, 255, 252, 0.82);
    box-shadow: 0 10px 26px -24px rgba(49, 67, 55, 0.4);
    font-size: 0.8rem;
    line-height: 1.35;
    white-space: normal;
    transition:
      background 0.25s ease,
      border-color 0.25s ease,
      box-shadow 0.25s ease,
      transform 0.25s ease;
  }

  .services-page .service-index a:nth-child(even) {
    border-radius: 25px 17px 23px 17px;
  }

  .services-page .service-index a span {
    flex: 0 0 auto;
    margin-left: auto;
  }

  .services-page .service-index a:hover,
  .services-page .service-index a:focus-visible {
    border-color: rgba(158, 175, 159, 0.36);
    background: rgba(255, 255, 252, 0.98);
    box-shadow: 0 16px 30px -24px rgba(49, 67, 55, 0.5);
    transform: translateY(-2px);
  }
}

@media (min-width: 1200px) {
  .services-page .service-index__inner {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1050px) {
  .editorial-hero__grid {
    gap: 42px;
  }

  .team-page .person-card__body {
    min-height: 170px;
  }
}

@media (max-width: 860px) {
  .editorial-hero {
    padding-block: 40px 92px;
  }

  .editorial-hero__grid {
    gap: 38px;
    grid-template-columns: minmax(0, 1fr);
  }

  .editorial-hero__copy h1 {
    font-size: clamp(3.05rem, 10vw, 5rem);
  }

  .editorial-hero__visual {
    width: min(100%, 680px);
    margin-inline: auto;
    transform: none;
  }

  .editorial-hero__visual--services .hero-organ-stage--services {
    min-height: min(430px, 82vw);
  }

  .services-page .service-list {
    padding-block: 44px 76px;
  }

  .services-page .service-row {
    gap: 28px;
    padding: clamp(18px, 4vw, 28px);
    scroll-margin-top: 170px;
    grid-template-columns: minmax(0, 1fr);
  }

  .services-page .service-row--reverse .service-row__media {
    order: 0;
  }

  .services-page .service-row__copy {
    padding: 2px 7px 8px;
  }

  .team-page .person-card__body {
    min-height: 0;
  }
}

@media (max-width: 680px) {
  .editorial-hero {
    padding-block: 28px 78px;
  }

  .editorial-hero__grid {
    gap: 32px;
  }

  .editorial-hero__copy h1 {
    margin-bottom: 18px;
    font-size: clamp(2.75rem, 13.4vw, 4.1rem);
    hyphens: auto;
    overflow-wrap: break-word;
  }

  .editorial-hero__visual {
    padding: 7px;
    border-radius: 34px 20px 34px 22px;
  }

  .editorial-hero__visual--services {
    padding: 0;
    border-radius: 0;
  }

  .editorial-hero__visual--team .organic-image {
    border-radius: 27px 15px 27px 16px;
  }

  .editorial-hero__visual--services .hero-organ-stage--services {
    min-height: min(390px, 88vw);
  }

  .team-page .team-grid {
    max-width: 540px;
  }

  .team-page .person-card,
  .team-page .person-card:nth-child(3n + 2),
  .team-page .person-card:nth-child(3n) {
    border-radius: 28px 40px 28px 34px;
  }

  .team-page .person-card__body {
    padding: 24px 25px 28px;
  }

  .services-page .service-list > .shell {
    gap: 22px;
  }

  .services-page .service-row,
  .services-page .service-row:nth-child(even) {
    border-radius: 28px 40px 28px 34px;
  }

  .services-page .service-row__copy h2 {
    font-size: clamp(2rem, 10.5vw, 3rem);
  }
}

@media (max-width: 360px) {
  .editorial-hero__copy h1,
  .services-page .service-row__copy h2,
  .team-page .person-card h2 {
    hyphens: auto;
    overflow-wrap: anywhere;
  }
}

@media (prefers-reduced-motion: reduce) {
  .contact-path-card,
  .career-role-card,
  .team-page .person-card,
  .team-page .person-card__image img,
  .services-page .service-row,
  .services-page .service-row__image,
  .services-page .service-index a,
  .editorial-hero__visual {
    transition: none;
    transform: none;
  }
}

/* Team page: accessible CV dialog and an uncropped, expandable photo archive. */
.team-page .person-card__cv-button {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 10px;
  padding: 0;
  margin-top: 20px;
  border: 0;
  background: transparent;
  color: var(--moss-dark);
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 850;
}

.team-page .person-card__cv-button span {
  transition: transform 0.25s ease;
}

.team-page .person-card__cv-button:hover span,
.team-page .person-card__cv-button:focus-visible span {
  transform: translateX(4px);
}

.team-page .person-card__cv-button:focus-visible {
  border-radius: 5px;
  outline: 3px solid rgba(158, 175, 159, 0.55);
  outline-offset: 5px;
}

.team-page .gallery-grid .gallery-card:last-child {
  width: auto;
  grid-column: auto;
  justify-self: stretch;
}

.gallery-more {
  padding-top: 34px;
  margin-top: 38px;
  border-top: 1px solid rgba(222, 216, 207, 0.92);
}

.gallery-more > summary {
  width: fit-content;
  min-height: 54px;
  gap: 18px;
  padding: 0 8px 0 22px;
  border: 1px solid rgba(158, 175, 159, 0.5);
  border-radius: 999px;
  background: rgba(255, 255, 252, 0.84);
  box-shadow: 0 12px 28px -24px rgba(49, 67, 55, 0.5);
  color: var(--moss-dark);
}

.gallery-more > summary > span:first-child,
.gallery-more[open] > summary > span:first-child {
  transform: none;
}

.gallery-more__icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: rgba(158, 175, 159, 0.22);
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1;
  transition: transform 0.25s ease;
}

.gallery-more[open] .gallery-more__icon {
  transform: rotate(45deg);
}

.gallery-archive {
  columns: 3 310px;
  column-gap: 22px;
  margin-top: 30px;
}

.gallery-archive .gallery-card {
  display: inline-block;
  width: 100%;
  margin: 0 0 22px;
  break-inside: avoid;
}

.gallery-archive .gallery-card img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.cv-modal {
  width: min(850px, calc(100vw - 34px));
  max-width: none;
  max-height: none;
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  color: var(--ink);
}

.cv-modal::backdrop {
  background: rgba(31, 43, 34, 0.62);
  backdrop-filter: blur(7px);
}

.cv-modal__surface {
  position: relative;
  max-height: min(88vh, 900px);
  padding: clamp(32px, 5vw, 58px);
  overflow: auto;
  border: 1px solid rgba(222, 216, 207, 0.9);
  border-radius: 34px 52px 34px 42px;
  background:
    radial-gradient(circle at 96% 4%, rgba(158, 175, 159, 0.16), transparent 25%),
    var(--paper);
  box-shadow: 0 36px 80px -30px rgba(31, 43, 34, 0.55);
}

.cv-modal__close {
  position: sticky;
  z-index: 2;
  top: 0;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  float: right;
  margin: -12px -12px 8px 22px;
  border: 1px solid rgba(158, 175, 159, 0.55);
  border-radius: 50%;
  background: rgba(255, 255, 252, 0.96);
  color: var(--moss-dark);
  cursor: pointer;
  font-size: 1.8rem;
  font-weight: 400;
  line-height: 1;
}

.cv-modal__close:hover,
.cv-modal__close:focus-visible {
  background: var(--moss-dark);
  color: var(--white);
}

.cv-modal__panel h2 {
  max-width: 680px;
  padding-right: 42px;
  margin-bottom: clamp(32px, 5vw, 48px);
  font-size: clamp(2.35rem, 5vw, 4.1rem);
  overflow-wrap: anywhere;
}

.cv-section {
  display: grid;
  gap: 12px;
  padding-block: 22px;
  border-top: 1px solid rgba(222, 216, 207, 0.92);
  grid-template-columns: minmax(140px, 0.34fr) minmax(0, 1fr);
}

.cv-section h3 {
  margin: 0;
  color: var(--moss-dark);
  font-family: var(--font-body);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  line-height: 1.45;
  text-transform: uppercase;
}

.cv-section p,
.cv-section ul {
  min-width: 0;
  padding: 0;
  margin: 0;
  color: #56584e;
}

.cv-section ul {
  display: grid;
  gap: 12px;
  list-style: none;
}

.cv-section li {
  padding-left: 0;
  line-height: 1.62;
}

.cv-section li strong {
  color: var(--moss-dark);
}

@media (max-width: 680px) {
  .gallery-more {
    padding-top: 26px;
    margin-top: 28px;
  }

  .gallery-more > summary {
    width: 100%;
    min-height: 62px;
    padding-left: 18px;
  }

  .gallery-more > summary > span:first-child {
    max-width: calc(100% - 58px);
  }

  .gallery-archive {
    columns: 1;
  }

  .cv-modal {
    width: calc(100vw - 18px);
  }

  .cv-modal__surface {
    max-height: 94dvh;
    padding: 28px 22px 34px;
    border-radius: 28px 38px 28px 34px;
  }

  .cv-modal__close {
    width: 42px;
    height: 42px;
    margin: -8px -7px 8px 16px;
  }

  .cv-modal__panel h2 {
    padding-right: 0;
    font-size: clamp(2rem, 11vw, 3.05rem);
  }

  .cv-section {
    gap: 10px;
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .team-page .person-card__cv-button span,
  .gallery-more__icon {
    transition: none;
  }
}
