/* PST: exact original CSS order; no minification. */
/* PST design system · Home is the reference · load after page/layout styles.
   Component layouts, hero geometry, image crops and editorial widths stay local. */
:root {
  --font-content: Archivo, Arial, sans-serif;
  --font-action: Montserrat, Arial, sans-serif;
  --type-section: clamp(32px, 3.5vw, 54px);
  --type-subheading: clamp(21px, 1.8vw, 27px);
  --type-body: 16px;
  --type-label: 12px;
  --type-action: 14px;
  --leading-section: 1.12;
  --leading-body: 1.7;
  --leading-action: 1.2;
  --tracking-section: -.035em;
  --action-height: 54px;
  --action-padding: 24px;
  --action-gap: 24px;
  --radius-control: 0px;
  --copy-gap: 24px;
  --copy-action-gap: 28px;
}
body { font-family: var(--font-content); font-size: var(--type-body); font-weight: 400; line-height: var(--leading-body); }

/* Section titles share one role, including the legal information pages.
   Display titles in the hero, footer labels and dialog titles are distinct roles. */
body main h2 {
  font-family: var(--font-content);
  font-size: var(--type-section);
  font-weight: 400;
  line-height: var(--leading-section);
  letter-spacing: var(--tracking-section);
}
body main .legal-copy h3 {
  font-family: var(--font-content);
  font-size: var(--type-subheading);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -.025em;
}
/* Body copy. Kicker, lead, caption, result, small-print and card roles remain
   intentionally separate; the same role has the same size on every page. */
body main p:not(.eyebrow):not(.pst-hero-kicker):not(.pst-hero-subtitle):not(.service-lead):not(.service-note):not(.form-note):not(.form-result):not(.gallery-result):not(.map-coordinates):not(.form-preview-note) {
  font-family: var(--font-content);
  font-size: var(--type-body);
  font-weight: 400;
  line-height: var(--leading-body);
}
body main .legal-copy li { font-size: var(--type-body); line-height: var(--leading-body); }
body main .eyebrow {
  font-family: var(--font-content);
  font-size: var(--type-label);
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: .13em;
}
/* Readable Home card copy, with no clipping or fixed text height. */
#leistungen .service-card .card-bottom p {
  font-size: 16px;
  line-height: 1.55;
  color: #fff;
  opacity: 1;
  height: auto;
  min-height: 0;
  max-height: none;
  overflow: visible;
  display: block;
  -webkit-line-clamp: unset;
  line-clamp: unset;
  -webkit-box-orient: initial;
}

/* Shared rectangular actions: only color/background remain component-specific.
   Match the Home outline action, including 600 weight and Montserrat family. */
html body :is(.button, .hero-project, .service-button, .pst-clear-button, .final-primary, .mobile-project, .about-oct-copy .text-link) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--action-height);
  padding: 0 var(--action-padding);
  gap: var(--action-gap);
  font-family: var(--font-action);
  font-size: var(--type-action);
  font-weight: 600;
  line-height: var(--leading-action);
  letter-spacing: 0;
  border-radius: var(--radius-control);
  text-align: center;
}
/* Higher-specificity legacy hero selectors change placement, not button metrics. */
body.pst-subpage .subpage-hero .hero-project,
body.hero-study .refreshed-header .nav-cta,
body .refreshed-header .mobile-menu .mobile-project {
  min-height: var(--action-height);
  padding: 0 var(--action-padding);
  gap: var(--action-gap);
  font: 600 var(--type-action)/var(--leading-action) var(--font-action);
  letter-spacing: 0;
  border-radius: var(--radius-control);
}
html body :is(.service-text-link, .emotion-bottom .text-link, .pst-footer-cta) {
  font-family: var(--font-action);
  font-size: var(--type-action);
  font-weight: 600;
  line-height: var(--leading-action);
  letter-spacing: 0;
  gap: var(--action-gap);
  min-height: var(--action-height);
}
html body :is(.button, .hero-project, .service-button, .pst-clear-button, .final-primary, .mobile-project, .service-text-link) svg {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
}

