/* ============================================================================
   hochzwei.tech 2026 Rebrand: Modern Workplace
   "Live Operations Control-Room" page-specific styles.
   Depends on core.css (tokens, primitives, shared components) and index.css
   (hero, sec-head--beside, handover, ms-card, faq, check-card).

   Green is a SEMANTIC status colour only (dots, chips, line endpoints), never a
   surface or third brand accent: blue stays the page accent, lime stays the
   marker highlight.
   No em-dashes or en-dashes anywhere (brand rule), comments included.
   ========================================================================== */

/* ---- 0. STATUS TOKENS (ampel; theme-aware, AA against each surface) ------ */
:root {
  --c-status-ok:   #1A7F46;   /* AA on white/off */
  --c-status-warn: #B45309;
  --c-status-crit: #C2401C;
}
[data-theme="dark"] {
  --c-status-ok:   #34D17E;   /* lighter for contrast on dark surfaces */
  --c-status-warn: #F0A93B;
  --c-status-crit: #F0664A;
}

/* ---- Status dot (shared signature) --------------------------------------- */
.ops-dot {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--c-status-ok);
  flex: 0 0 auto;
}
.ops-dot--breath { animation: opsBreath 2.4s ease-in-out infinite; }
@keyframes opsBreath { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .ops-dot--breath { animation: none; opacity: 1; }
}


/* ---- 2. HERO: live-ops board --------------------------------------------- */
/* The hero CTA row (shared .hero__cta, index.css) + the certification aside
   (replaces the home hero image). */
/* Unlike power-platform's teaser card (align-self: stretch) the board is a
   fixed-height tile grid, so it can't grow to match the now-longer H1's
   column height; top-align it instead of the shared hero__inner's
   align-items: center, which would otherwise float it in empty space. */
