/* ---------- Schriften (alle selbst gehostet im Ordner "font/") ----------
   Overdose: Überschriften · Geist Mono: Fließtext, Nav, Textboxen und Button. */
@font-face {
  font-family: 'Geist Mono';
  src: url('../font/GeistMono-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Overdose';
  src: url('../font/Overdose.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* ---------- Design-Tokens: hier tauschst du deine Werte ein ---------- */
:root {
  --bg: #001aff;
  --fg: #ffffff;
  --muted: #abcdff;
  --line: rgba(171, 205, 255, 0.35);

  --font-display: var(--font-mono);   /* Nav-Schriftzug, Loader */
  --heading-tracking: 0.06em;   /* Buchstabenabstand der Überschriften */
  --font-heading: 'Overdose', 'Geist Mono', Arial, sans-serif;   /* alle Überschriften (H1, H2) */
  --font-body: var(--font-mono);   /* Fließtext */
  --font-mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;   /* Textboxen, Button */

  --glass-bg: rgba(255, 255, 255, 0.06);
  --glass-line: rgba(255, 255, 255, 0.12);
  --glass-blur: 14px;

  --logo-size: clamp(14rem, 42vh, 26rem);   /* Höhe des Hero-Logos (Desktop) */
  --logo-mobile-width: min(72vw, 20rem);    /* Breite des Hero-Logos (mobil) */
  --window-width: 100%;                     /* Fenster unter dem Logo: so breit wie das Logo */
  --window-gap: 1.25rem;                    /* Abstand zum Logo */
  --window-font: clamp(0.85rem, 1.1vw, 1rem);
  --window-body-height: 3.2em;              /* feste Höhe des Textbereichs */

  --cursor-size: 44px;          /* Größe des Stern-Cursors */
  --trail-color: #ffffff;       /* Farbe des Kreide-Tracers */
  --trail-color-invert: #001aff;    /* Tracerfarbe über weißem Grund */
  --trail-width: 3px;           /* Strichbreite des Tracers */
  --trail-life: 900;            /* Lebensdauer der Spur in Millisekunden */
  --cursor-color: #ffffff;      /* Farbe des Stern-Cursors */
  --cursor-color-invert: #001aff;   /* Cursorfarbe über weißem Grund */
  --loader-icon-size: 3.5rem;   /* Größe des drehenden Icons */
  --loader-spin: 1.6s;          /* eine Umdrehung */
  --loader-dots: 1.2s;          /* ein Durchlauf 1 → 2 → 3 Punkte */
  --enter-time: 0.9s;       /* Dauer des Übergangs nach dem Laden */
  --bg-image-opacity: 0.15;   /* Deckkraft des Hintergrundbilds über dem Blau */
  --bg-parallax: 14px;        /* maximale Mitbewegung des Hintergrundbilds mit der Maus */
  --bg-scale: 1.05;           /* Vergrößerung des Hintergrundbilds als Reserve für die Bewegung */
  --btn-gap: 0.75rem;            /* Abstand zwischen Buttons */
  --about-mobile-width: 66vw;    /* Breite des creative-head-Bilds (mobil) */
  --about-text-width: min(34rem, 52vw);   /* Textspalte bei creative head */
  --section-window-width: min(22rem, 100%); /* feste Breite des Textfensters unter dem Fließtext */
  --about-gap: clamp(1.5rem, 4vw, 4rem);   /* Abstand Text ↔ Bild bei creative head */
  --about-media-width: clamp(14rem, 24vw, 22rem);   /* Breite der Bildfläche */
  --nav-star-size: clamp(1.25rem, 1.6vw, 1.5rem);   /* Stern in der Nav: 20–24 px, skaliert mit der Viewportbreite */
  --nav-mobile-bottom: 1rem;    /* Abstand der Nav vom unteren Rand (mobil) */
  --nav-mobile-inset: 1rem;     /* seitlicher Abstand von Nav und Instagram-Button (mobil) */
  --spread: 1;              /* Faktor für seitliche Verschiebung (--x/--y), wird mobil reduziert */
  --perspective: 900px;     /* kleiner = stärkerer Tunnel-Effekt */
  --img-inset: calc(32vw - min(38rem, 86vw) / 2);   /* Randabstand der großen Bilder */
  --fade-far: 1000px;       /* ab dieser Entfernung werden Objekte sichtbar */
  --fade-near: 350px;       /* so weit vor der Kamera beginnen sie zu verschwinden */
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { background: var(--bg); color: var(--fg); -webkit-text-size-adjust: 100%; }

/* Überschriften nur so breit wie ihr Text, nicht wie der ganze Block */
h1, h2 { width: fit-content; max-width: 100%; }

/* Textmarkierung invertiert: weiße Fläche, Text in Seitenblau */
::selection      { background: var(--fg); color: var(--bg); }
::-moz-selection { background: var(--fg); color: var(--bg); }
body {
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.5;
  overflow-x: hidden;
  touch-action: none;          /* Wischgesten werden im Script in Schritte übersetzt */
  overscroll-behavior: none;   /* kein Gummiband-Effekt am Rand (mobil) */
  /* Höhe wird per JS auf die Raumtiefe gesetzt, damit nativ gescrollt werden kann */
}

/* ---------- Hintergrundbild über dem Blau ---------- */
.bg-image {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: var(--bg-image-opacity);
}
.bg-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(var(--bg-scale));   /* etwas größer, damit beim Verschieben keine Ränder entstehen */
  will-change: transform;
}

/* ---------- Bühne ---------- */
.scene {
  position: fixed;
  inset: 0;
  z-index: 1;                   /* über dem Hintergrundbild */
  perspective: var(--perspective);
  perspective-origin: 50% 50%;
  overflow: hidden;
}
.world {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  will-change: transform;
}

/* Ein Objekt im Raum. Position über --x / --y / --z (z = Tiefe, positiv = weiter hinten) */
.item {
  --x: 0px; --y: 0px; --z: 0px;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate3d(calc(-50% + var(--x) * var(--spread)), calc(-50% + var(--y) * var(--spread)), calc(var(--z) * -1));
  transform-style: preserve-3d;
  opacity: 0;
  will-change: opacity, filter;
  width: max-content;
  max-width: min(38rem, 86vw);
}

/* ---------- Inhaltstypen (nur Beispiele) ---------- */
.logo img,
.logo .logo__svg {
  display: block;
  height: var(--logo-size);
  width: auto;
  aspect-ratio: 292.91 / 238.84;          /* Seitenverhältnis des Logos */
}
/* Nur die gezeichneten Flächen des Logos sind "trefferfähig" – wichtig für die Cursor-Invertierung */
.logo { text-align: center; }
.logo .logo__svg { pointer-events: none; }
.logo .logo__svg path { pointer-events: fill; fill: var(--fg); }
.tagline, .about { text-align: left; }   /* linksbündig, Flattersatz */
.tagline { max-width: min(38rem, 86vw); }
.tagline h1 {
  font-family: var(--font-heading);
  letter-spacing: var(--heading-tracking);
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1;
  margin-bottom: 0.75rem;
  color: var(--fg);
}
.tagline p {
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  color: var(--muted);
  max-width: 48ch;
}
.about h2,
.section h2 {
  font-family: var(--font-heading);
  letter-spacing: var(--heading-tracking);
  font-size: clamp(1.6rem, 3.5vw, 3rem);
  line-height: 1;
  margin-bottom: 0.5rem;
}
.about p   { color: var(--muted); max-width: 52ch; }
/* Textfenster unter dem Fließtext (alle Geräte) */
.section .window--small {
  width: var(--section-window-width);   /* feste Breite, unabhängig vom Text */
  max-width: 100%;
  margin: 1.25rem 0 0;                  /* unter dem Text, linksbündig */
}

/* Design & Character Design: wie "Design with soul", nur nach links versetzt (--x im HTML) */
.section   { text-align: left; max-width: min(38rem, 86vw); }
.section h2 {                                    /* wie die H1 von "Design with soul" */
  font-size: clamp(2rem, 4vw, 3.5rem);
  margin-bottom: 0.75rem;
  color: var(--fg);
}
.section p {
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  color: var(--muted);
  max-width: 48ch;
}

.about p + p { margin-top: 1rem; }

/* Buttons (Glas-Pille wie die Nav) */
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--btn-gap);
  margin-top: 1.5rem;
}
/* Button im Look der Textfenster: weiße Fläche, Fenster-Radius und -Schatten, Monospace,
   drei Fensterpunkte links und ein Pfeil rechts – dazu eine sichtbare Unterkante,
   damit er als klickbares Element erkennbar ist. */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1rem 0.7rem 0.9rem;
  border-radius: 0.5rem;                        /* wie die Fenster */
  background: #ffffff;
  border: 1px solid #dcdcdc;
  border-bottom: 3px solid #cfcfcf;             /* "Taste": leichte Kante unten */
  box-shadow: 0 10px 30px rgba(0, 0, 40, 0.25); /* wie die Fenster */
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.2s ease, border-color 0.2s ease;
}
/* drei Fensterpunkte links */
.btn::before {
  content: "";
  flex: 0 0 auto;
  width: 1.6rem;
  height: 0.45rem;
  background:
    radial-gradient(circle, #c9c9c9 0.22rem, transparent 0.23rem) 0 50% / 0.55rem 0.45rem repeat-x;
  opacity: 0.9;
}
/* Pfeil rechts */
.btn::after {
  content: "→";
  font-family: inherit;
  transition: transform 0.2s ease;
}
.btn:hover,
.btn:focus-visible {
  background: #f4f4f4;
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(0, 0, 40, 0.3);
  outline: none;
}
.btn:hover::after,
.btn:focus-visible::after { transform: translateX(3px); }
.btn:active {
  transform: translateY(1px);
  border-bottom-width: 1px;
  box-shadow: 0 6px 18px rgba(0, 0, 40, 0.25);
}

/* creative head: Text links, Bildfläche rechts – so hoch wie Überschrift + Fließtext */
.about {
  display: flex;
  align-items: center;                          /* Bild vertikal mittig zu Überschrift + Text */
  gap: var(--about-gap);
  /* exakte Breite = Textspalte + Abstand + Bild → Zentrierung kann nicht abweichen */
  width: calc(var(--about-text-width) + var(--about-gap) + var(--about-media-width));
  max-width: 90vw;
}
/* definierte Breite, damit der Rahmen nicht am ungebrochenen Text hängt */
.about__text { flex: 0 0 var(--about-text-width); width: var(--about-text-width); }
.about__text p { max-width: none; }
.about__media {
  flex: 0 0 var(--about-media-width);
  overflow: hidden;
}
.about__media:not(:has(img)) {                 /* Rahmen nur als Platzhalter ohne Bild */
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
}
.about__media img {
  width: 100%;
  height: auto;                                 /* eigenes Seitenverhältnis, kein Beschnitt */
  display: block;
}
.about-media-mobile { display: none; }          /* nur mobil sichtbar, s. Media Query */
.about-media-mobile img {
  display: block;
  width: min(var(--about-mobile-width), 55vh);   /* ca. zwei Drittel der Breite, mittig */
  height: auto;
}
.contact a { color: var(--fg); }

/* ---------- Vollbilder ---------- */
.flat {
  position: fixed;
  inset: 0;
  z-index: 5;                   /* über dem 3D-Raum, unter Nav und Cursor */
  pointer-events: none;
}
/* Ein Streifen = drei Bilder direkt untereinander; wird per Script verschoben */
.strip {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transition: opacity 0.35s ease;
  will-change: transform;
}
.full {
  position: relative;
  left: auto; top: auto;
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  max-width: none;
  transform: none;              /* kein 3D-Versatz, kein Zoom */
  background: #ffffff;          /* Platzhalter, solange kein Bild vorhanden ist */
  overflow: visible;            /* Bild darf 1 px über die Naht ragen */
  opacity: 1;
  pointer-events: auto;
}
.full img {
  width: 100%;
  height: calc(100% + 2px);     /* ragt oben und unten 1 px über → keine Subpixel-Lücke an den Nähten */
  margin-top: -1px;
  object-fit: cover;
  display: block;
}
.full:not(:has(img)) { overflow: hidden; }

/* Großflächige Bilder im Fenster-Look (wie die Vergleichs-Slider), mit Rand zum Bildschirm.
   Die Klasse .full--window steht direkt im HTML, damit die Regeln unabhängig von :has() greifen. */
.full.full--window {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  overflow: hidden;
}
.full.full--window .img-window {
  width: calc(100vw - 2 * var(--img-inset, 6vw));
  max-width: none;
  margin: 0;
}
.full.full--window .img-window__body { line-height: 0; background: #ffffff; }
.full.full--window .img-window__body img,
.full.full--window .img-window__body img.is-rotated,
.full.full--window .img-window__body img.rotate-cw {
  display: block;
  position: static;        /* im Rahmen wird nicht gedreht und nichts freigestellt */
  width: 100%;
  height: auto;
  margin: 0;
  transform: none;
  object-fit: contain;
}
/* ---------- Fenster unter dem Logo ---------- */
.window {
  width: var(--window-width);
  margin: var(--window-gap) auto 0;
  background: #ffffff;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 40, 0.25);
  text-align: left;
  font-size: var(--window-font);
}
.window__bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.7rem;
  background: #ececec;
  border-bottom: 1px solid #dcdcdc;
}
.window__dot {
  width: 0.6em;
  height: 0.6em;
  border-radius: 50%;
  background: #c9c9c9;
  flex: 0 0 auto;
}
.window__name {
  margin-left: 0.5rem;
  color: #8a8a8a;
  font-size: 0.8em;
}
.window__body {
  display: flex;
  align-items: center;
  height: var(--window-body-height);        /* feste Höhe – wächst nicht mit dem Text */
  padding: 0 0.9rem;
  color: var(--bg);
  font-family: var(--font-mono);
  white-space: nowrap;                      /* kein Umbruch bei langen Wörtern */
  overflow: hidden;
}
.window__caret {
  display: inline-block;
  width: 0.6em;
  height: 1.1em;
  margin-left: 0.15em;
  background: var(--bg);
  animation: caret-blink 1s steps(1) infinite;
}
@keyframes caret-blink { 0%, 50% { opacity: 1; } 50.01%, 100% { opacity: 0; } }

/* ---------- Custom-Cursor (Glas) ---------- */
html.has-cursor, html.has-cursor a, html.has-cursor button { cursor: none; }
.trail {
  position: fixed;
  inset: 0;
  z-index: 199;                 /* direkt unter dem Cursor */
  width: 100%;
  height: 100%;
  pointer-events: none;
  display: none;
}
html.has-cursor .trail { display: block; }
.cursor {
  position: fixed;
  left: 0; top: 0;
  z-index: 200;
  width: var(--cursor-size);
  height: var(--cursor-size);
  pointer-events: none;
  opacity: 0;
  transition: width 0.25s ease, height 0.25s ease, opacity 0.2s ease;
  will-change: transform;
}
/* Form des Cursors = Stern-Logo (per CSS-Maske), einfarbig gefüllt */
.cursor::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--cursor-color);
  -webkit-mask: url("../bilder/star_hollow-studio_w.svg") center / contain no-repeat;
  mask: url("../bilder/star_hollow-studio_w.svg") center / contain no-repeat;
  transition: background-color 0.2s ease;
}
.cursor.is-visible { opacity: 1; }
.cursor.is-hover {                     /* über Links: größer und etwas heller */
  width: calc(var(--cursor-size) * 2);
  height: calc(var(--cursor-size) * 2);
}
.cursor.is-hover::after { background: var(--muted); }
.cursor.is-invert::after { background: var(--cursor-color-invert); }   /* über weißem Grund */
.cursor.is-invert.is-hover::after { background: rgba(0, 26, 255, 0.6); }
.cursor.is-down {                      /* beim Klicken: kurz zusammenziehen */
  width: calc(var(--cursor-size) * 0.75);
  height: calc(var(--cursor-size) * 0.75);
}

