@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('fonts/BricolageGrotesque-Variable.woff2') format('woff2-variations'),
       url('fonts/BricolageGrotesque-Variable.woff2') format('woff2');
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
}
:root {
  --paper: #ECEBE4;
  --paper-2: #F6F5F0;
  --ink: #17302A;
  --ink-2: #24403A;
  --ink-soft: #5C6B66;
  --rule: #C9CBC1;
  --rule-dark: #2F4A43;
  --blue: #2B4BE0;
  --blue-soft: #8FA0F0;
  --font: 'Bricolage Grotesque', 'Helvetica Neue', Arial, sans-serif;
  --gutter: clamp(20px, 4vw, 56px);
  --maxw: 1200px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-variation-settings: 'opsz' 14, 'wdth' 100;
  font-weight: 400;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}
::selection { background: var(--blue); color: #fff; }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Hero (dunkel) ---------- */
.hero {
  background: var(--ink);
  color: var(--paper);
}
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 26px 0;
  border-bottom: 1px solid var(--rule-dark);
}
.brand {
  text-decoration: none;
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.01em;
}
.nav ul {
  list-style: none;
  display: flex;
  gap: 28px;
  font-size: 15px;
}
.nav a { text-decoration: none; }
.nav ul a { color: var(--blue-soft); }
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--rule-dark);
  border-radius: 4px;
  color: var(--paper);
  width: 44px; height: 40px;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block;
  width: 20px; height: 2px;
  background: currentColor;
  margin: 0 auto;
  position: relative;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.nav-toggle span + span { margin-top: 5px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav ul a:hover { color: var(--paper); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: end;
  padding: clamp(64px, 10vw, 128px) 0 clamp(56px, 8vw, 96px);
}
.hero h1 {
  font-weight: 500;
  font-variation-settings: 'opsz' 96, 'wdth' 88;
  font-size: clamp(42px, 6.6vw, 92px);
  line-height: 0.98;
  letter-spacing: -0.03em;
  text-wrap: balance;
  max-width: 14ch;
}
.hero p {
  margin-top: 28px;
  max-width: 44ch;
  font-size: clamp(17px, 1.5vw, 20px);
  color: #C9D2CE;
}
.hero .cta {
  margin-top: 40px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.btn {
  display: inline-block;
  padding: 14px 22px;
  background: var(--blue);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  border-radius: 4px;
  transition: background 0.2s;
}
.btn:hover { background: #1F3BC4; }
.btn.ghost {
  background: transparent;
  color: var(--paper);
  box-shadow: inset 0 0 0 1px var(--rule-dark);
}
.btn.ghost:hover { box-shadow: inset 0 0 0 1px var(--paper); }

/* Das Kachelraster: eine Kachel pro Website auf dem Server */
.sites {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 6px;
  aspect-ratio: 8 / 4;
}
.sites i {
  display: block;
  background: var(--ink-2);
  border-radius: 3px;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), background 0.4s;
}
.sites i.on { opacity: 1; transform: none; }
.sites i.client { background: var(--blue); }
.sites i.own { background: #3E5D55; }
.sites-caption {
  margin-top: 18px;
  font-size: 15px;
  color: #A7B4AF;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
}
.sites-caption span::before {
  content: '';
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 2px;
  margin-right: 8px;
  vertical-align: -1px;
  background: var(--ink-2);
}
.sites-caption .k-client::before { background: var(--blue); }
.sites-caption .k-own::before { background: #3E5D55; }

/* ---------- Sektionen ---------- */
.section { padding: clamp(72px, 9vw, 128px) 0; }
.section + .section { border-top: 1px solid var(--rule); }
.section-head {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: 24px var(--gutter);
  margin-bottom: clamp(40px, 5vw, 72px);
}
.section-head h2 {
  font-weight: 500;
  font-variation-settings: 'opsz' 96, 'wdth' 90;
  font-size: clamp(34px, 4.2vw, 56px);
  line-height: 1.02;
  letter-spacing: -0.025em;
}
.section-head p {
  font-size: clamp(18px, 1.6vw, 22px);
  max-width: 46ch;
  color: var(--ink-2);
  align-self: end;
}

/* Leistungen: drei Zeilen, links Name, rechts Text */
.service {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: 16px var(--gutter);
  padding: 40px 0;
  border-top: 1px solid var(--rule);
}
.service:last-child { border-bottom: 1px solid var(--rule); }
.service h3 {
  font-weight: 500;
  font-variation-settings: 'opsz' 48, 'wdth' 92;
  font-size: clamp(24px, 2.6vw, 34px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  max-width: 14ch;
}
.service p { max-width: 58ch; color: var(--ink-2); }
.service ul {
  list-style: none;
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.service li {
  font-size: 14px;
  padding: 6px 11px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--ink-2);
  background: var(--paper-2);
}

/* Arbeiten: zweispaltiges Raster, Schachbrett-Tönung, ein dunkles Feld */
.works {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.work {
  padding: 32px clamp(24px, 3vw, 40px) 36px;
  border-radius: 6px;
  background: var(--paper-2);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.work:nth-child(4n+2), .work:nth-child(4n+3) { background: #E2E4DC; }
.work .client { font-size: 14px; color: var(--blue); font-weight: 500; }
.work h3 {
  font-weight: 500;
  font-variation-settings: 'opsz' 48, 'wdth' 92;
  font-size: clamp(22px, 2.2vw, 28px);
  line-height: 1.12;
  letter-spacing: -0.02em;
}
.work p { color: var(--ink-2); max-width: 52ch; flex: 1; }
.work .tech { font-size: 14px; color: var(--ink-soft); margin-top: 8px; }
.work a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
/* Ungerade Anzahl: letzte Karte über beide Spalten */
.work:last-child:nth-child(odd) { grid-column: 1 / -1; }
.work:last-child:nth-child(odd) p { max-width: 68ch; }
.work img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
  margin: -8px 0 10px;
}
.work .links { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 4px; }
.work.own {
  background: var(--ink);
  color: var(--paper);
}
.work.own .client { color: var(--blue-soft); }
.work.own p { color: #C9D2CE; }
.work.own .tech { color: #A7B4AF; }
.work.own a { color: var(--blue-soft); }

/* Publikationen: kompakte Liste */
.pubs {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0 var(--gutter);
}
.pubs li {
  padding: 18px 0;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pubs a {
  font-weight: 600;
  text-decoration: none;
  font-size: 18px;
}
.pubs a:hover { color: var(--blue); }
.pubs small { font-size: 15px; color: var(--ink-soft); }

/* Studio */
.studio {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 40px var(--gutter);
}
.studio .lead {
  font-weight: 500;
  font-variation-settings: 'opsz' 48, 'wdth' 92;
  font-size: clamp(24px, 2.8vw, 36px);
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.studio .body { margin-top: 24px; color: var(--ink-2); max-width: 60ch; }
.studio .body p + p { margin-top: 14px; }
.facts { list-style: none; }
.facts li {
  padding: 16px 0;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 16px;
  font-size: 16px;
}
.facts li:last-child { border-bottom: 1px solid var(--rule); }
.facts b { font-weight: 600; }

/* Kontakt + Footer (dunkel) */
.footer {
  background: var(--ink);
  color: var(--paper);
  padding: clamp(64px, 8vw, 112px) 0 40px;
}
.contact h2 {
  font-weight: 500;
  font-variation-settings: 'opsz' 96, 'wdth' 88;
  font-size: clamp(34px, 5vw, 68px);
  line-height: 1;
  letter-spacing: -0.03em;
  max-width: 18ch;
}
.contact p { margin-top: 20px; color: #C9D2CE; max-width: 50ch; font-size: 18px; }
.contact .mail {
  display: inline-block;
  margin-top: 28px;
  font-size: clamp(20px, 2.6vw, 32px);
  font-weight: 500;
  color: var(--paper);
  text-decoration: none;
  border-bottom: 2px solid var(--blue);
  padding-bottom: 4px;
}
.contact .mail:hover { color: var(--blue-soft); }

.legal {
  margin-top: clamp(56px, 7vw, 96px);
  padding-top: 28px;
  border-top: 1px solid var(--rule-dark);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px var(--gutter);
  font-size: 14px;
  color: #A7B4AF;
  font-style: normal;
}
.legal b { color: var(--paper); font-weight: 600; display: block; margin-bottom: 6px; }
.legal a { color: #A7B4AF; }
.colophon {
  margin-top: 40px;
  font-size: 14px;
  color: #7E8D88;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero-grid, .section-head, .service, .studio { grid-template-columns: 1fr; }
  .hero-grid { align-items: start; }
  .sites { max-width: 420px; }
  .works { grid-template-columns: 1fr; }
  .work:nth-child(4n+2):not(.own), .work:nth-child(4n+3):not(.own) { background: var(--paper-2); }
  .work:nth-child(even):not(.own) { background: #E2E4DC; }
  .legal { grid-template-columns: 1fr; }
  .nav { flex-wrap: wrap; }
  .nav-toggle { display: block; }
  .nav ul {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    gap: 0;
    font-size: 18px;
    padding-top: 12px;
  }
  .nav ul.open { display: flex; }
  .nav ul li { border-top: 1px solid var(--rule-dark); }
  .nav ul a { display: block; padding: 14px 0; }
}
@media (max-width: 520px) {
  .facts li { grid-template-columns: 1fr; gap: 4px; }
}
/* Sanftes Einblenden beim Scrollen */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
  transition-delay: var(--d, 0ms);
}
.reveal.in { opacity: 1; transform: none; }

/* Kacheln: gelegentliches Aufleuchten und Reaktion auf die Maus */
.sites i.on { transition: opacity 0.35s ease, transform 0.35s ease, background 0.6s ease, box-shadow 0.6s ease; }
.sites i.pulse { background: var(--paper); box-shadow: 0 0 18px rgba(236,235,228,0.35); transition-duration: 0.15s; }
.sites i.client.pulse { background: var(--blue-soft); box-shadow: 0 0 18px rgba(143,160,240,0.5); }
/* Belohnung: eine leuchtende Kachel mit der Maus erwischt */
@keyframes tile-hit {
  0%   { background: #F2C14E; transform: scale(1.18); }
  25%  { background: #E4572E; }
  50%  { background: var(--blue); transform: scale(1.1); }
  75%  { background: #4FB286; }
  100% { background: var(--paper); transform: scale(1); }
}
.sites i.hit { animation: tile-hit 0.6s ease-out both; }
.sites i.near { transform: translateY(-3px) scale(1.06); filter: brightness(1.35); }
.sites i.near2 { transform: translateY(-1px); filter: brightness(1.15); }

@media (prefers-reduced-motion: reduce) {
  .sites i { transition: none; opacity: 1; transform: none; }
  .sites i.near, .sites i.near2 { transform: none; filter: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Unterseiten (Impressum) ---------- */
.page { padding: clamp(56px, 7vw, 96px) 0; }
.page h1 {
  font-weight: 500;
  font-variation-settings: 'opsz' 96, 'wdth' 90;
  font-size: clamp(36px, 4.6vw, 60px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin-bottom: clamp(32px, 4vw, 56px);
}
.page .block {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: 8px var(--gutter);
  padding: 28px 0;
  border-top: 1px solid var(--rule);
}
.page .block:last-child { border-bottom: 1px solid var(--rule); }
.page h2 {
  font-weight: 600;
  font-size: 17px;
  line-height: 1.4;
}
.page .block p, .page .block address { max-width: 62ch; color: var(--ink-2); font-style: normal; }
.page .block p + p { margin-top: 10px; }
.page .todo { color: var(--blue); }
.hero.slim .nav { border-bottom: 0; }
@media (max-width: 860px) { .page .block { grid-template-columns: 1fr; } }