@media (min-width: 1025px) { .ops-hero .hero__inner { align-items: start; } }
/* The board itself: 6 status tiles inside the title brackets, replacing the photo. */
.hero__media { aspect-ratio: auto; background: transparent; }
.ops-board {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  background: var(--c-surface-2);
  border: 1px solid var(--c-border);
}
/* Dashboard title spanning both columns, labelling the KPI tiles below. */
.ops-board__title { grid-column: 1 / -1; color: var(--c-text-muted); margin-bottom: var(--space-1); }
.ops-tile {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: var(--space-4);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}
[data-theme="dark"] .ops-tile { background: var(--c-surface); }
.ops-tile__name {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1.5px;
  color: var(--c-text-muted);
}
.ops-tile__val {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--c-text);
}
/* Boot state: tiles wait on amber until the board "boots up" to green (JS). */
.ops-tile[data-boot="warn"] .ops-dot { background: var(--c-status-warn); }
.ops-tile[data-boot="warn"] .ops-tile__val { color: var(--c-text-muted); }
.ops-tile.is-booted .ops-dot { background: var(--c-status-ok); }
.ops-tile.is-booted .ops-tile__val { color: var(--c-text); }
.ops-tile.is-booting .ops-dot { animation: opsFlicker 0.5s steps(2) 2; }
@keyframes opsFlicker { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

/* Pinned hero (wide + motion-ok). The page JS adds .is-pinning while the board
   boots and sets an inline height (measured content height + small buffer,
   see modern-workplace.js) so the pin runway tracks actual content instead of
   a fixed vh that showed as a large blank gap whenever the headline was
   shorter than that guess. Without JS / reduced motion: normal static grid. */
@media (min-width: 1025px) {
  .ops-hero.is-pinning .container { position: sticky; top: clamp(96px, 12vh, 150px); }
}
@media (prefers-reduced-motion: reduce) {
  .ops-tile .ops-dot { background: var(--c-status-ok); }
  .ops-tile[data-boot="warn"] .ops-tile__val { color: var(--c-text); }
}

/* ---- 3. OUTCOME-STRIP (telemetry band) ----------------------------------- */
.ops-outcome { padding-block: clamp(2.5rem, 1.5rem + 3vw, 4.5rem); }
/* Shares the "Aus der Praxis" signature (index.css .praxis-title) with home +
   security; only the generous section margin is trimmed back for this
   compact, hero-adjacent strip. */
.ops-outcome .praxis-title { margin: 0 0 var(--space-6); }
.ops-outcome .stats__num { display: inline-flex; align-items: baseline; gap: 0.4rem; justify-content: center; }
.ops-trend {
  font-size: 0.32em;
  color: var(--c-status-ok);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
[data-theme="dark"] .ops-trend { color: var(--c-status-ok); }
.ops-outcome .is-counted .ops-trend { opacity: 1; transform: none; }
.ops-outcome .stats__src a { text-decoration: underline; text-underline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .ops-trend { opacity: 1; transform: none; } }

/* ---- 4. SHIFT-CARDS (before/after with status flip) ---------------------- */
.shift-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-6);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  background: var(--c-surface);
  box-shadow: var(--shadow-card);
}
.shift-card__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); }
.shift-card__idx { color: var(--c-text-muted); }
.shift-chip {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 3px;
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-sm);
  color: #fff;
  background: var(--c-status-crit);
  transition: background var(--transition);
}
.shift-chip__t::before { content: "[ "; }
.shift-chip__t::after  { content: " ]"; }
.shift-card.is-shifted .shift-chip { background: var(--c-status-ok); }
.shift-card.is-shifted .shift-chip__t { font-size: 0; }
.shift-card.is-shifted .shift-chip__t::before { content: "[ NACHHER"; font-size: 11px; }
.shift-card.is-shifted .shift-chip__t::after  { content: " ]"; font-size: 11px; }
.shift-card__before { color: var(--c-text-muted); text-decoration: line-through; opacity: 0.7; font-size: var(--fs-body); }
.shift-card__after {
  font-size: var(--fs-lead);
  color: var(--c-text);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity var(--transition), transform var(--transition);
}
.shift-card.is-shifted .shift-card__after { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .shift-card__after { opacity: 1; transform: none; }
}
@media (scripting: none) {
  .shift-card__after { opacity: 1; transform: none; }
}

/* ---- 6. HIGHLIGHT split (self-service + day1) ---------------------------- */
.hl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 4vw, 5rem);
  align-items: center;
}
/* "Zielbild" eyebrow: frames the two highlights as the target state after a
   successful rollout, not just features. */
.hl__eyebrow { display: block; margin-bottom: var(--space-4); }
.hl__title { font-size: var(--fs-h1); font-weight: 700; line-height: var(--lh-head); letter-spacing: -0.01em; margin-bottom: var(--space-5); text-wrap: balance; }
.hl__lede { font-size: var(--fs-lead); color: var(--c-text); margin-bottom: var(--space-6); max-width: 48ch; }
.band--blue .hl__lede { color: var(--c-brand-ink); opacity: 0.92; }
.hl__bullets { display: flex; flex-direction: column; gap: var(--space-4); }
.hl__bullet { display: flex; gap: var(--space-4); font-size: var(--fs-body); color: var(--c-text); align-items: baseline; }
.band--blue .hl__bullet { color: var(--c-brand-ink); }
.hl__bullet-idx { flex: none; color: var(--c-brand); }
.band--blue .hl__bullet-idx { color: var(--c-accent); }
/* Bullets fade in staggered on scroll-in (page JS adds .is-in). */
.hl__bullet { opacity: 0; transform: translateY(8px); transition: opacity 0.5s ease, transform 0.5s ease; }
.hl.is-in .hl__bullet { opacity: 1; transform: none; }
.hl.is-in .hl__bullet:nth-child(2) { transition-delay: 0.1s; }
.hl.is-in .hl__bullet:nth-child(3) { transition-delay: 0.2s; }
@media (prefers-reduced-motion: reduce) {
  .hl__bullet { opacity: 1; transform: none; }
}
.hl__media { position: relative; border-radius: var(--radius-lg); aspect-ratio: 4 / 3; background: var(--c-surface-2); }
.hl__media img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-lg); filter: grayscale(1); transition: filter 450ms ease; }
.hl__media:hover img { filter: grayscale(0); }
.band--blue .hl__media { background: rgba(255, 255, 255, 0.1); }