/* ---------- Loading-Screen ---------- */
.loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--bg);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  transition: opacity calc(var(--enter-time) * 0.7) ease;
}
.loader.is-done { opacity: 0; pointer-events: none; }
.loader__icon {
  display: block;
  width: var(--loader-icon-size);
  height: var(--loader-icon-size);
  object-fit: cover;
  animation: loader-spin var(--loader-spin) linear infinite;
}
/* Lade-Text im Fenster-Look: gleiche Box und Monospace-Schrift wie die Textfenster */
.loader__window {
  width: min(20rem, 80vw);
  margin: 0;
}
.loader__text {
  font: inherit;                    /* übernimmt die Monospace-Schrift des Fensters */
  color: inherit;                   /* Text in der Seitenfarbe, wie in den anderen Fenstern */
}
/* nur für Screenreader sichtbar */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
/* Punkte wechseln 1 → 2 → 3, wie im Spiel */
.loader__dots::after {
  content: ".";
  animation: loader-dots var(--loader-dots) steps(1) infinite;
}
@keyframes loader-dots {
  0%   { content: "."; }
  33%  { content: ".."; }
  66%  { content: "..."; }
}
@keyframes loader-spin { to { transform: rotate(360deg); } }
body.is-loading { overflow: hidden; }   /* kein Scrollen, solange geladen wird */

