/* Schriften lokal ausgeliefert (keine Verbindung zu Google Fonts) */
@font-face { font-family: 'DM Sans'; src: url('../fonts/dm-sans-400.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'DM Sans'; src: url('../fonts/dm-sans-500.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'DM Sans'; src: url('../fonts/dm-sans-600.woff2') format('woff2'); font-weight: 600 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Manrope'; src: url('../fonts/manrope-500.woff2') format('woff2'); font-weight: 400 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Manrope'; src: url('../fonts/manrope-800.woff2') format('woff2'); font-weight: 700 800; font-style: normal; font-display: swap; }
@font-face { font-family: 'Jones Dots'; src: url('../fonts/jones-dots.woff2') format('woff2'); font-weight: 100 900; font-display: swap; unicode-range: U+002E, U+003A, U+00B7, U+2022; }

:root {
  --bg: #0a0a0c;
  --bg-elevated: #131316;
  --bg-elevated-2: #1a1a1e;
  --glass: rgba(255,255,255,0.055);
  --glass-strong: rgba(255,255,255,0.09);
  --glass-border: rgba(255,255,255,0.12);
  --glass-sheen: rgba(255,255,255,0.5);
  --text: #f2f0ec;
  --text-muted: #99979c;
  --text-faint: #616166;
  --accent: #ff5a1f;
  --accent-soft: rgba(255,90,31,0.14);
  --accent-2: #ffb02e;
  --line: rgba(255,255,255,0.09);
  --shadow: rgba(0,0,0,0.45);
}
:root[data-theme="light"] {
  --bg: #f6f5f1;
  --bg-elevated: #ffffff;
  --bg-elevated-2: #ffffff;
  --glass: rgba(255,255,255,0.55);
  --glass-strong: rgba(255,255,255,0.75);
  --glass-border: rgba(20,18,15,0.10);
  --glass-sheen: rgba(255,255,255,0.9);
  --text: #17161a;
  --text-muted: #605e5f;
  --text-faint: #9a9899;
  --accent: #e2530f;
  --accent-soft: rgba(226,83,15,0.10);
  --accent-2: #c77a08;
  --line: rgba(20,18,15,0.10);
  --shadow: rgba(20,18,15,0.12);
}

* { box-sizing: border-box; }
img, video {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  user-drag: none;
  pointer-events: auto;
}
:root {
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
html { scroll-behavior: smooth; scroll-padding-top: env(safe-area-inset-top, 0px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Jones Dots', 'DM Sans', system-ui, -apple-system, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  transition: background 0.4s ease, color 0.4s ease;
  overflow-x: hidden;
}
h1, h2, h3, .display { font-family: 'Jones Dots', 'Manrope', sans-serif; font-weight: 500; letter-spacing: -0.03em; margin: 0; }
h1 em, h2 em { font-style: normal; color: var(--accent); font-weight: inherit; }
.mono { font-family: 'Jones Dots', 'DM Sans', sans-serif; letter-spacing: 0.03em; }
a { color: inherit; }
img { max-width: 100%; display: block; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 28px; }

.glow-field {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(600px 400px at 85% -5%, var(--accent-soft), transparent 60%),
    radial-gradient(500px 350px at -5% 40%, rgba(255,176,46,0.08), transparent 60%);
  transition: background 0.4s ease;
}

/* ---------- NAV ---------- */
nav {
  position: fixed; top: calc(18px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); z-index: 100;
  width: calc(100% - 40px); max-width: 640px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 12px 12px 22px; border-radius: 999px;
  background: var(--glass); backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-border); box-shadow: 0 8px 32px var(--shadow), inset 0 1px 0 var(--glass-sheen);
}
.logo { font-family: 'Manrope', sans-serif; font-weight: 800; font-size: 1.15rem; letter-spacing: -0.02em; display: inline-flex; align-items: flex-start; text-decoration: none; }
.logo .brand-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin: 4px 0 0 5px; flex-shrink: 0; }
.nav-links { display: flex; gap: 26px; font-size: 0.88rem; color: var(--text-muted); }
.nav-links a { text-decoration: none; transition: color 0.2s ease; }
.nav-links a:hover { color: var(--text); }
.nav-right { display: flex; align-items: center; gap: 14px; }
.theme-toggle {
  position: relative; width: 52px; height: 30px; border-radius: 999px;
  background: rgba(127,127,127,0.18); border: 1px solid var(--glass-border); cursor: pointer; padding: 0; flex-shrink: 0;
}
.theme-toggle .knob {
  position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: linear-gradient(150deg, var(--accent-2), var(--accent));
  transition: transform 0.35s cubic-bezier(.6,.2,.2,1.4);
  display: flex; align-items: center; justify-content: center; font-size: 11px; box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
:root[data-theme="light"] .theme-toggle .knob { transform: translateX(22px); }
@media (max-width: 560px) { nav { padding-left: 18px; } .nav-links { gap: 16px; font-size: 0.82rem; } }
@media (max-width: 380px) { .nav-links { display: none; } }

/* ---------- INTRO ---------- */
.intro { position: relative; z-index: 1; padding: calc(150px + env(safe-area-inset-top, 0px)) 0 60px; }
.eyebrow {
  font-family: 'Jones Dots', 'DM Sans', sans-serif; font-size: 0.78rem; color: var(--accent);
  display: flex; align-items: center; gap: 10px; margin-bottom: 22px;
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--accent); }
.intro-row { display: grid; grid-template-columns: 1.3fr 0.9fr; gap: 40px; align-items: end; }
.intro h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); line-height: 1.02; letter-spacing: -0.045em; }
.intro-side p { color: var(--text-muted); font-size: 1.05rem; max-width: 34ch; }
.work-link {
  margin-top: 22px; display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none; font-weight: 600; font-size: 0.94rem; color: var(--text);
  border-bottom: 1px solid var(--line); padding-bottom: 4px; transition: border-color 0.2s ease, gap 0.2s ease;
}
.work-link:hover { border-color: var(--accent); gap: 12px; }
.work-link span { color: var(--accent); }
@media (max-width: 760px) { .intro-row { grid-template-columns: 1fr; } }