/* ---- day1-progress tick -------------------------------------------------- */
.hl__media-wrap { display: flex; flex-direction: column; gap: var(--space-5); }
.day1-progress {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--space-4);
}
.day1-progress__label { font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: 3px; color: var(--c-brand-ink); opacity: 0.85; white-space: nowrap; }
.day1-progress__track { position: relative; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.2); overflow: visible; }
.day1-progress__bar {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 0;
  border-radius: 3px;
  background: var(--white);
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.day1-progress.is-in .day1-progress__bar { width: 100%; }
.day1-progress__end {
  position: absolute;
  right: -2px; top: 50%;
  width: 0.7rem; height: 0.7rem;
  transform: translateY(-50%) scale(0);
  border-radius: 50%;
  background: var(--c-status-ok);
  box-shadow: 0 0 0 2px var(--c-band-blue);
  transition: transform 0.3s ease 1.1s;
}
.day1-progress.is-in .day1-progress__end { transform: translateY(-50%) scale(1); }
@media (prefers-reduced-motion: reduce) {
  .day1-progress__bar { width: 100%; transition: none; }
  .day1-progress__end { transform: translateY(-50%) scale(1); transition: none; }
}
@media (scripting: none) {
  .day1-progress__bar { width: 100%; transition: none; }
  .day1-progress__end { transform: translateY(-50%) scale(1); transition: none; }
}

/* ---- 7. WERKZEUGKASTEN (tool-pill marquee) ------------------------------- */
.toolbox__label { display: block; margin-bottom: var(--space-6); }
.toolbox__marquee { --marquee-dur: 40s; }
.toolbox__marquee .marquee__track { gap: var(--space-5); padding-block: var(--space-2); }
.tool-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  flex: none;
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--c-brand);
  padding: 0.6rem 1.1rem;
  border: 1.5px solid var(--c-brand);
  border-radius: var(--radius-sm);
  white-space: nowrap;
  background: var(--c-surface);
  transition: background var(--transition), color var(--transition);
}
[data-theme="dark"] .tool-pill { border-color: var(--c-border); color: var(--c-text); }
.tool-pill:hover { background: var(--c-brand); color: var(--c-brand-ink); border-color: var(--c-brand); }
.tool-pill__sub { text-transform: none; letter-spacing: 0; font-size: 0.85em; opacity: 0.75; }
.tool-pill--wide { font-weight: 700; }
@media (prefers-reduced-motion: reduce) {
  .toolbox__marquee .marquee { overflow: visible; }
  .toolbox__marquee .marquee__track { flex-wrap: wrap; width: auto; gap: var(--space-3); }
}
@media (max-width: 640px) {
  .tool-pill { font-size: 11px; padding: 0.5rem 0.85rem; }
}

/* ---- 8. VORGEHEN: 4-station timeline tweaks ------------------------------ */
/* The shared 4-column handover variant (.handover__row--4) now lives in
   index.css. These stay page-specific: the final station's green "laeuft"
   ring on activation and the extra pin runway for four stations. */
.handover__station--final.is-active .handover__marker {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--c-status-ok) 35%, transparent);
}
.handover__station--final .handover__marker { transition: width var(--transition), height var(--transition), font-size var(--transition), box-shadow var(--transition); }
@media (min-width: 1025px) {
  /* 4 stations need a touch more pin runway than the 3-station home timeline.
     Do not hang this on .is-pinned: the block would jump when the class
     lands. Full reasoning sits on the pin height in index.css. */
  .handover { height: 185vh; }
}
@media (min-width: 1025px) and (prefers-reduced-motion: reduce) {
  .handover { height: auto; }
}

