/* ================================================================
   m k l . acoustic — style.css
   Mobile-first · Light/dark themes · WCAG AA
   ================================================================ */

/* ── SELF-HOSTED FONTS ─────────────────────────────────────────── */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url('../fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url('../fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url('../fonts/plus-jakarta-sans-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url('../fonts/plus-jakarta-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ── THEME TOKENS ─────────────────────────────────────────────── */
:root,
[data-theme="light"] {
  --bg: #f3f4f5;
  --bg-rgb: 243, 244, 245;
  --bg-alt: #e9eaec;
  --surface: #ffffff;
  --border: #d9dadd;
  --text: #1a1918;
  --text-muted: #625f58;
  --text-subtle: #928e85;
  --accent: #1a1918;
  --accent-hover: #3a3832;
  --tag-bg: transparent;
  --tag-border: #c5c3bd;
  --tag-text: #3a3832;
  --card-bg: #ffffff;
  --card-border: #dcdde0;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.07), 0 4px 12px rgba(0, 0, 0, 0.04);

  --font-display: "Plus Jakarta Sans", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;

  --radius: 3px;
  --gap: clamp(1.5rem, 4vw, 3rem);
  --max-w: 72rem;
  --nav-h: 3.75rem;
}

[data-theme="dark"] {
  --bg: #111110;
  --bg-rgb: 17, 17, 16;
  --bg-alt: #1a1918;
  --surface: #1e1d1c;
  --border: #2e2c29;
  --text: #ede9e2;
  --text-muted: #a09c93;
  --text-subtle: #9a968f;
  --accent: #ede9e2;
  --accent-hover: #c8c4bc;
  --tag-bg: transparent;
  --tag-border: #3a3832;
  --tag-text: #c8c4bc;
  --card-bg: #1e1d1c;
  --card-border: #2e2c29;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.35), 0 4px 12px rgba(0, 0, 0, 0.25);
}

/* ── RESET & BASE ──────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  font-size: 16px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.6;
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
  min-height: 100dvh;
  overflow-x: hidden;
}

/* Background pattern: tiled "m k l ." watermark */

#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button {
  cursor: pointer;
  font-family: inherit;
}
ul,
ol {
  list-style: none;
}
address {
  font-style: normal;
}

/* ── ACCESSIBILITY ─────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -999px;
  left: 1rem;
  z-index: 1000;
  background: var(--text);
  color: var(--bg);
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-family: var(--font-body);
  white-space: nowrap;
}
.skip-link:focus {
  top: 1rem;
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
  border-radius: var(--radius);
}

/* ── TYPOGRAPHY SCALE ──────────────────────────────────────────── */
h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.section-heading {
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}

/* ── SEPARATOR MOTIF ───────────────────────────────────────────── */
hr.sep {
  border: none;
  height: 1px;
  background: var(--border);
  margin: 0 var(--gap);
  position: relative;
}

hr.sep::after {
  content: "\00a0";
  position: absolute;
  display: block;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: var(--bg);
  padding: 0 0.625rem;
  color: var(--text-subtle);
  font-size: 10px;
  line-height: 1;
  transition: background-color 0.3s ease;
}

/* ── SECTIONS ──────────────────────────────────────────────────── */
.section {
  position: relative;
  z-index: 1;
  padding-block: clamp(3.5rem, 8vw, 6rem);
}

/* Translucent panel + top fade-in for non-hero sections */
.section:not(.section--hero) {
  background: rgba(var(--bg-rgb), 0.6);
}
/* .section:not(.section--hero)::before {
  content: '';
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: clamp(2.5rem, 6vw, 4rem);
  background: linear-gradient(to bottom, transparent, color-mix(in srgb, var(--bg) 50%, transparent));
  pointer-events: none;
  z-index: 0;
} */

.section-inner {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 3rem);
}

section[id] {
  scroll-margin-top: calc(var(--nav-h) + 8px);
}

.ref-header {
  margin-bottom: 1.5rem;
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ── HEADER / NAV ──────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--nav-h);
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease;
}

.nav-inner {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 3rem);
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--text);
  flex-shrink: 0;
  text-decoration: none;
}
.nav-logo:hover {
  text-decoration: none;
}

/* nav-links is a direct flex child of nav-inner — always visible on desktop */
.nav-links {
  flex: 1;
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: clamp(0.75rem, 2vw, 1.75rem);
  align-items: center;
  justify-content: center;
}