/* ---------- HERO IMAGE ---------- */
.hero-shot { position: relative; z-index: 1; padding: 20px 0 100px; }
.hero-frame {
  position: relative; border-radius: 28px; overflow: hidden; aspect-ratio: 16/9;
  border: 1px solid var(--glass-border); box-shadow: 0 30px 70px -25px var(--shadow);
  clip-path: polygon(0 0, 100% 0, 100% 94%, 92% 100%, 0 100%);
  background: #000;
}
.hero-frame .video-bg {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  filter: blur(38px) saturate(1.3) brightness(0.55); transform: scale(1.15);
}
.hero-frame .video-fg {
  position: relative; z-index: 1; width: 100%; height: 100%; object-fit: contain;
  filter: saturate(1.03);
}
@media (max-width: 700px) { .hero-frame { aspect-ratio: 4/5; } }
.hero-shade { position: absolute; inset: 0; z-index: 1; background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.05) 45%, transparent 70%); }
.image-tag {
  position: absolute; top: 22px; left: 22px; z-index: 2; display: flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: 999px; font-family: 'Jones Dots', 'DM Sans', sans-serif; font-size: 0.72rem; letter-spacing: 0.04em;
  background: var(--glass-strong); backdrop-filter: blur(18px) saturate(180%); -webkit-backdrop-filter: blur(18px) saturate(180%);
  border: 1px solid var(--glass-border); color: var(--text);
}
.tag-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.hero-caption {
  position: absolute; left: 22px; right: 22px; bottom: 22px; z-index: 2;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 20px;
}
.hero-caption .small-label { font-family: 'Jones Dots', 'DM Sans', sans-serif; font-size: 0.72rem; color: var(--accent); }
.hero-caption h2 { font-size: clamp(1.4rem, 3vw, 2rem); color: #fff; margin-top: 6px; }
.round-link {
  width: 52px; height: 52px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 1.2rem;
  background: var(--glass-strong); backdrop-filter: blur(18px) saturate(180%); -webkit-backdrop-filter: blur(18px) saturate(180%);
  border: 1px solid var(--glass-border); text-decoration: none; color: var(--text);
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.round-link:hover { transform: scale(1.08) rotate(8deg); border-color: var(--accent); }

/* ---------- SECTION HEAD ---------- */
section { position: relative; z-index: 1; }
.works { padding: 40px 0 120px; }
.section-head {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 20px;
  margin-bottom: 50px; border-bottom: 1px solid var(--line); padding-bottom: 26px;
}
.section-head h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
.section-head p { color: var(--text-muted); font-size: 0.98rem; max-width: 30ch; text-align: right; }
@media (max-width: 700px) { .section-head { flex-direction: column; align-items: flex-start; } .section-head p { text-align: left; } }

/* ---------- PROJECT GALLERY ---------- */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.project-card {
  position: relative; border-radius: 18px; overflow: hidden; cursor: zoom-in;
  background: var(--bg-elevated-2); border: 1px solid var(--line);
  aspect-ratio: 4/5;
  display: block; width: 100%; padding: 0; font: inherit; color: inherit; text-align: left;
  -webkit-tap-highlight-color: transparent;
}
.project-card img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.02); transition: transform 0.6s cubic-bezier(.2,.8,.2,1);
}
.project-card:hover img { transform: scale(1.08); }
.project-card::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.1) 50%, transparent 70%);
  pointer-events: none;
}
.project-zoom {
  position: absolute; top: 16px; right: 16px; width: 38px; height: 38px; border-radius: 50%;
  background: var(--glass-strong); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border); display: flex; align-items: center; justify-content: center;
  font-size: 1rem; color: var(--text); z-index: 1;
  opacity: 0; transform: translateY(-6px); transition: opacity 0.25s ease, transform 0.25s ease;
}
.project-card:hover .project-zoom { opacity: 1; transform: translateY(0); }
.project-info { position: absolute; left: 18px; right: 18px; bottom: 16px; z-index: 1; }
.project-info .cat {
  display: inline-block; font-family: 'Jones Dots', 'DM Sans', sans-serif; font-size: 0.68rem; color: var(--accent);
  letter-spacing: 0.05em; margin-bottom: 6px;
}
.project-info .title { display: block; color: #fff; font-size: 1.15rem; font-family: 'Jones Dots', 'Manrope', sans-serif; font-weight: 500; letter-spacing: -0.03em; line-height: 1.3; }
.project-info .count { color: rgba(255,255,255,0.65); font-size: 0.8rem; margin-top: 3px; display: block; font-family: 'Jones Dots', 'DM Sans', sans-serif; }

@media (max-width: 860px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .gallery { grid-template-columns: 1fr; } }

/* ---------- ABOUT ---------- */
.about { padding: 40px 0 130px; }
.about-content { max-width: 780px; }
.about h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); margin-bottom: 30px; }
.about-copy p { font-size: 1.08rem; color: var(--text-muted); max-width: 62ch; }
.about-copy p + p { margin-top: 16px; }
.specialties { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 28px; }
.specialties span {
  padding: 9px 18px; border-radius: 999px; font-size: 0.84rem; font-weight: 500;
  background: var(--glass); backdrop-filter: blur(16px) saturate(180%); -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid var(--glass-border);
}