/* ---- 9. INCIDENT-PLAYER (signature) -------------------------------------- */
.incident-player {
  position: relative;
  font-family: var(--font-mono);
  background: var(--c-surface-2);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  --bk: var(--c-brand);
}
.incident-player__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
  padding-bottom: var(--space-5);
  margin-bottom: var(--space-5);
  border-bottom: 1px solid var(--c-border);
}
.incident-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 12px;
  letter-spacing: 2px;
  font-weight: 700;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  color: var(--c-status-ok);
  border: 1px solid currentColor;
  transition: color var(--transition);
}
.incident-status .ops-dot { background: currentColor; }
.incident-status[data-state="warn"] { color: var(--c-status-warn); }
.incident-status[data-state="ok"]   { color: var(--c-status-ok); }
.incident-status.is-pulsing { animation: incidentPulse 1.4s ease-in-out infinite; }
@keyframes incidentPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }
@media (prefers-reduced-motion: reduce) { .incident-status.is-pulsing { animation: none; } }

.incident-replay {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--c-text);
  background: none;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.8rem;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.incident-replay:hover { background: var(--c-brand); color: var(--c-brand-ink); border-color: var(--c-brand); }

.incident-log { display: flex; flex-direction: column; }
.incident-line {
  display: flex;
  gap: var(--space-5);
  padding: 0.45rem 0;
  font-size: var(--fs-body);
  color: var(--c-text);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.incident-line.is-shown { opacity: 1; }
.incident-line__ts { flex: none; color: var(--c-text-muted); min-width: 3.5rem; }
.incident-line[data-status="warn"] { color: var(--c-status-warn); }
.incident-line[data-status="warn"] .incident-line__ts { color: var(--c-status-warn); opacity: 0.85; }
.incident-line[data-status="ok"] { color: var(--c-status-ok); }
.incident-line[data-status="ok"] .incident-line__ts { color: var(--c-status-ok); opacity: 0.85; }
.incident-line--final { font-weight: 700; padding-top: var(--space-4); margin-top: var(--space-3); border-top: 1px dashed var(--c-border); }
.incident-player__sub { font-family: var(--font-display); font-size: var(--fs-body); color: var(--c-text-muted); margin-top: var(--space-5); }
/* No-JS / reduced-motion: every line visible at once, header already RESOLVED. */
@media (prefers-reduced-motion: reduce) { .incident-line { opacity: 1; } }
@media (scripting: none) { .incident-line { opacity: 1; } }
@media (max-width: 640px) {
  .incident-line { flex-direction: column; gap: 0.15rem; }
  .incident-line__ts { min-width: 0; }
}

/* ---- 10. CASE panel ------------------------------------------------------ */
.case-panel {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
  padding: clamp(1.5rem, 1rem + 2vw, 3rem);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  background: var(--c-surface);
  box-shadow: var(--shadow-card);
}
.case-panel__media { position: relative; border-radius: var(--radius-lg); aspect-ratio: 4 / 3; background: var(--c-surface-2); --bk: var(--c-brand); }
.case-panel__media img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-lg); filter: grayscale(1); transition: filter 450ms ease; }
.case-panel__media:hover img { filter: grayscale(0); }
.case-panel__tags { display: flex; flex-wrap: wrap; gap: var(--space-4); margin-bottom: var(--space-4); }
.case-panel__title { font-size: var(--fs-h2); font-weight: 700; letter-spacing: -0.01em; margin-bottom: var(--space-4); }
.case-panel__story { font-size: var(--fs-body); color: var(--c-text); line-height: 1.5; margin-bottom: var(--space-5); }
.case-panel__metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-5); margin-bottom: var(--space-4); }
.case-metric__num { font-size: clamp(1.75rem, 1rem + 2.5vw, 2.5rem); font-weight: 600; line-height: 1; color: var(--c-brand); }
.case-metric__label { font-size: var(--fs-label); color: var(--c-text-muted); margin-top: var(--space-2); line-height: 1.3; }
.case-panel__body .btn { margin-top: var(--space-2); }
@media (max-width: 1024px) {
  .case-panel { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .case-panel__metrics { grid-template-columns: 1fr; gap: var(--space-4); }
}

/* ---- 11. MANAGED: sku line ----------------------------------------------- */
/* .ms-card__sku/.ms-card__foot already carry .mono-label in the markup for the
   shared 3px tracking; only the page-specific hover colour + layout are added here. */
.ms-card--ops:hover .ms-card__sku { color: var(--c-brand-ink); opacity: 0.85; }
.ms-card__foot { margin-top: auto; }
.ms-card--ops:hover .ms-card__foot { color: var(--c-brand-ink); opacity: 0.8; }
.managed__cta { display: flex; justify-content: center; margin-top: var(--space-8); }

/* ---- 12. CROSS-SELL cards ------------------------------------------------ */
.cross-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-7);
  border: 1.5px solid var(--c-brand);
  border-radius: var(--radius-lg);
  background: var(--c-surface);
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition);
}
.cross-card__title { font-size: var(--fs-h3); font-weight: 700; }
.cross-card__body { font-size: var(--fs-body); color: var(--c-text); flex: 1; }
.cross-card__link { display: inline-flex; align-items: center; gap: 0.6em; font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: 3px; text-transform: uppercase; color: var(--c-brand); margin-top: var(--space-3); }
.cross-card__link .arrow { transition: transform var(--transition); }
.cross-card:hover {
  background: var(--c-brand);
  color: var(--c-brand-ink);
  border-color: transparent;
  transform: translateY(-4px) scale(1.01);
  box-shadow: var(--shadow-pop);
}
.cross-card:hover .cross-card__body { color: var(--c-brand-ink); opacity: 0.92; }
.cross-card:hover .cross-card__link { color: var(--c-brand-ink); }
.cross-card:hover .cross-card__link .arrow { transform: translateX(3px); }
@media (max-width: 640px) { .grid-2 { grid-template-columns: 1fr; } }

