/* ==========================================================================
   Konrath Bau GmbH — UI based on the Apple Human Interface Guidelines
   - System font stack (SF Pro on Apple devices, no third-party font requests)
   - HIG type scale, semantic system colors, light + dark appearance
   - 44 × 44 pt minimum hit targets, visible focus, reduced motion
   ========================================================================== */

:root {
  color-scheme: light dark;

  /* Brand tint (used sparingly, like an app's accent color) */
  /* Accent colors taken from the Baumeister logo: red #D5031E, black #1F1F1E */
  --tint: #d5031e;            /* Baumeister red, 5.4:1 on white */
  --tint-pressed: #b0021a;
  --tint-fill: rgba(213, 3, 30, .07);
  --ink: #1f1f1e;             /* Baumeister black — primary buttons */
  --ink-hover: #3a3a3c;
  --on-ink: #fff;
  --brand-red: #d5031e;
  --brand-blue: #1356aa;

  /* Semantic system colors (iOS light) */
  --label: #000;
  --label-2: rgba(60, 60, 67, .85);   /* secondaryLabel, darkened for AA body text */
  --label-3: rgba(60, 60, 67, .74);   /* ≥4.5:1 on white and grouped background */
  --separator: rgba(60, 60, 67, .22);
  --fill: rgba(120, 120, 128, .12);
  --bg: #fff;
  --bg-grouped: #f2f2f7;
  --bg-elevated: #fff;
  --bg-bar: rgba(255, 255, 255, .72);
  --green: #248a3d;
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 24px rgba(0, 0, 0, .06);
  --seg-on: #fff;
  --salary-bg: #f2f2f7;
  --footer-bg: #f2f2f7;

  /* Layout */
  --max: 1080px;
  --gutter: 20px;
  --radius-s: 10px;
  --radius: 18px;
  --radius-l: 28px;
  --bar-h: 52px;

  /* Type */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", system-ui,
          "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.25, .1, .25, 1);
}

/* Dark appearance: follows the system ("Automatisch") unless the visitor
   picked "Hell" or "Dunkel" — see the appearance menu in assets/js/app.js */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --tint: #ff5a66;
    --tint-pressed: #ff7f88;
    --tint-fill: rgba(255, 90, 102, .12);
    --ink: #f5f5f7;
    --ink-hover: #ffffff;
    --on-ink: #1f1f1e;
    --brand-red: #ff5a66;
    --brand-blue: #6aa5ff;
    --label: #fff;
    --label-2: rgba(235, 235, 245, .82);
    --label-3: rgba(235, 235, 245, .6);
    --separator: rgba(84, 84, 88, .65);
    --fill: rgba(120, 120, 128, .24);
    --bg: #000;
    --bg-grouped: #000;
    --bg-elevated: #1c1c1e;
    --bg-bar: rgba(22, 22, 23, .72);
    --green: #30d158;
    --shadow: none;
    --seg-on: #636366;
    --salary-bg: #2c2c2e;
    --footer-bg: #161617;
  }
}
:root[data-theme="dark"] {
  --tint: #ff5a66;
  --tint-pressed: #ff7f88;
  --tint-fill: rgba(255, 90, 102, .12);
  --ink: #f5f5f7;
  --ink-hover: #ffffff;
  --on-ink: #1f1f1e;
  --brand-red: #ff5a66;
  --brand-blue: #6aa5ff;
  --label: #fff;
  --label-2: rgba(235, 235, 245, .82);
  --label-3: rgba(235, 235, 245, .6);
  --separator: rgba(84, 84, 88, .65);
  --fill: rgba(120, 120, 128, .24);
  --bg: #000;
  --bg-grouped: #000;
  --bg-elevated: #1c1c1e;
  --bg-bar: rgba(22, 22, 23, .72);
  --green: #30d158;
  --shadow: none;
  --seg-on: #636366;
  --salary-bg: #2c2c2e;
  --footer-bg: #161617;
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--bar-h) + 12px); }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;              /* HIG Body */
  line-height: 1.47;
  letter-spacing: -.022em;
  color: var(--label);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul { padding: 0; list-style: none; }

