/* Component styles (spec 10.5, chapter 6 navigation, chapter 11 hover and focus). */

/* Layout helpers */
.cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
  margin: 0 0 var(--space-6);
  padding: 0;
  list-style: none;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: var(--grid-gap);
  margin: 0 0 var(--space-6);
  padding: 0;
  list-style: none;
}

/* Skip link: off-screen until focused */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-4);
  z-index: 20;
  padding: var(--space-2) var(--space-4);
  background-color: var(--white);
  color: var(--navy-900);
  font-weight: 600;
}

.skip-link:focus {
  top: var(--space-2);
}

/* Buttons in GitHub style (D20): 6 px radius, compact height, system font, flat fill. */
.button {
  display: inline-flex;
  align-items: center;
  text-wrap: balance;
  gap: var(--space-2);
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  box-shadow: 0 1px 0 rgba(1, 4, 9, 0.08);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition:
    background-color var(--hover-duration),
    border-color var(--hover-duration);
}

.button-primary {
  border-color: rgba(1, 4, 9, 0.18);
  background-color: var(--orange);
  color: var(--navy-900);
}

.button-primary:hover,
.button-primary:focus-visible {
  background-color: var(--orange-strong);
}

.button-secondary {
  border-color: var(--button-border);
  background-color: var(--button-bg);
  color: var(--button-text);
}

.button-secondary:hover,
.button-secondary:focus-visible {
  background-color: var(--button-hover);
}

/* Text link */
.text-link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.text-link:hover,
.text-link:focus-visible {
  text-decoration-thickness: 2px;
}

/* Text link with a brand logo before the label (LinkedIn in the footer): logo and text stay together. */
.icon-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
}

.link-icon {
  flex: none;
  width: 1.125em;
  height: 1.125em;
  /* LinkedIn and GitHub allow their marks only in black or white, never in the accent colour. */
  color: var(--text);
}

/* Arrows move only via transform, so they need a box */
.arrow {
  display: inline-block;
  transition: transform var(--hover-duration);
}

/* Product names are brand names: never hyphenated, although German text inherits hyphens: auto.
   The explore button of a room carries the product name. Wrapping between words stays possible. */
.product-name,
.room .button {
  hyphens: manual;
}

/* Status label in GitHub style (D20): tinted fill, framed in its text color, status as text only. */
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border: 1px solid currentColor;
  border-radius: var(--radius-control);
  color: var(--badge-wait);
  background-color: var(--badge-wait-bg);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 20px;
  white-space: nowrap;
}

.badge[data-status="live"] {
  color: var(--badge-live);
  background-color: var(--badge-live-bg);
}

.badge[data-status="early-access"] {
  color: var(--badge-early);
  background-color: var(--badge-early-bg);
}

/* Plate */
.plate {
  border: 1px solid var(--plate-border);
  background-color: var(--plate-bg);
}

.plate-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-2) var(--space-4);
  padding: var(--space-3) var(--space-5);
  border-bottom: 1px solid var(--plate-border);
  font-family: var(--font-body);
  font-size: var(--fs-label);
  font-weight: var(--fw-label);
  line-height: var(--lh-label);
  letter-spacing: var(--ls-label);
}

.plate-head p {
  margin: 0;
}

.plate-meta {
  color: var(--text-muted);
}

.plate-body {
  padding: var(--space-5);
}

.plate-body > :last-child {
  margin-bottom: 0;
}

@media (min-width: 768px) {
  .plate-body {
    padding: var(--space-6);
  }
}

/* Index row */
.index-list {
  margin: 0 0 var(--space-6);
  padding: 0;
  list-style: none;
}

.index-row {
  border-top: var(--hairline) solid var(--rule);
}

.index-row-link,
.index-row-static {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  min-height: 56px;
  padding: var(--space-3) var(--space-2);
}

.index-row-link {
  color: var(--text);
  text-decoration: none;
  transition: background-color var(--hover-duration);
}

