/* ==========================================================================
   digitale-bewegungstherapie.de - site stylesheet (v5)

   Visual language: health x tech. Calm clinical whites and petrol, soft
   rounded geometry (health), precise spacing, crisp small type details and
   restrained motion (tech). Nothing decorative for its own sake.

   ---- BOX SYSTEM -------------------------------------------------------
   Matched to the card logic used on vivira.com:

   1. .card - white surface, radius 22, NO border, soft diffuse shadow,
      generous padding. This is the ONLY standalone box style on the page:
      benefit cards, step cards, the example, the CTA block and both
      collapsibles are all the same object. They differ only by the small
      accent INSIDE them (petrol icon badge, orange number, orange chip,
      warning icon) - never by border, radius or elevation.
   2. .inset - tinted, flat, radius 14, no shadow. Used only for
      supplementary/fine print, either nested inside a card or as an aside.
      Never a peer of .card.
   3. Motion/hover belongs to interactive elements only (buttons, links,
      summary). Static boxes never move.

   ---- BUTTONS ----------------------------------------------------------
   Pill shaped, like vivira.com. Orange = the one primary conversion action.
   Petrol = supporting/navigational. Outline = tertiary.
   ========================================================================== */

/* ---- Barlow, self-hosted (reuses woff2 shipped in _default) -------------- */
@font-face {
  font-family: "Barlow";
  src: url("../../../Theme/Fonts/barlow/barlow-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Barlow";
  src: url("../../../Theme/Fonts/barlow/barlow-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Barlow";
  src: url("../../../Theme/Fonts/barlow/barlow-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---- tokens -------------------------------------------------------------- */
:root {
  --petrol-900: #032c39;
  --petrol-800: #043b4c;
  --petrol-700: #054e63;
  --petrol-600: #076e8a;
  --petrol-500: #0b7f9e;
  --petrol-200: #bcdde8;
  --petrol-100: #e4f0f5;
  --petrol-050: #f2f8fa;
  --orange-600: #f06543;
  --orange-700: #d94f2f;
  --orange-050: #fdf2ee;
  --ink: #17262d;
  --muted: #5b6c75;
  --line: #e6edf1;
  --paper: #ffffff;
  --radius-card: 22px;
  --radius-inset: 14px;
  --shadow-card: 0 4px 22px rgba(4, 59, 76, 0.07), 0 1px 3px rgba(4, 59, 76, 0.05);
  --shadow-lift: 0 12px 38px rgba(4, 59, 76, 0.13);
  --section-y: clamp(64px, 8vw, 108px);
}

/* ---- base ---------------------------------------------------------------- */
* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
body {
  margin: 0;
  /* Guard: nothing may ever produce horizontal panning on a phone.
     `clip` (not `hidden`) so it does not become a scroll container and
     break the sticky header. */
  overflow-x: clip;
  max-width: 100%;
  font-family: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 18px;
  line-height: 1.72;
  color: var(--ink);
  background: var(--paper);
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}
.wrap {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 22px;
}
.wrap-wide {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 22px;
}
img,
svg {
  max-width: 100%;
  height: auto;
}
a {
  color: var(--petrol-600);
  text-underline-offset: 3px;
}
a:hover {
  color: var(--petrol-700);
}
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--orange-600);
  outline-offset: 3px;
  border-radius: 8px;
}
::selection {
  background: var(--petrol-100);
  color: var(--petrol-800);
}

h1,
h2,
h3,
h4 {
  margin: 0 0 0.5em;
  line-height: 1.16;
  letter-spacing: -0.022em;
  text-wrap: balance;
}
h1 {
  font-size: clamp(2.1rem, 5.6vw, 3.2rem);
  font-weight: 700;
}
h2 {
  font-size: clamp(1.6rem, 3.6vw, 2.4rem);
  font-weight: 700;
  color: var(--petrol-800);
}
h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--petrol-800);
  margin-top: 2.2em;
}
h4 {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}
p {
  margin: 0 0 1.15em;
}
.section p,
.section li {
  max-width: 66ch;
}
sup {
  font-size: 0.6em;
  color: var(--orange-700);
  font-weight: 700;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--petrol-800);
  color: #fff;
  padding: 10px 16px;
  z-index: 100;
}
.skip-link:focus {
  left: 8px;
  top: 8px;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--orange-600);
  transform: scaleX(0);
  transform-origin: 0 50%;
  z-index: 90;
  pointer-events: none;
}

