/* service.css — /service hub register, /service/technik stations and the generic
   /service/<key> placeholder page. The hub deliberately does NOT use the tile grid of
   destinations.css: it is a typographic service register (numbered full-width rows,
   hairline rules, orange edge marker) built from the brand type/colour system. */

/* ─────────────────────────────────────────
   SERVICE HUB — editorial service register
   ───────────────────────────────────────── */
.svcreg-section {
  padding: clamp(56px, 6vw, 88px) 0 clamp(76px, 9vw, 116px);
  background: #fff;
}

.svcreg {
  margin: 0;
  padding: 0;
  border-top: 2px solid #171715;
  font-family: 'Univers', 'Ebrima', sans-serif;
  list-style: none;
}

.svcreg-item {
  border-bottom: 1px solid #e3e3e2;
}

/* One register line. The wash and the orange edge marker are pseudo elements so they can
   bleed a little past the text column without ever widening the page. */
.svcreg-row {
  position: relative;
  display: grid;
  grid-template-areas: 'num title body meta';
  grid-template-columns:
    clamp(52px, 5vw, 86px)
    minmax(0, 1.04fr)
    minmax(0, 0.96fr)
    minmax(128px, auto);
  align-items: start;
  gap: clamp(18px, 2.6vw, 44px);
  padding: clamp(26px, 2.9vw, 42px) 0;
  color: #171715;
  text-decoration: none;
}

