/* ========================================================================
   Zahnwerk Eningen — Team & Praxis page
   Loads after style.css AND motion.css, scoped to team.php only.
   Reuses the site's drawn-line motif (see home.css) for the equipment
   feature row, and the same reveal/magnetic mechanics from motion.css.
   ======================================================================== */

/* ------------------------------------------------------------------------
   Page hero — subtle shared entrance, this page only
   ------------------------------------------------------------------------ */
.page-hero .breadcrumb,
.page-hero h1,
.page-hero p {
  position: relative;
  z-index: 1;
}

/* ------------------------------------------------------------------------
   Team grid — portrait cards
   ------------------------------------------------------------------------ */

/* Neutralize the legacy incomplete scroll-reveal rule from style.css
   (.team-card was left permanently offset by 20px — nothing ever added
   the .is-visible class that would resolve it). The whole grid reveals
   as one unit instead, see [data-reveal] on .team-grid below. */
.team-card {
  opacity: 1 !important;
  transform: none !important;
}

.team-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}
@media (min-width: 640px) {
  .team-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .team-grid { grid-template-columns: repeat(3, 1fr); }
}

.team-card {
  background: var(--color-white);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  padding: 0;
  text-align: left;
  transition: transform 300ms var(--ease-out-soft), box-shadow 300ms var(--ease-out-soft);
}
.team-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
}

.team-card__photo {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent-dark) 100%);
}
.team-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 700ms var(--ease-out-expo);
}
.team-card:hover .team-card__photo img { transform: scale(1.06); }

.team-card__photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(0, 102, 204, 0.16), rgba(0, 180, 160, 0.08));
  opacity: 1;
  transition: opacity 400ms;
  pointer-events: none;
}
.team-card:hover .team-card__photo::after { opacity: 0; }

.team-card__initials {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 3.25rem;
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: 0.02em;
}

.team-card__role {
  position: absolute;
  left: var(--space-4);
  bottom: var(--space-4);
  z-index: 1;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-primary-dark);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.team-card__body { padding: var(--space-5) var(--space-6) var(--space-6); }
.team-card__body h3 {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-gray-900);
  margin-bottom: var(--space-2);
}
.team-card__body p {
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  color: var(--color-gray-600);
}

/* ------------------------------------------------------------------------
   Praxis gallery — bento rhythm + lightbox
   ------------------------------------------------------------------------ */
.praxis-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}
@media (min-width: 768px) {
  .praxis-gallery { grid-template-columns: repeat(4, 1fr); }
}

.praxis-image {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--color-gray-100);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  border: none;
  padding: 0;
  cursor: zoom-in;
}
@media (min-width: 768px) {
  .praxis-image--wide {
    grid-column: span 2;
    aspect-ratio: 8 / 3;
  }
}

.praxis-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 500ms var(--ease-out-expo);
}
.praxis-image:hover img,
.praxis-image:focus-visible img { transform: scale(1.06); }

.praxis-image__zoom {
  position: absolute;
  right: var(--space-3);
  bottom: var(--space-3);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.55);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 200ms, transform 200ms;
  pointer-events: none;
}
.praxis-image__zoom svg { width: 16px; height: 16px; }
.praxis-image:hover .praxis-image__zoom,
.praxis-image:focus-visible .praxis-image__zoom {
  opacity: 1;
  transform: scale(1);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 12, 24, 0.92);
  opacity: 0;
  visibility: hidden;
  transition: opacity 250ms var(--ease-out-soft);
}
.lightbox.is-open { opacity: 1; visibility: visible; }

.lightbox__figure {
  position: relative;
  max-width: min(92vw, 1100px);
  max-height: 86vh;
  transform: scale(0.96);
  transition: transform 250ms var(--ease-out-soft);
}
.lightbox.is-open .lightbox__figure { transform: scale(1); }

.lightbox__img {
  display: block;
  max-width: min(92vw, 1100px);
  max-height: 86vh;
  width: auto;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.lightbox__btn {
  position: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: background 200ms, transform 150ms;
}
.lightbox__btn:hover { background: rgba(255, 255, 255, 0.22); }
.lightbox__btn:active { transform: scale(0.94); }
.lightbox__btn svg { width: 20px; height: 20px; }

.lightbox__close { top: var(--space-6); right: var(--space-6); }
.lightbox__prev { left: var(--space-4); top: 50%; transform: translateY(-50%); }
.lightbox__next { right: var(--space-4); top: 50%; transform: translateY(-50%); }
@media (min-width: 768px) {
  .lightbox__prev { left: var(--space-8); }
  .lightbox__next { right: var(--space-8); }
}

.lightbox__counter {
  position: fixed;
  bottom: var(--space-6);
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.7);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* ------------------------------------------------------------------------
   Ausstattung — connected feature row (same drawn-line motif as the
   homepage reasons list, laid out horizontally to read as a sequence)
   ------------------------------------------------------------------------ */
.feature-row-wrap { position: relative; }

.feature-line {
  position: absolute;
  left: 12.5%;
  top: 34px;
  width: 75%;
  height: 30px;
  pointer-events: none;
  z-index: 0;
  display: none;
  overflow: visible;
}
@media (min-width: 768px) { .feature-line { display: block; } }
.feature-line path {
  fill: none;
  stroke: url(#featureLineGradient);
  stroke-width: 2.5;
  stroke-linecap: round;
}

.feature-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
}
@media (min-width: 768px) {
  .feature-list { grid-template-columns: repeat(4, 1fr); gap: var(--space-6); }
}

.feature-item {
  position: relative;
  z-index: 1;
  text-align: center;
}

.feature-item__icon {
  width: 68px;
  height: 68px;
  margin: 0 auto var(--space-5);
  border-radius: 50%;
  background: var(--color-white);
  border: 1.5px solid var(--color-gray-200);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: border-color 220ms, color 220ms, transform 220ms var(--ease-out-soft), background 220ms;
}
.feature-item__icon svg { width: 28px; height: 28px; }
.feature-item:hover .feature-item__icon {
  border-color: var(--color-primary);
  color: var(--color-white);
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  transform: scale(1.07);
}

.feature-item h3 {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-gray-900);
  margin-bottom: var(--space-2);
}
.feature-item p {
  font-size: var(--text-sm);
  color: var(--color-gray-600);
  line-height: var(--leading-relaxed);
}

/* ------------------------------------------------------------------------
   Philosophie — pull quote with a drawn underline
   ------------------------------------------------------------------------ */
.philosophy-block {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}
.philosophy-mark {
  width: 40px;
  height: 40px;
  margin: 0 auto var(--space-6);
  color: var(--color-primary-light);
  opacity: 0.55;
}
.philosophy-block h2 {
  margin-bottom: var(--space-8);
}
.philosophy-quote-wrap {
  position: relative;
  display: inline-block;
}
.philosophy-line {
  position: absolute;
  left: -2%;
  right: -2%;
  bottom: -0.1em;
  width: 104%;
  height: 0.4em;
  overflow: visible;
  pointer-events: none;
}
.philosophy-line path {
  fill: none;
  stroke: url(#philosophyLineGradient);
  stroke-width: 3;
  stroke-linecap: round;
}
.philosophy-block p.text-large {
  color: var(--color-gray-600);
  line-height: var(--leading-relaxed);
}
.philosophy-block p.text-large + p.text-large { margin-top: var(--space-6); }

/* ------------------------------------------------------------------------
   Jobs teaser polish
   ------------------------------------------------------------------------ */
.jobs-teaser .btn { flex-shrink: 0; }
