@font-face {
  font-family: "Overpass";
  src:
    url("../fonts/overpass-900.woff2") format("woff2"),
    url("../fonts/overpass-900.woff") format("woff");
  font-style: normal;
  font-weight: 900;
  font-display: swap;
}

:root{
  /* ... */
  --container:1180px;
  /* Abstand zwischen Viewport-Kante und .container (links/rechts) */
  --container-gutter: calc((100vw - min(var(--container), calc(100vw - 48px))) / 2);

  --c-bg:#fff;
  --c-headline:#3E3E3E;
  --c-text:#7FAFB5;
  --c-text-inherit:#fff;
  --c-primary:#007165;
  --c-primary-2:#16968D;
  --c-primary-3:#A6C9CD;
  --c-soft:#f6fafb;

  --container:1180px;
  --radius:18px;
  --shadow:0 18px 40px rgba(0,0,0,.08);

  /* background pattern */
  --pattern-image:url("../img/header-img-graphic-two.png");
  --pattern-x:left;
  --pattern-y:top;
  --pattern-size:auto;
  --pattern-repeat:no-repeat;

  /* JS sets this to match fixed header height */
  --header-offset:76px;
}

*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; overflow-x: clip; }
body{
  overflow-x: visible;
  margin:0;
  font-size:clamp(18px, 1.25vw, 26px);
  font-family:"Overpass","Open Sans",system-ui,-apple-system,Segoe UI,Arial,sans-serif;
  color:var(--c-text);
  background:var(--c-bg);
  line-height:1.6;
  padding-top:var(--header-offset);
}
img{ max-width:100%; height:auto; display:block; }
a{ color:inherit; text-decoration:none; }
a:hover{ text-decoration:underline; }

.container{
  width:min(var(--container), calc(100% - 48px));
  margin-inline:auto;
}

.skip-link{
  position:absolute;
  left:-9999px;
  top:auto;
  width:1px;
  height:1px;
  overflow:hidden;
}
.skip-link:focus{
  left:16px;
  top:16px;
  width:auto;
  height:auto;
  padding:10px 12px;
  background:var(--c-text);
  color:var(--c-text-inherit);
  border-radius:10px;
  z-index:9999;
}

.cryptmail{
  display: none;
}

/* Typography */
p{
  margin-top: 0;
}
h1, .h1{
  letter-spacing:.02em;
  color:var(--c-headline);
  font-size:clamp(34px, 3.8vw, 56px);
  line-height:1.2;
  margin:0;
  text-transform:none;
}
h1 span{ display:inline-block; color:var(--c-primary); }

h2, .h2, h3.h2{
  margin:0;
  text-transform:uppercase;
  letter-spacing:.06em;
  color:var(--c-primary);
  font-size:clamp(18px, 1.25vw, 26px);
  line-height:1.4;
}
.datenschutz h3.h2, .payroll-services h3.h2, .buchhaltungs-services h3.h2{
  margin: 10px 0;
  text-transform: unset;
}

.link-arrow{
  display:inline-flex;
  align-items:center;
  gap:10px;
  color:var(--c-primary-2);
}
.link-arrow:hover{ text-decoration:none; opacity:.9; }

.space100d {
  margin: 0 0 100px 0;
}

/* ===============  Bild bündig links am Browserrand, Text bleibt im Container  =============== */
.bleed-left{
  max-width: none;
  width: calc(100% + var(--container-gutter));
  margin-left: calc(-1 * var(--container-gutter));
}

/* Banner-Bild */
.banner-img{
  display: block;
  height: clamp(520px, 34vw, 760px);
  object-fit: cover;
}
@media (max-width: 640px){
  .banner-img{
    height: clamp(240px, 55vw, 360px);
    object-position: center;
  }
}
@media (min-width: 1200px){
  .banner-img{
    height: clamp(520px, 38vw, 780px);
  }
}
/* Inhaltsbild */
.content-bleed-img{
  display: block;
  height: auto;
}