a { color: var(--tint); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: .15em; }

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand-blue) 70%, transparent);
  outline-offset: 2px;
  border-radius: 6px;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 2000;
  background: var(--bg-elevated); color: var(--label);
  padding: 10px 16px; border-radius: var(--radius-s); box-shadow: var(--shadow);
}
.skip-link:focus { top: 12px; }

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

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

/* ---------- HIG type scale ---------- */
.large-title { font-size: clamp(34px, 5.4vw, 56px); line-height: 1.06; font-weight: 700; letter-spacing: -.028em; }
.title-1     { font-size: clamp(28px, 4vw, 44px); line-height: 1.1;  font-weight: 700; letter-spacing: -.025em; }
.title-2     { font-size: 22px; line-height: 1.2; font-weight: 700; letter-spacing: -.018em; }
.title-3     { font-size: 20px; line-height: 1.25; font-weight: 600; letter-spacing: -.016em; }
.headline    { font-size: 17px; font-weight: 600; }
.subhead     { font-size: 15px; line-height: 1.4; }
.footnote    { font-size: 13px; line-height: 1.38; letter-spacing: -.006em; }
.caption     { font-size: 12px; line-height: 1.33; letter-spacing: 0; }
.eyebrow     { font-size: 15px; font-weight: 600; color: var(--label-2); margin-bottom: 8px; }
.lede        { font-size: clamp(19px, 2.2vw, 24px); line-height: 1.4; color: var(--label-2); letter-spacing: -.02em; }
.secondary   { color: var(--label-2); }

/* ---------- Navigation bar (translucent material) ---------- */
.navbar {
  position: sticky; top: 0; z-index: 1000;
  background: var(--bg-bar);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: .5px solid var(--separator);
}
.navbar .wrap { display: flex; align-items: center; justify-content: space-between; height: var(--bar-h); }

.brand { display: flex; align-items: center; gap: 10px; color: var(--label); min-height: 44px; }
.brand:hover { text-decoration: none; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.brand-name { font-size: 15px; font-weight: 700; letter-spacing: .02em; line-height: 1.05; }
.brand-name b { color: var(--brand-red); font-weight: 800; }
.brand-name span { display: block; font-size: 11px; font-weight: 600; color: var(--brand-blue); letter-spacing: .08em; }

.nav-links { display: flex; gap: 4px; }
.nav-links a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px;
  font-size: 14px; color: var(--label-2); border-radius: 8px;
}
.nav-links a:hover { color: var(--label); text-decoration: none; }
.nav-links a[aria-current="page"] { color: var(--label); font-weight: 600; }

.nav-toggle {
  display: none; width: 44px; height: 44px; margin-right: -10px;
  border: 0; background: none; color: var(--label); cursor: pointer; border-radius: 10px;
}
.nav-toggle svg { width: 22px; height: 22px; }
.nav-toggle .i-close { display: none; }
.navbar.open .nav-toggle .i-menu { display: none; }
.navbar.open .nav-toggle .i-close { display: block; }