/* Three equal tracks. The contact block sits at the outer right edge with its
   content left-aligned; mobile stacks in document order without blank tracks. */
.pst-footer .pst-footer-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: clamp(24px, 4vw, 70px);
}
.pst-footer .pst-footer-grid > * { grid-area: auto; min-width: 0; }
.pst-footer .pst-footer-contact { justify-self: end; text-align: left; max-width: 100%; }
.pst-footer .pst-footer-company { justify-self: center; }
.pst-footer .pst-footer-services { justify-self: start; }

@media (max-width: 900px) and (min-width: 601px) {
  .pst-footer .pst-footer-primary a { font-size: clamp(19px, 2.7vw, 25px); }
  .pst-footer .pst-footer-company > a { font-size: 20px; }
  .pst-footer .pst-footer-contact address { font-size: 16px; }
  .pst-footer .pst-footer-direct a { font-size: 17px; }
}
@media (max-width: 600px) {
  :root {
    --type-section: 32px;
    --type-subheading: 23px;
    --type-body: 15px;
    --type-action: 13px;
    --action-height: 48px;
    --action-padding: 16px;
    --action-gap: 16px;
  }
  .pst-footer .pst-footer-grid { grid-template-columns: minmax(0, 1fr); }
  .pst-footer .pst-footer-grid > * { justify-self: start; }
  /* The compact header has less room than full-width content actions. */
  body.hero-study .refreshed-header .nav-cta,
  body .refreshed-header .nav-cta { padding-inline: 10px; gap: 8px; }
}
/* Equal visible spaces between the three content columns, not only equal tracks. */
@media (min-width:601px) {
 .pst-footer .pst-footer-grid { grid-template-columns: max-content max-content max-content; justify-content: space-between; column-gap:24px; }
 .pst-footer .pst-footer-grid > * { justify-self:start; }
}

/* One outer spacing contract for regular content sections on every page.
   Hero/footer and internal card padding remain independent component tokens. */
html body main > :is(.section, .emotion, .legal-section) {
  padding-block: var(--section-space) !important;
}
/* Home has text above/below its gallery; standalone service galleries do not.
   Remove those component margins so visible gallery edges equal section padding. */
html body .service-gallery .customer-moments { margin-block: 0; }
/* Legal headings keep their inter-paragraph rhythm, but no extra outer gap. */
html body .legal-copy > :first-child { margin-top: 0 !important; }
html body .legal-copy > :last-child { margin-bottom: 0 !important; }

/* Keep shared legal heading size, with readable German word breaks. */
.legal-page .legal-copy :is(h2, h3) { hyphens: auto; }

/* Preserve the shared H2 scale without clipping long water-technology words. */
.care-page .service-dark .service-heading h2 { hyphens: auto; overflow-wrap: anywhere; }

