/* ==========================================================================
   /ablauf/ – Zusammenarbeit (page-specific; loaded after site.css)
   Prefix: .ab-  · Tokens only · Breakpoints from DESIGN-SYSTEM §3 only
   ========================================================================== */

/* 1 · Hero ---------------------------------------------------------------- */
/* Glow preset and the ruled hero assurance (.assurance-ruled) live in site.css */

/* Project board illustration (light mockup on the stage) */
.ab-hero-visual { width: 100%; max-width: 580px; justify-self: end; }
.ab-board-name { min-width: 0; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; }
.ab-board-body { display: grid; gap: 14px; padding: 18px 20px 20px; }
.ab-board-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.ab-step-count { font-family: var(--font-mono); font-size: 12px; color: var(--fg-3); white-space: nowrap; }
.ab-track { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.ab-track i { height: 6px; border-radius: 3px; background: var(--surface-3); }
.ab-track i.is-done { background: var(--brand-indigo); }
.ab-track i.is-run { background: linear-gradient(90deg, var(--brand-azure) 0 55%, var(--surface-3) 55%); }

.ab-phases { list-style: none; border-radius: 10px; box-shadow: 0 0 0 1px var(--line-2); overflow: hidden; }
.ab-phases li { display: flex; align-items: center; gap: 10px; padding: 9px 12px; }
.ab-phases li + li { border-top: 1px solid var(--line); }
.ab-phases li.is-run { background: var(--surface-2); box-shadow: inset 3px 0 0 var(--brand-blue); }
.ab-st { position: relative; display: grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: 50%; }
.ab-st .i { width: 12px; height: 12px; stroke-width: 2.4; }
.is-done .ab-st { color: var(--ok); background: var(--ok-bg); box-shadow: inset 0 0 0 1px var(--ok-line); }
.is-run .ab-st { background: var(--info-bg); box-shadow: inset 0 0 0 1px var(--info-line); }
.is-run .ab-st i { position: relative; width: 8px; height: 8px; border-radius: 50%; color: var(--brand-blue); background: currentColor; }
.is-run .ab-st i::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: currentColor; opacity: 0; pointer-events: none; }
.is-next .ab-st { box-shadow: inset 0 0 0 1.5px var(--line-2); }
.ab-ph-t { flex: 1; min-width: 0; display: flex; flex-direction: column; font-weight: 550; line-height: 1.3; white-space: nowrap; }
.ab-ph-t small { font-size: 11.5px; font-weight: 400; color: var(--fg-3); }
.is-next .ab-ph-t { color: var(--fg-2); }
.ab-chip-plan { color: var(--fg-3); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-2); }

.ab-board-foot { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 10px; }
.ab-decide, .ab-contact { padding: 11px 12px 12px; border-radius: 10px; box-shadow: 0 0 0 1px var(--line-2); }
.ab-contact { background: var(--surface-2); }
.ab-mini-h { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 12px; font-weight: 600; color: var(--fg); }
.ab-mini-h b { padding: 0 7px; border-radius: 999px; font-family: var(--font-mono); font-size: 11px; font-weight: 500; line-height: 1.6; color: var(--warn); background: var(--warn-bg); box-shadow: inset 0 0 0 1px var(--warn-line); }
.ab-decide ul { list-style: none; display: grid; gap: 6px; }
.ab-decide li { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--fg-2); white-space: nowrap; }
.ab-box { flex: none; width: 13px; height: 13px; border-radius: 4px; box-shadow: inset 0 0 0 1.5px var(--control-border); }
.ab-person { display: flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 600; line-height: 1.25; }
.ab-person small { display: block; font-size: 11.5px; font-weight: 400; color: var(--fg-3); }

/* 2 · Timeline section ---------------------------------------------------- */
.ab-process { display: grid; gap: clamp(2rem, 4vw, 3rem); }
.ab-process-head .section-head { margin-bottom: 1.5rem; }
.ab-process-head .callout { max-width: 560px; }

/* Rich vertical timeline: node circle on the rail + card body.
   The circle lives on li::after so the gradient numeral stays text-clipped. */