@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav-links {
    position: absolute; left: 0; right: 0; top: var(--bar-h);
    flex-direction: column; gap: 0; padding: 8px var(--gutter) 20px;
    background: var(--bg-bar);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border-bottom: .5px solid var(--separator);
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity .2s var(--ease), transform .2s var(--ease), visibility 0s .2s;
  }
  .navbar.open .nav-links {
    visibility: visible; opacity: 1; transform: none;
    transition: opacity .2s var(--ease), transform .2s var(--ease);
  }
  .nav-links a {
    font-size: 24px; font-weight: 600; color: var(--label); padding: 0 4px;
    min-height: 52px; border-bottom: .5px solid var(--separator); border-radius: 0;
  }
  .nav-links li:last-child a { border-bottom: 0; }
  .nav-links a[aria-current="page"] { color: var(--tint); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 22px; border-radius: 980px; border: 0;
  font: 600 17px/1 var(--font); letter-spacing: -.02em; cursor: pointer;
  transition: background-color .15s var(--ease), transform .1s var(--ease);
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(.97); }
.btn-filled { background: var(--ink); color: var(--on-ink); }
.btn-filled:hover { background: var(--ink-hover); color: var(--on-ink); }
.btn-tinted { background: var(--tint-fill); color: var(--tint); }
.btn-tinted:hover { background: color-mix(in srgb, var(--tint) 18%, transparent); }
.btn-plain { background: none; color: var(--tint); padding: 0 8px; }
.btn-plain:hover { text-decoration: underline; }
.btn-small { min-height: 36px; padding: 0 16px; font-size: 15px; }   /* still ≥44 pt with surrounding hit area */
.chev::after { content: "›"; font-size: 1.15em; line-height: 0; margin-left: 2px; }

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section-grouped { background: var(--bg-grouped); }
.section-head { max-width: 720px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head .lede { margin-top: 16px; }

/* ---------- Hero ---------- */
.hero { padding: clamp(48px, 8vw, 104px) 0 0; text-align: center; overflow: hidden; }
.hero .eyebrow { color: var(--label-2); font-weight: 500; }
.hero h1 { max-width: 880px; margin: 0 auto; }
.hero h1 em { font-style: normal; color: var(--tint); }   /* Baumeister red */
.hero .lede { max-width: 640px; margin: 20px auto 0; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 20px; margin-top: 32px; }
.hero-media {
  margin: clamp(40px, 6vw, 72px) auto 0; max-width: 1240px; padding: 0 var(--gutter);
}
.hero-media img {
  width: 100%; aspect-ratio: 16 / 8; object-fit: cover;
  border-radius: var(--radius-l);
}

.stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
  max-width: 760px; margin: 48px auto 0; padding-bottom: clamp(56px, 8vw, 96px);
}
.stat { padding: 0 12px; }
.stat + .stat { border-left: .5px solid var(--separator); }
.stat-num { display: block; font-size: clamp(28px, 4vw, 40px); font-weight: 700; letter-spacing: -.025em; line-height: 1.1; }
.stat-lbl { display: block; margin-top: 4px; font-size: 13px; color: var(--label-2); }

/* ---------- Tiles (services) ---------- */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tile {
  background: var(--bg-elevated); border-radius: var(--radius); padding: 28px;
  box-shadow: var(--shadow);
}
.tile-icon {
  width: 44px; height: 44px; border-radius: 12px; margin-bottom: 18px;
  display: grid; place-items: center; background: var(--tint-fill); color: var(--tint);
}
.tile-icon svg { width: 24px; height: 24px; }
.tile h3 { margin-bottom: 6px; }
.tile p { color: var(--label-2); font-size: 15px; line-height: 1.45; }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.person { display: flex; align-items: center; gap: 16px; margin-top: 28px; }
.person img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.person .headline { display: block; }
.about-body p + p { margin-top: 1em; }
.about-body p { color: var(--label-2); }

