:root {
  --graphit: #17191B;
  --graphit-2: #1E2124;
  --beton: #C7C4BC;
  --weiss: #F3F1EA;
  --ziegel: #A7442E;
  --gelb: #D7B85A;
  --blau: #245B78;
  --muted: rgba(243, 241, 234, .58);
  --line: rgba(243, 241, 234, .14);
  --f-head: "Space Grotesk", system-ui, sans-serif;
  --f-body: "Inter", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, monospace;
  --gutter: clamp(16px, 4vw, 64px);
  --ease: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0;
  background: var(--graphit);
  color: var(--weiss);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.is-loading { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; }
em { font-style: normal; color: var(--beton); }
.mono { font-family: var(--f-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
::selection { background: var(--gelb); color: var(--graphit); }

/* ---------- Fixed layers ---------- */
#webgl { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; pointer-events: none; }
.labels { position: fixed; inset: 0; z-index: 1; pointer-events: none; }
.label3d {
  position: absolute; left: 0; top: 0; will-change: transform, opacity;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--weiss); white-space: nowrap; opacity: 0;
}
.label3d::before { content: ""; position: absolute; left: -3px; top: -3px; width: 6px; height: 6px; border-radius: 50%; background: var(--gelb); }
.label3d i { position: absolute; left: 0; bottom: 0; width: 1px; background: rgba(243,241,234,.45); transform-origin: bottom; }
.label3d span { position: absolute; left: 8px; transform: translateY(-100%); padding: 2px 6px; background: rgba(23,25,27,.72); border: 1px solid var(--line); backdrop-filter: blur(6px); }
.label3d.flip span { left: auto; right: 8px; }
.label3d b { color: var(--gelb); font-weight: 500; margin-right: 6px; }
.grain {
  position: fixed; inset: -50%; z-index: 50; pointer-events: none; opacity: .06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1s steps(4) infinite;
}
@keyframes grain { 0%{transform:translate(0,0)} 25%{transform:translate(-3%,2%)} 50%{transform:translate(2%,-3%)} 75%{transform:translate(-2%,-1%)} 100%{transform:translate(0,0)} }
.cursor {
  position: fixed; left: 0; top: 0; z-index: 60; width: 10px; height: 10px; margin: -5px 0 0 -5px;
  border-radius: 50%; background: var(--gelb); pointer-events: none; mix-blend-mode: difference;
  transition: width .35s var(--ease), height .35s var(--ease), margin .35s var(--ease); opacity: 0;
}
.cursor.is-hover { width: 56px; height: 56px; margin: -28px 0 0 -28px; }
@media (hover: hover) and (pointer: fine) { .cursor { opacity: 1; } }

main { position: relative; z-index: 2; }

/* ---------- Loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 100; background: var(--graphit);
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 28px;
}
.loader__layers { display: flex; gap: 6px; height: 120px; align-items: flex-end; }
.loader__layers span { width: 14px; height: 100%; transform: scaleY(0); transform-origin: bottom; }
.loader__layers span:nth-child(1) { background: var(--beton); }
.loader__layers span:nth-child(2) { background: var(--ziegel); }
.loader__layers span:nth-child(3) { background: var(--gelb); width: 34px; }
.loader__layers span:nth-child(4) { background: #9a978f; width: 4px; }
.loader__layers span:nth-child(5) { background: var(--weiss); }
.loader__meta { display: flex; gap: 24px; color: var(--muted); }
.loader__count { color: var(--weiss); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 20px var(--gutter);
  transition: background .4s, padding .4s;
}
.nav.is-scrolled { background: rgba(23,25,27,.72); backdrop-filter: blur(14px); padding-top: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.nav__logo img { height: 26px; width: auto; }
.nav__links { display: flex; gap: 32px; }
.nav__links a { text-decoration: none; font-size: 14px; color: var(--muted); transition: color .3s; }
.nav__links a:hover { color: var(--weiss); }
@media (max-width: 860px) { .nav__links { display: none; } .nav__logo img { height: 20px; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 16px 26px; border-radius: 999px; text-decoration: none;
  background: var(--weiss); color: var(--graphit); font-family: var(--f-head); font-weight: 500; font-size: 15px;
  transition: background .35s var(--ease), color .35s var(--ease), transform .35s var(--ease);
}
.btn:hover { background: var(--gelb); }
.btn__arrow { transition: transform .35s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(4px); }
.btn--ghost { background: transparent; color: var(--weiss); box-shadow: inset 0 0 0 1px var(--line); }
.btn--ghost:hover { background: var(--weiss); color: var(--graphit); }
.btn--small { padding: 10px 18px; font-size: 13px; }
.btn--big { padding: 24px 40px; font-size: clamp(18px, 2vw, 24px); }

/* ---------- Type ---------- */
.eyebrow { color: var(--muted); margin: 0 0 24px; display: flex; align-items: center; gap: 10px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gelb); box-shadow: 0 0 0 4px rgba(215,184,90,.18); }
.h2, .h3, .hero__title, .contact__title { font-family: var(--f-head); font-weight: 600; letter-spacing: -.035em; line-height: .98; margin: 0; }
.h2 { font-size: clamp(40px, 6.4vw, 104px); }
.h3 { font-size: clamp(34px, 4.4vw, 68px); }
.body { color: var(--muted); max-width: 46ch; font-size: 17px; }
.split .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .06em; }
.split .w > span { display: inline-block; }