.ab-timeline .timeline-item { grid-template-columns: 56px minmax(0, 1fr); column-gap: 24px; padding-bottom: 20px; }
.ab-timeline .timeline-item::before { left: 27px; top: 56px; bottom: 0; width: 2px; background: var(--grad-rule); opacity: .35; }
.ab-timeline .timeline-item::after {
  content: ""; position: absolute; left: 0; top: 0; width: 56px; height: 56px; border-radius: 50%;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--accent-line), 0 0 0 6px var(--bg), var(--shadow-card);
}
.ab-timeline .timeline-num { position: relative; z-index: 1; width: 56px; height: 56px; font-size: 1.375rem; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ab-timeline .timeline-body { padding: 22px 26px 22px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-card); }
.ab-step-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: .55rem; }
.ab-timeline .timeline-body h3 { margin: .35rem 0 0; }
.ab-timeline .timeline-body > p:not(.ab-step-note) { color: var(--fg-2); }
.ab-step-note { display: flex; align-items: flex-start; gap: .55rem; margin-top: .75rem; font-size: var(--fs-sm); line-height: 1.5; color: var(--fg-3); }
.ab-step-note > span { text-wrap: pretty; }
.ab-step-note .i { width: 16px; height: 16px; margin-top: .1rem; color: var(--accent-text); }

.ab-io { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 20px; margin: 1.1rem 0 0; padding-top: 1rem; border-top: 1px dashed var(--line-2); }
.ab-io dt { margin-bottom: .4rem; font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-3); }
.ab-io dd { display: flex; align-items: flex-start; gap: .5rem; margin: 0; font-size: var(--fs-md); line-height: 1.4; }
.ab-io dd .i { flex: none; width: 16px; height: 16px; margin-top: .1rem; }
.ab-io dd > span { min-width: 0; text-wrap: balance; }
.ab-io-you dd { color: var(--fg-2); }
.ab-io-you dd .i { color: var(--fg-3); }
.ab-io-out dd { width: fit-content; padding: .3rem .75rem .3rem .55rem; border-radius: 999px; font-weight: 600; color: var(--accent-text); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent-line); }
.ab-io-out dd .i { stroke-width: 2.2; }

/* 3 · Direct contact (sheet) ---------------------------------------------- */
.ab-routes { gap: 12px; }
.ab-routes .route { padding: 20px 22px; }
.ab-routes .route-new { box-shadow: inset 0 0 0 1px var(--accent-line); }
.ab-route-foot { display: flex; align-items: flex-start; gap: .55rem; margin-top: 1rem; padding-top: .85rem; border-top: 1px dashed var(--line-2); font-size: var(--fs-sm); color: var(--fg-2); }
.ab-route-foot .i { width: 16px; height: 16px; margin-top: .15rem; color: var(--fg-3); }
.route-new .ab-route-foot .i { color: var(--accent-text); stroke-width: 2.2; }
.ab-direct-foot { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 12px; }
.ab-direct-foot .person { margin-top: 0; align-content: center; }
/* Fact card: icon beside the text, so it pairs with the horizontal person card */
.ab-fact { display: grid; grid-template-columns: 36px minmax(0, 1fr); column-gap: 16px; align-content: center; padding: 20px; border-radius: var(--r-lg); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.ab-fact .icon-tile { grid-row: span 2; }
.ab-fact h3 { margin: .3rem 0 .25rem; text-wrap: balance; }
.ab-fact p { font-size: var(--fs-md); color: var(--fg-2); text-wrap: pretty; }

/* 4 · Deliverables (paper) ------------------------------------------------ */
.ab-deliver .feature p { text-wrap: pretty; }
.ab-honest { display: grid; gap: 1.75rem clamp(2rem, 5vw, 4.5rem); align-items: center; margin-top: 16px; padding: clamp(22px, 3vw, 36px); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-card); }
.ab-after li { text-wrap: pretty; }
.ab-after h3 { margin-bottom: .9rem; font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-3); }

