/* ==========================================================
   CUSTOM OVERRIDES – load this AFTER all other CSS
   (e.g. after assets/style_glass_ios.css)
   ========================================================== */

/* White/lilac glassy background + subtle cursor tint */
body::before{
  background:
    radial-gradient(900px 520px at var(--mx, 22%) var(--my, 6%),
      rgba(196,168,255,.14), transparent 70%),
    radial-gradient(900px 520px at calc(100% - var(--mx, 22%)) calc(var(--my, 10%) + 6%),
      rgba(255,255,255,.045), transparent 72%),
    radial-gradient(1000px 560px at calc(100% - var(--mx, 22%)) calc(var(--my, 10%) + 6%),
      rgba(90,224,181,.020), transparent 74%),
    linear-gradient(180deg,
      rgba(2, 8, 20, .995) 0%,
      rgba(1, 4, 12, .995) 55%,
      rgba(2, 6, 16, .995) 100%) !important;
  filter: saturate(1.06) contrast(1.08) !important;
}

/* Glass overlay (a bit white + lilac) */
body::after{
  content:"";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg,
    rgba(255,255,255,.060) 0%,
    rgba(196,168,255,.040) 45%,
    rgba(255,255,255,.030) 100%);
  backdrop-filter: blur(14px) saturate(1.10);
  -webkit-backdrop-filter: blur(14px) saturate(1.10);
}

/* Topbar uses scroll variables (set by JS) */
.topbar{
  background: rgba(var(--bg-rgb), var(--topbarAlpha, .72)) !important;
  border-bottom-color: rgba(255,255,255, var(--topbarBorder, .14)) !important;
  backdrop-filter: blur(14px) saturate(1.10);
  -webkit-backdrop-filter: blur(14px) saturate(1.10);
}
/* iOS/Safari: iframe in flex-modal korrekt wachsen lassen */
.pdfmodal__frame{
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
}
/* iPhone: PDF-Modal nicht anzeigen (iOS iframe-PDF ist oft leer) */
.is-iphone .pdfmodal{ display:none !important; }

/* iPhone: Preview-Button ausblenden, "Open" bleibt */
.is-iphone .pdfactions .pdfopen{ display:none !important; }
.is-iphone .pdfactions a.btn{ width:100% !important; }
/* ==========================================================
   Touch devices: weniger Hover/Glow (iPhone/iPad/Android)
   ========================================================== */
@media (hover: none), (pointer: coarse){
  /* Hover-“Lift” ausschalten (fühlt sich auf Touch komisch an) */
  .download:hover, .pdfcard:hover, .contactcard:hover{
    transform: none !important;
  }

  /* Hintergrundglow etwas schwächer */
  body::before{
    filter: saturate(1.03) contrast(1.06) !important;
    opacity: .82 !important;
  }

  /* Buttons/Glas etwas ruhiger */
  .btn:hover{
    filter: none !important;
  }
}
/* ==========================================================
   Keyboard focus (professioneller + barriereärmer)
   ========================================================== */
:focus-visible{
  outline: 2px solid rgba(196,168,255,.60);
  outline-offset: 3px;
}

/* Interaktive Elemente: runde Focus-Optik */
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible{
  border-radius: 14px;
}

/* iOS Tap Highlight dezenter */
a, button{
  -webkit-tap-highlight-color: rgba(196,168,255,.25);
}
.btn--twoline{
  white-space: normal;
  line-height: 1.05;
  text-align: center;
  padding-top: 10px;
  padding-bottom: 10px;
}
@media (hover: none), (pointer: coarse){
  .download, .pdfcard, .servicecard, .contactcard, .card{
    cursor: pointer;
    -webkit-tap-highlight-color: rgba(196,168,255,.22);
    touch-action: manipulation;
  }

  .download:active, .pdfcard:active, .servicecard:active, .contactcard:active, .card:active,
  details > summary:active{
    border-color: rgba(196,168,255,.65) !important;
    background: rgba(255,255,255,.06) !important;
    box-shadow:
      0 0 0 1px rgba(196,168,255,.18),
      0 22px 70px rgba(0,0,0,.55) !important;
    transform: translateY(-1px);
    filter: brightness(1.05) saturate(1.03);
  }
}