/* ---------- Hero ---------- */
.hero { min-height: 100vh; min-height: 100svh; position: relative; display: flex; align-items: center; padding: 120px var(--gutter) 80px; }
.hero__inner { max-width: 760px; }
.hero__title { font-size: clamp(54px, 9.4vw, 156px); margin-bottom: 32px; }
.hero__title .line { display: block; overflow: hidden; padding-bottom: .04em; }
.hero__title .line > span { display: inline-block; }
.hero__title .line--accent { color: var(--beton); }
.hero__lead { color: var(--muted); max-width: 40ch; font-size: 18px; margin: 0 0 36px; }
.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero__scroll { position: absolute; left: var(--gutter); bottom: 32px; display: flex; align-items: center; gap: 14px; color: var(--muted); }
.hero__scroll i { display: block; width: 64px; height: 1px; background: var(--line); position: relative; overflow: hidden; }
.hero__scroll i::after { content: ""; position: absolute; inset: 0; background: var(--gelb); animation: scrollline 2.2s var(--ease) infinite; }
@keyframes scrollline { 0% { transform: translateX(-100%); } 60%, 100% { transform: translateX(100%); } }
.hero__coords { position: absolute; right: var(--gutter); bottom: 32px; text-align: right; color: var(--muted); }

/* ---------- System ---------- */
.system { height: 260vh; position: relative; }
.system__sticky { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; justify-content: space-between; padding: 140px var(--gutter) 48px; }
.system__text { max-width: 640px; }
.system__text .body { margin-top: 28px; }
.system__specs { list-style: none; margin: 0; padding: 0; display: flex; gap: 32px; flex-wrap: wrap; color: var(--muted); }
.system__specs span { color: var(--gelb); margin-right: 8px; }

/* ---------- Services: stepped panels ---------- */
.services { padding: 18vh var(--gutter) 22vh; }
.services__head { margin-bottom: 10vh; }
.services__stack { max-width: 640px; position: relative; }
.panel {
  position: sticky; display: grid; grid-template-columns: 64px 1fr; gap: 20px;
  padding: 36px 36px 40px; margin-bottom: 18vh; min-height: 300px;
  background: linear-gradient(160deg, rgba(36,39,43,.86), rgba(23,25,27,.92));
  border: 1px solid var(--line); border-radius: 4px;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  transition: border-color .5s;
}
.panel:nth-child(1) { top: 120px; }
.panel:nth-child(2) { top: 150px; margin-left: 3%; }
.panel:nth-child(3) { top: 180px; margin-left: 6%; }
.panel:nth-child(4) { top: 210px; margin-left: 9%; }
.panel:nth-child(5) { top: 240px; margin-left: 12%; margin-bottom: 0; }
.panel.is-active { border-color: rgba(215,184,90,.55); }
.panel__num { color: var(--gelb); font-size: 14px; padding-top: 8px; }
.panel h3 { font-family: var(--f-head); font-weight: 600; font-size: clamp(30px, 3.4vw, 48px); letter-spacing: -.03em; margin: 0 0 14px; line-height: 1; }
.panel p { margin: 0 0 20px; color: var(--muted); }
.panel .tag { color: var(--beton); margin: 0; padding-top: 16px; border-top: 1px solid var(--line); font-size: 11px; }

