/* ===== Farben & Grundwerte – hier einfach anpassen ===== */
:root {
  --bg: #e7d19c;          /* Papierfarbe (aus dem karierten Blatt) */
  --text: #111111;
  --muted: #6b6150;
  --line: rgba(0, 0, 0, 0.15);
  --accent: #2f5bff;      /* Blau für Tags & Hover */
  --accent-text: #ffffff; /* Textfarbe auf dem Blau */
  --gap: 16px;
  --pad: clamp(16px, 3vw, 32px);
  --font: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

/* Hintergrund: kariertes Blatt, bleibt beim Scrollen stehen */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--bg) url("bilder/hintergrund/kariert.jpg") center / cover no-repeat;
}

a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; height: auto; }

/* ===== Kopfzeile ===== */
/* Kopfzeile: liegt direkt auf dem karierten Papier (kein eigener Hintergrund,
   keine Linie) und scrollt mit der Seite weg */
.topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: var(--gap);
  padding: 12px var(--pad);
  font-size: 13px;
}
.topbar__name { font-weight: 500; }
.topbar__nav { display: flex; gap: 20px; }
/* Umgedreht: Links sind blau hinterlegt und werden beim Drüberfahren "normal" */
.topbar__nav a { background: var(--accent); color: var(--accent-text); }
.topbar__nav a:hover { background: transparent; color: var(--text); }
/* Alte Variante (normal, beim Drüberfahren blau):
.topbar__nav a:hover { background: var(--accent); color: var(--accent-text); } */
.topbar__meta { text-align: right; color: var(--muted); }

/* ===== Hero ===== */
.hero { padding: var(--pad); }

.hero__title {
  font-size: clamp(14px, 1.5vw, 24px);   /* 1/10 der früheren Größe (vorher bis 240px) */
  font-weight: 800;
  line-height: 0.85;
  letter-spacing: -0.02em;
  margin: 0.15em 0 0.25em -0.04em;
}

/* Umlaufbahn: Figur in der Mitte wie ein Planet,
   die Bild-Buttons kreisen auf einer gemeinsamen, leicht gekippten Bahn um sie herum.
   Die Bewegung selbst steuert das Skript unten in index.html. */
.hero__grid {
  position: relative;
  display: flex;
  justify-content: center;
  /* gleich viel Leerraum über und unter der Figur → sie sitzt mittig in der freien Fläche */
  padding-block: clamp(50px, 8vw, 130px);
}

.hero__ring {
  position: absolute;
  left: 0;
  top: 0;
  display: block;
  width: clamp(80px, 8vw, 130px);
  cursor: grab;
  z-index: 3;              /* vorne: vor der Figur; hinten setzt das Skript 1 */
  will-change: transform;
  transition: translate 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);   /* zurück in die Bahn federn */
  touch-action: none;      /* Ziehen klappt auch mit dem Finger */
  user-select: none;
  -webkit-user-select: none;
}
.hero__ring, .hero__ring img { -webkit-user-drag: none; }
.hero__ring img { pointer-events: none; }
/* Button-Gefühl: beim Drüberfahren leicht anheben, beim Klicken eindrücken.
   Beim Loslassen federt er mit kleinem Nachschwingen zurück (cubic-bezier mit Überschwinger). */
.hero__ring .work {
  transition:
    transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.3s ease;
}
.hero__ring:hover .work {
  transform: translateY(-4px) scale(1.03);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.9),
    inset 0 -1px 1px rgba(0, 0, 0, 0.08),
    0 16px 36px rgba(60, 40, 0, 0.28);
}
.hero__ring:active .work { transform: scale(0.97); transition-duration: 0.12s; }

