/* ==========================================================================
   LKI-Architektur — Redesign
   Apple-inspired: system type, translucent materials, spring motion.
   ========================================================================== */

/* colour, layout and type tokens live in tokens.css */

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: var(--nav-h);
  background: var(--bg);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
html.is-locked { overflow: hidden; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.5 var(--font);   /* 17px body */
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4, p { margin: 0; }
address { font-style: normal; }

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

.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;
}

.skip-link {
  position: fixed; left: 12px; top: 12px; z-index: 200;
  padding: 10px 16px; border-radius: 999px;
  background: var(--text); color: var(--bg); text-decoration: none; font-weight: 600;
  transform: translateY(-160%);
}
.skip-link:focus-visible { transform: none; }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- type ---------- */
.eyebrow {
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--accent-ink);
  margin-bottom: 0.6rem;
}
.h2 {
  font-size: clamp(2.5rem, 6.4vw, 4.75rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
  font-weight: 700;
  text-wrap: balance;
}
.h3 {
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-weight: 650;
  margin-bottom: 1.75rem;
}
.dot { color: var(--accent); }

/* ---------- buttons ---------- */
.btn {
  --press: 1;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4em;
  min-height: 48px; padding: 0 1.4em;
  border-radius: 999px; border: 0;
  font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.01em;
  text-decoration: none; cursor: pointer;
  transform: scale(var(--press));
  transition: transform 160ms var(--ease-out), background-color 200ms ease, box-shadow 200ms ease;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.btn:active { --press: 0.96; transition-duration: 80ms; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-glass {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}
.btn-glass:hover { background: rgba(255, 255, 255, 0.24); }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 36px; height: 36px; border-radius: 50%; border: 0; padding: 0;
  cursor: pointer; background: var(--fill); color: var(--text);
  transition: transform 160ms var(--ease-out), background-color 200ms ease, opacity 200ms ease;
  -webkit-tap-highlight-color: transparent;
}
.icon-btn:active { transform: scale(0.9); transition-duration: 80ms; }
.icon-btn--glass {
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 0 0 1px var(--hairline), 0 4px 14px rgba(0, 0, 0, 0.12);
}
.icon-btn--dark {
  color: #fff;
  background: rgba(40, 40, 42, 0.6);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}
.icon-btn--dark:hover { background: rgba(60, 60, 62, 0.72); }

.text-link {
  color: var(--accent-ink);
  text-decoration: none;
  font-weight: 500;
}
.text-link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ==========================================================================
   Navigation — translucent floating layer
   ========================================================================== */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--nav-h);
  color: var(--text);
  background: var(--glass);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 1px 0 var(--hairline);
  transition: background-color 360ms ease, color 360ms ease, box-shadow 360ms ease;
}
.nav[data-over-hero="true"] {
  color: #fff;
  background: rgba(0, 0, 0, 0);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.nav[data-over-hero="true"]::before {
  /* soft scroll-edge so white text stays legible over the photo */
  content: ""; position: absolute; inset: 0 0 -40px 0; pointer-events: none;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0));
}
.nav-inner {
  position: relative;
  height: 100%;
  /* full width: logo flush left, links + tools flush right, at the same gutter */
  max-width: none;
  padding-inline: var(--page-gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; color: inherit; min-height: 44px;
}
.brand-mark { width: 30px; height: auto; }
.brand-text { display: grid; line-height: 1.05; }
.brand-kicker {
  font-size: 0.625rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  opacity: 0.7;
}
.brand-name { font-size: 1.0625rem; font-weight: 700; letter-spacing: -0.015em; }
/* header logo: larger and bolder (mark, kicker and name) */
.nav .brand { gap: 12px; }
.nav .brand-mark { width: 40px; }
.nav svg.brand-mark g { stroke-width: 1.7; }
.nav .brand-kicker { font-size: 0.6875rem; font-weight: 700; opacity: 0.8; }
.nav .brand-name { font-size: 1.375rem; font-weight: 800; letter-spacing: -0.025em; }

.nav-links { display: flex; gap: 6px; }
.nav-links a {
  position: relative;
  font-size: 0.875rem; font-weight: 500; letter-spacing: -0.005em;
  text-decoration: none;
  padding: 8px 12px; border-radius: 999px;
  opacity: 0.82;
  transition: opacity 200ms ease, background-color 200ms ease;
}
.nav-links a:hover { opacity: 1; background: var(--fill); }
.nav[data-over-hero="true"] .nav-links a:hover { background: rgba(255, 255, 255, 0.14); }
.nav-links a[aria-current] { opacity: 1; }
.nav-links a[aria-current]::after {
  content: ""; position: absolute; left: 50%; bottom: 2px;
  width: 4px; height: 4px; margin-left: -2px; border-radius: 50%;
  background: var(--accent);
}

.nav-menu-btn {
  display: none;
  width: 44px; height: 44px; margin-right: -10px;
  border: 0; background: none; cursor: pointer; border-radius: 50%;
  -webkit-tap-highlight-color: transparent;
}
.burger { position: relative; display: block; width: 18px; height: 12px; margin: auto; }
.burger span {
  position: absolute; left: 0; right: 0; height: 1.6px; border-radius: 2px; background: currentColor;
  transition: transform 300ms var(--ease-out), top 300ms var(--ease-out);
}
.burger span:first-child { top: 2px; }
.burger span:last-child { top: 8.5px; }
.nav-menu-btn[aria-expanded="true"] .burger span:first-child { top: 5.2px; transform: rotate(45deg); }
.nav-menu-btn[aria-expanded="true"] .burger span:last-child { top: 5.2px; transform: rotate(-45deg); }

.menu-sheet {
  position: absolute; top: calc(var(--nav-h) + 6px); right: 8px; left: 8px;
  padding: 8px;
  border-radius: 22px;
  color: var(--text);
  background: var(--glass-menu);   /* heavier material: it floats over busy photography */
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  backdrop-filter: blur(40px) saturate(180%);
  box-shadow: 0 0 0 1px var(--hairline), var(--shadow-2);
  transform-origin: top right;
  will-change: transform, opacity;
}
.menu-sheet nav { display: grid; }
.menu-sheet a {
  display: flex; align-items: center; min-height: 54px; padding: 0 16px;
  font-size: 1.375rem; font-weight: 650; letter-spacing: -0.02em;
  text-decoration: none; border-radius: 14px;
}
.menu-sheet a:active { background: var(--fill); }

@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav-menu-btn { display: grid; place-items: center; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  min-height: max(620px, 100svh);
  display: flex; align-items: flex-end;
  color: #fff;
  overflow: hidden;
  isolation: isolate;
  background: #1a1a1a;
}
/* headline colour follows the current slide (see heroAccentOf in app.js).
   Registered so it can transition exactly like the photo cross-fade. */
@property --hero-accent { syntax: '<color>'; inherits: true; initial-value: #c9925f; }
.hero {
  --slide-fade: 1.4s;
  --hero-accent: var(--accent);                 /* fallback = brand colour of "Portfolio ansehen" */
  transition: --hero-accent var(--slide-fade) ease;
}
/* scope flag lives in the markup: <section data-accent-scope="title"> — add "eyebrow" to tint it as well */
/* headline: the site's main palette colour (admin → Settings → Colour palette), live; per-slide photo colours are not used */
.hero[data-accent-scope~="title"] .hero-title { color: var(--accent); }
.hero[data-accent-scope~="eyebrow"] .hero-eyebrow { color: var(--hero-accent); }
@media (prefers-reduced-motion: reduce) { .hero { transition: none; } }

.hero-media { position: absolute; inset: -6% 0 0 0; z-index: -2; overflow: hidden; will-change: transform; }
/* slideshow: photos cross-fade; the visible one drifts in slowly (Ken Burns).
   On leaving, the zoom is held until the fade is over, then reset unseen. */
.hero-slide {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity var(--slide-fade, 1.4s) ease, transform 0s linear var(--slide-fade, 1.4s);
}
.hero-slide.is-active {
  opacity: 1;
  transform: scale(1.12);
  transition: opacity var(--slide-fade, 1.4s) ease, transform 9s linear;
}
@media (prefers-reduced-motion: reduce) {
  .hero-slide, .hero-slide.is-active { transform: none; transition: opacity 0.5s ease; }
}

/* the photo itself opens its project: a link layer above the photo, below the text */
.hero-link { position: absolute; inset: 0; z-index: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.hero-link[hidden] { display: none; }
.hero-inner { position: relative; z-index: 1; pointer-events: none; }
/* the hero text shares the header's gutter, so it lines up with the logo */
.hero-inner.wrap { max-width: none; padding-inline: var(--page-gutter); }
.hero-actions, .hero-slides, .notice, .hero-bar { pointer-events: auto; }

/* bottom row of the hero: two separate islands — buttons left, slideshow right.
   Each is a plain rectangle, lightly frosted (same glass as the menu island in the header). */
.hero-bar {
  grid-column: 1 / -1;
  display: flex; align-items: stretch; justify-content: space-between; flex-wrap: wrap; gap: 12px 32px;   /* both islands share a height */
}
.hero-bar > .hero-actions, .hero-bar > .hero-slides {
  padding: 12px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
  -webkit-backdrop-filter: blur(8px) saturate(140%);
  backdrop-filter: blur(8px) saturate(140%);
}
.hero-bar .btn, .hero-bar .slide-toggle { border-radius: 0; }
.hero-bar .hero-slides { flex-direction: row; align-items: center; gap: 12px; padding: 6px 8px 6px 14px; }
/* compact slider island: smaller name, segments and pause button */
.hero-bar .slide-caption { font-size: 0.8125rem; min-height: 26px; padding: 0; }
.hero-bar .slide-dot { padding: 10px 0; }
.hero-bar .slide-dots .slide-dot { width: 18px; }
.hero-bar .slide-toggle { width: 26px; height: 26px; margin-left: 6px; }
.hero-bar .slide-toggle svg { width: 12px; height: 12px; }
/* wide screens: buttons island on the left, slider island on the right */
@media (min-width: 1101px) {
  /* slider island: shorter than the buttons island (bottoms aligned), near the right edge (same inset as the menu island) */
  .hero-bar > .hero-slides { align-self: flex-end; margin-right: calc(var(--island-edge) - var(--page-gutter)); }
}
.hero-bar .slide-caption { margin-bottom: 0; }

/* slideshow controls: project name, one progress segment per photo, pause */
.hero-side { display: flex; flex-direction: column; align-items: flex-end; gap: 20px; min-width: 0; }
.hero-slides { display: flex; flex-direction: column; align-items: flex-end; }
.hero-slides[hidden], .slide-bar[hidden], .slide-caption[hidden] { display: none; }
.slide-bar { display: flex; align-items: center; gap: 4px; }
.slide-caption {
  display: inline-flex; align-items: center; gap: 4px;
  min-height: 32px; padding: 4px 0; margin-bottom: -4px;
  font-size: 0.9375rem; font-weight: 600; letter-spacing: -0.005em;
  color: rgba(255, 255, 255, 0.86); text-decoration: none;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35);
  transition: color 200ms ease;
}
.slide-caption svg { transition: transform 240ms var(--ease-out); }
.slide-caption:hover, .hero:has(.hero-link:hover) .slide-caption { color: #fff; }
.slide-caption:hover svg, .hero:has(.hero-link:hover) .slide-caption svg { transform: translateX(3px); }
.slide-caption:focus-visible { outline: 2px solid #fff; outline-offset: 3px; border-radius: 6px; }
.slide-dots { display: flex; gap: 4px; }
.slide-dots .slide-dot { width: 28px; }
.slide-dot {
  appearance: none; border: 0; background: none; cursor: pointer;
  width: 34px; padding: 14px 0; border-radius: 6px;
  -webkit-tap-highlight-color: transparent;
}
.slide-dot span {
  position: relative; display: block; height: 3px; border-radius: 2px; overflow: hidden;
  background: rgba(255, 255, 255, 0.3);
  transition: background-color 200ms ease;
}
.slide-dot:hover span { background: rgba(255, 255, 255, 0.5); }
.slide-dot span::after {
  content: ''; position: absolute; inset: 0; background: #fff;
  transform: scaleX(0); transform-origin: left center;
}
.slide-dot[aria-current] span::after { transform: none; }
.hero-slides.is-playing .slide-dot[aria-current] span::after { animation: slide-fill var(--slide-ms, 6500ms) linear both; }
@keyframes slide-fill { from { transform: scaleX(0); } to { transform: none; } }
.slide-dot:focus-visible, .slide-toggle:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.slide-toggle {
  display: inline-grid; place-items: center;
  width: 32px; height: 32px; margin-left: 8px; padding: 0; border: 0; border-radius: 50%;
  color: #fff; cursor: pointer;
  background: rgba(255, 255, 255, 0.16);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
  transition: transform 160ms var(--ease-out), background-color 200ms ease;
  -webkit-tap-highlight-color: transparent;
}
.slide-toggle:hover { background: rgba(255, 255, 255, 0.26); }
.slide-toggle:active { transform: scale(0.9); transition-duration: 80ms; }
.slide-toggle .i-play { display: none; }
.hero-slides.is-paused .slide-toggle .i-play { display: block; }
.hero-slides.is-paused .slide-toggle .i-pause { display: none; }
.hero-shade {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to right, rgba(0, 0, 0, 0.42) 0%, rgba(0, 0, 0, 0) 62%),
    linear-gradient(to top, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.4) 40%, rgba(0, 0, 0, 0.06) 72%, rgba(0, 0, 0, 0.3) 100%);
}
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 380px);
  align-items: end;
  gap: 32px 48px;
  padding-top: calc(var(--nav-h) + 48px);
  padding-bottom: clamp(28px, 5vh, 56px);
}
.hero-eyebrow {
  font-size: clamp(0.9375rem, 1.4vw, 1.125rem); font-weight: 600;
  color: oklch(0.86 calc(var(--accent-c) * 1.3) var(--accent-h));
  margin-bottom: 0.75rem;
}
.hero-title {
  font-size: clamp(2.4rem, 9.6vw, 3.6rem);
  max-width: 14ch;            /* "LKI‑Architektur" uses a non-breaking hyphen, so it stays on one line */
  text-wrap: balance;
  line-height: 0.95;
  letter-spacing: -0.045em;
  font-weight: 750;
  margin-left: -0.04em;
}
/* subtitle above, headline below it (the markup keeps h1 first for screen readers) */
.hero-copy { display: flex; flex-direction: column; }
.hero-lede {
  order: -1;
  margin-bottom: 0.9rem;
  font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
  line-height: 1.3;
  letter-spacing: -0.02em;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.86);
  max-width: 40ch;
  max-width: 30ch;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.notice {
  position: relative;
  display: grid; grid-template-columns: auto 1fr; gap: 12px;
  padding: 18px 44px 18px 18px;
  border-radius: 22px;
  color: rgba(255, 255, 255, 0.86);
  background: rgba(30, 30, 32, 0.5);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  backdrop-filter: blur(28px) saturate(160%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), inset 0 0 0 1px rgba(255, 255, 255, 0.1), 0 20px 50px rgba(0, 0, 0, 0.25);
  font-size: 0.875rem; line-height: 1.45; letter-spacing: 0;
}
.notice[hidden] { display: none; }
.notice-icon { color: oklch(0.86 calc(var(--accent-c) * 1.3) var(--accent-h)); padding-top: 1px; }
.notice-title { font-size: 0.9375rem; font-weight: 650; line-height: 1.3; color: #fff; margin-bottom: 6px; letter-spacing: -0.01em; }
.notice-thanks { margin-top: 8px; color: #fff; font-weight: 600; }
.notice-close {
  position: absolute; top: 10px; right: 10px;
  width: 28px; height: 28px;
  color: rgba(255, 255, 255, 0.8); background: rgba(255, 255, 255, 0.12);
}
.notice-close:hover { background: rgba(255, 255, 255, 0.2); }

.hero-scroll {
  position: absolute; left: 50%; bottom: 18px; margin-left: -22px;
  width: 44px; height: 44px; display: grid; place-items: center;
  color: rgba(255, 255, 255, 0.7); border-radius: 50%;
}
@media (prefers-reduced-motion: no-preference) {
  .hero-scroll svg { animation: nudge 2.6s var(--ease-out) infinite; }
  @keyframes nudge { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(5px); } }
}

@media (min-width: 1101px) {
  .hero-title { font-size: clamp(3rem, 4.6vw, 4.5rem); }
}
@media (max-width: 1100px) {
  .hero-shade {
    /* ≥ .6 where the headline sits (≈ 60–75% from the bottom), so it passes 4.5:1 on bright photos.
       Keep HERO_ZONES.mobile.overlay in assets/accent.mjs in sync. */
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.68) 50%, rgba(0, 0, 0, 0.6) 76%, rgba(0, 0, 0, 0.36) 90%, rgba(0, 0, 0, 0.42) 100%);
  }
  .hero-inner { grid-template-columns: 1fr; }
  .notice { max-width: 520px; }
  /* one column: text, then the slideshow controls under it, then the notice */
  .hero-side { display: contents; }
  /* bar stacks: buttons, then the slideshow row across the full width with shrinking segments */
  .hero-bar { min-width: 0; }
  .hero-bar .hero-slides { width: 100%; min-width: 0; justify-content: space-between; gap: 12px; }
  .hero-bar .slide-caption { flex: none; max-width: 45%; min-width: 0; }
  .hero-bar .slide-caption-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .hero-bar .slide-bar { flex: 1; min-width: 0; justify-content: flex-end; }
  .hero-bar .slide-dots { flex: 1; min-width: 0; max-width: 360px; }
  .hero-bar .slide-dots .slide-dot { flex: 1 1 0; width: auto; min-width: 0; }
  .slide-dots { gap: 3px; }
  .slide-dots .slide-dot { width: 24px; }
  .notice { order: 2; }
  .hero-scroll { display: none; }
}
/* slider island = same width and height as the menu island in the header (synced in app.js),
   at the right edge with the same inset; the progress segments stretch to fill it.
   Phones (≤760px, menu island collapsed) keep the full-width slider row. */