/* ===============  Topbar  =============== */
.topbar{
  position:fixed;
  left:0;
  right:0;
  top:0;
  z-index:2;
  background:var(--c-primary);
  color:var(--c-text-inherit);
  text-transform:uppercase;
  letter-spacing:.03em;
  font-size:14px;
}
.topbar .row{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:22px;
  padding:10px 0;
}
.topbar a{ color:var(--c-primary-3); }
.topbar a:hover, .topbar a.active{ color:var(--c-text-inherit); text-decoration:none; }

/* ===============  Header / Navigation  =============== */
.header{
  position:fixed;
  top:42px;
  z-index:1000;
  background:rgba(255,255,255,.92);
  backdrop-filter:blur(10px);
  border-bottom:1px solid rgba(0,0,0,.06);
  left:0;
  right:0;
  width:100%;
  transition: padding .22s ease, background-color .22s ease, box-shadow .22s ease, border-color .22s ease, backdrop-filter .22s ease;
}
.header .row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding:14px 0;
  transition: padding .22s ease;
}
.brand{
  display:flex;
  align-items:center;
  gap:14px;
}
.logo{
  height:60px;
  width:auto;
  display:block;
  transition: height .22s ease, transform .22s ease;
}

/* Header shrink on scroll (JS adds .is-scrolled) */
.header.is-scrolled{
  background:rgba(255,255,255,.98);
  box-shadow:0 10px 30px rgba(0,0,0,.08);
}
.header.is-scrolled .row{ padding:6px 0; }
.header.is-scrolled .logo{ height:44px; }

/* Hamburger */
.nav-toggle{ position:absolute; left:-9999px; }
.nav-toggle-label{
  display:none;
  width:50px;
  height:50px;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  position:relative;
}
.nav-toggle-label span{
  width:26px;
  height:4px;
  background:var(--c-primary);
  position:relative;
  display:block;
  border-radius:99px;
  transition: background .22s ease, transform .22s ease;
}
.nav-toggle-label span::before,
.nav-toggle-label span::after{
  content:"";
  position:absolute;
  left:0;
  width:26px;
  height:4px;
  background:var(--c-primary);
  border-radius:99px;
  transition: transform .22s ease, top .22s ease, opacity .18s ease;
}
.nav-toggle-label span::before{ top:-8px; }
.nav-toggle-label span::after{ top:8px; }

.nav-toggle:checked + .nav-toggle-label span{ background:transparent; }
.nav-toggle:checked + .nav-toggle-label span::before{ top:0; transform:rotate(45deg); }
.nav-toggle:checked + .nav-toggle-label span::after{ top:0; transform:rotate(-45deg); }

.nav{
  display:flex;
  align-items:center;
  gap:26px;
  letter-spacing:.03em;
}
.nav a{
  position:relative;
  padding:10px 0;
  text-decoration:none;
  font-size:clamp(16px, 1.25vw, 20px);
  color: var(--c-headline);
}
.nav a.active,
.nav a.active:hover,
.nav a:hover{
  color:var(--c-primary-2);
}
.nav a.active::after,
.nav a:hover::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:4px;
  height:2px;
  background:var(--c-primary-2);
  border-radius:99px;
}

/* ===============  Sections / Background helpers  =============== */
.section{ padding:90px 0; }
.section.nospace{ padding:0; }
.section.small-space{padding: 40px 0;}
.section.top-space{padding: 130px 0 40px 0;}
.section.bottom-space{padding: 40px 0 100px 0;}

.bg-soft{ background-color:var(--c-soft); }

.bg-pattern{
  background-image:var(--pattern-image);
  background-repeat:var(--pattern-repeat);
  background-position:var(--pattern-x) var(--pattern-y);
  background-size:var(--pattern-size);
}

/* common presets */
.pattern-left{ --pattern-x:left -180px; --pattern-y:top -120px; }
.pattern-right{ --pattern-x:right -180px; --pattern-y:top -120px; }
.pattern-top{ --pattern-y:top; }
.pattern-bottom{ --pattern-y:bottom; }