.svcreg-row::before {
  position: absolute;
  z-index: 0;
  inset: 0 -24px;
  background: #faf9f5;
  content: '';
  opacity: 0;
  transition: opacity 260ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.svcreg-row::after {
  position: absolute;
  z-index: 0;
  top: 0;
  bottom: 0;
  left: -24px;
  width: 4px;
  background: #f08300;
  content: '';
  transform: scaleY(0);
  transform-origin: top center;
  transition: transform 340ms cubic-bezier(0.16, 1, 0.3, 1);
}

.svcreg-row > * {
  position: relative;
  z-index: 1;
  min-width: 0;
  transition: transform 320ms cubic-bezier(0.16, 1, 0.3, 1);
}

a.svcreg-row:is(:hover, :focus-visible)::before {
  opacity: 1;
}

a.svcreg-row:is(:hover, :focus-visible)::after {
  transform: scaleY(1);
}

a.svcreg-row:is(:hover, :focus-visible) > * {
  transform: translateX(14px);
}

a.svcreg-row:focus-visible {
  border-radius: 3px;
  outline: 3px solid #f08300;
  outline-offset: 4px;
}

/* Number — the register index; the ordered list already carries the order for AT. */
.svcreg-num {
  padding-top: 0.28em;
  color: #b1b1b0;
  font-size: clamp(22px, 2.1vw, 32px);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  grid-area: num;
  letter-spacing: 0.01em;
  line-height: 1;
  transition:
    color 200ms cubic-bezier(0.2, 0.7, 0.2, 1),
    transform 320ms cubic-bezier(0.16, 1, 0.3, 1);
}

a.svcreg-row:is(:hover, :focus-visible) .svcreg-num {
  color: #f08300;
}

.svcreg-title {
  display: block;
  grid-area: title;
  font-size: clamp(28px, 3.1vw, 46px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.03;
  overflow-wrap: break-word;
}

/* Inline so the hover underline grows under the words, not across the whole column. */
.svcreg-title-text {
  display: inline;
  background-image: linear-gradient(#f08300, #f08300);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0 3px;
  transition: background-size 420ms cubic-bezier(0.16, 1, 0.3, 1);
}

a.svcreg-row:is(:hover, :focus-visible) .svcreg-title-text {
  background-size: 100% 3px;
}

.svcreg-body {
  display: block;
  padding-top: 0.35em;
  grid-area: body;
}

.svcreg-desc {
  display: block;
  max-width: 46ch;
  color: #4a4a4a;
  font-size: 15px;
  line-height: 1.6;
}

.svcreg-note {
  display: block;
  max-width: 46ch;
  margin-top: 10px;
  color: #8a877f;
  font-size: 13px;
  line-height: 1.5;
}

.svcreg-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding-top: 0.35em;
  gap: 12px;
  grid-area: meta;
  text-align: right;
}

.svcreg-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid #c5c5c4;
  border-radius: 999px;
  padding: 5px 11px 4px;
  color: #6e6e6d;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.svcreg-go {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.svcreg-go-label {
  color: #171715;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

a.svcreg-row:is(:hover, :focus-visible) .svcreg-go-label {
  color: #f08300;
}

.svcreg-arrow {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  color: #171715;
  opacity: 0.5;
  transition:
    opacity 220ms cubic-bezier(0.2, 0.7, 0.2, 1),
    transform 300ms cubic-bezier(0.16, 1, 0.3, 1),
    color 220ms cubic-bezier(0.2, 0.7, 0.2, 1),
    border-color 220ms cubic-bezier(0.2, 0.7, 0.2, 1),
    background-color 220ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.svcreg-arrow svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

a.svcreg-row:is(:hover, :focus-visible) .svcreg-arrow {
  border-color: #f08300;
  color: #fff;
  background: #f08300;
  opacity: 1;
  transform: translateX(4px);
}

/* Planned entries stay legible but visibly quieter than the live ones. */
.svcreg-item.is-soon .svcreg-num {
  color: #c5c5c4;
}

.svcreg-item.is-soon .svcreg-title {
  color: #6e6e6d;
}

.svcreg-item.is-soon .svcreg-desc {
  color: #7a7770;
}

.svcreg-item.is-soon a.svcreg-row:is(:hover, :focus-visible) .svcreg-title {
  color: #171715;
}

/* Entries without a destination are plain register lines — no pointer, no hover. */
.svcreg-row.is-static {
  cursor: default;
}

/* Reveal — rows rise in sequence once the register scrolls into view. */
.svcreg:not(.is-visible) .svcreg-row {
  opacity: 0;
  transform: translateY(16px);
}

.svcreg.is-visible .svcreg-row {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 620ms cubic-bezier(0.16, 1, 0.3, 1) var(--row-delay, 0ms),
    transform 620ms cubic-bezier(0.16, 1, 0.3, 1) var(--row-delay, 0ms);
}

/* ─────────────────────────────────────────
   TECHNIK — alternating station sections
   ───────────────────────────────────────── */
.technik-stations {
  padding: clamp(64px, 7vw, 96px) 0 clamp(72px, 8vw, 104px);
  background: #fff;
}

.technik-station {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(32px, 4.5vw, 72px);
  padding: clamp(36px, 4vw, 56px) 0;
}

.technik-station + .technik-station {
  border-top: 1px solid #e3e3e2;
}

/* Odd stations put the media on the right, even ones flip it to the left. */
.technik-station--flip .technik-media {
  order: -1;
}

.technik-station:not(.is-visible) .technik-body,
.technik-station:not(.is-visible) .technik-media {
  opacity: 0;
  transform: translateY(22px);
}

.technik-station.is-visible .technik-body,
.technik-station.is-visible .technik-media {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 640ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 640ms cubic-bezier(0.16, 1, 0.3, 1);
}

.technik-station.is-visible .technik-media {
  transition-delay: 90ms;
}

.technik-num {
  display: block;
  margin-bottom: 12px;
  color: #f08300;
  font-family: 'Univers', 'Ebrima', sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.technik-title {
  max-width: 16ch;
  margin: 0;
  color: #111;
  font-size: clamp(30px, 3.4vw, 46px);
  line-height: 1.02;
}

.technik-copy {
  max-width: 54ch;
  margin: 22px 0 0;
  color: #4a4a4a;
  font-family: 'Univers', 'Ebrima', sans-serif;
  font-size: 16px;
  line-height: 1.62;
}

.technik-media {
  min-width: 0;
}

.technik-media img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 22px;
}

/* No photo yet — a brand-coloured plate with the station initial instead of a stock image. */
.technik-placeholder {
  position: relative;
  display: flex;
  aspect-ratio: 4 / 3;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  border-radius: 22px;
  padding: clamp(22px, 2.4vw, 34px);
  background: linear-gradient(135deg, #f08300 0%, #d97500 58%, #171715 100%);
}

/* Mirror the gradient on flipped stations so the plate always opens towards the text. */
.technik-station--flip .technik-placeholder {
  background: linear-gradient(225deg, #f08300 0%, #d97500 58%, #171715 100%);
}

.technik-placeholder::after {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    135deg,
    rgba(255, 255, 255, 0) 0 18px,
    rgba(255, 255, 255, 0.1) 18px 36px
  );
  content: '';
  pointer-events: none;
}

.technik-placeholder-initial {
  position: relative;
  z-index: 1;
  align-self: flex-start;
  color: rgba(250, 249, 245, 0.92);
  font-family: 'Univers', 'Ebrima', sans-serif;
  font-size: clamp(88px, 12vw, 150px);
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 0.82;
}

.technik-placeholder-hint {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  border: 1px solid rgba(250, 249, 245, 0.45);
  border-radius: 999px;
  padding: 6px 12px 5px;
  color: rgba(250, 249, 245, 0.9);
  font-family: 'Univers', 'Ebrima', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1;
  text-transform: uppercase;
}

/* ─────────────────────────────────────────
   SERVICE AREA — placeholder page
   ───────────────────────────────────────── */
.service-area-section {
  padding: clamp(64px, 7vw, 96px) 0 clamp(72px, 8vw, 104px);
  background: #faf9f5;
}

.service-area-panel {
  max-width: 760px;
  border: 1px solid #d9d7d0;
  border-radius: 24px;
  padding: clamp(32px, 4vw, 56px);
  background: #fff;
  box-shadow: 0 24px 60px rgba(29, 27, 22, 0.06);
  font-family: 'Univers', 'Ebrima', sans-serif;
}

.service-area-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 999px;
  padding: 8px 14px 7px;
  color: #fff;
  background: #f08300;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  line-height: 1;
  text-transform: uppercase;
}

.service-area-note {
  max-width: 54ch;
  margin: 22px 0 0;
  color: #4a4a4a;
  font-size: 16px;
  line-height: 1.62;
}

.service-area-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 32px;
  color: #171715;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.service-area-back:hover {
  color: #f08300;
}

.service-area-back svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ─────────────────────────────────────────
   SERVICE-BEREICH MIT INHALTEN
   Videos und externe Angebote als Karten.
   ───────────────────────────────────────── */
.service-area-intro {
  max-width: 62ch;
  margin: 0 0 clamp(32px, 4vw, 48px);
  color: #4a4a4a;
  font-family: 'Univers', 'Ebrima', sans-serif;
  font-size: clamp(16px, 1.4vw, 18px);
  line-height: 1.65;
}

.service-res-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: clamp(20px, 2.4vw, 28px);
  align-items: start;
}

.service-res {
  display: flex;
  flex-direction: column;
  border: 1px solid #d9d7d0;
  border-radius: 20px;
  background: #fff;
  overflow: hidden;
  font-family: 'Univers', 'Ebrima', sans-serif;
  box-shadow: 0 18px 44px rgba(29, 27, 22, 0.05);
}

/* A video card spans the full row: the player needs the width to stay watchable. */
.service-res--video {
  grid-column: 1 / -1;
  max-width: 860px;
}

.service-res--video .sd-media-frame {
  border: 0;
  border-radius: 0;
}

.service-res-body {
  padding: clamp(22px, 2.4vw, 30px);
}

.service-res-eyebrow {
  display: block;
  margin-bottom: 10px;
  color: #f08300;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  line-height: 1;
  text-transform: uppercase;
}

.service-res-title {
  margin: 0;
  color: #171715;
  font-size: clamp(20px, 1.9vw, 24px);
  font-weight: 800;
  line-height: 1.25;
}

.service-res-desc {
  max-width: 52ch;
  margin: 12px 0 0;
  color: #4a4a4a;
  font-size: 15px;
  line-height: 1.6;
}

a.service-res--link {
  justify-content: space-between;
  text-decoration: none;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

a.service-res--link:is(:hover, :focus-visible) {
  border-color: #f08300;
  box-shadow: 0 22px 52px rgba(29, 27, 22, 0.1);
  transform: translateY(-3px);
}

.service-res-go {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 clamp(22px, 2.4vw, 30px) clamp(22px, 2.4vw, 30px);
  color: #171715;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.service-res-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border: 1px solid #d9d7d0;
  border-radius: 999px;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

a.service-res--link:is(:hover, :focus-visible) .service-res-arrow {
  border-color: #f08300;
  background: #f08300;
  color: #fff;
}

.service-res-arrow svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.service-res-grid + .service-area-back {
  margin-top: clamp(32px, 4vw, 48px);
}

@media (prefers-reduced-motion: reduce) {
  a.service-res--link,
  a.service-res--link:is(:hover, :focus-visible) {
    transition: none;
    transform: none;
  }
}

/* ─────────────────────────────────────────
   RESPONSIVE
   ───────────────────────────────────────── */
@media (max-width: 1024px) {
  /* Description drops under the title; number and status keep the register line. */
  .svcreg-row {
    grid-template-areas:
      'num title meta'
      '. body body';
    grid-template-columns: clamp(44px, 6vw, 68px) minmax(0, 1fr) auto;
    gap: 14px clamp(16px, 3vw, 28px);
  }

  .svcreg-body {
    padding-top: 0;
  }

  /* Badge and call to action share one line so the row stays compact. */
  .svcreg-meta {
    flex-direction: row;
    align-items: center;
    padding-top: 0.2em;
    gap: 16px;
  }

  .technik-station {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .technik-station--flip .technik-media {
    order: 0;
  }
}

@media (max-width: 640px) {
  /* Stacked register line: index + status on top, then title and description. */
  .svcreg-row {
    grid-template-areas:
      'num meta'
      'title title'
      'body body';
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px 16px;
    padding: 26px 0 28px;
  }

  .svcreg-row::before,
  .svcreg-row::after {
    inset: 0 -14px;
  }

  .svcreg-row::after {
    right: auto;
    left: -14px;
    width: 3px;
  }

  a.svcreg-row:is(:hover, :focus-visible) > * {
    transform: translateX(8px);
  }

  .svcreg-num {
    padding-top: 0.1em;
    font-size: 20px;
  }

  .svcreg-meta {
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    padding-top: 0;
    gap: 14px;
  }

  .svcreg-title {
    font-size: clamp(26px, 8vw, 34px);
  }

  .svcreg-desc {
    font-size: 14px;
  }

  .svcreg-arrow {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .svcreg .svcreg-row,
  .svcreg.is-visible .svcreg-row,
  .svcreg-row::before,
  .svcreg-row::after,
  .svcreg-row > *,
  .svcreg-row *,
  .technik-station .technik-body,
  .technik-station .technik-media {
    animation: none !important;
    transition: none !important;
  }

  .svcreg:not(.is-visible) .svcreg-row,
  .svcreg.is-visible .svcreg-row,
  .technik-station:not(.is-visible) .technik-body,
  .technik-station:not(.is-visible) .technik-media {
    opacity: 1;
    transform: none;
  }

  a.svcreg-row:is(:hover, :focus-visible) > * {
    transform: none;
  }
}