@media (min-width: 761px) {
  .hero-bar > .hero-slides {
    width: var(--nav-island-w, auto); max-width: 100%;
    height: var(--nav-island-h, auto);
    align-self: flex-end; margin-left: auto;
    margin-right: calc(var(--island-edge) - var(--page-gutter));
    padding-block: 0;
  }
  .hero-bar .slide-caption { flex: none; max-width: 45%; min-width: 0; }
  .hero-bar .slide-caption-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .hero-bar .slide-bar { flex: 1; min-width: 0; justify-content: flex-end; }
  .hero-bar .slide-dots { flex: 1; min-width: 0; max-width: none; }
  .hero-bar .slide-dots .slide-dot { flex: 1 1 0; width: auto; min-width: 0; }
}

/* entrance */
@media (prefers-reduced-motion: no-preference) {
  .js .hero-copy > *, .js .notice, .js .hero-bar {
    animation: rise 1s var(--ease-out) both;
  }
  .js .hero-copy > :nth-child(2) { animation-delay: 80ms; }
  .js .hero-bar { animation-delay: 200ms; }
  .js .notice { animation-delay: 420ms; }
  @keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
}

/* ==========================================================================
   Sections
   ========================================================================== */
.section { padding-block: var(--section-pad); }
.section--tint { background: var(--bg-tint); }
.section-head { margin-bottom: clamp(36px, 5vw, 64px); }
.section-head--split {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}

