/* Drehmoment — mobile.html (Scroll-Layout, Safe-Area, ohne Wisch-Animation) */

html.is-mobile-page {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  --mobile-nav-h: calc(env(safe-area-inset-top, 0px) + 72px);
  scroll-padding-top: var(--mobile-nav-h);
  overflow-x: clip;
  overflow-y: auto;
  height: auto;
  width: 100%;
  max-width: 100%;
}

html.is-mobile-page,
html.is-mobile-page body {
  min-height: 100%;
  min-height: 100dvh;
}

body.is-mobile-page {
  overflow-x: clip;
  overflow-y: auto;
  overscroll-behavior-y: none;
  width: 100%;
  max-width: 100%;
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

body.mobile-nav-open {
  overflow: hidden;
}

.mobile-app {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

.mobile-main {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  padding-top: var(--mobile-nav-h);
}

.mobile-main > section {
  scroll-margin-top: var(--mobile-nav-h);
}

/* Keine Wisch-Animation */
html.is-mobile-page .wipe-title > span,
html.is-mobile-page .wipe-title::before,
html.is-mobile-page .wipe-title::after {
  clip-path: none !important;
  animation: none !important;
}

html.is-mobile-page .wipe-title::before,
html.is-mobile-page .wipe-title::after {
  display: none !important;
}

html.is-mobile-page .wipe-overlay {
  display: none !important;
}

/* Mobile Navigation — fixed + Glassmorphism */
.mobile-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: rgba(8, 8, 7, 0.58);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: env(safe-area-inset-top, 0px);
  transition:
    background 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

html.is-mobile-page.mobile-nav-scrolled .mobile-nav {
  background: rgba(8, 8, 7, 0.82);
  border-bottom-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.38);
}

.mobile-nav__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 8px max(16px, env(safe-area-inset-right, 16px)) 8px max(16px, env(safe-area-inset-left, 16px));
}

.mobile-nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-transform: lowercase;
}

.mobile-nav__mark {
  display: block;
  width: 28px;
  height: 28px;
}

.mobile-nav__toggle {
  position: relative;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 0;
  background: transparent;
  flex-shrink: 0;
}

.mobile-nav__toggle span,
.mobile-nav__toggle span::before,
.mobile-nav__toggle span::after {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.mobile-nav__toggle span::before,
.mobile-nav__toggle span::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.mobile-nav__toggle span::before {
  top: calc(50% - 6px);
}

.mobile-nav__toggle span::after {
  top: calc(50% + 6px);
}

.mobile-nav__toggle.is-open span {
  background: transparent;
}

.mobile-nav__toggle.is-open span::before {
  top: 50%;
  transform: translateX(-50%) rotate(45deg);
}

.mobile-nav__toggle.is-open span::after {
  top: 50%;
  transform: translateX(-50%) rotate(-45deg);
}

.mobile-nav__menu {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 8px max(16px, env(safe-area-inset-right, 16px)) 16px max(16px, env(safe-area-inset-left, 16px));
  border-top: 1px solid var(--rule);
}

.mobile-nav__menu.is-open {
  display: flex;
}

.mobile-nav__link {
  display: block;
  padding: 12px 4px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff;
  border-bottom: 1px solid rgba(29, 29, 27, 0.6);
  transition: color 0.15s ease;
}

.mobile-nav__link.is-active {
  color: var(--accent);
  font-weight: 600;
}

.mobile-nav__link:active,
.mobile-nav__link:focus-visible {
  color: var(--accent);
  outline: none;
}

.mobile-nav__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  padding: 14px 18px;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
}

/* Dynamische Viewport-Skalierung (app.jsx MobileSectionFit) */
html.is-mobile-page .mobile-section-fit {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

html.is-mobile-page .mobile-section-fit__box {
  width: 100%;
  overflow: hidden;
}

html.is-mobile-page .mobile-section-fit__inner {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

html.is-mobile-page .mobile-svc-tabs-fit .mobile-section-fit__inner {
  min-width: 0;
}

/* Hero — 3D-Aristoteles als dezenter Hintergrund */
html.is-mobile-page #hero {
  --fit-top: calc(env(safe-area-inset-top, 0px) + 56px);
  --fit-bottom: 24px;
  position: relative;
  overflow-x: clip;
  overflow-y: visible;
  min-height: auto;
  padding: 0;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
}

html.is-mobile-page .hero-ascii-backdrop--mobile {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

html.is-mobile-page .hero-ascii-backdrop--mobile::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(6, 6, 8, 0.94) 0%, rgba(6, 6, 8, 0.72) 42%, rgba(6, 6, 8, 0.88) 100%),
    linear-gradient(90deg, rgba(6, 6, 8, 0.55) 0%, transparent 28%, transparent 72%, rgba(6, 6, 8, 0.45) 100%);
}

