/* ===========================================================
   BASE.CSS — gilt für Desktop UND Mobile
   Enthält nur Dinge, die in beiden Layouts gleich aussehen:
   Fonts, Reset, Typografie, Nav-Optik, Kreise, Modals, Texte.
   Layout (Splitscreen vs. Akkordeon) steht in desktop.css / mobile.css.

   Einbindung in index.html:
     base.css     → immer
     desktop.css  → media="(min-width: 769px)"
     mobile.css   → media="(max-width: 768px)"
=========================================================== */

/* ===========================
   FONTS
=========================== */
@font-face {
  font-family: 'Navi';
  src: url('fonts/texgyreheroscn-regular.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Navi2';
  src: url('fonts/texgyreheros-regular.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
}

/* ===========================
   DESIGN-VARIABLEN
   Farben zentral ändern: hier.
=========================== */
:root {
  --bg: rgb(245, 245, 245);
  --bg-nav: rgb(230, 230, 230);
  --black: rgb(0, 0, 0);
  --grey: rgb(218, 218, 218);
  --green: #00b862;   /* Kreise, Hover auf Titeln */
  --yellow: #f6ff00;  /* Handle / Trennlinie beim Antippen */
    /* Dreieck der Projekt-Marker (Spitze nach rechts) als SVG, wird als Maske genutzt.
     points = Eckpunkte (x,y im 100×100-Raster), stroke-width = Rundung der Ecken. */
     --triangle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpolygon points='24,28 86,50 24,72' fill='black' stroke='black' stroke-width='8' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* ===========================
   RESET & BASE
=========================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

*::-webkit-scrollbar {
  display: none;
}

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  background-color: var(--bg);
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

img, video {
  -webkit-user-drag: none;
  user-drag: none;
  -webkit-touch-callout: none; /* verhindert das "Bild sichern"-Menü bei langem Antippen auf iOS */
}

img, video, picture, svg {
  max-width: 100%;
  display: block;
}


h1 {
  font-family: 'Navi';
  font-size: 18pt;
  font-weight: normal;
}
	  
h2 {
  font-family: 'Navi';
  font-size: 14pt;
  font-weight: normal;
}

h3 {
  font-family: 'Navi2';
  font-size: 13pt;
}

ul {
  font-family: 'Navi2';
  font-size: 10pt;
  margin-left: 1.2rem;
}

/* ===========================
   TOP NAV (Optik; Anordnung steht in desktop.css / mobile.css)
=========================== */
.top-nav {
  position: relative;
  font-family: 'Navi';
  font-size: 16pt;
  color: var(--black);
  background-color: rgb(230, 230, 230);
  padding: 0.1rem 0.8rem 0.2rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.top-nav span,
.top-nav a {
  white-space: nowrap;
}

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.lang-btn {
  opacity: 0.5;
}

.lang-btn.active {
  opacity: 1;
  text-decoration: underline;
}

.top-nav a {
  color: var(--black);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

/* ===========================
   PROJEKT-TITEL & INFO-TEXTE
=========================== */
.Text {
  font-family: 'Navi';
  font-size: 18pt;
  line-height: 1.4rem;
  text-align: left;
  overflow: visible;
  white-space: normal;
  margin-right: 0.5rem;
  margin-bottom: 0.2rem;
}

.Text.viewing .title,
.info-text.viewing {
  color: var(--black);
}

.project-label {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
  max-width: 100%;
}

.project-label .title {
  flex: 1 1 auto;
  min-width: 0;
}

.info-text {
  display: none;
  max-width: 65rem;
  font-family: 'Navi2';
  font-size: 13pt;
  line-height: 1.1;
  margin-top: 1.2rem;
  margin-bottom: 1.5rem;
  margin-left: 1.5rem;
  text-align: left;
  overflow: visible;
  white-space: normal;
  overflow-wrap: break-word;
}

.info-text a {
  color: var(--black);
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

	  .info-text .ig-name {
  color: var(--black);
  text-decoration: underline;
  text-decoration-thickness: 2px;
}
.about-text {
  display: none;
  max-width: 35rem;
  font-family: 'Navi2';
  font-size: 15.5pt;
  line-height: 1.3rem;
  text-align: left;
  overflow: visible;
  white-space: normal;
  word-break: break-word;
}

.about-text a {
  text-decoration: none;
  color: inherit;
  margin-right: 0.5rem;
}

/* "Zerfließ"-Effekt: Buchstaben werden per JS (shared.js → scatterifyText)
   in .letter-Spans zerlegt und bekommen --dx/--dy/--rot mit.
   Ausgelöst wird er auf Desktop per Hover (desktop.css), auf Mobile per
   CSS-Animation, solange das Info-Sheet offen ist (mobile.css). */
.scatter-text .letter {
  display: inline-block;
  transition: transform 0.6s ease, opacity 0.6s ease;
}

/* ===========================
   KREISE
   Per ::before gezeichnet (nicht als Unicode-Zeichen ○/●), damit leer/gefüllt
   in jeder Schrift exakt gleich groß sind.
=========================== */
.filled {
  display: none;
  color: var(--green);
}

.empty {
  display: inline;
}

.empty, .filled {
  font-size: 1.8rem;
  position: relative;
  top: -0.05em;
}
.empty::before,
.filled::before {
  content: "";
  display: inline-block;
  width: 0.6em;
  height: 0.6em;
  vertical-align: -0.05em;
  background-color: currentColor;
  -webkit-mask: var(--triangle) center / 100% 100% no-repeat;
  mask: var(--triangle) center / 100% 100% no-repeat;
}

.filled::before {
  transform: rotate(90deg); /* Spitze nach unten */
}

/* ===========================
   FOTO-CREDIT
=========================== */
.photo .credit {
  position: absolute;
  bottom: 0.3rem;
  right: 0.3rem;
  font-family: 'Navi2';
  font-size: 10pt;
    color: #fff;
  mix-blend-mode: difference;
  padding: 0.1rem 0.3rem;
  pointer-events: none;
}

/* ===========================
   COPYRIGHT / IMPRESSUM / DATENSCHUTZ (Optik)
=========================== */
.sm,
.imprint {
  color: var(--black);
  font-family: 'Navi';
  font-size: 12.5pt;
  padding: 0.1rem 0.8rem;
}

.imprint {
  cursor: pointer;
}

.privacy {
  transition: opacity 0.3s ease;
  cursor: pointer;
}
	  
	  /* ===========================
   EASTER EGG: "WORK WITH ME" (Klick/Tap auf den scatter-text, siehe shared.js)
   mix-blend-mode: screen = "Negativ multiplizieren"
=========================== */
.egg {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 3000;
  font-family: 'Navi';
  font-size: clamp(0.9rem, 3vw, 1.8rem);
  line-height: 1;
  white-space: nowrap;
  color: #00b862;
  mix-blend-mode: difference;
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
  opacity: 0;
    transform: rotate(var(--egg-rot, 0deg)) scale(0.92); /* --egg-rot setzt shared.js zufällig */
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 0.8, 0.2, 1);
}

.egg.is-visible {
  opacity: 1;
  transform: rotate(var(--egg-rot, 0deg));
}

/* ===========================
   LEGAL MODALS (Datenschutz / Impressum)
   Grundzustand = Mobile (volle Breite, fährt von unten ein).
   Desktop überschreibt die Breite in desktop.css.
=========================== */
.legal-modal {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  z-index: 1000;
}

.legal-modal.active {
  transform: translateY(0);
}

.modal-content {
  position: absolute;
  bottom: 0;
  width: 100%;
  max-height: 30%;
  background: var(--bg);
  color: rgb(50, 50, 50);
  padding: 0.8rem;
  overflow-y: auto;
  font-family: 'Navi2';
  font-size: 10.5pt;
}

.close-btn {
  position: sticky;
  top: 0.2rem;              /* gleich wie das Padding des Modals */
  display: block;
  width: fit-content;
  height: 0;                /* braucht keinen Platz, der Text beginnt auf gleicher Höhe */
  margin-left: auto;        /* schiebt das X nach rechts, auch bei direction: rtl */
  margin-right: 0;
  overflow: visible;
  z-index: 10;
  font-size: 30px;
  line-height: 1;
  color: var(--black);
  background: none;
  border: none;
  cursor: pointer;
  direction: ltr;
}
	  
#privacyModal .lang-de, .lang-en {
  line-height: 1.4;
	margin-top: 0.5rem;
}
#privacyModal h2 { font-size: 1.3rem; }
#privacyModal h3 { font-size: 1rem; }
#privacyModal h4 { font-size: 0.8rem; }
#privacyModal p  { margin: 0 0 0.5rem; }
#privacyModal ul { margin: 0 0 0.5rem; padding-left: 1.5rem; }
#privacyModal li { margin-bottom: 0.5rem; }

#privacyModal a {
  color: #777;
  text-decoration: underline;
  text-underline-offset: 3px;
}
#privacyModal a:hover,
#privacyModal a:focus {
  color: #333;
}
	  
	  img, video {
  -webkit-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;   /* iPhone: kein Speichern-Menü bei langem Drücken */
}
	  
	  .imprint-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.2em;
}
.imprint-line span:empty {
  display: none;
}
#imprintModal a {
  color: inherit;
}
	  
	  /* Scrollbar im Modal wieder sichtbar */
.modal-content {
  scrollbar-width: thin;                      /* Firefox */
  scrollbar-color: var(--black) transparent;  /* Firefox: Griff, Spur */
}

.modal-content::-webkit-scrollbar {           /* Chrome, Safari, Edge */
  display: block;
  width: 6px;
}

.modal-content::-webkit-scrollbar-track {
  background: transparent;
}

.modal-content::-webkit-scrollbar-thumb {
  background: var(--black);
  border-radius: 3px;
}

	  #privacyModal .modal-content {
  padding-top: 0;               /* Abstand kommt jetzt vom Verlauf */
}

#privacyModal .modal-content::before {
  content: "";
  position: sticky;
  top: 0;
  display: block;
  height: 2rem;                 /* Höhe der Verlaufskante */
  margin-bottom: -1.2rem;       /* Höhe minus 0.8rem: Text beginnt wie vorher 0.8rem unter dem Rand */
  background: linear-gradient(to bottom, var(--bg) 40%, transparent);
  pointer-events: none;
  z-index: 5;
}