/* reveal on scroll */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 900ms var(--ease-out), transform 1000ms var(--ease-out);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* ---------- segmented control ---------- */
.seg {
  position: relative;
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: var(--fill);
  max-width: 100%;
}
.seg-thumb {
  position: absolute; top: 3px; bottom: 3px; left: 0; width: 0;
  border-radius: 999px;
  background: var(--seg-thumb);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12), 0 3px 1px rgba(0, 0, 0, 0.04);
  will-change: transform, width;
}
.seg-btn {
  position: relative; z-index: 1;
  min-height: 40px; padding: 0 18px;
  border: 0; background: none; border-radius: 999px; cursor: pointer;
  font-size: 0.9375rem; font-weight: 500; letter-spacing: -0.01em;
  white-space: nowrap;
  color: var(--text-2);
  transition: color 200ms ease;
  -webkit-tap-highlight-color: transparent;
}
.seg-btn[aria-selected="true"] { color: var(--text); font-weight: 600; }
.seg-count {
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  color: var(--text-3);
  margin-left: 2px;
}
/* category switch: a plain rectangle, like the islands in the header and hero */
.seg, .seg-thumb, .seg-btn { border-radius: 0; }

/* ---------- portfolio: home preview + its own page ---------- */
.see-all {
  display: inline-flex; align-items: center; gap: 4px;
  min-height: 44px; padding: 0 4px;
  font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.01em;
  color: var(--accent-ink); text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.see-all svg { transition: transform 220ms var(--ease-out); }
.see-all:hover svg { transform: translateX(3px); }
.see-all:active { opacity: 0.7; }
.section-foot { display: flex; justify-content: center; margin-top: clamp(40px, 6vw, 72px); }
@media (max-width: 600px) {
  .section-head--split .see-all { display: none; }   /* the button under the grid does the job on phones */
  .section-foot .btn { width: 100%; }
}

.page-portfolio { padding-top: calc(var(--nav-h) + clamp(40px, 7vw, 104px)); min-height: 80vh; }
.page-title { font-size: clamp(3rem, 9vw, 6.5rem); line-height: 1; letter-spacing: -0.035em; }
@media (max-width: 600px) {
  .page-head { gap: 20px; }
  .page-head .seg { width: 100%; }
  .page-head .seg-btn { flex: 1; padding: 0 10px; }
}

/* ---------- project grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr));
  gap: clamp(28px, 4vw, 48px) clamp(16px, 2.4vw, 28px);
}
/* portfolio → interior design: photos only, close together, same gap across and down.
   The name stays in the markup for screen readers (visually hidden). */
.grid[data-cat="innenarchitektur"] { gap: clamp(8px, 1vw, 12px); }
.grid[data-cat="innenarchitektur"] .card-meta {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.card {
  display: block;
  color: inherit; text-decoration: none;
  border-radius: var(--r-m);
  -webkit-tap-highlight-color: transparent;
}
.card:focus-visible { outline-offset: 6px; }
.card-media {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: var(--r-m);
  overflow: hidden;
  background: var(--surface-2);
  transform: translateZ(0);
  transition: transform 220ms var(--ease-out), box-shadow 300ms ease;
}
.card:active .card-media { transform: scale(0.975); transition-duration: 90ms; }
.card-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 900ms var(--ease-out), opacity 500ms ease;
}
@media (hover: hover) {
  .card:hover .card-media img { transform: scale(1.045); }
  .card:hover .card-media { box-shadow: var(--shadow-1); }
}
.card-badge {
  position: absolute; right: 10px; bottom: 10px;
  padding: 4px 10px; border-radius: 0;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0;
  color: #fff;
  background: rgba(20, 20, 22, 0.42);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  font-variant-numeric: tabular-nums;
}
.card-meta {
  display: flex; gap: 12px; align-items: baseline;
  padding: 16px 2px 0;
}
.card-text { min-width: 0; }
.card-num {
  flex: none;
  min-width: 2.2em;
  font-size: 0.8125rem; font-weight: 600;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}
.card-title {
  font-size: 1.25rem; line-height: 1.2; font-weight: 700; letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}
.card-sub { color: var(--text-2); font-size: 0.9375rem; margin-top: 2px; }

@media (prefers-reduced-motion: no-preference) {
  .grid.is-entering .card-item {
    animation: card-in 700ms var(--ease-out) both;
    animation-delay: calc(min(var(--i), 9) * 45ms);
  }
  @keyframes card-in { from { opacity: 0; transform: translateY(18px) scale(0.985); } to { opacity: 1; transform: none; } }
}

/* image loading */
.img-fade { opacity: 0; }
.img-fade.is-loaded { opacity: 1; }
.img-error {
  display: grid; place-items: center;
  color: var(--text-3); font-size: 0.8125rem; text-align: center; padding: 12px;
}

/* ---------- services ---------- */
.services {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 24px);
}
.service {
  position: relative; display: block;
  aspect-ratio: 4 / 5;
  border-radius: var(--r-l);
  overflow: hidden;
  color: #fff; text-decoration: none;
  background: #222;
  isolation: isolate;
  transform: translateZ(0);
  transition: transform 220ms var(--ease-out), box-shadow 300ms ease;
  -webkit-tap-highlight-color: transparent;
}
.service:active { transform: scale(0.98); transition-duration: 90ms; }
.service img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2;
  transition: transform 1200ms var(--ease-out), opacity 500ms ease;
}
@media (hover: hover) {
  .service:hover img { transform: scale(1.05); }
  .service:hover { box-shadow: var(--shadow-2); }
}
.service::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.12) 50%, rgba(0, 0, 0, 0) 100%);
}
.service-body {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: clamp(20px, 2.6vw, 32px);
  display: flex; flex-direction: column; align-items: flex-start; gap: 16px;
}
.service-index { display: block; margin-bottom: 4px; font-size: 0.8125rem; font-weight: 600; color: oklch(0.88 calc(var(--t-c, var(--accent-c)) * 1.3) var(--t-h, var(--accent-h))); font-variant-numeric: tabular-nums; }
.service-title { font-size: clamp(1.5rem, 2.3vw, 1.875rem); font-weight: 700; letter-spacing: -0.025em; line-height: 1.1; hyphens: manual; }
.service-more {
  flex: none;
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 36px; padding: 0 14px;
  border-radius: 999px;
  font-size: 0.875rem; font-weight: 600;
  background: rgba(255, 255, 255, 0.18);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}