.index-row-link:hover,
.index-row-link:focus-visible {
  background-color: var(--hover-bg);
}

.index-row-title {
  flex: 1;
  font-family: var(--font-display);
  font-weight: 600;
}

.index-row-meta {
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: var(--fs-label);
  font-weight: var(--fw-label);
  letter-spacing: var(--ls-label);
}

/* Fact */
.fact {
  margin: 0;
}

.fact-value {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--fs-display-l);
  line-height: var(--lh-display-l);
  letter-spacing: var(--ls-display-l);
  font-weight: var(--fw-display-l);
  font-variant-numeric: tabular-nums;
}

.fact-label {
  margin: var(--space-2) 0 0;
}

/* Seam ("Der Schnitt"): full-width hairline with a 48 px gap where grid column 8 starts */
.seam {
  --seam-gap-start: calc(
    max(0px, (100% - var(--container-max)) / 2) +
    var(--gutter) +
    (min(100%, var(--container-max)) - 2 * var(--gutter) + var(--grid-gap)) *
    7 / 12
  );
  height: var(--hairline);
  background-image: linear-gradient(
    to right,
    var(--rule) var(--seam-gap-start),
    transparent var(--seam-gap-start),
    transparent calc(var(--seam-gap-start) + 48px),
    var(--rule) calc(var(--seam-gap-start) + 48px)
  );
}

/* Room shell: DDM elements at fixed positions, neutral default theme */
/* Neutral DDM room for entries without `theme` (spec 8.5): paper, navy frame, logo on white. */
[data-theme="ddm"] {
  --text: var(--navy-900);
  --text-muted: var(--ink-muted);
  --accent: var(--orange-ink);
  --rule: var(--line);
  --focus: var(--orange-ink);
  --hover-bg: var(--white);
  background-color: var(--paper);
  color: var(--text);
}

.room[data-theme="ddm"] {
  border-color: var(--navy-900);
}

[data-theme="ddm"] .room-logo {
  padding: var(--space-2) var(--space-3);
  background-color: var(--white);
}

.room {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-5);
  border: 1px solid var(--line);
  transition:
    border-color var(--hover-duration),
    transform var(--hover-duration);
}

.room:hover,
.room:focus-within {
  border-color: var(--navy-900);
}

.room-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  align-self: stretch;
}

.room-top .label,
.room-title,
.room p {
  margin: 0;
}

/* Hover transforms only when motion is welcome */
@media (prefers-reduced-motion: no-preference) {
  .index-row-link:hover .arrow,
  .index-row-link:focus-visible .arrow {
    transform: translateX(var(--arrow-shift));
  }

  .room:hover,
  .room:focus-within {
    transform: translateY(calc(-1 * var(--hover-lift)));
  }
}

/* Header */
:root {
  --header-height: 4.5rem;
  /* Jump targets (anchors, skip link) stop below the sticky header instead of behind it. */
  --header-offset: calc(var(--header-height) + var(--hairline) + var(--space-4));
}

.site-header {
  z-index: 10;
  border-bottom: var(--hairline) solid var(--navy-600);
}

/* Over the hero the hairline is transparent, after scrolling it shows (spec 6). Bound to the scroll
   position, without duration; browsers without scroll timelines keep the permanent hairline. */
@supports (animation-timeline: scroll()) {
  .site-header {
    animation: header-hairline linear both;
    animation-timeline: scroll(root);
    animation-range: 0 4.5rem;
  }
}

@keyframes header-hairline {
  from {
    border-bottom-color: transparent;
  }

  to {
    border-bottom-color: var(--navy-600);
  }
}

.js .site-header {
  position: sticky;
  top: 0;
}

/* The offset applies exactly where the header is sticky: with JS, and from 900 px on (see below). */
.js {
  scroll-padding-top: var(--header-offset);
}

.site-header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 var(--space-4);
  min-height: var(--header-height);
}

.site-logo {
  display: inline-flex;
  align-items: center;
  min-height: var(--header-height);
}