.nav-link {
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  padding-block: 0.25rem;
  border-bottom: 1px solid transparent;
  transition:
    color 0.2s,
    border-color 0.2s;
}
.nav-link:hover,
.nav-link--active {
  color: var(--text);
  border-bottom-color: var(--text);
  text-decoration: none;
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.ctrl-btn {
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  transition:
    color 0.2s,
    border-color 0.2s,
    background-color 0.2s;
  padding: 0.35rem 0.6rem;
  background: rgba(var(--bg-rgb), 0.8);
  backdrop-filter: blur(2px);
}
.ctrl-btn:hover {
  color: var(--text);
  border-color: var(--text-muted);
  text-decoration: none;
}

.ctrl-sep {
  color: var(--text-subtle);
  font-size: 0.65rem;
}

/* Theme toggle icons */
.icon {
  flex-shrink: 0;
}
[data-theme="light"] .icon-moon {
  display: none;
}
[data-theme="dark"] .icon-sun {
  display: none;
}

/* Hamburger button — hidden on desktop; JS removes [hidden] attr on mobile */
.nav-hamburger {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.2s;
}
.nav-hamburger:hover {
  border-color: var(--text-muted);
}
.hamburger-bar {
  display: block;
  width: 18px;
  height: 1px;
  background: var(--text-muted);
  transition:
    transform 0.2s,
    opacity 0.2s;
}
.nav-hamburger[aria-expanded="true"] .hamburger-bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.nav-hamburger[aria-expanded="true"] .hamburger-bar:nth-child(2) {
  opacity: 0;
}
.nav-hamburger[aria-expanded="true"] .hamburger-bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* ── HERO ──────────────────────────────────────────────────────── */
.section--hero {
  min-height: calc(100dvh - var(--nav-h));
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: clamp(4rem, 10vw, 8rem);
}

.hero-inner {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-left: clamp(1.25rem, 5vw, 3rem);
  padding-right: clamp(1.25rem, 19vw, 35rem);
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  animation: fadeUp 0.9s ease both;
}
@media (min-width: 768px) {
  .hero-inner {
    padding-left: clamp(1.5rem, 3vw, 4rem);
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.hero-logo {
  display: inline-flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-left: -0.25em;
}

.hero-wordmark {
  font-family: var(--font-display);
  font-size: clamp(3.25rem, 9vw, 7rem);
  font-weight: 500;
  letter-spacing: 0.15em;
  color: var(--text);
  line-height: 1;
  white-space: nowrap;
}

.hero-subtitle {
  font-family: var(--font-body);
  font-size: clamp(1.03rem, 2.6vw, 2rem);
  font-weight: 300;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  line-height: 1.35;
  padding-left: 0.1em;
}

.hero-tagline {
  max-width: 52rem;
  font-family: var(--font-body);
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.6;
  letter-spacing: 0.01em;
}

.hero-ctas {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.2rem;
  width: fit-content;
  transition:
    border-color 0.2s,
    gap 0.2s;
  text-decoration: none;
}
.hero-cta::after {
  content: "→";
  transition: transform 0.2s;
}
.hero-cta:hover {
  border-color: var(--text);
  text-decoration: none;
}
.hero-cta:hover::after {
  transform: translateX(4px);
}

/* ── LEISTUNGEN ──────────────────────────────────────────────────── */
.leistungen-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

/* Mobile: uniform separators between stacked blocks */
@media (max-width: 639px) {
  .leistungen-col + .leistungen-col {
    border-top: 1px solid var(--border);
    padding-top: 2rem;
  }
}

/* Desktop: two-column grid with separation for Mehrwert/Arbeitsbereiche */
@media (min-width: 640px) {
  .leistungen-grid {
    grid-template-columns: 1fr 1fr;
  }
  .mehrwert-block,
  .arbeitsbereich-block {
    margin-top: 2.5rem;
    border-top: 1px solid var(--border);
    padding-top: 2rem;
  }
}

.leistungen-subheading {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 1rem;
}

.leistungen-text {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 0.75rem;
}

.leistungen-text:last-child {
  margin-bottom: 0;
}

/* ── ARBEITSBEREICH GRID (merged into Leistungen) ──────────────── */

.arbeitsbereich-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 0.8rem 1.5rem;
}

.bereich-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.bereich-name {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text);
}

.bereich-desc {
  font-size: 0.825rem;
  color: var(--text-subtle);
  line-height: 1.4;
}

/* ── ÜBER ─────────────────────────────────────────────────────────── */
.ueber-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

@media (min-width: 700px) {
  .ueber-grid {
    grid-template-columns: 1fr 1.8fr;
    align-items: start;
  }
}

.ueber-photo {
  margin: 0 0 1.75rem;
  overflow: hidden;
}

.ueber-photo img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  filter: grayscale(100%);
  transition: filter 0.6s ease;
}

.ueber-photo img:hover {
  filter: grayscale(60%);
}

.ueber-name {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 500;
  margin-bottom: 0.35rem;
}