/* ---------- Grouped list (inset grouped table) ---------- */
.list {
  background: var(--bg-elevated); border-radius: var(--radius-s);
  overflow: hidden; box-shadow: var(--shadow);
}
.list-header { font-size: 13px; text-transform: uppercase; letter-spacing: .02em; color: var(--label-3); margin: 0 16px 8px; }
.list-footer { font-size: 13px; color: var(--label-3); margin: 8px 16px 0; }
.row {
  display: flex; align-items: center; gap: 12px; min-height: 44px;
  padding: 11px 16px; position: relative; color: var(--label);
}
.row + .row::before {
  content: ""; position: absolute; top: 0; right: 0; left: 16px;
  border-top: .5px solid var(--separator);
}
.row-icon + .row-text { flex: 1; }
.list .row.has-icon + .row.has-icon::before { left: 56px; }
a.row:hover { text-decoration: none; background: var(--fill); }
a.row::after { content: "›"; margin-left: auto; color: var(--label-3); font-size: 22px; line-height: 1; padding-left: 8px; }
.row-icon {
  flex: 0 0 28px; width: 28px; height: 28px; border-radius: 7px;
  display: grid; place-items: center; color: #fff; background: var(--tint);
}
.row-icon svg { width: 17px; height: 17px; }
.row-icon.blue { background: #0a7aff; }
.row-icon.green { background: #28a745; }
.row-icon.gray { background: #8e8e93; }
.row-text { flex: 1; min-width: 0; }
.row-detail { color: var(--label-2); margin-left: auto; text-align: right; }
.row-text small { display: block; font-size: 13px; color: var(--label-2); }

.refs { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.refs .row { font-size: 15px; align-items: flex-start; }
.refs .row::marker { content: none; }

details.more > summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center;
  min-height: 44px; margin-top: 12px; color: var(--tint); font-weight: 600;
}
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::after { content: "›"; margin-left: 6px; font-size: 1.2em; transition: transform .2s var(--ease); }
details.more[open] > summary::after { transform: rotate(90deg); }
details.more[open] > summary .when-closed, details.more:not([open]) > summary .when-open { display: none; }

/* ---------- Horizontal shelf (scroll-snap carousel) ---------- */
.shelf-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.shelf {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(280px, 32%);
  gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 4px var(--gutter) 24px; margin: 0 calc(var(--gutter) * -1);
  scrollbar-width: none; overscroll-behavior-x: contain;
}
.shelf::-webkit-scrollbar { display: none; }
.shelf > * { scroll-snap-align: start; scroll-margin-left: var(--gutter); }

/* ---------- Project cards ---------- */
.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--bg-elevated); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); color: var(--label);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.card:hover { text-decoration: none; }
@media (hover: hover) { .card:hover { box-shadow: 0 1px 2px rgba(0,0,0,.05), 0 10px 30px rgba(0,0,0,.09); } }
.card-media { position: relative; aspect-ratio: 4 / 3; background: var(--fill); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-count {
  position: absolute; right: 12px; bottom: 12px; padding: 4px 10px; border-radius: 980px;
  font-size: 12px; font-weight: 600; color: #fff; background: rgba(0, 0, 0, .55);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.card-body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-tag { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--label-3); }
.card-body h3 { font-size: 19px; line-height: 1.25; font-weight: 600; letter-spacing: -.016em; }
.card-body p { font-size: 15px; line-height: 1.45; color: var(--label-2); }
/* Whole card is one button; stretch its hit area over the card */
.card-open { all: unset; cursor: pointer; }
.card-open::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.card-open:focus-visible::after { outline: 3px solid color-mix(in srgb, var(--brand-blue) 70%, transparent); outline-offset: -3px; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card[hidden] { display: none; }

/* ---------- Segmented control ---------- */
.toolbar { display: flex; justify-content: center; margin-bottom: 32px; position: sticky; top: calc(var(--bar-h) + 10px); z-index: 10; }
.segmented {
  display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px;
  padding: 2px; border-radius: 9px; background: var(--fill);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  max-width: 100%;
}
.segmented button {
  all: unset; box-sizing: border-box; cursor: pointer; text-align: center;
  min-height: 32px; padding: 6px 14px; border-radius: 7px;
  font-size: 13px; font-weight: 500; color: var(--label); white-space: nowrap;
  transition: background-color .2s var(--ease), box-shadow .2s var(--ease);
}
.segmented button[aria-pressed="true"] {
  background: var(--seg-on); font-weight: 600;
  box-shadow: 0 3px 8px rgba(0,0,0,.12), 0 3px 1px rgba(0,0,0,.04);
}
.segmented button:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand-blue) 70%, transparent); }
/* the toolbar background keeps the control readable while it floats over cards */
.toolbar .segmented { background: color-mix(in srgb, var(--bg-grouped) 82%, transparent); box-shadow: 0 0 0 .5px var(--separator); }
.result-count { text-align: center; margin: -16px 0 24px; }

/* ---------- Sheet / lightbox (native <dialog>) ---------- */
dialog.sheet {
  width: min(960px, calc(100vw - 32px)); max-height: calc(100dvh - 48px);
  padding: 0; border: 0; border-radius: var(--radius); overflow: hidden;
  background: var(--bg-elevated); color: var(--label);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .35);
}
dialog.sheet::backdrop { background: rgba(0, 0, 0, .45); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
dialog.sheet[open] { animation: sheet-in .32s var(--ease); }
@keyframes sheet-in { from { opacity: 0; transform: translateY(24px) scale(.98); } }
.sheet-inner { display: flex; flex-direction: column; max-height: calc(100dvh - 48px); }
.sheet-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 8px 8px 20px; border-bottom: .5px solid var(--separator);
}
.sheet-bar h2 { font-size: 17px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-btn {
  flex: 0 0 44px; width: 44px; height: 44px; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: none; color: var(--label-2); cursor: pointer;
}
.icon-btn span { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--fill); }
.icon-btn svg { width: 14px; height: 14px; }
.sheet-scroll { overflow-y: auto; }
.gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; background: #000; scrollbar-width: none; }
.gallery::-webkit-scrollbar { display: none; }
.gallery img { flex: 0 0 100%; width: 100%; max-height: 62dvh; object-fit: scale-down; scroll-snap-align: center; }
.gallery-nav { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 0 0; }
.gallery-nav[hidden] { display: none; }
.dot { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%; background: var(--label-3); opacity: .45; cursor: pointer; position: relative; }
.dot::after { content: ""; position: absolute; inset: -18px -6px; } /* 44 pt hit area */
.dot[aria-current="true"] { opacity: 1; background: var(--label); }
.sheet-text { padding: 16px 24px 28px; }
.sheet-text .card-tag { display: block; margin-bottom: 6px; }
.sheet-text p { color: var(--label-2); max-width: 680px; }