/* Drag & Drop: Aufheben, Kippen in Zugrichtung, großer Schatten */
.hero__ring.is-ziehen { cursor: grabbing; z-index: 20 !important; transition: none; }
.hero__ring.is-ziehen .work {
  transform: scale(1.06) rotate(var(--kipp, 0deg));
  transition: transform 0.12s ease-out, box-shadow 0.2s ease;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.9),
    inset 0 -1px 1px rgba(0, 0, 0, 0.08),
    0 30px 60px rgba(60, 40, 0, 0.35);
}
/* Kurz nach dem Ablegen: kleiner "Plopp" */
.hero__ring.is-abgelegt .work { animation: ablegen 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes ablegen {
  0%   { transform: scale(1.06); }
  45%  { transform: scale(0.97); }
  100% { transform: scale(1); }
}
/* Freier Button ohne Rahmen und Hintergrund (z. B. zweiter Ring) */
.hero__ring--frei .work {
  padding: 0;
  background: none;
  border: 0;
  box-shadow: none !important;
}
.hero__ring--frei:hover .work { filter: drop-shadow(0 8px 12px rgba(60, 40, 0, 0.25)); }
.hero__ring--frei.is-ziehen .work { filter: drop-shadow(0 20px 24px rgba(60, 40, 0, 0.3)); }
.hero__ring:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 16px; }
.hero__grid .work {
  padding: 5px;
  border-radius: 14px;
}
.hero__grid .glas img { border-radius: 9px; }
.hero__grid .tag { font-size: 9px; padding: 2px 5px 2px 13px; margin-left: 2px; }
.hero__grid .tag::before { left: 4px; width: 5px; height: 5px; }
.hero__grid .work figcaption { font-size: 10px; padding: 0 2px; line-height: 1.25; }
/* Freigestellte Figur in der Mitte */
.hero__figur {
  position: relative;
  z-index: 2;              /* zwischen den Buttons hinten (1) und vorne (3) */
  width: clamp(150px, 19vw, 300px);
  height: auto;
  justify-self: center;
  filter: drop-shadow(0 12px 18px rgba(60, 40, 0, 0.25));   /* steht leicht auf dem Papier */
}

.hero__intro {
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.3;
  max-width: 34ch;
  justify-self: end;
}

/* ===== Abschnitte ===== */
.section {
  padding: calc(var(--pad) * 2) var(--pad);
  border-top: 1px solid var(--line);
}
.section h2 {
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.section__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--gap);
  flex-wrap: wrap;
  margin-bottom: var(--pad);
}

/* ===== Gelbe Tags ===== */
.tag {
  position: relative;      /* sitzt jetzt unter dem Bild */
  display: inline-block;
  margin-top: 10px;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 11px;
  font-weight: 500;
  padding: 3px 7px 3px 18px;
}
.tag::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 50%;
  width: 6px;
  height: 6px;
  background: var(--accent-text);
  transform: translateY(-50%);
}

/* ===== Einzelne Arbeit ===== */
.work { position: relative; }
.work figcaption {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}

/* ===== Galerie-Raster ===== */
.gallery {
  display: grid;
  grid-template-columns: repeat(6, 1fr);   /* 6 Spalten = flexibel teilbar */
  gap: calc(var(--pad) * 1.5) var(--pad);
  align-items: start;
}
.gallery > * { grid-column: span 2; }       /* normal: 1/3 der Breite */
.gallery > .work--half { grid-column: span 3; }  /* halb: 2 gleich große nebeneinander */
.gallery > .work--wide { grid-column: span 4; }  /* breit: 2/3 der Breite */

/* ===== Filter (funktioniert ohne JavaScript) ===== */
.filter { display: flex; gap: 6px; }
.filter input { position: absolute; opacity: 0; pointer-events: none; }
.filter label {
  font-size: 13px;
  padding: 4px 10px;
  border: 1px solid var(--text);
  cursor: pointer;
}
.filter input:checked + label { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.filter input:focus-visible + label { outline: 2px solid var(--text); outline-offset: 2px; }

#arbeiten:has(#f-illu:checked) .project[data-typ="foto"],
#arbeiten:has(#f-foto:checked) .project[data-typ="illu"] { display: none; }

/* ===== Projekte ===== */
.project + .project { margin-top: calc(var(--pad) * 3); }
.project__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--gap);
  margin-bottom: var(--pad);
}
/* Projekttitel: weiße Schrift auf blauem Feld, wie die Navigation beim Drüberfahren */
.project__head h3 {
  font-family: var(--font);
  font-size: 30px;
  font-weight: 400;
  line-height: 1.2;
  background: var(--accent);
  color: var(--accent-text);
  padding: 0 4px;
}
.project__head span { font-size: 13px; color: var(--muted); }
.project__text {
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.35;
  max-width: 32ch;
}

/* ===== Über mich / Kontakt ===== */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--pad);
}
.split__text {
  font-size: clamp(17px, 1.6vw, 21px);
  line-height: 1.35;
  max-width: 40ch;
}
.split__text p + p { margin-top: 1em; }