.site-logo-full {
  display: none;
  width: auto;
  height: 2.5rem;
}

.site-logo-signet {
  display: block;
  width: auto;
  height: 1.75rem;
  fill: var(--white);
}

.menu-toggle {
  display: none;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--space-4);
  border: 1px solid var(--button-border);
  border-radius: var(--radius-control);
  box-shadow: 0 1px 0 rgba(1, 4, 9, 0.08);
  background-color: var(--button-bg);
  color: var(--button-text);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
}

.menu-toggle:hover,
.menu-toggle:focus-visible {
  background-color: var(--button-hover);
}

.site-nav {
  display: flex;
  flex-basis: 100%;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4) var(--space-5);
  padding-bottom: var(--space-4);
}

.site-nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav-list a {
  display: inline-block;
  padding-block: var(--space-2);
  font-family: var(--font-display);
  font-weight: 600;
  text-decoration: none;
}

.site-nav-list a[aria-current="page"],
.lang-switch a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.35em;
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-weight: 600;
}

.lang-switch a {
  display: inline-block;
  padding: var(--space-2) var(--space-1);
  text-decoration: none;
}

@media (min-width: 900px) {
  :root {
    scroll-padding-top: var(--header-offset);
  }

  .site-header {
    position: sticky;
    top: 0;
  }

  .site-logo-full {
    display: block;
  }

  .site-logo-signet {
    display: none;
  }

  .site-nav {
    flex-basis: auto;
    flex-wrap: nowrap;
    padding-bottom: 0;
  }

  .site-nav-list {
    flex-wrap: nowrap;
  }
}

@media (min-width: 900px) and (max-width: 1023.98px) {
  .site-nav,
  .site-nav-list {
    column-gap: var(--space-4);
  }
}

/* Below 900 px with JS: the navigation collapses into a full-screen panel behind the menu button */
@media (max-width: 899.98px) {
  .js .menu-toggle {
    display: inline-flex;
  }

  .js .site-nav {
    display: none;
  }

  .js .menu-toggle[aria-expanded="true"] + .site-nav {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: flex-start;
    position: fixed;
    inset: var(--header-height) 0 0;
    padding: var(--space-6) var(--gutter);
    overflow-y: auto;
    background-color: var(--navy-900);
    box-shadow: 0 1.5rem 3rem rgba(8, 17, 31, 0.5);
  }

  .js .site-nav-list {
    flex-direction: column;
  }

  .js .site-nav-list a {
    font-size: 1.75rem;
  }

  .js .site-nav-list .site-nav-sub a {
    font-size: 1rem;
  }
}

/* Mobile panel only: product links from the registry and the contact line (spec 6) */
.site-nav-sub {
  display: grid;
  gap: var(--space-1);
  margin: 0 0 var(--space-2);
  padding: 0 0 0 var(--space-4);
  list-style: none;
}

.site-nav-contact {
  margin: 0;
}

.site-nav-contact a {
  display: inline-block;
  padding-block: var(--space-2);
}

@media (min-width: 900px) {
  .site-nav-sub,
  .site-nav-contact {
    display: none;
  }
}

/* Footer */
.site-footer-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  gap: var(--space-6) var(--grid-gap);
}

.site-footer-columns h2 {
  margin-bottom: var(--space-3);
}

/* Narrow footer columns: the meta of a row (product category) goes below title and arrow. */
.site-footer .index-row-link {
  flex-wrap: wrap;
  row-gap: var(--space-1);
}

.site-footer .index-row-meta {
  flex-basis: 100%;
  order: 1;
}

.site-footer-contact {
  font-style: normal;
}

.site-footer-contact p {
  margin: 0 0 var(--space-3);
}

.site-footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3) var(--space-6);
  margin-top: var(--space-7);
  padding-top: var(--space-5);
  border-top: var(--hairline) solid var(--rule);
}

.site-footer-bottom p {
  margin: 0;
  color: var(--text-muted);
}

