/* =========================================================================
   dunkel.tech — main stylesheet
   Palette & structure derived from the current dunkel.tech site,
   modernised: generous whitespace, cards, sticky header, responsive grid.
   ========================================================================= */

/* ---------------------------------------------------------------- fonts */
@font-face{font-family:"Lato";src:url("../fonts/lato-400.woff2") format("woff2");font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:"Lato";src:url("../fonts/lato-400-italic.woff2") format("woff2");font-weight:400;font-style:italic;font-display:swap}
@font-face{font-family:"Lato";src:url("../fonts/lato-700.woff2") format("woff2");font-weight:700;font-style:normal;font-display:swap}
@font-face{font-family:"Lato";src:url("../fonts/lato-900.woff2") format("woff2");font-weight:900;font-style:normal;font-display:swap}

/* ---------------------------------------------------------------- tokens */
:root{
  --dark:#2a3c2a;
  --dark-2:#1f2d1f;
  --green:#3f9147;
  --green-600:#347a3b;
  --green-light:#5eab60;
  --mint:#d6fcd0;
  --mint-soft:#eef8ec;
  --blue:#4a5e92;
  --ink:#182019;
  --muted:#5d6b60;
  --paper:#ffffff;
  --paper-2:#f5f8f4;
  --line:#e3ebe2;
  --radius:14px;
  --radius-sm:9px;
  --shadow:0 1px 2px rgba(26,44,26,.06),0 8px 24px rgba(26,44,26,.07);
  --shadow-hover:0 6px 16px rgba(26,44,26,.10),0 18px 40px rgba(26,44,26,.12);
  --maxw:1160px;
  --gap:clamp(1.25rem,3vw,2.25rem);
  --font:"Lato",system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;
  --mono:ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,"Liberation Mono",monospace;
}

/* ---------------------------------------------------------------- base */
*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%}
body{
  margin:0;font-family:var(--font);color:var(--ink);background:var(--paper);
  font-size:clamp(16px,1.05vw,17.5px);line-height:1.65;overflow-x:hidden;
  -webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;
}
img{max-width:100%;height:auto;display:block}
/* prevent long words / wide code blocks from forcing horizontal overflow */
h1,h2,h3,h4,p,li,a{overflow-wrap:break-word}
.grid>*,.about>*,.blocks,.blocks>*,.card__body,.postrow__body,.hero__card{min-width:0}
pre[class*="language-"]{max-width:100%}
a{color:var(--green-600);text-decoration:none;transition:color .18s}
a:hover{color:var(--green)}
h1,h2,h3,h4{line-height:1.18;font-weight:900;color:var(--ink);margin:0 0 .5em;letter-spacing:-.01em}
h1{font-size:clamp(2rem,4.6vw,3.25rem)}
h2{font-size:clamp(1.55rem,3vw,2.3rem)}
h3{font-size:clamp(1.2rem,2vw,1.5rem)}
p{margin:0 0 1.1em}

.wrap{width:100%;max-width:var(--maxw);margin-inline:auto;padding-inline:clamp(1rem,4vw,2rem)}
.section{padding-block:clamp(3rem,7vw,6rem)}
.section--tight{padding-block:clamp(2rem,4vw,3rem)}
.section--mint{background:var(--mint-soft)}
.section--paper2{background:var(--paper-2)}

/* the signature "//" accent used on eyebrows and headings */
.eyebrow{
  display:inline-block;font-weight:700;color:var(--green-600);
  letter-spacing:.02em;margin-bottom:.9rem;font-size:.95rem;
}
.eyebrow::before,.slash::before{content:"// ";color:var(--green);font-weight:900}
.lead{font-size:clamp(1.05rem,1.6vw,1.3rem);color:var(--muted);max-width:60ch}