/* Mobile-only refinement. Desktop components keep their established layout. */
@media (max-width: 1000px) {
  body .refreshed-header .menu-toggle {
    display: grid; place-items: center; flex: 0 0 48px;
    width: 48px; height: 48px; padding: 0; gap: 0;
    border: 1px solid rgba(255,255,255,.65); border-radius: 0;
    background: rgba(255,255,255,.025); color: #fff;
    transition: background .25s ease, border-color .25s ease;
  }
  body .refreshed-header .menu-toggle:is(:hover,:focus-visible) { background: rgba(255,255,255,.09); border-color: #fff; }
  .menu-toggle svg { display: block; width: 24px; height: 24px; stroke-width: 1.5; stroke-linecap: square; overflow: visible; }
  .menu-toggle .menu-stroke { transform-origin: 12px 12px; transition: transform .32s cubic-bezier(.22,.61,.36,1), opacity .18s ease; }
  .menu-toggle[aria-expanded="true"] .menu-stroke-top { transform: rotate(45deg) translateY(6px); }
  .menu-toggle[aria-expanded="true"] .menu-stroke-middle { opacity: 0; }
  .menu-toggle[aria-expanded="true"] .menu-stroke-bottom { transform: rotate(-45deg) translateY(-6px); }
  body .refreshed-header .mobile-menu {
    --menu-pad: clamp(22px, 6vw, 36px);
    width: min(520px,100%); padding: 20px var(--menu-pad) max(28px, env(safe-area-inset-bottom));
    align-items: stretch; gap: 28px; overscroll-behavior: contain;
    background: #14383e; border-top: 1px solid rgba(255,255,255,.14);
    transform: translateX(28px); transition: transform .32s cubic-bezier(.22,.61,.36,1), opacity .25s ease, visibility .32s;
  }
  body .refreshed-header .mobile-menu.open { transform: translateX(0); }
  .mobile-primary, .mobile-actions, .mobile-contact-actions { display: grid; width: 100%; }
  .mobile-primary { gap: 3px; }
  body .refreshed-header .mobile-menu .mobile-nav-link {
    display: flex; align-items: center; gap: 16px; width: 100%; min-height: 52px;
    padding: 12px 0; border: 0; background: transparent;
    color: #f5f5ef; font-family: var(--font-content); font-size: 23px;
    font-weight: 400; line-height: 1.25; text-align: left;
    transition: color .2s ease, background .2s ease;
  }
  .mobile-nav-link > svg { width: 22px; height: 22px; flex: 0 0 22px; stroke-width: 1.4; color: #bfcfc8; }
  body .refreshed-header .mobile-menu .mobile-nav-link:is(:hover,:focus-visible) { color: #fff; background: rgba(255,255,255,.045); }
  .mobile-nav-link > span { flex: 1; min-width: 0; }
  .mobile-nav-link .mobile-chevron { width: 18px; height: 18px; flex-basis: 18px; transition: transform .3s ease; }
  .mobile-services-toggle[aria-expanded="true"] .mobile-chevron { transform: rotate(180deg); }
  .mobile-services-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .32s ease; }
  .mobile-services-panel.open { grid-template-rows: 1fr; }
  .mobile-services-inner { min-height: 0; overflow: hidden; }
  body .refreshed-header .mobile-menu .mobile-services-panel .mobile-nav-link {
    min-height: 50px; padding: 12px 10px 12px 16px; gap: 12px;
    font-size: 16px; line-height: 1.4; border-left: 1px solid rgba(255,255,255,.2);
  }
  .mobile-services-panel .mobile-nav-link > svg { width: 20px; height: 20px; flex-basis: 20px; }
  .mobile-actions { margin-top: auto; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.18); gap: 12px; }
  body .refreshed-header .mobile-menu .mobile-project {
    display: flex; width: 100%; min-height: 54px; padding: 14px 18px; margin: 0; gap: 14px;
    justify-content: center; border: 1px solid #dbe5dd; color: #14383e; background: #dbe5dd;
    font: 600 13px/1.4 var(--font-action); text-align: center;
  }
  .mobile-project > svg { order: 2; }
  .mobile-contact-actions { gap: 10px; }
  body .refreshed-header .mobile-menu .mobile-contact {
    display: flex; align-items: center; justify-content: center; gap: 12px;
    width: 100%; min-height: 50px; padding: 12px 10px; margin: 0;
    border: 1px solid rgba(255,255,255,.4); color: #f5f5ef; background: transparent;
    font: 500 12px/1.4 var(--font-action); text-align: center;
  }
  .mobile-contact > svg { width: 18px; height: 18px; flex: 0 0 18px; stroke-width: 1.5; }
  body .refreshed-header .mobile-menu .mobile-contact:is(:hover,:focus-visible) { background: rgba(255,255,255,.07); border-color: #fff; }
  body .refreshed-header .mobile-menu .mobile-project:is(:hover,:focus-visible) { background: #f1f5ed; color: #14383e; border-color: #f1f5ed; }
  body .refreshed-header .mobile-menu :focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
  .mobile-primary [aria-current="page"] > span { text-decoration: underline; text-underline-offset: 7px; text-decoration-thickness: 1px; }
}
@media (max-width: 800px) {
  body[data-home-layout] .home-hero-index { display: none; }
  body[data-home-layout] .pst-fullscreen { padding-bottom: 90px; }
  body[data-home-layout] .pst-fullscreen .hero-slide-indicators { bottom: 26px; }
  /* Only copy moves. The image and overlay cover every hero pixel at all times. */
  body[data-home-layout] .pst-fullscreen .pst-project-photos,
  body[data-home-layout] .pst-fullscreen::after { transform: none !important; opacity: 1 !important; animation: none !important; }
  body[data-home-layout] #leistungen .service-grid { grid-template-columns: minmax(0,1fr); gap: 18px; }
  body[data-home-layout] #leistungen .service-card {
    min-height: 360px; padding: 24px; grid-area: auto;
    justify-content: flex-start; gap: 42px;
  }
  body[data-home-layout] #leistungen .service-card .card-number { font-size: 10px; line-height: 1.5; letter-spacing: .095em; }
  body[data-home-layout] #leistungen .service-card .card-bottom { margin-top: auto; grid-template-columns: minmax(0,1fr) 44px; column-gap: 14px !important; }
  body[data-home-layout] #leistungen .service-card .card-bottom h3 {
    min-height: 0; margin: 0; font-size: clamp(31px,8.5vw,38px) !important; line-height: 1.08; letter-spacing: -.035em;
    overflow-wrap: normal; hyphens: none;
  }
  body[data-home-layout] #leistungen .service-card .card-bottom p { margin-top: 16px; font-size: 16px !important; line-height: 1.55; color: #fff !important; opacity: 1; }
  body[data-home-layout] #leistungen .service-card .card-bottom .round { width: 44px; height: 44px; margin-top: 16px !important; }
  body[data-home-layout] #leistungen .service-card .image-shade { background: linear-gradient(180deg,rgba(8,33,42,.55),rgba(8,33,42,.5) 25%,rgba(8,33,42,.84) 75%,rgba(8,33,42,.91)); }
  body[data-home-layout] #leistungen .care-service.poolservice-photo::after { display: block !important; background: linear-gradient(180deg,rgba(8,33,42,.55),rgba(8,33,42,.5) 25%,rgba(8,33,42,.84) 75%,rgba(8,33,42,.91)); }
  body[data-home-layout] .emotion-bottom h2 br,
  body[data-home-layout] .emotion-bottom p br { display: none; }
  body[data-home-layout] .emotion-bottom h2 { text-wrap: pretty; }
}
@media (max-width: 360px) {
  body[data-home-layout] #leistungen .service-card { padding: 20px; }
  body[data-home-layout] #leistungen .service-card .card-bottom h3 { font-size: 30px !important; }
  body[data-home-layout] #leistungen .service-card .card-bottom p { font-size: 16px !important; }
}
@media (prefers-reduced-motion: reduce) {
  .menu-toggle .menu-stroke, .mobile-services-panel, .mobile-chevron { transition: none !important; }
}

/* Shared navigation safeguards, preserving existing design. */
.services-panel::before{content:"";position:absolute;left:0;right:0;top:-15px;height:15px}
.refreshed-header .services-panel{z-index:2}

/* R8: text-only offcanvas rows. Keep the functional submenu indicator. */
@media (max-width: 1000px) {
  body .refreshed-header .mobile-menu .mobile-nav-link {
    padding-inline: 12px;
  }
  body .refreshed-header .mobile-menu .mobile-services-panel .mobile-nav-link {
    /* Account for the existing 1px guide so labels share the same text edge. */
    padding-inline: 11px 12px;
  }
  body .refreshed-header .mobile-menu .mobile-services-panel .mobile-nav-link:focus-visible {
    /* Draw within the accordion, whose overflow clips external outlines. */
    outline-offset: -2px;
  }
}