/* Nav und untere Leiste blenden nach dem Laden ein; der Hero-Flug kommt aus dem Script */
.nav, .hud, .social-float, .flat { transition: opacity var(--enter-time) ease; }
body.is-loading .nav,
body.is-loading .hud,
body.is-loading .social-float,
body.is-loading .flat { opacity: 0; }

/* Übergang von einer Unterseite zurück zur Startseite: Loader startet in deren Farbe.
   Nur aktiv, wenn das Script die Klasse "from-sub" gesetzt hat – der normale Loader bleibt unberührt. */
html.from-sub .loader { background-color: var(--bg); }
html.from-sub .loader::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--from-color), var(--from-color));
  animation: home-loader-fade 1.6s ease-in-out 0.2s both;
  pointer-events: none;
}
html.from-sub .loader > * { position: relative; z-index: 1; }
html.from-sub .loader .window__body {
  color: var(--bg);
  animation: home-loader-fg 1.6s ease-in-out 0.2s both;
}
html.from-sub .loader .window__caret {
  background: var(--bg);
  animation: caret-blink 1s steps(1) infinite,
             home-loader-caret 1.6s ease-in-out 0.2s both;
}
@keyframes home-loader-fade { from { opacity: 1; } to { opacity: 0; } }
@keyframes home-loader-fg { from { color: var(--from-color); } to { color: var(--bg); } }
@keyframes home-loader-caret { from { background-color: var(--from-color); } to { background-color: var(--bg); } }
@media (prefers-reduced-motion: reduce) {
  html.from-sub .loader::before { animation: none; opacity: 0; }
  html.from-sub .loader .window__body { animation: none; color: var(--bg); }
  html.from-sub .loader .window__caret { animation: none; background: var(--bg); }
}