/* ---------------------------------------------------------------- buttons */
.btn{
  display:inline-flex;align-items:center;gap:.5rem;
  background:var(--green);color:#fff;font-weight:700;
  padding:.75rem 1.4rem;border-radius:999px;border:0;cursor:pointer;
  transition:background .18s,transform .18s,box-shadow .18s;
  box-shadow:0 6px 18px rgba(63,145,71,.28);
}
.btn:hover{background:var(--green-600);color:#fff;transform:translateY(-1px)}
.btn--ghost{background:transparent;color:var(--green-600);box-shadow:none;border:1.5px solid var(--line)}
.btn--ghost:hover{background:var(--mint-soft);color:var(--green-600);border-color:var(--green-light)}
.btn__arrow{transition:transform .18s}
.btn:hover .btn__arrow{transform:translateX(3px)}

/* ---------------------------------------------------------------- header */
.topbar{background:var(--dark-2);color:#cfe0cf;font-size:.85rem}
.topbar .wrap{display:flex;align-items:center;justify-content:space-between;min-height:40px;gap:1rem}
.topbar a{color:#cfe0cf}
.topbar a:hover{color:#fff}
.topbar__social{display:flex;gap:.35rem}
.topbar__social a{display:grid;place-items:center;width:30px;height:30px;border-radius:7px;transition:background .18s}
.topbar__social a:hover{background:rgba(255,255,255,.12)}
.topbar__social svg{width:16px;height:16px;fill:currentColor}
.topbar__mail{display:inline-flex;align-items:center;gap:.45rem;font-weight:700}

.masthead{position:sticky;top:0;z-index:50;background:rgba(255,255,255,.9);
  backdrop-filter:saturate(1.4) blur(8px);border-bottom:1px solid var(--line)}
.masthead .wrap{display:flex;align-items:center;justify-content:space-between;min-height:74px;gap:1rem}
.brand{display:flex;align-items:center;gap:.6rem;font-weight:900;font-size:1.35rem;color:var(--ink)}
.brand:hover{color:var(--ink)}
.brand__logo{width:44px;height:44px;flex:0 0 auto}
.brand b{color:var(--green)}

.nav{display:flex;align-items:center;gap:.35rem}
.nav a{
  position:relative;color:var(--ink);font-weight:700;padding:.55rem .9rem;border-radius:8px;
}
.nav a:hover{background:var(--mint-soft);color:var(--green-600)}
.nav a[aria-current]{color:var(--green-600)}
.nav a[aria-current]::after{content:"";position:absolute;left:.9rem;right:.9rem;bottom:.28rem;height:2px;background:var(--green)}

/* dropdown (Entwicklung → Odoo/Django …) */
.nav-item{position:relative;display:flex;align-items:center}
.nav-item>a{display:inline-flex;align-items:center}
.nav-caret{font-size:.62em;margin-left:.4em;opacity:.65;transition:transform .18s}
.nav-item:hover .nav-caret,.nav-item:focus-within .nav-caret{transform:rotate(180deg)}
/* A "code comment" panel rather than a generic dropdown: white with a green
   accent edge and monospace items — and it opens *below* the masthead so it
   sits on the section area instead of inside the bar. */
.dropdown{
  position:absolute;top:calc(100% + 16px);left:50%;
  min-width:225px;margin:0;padding:.5rem .5rem .5rem .3rem;list-style:none;
  background:var(--paper);
  border:1px solid var(--line);
  border-left:3px solid var(--green);
  border-radius:0 var(--radius-sm) var(--radius-sm) 0;
  box-shadow:var(--shadow-hover);
  z-index:60;
  opacity:0;visibility:hidden;
  transform:translateX(-50%) translateY(8px);
  transition:opacity .18s ease,transform .18s ease,visibility .18s;
}
/* invisible bridge so the pointer can travel across the gap to the panel */
.dropdown::before{content:"";position:absolute;left:0;right:0;top:-16px;height:16px}
.nav-item:hover .dropdown,.nav-item:focus-within .dropdown{opacity:1;visibility:visible;transform:translateX(-50%) translateY(0)}
.dropdown li a{position:relative;display:block;padding:.5rem .8rem .5rem 1.9rem;border-radius:6px;
  color:var(--ink);font-size:.95rem;font-weight:700;transition:color .18s,background .18s}
.dropdown li a::after{display:none}
/* marker wipes in as "//" on hover, and the default ">>" wipes out on leave
   (content isn't animatable, so it swaps instantly while the width animates) */
.dropdown li a::before{content:">>";display:inline-block;position:relative;top:calc(.3em + 2px);width:0;margin-left:0;overflow:hidden;white-space:nowrap;color:var(--green);font-weight:900;transition:width .2s ease-in-out,margin-left .2s ease-in-out}
.dropdown li a:hover,.dropdown li a[aria-current]{color:var(--green-600);background:var(--mint-soft)}
.dropdown li a:hover::before,.dropdown li a:focus-visible::before,.dropdown li a[aria-current]::before{content:"//";width:1.4em;margin-left:-1.4em}

.nav-toggle{display:none;background:none;border:0;cursor:pointer;padding:.4rem;color:var(--ink)}
.nav-toggle svg{width:26px;height:26px}

/* ---------------------------------------------------------------- hero */
.hero{background:linear-gradient(180deg,var(--mint) 0%,var(--mint-soft) 100%);position:relative;overflow:hidden}
.hero::after{content:"";position:absolute;inset:0;background:
  radial-gradient(60% 60% at 85% 15%,rgba(74,94,146,.10),transparent 60%);pointer-events:none}
.hero .wrap{position:relative;padding-block:clamp(3.5rem,9vw,7rem)}
.hero__card{max-width:760px}
.hero h1{margin-bottom:.4em}
.hero .lead{color:#3a4a3c;max-width:52ch}
.hero__actions{display:flex;flex-wrap:wrap;gap:.8rem;margin-top:1.8rem}

/* ---------------------------------------------------------------- grid & cards */
.grid{display:grid;gap:var(--gap)}
.grid--3{grid-template-columns:repeat(3,1fr)}
.grid--2{grid-template-columns:repeat(2,1fr)}
@media(max-width:900px){.grid--3{grid-template-columns:repeat(2,1fr)}}
@media(max-width:620px){.grid--3,.grid--2{grid-template-columns:1fr}}

.card{
  display:flex;flex-direction:column;background:var(--paper);border:1px solid var(--line);
  border-radius:var(--radius);overflow:hidden;box-shadow:var(--shadow);
  transition:transform .2s,box-shadow .2s,border-color .2s;
}
.card:hover{transform:translateY(-4px);box-shadow:var(--shadow-hover);border-color:var(--green-light)}
.card__media{aspect-ratio:16/9;background:var(--mint-soft);overflow:hidden}
.card__media img{width:100%;height:100%;object-fit:cover}
.card__body{padding:1.3rem 1.4rem 1.5rem;display:flex;flex-direction:column;flex:1}
.card__meta{font-size:.82rem;color:var(--muted);font-weight:700;margin-bottom:.5rem;text-transform:uppercase;letter-spacing:.03em}
.card__title{font-size:1.25rem;margin:0 0 .5rem}
.card__title a{color:var(--ink)}
.card__title a:hover{color:var(--green-600)}
.card__excerpt{color:var(--muted);margin:0 0 1rem;font-size:.97rem}
.card__more{margin-top:auto;align-self:flex-start;font-weight:700;color:var(--green-600)}
.card__more:hover{color:var(--green)}
.card__more .btn__arrow{display:inline-block;transition:transform .18s}
.card__more:hover .btn__arrow{transform:translateX(3px)}

/* feature tiles (services on home) */
.feature{background:var(--paper);border:1px solid var(--line);border-radius:var(--radius);padding:1.6rem;box-shadow:var(--shadow);transition:transform .2s,box-shadow .2s}
.feature:hover{transform:translateY(-3px);box-shadow:var(--shadow-hover)}
.feature__icon{width:46px;height:46px;border-radius:11px;display:grid;place-items:center;background:var(--mint);color:var(--green-600);margin-bottom:1rem}
.feature__icon svg{width:24px;height:24px}
.feature h3{margin-bottom:.35rem}
.feature p{color:var(--muted);margin:0;font-size:.97rem}

/* ---------------------------------------------------------------- prose / blocks */
.prose{max-width:75ch}
.prose>*+*{margin-top:1.1em}
.prose h2{margin-top:1.8em}
.prose h3{margin-top:1.5em}
.prose ul,.prose ol{padding-left:1.3em}
.prose li{margin:.35em 0}
.prose blockquote{margin:1.5em 0;padding:.4em 1.2em;border-left:4px solid var(--green-light);color:var(--muted);background:var(--mint-soft);border-radius:0 var(--radius-sm) var(--radius-sm) 0}
.prose a{text-decoration:underline;text-underline-offset:2px}
.prose :not(pre)>code{background:var(--paper-2);border:1px solid var(--line);border-radius:5px;padding:.12em .4em;font-family:var(--mono);font-size:.88em}

/* stacked content blocks */
.blocks{display:flex;flex-direction:column;gap:clamp(1.4rem,3vw,2.2rem);max-width:820px}
.block--text{max-width:75ch}

/* figure / screenshot block */
figure.shot{margin:0;border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;box-shadow:var(--shadow);background:var(--paper)}
figure.shot img{width:100%;display:block;cursor:zoom-in}
figure.shot figcaption{padding:.7rem 1rem;font-size:.9rem;color:var(--muted);background:var(--paper-2);border-top:1px solid var(--line)}
figure.shot figcaption::before{content:"↳ ";color:var(--green)}

/* code block wrapper */
.codeblock{border-radius:var(--radius);overflow:hidden;box-shadow:var(--shadow)}
.codeblock pre[class*="language-"]{margin:0;border-radius:var(--radius)}

/* ---------------------------------------------------------------- article header */
.post-head{background:var(--mint-soft);border-bottom:1px solid var(--line)}
.post-head .wrap{padding-block:clamp(2.5rem,6vw,4.5rem)}
.post-meta{display:flex;flex-wrap:wrap;gap:.4rem 1rem;color:var(--muted);font-weight:700;font-size:.9rem;margin-top:1rem}
.post-hero-img{border-radius:var(--radius);overflow:hidden;box-shadow:var(--shadow);margin-top:2rem;max-width:820px}
.breadcrumb{display:flex;flex-wrap:wrap;gap:.4rem;font-size:.85rem;color:var(--muted);font-weight:700;margin-bottom:1rem}
.breadcrumb a{color:var(--muted)}
.breadcrumb a:hover{color:var(--green-600)}
.breadcrumb span{opacity:.5}

/* post list rows */
.postlist{display:flex;flex-direction:column;gap:1.2rem;max-width:820px}
.postrow{display:grid;grid-template-columns:220px 1fr;gap:1.4rem;align-items:start;background:var(--paper);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;box-shadow:var(--shadow);transition:transform .2s,box-shadow .2s,border-color .2s}
.postrow:hover{transform:translateY(-3px);box-shadow:var(--shadow-hover);border-color:var(--green-light)}
.postrow__media{background:var(--mint-soft);aspect-ratio:3/2;align-self:start;margin:1rem 0 1rem 1rem;border-radius:var(--radius-sm);overflow:hidden}
.postrow__media img{width:100%;height:100%;object-fit:cover}
.postrow__body{padding:1.2rem 1.4rem 1.2rem 0}
@media(max-width:620px){.postrow{grid-template-columns:1fr}.postrow__media{aspect-ratio:3/2;margin:0}.postrow__body{padding:1.2rem 1.4rem}}

/* ---------------------------------------------------------------- about teaser */
.about{display:grid;grid-template-columns:1.4fr 1fr;gap:var(--gap);align-items:center}
@media(max-width:820px){.about{grid-template-columns:1fr}}
.about__stats{display:flex;gap:1.5rem;flex-wrap:wrap;margin-top:1.4rem}
.stat b{display:block;font-size:2rem;font-weight:900;color:var(--green-600);line-height:1}
.stat span{color:var(--muted);font-size:.9rem;font-weight:700}

/* ---------------------------------------------------------------- footer */
.footer{background:var(--dark);color:#c9d8c9;padding-block:clamp(2.5rem,5vw,4rem) 1.5rem;margin-top:auto}
.footer a{color:#c9d8c9}
.footer a:hover{color:#fff}
.footer__grid{display:grid;grid-template-columns:1.4fr 1fr 1fr;gap:var(--gap)}
@media(max-width:760px){.footer__grid{grid-template-columns:1fr}}
.footer h4{color:#fff;font-size:1rem;margin-bottom:.9rem}
.footer .brand{color:#fff;margin-bottom:.8rem}
.footer .brand b{color:var(--green-light)}
.footer__contact p{margin:.2rem 0;color:#a8bda8}
.footer ul{list-style:none;margin:0;padding:0}
.footer li{margin:.4rem 0}
.footer__bottom{border-top:1px solid rgba(255,255,255,.12);margin-top:2.5rem;padding-top:1.3rem;display:flex;flex-wrap:wrap;gap:.6rem 1.5rem;justify-content:space-between;font-size:.85rem;color:#8ea68e}
.footer__social{display:flex;gap:.5rem}
.footer__social a{display:grid;place-items:center;width:34px;height:34px;border-radius:8px;background:rgba(255,255,255,.08)}
.footer__social a:hover{background:var(--green)}
.footer__social svg{width:17px;height:17px;fill:currentColor}

/* ---------------------------------------------------------------- utilities */
.center{text-align:center}
.mx-auto{margin-inline:auto}
.mt-0{margin-top:0}
.section-head{max-width:60ch;margin-bottom:clamp(1.8rem,4vw,2.8rem)}
.section-head--center{margin-inline:auto;text-align:center}

/* ---------------------------------------------------------------- mobile nav */
@media(max-width:820px){
  .nav-toggle{display:inline-flex}
  /* backdrop-filter makes .masthead the containing block for position:fixed,
     which would trap the off-canvas nav inside the header. Disable it on mobile
     so the panel is anchored to the viewport (full height, solid background). */
  .masthead{backdrop-filter:none;background:var(--paper)}
  .nav{
    position:fixed;inset:0 0 0 auto;width:min(80vw,320px);background:var(--paper);
    flex-direction:column;align-items:stretch;gap:.2rem;padding:5rem 1.2rem 2rem;
    box-shadow:-10px 0 40px rgba(0,0,0,.15);transform:translateX(100%);
    transition:transform .25s ease;z-index:60;
  }
  .nav a{padding:.9rem 1rem;font-size:1.1rem}
  .nav a[aria-current]::after{display:none}
  /* dropdown: show children inline & indented in the off-canvas menu */
  .nav-item{flex-direction:column;align-items:stretch;width:100%}
  .nav-caret{display:none}
  .dropdown{position:static;opacity:1;visibility:visible;transform:none;min-width:0;
    padding:0 0 .3rem;margin:0 0 0 1rem;border:0;border-left:2px solid var(--line);
    border-radius:0;box-shadow:none;background:transparent}
  .dropdown::before{display:none}
  /* the submenu is always inline here — don't let the desktop hover rule
     (translateX(-50%)) shift it out over the page content */
  .nav-item:hover .dropdown,.nav-item:focus-within .dropdown{transform:none}
  .dropdown li a{font-size:.95rem;padding:.6rem 1rem .6rem 1.6rem;color:var(--muted)}
  .dropdown li a:hover,.dropdown li a[aria-current]{color:var(--green-600);background:transparent}
  .dropdown li a::before{color:var(--green)}
  body.nav-open .nav{transform:translateX(0)}
  /* dim the page behind the panel; z-index stays below .masthead (50) so the
     nav — which lives inside the masthead's stacking context — renders above it */
  body.nav-open::after{content:"";position:fixed;inset:0;background:rgba(20,25,20,.4);z-index:45}
  .nav-toggle{position:relative;z-index:65}
}

@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}