/* ===== Käfer-Zeichnung über dem Kontakt: viel Leerraum ===== */
.kaefer {
  display: flex;
  justify-content: center;
  padding: clamp(80px, 12vw, 200px) var(--pad);   /* Luft oben und unten */
  border-top: 1px solid var(--line);
}
.kaefer { align-items: flex-end; gap: clamp(16px, 3vw, 48px); }
.kaefer img { width: clamp(220px, 28vw, 420px); }
/* Kleiner Button neben dem Käfer, unaufdringlich */
.kaefer .kaefer__button {
  width: clamp(56px, 6vw, 96px);
  margin-bottom: 8%;
  filter: drop-shadow(0 6px 10px rgba(60, 40, 0, 0.2));
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.kaefer .kaefer__button:hover { transform: translateY(-4px) scale(1.08) rotate(-6deg); }

/* Frei verschiebbar (Drag & Drop) */
.ziehbar {
  position: relative;
  z-index: 5;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}
.kaefer .ziehbar.is-ziehen {
  cursor: grabbing;
  z-index: 20;
  transform: scale(1.1) rotate(var(--kipp, 0deg));
  transition: transform 0.12s ease-out;
  filter: drop-shadow(0 18px 22px rgba(60, 40, 0, 0.3));
}
.ziehbar.is-abgelegt { animation: ablegen 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); }

/* ===== Kontakt (Courier, dunkelblauer Block) ===== */
.contact {
  --navy: #12105e;
  --mono: "Courier New", Courier, monospace;
  padding: calc(var(--pad) * 3) 0;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: clamp(15px, 1.7vw, 20px);
}
.contact__title {
  font-size: 1em;
  font-weight: 400;
  font-style: italic;
  margin: 0 0 0.6em clamp(70px, 12vw, 160px);
}
.contact__box {
  width: min(730px, 62%);
  background: var(--navy);
  padding: 1.2em 0 3.5em clamp(70px, 12vw, 160px);
  display: flex;
  flex-direction: column;
  gap: 0.75em;
}
.contact__row {
  display: grid;
  grid-template-columns: 11em 1fr;
  gap: 1em;
  width: calc(100% + 18em);     /* Zeilen ragen rechts über den Block hinaus */
  background: #fff;
  padding: 0.15em 0.5em;
  white-space: nowrap;
}
.contact__row:hover { background: var(--accent); color: var(--accent-text); }

/* ===== Fußzeile ===== */
.footer {
  display: flex;
  justify-content: space-between;
  padding: 16px var(--pad);
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}

/* ===== Handy & Tablet ===== */
@media (max-width: 800px) {
  .gallery { grid-template-columns: 1fr 1fr; }
  .gallery > *, .gallery > .work--half { grid-column: span 1; }
  .gallery > .work--wide { grid-column: span 2; }
  .split { grid-template-columns: 1fr; }
  .hero__figur { width: 28vw; }
  .contact__box { width: 90%; }
  .contact__row { width: calc(100% + 2em); }
}

@media (max-width: 560px) {
  .topbar { grid-template-columns: 1fr auto; }
  .topbar__meta { display: none; }
  .topbar__nav { gap: 12px; }
  .gallery { grid-template-columns: 1fr; }
  .contact__title { margin-left: var(--pad); }
  .contact__box { width: 100%; padding: 1em var(--pad) 2.5em; }
  .contact__row { width: 100%; grid-template-columns: 1fr; gap: 0; white-space: normal; overflow-wrap: anywhere; }
  .gallery > *, .gallery > .work--half, .gallery > .work--wide { grid-column: span 1; }
}

/* Text nur für Screenreader & Suchmaschinen, auf der Seite unsichtbar */
.unsichtbar {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Beim Springen über die Navigation nicht unter der Kopfzeile verschwinden */
section[id], .project[id] { scroll-margin-top: 20px; }

/* Farben eines Bildes kräftiger machen (z. B. das Gelb bei "Helm Frau Gelb").
   Wert bei saturate() erhöhen = noch knalliger, 1 = Original */
.knallig { filter: saturate(1.3) brightness(1.015); }

/* ===== Glas-Effekt ("Liquid Glass" wie im neuen iOS) =====
   Klasse "glas" an ein <figure> hängen, um es auszuprobieren.
   Zum Entfernen einfach " glas" aus der Klasse im HTML löschen. */
.glas {
  position: relative;
  padding: 10px 10px 12px;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0.12));
  -webkit-backdrop-filter: blur(16px) saturate(1.8);
  backdrop-filter: blur(16px) saturate(1.8);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.9),    /* Lichtkante oben */
    inset 0 -1px 1px rgba(0, 0, 0, 0.08),        /* leichte Kante unten */
    0 10px 30px rgba(60, 40, 0, 0.18);           /* weicher Schatten */
}
/* Spiegelung oben links */
.glas::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(120% 60% at 15% 0%, rgba(255, 255, 255, 0.55), transparent 45%);
  pointer-events: none;
  z-index: 1;
  mix-blend-mode: soft-light;
}
.glas img { border-radius: 19px; }
.glas figcaption { padding: 0 6px; color: var(--text); }
.glas .tag { margin-left: 6px; }

/* Glas mit weißem Hintergrund (z. B. bei Lina, damit die hellen Linien gut sichtbar sind) */
.glas--weiss { background: #fff; }