/* ---------- Nav (Glasmorphism) ---------- */
.nav {
  position: fixed;
  top: 1.25rem; left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 1.75rem;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-line);
  backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  box-shadow: 0 8px 32px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.06);
  font-size: 0.85rem;
  flex-wrap: nowrap;
  white-space: nowrap;
}
.nav .brand {
  display: flex;
  align-items: center;
  margin-right: -0.5rem;             /* Stern etwas näher an "About" */
  opacity: 0.9;
  transition: opacity 0.2s, filter 0.35s ease;
}
.nav .brand:hover,
.nav .brand:focus-visible { opacity: 1; outline: none; }
.nav .brand .brand__star {
  width: var(--nav-star-size);
  height: var(--nav-star-size);
  display: block;
}
.nav a:not(.brand) {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.nav a:not(.brand):hover,
.nav a:not(.brand):focus-visible,
.nav a.active { color: var(--fg); outline: none; }


.nav .social {
  display: flex;
  align-items: center;
  margin-left: 0.25rem;
  padding-left: 1rem;
  border-left: 1px solid var(--glass-line);
  opacity: 0.75;
  transition: opacity 0.2s;
}
.nav .social:hover,
.nav .social:focus-visible { opacity: 1; }
.nav .social + .social { border-left: none; padding-left: 0; }   /* nur ein Trennstrich vor der Icon-Gruppe */
.nav .social svg,
.nav .social img {
  width: 1.1rem;
  height: 1.1rem;
  display: block;
}

/* Schwarze Nav auf hellen Vollbildern (Klasse wird vom Script gesetzt) */
.nav, .nav a, .social-float {
  transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease;
}
html.nav-dark .nav,
html.nav-dark .social-float {
  background: rgba(0, 0, 0, 0.82);
  border-color: rgba(0, 0, 0, 0.9);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}
html.nav-dark .nav a:not(.brand):hover,
html.nav-dark .nav a:not(.brand):focus-visible,
html.nav-dark .nav a.active { color: #ffffff; }
html.nav-dark .nav a:not(.brand) { color: rgba(255, 255, 255, 0.6); }
html.nav-dark .nav .social { border-left-color: rgba(255, 255, 255, 0.25); }

/* Instagram-Button für Mobil (auf Desktop ausgeblendet, dort sitzt er in der Nav) */
.social-float {
  display: none;
  position: fixed;
  right: var(--nav-mobile-inset);            /* bündig mit der rechten Nav-Kante */
  bottom: calc(var(--nav-mobile-bottom) + 3.4rem);
  z-index: 10;
  width: 2.6rem;
  height: 2.6rem;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--glass-bg);
  border: 1px solid var(--glass-line);
  backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  box-shadow: 0 8px 32px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.06);
  opacity: 0.85;
}
.social-float img { width: 1.1rem; height: 1.1rem; display: block; }