/* 5 · Preparation (sheet): three questions; the full example lives on /anfrage/ */
.ab-questions { list-style: none; display: grid; gap: 12px; }
.ab-q { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 16px; align-items: start; padding: 20px 22px; border-radius: var(--r-lg); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.ab-q-num { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; font-size: 1rem; font-weight: 650; color: #fff; background: var(--grad-brand-strong); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 6px 16px -6px rgba(30, 123, 255, .6); }
.ab-q h3 { margin-top: .35rem; }
.ab-q p { margin-top: .3rem; font-size: var(--fs-md); color: var(--fg-2); text-wrap: pretty; }

/* Motion (opt-in) ---------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  .is-run .ab-st i::after { animation: zf-halo 1.8s ease-out infinite; }
}

/* Responsive (DESIGN-SYSTEM §3 breakpoints only) --------------------------- */
@media (min-width: 1100px) {
  .ab-process { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(3rem, 6vw, 6rem); align-items: start; }
  .ab-process-head { position: sticky; top: calc(var(--header-h) + 32px); }
  .ab-routes { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ab-io { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
  /* Wide person card: one horizontal row, mail pushed to the far edge */
  .ab-direct-foot .person { display: flex; align-items: center; gap: 16px; }
  .ab-direct-foot .person-mail { margin-left: auto; }
  .ab-honest { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
}
@media (min-width: 760.02px) {
  .ab-questions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  /* Person + one fact side by side (tablet: mail sits under the name) */
  .ab-direct-foot { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ab-direct-foot .person { max-width: none; }
}
@media (max-width: 1099.98px) {
  .ab-hero-visual { justify-self: center; }
  .ab-process-head .section-head { max-width: 720px; }
}
@media (min-width: 760.02px) and (max-width: 1099.98px) {
  .ab-honest { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
}
@media (max-width: 760px) {
  /* Hero board: keep phases + open decisions; the contact tile goes (the hero names the person) */
  .ab-board-body { gap: 12px; padding: 14px 12px 14px; }
  .ab-board-foot { grid-template-columns: minmax(0, 1fr); }
  .ab-contact { display: none; }
  .ab-hero .btn-row .btn { flex: 1 1 auto; padding: 0 1rem; }

  /* Timeline: smaller node, input/output stacked; the icon tile goes, the notes stay. */
  .ab-timeline .timeline-item { grid-template-columns: 40px minmax(0, 1fr); column-gap: 12px; padding-bottom: 14px; }
  .ab-timeline .timeline-item::before { left: 19px; top: 40px; }
  .ab-timeline .timeline-item::after { width: 40px; height: 40px; box-shadow: inset 0 0 0 1px var(--accent-line), 0 0 0 4px var(--bg); }
  .ab-timeline .timeline-num { width: 40px; height: 40px; font-size: 1rem; }
  .ab-timeline .timeline-body { padding: 16px 16px 18px; }
  .ab-timeline .timeline-body h3 { margin-top: .45rem; }
  .ab-step-h .icon-tile { display: none; }
  .ab-timeline .timeline-body > p:not(.ab-step-note) { font-size: var(--fs-md); }
  .ab-step-note { margin-top: .6rem; }
  .ab-io { grid-template-columns: minmax(0, 1fr); gap: 10px; margin-top: 1rem; padding-top: .9rem; }
  .ab-io dt { margin-bottom: .3rem; }

  /* Direct fact: tighter row on phones */
  .ab-fact { column-gap: 14px; padding: 16px; }
  .ab-fact h3 { margin: .35rem 0 .2rem; }
  .ab-fact p { font-size: var(--fs-sm); }

  .ab-routes .route { padding: 16px; }
  .ab-q { grid-template-columns: 34px minmax(0, 1fr); gap: 12px; padding: 16px; }
  .ab-q-num { width: 34px; height: 34px; font-size: .9375rem; }
  .ab-q h3 { margin-top: .2rem; }

  /* Deliverables: compact rows (icon beside the heading), nothing hidden */
  .ab-deliver .feature { display: grid; grid-template-columns: 36px minmax(0, 1fr); column-gap: 14px; padding: 18px 16px; }
  .ab-deliver .icon-tile { grid-row: span 2; width: 36px; height: 36px; border-radius: 10px; }
  .ab-deliver .icon-tile .i { width: 18px; height: 18px; }
  .ab-deliver .feature h3 { margin: .3rem 0 .25rem; }
  .ab-deliver .feature p { font-size: var(--fs-sm); }
}
@media (max-width: 520px) {
  .ab-step-count, .ab-ph-t small { display: none; }
}
