/* RENDERRAUM – Ingo Duhatschek */
@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --bg: #f4f3f0;
  --surface: #ebe9e4;
  --fg: #121212;
  --muted: #6d6b66;
  --line: #d9d6cf;
  --invert-bg: #121212;
  --invert-fg: #f4f3f0;
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1440px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 500; letter-spacing: -0.02em; line-height: 1.1; }
p { margin: 0 0 1em; }
::selection { background: var(--fg); color: var(--bg); }

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

/* ---------- Header ---------- */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: background .4s var(--ease), color .4s var(--ease), border-color .4s;
  border-bottom: 1px solid transparent;
}
.header .wrap { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 600; letter-spacing: .28em; font-size: 14px; }
.brand img { width: 30px; height: 30px; }
.nav { display: flex; gap: 36px; font-size: 14px; }
.nav a { position: relative; opacity: .85; transition: opacity .2s; }
.nav a:hover { opacity: 1; }
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.nav a:hover::after { transform: scaleX(1); }

.header--light { color: #fff; }
.header--light .brand img { filter: invert(1); }
.header.is-solid { background: rgba(244, 243, 240, .88); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); color: var(--fg); border-color: var(--line); }
.header.is-solid .brand img { filter: none; }

.lang-switch { display: flex; gap: 2px; margin-left: 28px; padding-left: 20px; border-left: 1px solid var(--line); font-size: 12px; letter-spacing: .12em; }
.lang-switch a { padding: 4px 6px; opacity: .5; transition: opacity .2s; }
.lang-switch a:hover { opacity: 1; }
.lang-switch a[aria-current] { opacity: 1; font-weight: 600; }
.header .wrap > .nav { margin-left: auto; }
.legal .note { color: var(--muted); font-size: 15px; }
@media (max-width: 760px) { .lang-switch { margin-left: auto; margin-right: 12px; padding-left: 0; border-left: 0; } }

.menu-btn { display: none; background: none; border: 0; color: inherit; padding: 8px; margin-right: -8px; cursor: pointer; }
.menu-btn span { display: block; width: 22px; height: 1.5px; background: currentColor; margin: 5px 0; transition: transform .3s var(--ease), opacity .2s; }

@media (max-width: 760px) {
  .menu-btn { display: block; }
  .nav {
    position: fixed; inset: 76px 0 auto 0; flex-direction: column; gap: 0;
    background: var(--bg); color: var(--fg); border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 20px; font-size: 20px;
    transform: translateY(-8px); opacity: 0; pointer-events: none; transition: .3s var(--ease);
  }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav a:last-child { border-bottom: 0; }
  .nav a::after { display: none; }
  .header.is-open { background: var(--bg); color: var(--fg); }
  .header.is-open .brand img { filter: none; }
  .header.is-open .nav { transform: none; opacity: 1; pointer-events: auto; }
  .header.is-open .menu-btn span:nth-child(1) { transform: translateY(3.25px) rotate(45deg); }
  .header.is-open .menu-btn span:nth-child(2) { transform: translateY(-3.25px) rotate(-45deg); }
}

/* ---------- Hero ---------- */
.hero { position: relative; height: 100svh; min-height: 560px; color: #fff; overflow: hidden; background: #111; }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: heroZoom 14s var(--ease) both; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(0,0,0,.6) 0%, rgba(0,0,0,.25) 45%, rgba(0,0,0,0) 70%),
    linear-gradient(180deg, rgba(0,0,0,.35) 0%, rgba(0,0,0,0) 25%, rgba(0,0,0,0) 50%, rgba(0,0,0,.6) 100%);
}
.hero h1, .hero__eyebrow, .hero__meta { text-shadow: 0 2px 24px rgba(0,0,0,.35); }
.hero .wrap { position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; padding-bottom: clamp(40px, 8vh, 88px); }
.hero__eyebrow { font-size: 13px; letter-spacing: .22em; text-transform: uppercase; opacity: .8; margin-bottom: 20px; }
.hero h1 { font-size: clamp(40px, 7.4vw, 112px); font-weight: 400; max-width: 13ch; letter-spacing: -0.035em; }
.hero__meta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 20px; margin-top: 36px; font-size: 15px; }
.hero__meta p { margin: 0; opacity: .85; max-width: 44ch; }
.scroll-hint { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; opacity: .7; }
@keyframes heroZoom { from { transform: scale(1.08); } to { transform: scale(1); } }