/* Home page (spec chapter 7) */

/* Plates on dark: no orange text on navy-700 (4.31:1), links and accents use the text color. */
.surface-night .plate,
.surface-deep .plate {
  --accent: var(--text);
}

/* 02 Hero: 7:5 from 1024 px, height by content; arcs from the signet behind the register */
.hero {
  position: relative;
  overflow: hidden;
}

.hero-arcs {
  position: absolute;
  top: var(--space-6);
  right: -18%;
  width: min(60rem, 80vw);
  height: auto;
  fill: var(--navy-700);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  gap: var(--space-6);
  padding-block: var(--space-6) var(--space-7);
}

.hero h1 {
  margin: var(--space-3) 0 var(--space-4);
  hyphens: auto;
}

.hero-line {
  display: block;
}

/* Second line in orange (D22: the H1 has two lines). */
.hero-line-2 {
  font-weight: 600;
  color: var(--orange);
}

/* The sub line uses the full column (not the 65ch of running text) and wraps between words only, so
   it stays on one line on desktop in both languages (D21). */
.hero-text .lead {
  max-width: none;
  margin: 0 0 var(--space-5);
  hyphens: manual;
}

.hero-actions {
  margin: 0;
}

@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: 7fr 5fr;
    align-items: center;
    gap: var(--grid-gap);
    padding-block: var(--space-5) var(--space-6);
  }
}

/* Register (D20): one box in GitHub style, products as rows with the status label on the right. */
.register {
  border: 1px solid var(--plate-border);
  border-radius: var(--radius-control);
  background-color: var(--navy-800);
}

.register-head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--plate-border);
  background-color: var(--navy-700);
}

/* The first head rounds its own top corners: overflow: hidden on the box would clip the last list by
   half a pixel in WebKit, which rounds the clip edge. */
.register-head:first-child {
  border-radius: calc(var(--radius-control) - 1px) calc(var(--radius-control) - 1px) 0 0;
}

ul + .register-head {
  border-top: 1px solid var(--plate-border);
}

.register-title {
  margin: 0;
  font-size: var(--fs-label);
  font-weight: var(--fw-label);
  line-height: var(--lh-label);
}

.register-count {
  min-width: 20px;
  padding: 0 6px;
  border-radius: var(--radius-control);
  background-color: var(--navy-600);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 18px;
  text-align: center;
}

.register-products,
.register-services {
  margin: 0;
  list-style: none;
}

.register-products {
  padding: 0;
}

/* Icon, name with category, status label on the right (D21: product icons). */
.register-product {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-2) var(--space-3);
  padding: var(--space-3) var(--space-4);
}

/* App-icon tiles bring their own fill; the ring keeps dark tiles visible on the navy box. */
.register-icon,
.matrix-icon {
  display: block;
  border-radius: var(--radius-control);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.24);
}

/* Above the name in every row: long names wrap in the narrow first column. */
.matrix-icon {
  margin: 0 0 var(--space-2);
}

.register-product + .register-product {
  border-top: 1px solid var(--rule);
}

.register-main {
  display: grid;
  justify-items: start;
  gap: 2px;
}

.register-product a {
  font-family: var(--font-display);
  font-weight: 600;
}

.register-note {
  display: block;
  font-family: var(--font-body);
  font-size: var(--fs-small);
  font-weight: 400;
}

.register-meta {
  color: var(--text-muted);
  font-size: var(--fs-small);
}

.register-services {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2) var(--space-4);
  padding: var(--space-3) var(--space-4) var(--space-4);
  color: var(--text-muted);
  font-size: var(--fs-small);
}

/* Phones: the status label moves below name and category. */
@media (max-width: 479.98px) {
  .register-product {
    grid-template-columns: 28px minmax(0, 1fr);
    align-items: start;
  }

  .register-product .badge {
    grid-column: 2;
    justify-self: start;
  }
}

/* 03 Two sides: 6/6 with a vertical hairline that has the seam gap; above it the definition sentence
   (M-01, D23). */
