/* Basis */
* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: #fff;
  color: #000;
  font: 16px/1.3 Arial, sans-serif;
}

/* Variablen */
:root{
  --cards-offset: 32px;     /* Abstand Kachel-Block zur oberen Kante im Brand */
  --hero-h-desktop: 520px;  /* Höhe des Hero-Bildes (Content-Seiten) */
  --hero-h-mobile: 380px;   /* Höhe des Hero-Bildes mobil (Content-Seiten) */
}

/* Header */
.site-header {
  background: #fff;
  padding: 48px 16px 8px;
  text-align: center;
  position: relative;
  z-index: 5;
}

/* Logo – Bewegung nur in der Maske */
.perlitech-logo {
  width: 78vw;
  max-width: 56rem;
  margin: 0 auto;
  position: relative;
  z-index: 5;
}
.perlitech-logo a {
  display: block;             /* Fix: volle Breite statt inline-block */
  width: 100%;
  text-decoration: none;
}
.perlitech-logo .logo {
  aspect-ratio: 150/40;
  width: 100%;
  display: block;
  -webkit-mask: url("PerliTech.svg") no-repeat center/120% auto;
          mask: url("PerliTech.svg") no-repeat center/120% auto;
  background-image: url("bg-perlitech.jpg");
  background-repeat: no-repeat;
  background-size: 200%;
  background-position: 50% 0%;
  animation: logoMove 130s linear infinite alternate;
}

/* Spiegelung unter dem Logo */
.perlitech-logo .reflection {
  opacity: .25;
  margin-top: -5%;
  aspect-ratio: 150/15;
  overflow: hidden;
  width: 100%;
}
.perlitech-logo .reflection .logo {
  transform: scaleY(-1);
  -webkit-mask: url("PerliTech.svg") no-repeat center/120% auto;
          mask: url("PerliTech.svg") no-repeat center/120% auto;
  background-image: url("bg-perlitech.jpg");
  background-repeat: no-repeat;
  background-size: 200%;
  background-position: 50% 0%;
  animation: logoMove 130s linear infinite alternate;
}
.perlitech-logo .reflection::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #fff 10%, rgba(255, 255, 255, .25));
  backdrop-filter: blur(.5rem);
}

/* Logo-Animation */
@keyframes logoMove {
  0%   { background-position: 0% 0%; }
  25%  { background-position: 50% 50%; }
  50%  { background-position: 100% 100%; }
  75%  { background-position: 75% 50%; }
  100% { background-position: 0% 0%; }
}

/* Brand-Bereich – STARTSEITE (vollflächiges Bild mit Dimmung) */
.brand {
  position: relative;
  min-height: 40em;
  padding: 0 0 32px 0;
  background: linear-gradient(43deg, #9e2896, #440c41);
  overflow: hidden;
}
.brand::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url("bg-perlitech.jpg");
  background-position: top center;
  background-repeat: no-repeat;
  background-size: cover;
  transform: scaleX(-1);

  /* Dimmung nur fürs Bild, nicht für Text */
  background-color: rgba(0, 0, 0, 0.35);
  background-blend-mode: overlay;

  /* Klicks durchlassen */
  pointer-events: none;
}

/* Überlappende Kacheln (nur Startseite) */
.menu-resources {
  position: relative;
  list-style: none;
  padding: 0;
  margin: var(--cards-offset) auto 0;
  max-width: 50rem;
  height: 18em;              /* Bühne für die Overlaps */
  text-align: center;
  z-index: 1;                /* über dem Brand-Hintergrund */
}
.menu-resources .placeholder { display: none; }

.menu-resources li {
  position: absolute;
  display: inline-block;
  margin: 0;
  padding: 0;
  width: 10.5em;
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(0.25rem);
  border-radius: 0.5em;
  box-shadow: 0.25em 0.5em 0.5em rgba(0, 0, 0, 0.25);
  color: #000;
  transform-origin: center;
}
.menu-resources li a {
  display: block;
  padding: 1.1em 1em 1.6em;
  color: inherit;
  text-decoration: none;
}
.menu-resources li .title {
  display: block;
  font-weight: 700;
  font-size: 1.1rem;
}
.menu-resources li .description {
  display: block;
  font-size: .82rem;
  margin-top: .4rem;
}

/* Linke Karte */
.menu-resources li:nth-child(2) {
  z-index: 5;
  background-color: rgba(0, 164, 253, 0.75);
  color: #fff;
  right: calc(50% + 4em);
  top: 4%;
  transform: rotate(5deg);
}