html.is-mobile-page .hero-ascii-backdrop--mobile .hero-ascii-mount,
html.is-mobile-page .hero-ascii-backdrop--mobile .hero-wireframe-layer {
  position: absolute;
  left: 50%;
  top: 28%;
  bottom: 0;
  right: auto;
  width: 100%;
  max-width: 100%;
  height: 62%;
  transform: translateX(-50%);
  z-index: 0;
}

html.is-mobile-page .hero-ascii-backdrop--mobile .hero-wireframe-canvas {
  pointer-events: none !important;
  inset: 0;
  opacity: 0.34;
  filter: contrast(0.92) saturate(0.55) brightness(0.58);
}

html.is-mobile-page .hero-ascii-backdrop--mobile.is-revealed {
  opacity: 1;
  transition: opacity 0.8s ease;
}

html.is-mobile-page .mobile-hero-content {
  position: relative;
  z-index: 3;
  flex: 1 1 auto;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  text-align: center;
  padding: calc(env(safe-area-inset-top, 0px) + 68px) max(20px, env(safe-area-inset-right, 20px)) 40px max(20px, env(safe-area-inset-left, 20px));
}

html.is-mobile-page .mobile-hero-fit {
  position: relative;
  z-index: 2;
  flex: 1 1 auto;
  width: 100%;
  min-height: min(88dvh, 760px);
  padding: calc(env(safe-area-inset-top, 0px) + 72px) max(20px, env(safe-area-inset-right, 20px)) 32px max(20px, env(safe-area-inset-left, 20px));
  box-sizing: border-box;
}

html.is-mobile-page .hero-screen--mobile .hero-grid {
  position: relative;
  z-index: 2;
  pointer-events: none;
  width: 100%;
  max-width: 100%;
  padding-left: 0;
  padding-right: 0;
  justify-items: center;
  box-sizing: border-box;
}

html.is-mobile-page .hero-screen--mobile .container.hero-grid {
  padding-left: 0;
  padding-right: 0;
  margin-left: auto;
  margin-right: auto;
}

html.is-mobile-page .hero-screen--mobile .hero-copy .hero-actions,
html.is-mobile-page .hero-screen--mobile .hero-copy .hero-actions a,
html.is-mobile-page .hero-screen--mobile .hero-copy-marquee {
  pointer-events: auto;
}

html.is-mobile-page .hero-copy .hero-headline,
html.is-mobile-page .hero-copy .hero-sub,
html.is-mobile-page .hero-kicker-text {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.95), 0 4px 24px rgba(0, 0, 0, 0.75);
}

html.is-mobile-page .hero-copy {
  max-width: min(520px, 100%);
  width: 100%;
  align-self: center;
  justify-self: center;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  padding: 20px 18px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(8, 8, 10, 0.72) 0%, rgba(8, 8, 10, 0.48) 100%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-sizing: border-box;
}

html.is-mobile-page .hero-copy .hero-headline {
  font-size: clamp(32px, 8.5vw, 46px);
  max-width: 100%;
  width: 100%;
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin: 0 auto;
  text-wrap: balance;
}

html.is-mobile-page .hero-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
  width: 100%;
}

html.is-mobile-page .hero-actions .btn-combo {
  width: 100%;
  max-width: min(360px, 100%);
  justify-content: center;
  min-height: 52px;
  font-size: 13px;
  box-sizing: border-box;
}

html.is-mobile-page .hero-actions__secondary {
  display: block;
  width: 100%;
  max-width: min(360px, 100%);
  margin: 0 auto;
  padding: 16px 20px;
  text-align: center;
  box-sizing: border-box;
  text-decoration: none;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: var(--ink);
}

