/* ==========================================================================
   Schreinerei Kemptner — Team page (Figma frame "team" 377:688)
   Requires css/base.css and css/components.css.
   ========================================================================== */

/* Intro (377:738): 120px top, 64px to the grid, 24px title gap */
.sk-team-intro {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-top: var(--sk-section-py);
  padding-bottom: var(--sk-stack-gap);
}

.sk-team-intro__text {
  display: flex;
  flex-direction: column;
  gap: 1.2em; /* the empty line between the two Figma paragraphs */
  max-width: 1107px;
  font-size: var(--sk-fs-xl);
  line-height: 1.2;
}

.sk-team-intro__text p {
  max-width: none;
}

/* --------------------------------------------------------------------------
   Team grid (377:741): 380x570 portraits (2:3), 4px radius, 40px columns,
   80px rows. Each photo keeps the exact crop from Figma (image scaled and
   offset inside the frame). Names: Blauer Nue Heavy 62px, outline only,
   3.1px tracking, 15px from the left, centred 518px from the top.
   -------------------------------------------------------------------------- */
.sk-team {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2rem, 4.64vw, 5rem) clamp(1rem, 2.32vw, 2.5rem);
  padding-bottom: var(--sk-section-py);
}

.sk-member {
  --sk-hover-ease: cubic-bezier(0.37, 0, 0.63, 1);

  position: relative;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 4px;
  container-type: inline-size;
  background-color: var(--sk-schwarz);
  outline: none;
}

.sk-member__img {
  position: absolute;
  max-width: none;
  left: var(--x);
  top: var(--y);
  width: var(--s);
  height: var(--s);
  object-fit: cover;
  transform-origin: 50% 40%;
  transition: opacity 0.4s var(--sk-hover-ease), filter 0.4s var(--sk-hover-ease),
              transform 0.6s var(--sk-hover-ease);
}

.sk-member__name {
  position: absolute;
  left: 3.95%; /* 15px / 380px */
  top: 90.88%; /* 518px / 570px */
  transform: translateY(-50%);
  font-family: var(--sk-font-display);
  font-weight: var(--sk-fw-heavy);
  font-size: 16.32cqw; /* 62px / 380px */
  letter-spacing: 0.05em; /* 3.1px at 62px */
  line-height: 1.2;
  text-transform: uppercase;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1px var(--sk-neongelb);
  transition: opacity 0.4s var(--sk-hover-ease);
}

/* --------------------------------------------------------------------------
   Hover / focus: the photo zooms in slightly, blurs and dims to 40% on the
   dark ground (face stays recognisable), the name dims with it. The job
   title (Blauer Nue Regular, filled lime) is wiped open from the left line
   by line, then a short lime rule is drawn underneath — "drawn with the
   square".
   Cards are focusable (tabindex="0"), so a tap on touch screens and keyboard
   focus show the title too.
   -------------------------------------------------------------------------- */
.sk-member__role {
  --sk-wipe-ease: cubic-bezier(0.65, 0, 0.35, 1);

  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8%;
  font-family: var(--sk-font-display);
  font-weight: var(--sk-fw-regular);
  font-size: 7.5cqw; /* ~28px at 380px */
  line-height: 1.2;
  text-align: center;
  color: var(--sk-neongelb);
  pointer-events: none;
}

.sk-member__line {
  display: block;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.6s var(--sk-wipe-ease);
}

.sk-member__line + .sk-member__line {
  transition-delay: 0.1s;
}

.sk-member__role::after {
  content: "";
  width: 0;
  height: 2px;
  margin-top: 0.5em;
  background-color: var(--sk-neongelb);
  transition: width 0.6s var(--sk-wipe-ease) 0.15s;
}

/* Mouse / trackpad: hover; keyboard: visible focus */
.sk-member:is(:hover, :focus-visible) .sk-member__img {
  opacity: 0.4;
  filter: blur(1.5px);
  transform: scale(1.08);
}

.sk-member:is(:hover, :focus-visible) .sk-member__name {
  opacity: 0.5;
}

.sk-member:is(:hover, :focus-visible) .sk-member__line {
  clip-path: inset(0 0 0 0);
}

.sk-member:is(:hover, :focus-visible) .sk-member__role::after {
  width: 30%;
}

/* Touch screens have no hover: a tap focuses the card and shows the title */
@media (hover: none) {
  .sk-member:focus .sk-member__img {
    opacity: 0.4;
    filter: blur(1.5px);
    transform: scale(1.08);
  }

  .sk-member:focus .sk-member__name {
    opacity: 0.5;
  }

  .sk-member:focus .sk-member__line {
    clip-path: inset(0 0 0 0);
  }

  .sk-member:focus .sk-member__role::after {
    width: 30%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sk-member__img {
    transform: none !important;
  }

  .sk-member__line,
  .sk-member__role::after {
    transition-duration: 0.01s;
    transition-delay: 0s;
  }
}

@media (min-width: 768px) {
  .sk-team {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