@media (max-width: 860px) {
  .services { grid-template-columns: 1fr; }
  .service { aspect-ratio: 16 / 11; }
}

/* ---------- about ---------- */
.about { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(48px, 6vw, 96px); }
@media (max-width: 960px) { .about { grid-template-columns: 1fr; } }

.team {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 36px 20px;
}
.member { text-align: center; }
.avatar {
  width: min(132px, 100%); aspect-ratio: 1; margin: 0 auto 14px;
  border-radius: 50%; overflow: hidden;
  background: var(--surface-2);
  box-shadow: 0 0 0 1px var(--hairline);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
/* team photo that links to the member's own website */
.avatar-link { display: block; width: min(132px, 100%); margin: 0 auto 14px; border-radius: 50%; -webkit-tap-highlight-color: transparent; }
.avatar-link .avatar { margin: 0; transition: transform 260ms var(--ease-out), box-shadow 260ms ease; }
.avatar-link img { transition: transform 400ms var(--ease-out); }
@media (hover: hover) {
  .avatar-link:hover .avatar { box-shadow: 0 0 0 2px var(--accent), 0 12px 30px -12px oklch(0.3 0.02 var(--stone-h) / 0.35); }
  .avatar-link:hover img { transform: scale(1.05); }
}
.avatar-link:active .avatar { transform: scale(0.97); }
.avatar-link:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
.avatar--mono {
  display: grid; place-items: center;
  background:
    radial-gradient(120% 120% at 30% 20%, oklch(0.78 var(--accent-c) var(--accent-h) / 0.6), oklch(0.78 var(--accent-c) var(--accent-h) / 0.12) 60%),
    var(--surface-2);
  color: var(--text);
  font-size: 2.25rem; font-weight: 650; letter-spacing: -0.02em;
}
.member-name { font-size: 1.0625rem; font-weight: 650; letter-spacing: -0.015em; }
.member-role { font-size: 0.875rem; color: var(--text-2); margin-top: 2px; text-wrap: balance; }

.partners { display: grid; gap: 16px; }
.partner {
  display: grid; grid-template-columns: 112px 1fr auto; align-items: center; gap: 16px;
  padding: 10px 18px 10px 10px;
  border-radius: 22px;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--hairline);
  text-decoration: none; color: inherit;
  transition: transform 220ms var(--ease-out), box-shadow 300ms ease;
  -webkit-tap-highlight-color: transparent;
}
.section--tint .partner { background: var(--surface); }
.partner:active { transform: scale(0.98); transition-duration: 90ms; }
@media (hover: hover) { .partner:hover { box-shadow: 0 0 0 1px var(--hairline), var(--shadow-1); } }
.partner-img { width: 112px; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: var(--surface-2); }
.partner-img img { width: 100%; height: 100%; object-fit: cover; }
.partner-name { font-weight: 650; letter-spacing: -0.015em; overflow-wrap: anywhere; }
.partner-host { font-size: 0.8125rem; color: var(--text-2); }
.partner-arrow { color: var(--text-3); font-size: 1.125rem; }