.two-intro {
  max-width: 60ch;
  margin: 0 0 var(--space-6);
}

.two-grid {
  display: grid;
  gap: var(--space-6);
}

.two-col > :first-child {
  margin-top: 0;
}

@media (min-width: 768px) {
  .two-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0;
  }

  .two-col + .two-col {
    padding-left: var(--space-7);
    background:
      linear-gradient(var(--rule), var(--rule)) left top / 1px 30% no-repeat,
      linear-gradient(var(--rule), var(--rule)) left bottom / 1px calc(70% - 48px) no-repeat;
  }

  .two-col:first-child {
    padding-right: var(--space-7);
  }
}

/* 04 Product rooms: full bands, visual alternating left and right */
.rooms {
  display: grid;
  gap: var(--space-6);
  margin: var(--space-6) 0;
  padding: 0;
  list-style: none;
}

.room-band {
  display: grid;
  align-items: stretch;
  padding: 0;
  overflow: hidden;
}

.room-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: var(--space-4);
  padding: var(--space-5);
}

.room-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  order: -1;
  min-width: 0;
  padding: var(--space-5);
}

.room-logo {
  display: inline-flex;
}

.room-logo img {
  display: block;
  width: auto;
  height: 2.5rem;
}

.translated-note {
  color: var(--text-muted);
}

@media (min-width: 768px) {
  .room-band {
    grid-template-columns: 1fr 1fr;
  }

  .room-visual {
    order: 0;
  }

  .rooms > li:nth-child(even) .room-visual {
    order: -1;
  }
}

@media (min-width: 1024px) {
  .room-band {
    grid-template-columns: 5fr 7fr;
    min-height: 520px;
  }

  .rooms > li:nth-child(even) .room-band {
    grid-template-columns: 7fr 5fr;
  }

  .room-text {
    padding: var(--space-7);
  }

  .room-visual {
    padding: var(--space-7) var(--space-6);
  }
}

/* 05 Proof matrix: table from 1024 px, cards with labelled rows below (at 768 px five columns left
   cells of 90 px that hyphenated every second word) */
.matrix {
  margin: var(--space-6) 0;
}

.matrix-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.matrix-table th,
.matrix-table td {
  position: relative;
  padding: var(--space-4) var(--space-3);
  vertical-align: top;
}

/* The cells are short statements (D21) and keep whole words: no automatic hyphenation. The long
   German compounds ("Betriebskostenverordnung") carry a soft hyphen at their joint (escJoints in
   html.mjs), so a narrow cell breaks them as "Betriebskosten-/verordnung"; overflow-wrap is the
   last resort. */
.matrix-table td {
  hyphens: manual;
  overflow-wrap: break-word;
}

.matrix-table thead th {
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: var(--fs-label);
  font-weight: var(--fw-label);
  letter-spacing: var(--ls-label);
}

.matrix-table tbody th {
  font-family: var(--font-display);
  font-weight: 600;
}

/* Hairline per cell: an SVG exactly 1 px high over the full cell width (stroke-dashoffset, spec 11). */
.matrix-line {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  overflow: visible;
}

.matrix-line path {
  fill: none;
  stroke: var(--rule);
}

.matrix-sources {
  margin: var(--space-5) 0 0;
  color: var(--text-muted);
}

@media (max-width: 1023.98px) {
  .matrix-table,
  .matrix-table tbody,
  .matrix-table tr,
  .matrix-table th,
  .matrix-table td {
    display: block;
  }

  /* Column heads stay in the accessibility tree; the rows carry them as labels. */
  .matrix-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .matrix-table tbody tr + tr {
    margin-top: var(--space-5);
  }

  .matrix-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: var(--space-1);
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: var(--fs-label);
    font-weight: var(--fw-label);
    letter-spacing: var(--ls-label);
  }
}