/* ===============  HERO  =============== */
.hero{
  min-height:auto;
  padding:50px 0 10px;
  background-image:
    url("../img/header-img-graphic.png"),
    radial-gradient(900px 500px at 10% 10%, rgba(126,190,197,.18), transparent 60%),
    radial-gradient(900px 600px at 90% 30%, rgba(0,95,83,.12), transparent 60%);
  background-position:
    left clamp(40px, 6vh, 100px),
    0 0,
    0 0;
  background-repeat:no-repeat, no-repeat, no-repeat;
  background-size:initial, auto, auto;
}

.hero-grid{
  /*min-height:calc(100vh - 56px);*/
  display:grid;
  grid-template-columns:0.8fr 1.1fr;
  gap:20px;
  align-items:start;
}

.hero-media{
  position:sticky;
  bottom:0;
  align-self:end;
  padding-bottom:10px;
  display:flex;
  align-items:flex-end;
  overflow:visible;
}

.hero-img{
  width:200%;
  max-width:none;
  max-height:calc(100vh - 140px);
  height:auto;
  object-fit:contain;
  filter:drop-shadow(0 22px 40px rgba(0,0,0,.14));
  margin-inline:0;
  margin-left:-120px;
}

.hero-text{
  position:relative;
  padding:30px 0;
  margin:100px 0 0 0;
}

.hero-cta{
  width:fit-content;
  margin:240px 0 0;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:6px;
  color:var(--c-primary-3);
  font-size:clamp(18px, 1.25vw, 26px);
}
.hero-cta-space{
  margin:240px 0 340px;
}

.hero-cta a{
  margin-top:-6px;
  width:56px;
  height:36px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  align-self:center;
}

.hero-cta a::after{
  content:"";
  width:0;
  height:0;
  border-left:10px solid transparent;
  border-right:10px solid transparent;
  border-top:12px solid var(--c-primary-3);
  display:block;
}
.hero-cta-mail {
  align-items: center;
  text-align: center;
}

.hero-cta-mail a {
  width: auto;
  height: auto;
  margin-top: 0;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  line-height: 1.25;
  color: var(--c-primary-3);
}

.hero-cta-mail a::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 12px solid var(--c-primary-3);
  display: block;
}

.space-left {margin-left: 50px;}
p:has(+ p.space-left){margin-bottom: 0;}

@media (prefers-reduced-motion: no-preference){
  .hero-cta a::after{ animation: arrow-float 2.1s cubic-bezier(.4,0,.2,1) infinite; }
  @keyframes arrow-float{
    0%,100%{ transform:translateY(0); }
    50%{ transform:translateY(3px); }
  }
}


/* Wipe-Reveal: Text wird sichtbar, Overlay fährt von rechts nach links weg */
/* Wipe-Reveal OHNE Overlay (kein weißer Balken) */
.wipe{
  display:inline-block;
  position:relative;
  will-change: clip-path;
}

/* Animation: Text wird von rechts nach links "freigeclippt" */
@media (prefers-reduced-motion: no-preference){
  .wipe{
    clip-path: inset(0 100% 0 0); /* komplett versteckt */
    animation: wipe-reveal 0.85s cubic-bezier(.4,0,.2,1) forwards;
  }

  @keyframes wipe-reveal{
    to{ clip-path: inset(0 0 0 0); } /* komplett sichtbar */
  }

  /* Stagger */
  .wipe--d1{ animation-delay: .15s; }
  .wipe--d2{ animation-delay: .45s; }
  .wipe--d3{ animation-delay: .75s; }
  .wipe--d4{ animation-delay: 1.05s; }
}

@media (prefers-reduced-motion: reduce){
  .wipe{ clip-path: inset(0 0 0 0); animation:none; }
}
/* Farbsetzung für die grüne Zeile (statt h1 span styling) */
.hero-title .wipe--d1,
.hero-title .wipe--d2{
  color: var(--c-headline);
}

.partner-icon {
  width: 100px;
  max-width: 100%;
  height: auto;
}