/* ---- entrance animation -------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.55s ease,
    transform 0.55s ease;
}
.reveal.in,
.no-js .reveal {
  opacity: 1;
  transform: none;
}

/* ---- header (solid, structured - no transparency effects) ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap-wide {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.site-brand {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
  flex-wrap: wrap;
}
.site-name {
  font-weight: 700;
  font-size: 1.06rem;
  letter-spacing: -0.02em;
  color: var(--petrol-800);
  text-decoration: none;
  /* deliberately NOT nowrap: with Android text scaling / page zoom an
     unbreakable header line overflows the viewport and the whole page
     becomes horizontally scrollable. */
}
@media (max-width: 400px) {
  .site-name {
    font-size: 1rem;
  }
}
.site-tag {
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
@media (max-width: 700px) {
  .site-tag {
    display: none;
  }
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

/* language switcher: text toggle, never flags (a flag names a country, not a
   language). Stays visible on every screen size - it is the only way to
   switch, unlike the header CTA. */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 2px;
}
.lang-switch__item {
  display: inline-block;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  transition:
    background 0.16s ease,
    color 0.16s ease;
}
.lang-switch__item:hover {
  background: var(--petrol-050);
  color: var(--petrol-700);
}
.lang-switch__item.is-active {
  background: var(--petrol-100);
  color: var(--petrol-800);
}
.lang-switch__item.is-disabled {
  opacity: 0.4;
  cursor: default;
}

.header-cta {
  flex: none;
  padding: 9px 20px;
  font-size: 0.92rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition:
    opacity 0.28s ease,
    transform 0.28s ease,
    visibility 0.28s;
}
/* revealed by site.js once section "Nach der Entlassung" is reached, then
   stays for the rest of the visit. No-JS visitors always see it. */
.site-header.cta-ready .header-cta,
.no-js .header-cta {
  opacity: 1;
  visibility: visible;
  transform: none;
}
/* .site-header prefix needed: the later .btn rule would otherwise win on
   equal specificity and keep the button visible on small phones. */
@media (max-width: 560px) {
  .site-header .header-cta {
    display: none;
  }
}

/* ---- hero ---------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(760px 380px at 82% 6%, rgba(11, 127, 158, 0.5), transparent 60%),
    linear-gradient(165deg, var(--petrol-900) 0%, var(--petrol-800) 58%, var(--petrol-700) 100%);
  color: #fff;
  padding: clamp(64px, 10vw, 112px) 0 clamp(60px, 9vw, 100px);
}
/* faint technical grid - the "tech" half of the visual language */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(120% 90% at 20% 0%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(120% 90% at 20% 0%, #000 20%, transparent 75%);
  pointer-events: none;
}
.hero .wrap {
  position: relative;
  z-index: 2;
}
.hero .eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #ffb9a3;
  margin: 0 0 20px;
}
.hero h1 {
  color: #fff;
  max-width: 22ch;
  margin-bottom: 0.42em;
}
.hero .lede {
  font-size: clamp(1.08rem, 2.2vw, 1.25rem);
  line-height: 1.6;
  color: #c8e0e9;
  max-width: 44ch;
  margin-bottom: 2em;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 40px;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.chips li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 7px 15px;
  font-size: 0.86rem;
  font-weight: 500;
  color: #dcecf2;
}
.chips svg {
  width: 15px;
  height: 15px;
  flex: none;
  color: #8fd4e8;
}

/* ---- sections ------------------------------------------------------------ */
.section {
  padding: var(--section-y) 0;
}
.section-tint {
  background: var(--petrol-050);
}
.section-foot {
  background: var(--petrol-050);
}

.section-head {
  margin-bottom: 38px;
}
.section-head .kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--orange-700);
  margin: 0 0 14px;
}
.section-head .kicker::before {
  content: "";
  flex: none;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--orange-600);
}
.section-head h2 {
  margin: 0;
}

/* ---- THE card (one style, everywhere) ------------------------------------ */
.card {
  position: relative;
  overflow: hidden; /* keeps the accent bar inside the radius */
  background: var(--paper);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: clamp(26px, 3.2vw, 34px);
}
.card > :last-child {
  margin-bottom: 0;
}

/* accent bar - the shared signature of every content card (incl. the steps) */
.card::before,
.steps li::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--petrol-600), var(--orange-600));
}

/* a CTA directly after a card needs air, not a paragraph gap */
.card + p {
  margin-top: clamp(26px, 3.4vw, 38px);
}

/* tinted inset: supplementary / fine print only, never a peer of .card.
   Uses petrol-100 so it stays visible on white AND on tinted sections. */
.inset {
  background: var(--petrol-100);
  border-radius: var(--radius-inset);
  padding: 18px 22px;
  font-size: 0.95rem;
  color: var(--muted);
}
.inset > :last-child {
  margin-bottom: 0;
}
.inset strong {
  color: var(--ink);
}
/* legal/transparency fine print - two points smaller than the normal inset */
.inset--fine {
  font-size: 0.83rem;
  line-height: 1.6;
}

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin: 0 0 26px;
}
@media (min-width: 640px) {
  .cards {
    grid-template-columns: 1fr 1fr;
  }
}