/* ---------- Marquee ---------- */
.marquee { overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 28px 0; background: var(--graphit); position: relative; }
.marquee__track { display: flex; align-items: center; gap: 48px; width: max-content; animation: marquee 32s linear infinite; }
.marquee span { font-family: var(--f-head); font-size: clamp(36px, 5vw, 80px); font-weight: 500; letter-spacing: -.03em; white-space: nowrap; }
.marquee span:nth-of-type(even) { -webkit-text-stroke: 1px var(--beton); color: transparent; }
.marquee i { color: var(--ziegel); font-style: normal; font-size: 22px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Projects ---------- */
.projects { padding: 20vh var(--gutter); background: var(--graphit); }
.projects__head { margin-bottom: 12vh; }
.projects__grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; align-items: start; }
.shot { margin: 0; }
.shot--a { grid-column: 1 / 7; }
.shot--b { grid-column: 8 / 13; margin-top: 24vh; }
.shot--c { grid-column: 3 / 9; margin-top: 6vh; }
.shot__img { overflow: hidden; aspect-ratio: 636 / 548; clip-path: inset(100% 0 0 0); background: var(--graphit-2); }
.shot__img img { width: 100%; height: 120%; object-fit: cover; transform: translateY(-8%) scale(1.08); }
.shot figcaption { margin-top: 14px; color: var(--muted); display: flex; gap: 16px; }
.shot figcaption span { color: var(--gelb); }
@media (max-width: 760px) {
  .shot--a, .shot--b, .shot--c { grid-column: 1 / -1; margin-top: 0; }
  .shot--b { margin-left: 12%; } .shot--c { margin-right: 12%; }
}

/* ---------- Profile ---------- */
.profile { padding: 18vh var(--gutter); display: grid; grid-template-columns: 1fr 1fr; gap: 6vw; align-items: end; background: var(--graphit); border-top: 1px solid var(--line); }
.year { font-family: var(--f-head); font-weight: 700; letter-spacing: -.06em; line-height: .8; font-size: clamp(120px, 22vw, 360px); color: transparent; -webkit-text-stroke: 1.5px var(--beton); font-variant-numeric: tabular-nums; }
.profile__since { color: var(--gelb); margin-top: 28px; }
.profile__content { display: grid; gap: 40px; }
.profile__photo { position: relative; width: min(100%, 420px); aspect-ratio: 1; overflow: hidden; border-radius: 50%; }
.profile__photo img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.18); }
.profile__photo-tag { position: absolute; left: 50%; bottom: 14%; transform: translateX(-50%); background: var(--graphit); padding: 4px 10px; color: var(--beton); font-size: 10px; }
.profile__text .body { margin-top: 20px; }
@media (max-width: 900px) { .profile { grid-template-columns: 1fr; } }