/* "Über mich" block in hero */
#lernen-sie-mich-kennen{
  margin-bottom:200px;
  scroll-margin-top: calc(var(--header-offset) + 150px);
}

/* Text blocks (no padding to avoid stacking doubles) */
.text{
  font-size:20px;
  line-height:1.35;
  max-width:640px;
  margin: 100px 0;
}
.text:last-child{ margin-bottom:0; }

/* ===============  Layout helpers  =============== */
.layout-2col{
  display:grid;
  grid-template-columns:var(--col-1, 1fr) var(--col-2, 1fr);
  gap:var(--col-gap, 40px);
  align-items:var(--col-align, start);
}
.cols-narrow-wide{ --col-1:.8fr; --col-2:1.2fr; }
.cols-wide-narrow{ --col-1:1.2fr; --col-2:.8fr; }
.cols-equal{ --col-1:1fr; --col-2:1fr; }
.cols-vcenter { --col-align: center; }
/* ===============  CTA  =============== */

.cta-line{
  height:1px;
  background:rgba(150,190,194,.9);
  margin-bottom:34px;
}
.cta-box{
  position:relative;
  color:var(--c-headline);
  font-size:clamp(30px, 3.2vw, 44px);
  line-height:1.1;
  padding: 26px 0 90px 0;
  text-align: center;
}
.cta-box a{ color:var(--c-primary); }
.cta-box a:hover{ text-decoration:none; opacity:.9; }
.cta-box .hint{
  display:block;
  margin-top:12px;
  font-size:18px;
  color:var(--c-primary);
}
.cta-box p {
  color: var(--c-primary);
  font-size: 25px;
}

/* ===============  Full-bleed image  =============== */
.section--fullbleed{ padding:40px 0 0; }
.fullbleed-img{
  width:100vw;
  height:clamp(520px, 34vw, 760px);
  object-fit:cover;
  display:block;
  margin-left:calc(50% - 50vw);
  margin-right:calc(50% - 50vw);
}
@media (max-width: 640px){
  .fullbleed-img{
    height: clamp(220px, 60vw, 360px);  /* mobile: weniger extrem */
    object-position: center;            /* oder: center top; je nach Motiv */
  }
}

/* ===============  Footer  =============== */
.footer{
  background:var(--c-primary);
  color:var(--c-text-inherit);
  padding:56px 0 22px;
}
.footer-grid{
  display:grid;
  grid-template-columns: 1.15fr .55fr .75fr 1fr auto;
  gap:22px;
  align-items:start;
}
.footer-nav{
  display:flex;
  flex-direction:column;
  gap:14px;
  font-size:18px;
}
.footer-nav a:hover{ text-decoration:none; color:var(--c-primary-3); }
.footer-address{
  font-size:18px;
  line-height:1.6;
}
.footer-bottom{
  display:flex;
  justify-content:flex-end;
  gap:30px;
  padding-top:18px;
  margin-top:22px;
  border-top:1px solid rgba(255,255,255,.18);
  font-size:16px;
}
.footer-bottom a{ color:var(--c-primary-3); }
.footer-bottom a:hover{ text-decoration:none; opacity:1; }

.footer-logo{ line-height:0; }
.footer-logo-svg{
  width:240px;
  height:auto;
  display:block;
}
.footer-logo-svg *{
  fill:#fff;
  stroke:none;
}
.footer-logo-svg .mark *{
  stroke:rgba(0,0,0,.35); /* subtle inner lines */
  stroke-width:2;
  stroke-linejoin:round;
  stroke-miterlimit:2;
  paint-order:stroke fill;
}
.footer .partner-icon {
  width: 70px;
}

/* Back to top */
/* Back to top – wie Original (Outline + Dreieck) */
.to-top{
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: var(--c-bg);
  border: 2px solid var(--c-primary-2);
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  text-decoration: none;
}

.to-top::before{
  content:"";
  width: 0;
  height: 0;
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-bottom: 12px solid var(--c-primary-2);
  transform: translateY(-1px);
}
.to-top:hover{
  background: #fff;
  transform: none;
}
/* Zustand: über Footer (grün) */
.to-top.on-footer{
  background: var(--c-primary);
}