@media (max-width: 600px) {
  dialog.sheet {
    width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 14px 14px 0 0;
    max-height: calc(100dvh - 24px);
  }
  dialog.sheet[open] { animation-name: sheet-up; }
  @keyframes sheet-up { from { transform: translateY(100%); } }
}

/* ---------- Map (click-to-load, no third-party request before) ---------- */
.contact { display: grid; grid-template-columns: 5fr 7fr; gap: 24px; align-items: stretch; }
.map {
  position: relative; min-height: 360px; border-radius: var(--radius); overflow: hidden;
  background: var(--bg-elevated); box-shadow: var(--shadow);
}
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map-consent {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; padding: 24px; text-align: center;
  background:
    repeating-linear-gradient(0deg, transparent 0 47px, color-mix(in srgb, var(--fill) 45%, transparent) 47px 48px),
    repeating-linear-gradient(90deg, transparent 0 47px, color-mix(in srgb, var(--fill) 45%, transparent) 47px 48px);
}
.map-consent .pin { width: 36px; height: 36px; color: var(--tint); }
.map-consent p { max-width: 360px; }
.map-consent label { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 13px; color: var(--label-2); cursor: pointer; }
.map-consent input { width: 18px; height: 18px; accent-color: var(--tint); }

/* ---------- Page header (inner pages) ---------- */
.page-head { padding: clamp(48px, 8vw, 96px) 0 clamp(32px, 5vw, 56px); }
.page-head .lede { margin-top: 16px; max-width: 720px; }