html.is-mobile-page .hero-buzzwords {
  margin-top: 20px;
  font-size: 11.5px;
  text-align: left;
  color: rgba(255, 255, 255, 0.42);
  white-space: normal;
}

html.is-mobile-page .hero-foot {
  position: relative;
  z-index: 2;
  padding-top: 16px;
}

html.is-mobile-page .hero-screen {
  height: auto;
  min-height: auto;
  max-height: none;
  padding: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

html.is-mobile-page .hero-copy .hero-headline .wipe-title > span,
html.is-mobile-page .headline .wipe-title > span,
html.is-mobile-page .faq-layout-title .wipe-title > span {
  white-space: normal;
  width: auto;
  min-width: 0;
  max-width: 100%;
}

html.is-mobile-page .hero-copy .hero-sub {
  font-size: clamp(16px, 4.4vw, 18px);
  line-height: 1.58;
  margin-top: 16px;
  margin-bottom: 24px;
  color: rgba(255, 255, 255, 0.88);
  max-width: 100%;
  text-wrap: pretty;
}

html.is-mobile-page .hero-copy .hero-kicker-row {
  position: static;
  max-width: 100%;
  margin: 14px 0 16px;
  text-align: center;
  padding: 0;
}

html.is-mobile-page .hero-kicker-row {
  justify-content: center;
  text-align: center;
  padding: 0 4px;
}

html.is-mobile-page .hero-kicker-text {
  text-align: center;
  max-width: 100%;
  font-size: clamp(15px, 4vw, 17px);
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.82);
}

html.is-mobile-page .hero-copy-marquee {
  margin-top: 28px;
  max-width: none;
}

html.is-mobile-page .hero-foot {
  padding-top: 20px;
}

html.is-mobile-page .hero-foot-tags {
  white-space: normal;
}

/* Leistungen — alle 5 Tabs sichtbar, dynamisch skaliert */
html.is-mobile-page .leistungen-showcase {
  padding-top: 48px;
  padding-bottom: 48px;
  overflow: hidden;
}

html.is-mobile-page #leistungen .headline,
html.is-mobile-page .leistungen-showcase .headline {
  font-size: clamp(26px, 7.2vw, 36px) !important;
}

html.is-mobile-page .svc-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  overflow: visible;
  margin: 0;
  gap: clamp(2px, 0.5vw, 4px);
  width: 100%;
  min-width: 0;
  padding-bottom: 12px;
}

html.is-mobile-page .svc-tab-arrow {
  display: none;
}

html.is-mobile-page .svc-tab {
  min-width: 0;
  padding: 6px 1px 4px;
  gap: 5px;
}

html.is-mobile-page .svc-tab__icon {
  width: clamp(20px, 5vw, 26px);
  height: clamp(20px, 5vw, 26px);
  border-radius: 8px;
}

html.is-mobile-page .svc-tab__glyph {
  font-size: clamp(9px, 2.4vw, 12px);
  line-height: 1;
}

html.is-mobile-page .svc-tab__label {
  letter-spacing: 0.03em;
  line-height: 1.2;
  max-width: none;
  word-break: normal;
  overflow-wrap: normal;
  hyphens: manual;
  gap: clamp(1px, 0.35vw, 3px);
}

html.is-mobile-page .svc-tab__lbl-pre {
  font-size: clamp(8px, 2.1vw, 10px) !important;
  letter-spacing: 0.06em;
  opacity: 0.62;
}

html.is-mobile-page .svc-tab__lbl-main {
  font-size: clamp(9px, 2.35vw, 11px) !important;
  letter-spacing: 0.03em;
  font-weight: 700;
}

html.is-mobile-page .svc-showcase-lede {
  font-size: clamp(14px, 3.8vw, 16px);
  min-height: 0;
}

html.is-mobile-page .svc-showcase-wrap {
  overflow: hidden;
}

html.is-mobile-page .svc-showcase-stage.svc-showcase-stage--swipe {
  touch-action: pan-y;
  cursor: grab;
}

html.is-mobile-page .svc-showcase-stage.svc-showcase-stage--swipe.is-dragging {
  cursor: grabbing;
  user-select: none;
}

html.is-mobile-page .svc-showcase-stage.svc-showcase-stage--swipe.is-dragging .svc-showcase-frame.is-active img {
  transform: none;
}