/* optional: kleinerer Button auf Mobile */
@media (max-width: 980px){
  .to-top{
    width: 52px;
    height: 52px;
  }
}
/*
.to-top{
  position:fixed;
  right:18px;
  bottom:18px;
  width:52px;
  height:52px;
  border-radius:999px;
  background:rgba(255,255,255,.92);
  border:1px solid rgba(0,0,0,.12);
  box-shadow:var(--shadow);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:999;
}
.to-top:hover{ transform:translateY(-1px); }
.to-top img{ width:22px; height:auto; }
*/
/* ===============  Responsive  =============== */
@media (max-width: 980px){
  .topbar .row{ justify-content:center; flex-wrap:wrap; }

  .nav-toggle-label{ display:flex; }

  .nav{
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translate(-50%, -10px);
    width: min(420px, calc(100vw - 48px));
    background: var(--c-primary);
    color: #fff;

    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;

    padding: 0;
    border-radius: 2px;
    box-shadow: 0 16px 40px rgba(0,0,0,.25);

    /* geschlossen */
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;

    transition:
            max-height .55s ease,
            opacity .25s ease,
            transform .55s ease;
  }

  .nav a{
    color:#fff;
    padding: 6px 12px;
    text-decoration:none;
    border: 0;            /* keine Linien */
  }

  .nav a.active, .nav a.active:hover, .nav a:hover {
    color: var(--c-primary);
    background: var(--c-primary-3);
  }

  .nav a:hover:after, .nav a.active:after {
    background: transparent;
  }

  .nav-toggle:checked ~ .nav{
    max-height: 70vh;
    opacity: 1;
    transform: translate(-50%, 0);
    pointer-events: auto;
  }

  .hero{
    padding:100px 0 24px;
  }
  .hero-grid{
    min-height:auto;
    grid-template-columns:1fr;
    gap:18px;
  }
  .hero-text{ display:contents; }
  .hero-text h1{ order:1; }
  .hero-text h2{ order:2; }
  .hero-text p {order:4;}
  .hero-cta{ display:none; }
  .hero-media{
    order:3;
    position:static;
    padding-bottom:0;
  }
  .hero-img{
    position:static;
    width:100%;
    max-width:520px;
    margin-inline:auto;
    max-height:none;
    margin-left:0;
  }
  #lernen-sie-mich-kennen{ order:4; }

  .layout-2col{ grid-template-columns:1fr; gap:26px; }

  .footer{
    padding: 42px 0 24px;
  }

  .footer-grid{
    display: grid;
    grid-template-columns: max-content max-content;
    gap: 22px 58px;
    align-items: start;
    justify-content: start;
  }

  .footer-logo{
    grid-column: 1 / -1;
  }

  .footer .partner-icon{
    grid-column: 2 / 3;
    width: 58px;
    justify-self: end;
    align-self: start;
    margin-top: 4px;
  }

  .footer-logo-svg{
    width: 210px;
    max-width: 100%;
  }

  .footer-nav{
    gap: 10px;
    font-size: 18px;
    line-height: 1.35;
  }

  .footer-address{
    grid-column: 1 / 2;
    font-style: normal;
    font-size: 18px;
    line-height: 1.55;
  }

  .footer-bottom{
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 26px;
    padding-top: 18px;
  }
}

@media (max-width: 430px){
  .footer-grid{
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .footer-logo-svg{
    width: 190px;
  }

  .footer-nav{
    gap: 9px;
  }

  .footer-address{
    grid-column: 1;
    font-size: 17px;
  }
  .footer-logo{
    grid-column: 1;
    grid-row: auto;
  }
  .footer .partner-icon{
    grid-column: 1;
    grid-row: auto;
    justify-self: start;
    width: 60px;
    margin-top: 2px;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  .header,
  .header .row,
  .logo{
    transition:none !important;
  }
  .hero-cta a::after{ animation:none !important; }
}