@media (max-width: 767.98px) {
  .index-table,
  .index-table tbody,
  .index-table tr,
  .index-table th,
  .index-table td {
    display: block;
  }

  /* Column heads stay in the accessibility tree; the rows carry them as labels. */
  .index-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .index-table tbody tr + tr {
    margin-top: var(--space-5);
  }

  .index-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: var(--space-1);
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: var(--fs-label);
    font-weight: var(--fw-label);
    letter-spacing: var(--ls-label);
  }
}

/* 06 Expertise: four columns from 1280 px, 2 x 2 from 768 px, stacked below */
.expertise-groups {
  display: grid;
  gap: var(--space-7) var(--grid-gap);
  margin: var(--space-6) 0 0;
  padding: 0;
  list-style: none;
}

.expertise-letter {
  margin: 0 0 var(--space-3);
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
}

@media (min-width: 768px) {
  .expertise-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1280px) {
  .expertise-groups {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* 07 Approach: vertical track with a straight line on mobile, 4 + 3 on tablet, one row with arcs */
.steps {
  display: grid;
  gap: var(--space-6);
  margin: var(--space-6) 0 0;
  padding: 0 0 0 var(--space-5);
  border-left: var(--hairline) solid var(--line-strong);
  list-style: none;
}

.step {
  position: relative;
}

.step h3 {
  margin: 0 0 var(--space-2);
  font-size: 1rem;
  hyphens: manual;
}

.step p {
  margin: 0;
}

.step .step-no {
  margin: 0 0 var(--space-2);
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.step-arc {
  display: none;
}

.step-arc path {
  fill: none;
  stroke: var(--line-strong);
}

@media (min-width: 768px) {
  .steps {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    column-gap: var(--grid-gap);
    padding: 0;
    border-left: 0;
  }

  .step {
    padding-top: var(--space-7);
  }

  .step-arc {
    display: block;
    position: absolute;
    top: var(--space-2);
    left: calc(-0.5 * var(--grid-gap) - 24px);
    width: 48px;
    height: 25px;
  }
}

@media (min-width: 1280px) {
  .steps {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }
}

/* 08 Team: 5:7, facts in a row of two (stacked below 360 px) */
.team-grid {
  display: grid;
  gap: var(--space-7);
  margin-top: var(--space-6);
}

.team-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-5) var(--space-4);
  align-content: start;
}

.team-body .lead {
  margin-top: 0;
}

@media (max-width: 359.98px) {
  .team-facts {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 1024px) {
  .team-grid {
    grid-template-columns: 5fr 7fr;
  }

  .team-facts {
    grid-template-columns: 1fr;
  }
}

/* 09 Contact: headline left, data right */
.contact-grid {
  display: grid;
  gap: var(--space-6);
}

.contact-grid h2 {
  margin-top: 0;
}

.contact-data address {
  margin: var(--space-4) 0 var(--space-5);
  font-style: normal;
}

.contact-data p {
  margin: 0 0 var(--space-2);
}

@media (min-width: 1024px) {
  .contact-grid {
    grid-template-columns: 7fr 5fr;
    align-items: end;
  }
}

/* Motion of the home page (spec 11): only with .motion-ok and without reduced motion. Without them the
   end state applies: lines drawn, no transform. pathLength="1" makes the dash values length-independent. */
@keyframes arcs-parallax {
  from {
    transform: translateY(0);
  }

  to {
    transform: translateY(6vh);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .motion-ok .matrix-line path,
  .motion-ok .step-arc path {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    transition: stroke-dashoffset 600ms var(--reveal-ease);
  }

  .motion-ok .matrix.is-revealed .matrix-line path,
  .motion-ok .steps.is-revealed .step-arc path {
    stroke-dashoffset: 0;
  }

  /* Matrix: the segment of each column starts later, so the line runs from left to right. */
  .motion-ok .matrix-table td:nth-child(2) .matrix-line path {
    transition-delay: 120ms;
  }

  .motion-ok .matrix-table td:nth-child(3) .matrix-line path {
    transition-delay: 240ms;
  }

  .motion-ok .matrix-table td:nth-child(4) .matrix-line path {
    transition-delay: 360ms;
  }

  .motion-ok .matrix-table td:nth-child(5) .matrix-line path {
    transition-delay: 480ms;
  }

  /* Approach: arcs one after another, 80 ms apart. */
  .motion-ok .step:nth-child(3) .step-arc path {
    transition-delay: 80ms;
  }

  .motion-ok .step:nth-child(4) .step-arc path {
    transition-delay: 160ms;
  }

  .motion-ok .step:nth-child(5) .step-arc path {
    transition-delay: 240ms;
  }

  .motion-ok .step:nth-child(6) .step-arc path {
    transition-delay: 320ms;
  }

  .motion-ok .step:nth-child(7) .step-arc path {
    transition-delay: 400ms;
  }
}

/* Parallax of the hero arcs only, from 1024 px, at most 6 % of the scroll distance. */
@supports (animation-timeline: scroll()) {
  @media (min-width: 1024px) and (prefers-reduced-motion: no-preference) {
    .motion-ok .hero-arcs {
      animation: arcs-parallax linear both;
      animation-timeline: scroll(root);
      animation-range: 0 100vh;
    }
  }
}

/* Subpages (phase 4): page head, breadcrumb, index table, status legend, facts, running text,
   expertise page, contact details. Only existing tokens and surface variables. */
.page-head .band {
  padding-block: var(--space-8);
}

.page-head h1 {
  margin: 0;
  font-size: var(--fs-h2);
  line-height: var(--lh-h2);
  letter-spacing: var(--ls-h2);
  overflow-wrap: break-word;
}

/* Long German compounds ("Datenschutzerklärung") break with a hyphen on small phones instead of
   running into the gutter (spec 7), at the joint the generator marks with a soft hyphen
   (escHeading in html.mjs), never inside a syllable; overflow-wrap is the last resort (see
   .page-head-grid). */
:lang(de) .page-head h1 {
  hyphens: manual;
}

/* Like every lead (base.css) the page lead is balanced and wraps between words only: in large type a
   hyphenated "ste-hen" or a sentence start alone at a line end reads as a break, not as text.
   overflow-wrap stays the guard for a word longer than the column on small phones. */
.page-head .lead {
  margin: var(--space-5) 0 0;
  max-width: 60ch;
  hyphens: manual;
  overflow-wrap: break-word;
}

/* minmax(0, 1fr): the column keeps the container width instead of growing to the longest word, so
   overflow-wrap can break it where the browser has no hyphenation dictionary (WebKit on Linux). */
.page-head-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-6);
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0 0 var(--space-5);
  padding: 0;
  list-style: none;
  font-family: var(--font-body);
  font-size: var(--fs-label);
  font-weight: var(--fw-label);
  letter-spacing: var(--ls-label);
}

.breadcrumb a {
  color: var(--text);
}

.breadcrumb [aria-current="page"] {
  color: var(--text-muted);
}

.index-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: var(--fs-small);
  line-height: var(--lh-small);
}