/* ---------- FOOTER ---------- */
footer { border-top: 1px solid var(--line); padding: 36px 0; }
footer .wrap {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px;
}
.footer-left { display: flex; align-items: center; gap: 16px; }
.footer-tag { font-family: 'Jones Dots', 'DM Sans', sans-serif; font-size: 0.74rem; color: var(--text-faint); letter-spacing: 0.03em; }
.footer-right { display: flex; align-items: center; gap: 18px; }
.icon-link {
  width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--glass); border: 1px solid var(--glass-border); color: var(--text-muted); text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.icon-link:hover { color: var(--accent); border-color: var(--accent); }
.copyright { font-size: 0.78rem; color: var(--text-faint); }
.legal-links { display: flex; align-items: center; gap: 14px; }
.legal-link {
  font-size: 0.78rem; color: var(--text-muted); text-decoration: none; background: none; border: none;
  cursor: pointer; font-family: inherit; padding: 0;
}
.legal-link:hover { color: var(--accent); }

/* ---------- LEGAL MODAL ---------- */
.legal-modal {
  position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center;
  padding: 24px; background: rgba(6,6,7,0.78);
  backdrop-filter: blur(22px) saturate(160%); -webkit-backdrop-filter: blur(22px) saturate(160%);
  opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease;
}
:root[data-theme="light"] .legal-modal { background: rgba(30,28,24,0.55); }
.legal-modal.is-open, html:not(.js) .legal-modal:target { opacity: 1; visibility: visible; }
.legal-panel {
  position: relative; width: min(680px, 94vw); max-height: 82vh; overflow-y: auto;
  border-radius: 22px; padding: 40px 34px 34px;
  background: var(--glass-strong); backdrop-filter: blur(26px) saturate(180%); -webkit-backdrop-filter: blur(26px) saturate(180%);
  border: 1px solid var(--glass-border); box-shadow: 0 40px 80px -20px rgba(0,0,0,0.6), inset 0 1px 0 var(--glass-sheen);
  transform: scale(0.96); transition: transform 0.3s cubic-bezier(.2,.8,.2,1);
}
.legal-modal.is-open .legal-panel, html:not(.js) .legal-modal:target .legal-panel { transform: scale(1); }
.legal-panel h2 { font-size: 1.7rem; margin-bottom: 4px; }
.legal-panel .legal-date { font-size: 0.8rem; color: var(--text-faint); margin-bottom: 26px; }
.legal-panel section { margin-bottom: 24px; }
.legal-panel h3 { font-size: 1rem; color: var(--accent); margin-bottom: 10px; }
.legal-panel address { font-style: normal; color: var(--text-muted); font-size: 0.94rem; line-height: 1.7; }
.legal-panel p { color: var(--text-muted); font-size: 0.92rem; line-height: 1.7; margin: 0 0 10px; }
.legal-panel p:last-child { margin-bottom: 0; }
.legal-panel a { color: var(--accent); text-decoration: none; }
.legal-panel a:hover { text-decoration: underline; }
.legal-close {
  position: absolute; top: 16px; right: 16px; width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--glass-border); background: var(--glass); backdrop-filter: blur(14px);
  color: var(--text); font-size: 1rem; cursor: pointer; display: flex; align-items: center; justify-content: center;
  text-decoration: none; transition: background 0.2s ease, transform 0.2s ease;
}
.legal-close:hover { background: var(--accent); color: #100a06; transform: rotate(90deg); }

/* ---------- LIGHTBOX ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center;
  padding: 24px; background: rgba(6,6,7,0.82);
  backdrop-filter: blur(22px) saturate(160%); -webkit-backdrop-filter: blur(22px) saturate(160%);
  opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease;
}
:root[data-theme="light"] .lightbox { background: rgba(30,28,24,0.6); }
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox-frame {
  position: relative; max-width: min(1000px, 92vw); max-height: 88vh; border-radius: 20px; overflow: hidden;
  border: 1px solid var(--glass-border); background: var(--glass);
  box-shadow: 0 40px 80px -20px rgba(0,0,0,0.6), inset 0 1px 0 var(--glass-sheen);
  transform: scale(0.96); transition: transform 0.3s cubic-bezier(.2,.8,.2,1);
  display: flex; align-items: center; justify-content: center;
}
.lightbox.is-open .lightbox-frame { transform: scale(1); }
.lightbox-frame img { max-width: min(1000px, 92vw); max-height: 88vh; width: auto; height: auto; object-fit: contain; display: block; }
.lightbox-top {
  position: absolute; top: 14px; left: 16px; right: 16px; display: flex; justify-content: space-between; align-items: center; z-index: 2;
}
.lightbox-counter {
  font-family: 'Jones Dots', 'DM Sans', sans-serif; font-size: 0.76rem; color: var(--text);
  padding: 7px 14px; border-radius: 999px; background: var(--glass-strong); backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
}
.lightbox-close {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--glass-border);
  background: var(--glass-strong); backdrop-filter: blur(14px); color: var(--text); font-size: 1rem;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
}
.lightbox-close:hover { background: var(--accent); color: #100a06; transform: rotate(90deg); }
.lightbox-caption {
  position: absolute; left: 16px; right: 16px; bottom: 14px; z-index: 2;
  padding: 12px 18px; border-radius: 12px; background: var(--glass-strong);
  backdrop-filter: blur(18px) saturate(180%); -webkit-backdrop-filter: blur(18px) saturate(180%);
  border: 1px solid var(--glass-border); font-size: 0.86rem;
}
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--glass-border); background: var(--glass-strong); backdrop-filter: blur(16px);
  color: var(--text); font-size: 1.2rem; cursor: pointer; display: flex; align-items: center; justify-content: center;
  z-index: 2; transition: background 0.2s ease, border-color 0.2s ease;
}
.lightbox-nav:hover { border-color: var(--accent); }
.lightbox.is-single .lightbox-nav { display: none; }
.lightbox-prev { left: 10px; }
.lightbox-next { right: 10px; }
@media (max-width: 640px) {
  .lightbox-nav { width: 38px; height: 38px; font-size: 1rem; }
}

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* Hilfsklassen (ersetzen Inline-Styles, damit die strenge CSP greift) */
.accent { color: var(--accent); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- 404 ---------- */
.error-page {
  position: relative; z-index: 1; min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 120px 24px 80px;
}
.error-page .eyebrow { justify-content: center; }
.error-page h1 { font-size: clamp(2.4rem, 7vw, 3.6rem); line-height: 1.05; margin-bottom: 18px; }
.error-page p { color: var(--text-muted); font-size: 1.02rem; max-width: 42ch; margin: 0 0 32px; }
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px; padding: 14px 26px; border-radius: 12px;
  text-decoration: none; font-weight: 600; font-size: 0.94rem; color: #100a06;
  background: var(--accent); box-shadow: 0 10px 30px -8px rgba(255,90,31,0.5);
}
.nav-solo { justify-content: center; width: auto; padding: 12px 22px; }