/* Rechte Karte */
.menu-resources li:nth-child(3) {
  z-index: 17;
  background-color: rgba(102, 102, 255, 0.75);
  color: #fff;
  left: calc(50% + 4.5em);
  top: 15%;
  transform: rotate(-5deg);
}

/* Mittlere Karte */
.menu-resources li:nth-child(4) {
  z-index: 18;
  background-color: rgba(177, 46, 169, 0.85);
  color: #fff;
  left: calc(49% - 4.5em);
  top: 36%;
}

/* Hover-Verhalten */
.menu-resources li:hover {
  box-shadow: 0.35em 0.8em 1em rgba(0, 0, 0, 0.3);
  transform: translateY(-2px) rotate(var(--r, 0deg));
}

/* Marker zuverlässig ausblenden */
.menu-resources { list-style-type: none; }
.menu-resources li::marker { content: ""; }

/* Bewegungsreduktion */
@media (prefers-reduced-motion: reduce) {
  .perlitech-logo .logo,
  .perlitech-logo .reflection .logo {
    animation: none;
  }
}

/* Altes PNG-Logo über den Kacheln (Startseite), 450px breit, leicht überlappend */
.perlitech-oldlogo {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  margin: 100px auto 0px;
}
.perlitech-oldlogo img {
  width: 450px;
  height: auto;
  display: block;
  border-radius: 0.5em;
  box-shadow: 0.25em 0.5em 0.5em rgba(0, 0, 0, 0.25);
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(0.25rem);
}

/* --------------------------------------------------------- */
/* Content-Seiten (Impressum, Datenschutz) – HERO oben, Fade */
/* --------------------------------------------------------- */

/* Content-Seiten: Bild oben, darunter diagonaler Verlauf */
.brand.content-page{
  min-height: auto;
  padding: 2rem 0 2.5rem;
  position: relative;
  overflow: hidden;

  /* NEU: diagonaler Hintergrund-Gradient NACH dem Bild */
    background: linear-gradient(150deg, #000000 50%, #4b0d46 100%);
}

/* Begrenztes Hero-Bild nur oben, mit Fade-out – NUR Content-Seiten */
.brand.content-page::before {
  content:"";
  position:absolute;
  inset:0 0 auto 0;                 /* oben ansetzen */
  height: var(--hero-h-desktop);     /* Höhe Desktop */
  z-index:0;
  background-image: url(bg-perlitech.jpg);
  background-position: top center;
  background-repeat: no-repeat;
  background-size: cover;
  transform: scaleX(-1);

  /* Abdunklung */
  background-color: rgba(0,0,0,0.6);
  background-blend-mode: overlay;

  /* diagonaler weicher Übergang */
  -webkit-mask-image: linear-gradient(135deg, rgba(0,0,0,1) 70%, rgba(0,0,0,0) 100%);
          mask-image: linear-gradient(135deg, rgba(0,0,0,1) 70%, rgba(0,0,0,0) 100%);

  pointer-events:none;
}
@media (max-width: 768px){
  .brand.content-page::before{
    height: var(--hero-h-mobile);
  }
}

/* Textblock (Main) auf Content-Seiten */
.brand.content-page > .content-page {
  position: relative;
  z-index: 1;               /* sicher über dem ::before */
  max-width: 50rem;
  width: 100%;
  margin: 0 auto;
  padding: 0 1.25rem;
  text-align: left;
  line-height: 1.6;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.45);
  background: none;
  box-shadow: none;
}
.brand.content-page > .content-page h1,
.brand.content-page > .content-page h2,
.brand.content-page > .content-page p,
.brand.content-page > .content-page address,
.brand.content-page > .content-page nav {
  margin: 0 0 1.2rem;
}
.brand.content-page > .content-page h1 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
}
.brand.content-page > .content-page h2 {
  font-size: 1.3rem;
  margin-top: 1.5rem;
}
.brand.content-page > .content-page a {
  color: #fff;
  text-decoration: underline;
}
.brand.content-page > .content-page a:hover {
  text-decoration: none;
}

/* --------------------------------------------------------- */
/* Fixes: Skip-Link + PNG-Logo über Karten                   */
/* --------------------------------------------------------- */

/* Skip-Link nur bei Fokus anzeigen */
.skip-link{
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus{
  left: 16px;
  top: 8px;
  width: auto;
  height: auto;
  padding: 8px 12px;
  background: #000;
  color: #fff;
  z-index: 9999;
  border-radius: 4px;
}

/* altes PNG über den Karten halten */
.perlitech-oldlogo{
  z-index: 2;
}