/* ============================================================
   sections.css — content sections: feature grids, experts,
   teaser, and the scroll-reveal microinteraction.
   ============================================================ */

/* Eyebrow above the section title */
.sec-head-t .ey { margin-bottom: 10px; }

/* ---------- Feature grid (why-join + benefits) ---------- */
.fgrid {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.fgrid--numbered { grid-template-columns: repeat(3, 1fr); }
.fgrid--icon { grid-template-columns: repeat(4, 1fr); }

.fcell { background: var(--surface); padding: 34px 30px; transition: background var(--dur-fast); }
/* Microinteraction: subtle tint + accent lift on hover */
.fcell:hover { background: var(--surface-2); }
.fcell:hover .fcell-n { color: var(--red); }
.fcell-n { transition: color var(--dur-fast); }
.fgrid--icon .fcell:hover .fcell-ic { background: var(--red); border-color: var(--red); color: #fff; }
.fcell h3 { transition: color var(--dur-fast); }
.fgrid--icon .fcell:hover h3 { color: var(--red-fg); }
.fcell-n {
  font-family: var(--disp);
  font-variation-settings: 'opsz' 20, 'wght' 600;
  color: var(--red-fg);
  font-size: var(--text-md);
  margin-bottom: 14px;
}
.fcell-ic {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  color: var(--red-fg);
  margin-bottom: 18px;
  transition: background var(--dur-fast), border-color var(--dur-fast), color var(--dur-fast);
}
.fcell h3 {
  font-variation-settings: 'opsz' 24, 'wght' 600;
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -.01em;
  margin-bottom: 8px;
}
.fcell p { color: var(--fg-2); font-size: 14.5px; }

@media (max-width: 880px) {
  .fgrid--icon { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .fgrid--numbered { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .fgrid--icon { grid-template-columns: 1fr; }
}

/* ---------- Experts ---------- */
.xgrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.xcard {
  background: var(--surface);
  display: flex;
  flex-direction: column;
}
.xcard-img {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--surface-2);
}
/* Branded initials placeholder — shown when there's no photo (behind the img) */
.xcard-ph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--surface-2), var(--surface));
}
.xcard-ph span {
  font-family: var(--disp);
  font-variation-settings: 'opsz' 24, 'wght' 700;
  font-size: 44px;
  letter-spacing: .02em;
  color: var(--red-fg);
  opacity: .55;
}
.xcard-img img {
  position: relative;
  z-index: 1;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 28%;
  transition: transform var(--dur-slow) var(--ease-out);
}
.xcard:hover .xcard-img img { transform: scale(1.04); }
.xcard-b { padding: 22px 22px 26px; }
.xcard h3 {
  font-family: var(--disp);
  font-variation-settings: 'opsz' 24, 'wght' 600;
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -.01em;
  line-height: 1.05;
}
.xcard-title { margin-top: 6px; font-weight: 600; color: var(--fg); font-size: var(--text-md); }
.xcard-focus { margin-top: 4px; font-size: var(--text-sm); color: var(--muted); }
.xcard-motto { margin-top: 14px; color: var(--red-fg); font-size: var(--text-md); font-weight: 500; }

@media (max-width: 900px) { .xgrid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .xgrid { grid-template-columns: 1fr; } }

/* ---------- Open Roles (centerpiece) ---------- */
.rolelist { border-top: 1px solid var(--line); }
.role {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) auto;
  grid-template-areas: "head mid cta";
  align-items: center;
  gap: 32px;
  padding: 30px 26px 30px 30px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.role-head { grid-area: head; }
.role-mid  { grid-area: mid; }
.role-cta  { grid-area: cta; }
.role > *:not(.fill) { position: relative; z-index: 1; }

/* The signature: a red panel sweeps up to fill the whole row */
.role .fill {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--red);
  transform: translateY(101%);
  transition: transform var(--dur-slow) var(--ease-signature);
}
.role:hover .fill,
.role:focus-within .fill { transform: translateY(0); }