/* ---------- Fixe UI außerhalb des Raums ---------- */
.hud {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  font-size: 0.8rem;
  color: var(--muted);
  pointer-events: none;
}
.depth-bar {
  width: 1px;
  height: 6rem;
  background: var(--line);
  position: relative;
}
.depth-bar i {
  position: absolute;
  left: -1px; top: 0;
  width: 3px;
  height: var(--p, 0%);
  background: var(--fg);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  :root { --spread: 0.6; --perspective: 700px; }
}
@media (max-width: 600px) {
  :root {
    --spread: 0.3;                          /* Objekte bleiben im schmalen Bild */
    --perspective: 600px;
    --logo-size: clamp(9rem, 30vh, 14rem);
    --fade-far: 800px;
    --about-text-width: 100%;               /* mobil volle Blockbreite statt fester Spalte */
    --about-gap: 1rem;
  }
  .item { max-width: 88vw; }
  .tagline p { max-width: none; }
  /* creative head mobil: gleiche Breite wie "Design with soul" */
  .about {
    flex-direction: column;
    width: min(38rem, 86vw);
    max-width: min(38rem, 86vw);
  }
  .about__text { flex: 0 1 auto; width: 100%; }
  .about p { max-width: none; }
  .section .window--small { width: 100%; }       /* Fenster mobil über die Blockbreite */

  /* Textblöcke mobil: Block mittig auf dem Screen, Text darin linksbündig */
  .tagline, .about { --x: 0vw !important; text-align: left; }
  /* Logo mobil: über die Breite begrenzt, damit es wie zuvor sicher ins Bild passt */
  .logo .logo__svg { width: var(--logo-mobile-width); height: auto; }
  .about__media { display: none; }               /* Bild ist mobil ein eigener Halt davor */
  .about-media-mobile { display: block; }
  /* Vollbilder mobil: wie am Rechner ein Bild pro Halt, im Hochformat die _hochkant-Variante */
  .full { max-width: none; }
  :root { --img-inset: 6vw; }
                              /* Ausnahme von .item { max-width: 88vw } */
  .section p { max-width: 34ch; }
  .about, .section { --x: 0vw !important; text-align: left; }
  .nav {
    top: auto;
    bottom: var(--nav-mobile-bottom);
    left: var(--nav-mobile-inset);
    right: var(--nav-mobile-inset);
    transform: none;                         /* feste Ränder statt Zentrierung → Instagram-Button liegt bündig */
    width: auto;
    max-width: none;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 1rem;
    font-size: 0.8rem;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav .brand { margin-right: 0.15rem; }
  .nav .social--ig { display: none; }        /* Instagram wandert in den Float-Button */
  .social-float { display: flex; }
  .hud { padding: 1rem; font-size: 0.7rem; bottom: calc(var(--nav-mobile-bottom) + 3rem); }
  .depth-bar { display: none; }              /* Tiefenanzeige kollidiert mit dem Instagram-Button */
  .depth-bar { height: 4rem; }
}
/* Hochformat ohne eigene Hochkant-Datei: Querformat-Bild um 90° gedreht, füllt den Screen komplett */
@media (orientation: portrait) {
  .full img.is-rotated {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 100vh;
    height: 100vw;
    transform: translate(-50%, -50%) rotate(90deg);
    object-fit: cover;
  }
}

/* Handy quer: wenig Höhe, viel Breite – Blöcke mittig, kleinere Schriften,
   damit Überschrift und Text auf einen Bildschirm passen. */
@media (max-height: 500px) and (orientation: landscape) {
  :root {
    --logo-size: clamp(5rem, 48vh, 10rem);
    --spread: 0.35;                                  /* Blöcke näher an der Mitte */
    --about-text-width: min(24rem, 44vw);
    --about-gap: 1rem;
    --about-media-width: clamp(7rem, 18vw, 11rem);
    --img-inset: 8vw;
    --window-font: 0.75rem;
    --window-body-height: 2.4em;
    --heading-tracking: 0.03em;
  }
  .tagline, .about, .section { --x: 0vw !important; }      /* nichts läuft seitlich aus dem Bild */
  .tagline { max-width: min(34rem, 84vw); }
  .tagline h1 { font-size: clamp(1.5rem, 6vh, 2.4rem); }
  .about h2, .section h2 { font-size: clamp(1.3rem, 5vh, 2rem); }
  .tagline p, .about p, .section p { font-size: 0.85rem; line-height: 1.45; }
  .about p + p { margin-top: 0.6rem; }
  .section { max-width: min(34rem, 84vw); }
  .btn { padding: 0.5rem 1rem; font-size: 0.8rem; }

  /* creative head: Bild bleibt ein eigener Halt (wie hochkant), sonst wäre dieser Halt leer */
  .about__media { display: none; }
  .about-media-mobile { display: block; --x: 0vw !important; }
  .about-media-mobile img { width: min(18rem, 34vw); }
  .about { width: var(--about-text-width); max-width: var(--about-text-width); }
}

@media (prefers-reduced-motion: reduce) {
  .world { transition: none; }
  .window__caret { animation: none; }
  .nav, .hud, .loader { transition: none; }
  .loader__icon { animation: none; }
  .loader.is-done { display: none; }
}