/* ==========================================================
   IIG Dresden – Website
   Brand: Bordeaux #7A1C17, Stein #CFC6BC, Anthrazit #2B2522
   ========================================================== */

:root {
  --bordeaux: #7A1C17;
  --bordeaux-700: #621511;
  --bordeaux-50: #F6ECEA;
  --ink: #221D1A;
  --text: #3A3430;
  --muted: #675E58;
  --stone: #CFC6BC;
  --line: #E4DDD5;
  --sand: #F3EEE8;
  --bg: #FBF9F6;
  --white: #FFFFFF;
  --success: #2F6B3A;
  --error: #A3241C;

  --font-head: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --container: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(72px, 10vw, 136px);
  --radius: 4px;
  --radius-lg: 10px;
  --shadow: 0 1px 2px rgba(34, 29, 26, .06), 0 12px 32px -12px rgba(34, 29, 26, .18);
  --ease: cubic-bezier(.22, .61, .36, 1);
  --header-h: 84px;

  --z-header: 100;
  --z-menu: 90;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--bordeaux); text-underline-offset: 3px; }
a:hover { color: var(--bordeaux-700); }
h1, h2, h3 { font-family: var(--font-head); color: var(--ink); line-height: 1.12; margin: 0 0 .5em; letter-spacing: -.02em; text-wrap: balance; }
h2 { font-size: clamp(2rem, 3.6vw, 3rem); font-weight: 700; }
h3 { font-size: 1.375rem; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }

:focus-visible { outline: 3px solid var(--bordeaux); outline-offset: 3px; border-radius: 2px; }
.section-dark :focus-visible, .cta-band :focus-visible, .site-footer :focus-visible { outline-color: #fff; }

.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: absolute; left: 16px; top: -100px; z-index: 1000; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: var(--radius); }
.skip-link:focus { top: 16px; color: #fff; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--section) 0; }
.section-sand { background: var(--sand); }
.section-dark { background: var(--ink); color: #D9D1CA; }
.section-dark h2, .section-dark h3 { color: #fff; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-head); font-size: .8125rem; font-weight: 700;
  letter-spacing: .22em; text-transform: uppercase; color: var(--bordeaux);
  margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 32px; height: 2px; background: currentColor; }
.eyebrow-light { color: #fff; }
.eyebrow-light::before { background: var(--stone); }
.lead { font-size: 1.1875rem; color: var(--ink); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 24px;
  font-family: var(--font-head); font-weight: 700; font-size: .9375rem; letter-spacing: .02em;
  border-radius: var(--radius); border: 1.5px solid transparent;
  text-decoration: none; cursor: pointer; touch-action: manipulation;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .15s var(--ease);
}
.btn:active { transform: scale(.98); }
.btn-lg { min-height: 56px; padding: 14px 30px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-primary { background: var(--bordeaux); color: #fff; }
.btn-primary:hover { background: var(--bordeaux-700); color: #fff; }
.btn-ghost-light { border-color: rgba(255,255,255,.7); color: #fff; background: rgba(255,255,255,.06); backdrop-filter: blur(6px); }
.btn-ghost-light:hover { background: #fff; color: var(--ink); border-color: #fff; }
.btn-light { background: #fff; color: var(--bordeaux); }
.btn-light:hover { background: var(--sand); color: var(--bordeaux-700); }
.btn[aria-busy="true"] { opacity: .6; pointer-events: none; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: var(--z-header);
  height: var(--header-h);
  transition: background-color .3s var(--ease), box-shadow .3s var(--ease), height .3s var(--ease);
}
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { position: relative; z-index: calc(var(--z-header) + 1); display: block; width: 170px; flex: none; }
.brand img { width: 100%; height: auto; transition: opacity .3s var(--ease); }
.brand .brand-color { position: absolute; inset: 0; opacity: 0; }
.main-nav { display: flex; align-items: center; gap: 36px; }
.main-nav ul { list-style: none; display: flex; gap: 32px; }
.main-nav ul a {
  position: relative; display: inline-block; padding: 10px 0;
  font-family: var(--font-head); font-weight: 600; font-size: .9375rem;
  color: #fff; text-decoration: none;
}
.main-nav ul a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 2px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease); }
.main-nav ul a:hover::after, .main-nav ul a[aria-current="true"]::after { transform: scaleX(1); }
.nav-cta { min-height: 44px; padding: 10px 20px; }

.site-header.is-scrolled { background: rgba(251, 249, 246, .96); backdrop-filter: blur(12px); box-shadow: 0 1px 0 var(--line); --header-h: 72px; }
.site-header.is-scrolled .brand-light { opacity: 0; }
.site-header.is-scrolled .brand-color { opacity: 1; }
.site-header.is-scrolled .main-nav ul a { color: var(--ink); }
.site-header.is-scrolled .main-nav ul a[aria-current="true"] { color: var(--bordeaux); }

.nav-toggle { display: none; width: 48px; height: 48px; border: 0; background: transparent; cursor: pointer; padding: 12px; border-radius: var(--radius); }
.nav-toggle span { display: block; height: 2px; background: #fff; margin: 5px 0; transition: transform .25s var(--ease), opacity .2s; }
.site-header.is-scrolled .nav-toggle span, body.menu-open .nav-toggle span { background: var(--ink); }
body.menu-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.menu-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.menu-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Facts ---------- */
.facts { background: var(--bordeaux); color: #fff; }
.facts-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.fact { padding: 36px 24px; border-left: 1px solid rgba(255,255,255,.18); display: flex; flex-direction: column; gap: 4px; }
.fact:first-child { border-left: 0; padding-left: 0; }
.fact strong { font-family: var(--font-head); font-size: clamp(2rem, 3.4vw, 2.75rem); font-weight: 800; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.fact span { font-size: .9375rem; color: rgba(255,255,255,.85); }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(40px, 7vw, 104px); align-items: center; }
.about-media { position: relative; }
.about-media picture img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius-lg); }
.about-badge img { width: 48px; height: 48px; flex: none; border-radius: 2px; }
.about-badge {
  position: absolute; right: -24px; bottom: 40px; display: flex; align-items: center; gap: 14px;
  background: #fff; padding: 18px 22px; border-radius: var(--radius-lg); box-shadow: var(--shadow);
  font-family: var(--font-head); font-weight: 700; color: var(--ink); line-height: 1.25;
}
.checklist { list-style: none; margin-top: 28px; display: grid; gap: 12px; }
.checklist li { position: relative; padding-left: 34px; color: var(--ink); font-weight: 500; }
.checklist li::before { content: ""; position: absolute; left: 0; top: .2em; width: 20px; height: 20px; border-radius: 50%; background: var(--bordeaux-50) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237A1C17' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / 12px no-repeat; }

/* ---------- Section heads ---------- */
.section-head { max-width: 760px; margin-bottom: clamp(40px, 6vw, 72px); }
.section-head-split { max-width: none; display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: end; }
.section-head-split h2 { margin-bottom: 0; }
.section-intro { color: var(--muted); margin: 0; max-width: 460px; justify-self: end; }

/* ---------- Services ---------- */
.services-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; background: var(--line); border: 2px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.service { position: relative; background: var(--sand); padding: 40px 32px 44px; transition: background-color .3s var(--ease); }
.service:hover { background: #fff; }
.service-num { position: absolute; top: 28px; right: 28px; font-family: var(--font-head); font-weight: 700; font-size: .875rem; color: var(--muted); }
.service-icon { width: 40px; height: 40px; color: var(--bordeaux); margin-bottom: 32px; }
.service p { color: var(--muted); margin: 0; font-size: 1rem; }

/* ---------- Projects ---------- */
.project { display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; padding: clamp(40px, 5vw, 64px) 0; border-top: 1px solid var(--line); }
.project:first-of-type { border-top: 0; padding-top: 0; }
.project-reverse .project-gallery { order: 2; }
.gallery-main { position: relative; overflow: hidden; border-radius: var(--radius-lg); aspect-ratio: 16 / 10; background: var(--sand); }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; transition: opacity .35s var(--ease), transform .8s var(--ease); }
.project:hover .gallery-main img { transform: scale(1.02); }
.gallery-main img.is-fading { opacity: 0; }
.gallery-thumbs { display: flex; gap: 10px; margin-top: 12px; }
.thumb { flex: 0 0 auto; width: 96px; height: 60px; padding: 0; border: 2px solid transparent; border-radius: var(--radius); overflow: hidden; cursor: pointer; background: none; opacity: .65; transition: opacity .2s var(--ease), border-color .2s var(--ease); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb:hover { opacity: 1; }
.thumb.is-active { opacity: 1; border-color: var(--bordeaux); }
.gallery-placeholder { display: grid; place-items: center; background:
  repeating-linear-gradient(135deg, rgba(255,255,255,.04) 0 2px, transparent 2px 22px), linear-gradient(135deg, var(--bordeaux) 0%, #4A100D 100%); color: #fff; }
.placeholder-inner { text-align: center; padding: 24px; }
.placeholder-mark { display: block; font-family: var(--font-head); font-weight: 300; font-size: clamp(2.25rem, 5vw, 3.75rem); letter-spacing: -.03em; line-height: 1; margin-bottom: 14px; hyphens: manual; }
.placeholder-note { font-family: var(--font-head); font-size: .8125rem; letter-spacing: .2em; text-transform: uppercase; color: var(--stone); }

.project-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-bottom: 18px; }
.project-loc { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: .9375rem; }
.project-body h3 { font-size: clamp(1.75rem, 2.6vw, 2.25rem); margin-bottom: 16px; }
.project-body > p { color: var(--text); }
.project-facts { list-style: none; display: flex; flex-wrap: wrap; gap: 0; margin: 28px 0 32px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.project-facts li { flex: 1 1 0; min-width: 120px; padding: 18px 16px 18px 0; display: flex; flex-direction: column; gap: 2px; }
.project-facts li + li { padding-left: 16px; border-left: 1px solid var(--line); }
.project-facts strong { font-family: var(--font-head); font-size: 1.375rem; font-weight: 800; color: var(--ink); letter-spacing: -.02em; }
.project-facts span { font-size: .875rem; color: var(--muted); }

.status { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; font-family: var(--font-head); font-size: .8125rem; font-weight: 700; letter-spacing: .04em; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status-live { background: var(--bordeaux-50); color: var(--bordeaux); }
.status-build { background: #FFF4E0; color: #8A5300; }

/* ---------- Process ---------- */
.process { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; counter-reset: step; }
.process li { border-top: 1px solid rgba(255,255,255,.2); padding-top: 28px; }
.process span { display: block; font-family: var(--font-head); font-weight: 800; font-size: 2.5rem; color: var(--stone); opacity: .55; line-height: 1; margin-bottom: 24px; }
.process p { color: #C9C0B8; font-size: 1rem; margin: 0; }

/* ---------- References ---------- */
.refs-grid { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.ref { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .3s var(--ease), transform .3s var(--ease); }
.ref:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.ref-img { aspect-ratio: 3 / 2; background: var(--sand); overflow: hidden; }
.ref-img img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.9); }
.ref-body { padding: 20px 22px 24px; }
.ref-body h3 { font-size: 1.125rem; margin: 10px 0 4px; }
.ref-body p { font-size: .9375rem; color: var(--muted); margin: 0; }
.ref-text { background: var(--sand); border-color: transparent; }
.ref-text .ref-body { padding: 22px; border-left: 3px solid var(--bordeaux); }
.tag-done { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-head); font-size: .6875rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding: 4px 8px; border: 1px solid var(--stone); border-radius: 999px; }
.tag-done::before { content: ""; width: 10px; height: 10px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23675E58' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / contain no-repeat; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--bordeaux); color: #fff; padding: clamp(56px, 8vw, 96px) 0; position: relative; overflow: hidden; }
.cta-band::after { content: "IIG"; position: absolute; right: -2vw; bottom: -6vw; font-family: var(--font-head); font-weight: 800; font-style: italic; font-size: 24vw; line-height: 1; color: rgba(255,255,255,.05); pointer-events: none; }
.cta-inner { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.cta-band h2 { color: #fff; margin-bottom: 10px; font-size: clamp(1.75rem, 3vw, 2.5rem); }
.cta-band p { margin: 0; color: rgba(255,255,255,.88); max-width: 560px; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
.contact-list { margin: 36px 0 0; display: grid; gap: 22px; }
.contact-list > div { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.contact-list dt { font-family: var(--font-head); font-weight: 700; font-size: .8125rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
.contact-list dd { margin: 0; color: var(--ink); }
.contact-list a { font-weight: 600; }

.contact-form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(24px, 4vw, 44px); box-shadow: var(--shadow); }
.contact-form h3 { font-size: 1.5rem; margin-bottom: 6px; }
.form-hint { font-size: .875rem; color: var(--muted); margin-bottom: 24px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: .9375rem; color: var(--ink); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 50px; padding: 12px 14px; font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--bg); border: 1.5px solid var(--line); border-radius: var(--radius);
  transition: border-color .2s var(--ease), background-color .2s var(--ease);
}
.field textarea { resize: vertical; min-height: 120px; }
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23221D1A' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; padding-right: 40px; cursor: pointer; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--stone); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--bordeaux); background: #fff; box-shadow: 0 0 0 3px rgba(122,28,23,.15); }
.field [aria-invalid="true"] { border-color: var(--error); background: #FDF5F4; }
.field-error { color: var(--error); font-size: .875rem; margin: 6px 0 0; min-height: 0; }
.field-error:empty { display: none; }
.field-check { display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; }
.field-check input { width: 22px; height: 22px; min-height: 0; margin: 2px 0 0; accent-color: var(--bordeaux); cursor: pointer; }
.field-check label { font-weight: 400; font-size: .9375rem; color: var(--text); margin: 0; }
.field-check .field-error { grid-column: 2; }
.form-status { margin: 16px 0 0; font-size: .9375rem; }
.form-status:empty { display: none; }
.form-status.is-success { color: var(--success); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #BDB4AC; padding: 80px 0 32px; font-size: .9375rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 56px; border-bottom: 1px solid rgba(255,255,255,.12); }
.footer-brand img { width: 200px; margin-bottom: 20px; }
.footer-brand p { max-width: 320px; }
.footer-title { font-size: .8125rem; letter-spacing: .18em; text-transform: uppercase; color: var(--stone); margin-bottom: 18px; font-weight: 700; }
.footer-links { list-style: none; display: grid; gap: 4px; }
.footer-links a { display: inline-block; padding: 4px 0; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 28px; font-size: .8125rem; color: #9C938B; }
.footer-bottom p { margin: 0; }

/* ---------- Legal pages ---------- */
.legal-header { background: var(--ink); padding: calc(var(--header-h) + 64px) 0 56px; color: #fff; }
.legal-header h1 { color: #fff; font-size: clamp(2.25rem, 5vw, 3.5rem); font-weight: 700; margin: 0; }
.legal { max-width: 780px; }
.legal h2 { font-size: 1.375rem; margin-top: 2.2em; }
.legal .note { background: var(--bordeaux-50); border-left: 3px solid var(--bordeaux); padding: 16px 20px; border-radius: var(--radius); color: var(--ink); }

/* ---------- Reveal animation ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .process { grid-template-columns: repeat(2, 1fr); gap: 40px 32px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .main-nav ul { gap: 22px; }
  .main-nav { gap: 24px; }
}

@media (max-width: 960px) {
  :root { --header-h: 72px; }
  .nav-toggle { display: block; position: relative; z-index: calc(var(--z-header) + 1); }
  .main-nav {
    position: fixed; inset: 0; z-index: var(--z-menu);
    flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 32px;
    padding: calc(var(--header-h) + 24px) var(--gutter) 40px;
    background: var(--bg);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .25s var(--ease), transform .25s var(--ease), visibility 0s .25s;
    overflow-y: auto;
  }
  body.menu-open .main-nav { opacity: 1; visibility: visible; transform: none; transition: opacity .25s var(--ease), transform .25s var(--ease); }
  body.menu-open { overflow: hidden; }
  body.menu-open .brand-light { opacity: 0; }
  body.menu-open .brand-color { opacity: 1; }
  .main-nav ul { flex-direction: column; gap: 0; }
  .main-nav ul a { display: block; color: var(--ink) !important; font-size: 1.5rem; padding: 16px 0; border-bottom: 1px solid var(--line); }
  .main-nav ul a::after { display: none; }
  .nav-cta { min-height: 56px; }
  .brand { width: 148px; }

  .facts-grid { grid-template-columns: repeat(2, 1fr); }
  .fact { padding: 28px 16px; }
  .fact:nth-child(odd) { border-left: 0; padding-left: 0; }
  .fact:nth-child(n+3) { border-top: 1px solid rgba(255,255,255,.18); }

  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .about-media picture img { aspect-ratio: 4 / 3; }
  .about-badge { right: 16px; bottom: 16px; }
  .section-head-split { grid-template-columns: 1fr; gap: 16px; }
  .section-intro { justify-self: start; }
  .project, .project-reverse { grid-template-columns: 1fr; }
  .project-reverse .project-gallery { order: 0; }
  .refs-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  body { font-size: 1rem; }
  .eyebrow { letter-spacing: .14em; font-size: .75rem; }
  .eyebrow::before { width: 20px; }
  .hero-actions .btn { width: 100%; }
  .services-grid { grid-template-columns: 1fr; }
  .process { grid-template-columns: 1fr; }
  .refs-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .contact-list > div { grid-template-columns: 1fr; gap: 4px; }
  .footer-grid { grid-template-columns: 1fr; }
  .project-facts li { min-width: 0; padding-right: 10px; }
  .project-facts li + li { padding-left: 10px; }
  .project-facts strong { font-size: 1.125rem; }
  .thumb { width: 80px; height: 52px; }
  .cta-inner .btn { width: 100%; }
}

/* ==========================================================
   Erweiterungen v3
   ========================================================== */
.btn-outline { border-color: var(--bordeaux); color: var(--bordeaux); background: transparent; }
.btn-outline:hover { background: var(--bordeaux); color: #fff; }
.project-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Hero (Projekte als Einstieg) ---------- */
.hero-alt { padding: calc(var(--header-h) + clamp(40px, 6vw, 80px)) 0 clamp(56px, 7vw, 96px); background: var(--bg); }
.hero-alt-title { font-size: clamp(2.5rem, 5.4vw, 4.75rem); font-weight: 300; letter-spacing: -.035em; line-height: 1.03; margin-bottom: 24px; }
.hero-alt-title span { font-weight: 800; color: var(--bordeaux); }
.hero-alt-lead { font-size: clamp(1.0625rem, 1.5vw, 1.25rem); color: var(--text); max-width: 540px; margin-bottom: 32px; }

.hero-c-head { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: end; margin-bottom: 48px; }
.hero-c-title { margin-bottom: 0; }
.hero-c-intro .hero-alt-lead { margin-bottom: 24px; }
.hero-c-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.tile { position: relative; display: block; overflow: hidden; border-radius: var(--radius-lg); color: #fff; text-decoration: none; background: var(--ink); min-height: 340px; }
.tile-lg { grid-row: span 2; min-height: 500px; }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.tile:hover img { transform: scale(1.04); }
.tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(20,16,14,.82) 0%, rgba(20,16,14,.1) 55%); }
.tile-placeholder { background: repeating-linear-gradient(135deg, rgba(255,255,255,.04) 0 2px, transparent 2px 22px), linear-gradient(135deg, var(--bordeaux) 0%, #4A100D 100%); }
.tile-placeholder::after { background: none; }
.tile-body { position: absolute; left: 24px; right: 84px; bottom: 22px; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.tile-body strong { font-family: var(--font-head); font-size: clamp(1.25rem, 2vw, 1.75rem); font-weight: 700; letter-spacing: -.02em; }
.tile-loc { display: inline-flex; gap: 6px; align-items: center; font-size: .9375rem; color: rgba(255,255,255,.85); }
.tile .status-live { background: rgba(255,255,255,.92); }
.tile-arrow { position: absolute; right: 22px; bottom: 22px; z-index: 1; width: 46px; height: 46px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.6); display: grid; place-items: center; transition: background-color .2s var(--ease), color .2s var(--ease); }
.tile:hover .tile-arrow { background: #fff; color: var(--bordeaux); }

/* ---------- Denkmal-AfA ---------- */
.afa { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.afa-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(40px, 6vw, 96px); align-items: center; }
.afa-note { font-size: .875rem; color: var(--muted); border-left: 2px solid var(--stone); padding-left: 14px; margin-top: 24px; }
.afa-cards { display: grid; gap: 20px; }
.afa-card { background: var(--sand); border-radius: var(--radius-lg); padding: 28px 30px; }
.afa-card-label { font-family: var(--font-head); font-size: .8125rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--bordeaux); margin-bottom: 10px; }
.afa-big { font-family: var(--font-head); font-size: clamp(2.75rem, 5vw, 3.75rem); font-weight: 800; color: var(--ink); line-height: 1; letter-spacing: -.04em; margin: 0 0 4px; }
.afa-sub { color: var(--ink); font-weight: 600; margin-bottom: 18px; }
.afa-bar { display: flex; gap: 3px; height: 32px; margin-bottom: 14px; }
.afa-bar span { flex: 0 0 var(--w); display: grid; place-items: center; background: var(--bordeaux); color: #fff; font-family: var(--font-head); font-size: .8125rem; font-weight: 700; border-radius: 3px; }
.afa-bar span + span { background: #A8524B; }
.afa-desc { font-size: .9375rem; color: var(--muted); margin: 0; }

/* ---------- Referenzen-Filter ---------- */
.ref-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 32px; }
.chip { min-height: 44px; padding: 10px 18px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; color: var(--ink); font: 600 .9375rem var(--font-head); cursor: pointer; transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease); }
.chip:hover { border-color: var(--stone); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.ref-count { margin: 0 0 0 auto; font-size: .9375rem; color: var(--muted); }
.ref[hidden] { display: none; }

/* ---------- Projektseiten ---------- */
.p-hero { position: relative; min-height: 78vh; min-height: 78dvh; display: flex; align-items: flex-end; color: #fff; background: var(--ink); overflow: hidden; }
.p-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.p-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(20,16,14,.85) 0%, rgba(20,16,14,.2) 55%, rgba(20,16,14,.45) 100%); }
.p-hero.p-hero-placeholder { background: repeating-linear-gradient(135deg, rgba(255,255,255,.04) 0 2px, transparent 2px 22px), linear-gradient(135deg, var(--bordeaux) 0%, #3A0C0A 100%); }
.p-hero.p-hero-placeholder::after { background: none; }
.p-hero-inner { position: relative; z-index: 1; padding-top: calc(var(--header-h) + 64px); padding-bottom: 56px; }
.p-hero h1 { color: #fff; font-size: clamp(2.5rem, 6.4vw, 5.25rem); font-weight: 700; letter-spacing: -.035em; line-height: 1.02; margin: 16px 0 14px; }
.p-hero .project-loc { color: rgba(255,255,255,.9); font-size: 1.0625rem; }
.p-hero .status-live { background: rgba(255,255,255,.92); }
.breadcrumb { font-size: .875rem; color: rgba(255,255,255,.8); margin-bottom: 20px; }
.breadcrumb a { color: #fff; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.breadcrumb li + li::before { content: "/"; margin-right: 8px; opacity: .6; }
.p-facts { background: var(--bordeaux); color: #fff; }
.p-intro { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
.p-aside { background: var(--sand); border-radius: var(--radius-lg); padding: 32px; position: sticky; top: calc(var(--header-h) + 24px); }
.p-aside h2 { font-size: 1.375rem; }
.p-aside ul { list-style: none; display: grid; gap: 12px; margin: 0 0 24px; }
.p-aside li { display: flex; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); padding-bottom: 12px; font-size: .9375rem; }
.p-aside li span:first-child { color: var(--muted); }
.p-aside li span:last-child { color: var(--ink); font-weight: 600; text-align: right; }
.p-highlights { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 32px; }
.p-highlights li { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; }
.p-highlights strong { display: block; font-family: var(--font-head); color: var(--ink); margin-bottom: 4px; }
.p-highlights span { color: var(--muted); font-size: .9375rem; }
.p-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.p-gallery figure { margin: 0; }
.p-gallery figure:first-child { grid-column: span 2; }
.p-gallery button { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: var(--radius-lg); overflow: hidden; }
.p-gallery img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform .6s var(--ease); }
.p-gallery figure:first-child img { aspect-ratio: 21 / 9; }
.p-gallery button:hover img { transform: scale(1.03); }
.p-gallery figcaption { font-size: .875rem; color: var(--muted); margin-top: 8px; }
.p-placeholder-note { background: var(--sand); border-radius: var(--radius-lg); padding: 40px; text-align: center; color: var(--muted); }
.p-more { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 300; background: rgba(20,16,14,.94); display: none; align-items: center; justify-content: center; padding: 64px 16px; }
.lightbox.is-open { display: flex; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: var(--radius); }
.lightbox-close { position: absolute; top: 16px; right: 16px; width: 48px; height: 48px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.5); background: transparent; color: #fff; cursor: pointer; display: grid; place-items: center; }
.lightbox-close:hover { background: #fff; color: var(--ink); }

@media (max-width: 960px) {
   .hero-c-head, .afa-grid, .p-intro { grid-template-columns: 1fr; }
  .hero-c-grid { grid-template-columns: 1fr; grid-template-rows: none; }
  .tile-lg { grid-row: auto; min-height: 360px; }
  .p-aside { position: static; }
}
@media (max-width: 640px) {
  .p-highlights, .p-gallery, .p-more { grid-template-columns: 1fr; }
  .p-gallery figure:first-child { grid-column: auto; }
  .p-gallery figure:first-child img { aspect-ratio: 16 / 10; }
  .ref-count { width: 100%; margin: 4px 0 0; }
  .project-actions .btn { flex: 1 1 100%; }
}
.p-intro #p-about { font-size: clamp(1.375rem, 2.2vw, 1.875rem); font-weight: 600; line-height: 1.3; letter-spacing: -.015em; margin-bottom: 24px; }
/* Galerie mit genau zwei Bildern: nebeneinander */
.p-gallery:has(> figure:nth-child(2):last-child) figure:first-child { grid-column: auto; }
.p-gallery:has(> figure:nth-child(2):last-child) figure:first-child img { aspect-ratio: 16 / 10; }
/* Navigation über hellen Projektbildern lesbar halten */
.p-hero::after { background: linear-gradient(0deg, rgba(20,16,14,.85) 0%, rgba(20,16,14,.25) 50%, rgba(20,16,14,.35) 80%, rgba(20,16,14,.7) 100%); }

/* Kachel mit zwei Bildern (Vorderhaus / Hinterhaus), diagonal geteilt */
.tile-split .split-a { clip-path: polygon(0 0, 58% 0, 42% 100%, 0 100%); object-position: 30% 50%; }
.tile-split .split-b { object-position: 70% 50%; }
.split-line { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.split-label { position: absolute; top: 16px; z-index: 1; padding: 5px 10px; border-radius: 999px; background: rgba(20,16,14,.6); backdrop-filter: blur(6px); color: #fff; font: 700 .75rem var(--font-head); letter-spacing: .08em; text-transform: uppercase; }
.split-label-a { left: 16px; }
.split-label-b { right: 16px; }

/* Kennzahlen mit drei Werten */
.facts-grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 960px) {
  .facts-grid-3 { grid-template-columns: 1fr; }
  .facts-grid-3 .fact { border-left: 0; padding: 22px 0; }
  .facts-grid-3 .fact + .fact { border-top: 1px solid rgba(255,255,255,.18); }
}

/* Entfernungen unter den Projekt-Eckdaten */
.project-distances { list-style: none; display: grid; gap: 10px; margin: -12px 0 32px; }
.project-distances li { display: flex; align-items: center; gap: 10px; font-size: .9375rem; color: var(--text); }
.project-distances svg { color: var(--bordeaux); flex: none; }
.project-distances strong { color: var(--ink); font-family: var(--font-head); }

/* Kennzahlen mit fünf Werten (Projektseiten) */
.facts-grid-5 { grid-template-columns: repeat(5, 1fr); }
.facts-grid-5 .fact strong { font-size: clamp(1.75rem, 2.6vw, 2.25rem); }
@media (max-width: 1100px) { .facts-grid-5 { grid-template-columns: repeat(3, 1fr); } .facts-grid-5 .fact:nth-child(4) { border-left: 0; padding-left: 0; } .facts-grid-5 .fact:nth-child(n+4) { border-top: 1px solid rgba(255,255,255,.18); } }
@media (max-width: 960px) {
  .facts-grid-5 { grid-template-columns: 1fr 1fr; }
  .facts-grid-5 .fact:nth-child(4) { border-left: 1px solid rgba(255,255,255,.18); padding-left: 16px; }
}

@media (max-width: 960px) { .tile { min-height: 300px; } .p-more { grid-template-columns: 1fr; } }

/* Kennzahlen nicht umbrechen (z. B. „122–180 m²“) */
.fact strong { white-space: nowrap; }
@media (max-width: 640px) { .fact strong { font-size: 1.5rem; } .fact { min-width: 0; } }

/* Spam-Falle im Formular – für Besucher unsichtbar */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-form { position: relative; }

/* Listen in Impressum/Datenschutz */
.legal ul { list-style: disc; padding-left: 1.4em; margin: 0 0 1em; }
.legal li { margin-bottom: .3em; }