/* ---------- contact ---------- */
.contact-card {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px);
  padding: clamp(28px, 5vw, 64px);
  border-radius: var(--r-l);
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--hairline);
}
.contact-intro .h2 { font-size: clamp(2.25rem, 5vw, 3.75rem); margin-bottom: 2rem; }
.contact-list { display: grid; align-content: start; }
.contact-list li {
  display: grid; grid-template-columns: 40px 1fr; gap: 14px;
  padding: 20px 0;
  border-top: 1px solid var(--hairline);
}
.contact-list li:first-child { border-top: 0; padding-top: 4px; }
.contact-icon {
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center;
  color: var(--accent-ink);
  background: var(--accent-soft);
}
.contact-label { display: block; font-size: 0.8125rem; font-weight: 600; color: var(--text-3); margin-bottom: 4px; }
.contact-list address { font-size: 1.1875rem; line-height: 1.4; letter-spacing: -0.015em; font-weight: 500; margin-bottom: 6px; }
.contact-value {
  display: block; width: fit-content;
  font-size: 1.1875rem; font-weight: 500; letter-spacing: -0.015em;
  text-decoration: none; padding: 2px 0;
  overflow-wrap: anywhere;
}
.contact-value:hover { color: var(--accent-ink); }
.contact-list .text-link { font-size: 0.9375rem; }
@media (max-width: 860px) { .contact-card { grid-template-columns: 1fr; } }

