/* ========== 1. Schriftarten einbinden ========== */
@font-face {
  font-family: 'expletus-sans';
  src: url('fonts/expletus-sans-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
}

@font-face {
  font-family: 'sen';
  src: url('sen-v11-latin-regular.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
}

@font-face {
  font-family: 'sen';
  src: url('sen-v11-latin-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
}

@font-face {
  font-family: 'sen';
  src: url('sen-v11-latin-800.woff2') format('woff2');
  font-weight: 800;
  font-style: normal;
}

/* ========== 2. Globale Variablen ========== */
:root {
  /* Farben */
  --color-bg: #000;
  --color-text: #fff;
  --color-accent: #ddd;
  --color-border: #fff;
  --color-muted: #aaa;

  /* Schriftfamilien */
  --font-body: 'sen', sans-serif;
  --font-heading: 'expletus-sans', sans-serif;
  --font-ui: 'sen', sans-serif;

  /* Schriftgrößen */
  --fs-base: 18px;
  --fs-sm: 0.875rem;
  --fs-md: 1.125rem;
  --fs-lg: 1.5rem;
  --fs-xl: 2rem;

  /* Abstände */
  --space-xs: 0.5em;
  --space-sm: 1em;
  --space-md: 2em;
  --space-lg: 4em;
}

/* ========== 3. Basisstil ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: var(--fs-base);
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: 1.8;
}

body {
  font-weight: 300;
  padding: 0;
  margin: 0;
}

/* ========== 4. Layout ========== */
.container {
  max-width: 720px;
  margin-left: 5vw;
  padding: var(--space-md);
}

header {
  margin-bottom: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.logo {
  width: 72px;
  height: auto;
}

/* ========== 5. Typografie ========== */
h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 600;
}

h1 {
  font-size: var(--fs-xl);
  margin-bottom: var(--space-xs);
}

h2 {
  font-size: var(--fs-lg);
  margin-top: var(--space-md);
  margin-bottom: var(--space-xs);
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 0.3em;
}

h3 {
  font-size: var(--fs-md);
  margin-bottom: var(--space-xs);
}

p {
  font-size: var(--fs-base);
  margin-bottom: var(--space-sm);
}

ul {
  list-style: none;
  padding-left: 0;
  margin-bottom: var(--space-lg);
}

ul li {
  margin-bottom: var(--space-sm);
}

/* ========== 6. Navigation ========== */
nav {
  display: flex;
  gap: var(--space-sm);
  font-family: var(--font-heading);
  font-weight: 600;
}

nav a {
  color: var(--color-text);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  padding-bottom: 2px;
  transition: border-color 0.3s;
}

nav a:hover {
  border-color: var(--color-text);
}

/* ========== 7. Footer ========== */
footer {
  margin-top: var(--space-lg);
  text-align: left;
  font-size: var(--fs-sm);
  opacity: 0.6;
  padding: 0;
}

/* ========== 8. Custom Cursor (optional) ========== */
.custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 1500px;
  height: 1500px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.15s ease-out, opacity 0.15s ease-out;
  opacity: 0.9;
  mix-blend-mode: difference;
  background: radial-gradient(circle, white 0%, rgba(255, 255, 255, 0) 70%);
}

.custom-cursor.grow {
  transform: translate(-50%, -50%) scale(2);
}

/* ========== 9. Medienabfrage (Responsive) ========== */
@media (max-width: 768px) {
  :root {
    --fs-base: 16px;
    --fs-lg: 1.25rem;
    --fs-xl: 1.75rem;
  }

  .container {
    padding: var(--space-sm);
  }

  nav {
    flex-direction: column;
    gap: var(--space-xs);
  }

  header {
    flex-direction: column;
    align-items: flex-start;
  }

  .logo {
    width: 56px;
  }
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
/* ========== 10. Kontaktformular ========== */
form {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

label {
  font-weight: 600;
  font-family: var(--font-ui);
  font-size: var(--fs-sm);
}

input,
textarea {
  padding: 0.75em;
  font-size: var(--fs-base);
  font-family: var(--font-body);
  background-color: #111;
  border: 1px solid var(--color-border);
  color: var(--color-text);
  border-radius: 4px;
  width: 100%;
}

textarea {
  min-height: 160px;
  resize: vertical;
}

button[type="submit"] {
  margin-top: var(--space-sm);
  padding: 0.75em 1.5em;
  font-family: var(--font-ui);
  background-color: var(--color-text);
  color: var(--color-bg);
  border: none;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease;
}

button[type="submit"]:hover {
  background-color: var(--color-accent);
}

.project-details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  opacity: 0.8;
  margin-top: 0.5em;
}

.project-item.open .project-details {
  max-height: 1000px; /* hoch genug für Text + Bilder */
}

.project-toggle {
  background: none;
  border: none;
  text-align: left;
  width: 100%;
  padding: 0.5em 0;
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  color: var(--color-text);
}

.project-content img {
  max-height: 800px;
  width: auto;
  height: auto;
  display: block;
  margin-bottom: 1em;
}
.slideshow {
  position: relative;
  max-height: 800px;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 10px;
}

.slideshow .slides {
  position: relative;
  width: 100%;
  display: flex;
  flex-wrap: nowrap;
}

.slideshow img {
  max-height: 800px;
  max-width: 100%;
  display: none;
  margin: auto;
  transition: opacity 0.5s ease;
}

.slideshow img.active {
  display: block;
}

.slideshow button {
  background: rgba(0,0,0,0.3);
  color: white;
  border: none;
  font-size: 2rem;
  padding: 0.5em 0.8em;
  cursor: pointer;
  z-index: 10;
  transition: background 0.2s;
}

.slideshow button:hover {
  background: rgba(0,0,0,0.6);
}


.slideshow .slide {
  max-height: 800px;
  width: auto;
  display: none;
}

.slideshow .slide.active {
  display: block;
}
/* Hintergrundvideo: fixiert, vollflächig */
.bg-video {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  z-index: -1; /* hinter den Inhalt */
  pointer-events: none; /* Klicks gehen durch */
}

/* Inhalt über dem Video */
.content {
  position: relative;
  z-index: 1;
  color: white;
  text-align: center;
  padding: 20vh 10vw;
}
::-webkit-scrollbar {
  width: 0.625rem;
  height: 0.625rem;
}

::-webkit-scrollbar-thumb {
  background: #111;
  border-radius: 0.3125rem;
  box-shadow: inset 0.125rem 0.125rem 0.125rem rgba(255, 255, 255, 0.25),
    inset -0.125rem -0.125rem 0.125rem rgba(0, 0, 0, 0.25);
  cursor: default;
}

::-webkit-scrollbar-track {
  background: #333;
}

::selection {
  background: #fff;
  color: #333;
}

canvas,
.editor,
#controls {
  grid-row: 1;
  grid-column: 1;
}

#controls {display:none}

canvas {
  position:fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  object-fit: contain;
  background: black;
  touch-action: none;
  z-index: -2;
}

.editor,
.overlay,
#error {
  font-family: 'Courier New', Courier, monospace;
  background: repeating-linear-gradient(0deg, #000a, #1119, #000a .25rem);
  padding: 1em;
}

.editor {
  color: #fefefe;
  tab-size: 2;
  border: none;
  resize: none;
}

.editor:focus {
  outline: none;
}

#error {
  grid-row: 2;
  grid-column: 1;
  margin: 0;
  padding-block: 0;
  padding-top: .5em;
  color: firebrick;
  overflow: auto;
  text-wrap: pretty;
}

#indicator {
  visibility: hidden;
  position: absolute;
  top: calc(var(--top, 0px) - var(--scroll-top, 0px));
  width: 0;
  height: 0;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 10px solid firebrick;
  transform: translateY(-25%);
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  margin: 0;
}