/* On the red fill: text turns white, buttons invert to stay legible */
.role:hover h3, .role:focus-within h3,
.role:hover .role-intro, .role:focus-within .role-intro { color: #fff; }
.role:hover .role-meta, .role:focus-within .role-meta { color: rgba(255, 255, 255, .85); }
.role:hover .tag2, .role:focus-within .tag2 { color: #fff; border-color: rgba(255, 255, 255, .5); }
.role h3, .role .role-intro, .role .role-meta, .role .tag2 { transition: color var(--dur-mid), border-color var(--dur-mid); }

.role:hover .role-more, .role:focus-within .role-more {
  color: #fff; border-color: rgba(255, 255, 255, .6); background: transparent;
}
.role:hover .role-more:hover { background: #fff; color: var(--red); border-color: #fff; }
.role:hover .role-apply, .role:focus-within .role-apply {
  background: #fff; color: var(--red); border-color: #fff; box-shadow: none;
}
.role:hover .role-apply:hover { box-shadow: 0 0 0 4px rgba(255, 255, 255, .25); }

.role h3 {
  font-variation-settings: 'opsz' 28, 'wght' 600;
  font-weight: 600;
  font-size: clamp(22px, 2.8vw, 32px);
  letter-spacing: -.015em;
  line-height: 1.02;
}
.role-intro {
  margin-top: 8px;
  color: var(--fg-2);
  font-size: var(--text-md);
  max-width: 46ch;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.role-mid { display: flex; flex-direction: column; gap: 12px; }
.role .tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tag2 {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--fg-2);
  border: 1px solid var(--line-2);
  padding: 5px 10px;
  border-radius: var(--radius-pill);
}
.role-meta { font-size: var(--text-sm); color: var(--muted); }

.role-cta { display: flex; gap: 10px; justify-self: end; }
.role-cta .btn { padding: 11px 18px; }

.roles-empty {
  padding: 40px 26px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--fg-2);
  font-size: var(--text-lg);
}

/* Roles footer (count + Initiativbewerbung) */
.sec-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: var(--space-8);
  padding-top: var(--space-7);
  border-top: 1px solid var(--line);
}
.sec-foot span { color: var(--muted); font-size: var(--text-sm); }

@media (max-width: 900px) {
  .role {
    grid-template-columns: 1fr auto;
    grid-template-areas: "head cta" "mid mid";
    gap: 16px 24px;
    align-items: start;
  }
  .role-mid { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 10px 16px; }
}
@media (max-width: 620px) {
  .role {
    grid-template-columns: 1fr;
    grid-template-areas: "head" "mid" "cta";
    padding: 24px 16px 24px 18px;
  }
  .role-cta { justify-self: stretch; }
  .role-cta .btn { flex: 1; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  /* No sweep — plain surface fill, keep default text/button colours */
  .role .fill { display: none; }
  .role:hover, .role:focus-within { background: var(--surface-2); }
  .role:hover h3, .role:focus-within h3,
  .role:hover .role-intro, .role:focus-within .role-intro { color: var(--fg); }
  .role:hover .role-meta, .role:focus-within .role-meta { color: var(--muted); }
  .role:hover .tag2, .role:focus-within .tag2 { color: var(--fg-2); border-color: var(--line-2); }
  .role:hover .role-more, .role:focus-within .role-more { color: var(--fg); border-color: var(--line-2); }
  .role:hover .role-apply, .role:focus-within .role-apply { background: var(--red); color: #fff; border-color: var(--red); }
}

/* ---------- FAQ (native details accordion) ---------- */
.faq-list { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 6px;
  font-family: var(--disp);
  font-variation-settings: 'opsz' 24, 'wght' 600;
  font-weight: 600;
  font-size: clamp(18px, 2.4vw, 23px);
  letter-spacing: -.01em;
  line-height: 1.15;
  transition: color var(--dur-fast);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--red-fg); }
.faq-item summary:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 2px; }
.faq-icn {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  color: var(--red-fg);
  transition: transform var(--dur-mid) var(--ease-out), background var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast);
}
.faq-item[open] .faq-icn { transform: rotate(45deg); }         /* + → ✕ */
.faq-item summary:hover .faq-icn { border-color: var(--red-fg); }
.faq-a {
  padding: 0 6px 26px;
  max-width: 68ch;
  color: var(--fg-2);
  font-size: var(--text-md);
}
.faq-foot {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: var(--space-8);
}
.faq-foot span { color: var(--muted); font-size: var(--text-md); }

/* ---------- Teaser (replaces footer) — centered, no photo, red glow ---------- */
.teaser {
  position: relative;
  overflow: hidden;
  padding: var(--space-12) 0 var(--space-9);
  border-top: 1px solid var(--line);
  text-align: center;
}
/* Excitement without a photo: a red glow blooming from the top-centre */
.teaser::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 70% at 50% 0%, rgba(255, 25, 38, .26), transparent 62%),
    radial-gradient(90% 60% at 50% 120%, rgba(255, 25, 38, .10), transparent 60%);
  pointer-events: none;
}
.teaser-in { position: relative; z-index: 2; max-width: 760px; margin: 0 auto; }
.teaser-main { max-width: 40ch; margin: 0 auto; }
.teaser .ey { display: block; }
.teaser h2 {
  font-size: clamp(38px, 7vw, 80px);
  text-transform: uppercase;
  margin: 16px 0 18px;
}
.teaser-lead {
  color: var(--fg-2);
  font-size: var(--text-lg);
  margin: 0 auto var(--space-8);
}
.teaser .cta-row { justify-content: center; }
.teaser-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: var(--space-11);
  padding-top: var(--space-7);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: var(--text-sm);
}
.teaser-foot img { height: 22px; width: auto; }
.teaser-addr { font-style: normal; }
.teaser-sep { opacity: .5; }

/* ---------- Scroll reveal ----------
   Gated behind .js (set before paint) so content stays visible without JS. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
}
.js [data-reveal].in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
}