/* ---------- footer ---------- */
.footer { padding: 28px 0 calc(28px + env(safe-area-inset-bottom)); font-size: 0.8125rem; color: var(--text-2); border-top: 1px solid var(--hairline); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--text); }

.noscript { color: var(--text-2); }

/* ==========================================================================
   Sheet (Projekt-Ansicht)
   ========================================================================== */
.sheet { position: fixed; inset: 0; z-index: 80; }
.sheet[hidden] { display: none; }
.sheet-scrim {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.46);
  opacity: 0;
  will-change: opacity;
}
.sheet-scroller {
  position: absolute; inset: 0;
  overflow-y: auto; overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.sheet-panel {
  position: relative;
  width: min(1120px, calc(100% - 48px));
  min-height: calc(100% - 96px);
  margin: 48px auto;
  border-radius: var(--r-l);
  background: var(--surface);
  box-shadow: var(--shadow-2);
  overflow: clip;               /* clips corners without becoming a scroll container (keeps sticky close button working) */
  transform-origin: 0 0;
  will-change: transform;
}
.sheet-panel:focus { outline: none; }
.sheet-close {
  position: sticky; top: 16px; z-index: 3;
  float: right; margin: 16px 16px -52px 0;
}
.sheet-content { transition: opacity 180ms ease; }
.sheet-content.is-swapping { opacity: 0; }

.sheet-hero {
  display: block; width: 100%; padding: 0; border: 0; cursor: zoom-in;
  aspect-ratio: 16 / 10;
  background: var(--surface-2);
  overflow: hidden;
}
.sheet-hero img { width: 100%; height: 100%; object-fit: cover; }
.sheet-head {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 12px 24px;
  padding: clamp(24px, 4vw, 48px) clamp(20px, 4vw, 48px) clamp(20px, 3vw, 32px);
}
.sheet-title {
  font-size: clamp(2.25rem, 5.6vw, 4rem); line-height: 1.04; letter-spacing: -0.035em; font-weight: 700;
  overflow-wrap: anywhere;
}
.sheet-sub { margin-top: 8px; font-size: clamp(1.125rem, 2vw, 1.375rem); color: var(--text-2); letter-spacing: -0.015em; }
.sheet-meta { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.chip {
  display: inline-flex; align-items: center; min-height: 30px; padding: 0 12px;
  border-radius: 999px; font-size: 0.8125rem; font-weight: 600;
  background: var(--fill); color: var(--text-2);
  font-variant-numeric: tabular-nums;
}
.chip--tint { background: var(--t-soft); color: var(--t-ink); }
@media (max-width: 640px) {
  .sheet-head { grid-template-columns: 1fr; }
  .sheet-meta { justify-content: flex-start; }
}

/* justified gallery */
.jg { padding: 0 clamp(12px, 4vw, 48px) clamp(24px, 4vw, 48px); }
.jg-row { display: flex; gap: 8px; margin-bottom: 8px; }
.jg-item {
  position: relative; flex: none; padding: 0; border: 0; cursor: zoom-in;
  border-radius: 10px; overflow: hidden;
  background: var(--surface-2);
  transition: transform 200ms var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.jg-item:active { transform: scale(0.97); transition-duration: 80ms; }
.jg-item img { width: 100%; height: 100%; object-fit: cover; }
@media (hover: hover) {
  .jg-item img { transition: opacity 500ms ease, filter 300ms ease; }
  .jg-item:hover img { filter: brightness(1.06); }
}

/* pager */
.pager {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  padding: 8px clamp(12px, 4vw, 48px) clamp(28px, 4vw, 48px);
}
.pager a {
  display: flex; align-items: center; gap: 14px;
  padding: 10px; border-radius: 18px;
  text-decoration: none; color: inherit;
  background: var(--surface-2);
  min-width: 0;
  transition: transform 200ms var(--ease-out), background-color 200ms ease;
  -webkit-tap-highlight-color: transparent;
}
.pager a:active { transform: scale(0.98); transition-duration: 80ms; }
.pager a:hover { background: var(--fill); }
.pager .next { flex-direction: row-reverse; text-align: right; }
.pager-thumb { flex: none; width: 72px; aspect-ratio: 3 / 2; border-radius: 10px; overflow: hidden; background: var(--fill); }
.pager-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pager-text { min-width: 0; }
.pager-label { display: block; font-size: 0.75rem; font-weight: 600; color: var(--text-3); }
.pager-name { display: block; font-weight: 650; letter-spacing: -0.015em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 560px) {
  .pager-thumb { display: none; }
  .pager a { padding: 14px 16px; }
}

@media (max-width: 700px) {
  .sheet-panel {
    width: 100%;
    margin: calc(env(safe-area-inset-top) + 10px) 0 0;
    min-height: calc(100% - 10px);
    border-radius: 16px 16px 0 0;
  }
  .sheet-close { top: 12px; margin: 12px 12px -48px 0; }
}

/* ==========================================================================
   Lightbox
   ========================================================================== */
.lightbox { position: fixed; inset: 0; z-index: 100; touch-action: none; user-select: none; -webkit-user-select: none; }
.lightbox[hidden] { display: none; }
.lb-bg { position: absolute; inset: 0; background: #000; opacity: 0; will-change: opacity; }
.lb-track { position: absolute; inset: 0; display: flex; will-change: transform; }
.lb-slide {
  position: relative; flex: 0 0 100%; height: 100%;
  display: grid; place-items: center;
  overflow: hidden;
}
.lb-frame { position: relative; will-change: transform; }
.lb-frame img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain;
  -webkit-user-drag: none; user-select: none; pointer-events: none;
}
.lb-frame .lb-hi { opacity: 0; transition: opacity 280ms ease; }
.lb-frame .lb-hi.is-loaded { opacity: 1; }
.lb-chrome { position: absolute; inset: 0; pointer-events: none; opacity: 0; will-change: opacity; }
.lb-chrome > * { pointer-events: auto; }
.lb-counter {
  position: absolute; top: calc(env(safe-area-inset-top) + 16px); left: 50%; transform: translateX(-50%);
  padding: 6px 12px; border-radius: 999px;
  font-size: 0.8125rem; font-weight: 600; color: rgba(255, 255, 255, 0.9);
  background: rgba(40, 40, 42, 0.5);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  font-variant-numeric: tabular-nums;
}
.lb-close { position: absolute; top: calc(env(safe-area-inset-top) + 12px); right: 12px; width: 40px; height: 40px; }
/* prev / next: plain vertical text at the screen edges ("Previous" reads upwards, "Next" downwards) */
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 56px; height: 200px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  padding: 0; border: 0; background: none; cursor: pointer;
  color: rgba(255, 255, 255, 0.72);
  font: inherit; font-size: 0.8125rem; font-weight: 500; letter-spacing: 0.02em;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
  transition: color 160ms ease, opacity 160ms ease;
}
.lb-nav-text { writing-mode: vertical-rl; white-space: nowrap; }
.lb-prev .lb-nav-text { transform: rotate(180deg); }
/* thin arrow above the word, pointing outwards — same spot on both sides; nudges outwards on hover */
.lb-nav-arrow { flex: none; filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.5)); transition: transform 200ms var(--ease-out, ease); }
.lb-prev:hover:not([disabled]) .lb-nav-arrow { transform: translateX(-3px); }
.lb-next:hover:not([disabled]) .lb-nav-arrow { transform: translateX(3px); }
.lb-prev { left: 12px; }
.lb-next { right: 12px; }
.lb-nav:hover:not([disabled]) { color: #fff; }
.lb-nav:focus-visible { outline: 2px solid #fff; outline-offset: -6px; border-radius: 8px; }
.lb-nav[disabled] { opacity: 0.25; cursor: default; }
@media (pointer: coarse) { .lb-nav { display: none; } }

/* ==========================================================================
   Accessibility preferences
   ========================================================================== */
@media (prefers-reduced-transparency: reduce) {
  .nav, .menu-sheet, .icon-btn--glass { background: var(--surface); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .nav[data-over-hero="true"] { background: rgba(0, 0, 0, 0.6); }
  .hero-bar > .hero-actions, .hero-bar > .hero-slides, .nav[data-over-hero="true"] .nav-island { background: rgba(0, 0, 0, 0.55); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .notice { background: #1c1c1e; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .btn-glass, .service-more, .card-badge { background: rgba(0, 0, 0, 0.7); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (prefers-contrast: more) {
  .nav { background: var(--surface); }
  .notice { background: #000; box-shadow: inset 0 0 0 1px #fff; }
}

/* ==========================================================================
   Photo-derived tints (each project carries its cover's colour)
   ========================================================================== */
.card-media { background: var(--t-bg, var(--surface-2)); }
@media (hover: hover) {
  .card:hover .card-media { box-shadow: 0 26px 50px -26px var(--t-glow, transparent), var(--shadow-1); }
}
.card:focus-visible { outline-color: var(--t-ink, var(--focus)); }
.sheet-panel.tint {
  background: color-mix(in oklch, var(--surface) 95%, oklch(0.62 var(--t-c) var(--t-h)));
}
.sheet-panel .eyebrow { color: var(--t-ink, var(--accent-ink)); }
.sheet-hero, .jg-item, .pager-thumb { background: var(--t-bg, var(--surface-2)); }
.lb-bg { transition: background-color 450ms ease; }

/* brand mark (adaptive SVG triangle, tinted with the palette) */
.brand-mark { width: 30px; height: auto; flex: none; }
svg.brand-mark .mark-fill { fill: var(--accent); }
.nav[data-over-hero="true"] svg.brand-mark .mark-fill { fill: oklch(0.82 calc(var(--accent-c) * 1.4) var(--accent-h)); }

/* ==========================================================================
   Language switch + appearance menu
   ========================================================================== */
.nav-tools { display: flex; align-items: center; gap: 6px; }
.lang-switch {
  display: inline-flex; padding: 2px; border-radius: 999px;
  background: var(--fill);
}
.nav[data-over-hero="true"] .lang-switch { background: rgba(255, 255, 255, 0.16); }
.lang-switch button {
  min-width: 36px; min-height: 30px; padding: 0 8px;
  border: 0; border-radius: 999px; background: none; cursor: pointer;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.04em; color: inherit; opacity: 0.7;
  transition: background-color 200ms ease, opacity 200ms ease, color 200ms ease;
}
.lang-switch button:hover { opacity: 1; }
.lang-switch button[aria-pressed="true"] { opacity: 1; background: var(--seg-thumb); color: var(--text); box-shadow: 0 1px 3px oklch(0 0 0 / 0.12); }

.theme-btn {
  width: 40px; height: 40px; border: 0; border-radius: 50%; background: none; cursor: pointer; color: inherit;
  display: grid; place-items: center;
  transition: background-color 200ms ease, transform 160ms var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.theme-btn:hover { background: var(--fill); }
.nav[data-over-hero="true"] .theme-btn:hover { background: rgba(255, 255, 255, 0.14); }
.theme-btn:active { transform: scale(0.92); }
.theme-btn > svg { grid-area: 1 / 1; transition: opacity 220ms ease, transform 420ms var(--ease-out); }
.theme-btn[data-mode="light"] .i-dark,
.theme-btn[data-mode="dark"] .i-light { opacity: 0; transform: rotate(-90deg) scale(0.55); }
@media (prefers-reduced-motion: reduce) { .theme-btn > svg { transition: opacity 150ms ease; transform: none !important; } }

.menu-tools {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 6px; padding: 12px 10px 6px 16px;
  border-top: 1px solid var(--hairline);
  font-size: 0.875rem; color: var(--text-2);
}
.menu-tools .lang-switch { background: var(--fill); }

@media (max-width: 760px) {
  .nav-tools .lang-switch { display: none; }
}

/* nav layout with tools */
/* menu + language + appearance share one island: a plain rectangle of lightly frosted glass */
/* the islands on the right (and the hero headline) sit this far from the screen's right edge, at every width */
:root { --island-edge: 14px; }
.nav-inner { padding-right: var(--island-edge); }
.nav-island {
  display: flex; align-items: center; gap: 4px;
  margin-left: auto; padding: 4px;
  background: color-mix(in oklch, var(--surface) 55%, transparent);
  box-shadow: inset 0 0 0 1px var(--hairline);
  transition: background-color 360ms ease, box-shadow 360ms ease;
}
.nav[data-over-hero="true"] .nav-island {
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
  -webkit-backdrop-filter: blur(8px) saturate(140%);
  backdrop-filter: blur(8px) saturate(140%);
}
.nav-island .nav-links a, .nav-island .lang-switch, .nav-island .lang-switch button,
.nav-island .theme-btn, .nav-island .nav-menu-btn { border-radius: 0; }
.nav-island .theme-btn { width: 36px; height: 36px; }
.nav-island .nav-menu-btn { width: 40px; height: 40px; margin-right: 0; }
.nav-island .nav-tools { gap: 4px; }
.brand-mark-slot { display: inline-flex; color: inherit; }
.brand-mark-slot--small .brand-mark { width: 22px; }
.footer-brand { color: var(--text-2); }

/* header logo: "Lki ARCHITEKTUR" artwork (assets/brand/lki-logo.png, transparent mask, pre-emboldened).
   Script "Lki" (top 86%) = headline colour (--accent); "ARCHITEKTUR" = current nav text colour.
   The bar is taller than the default so the larger logo sits a little lower and still fits inside it. */
.brand-logo {
  display: block; flex: none;
  height: 58px; aspect-ratio: 480 / 185;
  background: linear-gradient(to bottom, var(--accent) 0 86%, currentColor 86% 100%);
  -webkit-mask: url("/assets/brand/lki-logo.png") center / contain no-repeat;
          mask: url("/assets/brand/lki-logo.png") center / contain no-repeat;
}
:root { --nav-h: 70px; }
.nav .brand { align-self: flex-start; padding-top: 10px; }
@media (max-width: 760px) {
  :root { --nav-h: 58px; }
  .brand-logo { height: 46px; }
  .nav .brand { padding-top: 8px; }
}

/* headline "LKI-Architektur": logo script "Lki" (assets/brand/lki-script.png) + "Architektur", one line */
.hero-title.has-lki-art {
  display: flex; align-items: baseline; gap: 0.2em;
  max-width: none; white-space: nowrap;
}
.lki-art {
  flex: none; position: relative; top: 0.27em;   /* script baseline (~82% down) sits on the text baseline */
  height: 1.55em; aspect-ratio: 1000 / 331;
  background: currentColor;
  -webkit-mask: url("/assets/brand/lki-script.png") center / contain no-repeat;
          mask: url("/assets/brand/lki-script.png") center / contain no-repeat;
}
@media (max-width: 760px) {
  .hero-title.has-lki-art { font-size: min(2.4rem, 9vw); }
}

/* headline removed from view: the logo carries the name. The h1 stays in the markup (visually hidden)
   for screen readers and search engines; the subtitle now sits directly above the buttons. */
.hero-title {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.hero-lede { margin-bottom: 0; }

/* header logo: larger while it sits over the hero photo, back to the bar size once the page scrolls */
.brand-logo { transition: height 360ms ease; }
.nav[data-over-hero="true"] .brand-logo { height: 68px; }
@media (max-width: 760px) {
  .nav[data-over-hero="true"] .brand-logo { height: 54px; }
}

/* hero subtitle on one line (app.js fitLede() shrinks it when it would not fit) */
.hero-copy { min-width: 0; }
.hero-lede { white-space: nowrap; max-width: none; }