.index-table th,
.index-table td {
  padding: var(--space-3) var(--space-2);
  border-top: 1px solid var(--rule);
  vertical-align: top;
}

/* Categories are short labels: they never break inside, the table makes room (badges never wrap). */
.index-table .index-category {
  white-space: nowrap;
}

.index-table thead th {
  border-top: 0;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: var(--fs-label);
  font-weight: var(--fw-label);
  letter-spacing: var(--ls-label);
}

.index-table tbody th {
  font-family: var(--font-display);
  font-weight: 600;
}

/* The product column is the only one set in the web font. With a width of its own, the automatic
   table layout no longer redistributes the columns when Montserrat replaces the fallback, so a
   wrapping website link keeps its line count through the font swap (spec 13: CLS). 18 % is the
   share the column had on /en/products/ before the longer English website labels (copy deck
   N-12). Where the nowrap columns leave less, as on /produkte/ at 768 px, the column takes the
   rest; that stays stable while its minimum width in both fonts fits into it (font swap test). */
@media (min-width: 768px) {
  .index-table tr > :first-child {
    width: 18%;
  }
}

.index-table a {
  color: var(--text);
}

.status-legend {
  display: grid;
  gap: var(--space-4) var(--grid-gap);
  margin: var(--space-7) 0 0;
}