/* ---------- Jobs ---------- */
.jobs { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.job { background: var(--bg-elevated); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.pill { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 980px; background: var(--fill); color: var(--label-2); }
.pill.tint { background: var(--tint-fill); color: var(--tint); }
.job > p { color: var(--label-2); margin-top: 8px; }
.job h3.list-header { margin: 24px 0 8px; }
.checks li { display: flex; gap: 10px; padding: 6px 0; font-size: 15px; }
.checks li::before {
  content: ""; flex: 0 0 16px; height: 16px; margin-top: 3px;
  background: var(--tint);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3.2 3.2L13 4.8' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3.2 3.2L13 4.8' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat;
}
.salary { margin: 24px 0; padding: 14px 16px; border-radius: var(--radius-s); background: var(--salary-bg); font-size: 15px; color: var(--label-2); }
.salary strong { display: block; font-size: 20px; color: var(--label); letter-spacing: -.016em; }
.job .btn { margin-top: auto; align-self: flex-start; }

/* ---------- Legal ---------- */
.legal { max-width: 760px; }
.legal section + section { margin-top: 48px; }
.legal h2 { margin-bottom: 16px; }
.legal h3 { font-size: 17px; font-weight: 600; margin: 24px 0 6px; }
.legal p, .legal li { color: var(--label-2); }
.legal p + p { margin-top: .8em; }
.legal ul.bullets { list-style: disc; padding-left: 1.2em; margin-top: .5em; }
.legal ul.bullets li + li { margin-top: .3em; }
.legal .list { margin-top: 8px; }

/* ---------- Footer ---------- */
.footer { background: var(--footer-bg); border-top: .5px solid var(--separator); padding: 40px 0 28px; font-size: 13px; color: var(--label-2); }
.footer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; padding-bottom: 24px; border-bottom: .5px solid var(--separator); }
.footer h2 { font-size: 13px; font-weight: 600; color: var(--label); margin-bottom: 8px; }
.footer li { line-height: 1.4; }
.footer li a, .footer address a { display: inline-flex; align-items: center; min-height: 32px; color: var(--label-2); }
.footer a:hover { color: var(--label); }
.footer address { font-style: normal; line-height: 1.7; }
.footer-legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-top: 16px; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .tiles, .grid { grid-template-columns: repeat(2, 1fr); }
  .shelf { grid-auto-columns: minmax(280px, 46%); }
  .about, .contact { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .tiles, .grid, .jobs, .refs, .footer-grid { grid-template-columns: 1fr; }
  .tiles { gap: 12px; }
  .tile { padding: 22px; display: grid; grid-template-columns: 44px 1fr; column-gap: 16px; }
  .tile-icon { margin: 0; grid-row: span 2; }
  .shelf { grid-auto-columns: 82%; }
  .hero-media img { aspect-ratio: 4 / 3; border-radius: var(--radius); }
  .stat-lbl { font-size: 12px; }
  .segmented button { padding: 6px 10px; }
  .toolbar { justify-content: flex-start; overflow-x: auto; margin: 0 calc(var(--gutter) * -1) 28px; padding: 0 var(--gutter); scrollbar-width: none; }
  .toolbar::-webkit-scrollbar { display: none; }
  .job { padding: 22px; }
}

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

@media print {
  .navbar, .footer, .toolbar, .map, .hero-actions { display: none !important; }
  body { font-size: 12pt; color: #000; background: #fff; }
}

/* Clamp card copy in grids; the full text is shown in the sheet */
.card-body p { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.stats .stat { margin: 0; text-align: center; }

/* Shelf paddles (pointer devices only; touch users swipe) */
.paddles { display: flex; gap: 8px; }
.paddle {
  width: 36px; height: 36px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; background: var(--fill); color: var(--label);
  font-size: 22px; line-height: 1; position: relative;
}
.paddle::after { content: ""; position: absolute; inset: -4px; }
.paddle:disabled { opacity: .35; cursor: default; }
@media (hover: none) { .paddles { display: none; } }

/* Edge-to-edge shelves use negative margins; clip sub-pixel overflow */
main { overflow-x: clip; }
@media (max-width: 640px) { .stat-num { font-size: 24px; } .stat { padding: 0 6px; } }

/* Mobile menu: near-opaque material so page content never competes with the menu */
@media (max-width: 760px) {
  .nav-links { background: var(--bg); min-height: calc(100dvh - var(--bar-h)); }
  .nav-links li { width: 100%; }
  .nav-links a { display: flex; width: 100%; }
}

/* ---------- Appearance menu (Automatisch / Hell / Dunkel) ---------- */
.nav-end { display: flex; align-items: center; gap: 4px; }
.appearance { position: relative; }
.nav-icon-btn {
  width: 44px; height: 44px; display: grid; place-items: center;
  border: 0; border-radius: 10px; background: none; color: var(--label-2); cursor: pointer;
}
.nav-icon-btn:hover, .nav-icon-btn[aria-expanded="true"] { color: var(--label); background: var(--fill); }
.nav-icon-btn svg { width: 20px; height: 20px; grid-area: 1 / 1; display: none; }
:root:not([data-theme]) .nav-icon-btn .i-auto,
:root[data-theme="light"] .nav-icon-btn .i-light,
:root[data-theme="dark"] .nav-icon-btn .i-dark { display: block; }

.menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 1100; width: 230px; padding: 6px;
  border-radius: 13px; background: color-mix(in srgb, var(--bg-elevated) 82%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(30px); backdrop-filter: saturate(180%) blur(30px);
  box-shadow: 0 0 0 .5px var(--separator), 0 10px 40px rgba(0, 0, 0, .2);
  transform-origin: top right; animation: menu-in .18s var(--ease);
}
.menu[hidden] { display: none; }
@keyframes menu-in { from { opacity: 0; transform: scale(.94); } }
.menu-title { font-size: 13px; color: var(--label-3); padding: 6px 10px 4px 36px; }
.menu button {
  all: unset; box-sizing: border-box; width: 100%; min-height: 44px; padding: 0 10px;
  display: grid; grid-template-columns: 18px 1fr 20px; align-items: center; gap: 8px;
  border-radius: 8px; font-size: 15px; color: var(--label); cursor: pointer;
}
.menu button svg { width: 18px; height: 18px; color: var(--label-2); }
.menu button .menu-check { visibility: hidden; color: var(--tint); }
.menu button[aria-checked="true"] .menu-check { visibility: visible; }
.menu button:hover, .menu button:focus-visible { background: var(--fill); outline: none; }

/* Separators for lists whose rows are wrapped in <li> (row + row only covers direct siblings) */
.list > li + li > .row::before {
  content: ""; position: absolute; top: 0; right: 0; left: 16px;
  border-top: .5px solid var(--separator);
}
.list > li + li > .row.has-icon::before { left: 56px; }

/* ---------- Contact card (iOS Contacts pattern) ---------- */
.contact-card {
  background: var(--bg-elevated); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 24px; display: flex; flex-direction: column; gap: 20px;
}
.cc-head { display: flex; align-items: center; gap: 14px; }
.cc-head img { width: 56px; height: 56px; border-radius: 14px; box-shadow: 0 0 0 .5px var(--separator); }
.cc-head p { margin-top: 2px; }

.cc-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cc-action {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-height: 60px; border-radius: 12px; background: var(--tint-fill); color: var(--tint);
  font-size: 12px; font-weight: 600; letter-spacing: 0;
  transition: background-color .15s var(--ease), transform .1s var(--ease);
}
.cc-action svg { width: 22px; height: 22px; }
.cc-action:hover { text-decoration: none; background: color-mix(in srgb, var(--tint) 18%, transparent); }
.cc-action:active { transform: scale(.96); }

.cc-fields { border-radius: 12px; background: var(--bg-grouped); overflow: hidden; }
:root[data-theme="dark"] .cc-fields { background: #2c2c2e; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cc-fields { background: #2c2c2e; } }
.cc-fields li { position: relative; }
.cc-fields li + li::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; border-top: .5px solid var(--separator); }
.cc-field {
  display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 12px;
  min-height: 44px; padding: 10px 16px; color: var(--label);
}
.cc-field:hover { text-decoration: none; background: var(--fill); }
.cc-field small { grid-column: 1 / -1; font-size: 13px; color: var(--label-2); line-height: 1.3; }
.cc-field > span:not(.sr-only) { font-size: 17px; line-height: 1.35; overflow-wrap: anywhere; }
.cc-field .cc-plain { color: var(--label); }
.cc-ext { width: 16px; height: 16px; color: var(--label-3); grid-column: 2; grid-row: 2; }
@media (max-width: 640px) { .contact-card { padding: 20px 16px; } }

/* ---------- Service icons: light line glyph on a soft tinted tile ---------- */
.tile .tile-icon {
  width: 56px; height: 56px; border-radius: 14px; margin-bottom: 20px;
  color: var(--tint); background: var(--tint-fill);
}
.tile .tile-icon svg { width: 28px; height: 28px; stroke-width: 1.5; }
@media (max-width: 640px) {
  .tile { grid-template-columns: 56px 1fr; }
  .tile .tile-icon { margin: 0; }
}

/* ---------- Gallery overlay arrows (Photos-style) ---------- */
.gallery-wrap { position: relative; }
.gallery:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand-blue) 70%, transparent); outline-offset: -3px; border-radius: 0; }
.gallery-arrow {
  position: absolute; top: 50%; translate: 0 -50%; z-index: 1;
  width: 44px; height: 44px; border: 0; border-radius: 50%; padding: 0 0 3px; cursor: pointer;
  display: grid; place-items: center;
  font: 400 30px/1 var(--font); color: #fff;
  background: rgba(30, 30, 30, .45);
  -webkit-backdrop-filter: saturate(180%) blur(16px); backdrop-filter: saturate(180%) blur(16px);
  box-shadow: 0 0 0 .5px rgba(255, 255, 255, .15), 0 2px 10px rgba(0, 0, 0, .2);
  transition: opacity .2s var(--ease), background-color .15s var(--ease), transform .1s var(--ease);
}
.gallery-arrow.prev { left: 16px; }
.gallery-arrow.next { right: 16px; }
.gallery-arrow:hover { background: rgba(30, 30, 30, .65); }
.gallery-arrow:active { transform: scale(.94); }
.gallery-arrow[aria-disabled="true"] { opacity: 0; pointer-events: none; }
.gallery-arrow[hidden] { display: none; }
.gallery-arrow:focus-visible { outline: 3px solid #fff; outline-offset: 2px; border-radius: 50%; }
/* On pointer devices the arrows fade in when hovering the photo; touch devices always show them */
@media (hover: hover) {
  .gallery-wrap .gallery-arrow:not([aria-disabled="true"]) { opacity: 0; }
  .gallery-wrap:hover .gallery-arrow:not([aria-disabled="true"]),
  .gallery-wrap:focus-within .gallery-arrow:not([aria-disabled="true"]) { opacity: 1; }
}
@media (max-width: 600px) {
  .gallery-arrow { width: 36px; height: 36px; font-size: 26px; }
  .gallery-arrow.prev { left: 10px; } .gallery-arrow.next { right: 10px; }
}
.gallery-arrow::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; } /* ≥44 pt hit area on phones */

/* <picture> wrappers (AVIF + JPEG fallback) must not affect layout */
picture { display: contents; }
.gallery-arrow[aria-disabled="true"]:focus-visible { opacity: .45; }

/* Filter control on narrow phones: let it keep its natural width and scroll inside the toolbar */
@media (max-width: 640px) { .toolbar .segmented { max-width: none; flex: none; } }