/* Stimmen — Teaser statt Netzwerk */
.testi-screen--mobile {
  padding-top: 48px;
  padding-bottom: 32px;
}

.mobile-testi-teaser {
  margin: 28px max(20px, env(safe-area-inset-left, 20px)) 0;
  padding: 22px 20px;
  border: 1px solid var(--rule);
  background: rgba(255, 255, 255, 0.02);
}

.mobile-testi-teaser p {
  margin: 0 0 18px;
  color: var(--ink-dim);
  font-size: 15px;
  line-height: 1.55;
}

.mobile-testi-teaser__cta {
  display: inline-flex;
  width: 100%;
  justify-content: center;
  text-decoration: none;
}

/* FAQ / Blog / Kontakt — kompakter, ohne Viewport-Overflow */
html.is-mobile-page .faq-screen,
html.is-mobile-page .blog-screen {
  padding-top: 48px;
  padding-bottom: 48px;
  height: auto;
  min-height: 0;
  overflow: visible;
}

html.is-mobile-page .faq-layout-wrap.container {
  height: auto;
  min-height: min(78dvh, 680px);
  max-height: none;
  overflow: visible;
  padding-left: max(20px, env(safe-area-inset-left, 20px));
  padding-right: max(20px, env(safe-area-inset-right, 20px));
}

html.is-mobile-page .faq-layout-title {
  font-size: clamp(26px, 7vw, 34px);
}

html.is-mobile-page .faq-layout-list {
  height: auto;
  max-height: none;
  min-height: min(52dvh, 460px);
  flex: 1 1 auto;
}

html.is-mobile-page .faq-accordion {
  min-height: min(48dvh, 420px);
}

html.is-mobile-page .faq-trigger {
  font-size: clamp(14px, 3.6vw, 16px);
  padding-block: clamp(8px, var(--faq-row-gap, 1vh), 14px);
}

html.is-mobile-page .contact-grid {
  grid-template-columns: 1fr;
  gap: 32px;
}

html.is-mobile-page .contact-footer-row {
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

html.is-mobile-page .contact-footer-links {
  flex-wrap: wrap;
  gap: 16px 20px;
}

html.is-mobile-page .contact-footer-links .contact-footer-credits-link {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: clamp(13px, 0.95vw, 14px);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

html.is-mobile-page .section-head-row {
  flex-direction: column !important;
  align-items: stretch !important;
}

html.is-mobile-page .blog-grid {
  grid-template-columns: 1fr;
}

html.is-mobile-page .container {
  padding-left: max(20px, env(safe-area-inset-left, 20px));
  padding-right: max(20px, env(safe-area-inset-right, 20px));
}

html.is-mobile-page #kontakt {
  padding-bottom: calc(48px + env(safe-area-inset-bottom, 0px)) !important;
}

html.is-mobile-page #kontakt .section-head-lede {
  font-size: clamp(16px, 4.5vw, 22px) !important;
  max-width: 100%;
}

/* Touch-Ziele */
html.is-mobile-page .btn-primary,
html.is-mobile-page .btn-primary:hover {
  color: #fff;
}

html.is-mobile-page .testi-trust-logo img {
  width: auto;
  height: auto;
}
html.is-mobile-page .testi-trust-bleed {
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  padding: 0 max(20px, env(safe-area-inset-right, 20px)) 0 max(20px, env(safe-area-inset-left, 20px));
  box-sizing: border-box;
  overflow-x: clip;
}

html.is-mobile-page .cookie-consent {
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding-left: max(12px, env(safe-area-inset-left, 12px));
  padding-right: max(12px, env(safe-area-inset-right, 12px));
}

html.is-mobile-page .cookie-consent__bar,
html.is-mobile-page .cookie-consent__panel-sheet {
  max-width: 100%;
  box-sizing: border-box;
}

html.is-mobile-page .hero-copy .hero-headline {
  max-width: 100% !important;
}

html.is-mobile-page .btn-combo,
html.is-mobile-page .svc-tab,
html.is-mobile-page .faq-item summary {
  min-height: 44px;
}

body.is-mobile-page.locked {
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  html.is-mobile-page {
    scroll-behavior: auto;
  }

  .mobile-nav__toggle span,
  .mobile-nav__toggle span::before,
  .mobile-nav__toggle span::after {
    transition: none;
  }
}
