:root{
  --brand-dark: #000000;
  --brand-light: #a4cede;
  --page-bg: #fffeef;
  --logo-h: 90px;
  --nav-gap: 16px;
  --content-max: 1100px;
}

/* Base */
body{
  margin: 0;
    padding: 0;
    min-height: 100vh;
    color: #000;
    display: flex;
    flex-direction: column;
    font-family: 'Poppins', sans-serif;
    background-color: #fffeef;
}

/* Header / Logo (fixed top-right) */
header {
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 11000; /* höher als .top-nav */
    height: var(--logo-h);
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.logo img {
    height: var(--logo-h);
    max-width: 40vw;
    width: auto;
    object-fit: contain;
}
/* Centered top-nav aligned with logo */
.top-nav {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    top: calc(var(--logo-h) + var(--nav-gap));
    z-index: 10900; /* kleiner als header */
    width: 95%;
    max-width: 920px;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    background: rgba(255,255,255,0.95);
    padding: 8px 12px;
    border-radius: 40px;
}

.top-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 30px;
    align-items: center;
}

.top-nav ul li a {
    text-decoration: none;
    color: #000;
    font-weight: bold;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    padding: 8px 16px;
    border-radius: 25px;
}

.top-nav ul li a:hover {
    background: #d1d1d1;
    color: #fff;
}

.top-nav ul li.separator {
    color: #a4cede;
    font-size: 0.8rem;
}


/* Reserve space for header+nav */
main{ margin-top:calc(var(--logo-h-desktop) + 48px); flex:1; }

/* Projects section layout (mirrors Angebot) */
.projects-section{ padding:40px 16px 80px; }
.projects-container{ max-width:var(--content-max); margin:0 auto; }
.projects-container h1{
  text-align:center;
  color:var(--brand-dark);
  font-size:2.4rem;
  margin: 6px 0 48px;
  animation: h1-entrance 700ms ease-out;
}

/* Grid and cards (clean white cards) */
.project-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
  align-items: stretch;
  padding: 0 6px;
}
.project-card{
  background:#ffffff;
  border-radius:16px;
  padding:28px;
  border:1px solid rgba(26,52,116,0.06);
  box-shadow:0 10px 30px rgba(26,52,116,0.05);
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  transform: translateY(22px);
  opacity: 0;
  animation: card-pop 700ms cubic-bezier(.2,.9,.3,1) forwards;
}
.project-card:nth-child(1){ animation-delay: 220ms; }
.project-card:nth-child(2){ animation-delay: 380ms; }
.project-card:nth-child(3){ animation-delay: 540ms; }