/* ---------- Process ---------- */
.process { height: 400vh; position: relative; }
.process__sticky { position: sticky; top: 0; height: 100vh; display: grid; grid-template-columns: 1fr 1fr; gap: 4vw; align-items: center; padding: 100px var(--gutter) 60px; }
.process__head { grid-column: 2; grid-row: 1; align-self: start; padding-top: 4vh; }
.process__bar { height: 2px; background: var(--line); margin-top: 32px; max-width: 360px; }
.process__bar i { display: block; height: 100%; width: 100%; background: var(--gelb); transform: scaleX(0); transform-origin: left; }
.process__steps { grid-column: 2; grid-row: 1; align-self: end; list-style: none; margin: 0; padding: 0 0 4vh; position: relative; height: 40vh; }
.step { position: absolute; left: 0; bottom: 0; opacity: 0; transform: translateY(40px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.step.is-active { opacity: 1; transform: none; }
.step.is-past { opacity: 0; transform: translateY(-40px); }
.step span { color: var(--gelb); }
.step strong { display: block; font-family: var(--f-head); font-weight: 700; font-size: clamp(64px, 9vw, 150px); letter-spacing: -.05em; line-height: .9; margin: 8px 0 18px; }
.step p { color: var(--muted); margin: 0; max-width: 34ch; font-size: 17px; }
@media (max-width: 860px) {
  .process__sticky { grid-template-columns: 1fr; grid-template-rows: auto auto 1fr; align-content: start; gap: 28px; }
  .process__head { grid-column: 1; grid-row: 1; padding-top: 0; }
  .process__steps { grid-column: 1; grid-row: 2; height: 210px; align-self: start; padding: 0; }
  .step { top: 0; bottom: auto; }
  .step strong { font-size: 56px; margin: 6px 0 12px; }
  .step p { font-size: 15px; }
}

/* ---------- Values / prism ---------- */
.values { height: 320vh; position: relative; }
.values__sticky { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 0 var(--gutter); perspective: 1600px; }
.prism-wrap { display: flex; flex-direction: column; gap: 24px; }
.values__pre { font-family: var(--f-head); font-size: clamp(22px, 2.4vw, 34px); color: var(--muted); }
.prism { --h: clamp(80px, 13vw, 210px); position: relative; height: var(--h); transform-style: preserve-3d; }
.prism__face {
  position: absolute; inset: 0; display: flex; align-items: center;
  font-family: var(--f-head); font-weight: 700; letter-spacing: -.05em; line-height: 1;
  font-size: clamp(44px, 9.5vw, 170px); white-space: nowrap;
  backface-visibility: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: var(--graphit);
}
.prism__face:nth-child(1) { transform: rotateX(0deg) translateZ(calc(var(--h) / 2)); }
.prism__face:nth-child(2) { transform: rotateX(-90deg) translateZ(calc(var(--h) / 2)); color: var(--beton); }
.prism__face:nth-child(3) { transform: rotateX(-180deg) translateZ(calc(var(--h) / 2)); color: var(--gelb); }
.prism__face:nth-child(4) { transform: rotateX(-270deg) translateZ(calc(var(--h) / 2)); font-size: clamp(30px, 7.4vw, 134px); }

/* ---------- Contact ---------- */
.contact { min-height: 100vh; display: flex; flex-direction: column; justify-content: space-between; padding: 18vh var(--gutter) 32px; position: relative; }
.contact__title { font-size: clamp(44px, 7.6vw, 128px); margin-bottom: 8vh; max-width: 14ch; }
.contact__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 260px)); gap: 40px; margin-bottom: 8vh; }
.contact__grid p { margin: 0; font-size: 18px; }
.contact__grid .label { color: var(--gelb); font-size: 11px; margin-bottom: 12px; }
.contact__grid a { text-decoration: none; background: linear-gradient(var(--gelb), var(--gelb)) 0 100% / 0 1px no-repeat; transition: background-size .4s var(--ease); }
.contact__grid a:hover { background-size: 100% 1px; }
.stamp { transform-origin: left center; }
.footer { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--muted); padding-top: 28px; margin-top: 12vh; border-top: 1px solid var(--line); font-size: 11px; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--weiss); }
@media (max-width: 760px) { .contact__grid { grid-template-columns: 1fr; gap: 28px; } }

/* ---------- Mobile tweaks ---------- */
@media (max-width: 760px) {
  .hero { align-items: flex-end; padding-top: 38vh; padding-bottom: 90px; }
  .hero__title { font-size: 46px; margin-bottom: 20px; }
  .hero__lead { font-size: 16px; margin-bottom: 24px; }
  .btn { padding: 13px 20px; font-size: 14px; }
  .system__text .body { font-size: 15px; }
  .hero__coords { display: none; }
  .system__sticky { padding-top: 110px; }
  .services__stack { max-width: none; }
  .panel { grid-template-columns: 1fr; padding: 28px 24px; min-height: 0; margin-left: 0 !important; }
  .label3d { font-size: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  .grain, .marquee__track, .hero__scroll i::after { animation: none; }
}
