/* =====================================================================
   BEZUGSSYSTEME — Reset, Basis-Tokens, Off-Canvas-Navigation
   ===================================================================== */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body { line-height: 1.55; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; -webkit-hyphens: auto; /* Für ältere Safari-Versionen */
  hyphens: auto;}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

:root {
  --serif:  "Spectral", Georgia, "Times New Roman", serif;
  --sans:   "Hanken Grotesk", "Helvetica Neue", Helvetica, system-ui, sans-serif;
  --mono:   "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --maxw: 1280px;
  --gut: clamp(20px, 4vw, 64px);
  --r-md: 12px;
  --r-lg: 20px;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  padding: .4rem .8rem;
  background: var(--ink);
  color: var(--bg);
  font-size: .875rem;
  border-radius: 0 0 4px 4px;
  text-decoration: none;
  z-index: 9999;
}
.skip-link:focus {
  top: 0;
}

.t-lead { font-family: var(--sans); font-size: clamp(1.05rem, 1.5vw, 1.3rem); line-height: 1.5; color: var(--ink-2); font-weight: 400; }

.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gut); }

.icon { width: 1.4em; height: 1.4em; stroke: currentColor; stroke-width: 1.5; fill: none;
        stroke-linecap: round; stroke-linejoin: round; flex: none; }

:where(a, button, [tabindex]):focus-visible {
  outline: 2px solid var(--brand, var(--org));
  outline-offset: 3px;
  border-radius: 2px;
}

/* =====================================================================
   OFF-CANVAS MENU
   ===================================================================== */

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 95;
  padding: 0;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  position: relative;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--nav-fg, var(--ink));
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), background-color 0.3s;
}

.menu-toggle .dots-row {
  display: flex;
  gap: 4px;
  align-items: center;
  justify-content: center;
  height: 6px;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.menu-toggle .dots-row i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  display: block;
}

.menu-toggle.is-open { transform: rotate(90deg); }
.menu-toggle.is-open span:first-child { transform: translate3d(0, 6.5px, 0) rotate(45deg); background: var(--ink); }
.menu-toggle.is-open .dots-row { opacity: 0; transform: scale(0.3); }
.menu-toggle.is-open span:last-child { transform: translate3d(0, -6.5px, 0) rotate(-45deg); background: var(--ink); }

.menu-overlay {
  position: fixed;
  inset: 0;
  background: color-mix(in srgb, var(--ink) 25%, transparent);
  opacity: 0;
  pointer-events: none;
  z-index: 85;
  transition: opacity 0.5s ease;
  backdrop-filter: blur(4px);
}

.menu-overlay.is-active { opacity: 1; pointer-events: auto; }

.off-canvas {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 440px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  border-left: 1px solid var(--hairline);
  box-shadow: -10px 0 40px -15px rgba(0,0,0,0.12);
  z-index: 90;
  transform: translate3d(100%, 0, 0);
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.off-canvas.is-active { transform: translate3d(0, 0, 0); }

.off-canvas-header {
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--gut);
  border-bottom: 1px solid var(--hairline);
}

.off-canvas-header .logo { font-family: var(--serif); font-size: 1.2rem; color: var(--ink); }

.off-canvas-content {
  flex: 1;
  padding: clamp(34px, 6vw, 60px) var(--gut);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow-y: auto;
}

.off-canvas-nav ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 22px; }

.off-canvas-nav li {
  opacity: 0;
  transform: translate3d(0, 24px, 0);
  transition: opacity 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
  /* --i: wird per JS als inline style property gesetzt
     (effects.js Reveal-Animation). Kein Fallback nötig —
     CSS ignoriert unbekannte vars, delay wird 0s. */
  transition-delay: calc(var(--i) * 0.08s);
}

.off-canvas.is-active .off-canvas-nav li { opacity: 1; transform: translate3d(0, 0, 0); }

.off-canvas-nav a {
  display: flex;
  align-items: baseline;
  gap: 16px;
  font-family: var(--serif);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  color: var(--ink-2);
  transition: color 0.3s, transform 0.3s;
}

.off-canvas-nav a .num { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; color: var(--ink-3); }
.off-canvas-nav a:hover { color: var(--ink); transform: translate3d(8px, 0, 0); }
.off-canvas-nav li:nth-child(1) a:hover { color: var(--ki); }
.off-canvas-nav li:nth-child(2) a:hover { color: var(--org); }
.off-canvas-nav li:nth-child(3) a:hover { color: var(--web); }
.off-canvas-nav li:nth-child(4) a:hover { color: var(--brand); }

.off-canvas-footer {
  margin-top: clamp(40px, 8vw, 80px);
  padding-top: 24px;
  border-top: 1px solid var(--hairline);
  opacity: 0;
  transform: translate3d(0, 16px, 0);
  transition: opacity 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
  transition-delay: 0.32s;
}

.off-canvas.is-active .off-canvas-footer { opacity: 1; transform: translate3d(0, 0, 0); }

.off-canvas-footer .contact-lbl { font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 12px; }
.off-canvas-footer .contact-val { display: block; font-family: var(--serif); font-size: 1.15rem; color: var(--ink-2); margin-bottom: 6px; transition: color 0.2s; }
.off-canvas-footer .contact-val:hover { color: var(--brand); }

@media (max-width: 820px) {
  .menu-toggle { display: flex; }
  .navlinks { display: none !important; }
}

body.menu-open { overflow: hidden !important; }