.project-content{ width:100%; }
.project-content h2{ margin:0 0 8px; color:var(--brand-dark); font-size:1.6rem; }
.project-content h3{ margin:0 0 16px; color:#333; font-size:1.15rem; font-weight:500; }

/* status badge */
.status{
  display:inline-block;
  padding:8px 14px;
  background:#000000;
  color:#fff;
  border-radius:20px;
  font-size:0.9rem;
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:0.6px;
}
.project-content .status a,
.project-content .status a:visited,
.project-content .status a:hover,
.project-content .status a:focus {
  color: inherit;
  text-decoration: none;
  outline: none;
}

/* Footer: relative at page end */
footer {
    position: relative;
    width: 100%;
    padding: 20px 0;
    background: rgba(255, 255, 255, 0.95);
    margin-top: 40px;
}

footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

footer ul li a {
    color: #000;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s ease;
}

footer ul li a:hover {
    color: #a4cede;
}

/* ==== Animations like Angebot ==== */

/* Animated gradient headline + underline */
.projects-container h1 {
  background: linear-gradient(90deg, #000 0%, #000 45%, #000 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: block;
  margin: 0 auto 48px;
  animation: h1-entrance 700ms cubic-bezier(.2,.9,.3,1) both,
             h1-grad-shift 6s linear infinite;
  position: relative;
}

/* decorative underline that grows */
.projects-container h1::after {
  content: "";
  display: block;
  height: 6px;
  width: 0%;
  background: #000;
  border-radius: 6px;
  margin: 12px auto 0;
  animation: underline-grow 700ms 220ms cubic-bezier(.2,.9,.3,1) forwards;
}

/* Project card entrance + stagger */
.project-card {
  position: relative;
  transform: translateY(18px) scale(.995);
  opacity: 0;
  animation: card-pop 620ms cubic-bezier(.2,.9,.3,1) forwards;
  will-change: transform, opacity;
}

/* stagger delays */
.project-grid .project-card:nth-child(1) { animation-delay: 260ms; }
.project-grid .project-card:nth-child(2) { animation-delay: 420ms; }
.project-grid .project-card:nth-child(3) { animation-delay: 580ms; }

/* small accent badge (grows) */
.project-card::before {
  content: "";
  position: absolute;
  top: 18px;
  left: 20px;
  width: 44px;
  height: 6px;
  background: #000;
  border-radius: 6px;
  transform-origin: left center;
  opacity: 0;
  transform: scaleX(0);
  animation: badge-pop 520ms 480ms cubic-bezier(.2,.9,.3,1) forwards;
}

/* keyframes */
@keyframes h1-entrance {
  from { opacity: 0; transform: translateY(12px) scale(.995); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes h1-grad-shift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes underline-grow {
  from { width: 0%; opacity: 0; }
  to   { width: 48%; opacity: 1; }
}
@keyframes card-pop {
  from { opacity: 0; transform: translateY(18px) scale(.995); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes badge-pop {
  from { transform: scaleX(0); opacity: 0; }
  to   { transform: scaleX(1); opacity: 1; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .projects-container h1,
  .projects-container h1::after,
  .project-card,
  .project-card::before {
    animation: none !important;
    transition: none !important;
  }
}

/* Responsive */
@media screen and (max-width: 1024px) {
    :root{ --logo-h:80px; }
    main{ margin-top: calc(var(--logo-h) + 90px); }
}

@media screen and (max-width: 900px) {
  header {
    position: relative;
    top: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 15px;
    z-index: 50;
  }

  .logo img {
    max-height: 90px;
    width: auto;
  }

  .top-nav {
    position: relative;
    top: 0;
    left: 0;
    transform: none;
    margin-top: 10px;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    padding: 10px 20px;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  }

  .top-nav ul {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }
}


@media screen and (max-width: 768px) {
    :root{ --logo-h:72px; }
    .top-nav{ top: calc(var(--logo-h) + 12px); }
    main{ margin-top: calc(var(--logo-h) + 82px); }

    .logo img {
        max-height: 100px;
    }

    .top-nav {
        padding: 12px 25px;
        width: 90%;
    }

    .top-nav ul {
        gap: 15px;
    }

    .top-nav ul li a {
        font-size: 1rem;
        padding: 6px 12px;
    }

    main {
        margin-top: 160px;
    }

    .services-section {
        padding: 15px;
    }

    h1 {
        font-size: 2rem;
        margin-bottom: 30px;
    }

    .service-icon svg {
        width: 56px;
        height: 56px;
    }
}

@media screen and (max-width: 480px) {
    :root{ --logo-h:56px; }
    header{ right:8px; }
    .top-nav{ top: calc(var(--logo-h) + 10px); padding:6px 8px; border-radius:32px; }
    main{ margin-top: calc(var(--logo-h) + 72px); }

    .logo img {
        max-height: 80px;
    }

    .top-nav {
        padding: 8px 15px;
        top: 30px;
    }

    .top-nav ul {
        gap: 10px;
    }

    .top-nav ul li a {
        font-size: 0.9rem;
        padding: 5px 10px;
    }

    main {
        /* margin-top: 130px; */
        margin-top: clamp(120px, 20vh, 220px);
    }

    h1 {
        font-size: 1.8rem;
        margin-bottom: 25px;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 10px;
    }

    .service-card {
        padding: 20px;
    }

    .service-card h2 {
        font-size: 1.3rem;
    }

    .service-icon svg {
        width: 48px;
        height: 48px;
    }
}

/* Override: center first h1 and force black for texts & animated parts */
.services-section h1 {
  color: #000 !important;
  text-align: center !important; /* ensure centered */
}

/* animated underline (h1) -> black */
.services-section h1::after {
  background: #000 !important;
}

/* animated badge on cards -> black */
.service-card::before {
  background: #000 !important;
  box-shadow: 0 6px 18px rgba(0,0,0,0.12) !important;
}

/* make general text black */
body,
.services-section h1,
.service-card h2,
.service-card p,
.top-nav ul li a,
footer ul li a {
  color: #000 !important;
}

/* icons: fill/stroke -> black */
.service-icon svg,
.service-icon svg * {
  fill: #000 !important;
  stroke: #000 !important;
  color: #000 !important;
}

/* ensure animated gradients fallback to black where applied */
@keyframes h1-grad-shift { /* keep animation but ensure visible on black text fallback */ }

/* respect reduced motion (no change) */
@media (prefers-reduced-motion: reduce) {
  .services-section h1,
  .services-section h1::after,
  .service-card,
  .service-card::before {
    animation: none !important;
    transition: none !important;
  }
}