/* ═══════════════════════════════════════
   Holzapfel – Global Styles
   Nav, Footer, Variables, Reset, Buttons
   Block-spezifisches CSS liegt in /blocks/
   ═══════════════════════════════════════ */

:root {
  --navy:    #1B3664;
  --navy-dk: #0F2347;
  --blue:    #1D6FA4;
  --blue-md: #2B82BC;
  --blue-lt: #7BBDD4;
  --steel:   #8C9EAF;
  --off:     #F4F8FB;
  --body:    #3A4F65;
  --border:  #D6E3EE;
  --t: .3s cubic-bezier(.4,0,.2,1);
  --nav-h: 96px;
  --nav-h-scrolled: 68px;
}

*,*::before,*::after { box-sizing:border-box; margin:0; padding:0; }
html { scroll-behavior:smooth; }

/* Header-Offset für Anchor-Sprünge (greift NUR beim Scroll-to-Anchor, nicht im Layout) */
[id] { scroll-margin-top:calc(var(--nav-h-scrolled) + 24px); }
@media (max-width:768px) { [id] { scroll-margin-top:var(--nav-h-scrolled); } }
@media (max-width:480px) { [id] { scroll-margin-top:calc(var(--nav-h-scrolled) - 12px); } }
body { font-family:'Lexend', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; color:var(--navy); background:#fff; overflow-x:hidden; -webkit-font-smoothing:antialiased; }
h1 { font-size:clamp(2.8rem,5.4vw,5.2rem); font-weight:800; line-height:1.04; letter-spacing:-.025em; }
h2 { font-size:clamp(1.9rem,3.4vw,2.9rem); font-weight:800; line-height:1.1; letter-spacing:-.022em; }
h3 { font-size:18px; font-weight:700; line-height:26px; }
p  { font-weight:400; line-height:24px; color:var(--body); font-size:1rem; }
img { max-width:100%; height:auto; }
a { text-decoration:none; }
.wrap { max-width:1350px; margin:0 auto; padding:0 48px; }
/* ─── SECTION HEADER (shared) ─── */
.sh { margin-bottom:28px; display:flex; flex-direction:column; align-items:flex-start; gap:0; }
.sh.c { align-items:center; text-align:center; }
.ey {
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:7px;
  font-size:11px;
  font-weight:800;
  letter-spacing:.18em;
  text-transform:uppercase;
  color:var(--blue);
  margin-bottom:22px;
  background:rgba(29, 111, 164, .08);
  border:1.5px solid rgba(29, 111, 164, .18);
  border-radius:50px;
  padding:5px 14px;
  width:fit-content;
}
.ey * { margin:0; padding:0; font-size:inherit; }
.sh.c .ey { justify-content:center; }
.sh h2 { color:var(--navy); margin-bottom:22px; }
.sh h2:last-child { margin-bottom:0; }
.sh p, .sh > div:not(.ey) { color:var(--body); max-width:540px; font-size:16px; line-height:24px; }
.sh.c p, .sh.c > div:not(.ey) { margin:0 auto; }
.sh-sub { color:var(--body); max-width:540px; font-size:16px; line-height:24px; margin-bottom:40px; }
.sh-sub.c { margin-left:auto; margin-right:auto; text-align:center; }

/* Dunkle Sektionen: MÜSSEN nach .sh stehen damit sie gewinnen */
.hz-about h2, .hz-about .sh h2 { color:#fff; }
.hz-sust h2, .hz-sust .sh h2 { color:#fff; }
.hz-values h2, .hz-values .sh h2 { color:#fff; }
.hz-logistik h2, .hz-logistik .log-text h2 { color:#fff; }
.hz-about p { color:rgba(255,255,255,.78); }
.hz-about .lead, .hz-about .lead p { color:rgba(255,255,255,.8); }
.hz-about .about-quote, .hz-about .about-quote p { color:#fff; }
.hz-about .ey { color:var(--blue-lt); background:rgba(123,189,212,.1); border-color:rgba(123,189,212,.25); }
.hz-sust .ey { color:#fff; background:rgba(255,255,255,.12); border-color:rgba(255,255,255,.22); }

/* Akzent-Farbe */
.acc { color:var(--blue); }
.hz-about .acc { color:var(--blue-lt); }
.hz-sust .acc { color:rgba(255,255,255,.82); }
.hz-values .acc { color:var(--blue-lt); }
.hz-logistik .log-text h2 .acc { color:var(--blue-lt); }
.hz-voices .acc { color:var(--blue-lt); }

/* ─── BUTTONS ─── */
.btn-fill {
  font-family:inherit; font-size:1rem; font-weight:800;
  color:#fff; background:var(--blue); border:none; border-radius:50px;
  padding:13px 28px; cursor:pointer; text-decoration:none;
  display:inline-flex; align-items:center; gap:8px;
  transition:all var(--t); box-shadow:0 6px 20px rgba(29,111,164,.28);
}
.btn-fill:hover { background:var(--blue-md); transform:translateY(-2px); box-shadow:0 10px 28px rgba(29,111,164,.4); }
.btn-ghost {
  font-family:inherit; font-size:1rem; font-weight:700;
  color:var(--navy); background:#fff; border:2px solid var(--border);
  border-radius:50px; padding:11px 24px; cursor:pointer; text-decoration:none;
  display:inline-flex; align-items:center; gap:8px;
  transition:all var(--t); box-shadow:0 2px 8px rgba(27,54,100,.06);
}
.btn-ghost:hover { border-color:var(--navy); box-shadow:0 10px 28px rgba(27,54,100,.15); transform:translateY(-2px); }

/* ─── NAV ─── */
.site-nav {
  position:fixed; top:0; left:0; right:0; z-index:100;
  height:var(--nav-h); display:flex; align-items:center;
  padding:0 56px; background:transparent;
  border-bottom:1px solid transparent;
  transition:height var(--t),background var(--t),backdrop-filter var(--t),border-color var(--t),box-shadow var(--t);
}
.site-nav.up {
  height:var(--nav-h-scrolled); background:rgba(255,255,255,.97);
  backdrop-filter:blur(16px); border-color:var(--border);
  box-shadow:0 1px 28px rgba(27,54,100,.09);
}
.site-nav .logo img { width:190px; height:auto; aspect-ratio:190/48; transition:width var(--t); }
.site-nav.up .logo img { width:155px; }
.logo { display:flex; align-items:center; gap:12px; text-decoration:none; flex-shrink:0; }
.nl { display:flex; gap:0; list-style:none; align-items:center; justify-content:center; flex:1; }
.nl li { display:flex; align-items:center; }
.nl a {
  font-size:1rem; font-weight:600; color:var(--steel); text-decoration:none;
  padding:6px 14px; border-radius:6px; position:relative; transition:color var(--t);
}
.nl a::after {
  content:''; position:absolute; bottom:-1px; left:50%; right:50%;
  height:2px; background:var(--blue); transition:left var(--t),right var(--t); border-radius:2px;
}
.nl a:hover { color:var(--navy); }
.nl a:hover::after, .nl .current a::after { left:14px; right:14px; }
.nl .current a { color:var(--navy); }
.nl .sub-menu { display:none; }
.nr { display:flex; align-items:center; gap:12px; margin-left:auto; flex-shrink:0; }
.lsw { display:inline-flex; background:var(--off); border:1.5px solid var(--border); border-radius:50px; overflow:hidden; padding:3px; gap:2px; }
.lsw a {
  font-family:inherit; font-size:.7rem; font-weight:800;
  letter-spacing:.08em; padding:7px 12px; background:transparent;
  color:var(--steel); cursor:pointer; transition:all var(--t); line-height:1;
  text-decoration:none; border-radius:50px; min-width:34px; text-align:center;
}
.lsw a:hover { color:var(--navy); }
.lsw a.on { background:var(--navy); color:#fff; }
.lsw a.on:hover { color:#fff; }

/* Mobile-Variante: heller Pill auf dunklem Overlay */
.lsw-mobile {
  background:rgba(255,255,255,.06); border-color:rgba(255,255,255,.14);
  align-self:flex-start; margin-bottom:24px;
  opacity:0; transform:translate3d(0, 12px, 0);
  transition:opacity .3s ease, transform .3s ease;
  will-change:opacity, transform;
}
.lsw-mobile a { color:rgba(255,255,255,.7); }
.lsw-mobile a:hover { color:#fff; }
.lsw-mobile a.on { background:var(--blue); color:#fff; }
.mobile-overlay.open .lsw-mobile {
  opacity:1; transform:translate3d(0, 0, 0);
  transition-delay:.10s;
}
.nav-btn {
  font-family:inherit; font-size:1rem; font-weight:800;
  color:#fff; background:var(--blue); border:none; border-radius:50px;
  padding:10px 20px; cursor:pointer; text-decoration:none;
  transition:background var(--t),transform var(--t),box-shadow var(--t);
  box-shadow:0 4px 14px rgba(29,111,164,.25);
  display:inline-flex; align-items:center; gap:8px;
}
.nav-btn:hover { background:var(--blue-md); transform:translateY(-1px); box-shadow:0 6px 18px rgba(29,111,164,.35); }

/* ─── HAMBURGER BUTTON (runder Kreis) ─── */
.menu-toggle {
  display:none; width:44px; height:44px; border-radius:50%;
  background:#fff; border:1.5px solid var(--border);
  cursor:pointer; position:relative; z-index:102;
  transition:all .3s; box-shadow:0 2px 8px rgba(27,54,100,.06);
  flex-shrink:0;
}
.menu-toggle:hover { border-color:var(--navy); box-shadow:0 4px 14px rgba(27,54,100,.12); }
.hamburger {
  display:flex; flex-direction:column; align-items:center;
  justify-content:center; gap:4px; width:100%; height:100%;
}
.hamburger-line {
  display:block; width:18px; height:2px; background:var(--navy);
  border-radius:2px; transition:all .35s cubic-bezier(.4,0,.2,1);
}
/* Hamburger → X Animation */
.menu-toggle.active .hamburger-line:nth-child(1) { transform:translateY(6px) rotate(45deg); }
.menu-toggle.active .hamburger-line:nth-child(2) { opacity:0; transform:scaleX(0); }
.menu-toggle.active .hamburger-line:nth-child(3) { transform:translateY(-6px) rotate(-45deg); }

/* ─── MOBILE OVERLAY ─── */
.mobile-overlay {
  position:fixed; inset:0; z-index:101;
  pointer-events:none; visibility:hidden;
}
.mobile-overlay.open { pointer-events:auto; visibility:visible; }

/* Hintergrund-Dim */
.mobile-overlay::before {
  content:''; position:absolute; inset:0;
  background:rgba(15,35,71,.55); opacity:0;
  transition:opacity .35s ease;
  -webkit-backdrop-filter:blur(0px);
  backdrop-filter:blur(0px);
}
.mobile-overlay.open::before {
  opacity:1;
  -webkit-backdrop-filter:blur(6px);
  backdrop-filter:blur(6px);
}

/* Slide-Panel von rechts – GPU-beschleunigt, Dark-Theme */
.mobile-overlay-inner {
  position:absolute; top:0; right:0; bottom:0;
  width:min(400px, 90vw);
  background:linear-gradient(160deg, var(--navy-dk) 0%, var(--navy) 100%);
  transform:translate3d(100%, 0, 0);
  transition:transform .45s cubic-bezier(.32,.72,.24,1);
  will-change:transform;
  display:flex; flex-direction:column;
  padding:28px 32px 36px;
  box-shadow:-8px 0 40px rgba(15,35,71,.35);
  overflow-y:auto;
  -webkit-overflow-scrolling:touch;
}
.mobile-overlay.open .mobile-overlay-inner {
  transform:translate3d(0, 0, 0);
}

/* Top: Logo + Close */
.mobile-overlay-top {
  display:flex; justify-content:space-between; align-items:center;
  margin-bottom:36px; gap:16px;
}
.mobile-overlay-logo { width:auto; max-width:150px; height:auto; display:block; }

/* Close Button */
.mobile-close {
  width:40px; height:40px;
  border-radius:50%; background:rgba(255,255,255,.08);
  border:1.5px solid rgba(255,255,255,.15); cursor:pointer;
  position:relative; flex-shrink:0;
  transition:all .25s;
}
.mobile-close:hover { background:rgba(255,255,255,.18); border-color:rgba(255,255,255,.3); }
.close-icon,
.close-icon::before,
.close-icon::after { display:block; position:absolute; }
.close-icon { width:0; height:0; top:50%; left:50%; }
.close-icon::before,
.close-icon::after {
  content:''; width:16px; height:2px; background:#fff;
  border-radius:2px; top:0; left:-8px;
  transition:background .25s;
}
.close-icon::before { transform:rotate(45deg); }
.close-icon::after { transform:rotate(-45deg); }

/* Menü-Liste */
.mobile-menu-list {
  list-style:none; padding:0; margin:0;
  display:flex; flex-direction:column; gap:4px;
  flex:1;
}

/* Items: Default-State mit Transition (für smooth exit) */
.mobile-menu-list li {
  opacity:0;
  transform:translate3d(40px, 0, 0);
  transition:opacity .3s ease, transform .3s ease;
  will-change:opacity, transform;
}

/* Staggered entry */
.mobile-overlay.open .mobile-menu-list li {
  opacity:1;
  transform:translate3d(0, 0, 0);
}
.mobile-overlay.open .mobile-menu-list li:nth-child(1)  { transition-delay:.08s; }
.mobile-overlay.open .mobile-menu-list li:nth-child(2)  { transition-delay:.12s; }
.mobile-overlay.open .mobile-menu-list li:nth-child(3)  { transition-delay:.16s; }
.mobile-overlay.open .mobile-menu-list li:nth-child(4)  { transition-delay:.20s; }
.mobile-overlay.open .mobile-menu-list li:nth-child(5)  { transition-delay:.24s; }
.mobile-overlay.open .mobile-menu-list li:nth-child(6)  { transition-delay:.28s; }
.mobile-overlay.open .mobile-menu-list li:nth-child(7)  { transition-delay:.32s; }
.mobile-overlay.open .mobile-menu-list li:nth-child(8)  { transition-delay:.36s; }
.mobile-overlay.open .mobile-menu-list li:nth-child(9)  { transition-delay:.40s; }
.mobile-overlay.open .mobile-menu-list li:nth-child(10) { transition-delay:.44s; }

/* Staggered exit (umgekehrte Reihenfolge, schneller) */
.mobile-menu-list li:nth-child(10) { transition-delay:0s; }
.mobile-menu-list li:nth-child(9)  { transition-delay:.02s; }
.mobile-menu-list li:nth-child(8)  { transition-delay:.04s; }
.mobile-menu-list li:nth-child(7)  { transition-delay:.06s; }
.mobile-menu-list li:nth-child(6)  { transition-delay:.08s; }
.mobile-menu-list li:nth-child(5)  { transition-delay:.10s; }
.mobile-menu-list li:nth-child(4)  { transition-delay:.12s; }
.mobile-menu-list li:nth-child(3)  { transition-delay:.14s; }
.mobile-menu-list li:nth-child(2)  { transition-delay:.16s; }
.mobile-menu-list li:nth-child(1)  { transition-delay:.18s; }

.mobile-menu-list a {
  display:block; padding:16px 0; font-size:1.25rem; font-weight:700;
  color:#fff; text-decoration:none;
  border-bottom:1px solid rgba(255,255,255,.08);
  transition:color .2s, padding-left .2s;
}
.mobile-menu-list a:hover { color:var(--blue-lt); padding-left:8px; }
.mobile-menu-list .current a { color:var(--blue-lt); }

/* Kontaktdaten im Mobile Menu */
.mobile-contact {
  margin-top:28px; padding-top:24px;
  border-top:1px solid rgba(255,255,255,.1);
  display:flex; flex-direction:column; gap:12px;
  opacity:0; transform:translate3d(0, 12px, 0);
  transition:opacity .3s ease, transform .3s ease;
  will-change:opacity, transform;
}
.mobile-overlay.open .mobile-contact {
  opacity:1; transform:translate3d(0, 0, 0);
  transition-delay:.30s;
}
.mobile-contact-label {
  font-size:.65rem; font-weight:800; letter-spacing:.18em;
  text-transform:uppercase; color:var(--blue-lt); margin-bottom:4px;
}
.mobile-contact-item {
  display:flex; align-items:center; gap:12px;
  color:rgba(255,255,255,.85); font-size:.95rem; font-weight:500;
  text-decoration:none; transition:color .2s, transform .2s;
}
.mobile-contact-item:hover { color:#fff; transform:translateX(3px); }
.mobile-contact-item i {
  font-size:1.15rem; color:var(--blue-lt);
  width:34px; height:34px;
  display:inline-flex; align-items:center; justify-content:center;
  background:rgba(255,255,255,.08); border-radius:50%;
  flex-shrink:0;
}

/* CTA im Mobile Menu */
.mobile-cta {
  display:flex; align-items:center; justify-content:center; gap:8px;
  margin-top:24px; padding:14px 28px;
  background:var(--blue); color:#fff; font-size:1rem; font-weight:800;
  border-radius:50px; text-decoration:none;
  box-shadow:0 8px 24px rgba(29,111,164,.4);
  opacity:0; transform:translate3d(0, 12px, 0);
  transition:opacity .3s ease, transform .3s ease, background .25s, box-shadow .25s;
  will-change:opacity, transform;
}
.mobile-cta i { font-size:1.1rem; transition:transform .25s; }
.mobile-overlay.open .mobile-cta {
  opacity:1; transform:translate3d(0, 0, 0);
  transition-delay:.40s, .40s, 0s, 0s;
}
.mobile-cta:hover { background:var(--blue-md); box-shadow:0 12px 32px rgba(29,111,164,.5); }
.mobile-cta:hover i { transform:translateX(3px); }

/* Body Lock */
body.menu-open { overflow:hidden; }

/* ─── FOOTER ─── */
.site-footer { background:var(--navy-dk); padding:64px 0 28px; }
.ft-grid { display:grid; grid-template-columns:1.8fr 1fr 1fr 1fr; gap:52px; padding-bottom:44px; border-bottom:1px solid rgba(255,255,255,.07); }
.ft-logo-img { max-width:200px; height:auto; margin-bottom:16px; }
.ft-heading { font-size:.6rem; font-weight:800; letter-spacing:.18em; text-transform:uppercase; color:#fff; margin-bottom:18px; }
.footer-menu { list-style:none; padding:0; margin:0; }
.footer-menu li { margin-bottom:9px; }
.footer-menu a { font-size:.78rem; color:#fff; text-decoration:none; font-weight:500; transition:color var(--t); }
.footer-menu a:hover { color:var(--blue-lt); }
.ft-bot { display:flex; flex-direction:row-reverse; justify-content:space-between; align-items:center; padding-top:24px; gap:16px; flex-wrap:wrap; }
.ft-copy { font-size:.7rem; color:rgba(255,255,255,.7); }
.ft-legal .menu { display:flex; gap:20px; list-style:none; margin:0; padding:0; }
.ft-legal .menu li { margin:0; }
.ft-legal .menu a { font-size:.78rem; color:#fff; text-decoration:none; font-weight:500; transition:color var(--t); }
.ft-legal .menu a:hover { color:var(--blue-lt); }

/* ─── REVEAL (respects prefers-reduced-motion) ─── */
.r { opacity:0; transform:translateY(22px); transition:opacity .62s ease,transform .62s ease; }
.r.v { opacity:1; transform:none; }
.r.d1 { transition-delay:.1s; } .r.d2 { transition-delay:.2s; } .r.d3 { transition-delay:.3s; } .r.d4 { transition-delay:.4s; }

@media (prefers-reduced-motion: reduce) {
  .r { transform:none; opacity:1; transition:none; }
  .r.d1, .r.d2, .r.d3, .r.d4 { transition-delay:0; }
  .site-nav { transition:none; }
  .nl a::after { transition:none; }
  .lsw a { transition:none; }
  .nav-btn, .btn-fill, .btn-ghost, .menu-toggle, .mobile-close { transition:none; }
}

/* ─── WAVE (shared) ─── */
.sect-svg-wave { position:absolute; inset:0; pointer-events:none; z-index:0; }
.sect-svg-wave svg { position:absolute; bottom:0; left:0; width:100%; height:60%; opacity:.5; }

/* ─── RESPONSIVE ─── */

/* 1280px: Desktop compact */
@media (max-width:1280px) {
  .wrap { padding:0 40px; }
}

/* 1024px: Tablet landscape */
@media (max-width:1024px) {
  .ft-grid { grid-template-columns:1fr 1fr; gap:36px; }
}

/* 960px: NAV BRICHT UM – Hamburger ab hier */
@media (max-width:960px) {
  .nl { display:none; }
  .nav-btn { display:none !important; }
  .nr .lsw { display:none; }
  .menu-toggle { display:flex; }
  .site-nav { padding:0 32px; }
  /* Logo: feste Größe auf Mobil, kein Schrumpfen beim Scrollen */
  .site-nav .logo img { width:160px; }
  .site-nav.up .logo img { width:160px; }
}

/* 900px: Grids einspaltag */
@media (max-width:900px) {
  .ft-grid { grid-template-columns:1fr; text-align:center; }
  .ft-heading { margin-top:12px; }
  .wrap { padding:0 28px; }

  /* Footer-Bot mobil: zentriert, Legal untereinander */
  .ft-bot { flex-direction:column; align-items:center; text-align:center; padding-top:32px; gap:18px; }
  .ft-legal .menu { flex-direction:column; gap:10px; align-items:center; }

  /* Texte zentriert */
  .sh, .sh.c { text-align:center; }
  .sh p, .sh > div:not(.ey) { margin-left:auto; margin-right:auto; }
  .sh-sub { text-align:center; margin-left:auto; margin-right:auto; }
}

/* 768px: Mobile */
@media (max-width:768px) {
  .wrap { padding:0 44px; }
  .site-nav { padding:0 36px; }
  .site-footer { padding:56px 0 24px; }
}

/* 480px: Kleine Geräte */
@media (max-width:480px) {
  :root { --nav-h:72px; --nav-h-scrolled:64px; }
  .site-nav { height:var(--nav-h); padding:0 28px; }
  .site-nav .logo img { width:130px; }
  .site-nav.up .logo img { width:130px; }
  .wrap { padding:0 32px; }
  .mobile-overlay-inner { padding:24px 26px 32px; }
}

/* ─── FOCUS (Keyboard a11y) ─── */
:focus-visible {
  outline:2px solid var(--blue);
  outline-offset:3px;
  border-radius:4px;
}
/* Buttons: abgerundeter Outline */
.btn-fill:focus-visible,
.btn-ghost:focus-visible,
.nav-btn:focus-visible,
.menu-toggle:focus-visible,
.mobile-close:focus-visible,
.mobile-cta:focus-visible,
.lsw a:focus-visible {
  outline-offset:4px;
  border-radius:50px;
}
/* Nav-Links */
.nl a:focus-visible { border-radius:6px; }
/* Karten & Block-Links */
a:focus-visible { border-radius:4px; }
/* Dunkle Sektionen: heller Outline */
.hz-about :focus-visible,
.hz-sust :focus-visible,
.hz-values :focus-visible,
.hz-voices :focus-visible,
.hz-logistik :focus-visible,
.site-footer :focus-visible {
  outline-color:var(--blue-lt);
}

/* ─── BREADCRUMB (shared) ─── */
.breadcrumb { display:flex; align-items:center; gap:8px; font-size:.78rem; font-weight:500; color:var(--steel); margin-bottom:24px; }
.breadcrumb a { color:var(--steel); text-decoration:none; transition:color var(--t); }
.breadcrumb a:hover { color:var(--navy); }
.breadcrumb i { font-size:.7rem; }
.bc-current { color:var(--navy); font-weight:600; }

/* ─── 404 ─── */
.page-404 {
  padding:clamp(120px, 18vw, 180px) clamp(24px, 5vw, 48px) clamp(72px, 12vw, 120px);
  min-height:60vh; text-align:center;
  max-width:1350px; margin:0 auto;
}
.page-404-code { font-size:clamp(4rem,8vw,8rem); color:var(--border); line-height:1; margin-bottom:8px; }
.page-404 h2 { margin-bottom:16px; }
.page-404 p { margin-bottom:32px; }

/* ─── Screen Reader ─── */
.screen-reader-text { clip:rect(1px,1px,1px,1px); position:absolute; width:1px; height:1px; overflow:hidden; }
.skip-to-main {
  position:fixed; top:-100%; left:50%; transform:translateX(-50%);
  z-index:9999; padding:12px 24px; background:var(--navy); color:#fff;
  font-family:inherit; font-size:.9rem; font-weight:700;
  border-radius:0 0 10px 10px; text-decoration:none;
  transition:top .2s;
}
.skip-to-main:focus { top:0; outline:none; }