.ueber-role {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.ueber-text {
  font-size: 0.85rem;
  color: var(--text-subtle);
  letter-spacing: 0.04em;
}

.vita-heading {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-subtle);
  margin-bottom: 1.25rem;
}

.vita-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-left: 1px solid var(--border);
  padding-left: 1.2rem;
  margin-left: 0.25rem;
}

.vita-item {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 0.75rem;
  padding-block: 0.75rem;
  position: relative;
}

.vita-item::before {
  content: "";
  position: absolute;
  left: -1.375rem;
  top: 1.1rem;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-subtle);
}

.vita-year {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-subtle);
  letter-spacing: 0.02em;
  padding-top: 0.05rem;
  flex-shrink: 0;
}

.vita-desc {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.5;
}

.vita-title {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.5;
}

.vita-sub {
  display: block;
  font-size: 0.8rem;
  color: var(--text-subtle);
  line-height: 1.5;
  margin-top: 0.15rem;
}

/* ── PROJEKTE — One scrollable container, equal-width year columns — */
.section--projekte .section-inner {
  max-width: 100%;
  padding-inline: 0;
}

.ref-header,
.ref-count-filters {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 3rem);
}

/* ── REFERENZEN scrollable body ─────────────────────────────── */
.ref-scroll-body {
  max-height: 60vh;
  overflow-y: auto;
  /* subtle border frames the scroll area */
  /* border: 1px solid var(--border); */
  border-radius: var(--radius);
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
  margin-top: 0;
  max-width: calc(var(--max-w) + 4rem);
  margin-inline: auto;
  /* scroll-fade: a gradient masks the bottom to hint at more content */
  position: relative;
}

/* Bottom fade — fades out when scrolled to end via JS class toggle */
.ref-scroll-body::after {
  content: "";
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  display: block;
  height: 4rem;
  margin-top: -4rem; /* overlap last content, not push it */
  background: linear-gradient(to bottom, transparent, var(--bg) 90%);
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.ref-scroll-body--at-end::after {
  opacity: 0;
}

@media (min-width: 768px) {
  .ref-scroll-body {
    max-width: calc(var(--max-w) - 8rem);
  }
}
.ref-scroll-body::-webkit-scrollbar {
  width: 4px;
}
.ref-scroll-body::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

.ref-list {
  margin-top: 0;
  display: flex;
  flex-direction: column;
  padding-inline: clamp(0.5rem, 5vw, 1.25rem);
}

.ref-year-block {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 2rem;
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
}
.ref-year-block[hidden] {
  display: none;
}

.ref-year-label {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-subtle);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1;
  flex-shrink: 0;
  width: 4rem;
  padding-top: 0.1rem;
  /* sticky within the scroll body */
  position: sticky;
  top: 1rem;
  align-self: flex-start;
}

/* ── RESPONSIVE: stack year label above rows on narrow screens ── */
@media (max-width: 540px) {
  .ref-year-block {
    flex-direction: column;
    gap: 0.75rem;
  }
  .ref-year-label {
    width: auto;
    position: static;
    top: auto;
  }
}

.ref-rows {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
  padding: 0;
  width: 100%;
}

.ref-row {
  width: 100%;
  display: grid;
  grid-template-areas:
    "top  top"
    "desc cats";
  grid-template-columns: 1fr auto;
  column-gap: 0.75rem;
  row-gap: 0.2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem 0.75rem;
  flex-shrink: 0;
  transition: border-color 0.15s;
}
.ref-row:hover {
  border-color: var(--text-subtle);
}

.ref-row-top {
  grid-area: top;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.ref-row-name {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text);
  line-height: 1.4;
}

.ref-row-period {
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--text-subtle);
  letter-spacing: 0.04em;
  white-space: nowrap;
  flex-shrink: 0;
}

.ref-row-desc {
  grid-area: desc;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
  align-self: center;
}

.ref-row-cats {
  grid-area: cats;
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  justify-content: flex-end;
  align-self: center;
}

.ref-cat {
  font-size: 0.67rem;
  padding: 0.1rem 0.42rem;
  border: 1px solid var(--tag-border);
  border-radius: 2rem;
  color: var(--text-subtle);
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.ref-intro {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-top: -0.75rem;
}

/* ── Ref toolbar: count + rule + filters inline ─────────────── */
.ref-count-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.5rem;
  margin-bottom: 0.75rem;
}