/* ---- 13. CLOSE-CTA ------------------------------------------------------- */
.close-cta { max-width: 70ch; }
.close-cta__text { font-size: var(--fs-lead); color: var(--c-brand-ink); opacity: 0.92; margin: var(--space-5) 0 var(--space-6); max-width: 56ch; }
.close-cta__row { display: flex; flex-wrap: wrap; gap: var(--space-4); margin-bottom: var(--space-6); }

/* ---- 14. RESPONSIVE (highlights, hero) ----------------------------------- */
@media (max-width: 1024px) {
  .hl { grid-template-columns: 1fr; }
  .hl__media { order: -1; aspect-ratio: 16 / 10; }
  .hl--dark .hl__media-wrap { order: -1; }
  .ops-board { aspect-ratio: 16 / 10; }
}
@media (max-width: 640px) {
  .ops-board { grid-template-columns: 1fr; aspect-ratio: auto; }
  /* index.css reorders the Home hero (kicker, media, title, lead, btn) via
     .hero__copy{display:contents} + per-element order, assuming ONE inline .btn.
     This hero wraps its two CTAs in .hero__cta and shows a tall ops-board, so
     that wrapper would default to order 0 (jump above the kicker) and the board
     would slot between kicker and title. Restore natural reading order:
     kicker (order 1 from index.css), title, lead, CTAs, board. */
  .ops-hero .hero__title { order: 2; }
  .ops-hero .hero__lead  { order: 3; }
  .ops-hero .hero__cta   { order: 4; margin-bottom: 0; }
  .ops-hero .hero__media { order: 5; }
  /* Content-width CTAs (wrap to their own line when they do not fit) instead of
     two stacked full-width blocks, which read far too heavy on phones. */
  .hero__cta .btn { width: auto; }
}