.editor,
.overlay {
  font-size: 1rem;
  line-height: 1.2;
  white-space: pre;
}

#controls {
  position: fixed;
  top: 1em;
  right: 2em;
}

.controls {
  position: relative;
  display: flex;
  gap: 1.5em;
  padding: .5em 1.25em;
  background: #1111;
  border-radius: 4px;
}

.controls::before,
.controls::after {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0;
  transform: scale(.95);
  border-radius: inherit;
  opacity: 0;
}

.controls::before {
  background: #aef;
  animation: pulse 2s infinite;
}

.controls::after {
  background: #fefefe66;
  transition: transform 200ms ease-in-out;
}

.controls:hover::before,
.controls:hover::after {
  opacity: 1;
}

.controls:hover::before {
  transform: scale(.98);
  filter: blur(2px);
}

.controls:hover::after {
  transform: scale(1.025, 1.1);
}

.controls:hover {
  background: #111f;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.0125);
  }

  100% {
    transform: scale(1);
  }
}

.hidden {
  display: none !important;
}

.opaque {
  opacity: 1 !important;
  background: #111 !important;
}

input {
  all: unset;
  opacity: .2;
  filter: saturate(0) invert(1);
  cursor: pointer;
  transition: opacity 200ms ease-in-out;
  padding: .25em .5em;
}

input:hover {
  opacity: 1;
}

.icon {
  text-align: center;
  line-height: 1;
}

#btnToggleView {
  width: 1.25em;
}

#btnToggleView::after {
  content: '👁';
}

#btnToggleView:checked::after {
  content: '✏️';
}

#btnToggleResolution::after {
  content: '1️⃣';
}

#btnToggleResolution:checked::after {
  content: '2️⃣';
}

#btnReset::after {
  content: '⏮️';
}

/* Nur das erste Bild ist sichtbar */
.gallery-grid {
  max-width: 600px;
  margin: auto;
}

.gallery-grid img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  display: block;
}

/* Versteckte Links für Lightbox */
.hidden-lightbox {
  display: none;
}

.preview {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}