/* Filter pills */
.ref-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.filter-pill {
  min-height: 32px;
  min-width: 44px;
  padding: 0.3rem 0.875rem;
  font-size: 0.8rem;
  font-weight: 400;
  font-family: var(--font-body);
  letter-spacing: 0.05em;
  border: 1px solid var(--tag-border);
  border-radius: 2rem;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition:
    background-color 0.5s,
    color 0.5s,
    border-color 0.5s;
}
.filter-pill:hover {
  border-color: var(--text-muted);
  color: var(--text);
}
.filter-pill--active,
.filter-pill[aria-pressed="true"] {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

/* Ripple effect on filter pills */
.filter-pill {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.filter-pill::after {
  content: "";
  position: absolute;
  left: var(--ripple-x, 50%);
  top: var(--ripple-y, 50%);
  translate: -50% -50%;
  width: 0;
  height: 0;
  background: var(--text);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
}
.filter-pill.ripple-active::after {
  animation: ripple-expand 1s ease-out forwards;
}
@keyframes ripple-expand {
  from {
    width: 0;
    height: 0;
    opacity: 0.85;
  }
  to {
    width: 220px;
    height: 220px;
    opacity: 0;
  }
}


/* ── KONTAKT ────────────────────────────────────────────────── */
.section--kontakt {
  text-align: center;
}

.kontakt-card {
  display: inline-flex;
  flex-direction: column;
  gap: 0.9rem;
  align-items: center;
}

.kontakt-name {
  font-size: 0.875rem;
  font-weight: 300;
  color: var(--text);
  opacity: 0.5;
  line-height: 1.7;
  margin-bottom: -0.9rem;
}

.kontakt-address {
  font-size: 0.875rem;
  font-weight: 300;
  color: var(--text);
  opacity: 0.5;
  line-height: 1.7;
}

.kontakt-links {
  display: flex;
  flex-direction: column;
  gap: 0;
  align-items: center;
}

.kontakt-link {
  font-size: 0.875rem;
  font-weight: 300;
  color: var(--text);
  opacity: 0.5;
  line-height: 1.7;
  text-decoration: none;
  transition: opacity 0.2s;
}
.kontakt-link:hover {
  opacity: 0.8;
}
.kontakt-link--social {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
}
.icon-linkedin {
  flex-shrink: 0;
  vertical-align: middle;
}

.kontakt-impressum {
  font-size: 0.875rem;
  font-weight: 300;
  color: var(--text);
  opacity: 0.5;
  line-height: 1.7;
}

.kontakt-impressum a {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.kontakt-datenschutz {
  cursor: pointer;
}

.kontakt-datenschutz summary {
  cursor: pointer;
}

.kontakt-datenschutz p {
  margin-top: 0;
  max-width: 36rem;
}

/* ── FOOTER ──────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 1.25rem;
  position: relative;
  z-index: 1;
  background: var(--bg-alt);
  transition: background-color 0.3s ease;
}

[data-theme="dark"] .site-footer {
  background: #0d0d0e;
  border-top-color: #1e1d1c;
}

.footer-inner {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 3rem);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 1rem;
}

.footer-logo {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5em;
  color: var(--text);
}

.footer-wordmark {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  line-height: 1;
}

.footer-subtitle {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 300;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  line-height: 1;
  color: var(--text-muted);
}

.footer-copy {
  font-size: 0.7rem;
  color: var(--text-subtle);
  letter-spacing: 0.02em;
}

/* ── MOBILE NAV ─────────────────────────────────────────────────── */
@media (max-width: 767px) {
  /* Hamburger visible on mobile (JS removes the [hidden] attr) */
  .nav-hamburger {
    display: flex;
  }

  /* Links: hidden by default; open state driven by :has() — no class toggling needed */
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 0 1rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    z-index: 99;
  }

  .nav-inner:has(.nav-hamburger[aria-expanded="true"]) .nav-links {
    display: flex;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-link {
    display: block;
    padding: 0.75rem clamp(1.25rem, 5vw, 2rem);
    width: 100%;
    border-bottom: none;
    font-size: 0.875rem;
  }
}

/* ── LAYOUT ANCHOR (fixed bottom-left: theme + anim toggles) ─────── */
.layout-anchor {
  position: fixed;
  bottom: 1rem;
  left: 0.75rem;
  width: fit-content;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}


/* ── REVERB ANIMATIONS ────────────────────────────────────────────── */

/* Nav link border echo on scroll-spy change — outgoing link underline decays */
.nav-link--echoing {
  transition: none; /* prevent border-color transition fighting the animation */
  animation: link-echo 600ms ease-out forwards;
}

@keyframes link-echo {
  0% {
    border-bottom-color: var(--text);
  }
  60% {
    border-bottom-color: color-mix(in srgb, var(--text) 30%, transparent);
  }
  100% {
    border-bottom-color: transparent;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nav-link--echoing {
    animation: none !important;
  }
}

/* ── PRINT ───────────────────────────────────────────────────────── */
@media print {
  .site-header,
  .hero-cta,
  .ref-filters,
  .nav-controls,
  .nav-hamburger {
    display: none !important;
  }
  body {
    background: white;
    color: black;
  }
  .section {
    padding-block: 2rem;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}