/* ---------- Sections ---------- */
.section { padding: clamp(80px, 12vw, 160px) 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-head { display: grid; grid-template-columns: 1fr 2fr; gap: 32px; margin-bottom: clamp(40px, 6vw, 80px); align-items: end; }
.label { font-size: 13px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.label b { color: var(--fg); font-weight: 600; margin-right: 10px; }
.section-head h2 { font-size: clamp(32px, 4.6vw, 64px); }
.lead { font-size: clamp(20px, 2vw, 26px); line-height: 1.45; letter-spacing: -0.01em; max-width: 34ch; }
@media (max-width: 760px) { .section-head { grid-template-columns: 1fr; gap: 16px; } }

/* ---------- Gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(8px, 1.2vw, 16px); margin-top: clamp(48px, 6vw, 80px); }
.gallery a { grid-column: span 4; overflow: hidden; background: var(--surface); aspect-ratio: 16 / 10; cursor: zoom-in; }
.gallery--first { margin-top: 0; }
.gallery a { position: relative; }
.gallery a.wide { grid-column: span 8; aspect-ratio: auto; }
.gallery a.wide img { position: absolute; inset: 0; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease), opacity .6s; }
.gallery a:hover img { transform: scale(1.04); }
.gallery a.is-hidden { display: none; }
.more { display: flex; justify-content: center; margin-top: 48px; }
@media (max-width: 900px) { .gallery a { grid-column: span 6; } .gallery a.wide { grid-column: span 12; } }
@media (max-width: 520px) { .gallery a, .gallery a.wide { grid-column: span 12; } }

.btn {
  display: inline-flex; align-items: center; gap: 10px; font: inherit; font-size: 15px;
  padding: 14px 28px; border: 1px solid var(--fg); border-radius: 999px; background: transparent; color: var(--fg);
  cursor: pointer; transition: background .25s, color .25s;
}
.btn:hover { background: var(--fg); color: var(--bg); }

/* ---------- Services ---------- */
.services { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.service { padding: 32px 28px 8px 0; }
.service + .service { padding-left: 28px; border-left: 1px solid var(--line); }
.service .num { font-size: 13px; color: var(--muted); margin-bottom: 48px; display: block; }
.service h3 { font-size: 21px; margin-bottom: 14px; }
.service p { color: var(--muted); font-size: 16px; }
@media (max-width: 1000px) {
  .services { grid-template-columns: 1fr 1fr; }
  .service:nth-child(3) { padding-left: 0; border-left: 0; }
  .service:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .services { grid-template-columns: 1fr; }
  .service, .service + .service { padding: 28px 0 4px; border-left: 0; }
  .service + .service { border-top: 1px solid var(--line); }
  .service .num { margin-bottom: 20px; }
}

/* ---------- About ---------- */
.about-section { position: relative; overflow: hidden; background: #161514; color: var(--invert-fg); }
.section + .about-section, .about-section + .section { border-top: 0; }
.about__bg {
  position: absolute; top: 0; right: 0; width: 58%; height: 100%; object-fit: cover; object-position: center 20%;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 45%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 45%);
  opacity: .9;
}
.about-section::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #161514 30%, rgba(22,21,20,.55) 60%, rgba(22,21,20,.15) 100%); pointer-events: none; }
.about { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 2fr; gap: 32px; }
.about-section .label { color: #8d8b86; }
.about-section .label b { color: var(--invert-fg); }
.about__text { max-width: 640px; }
.about__text p { font-size: 18px; max-width: 62ch; color: #c9c6bf; }
.about__text .lead { color: var(--invert-fg); margin-bottom: 1.2em; max-width: 30ch; }
.btn--light { border-color: var(--invert-fg); color: var(--invert-fg); margin-top: 16px; }
.btn--light:hover { background: var(--invert-fg); color: var(--invert-bg); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 32px 24px; margin-top: 56px; padding-top: 32px; border-top: 1px solid #34322f; }
.fact strong { display: block; font-size: clamp(30px, 3vw, 44px); font-weight: 400; letter-spacing: -0.03em; line-height: 1; margin-bottom: 10px; }
.fact span { font-size: 14px; color: #8d8b86; }
.stack { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 40px; padding: 0; list-style: none; }
.stack li { font-size: 14px; padding: 7px 16px; border: 1px solid #3d3b37; border-radius: 999px; color: #d9d6cf; }
@media (max-width: 760px) {
  .about { grid-template-columns: 1fr; }
  .about__bg { width: 100%; height: 520px; -webkit-mask-image: linear-gradient(180deg, #000 40%, transparent 100%); mask-image: linear-gradient(180deg, #000 40%, transparent 100%); }
  .about-section::after { background: linear-gradient(180deg, rgba(22,21,20,.2) 0%, #161514 520px); }
  .about-section .about { padding-top: 300px; }
}
.contact { border-top: 1px solid #2c2c2c; }

/* ---------- Contact ---------- */
.contact { background: var(--invert-bg); color: var(--invert-fg); }
.contact .label { color: #8d8b86; }
.contact .label b { color: var(--invert-fg); }
.contact h2 { font-size: clamp(40px, 7vw, 104px); font-weight: 400; letter-spacing: -0.035em; max-width: 14ch; margin: 28px 0 56px; }
.contact__mail { display: inline-block; font-size: clamp(22px, 3.4vw, 44px); letter-spacing: -0.02em; border-bottom: 1px solid #555; padding-bottom: 6px; transition: border-color .3s; word-break: break-all; }
.contact__mail:hover { border-color: var(--invert-fg); }
.contact__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 80px; padding-top: 32px; border-top: 1px solid #2c2c2c; font-size: 16px; }
.contact__grid h4 { margin: 0 0 10px; font-size: 13px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: #8d8b86; }
.contact__grid a:hover { text-decoration: underline; text-underline-offset: 4px; }
.socials { display: flex; flex-direction: column; }
@media (max-width: 760px) { .contact__grid { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.footer { background: var(--invert-bg); color: #8d8b86; font-size: 14px; }
.footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; padding-top: 28px; padding-bottom: 28px; border-top: 1px solid #2c2c2c; }
.footer nav { display: flex; gap: 24px; }
.footer a:hover { color: var(--invert-fg); }

/* ---------- Project page ---------- */
.page-top { padding-top: calc(76px + clamp(48px, 8vw, 112px)); padding-bottom: clamp(40px, 5vw, 64px); }
.back { font-size: 14px; color: var(--muted); display: inline-block; margin-bottom: 40px; }
.back:hover { color: var(--fg); }
.page-top h1 { font-size: clamp(36px, 6vw, 88px); font-weight: 400; letter-spacing: -0.035em; max-width: 18ch; }
.meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line); }
.meta h4 { margin: 0 0 6px; font-size: 13px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.meta p { margin: 0; }
.meta .desc { grid-column: span 1; }
@media (max-width: 760px) { .meta { grid-template-columns: 1fr; gap: 20px; } }
.project-hero { width: 100%; max-height: 88vh; object-fit: cover; }
.project-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(8px, 1.2vw, 16px); padding-top: clamp(8px, 1.2vw, 16px); }
.project-gallery a { display: block; overflow: hidden; background: var(--surface); cursor: zoom-in; }
.project-gallery a.full { grid-column: 1 / -1; }
.project-gallery img { width: 100%; transition: transform 1s var(--ease); }
.project-gallery a:hover img { transform: scale(1.02); }
@media (max-width: 600px) { .project-gallery { grid-template-columns: 1fr; } }
.next-project { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: clamp(56px, 8vw, 112px) 0; border-top: 1px solid var(--line); margin-top: clamp(56px, 8vw, 112px); }
.next-project span { display: block; font-size: 13px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.next-project strong { font-size: clamp(26px, 4vw, 52px); font-weight: 400; letter-spacing: -0.03em; line-height: 1.1; }
.next-project .arrow { font-size: clamp(32px, 4vw, 56px); transition: transform .4s var(--ease); }
.next-project:hover .arrow { transform: translateX(10px); }

/* ---------- Legal ---------- */
.legal { max-width: 760px; }
.legal h2 { font-size: 22px; margin: 48px 0 14px; }
.legal p, .legal li { color: #2b2a28; }
.legal ul { padding-left: 1.2em; }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(12, 12, 12, .96); display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity .3s; }
.lightbox.is-open { opacity: 1; pointer-events: auto; }
.lightbox img { max-width: 92vw; max-height: 86vh; width: auto; height: auto; object-fit: contain; }
.lightbox button { position: absolute; background: none; border: 0; color: #fff; font: inherit; cursor: pointer; opacity: .7; padding: 16px; transition: opacity .2s; }
.lightbox button:hover { opacity: 1; }
.lb-close { top: 12px; right: 12px; font-size: 32px; line-height: 1; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); font-size: 36px; }
.lb-prev { left: 8px; }
.lb-next { right: 8px; }
.lb-count { position: absolute; bottom: 20px; left: 0; right: 0; text-align: center; color: #8d8b86; font-size: 13px; letter-spacing: .15em; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
  .hero img { animation: none; }
}