.status-legend dt,
.status-legend dd {
  margin: 0;
}

.status-legend dd {
  margin-top: var(--space-2);
  color: var(--text-muted);
  font-size: var(--fs-small);
}

@media (min-width: 768px) {
  .status-legend {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .status-legend {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.room-facts-title {
  margin: var(--space-2) 0 0;
  font-size: var(--fs-label);
  font-family: var(--font-body);
  font-weight: var(--fw-label);
  letter-spacing: var(--ls-label);
}

.room-facts {
  margin: 0;
  padding: 0;
  list-style: none;
}

.room-facts li {
  padding: var(--space-2) 0;
  border-top: 1px solid var(--rule);
}

.room-source {
  color: var(--text-muted);
}

.relation .lead {
  max-width: 60ch;
}

.prose > * {
  max-width: 70ch;
}

.prose h2 {
  margin: var(--space-7) 0 var(--space-4);
  font-size: var(--fs-h3);
  line-height: var(--lh-h3);
  letter-spacing: var(--ls-h3);
}

/* Questions under a prose h2 (cloud FAQ, D23): one step below the h2, close to their answer. */
.prose h3 {
  margin: var(--space-6) 0 var(--space-2);
  font-size: var(--fs-lead);
  line-height: var(--lh-lead);
  letter-spacing: var(--ls-lead);
}

.prose > h2:first-child,
.prose > h1:first-child {
  margin-top: 0;
}

.prose p,
.prose ol,
.prose ul {
  margin: 0 0 var(--space-4);
}

.prose li + li {
  margin-top: var(--space-2);
}

.prose a {
  color: var(--text);
}

.expertise-page-group .lead {
  max-width: 60ch;
}

.expertise-items {
  display: grid;
  gap: var(--space-5) var(--grid-gap);
  margin: var(--space-6) 0 0;
  padding: 0;
  list-style: none;
}

.expertise-items li {
  padding-top: var(--space-4);
  border-top: 1px solid var(--rule);
}

.expertise-items h3 {
  margin-bottom: var(--space-3);
}

.expertise-items p {
  margin: 0 0 var(--space-3);
}

@media (min-width: 768px) {
  .expertise-items {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.contact-data dl {
  margin: var(--space-4) 0 var(--space-5);
}

.contact-data dt {
  margin: var(--space-3) 0 var(--space-1);
  color: var(--text-muted);
}

.contact-data dd {
  margin: 0;
}

/* D23: when to contact DDM and the company details below the contact details, /kontakt/ only. */
.contact-more {
  grid-column: 1 / -1;
  padding-top: var(--space-6);
  border-top: 1px solid var(--rule);
}

.contact-more h2 {
  margin-top: var(--space-6);
}

/* Open source page (09.10.2026): repositories as a two-column list like the expertise entries; long
   repository names break anywhere instead of running into the gutter. */
.oss-list {
  display: grid;
  gap: var(--space-5) var(--grid-gap);
  margin: 0;
  padding: 0;
  list-style: none;
}

.oss-item {
  padding-top: var(--space-4);
  border-top: 1px solid var(--rule);
}

.oss-name {
  margin-bottom: var(--space-3);
  font-size: var(--fs-h3);
  line-height: var(--lh-h3);
  letter-spacing: var(--ls-h3);
  overflow-wrap: anywhere;
  hyphens: manual;
}

.oss-item p {
  margin: 0 0 var(--space-3);
}

.oss-meta {
  color: var(--text-muted);
}

.oss-all {
  margin: var(--space-7) 0 0;
}

@media (min-width: 768px) {
  .oss-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