.card-icon {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 24px;
  border-radius: 14px;
  background: var(--petrol-100);
  color: var(--petrol-700);
}
.card-icon svg {
  width: 23px;
  height: 23px;
}
.card h4 {
  color: var(--petrol-800);
  margin-bottom: 0.5em;
}
.card p {
  color: var(--muted);
  margin-bottom: 0;
}

/* statement card (the key clinical message) */
.card--statement {
  display: flex;
  gap: clamp(20px, 3vw, 28px);
  align-items: flex-start;
}
.card--statement .card-icon {
  flex: none;
  margin-bottom: 0;
  background: var(--orange-050);
  color: var(--orange-700);
}
.card--statement p {
  color: var(--ink);
}
.card--statement strong {
  color: var(--petrol-800);
}

/* example block */
.chip-label {
  display: inline-block;
  background: var(--orange-050);
  color: var(--orange-700);
  border-radius: 999px;
  padding: 4px 14px;
  margin-bottom: 18px;
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
ul.checks {
  list-style: none;
  padding: 0;
  margin: 0;
}
ul.checks li {
  position: relative;
  padding-left: 34px;
  margin-bottom: 0.9em;
}
ul.checks li:last-child {
  margin-bottom: 0;
}
ul.checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background:
    var(--petrol-600)
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="3.2" stroke-linecap="round" stroke-linejoin="round"><path d="M5 13l4 4 10-10"/></svg>')
    center / 12px no-repeat;
}

/* ---- steps (same card, orange number badge - as on vivira.com) ----------- */
.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 760px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
  }
}
.steps li {
  position: relative;
  overflow: hidden;
  counter-increment: step;
  background: var(--paper);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: clamp(26px, 2.6vw, 32px);
}
.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 22px;
  border-radius: 50%;
  background: var(--orange-600);
  color: #fff;
  font-size: 1.08rem;
  font-weight: 700;
}
.steps h4 {
  color: var(--petrol-800);
}
.steps p {
  font-size: 0.98rem;
  color: var(--muted);
  margin: 0;
}

/* ---- CTA ----------------------------------------------------------------- */
.section-cta {
  background: var(--petrol-050);
}
.cta-card {
  box-shadow: var(--shadow-lift);
}
.cta-stack {
  display: flex;
  flex-direction: column;
  margin-top: 24px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 600;
  font-size: 1.02rem;
  text-align: center;
  text-decoration: none;
  border-radius: 999px;
  padding: 15px 28px;
  transition:
    background 0.16s ease,
    color 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.12s ease;
}
.btn:active {
  transform: translateY(1px);
}
.btn .arrow {
  flex: none;
  width: 17px;
  height: 17px;
  transition: transform 0.16s ease;
}
.btn:hover .arrow {
  transform: translateX(3px);
}
.btn-block {
  display: flex;
  width: 100%;
}
.btn-inline {
  align-self: flex-start;
}

.btn-primary {
  background: var(--orange-600);
  color: #fff;
  box-shadow: 0 4px 14px rgba(240, 101, 67, 0.32);
}
.btn-primary:hover {
  background: var(--orange-700);
  color: #fff;
  box-shadow: 0 6px 20px rgba(240, 101, 67, 0.42);
}
.btn-petrol {
  background: var(--petrol-700);
  color: #fff;
}
.btn-petrol:hover {
  background: var(--petrol-800);
  color: #fff;
}
.btn-secondary {
  background: var(--paper);
  color: var(--petrol-700);
  box-shadow: inset 0 0 0 1.5px var(--petrol-200);
}
.btn-secondary:hover {
  color: var(--petrol-800);
  box-shadow: inset 0 0 0 1.5px var(--petrol-600);
}
.btn-ghost-light {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.55);
}
.btn-ghost-light:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

/* buttons sit in paragraphs, as the rich text editor writes them; a
   paragraph that only holds them is no box of its own, so the buttons stand
   directly in the column (.cta-stack) or the fixed bar (.sticky-cta) */
.cta-buttons,
.sticky-cta > p {
  display: contents;
}

.btn-sub {
  font-size: 0.9rem;
  color: var(--muted);
  text-align: center;
  margin: 12px 0 22px;
}
.btn-sub:last-child {
  margin-bottom: 0;
}
.store-alt {
  font-size: 0.88rem;
  text-align: center;
  color: var(--muted);
  margin: 12px 0 0;
}

.sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.97);
  border-top: 1px solid var(--line);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  transform: translateY(115%);
  transition: transform 0.28s ease;
}
.sticky-cta.show {
  transform: translateY(0);
}
.sticky-cta .btn {
  padding: 13px 20px;
  font-size: 0.98rem;
}
@media (min-width: 900px) {
  .sticky-cta {
    display: none;
  }
}

/* ---- collapsibles (same card object) ------------------------------------- */
details {
  background: var(--paper);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  margin-bottom: 16px;
  overflow: hidden;
}
@supports (interpolate-size: allow-keywords) {
  details {
    interpolate-size: allow-keywords;
  }
  details::details-content {
    height: 0;
    overflow: clip;
    transition:
      height 0.3s ease,
      content-visibility 0.3s allow-discrete;
  }
  details[open]::details-content {
    height: auto;
  }
}
details summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 26px;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  transition: background 0.16s ease;
}
details summary::-webkit-details-marker {
  display: none;
}
details summary:hover {
  background: var(--petrol-050);
}
details summary .chev {
  flex: none;
  width: 18px;
  height: 18px;
  margin-left: auto;
  color: var(--muted);
  transition: transform 0.24s ease;
}
details[open] summary .chev {
  transform: rotate(180deg);
}
details .details-body {
  padding: 0 26px 24px;
}
details .details-body > :last-child {
  margin-bottom: 0;
}
details.safety summary {
  color: var(--orange-700);
}
details.safety .warn-icon {
  flex: none;
  width: 21px;
  height: 21px;
}
details.disclaimer summary {
  color: var(--muted);
  font-weight: 500;
}

/* ---- footnotes ----------------------------------------------------------- */
.section-foot h2 {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
}
.footnotes {
  font-size: 0.86rem;
  color: var(--muted);
  padding-left: 1.3em;
  margin: 0;
  line-height: 1.6;
}
.footnotes li {
  margin-bottom: 0.6em;
}

/* ---- legal pages (vivira_textbox) ----------------------------------------
   The element css floats .text-box for the theme's grid layout;
   neutralize it or <main> collapses and the footer overlaps the content. */
.text-box {
  float: none;
  width: auto;
  max-width: 780px;
  margin: 0 auto;
  padding: 64px 22px;
}
.text-box h1 {
  font-size: 2rem;
  color: var(--petrol-800);
}
/* long-form legal content (Datenschutzerklaerung, Impressum) */
.text-box h2 {
  font-size: 1.3rem;
  color: var(--petrol-800);
  margin: 1.8em 0 0.5em;
}
.text-box h3 {
  font-size: 1.08rem;
  color: var(--petrol-800);
  margin: 1.4em 0 0.4em;
}
.text-box p,
.text-box li {
  color: var(--ink);
}
.text-box ul {
  padding-left: 1.3em;
  margin: 0 0 1.1em;
}
.text-box ul li {
  margin-bottom: 0.5em;
}
.text-box a {
  color: var(--petrol-600);
}
.text-box .lawbox {
  background: var(--petrol-050);
  border-left: 4px solid var(--petrol-600);
  border-radius: 8px;
  padding: 14px 18px;
  margin: 1.4em 0;
}
.text-box .lawbox > :last-child {
  margin-bottom: 0;
}
.text-box .law-meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 2.4em;
}
main {
  display: flow-root;
}

/* ---- footer -------------------------------------------------------------- */
.site-footer {
  clear: both;
  background: var(--petrol-900);
  color: #b9d2dc;
  padding: 48px 0 52px;
}
/* The fixed mobile CTA bar is 74px tall and sits above the page end, where it
   covered the last footer link. Reserve its height (plus the iOS home
   indicator) wherever that bar can appear. */
@media (max-width: 899px) {
  .site-footer {
    padding-bottom: calc(52px + 80px + env(safe-area-inset-bottom));
  }
}
.footer-provider {
  font-size: 0.95rem;
  margin-bottom: 18px;
  max-width: 60ch;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
}
.footer-nav a {
  color: #fff;
  font-size: 0.9rem;
}
.footer-nav a:hover {
  color: #ffb9a3;
}

/* ---- print --------------------------------------------------------------- */
@media print {
  .site-header,
  .site-footer,
  .btn,
  .sticky-cta,
  .scroll-progress {
    display: none;
  }
  .hero {
    background: none;
    color: var(--ink);
    padding: 12px 0;
  }
  .hero h1,
  .hero .lede {
    color: var(--ink);
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
  .card,
  details {
    box-shadow: none;
    border: 1px solid var(--line);
  }
  details,
  details > * {
    display: block;
  }
  .section {
    padding: 18px 0;
  }
}
