/* Schrift: Nimbus Mono von URW++ (Lizenz: GNU GPL, siehe font/nimbus-mono/).
   @font-face sagt dem Browser, wo die Schriftdatei liegt und welcher Schnitt welcher ist.
   Derselbe Block steht in style.css, html/style.css und html/text.css,
   weil nicht alle Seiten dieselbe CSS-Datei laden.
   Die Oblique-Datei ist als font-style: italic angemeldet. So nutzen alle
   Hover-Effekte mit font-style: italic automatisch die echte schräge Variante.
   font-display: swap zeigt den Text sofort in einer Ersatzschrift,
   bis Nimbus Mono geladen ist, statt ihn unsichtbar zu lassen. */
@font-face {
    font-family: "Nimbus Mono";
    src: url("../font/nimbus-mono/NimbusMono-Regular.woff") format("woff");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Nimbus Mono";
    src: url("../font/nimbus-mono/NimbusMono-Oblique.woff") format("woff");
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

.bild1 {
   display: block;
   margin: 0 auto;
   width: 200px;
   height: 300px;
   object-fit: cover;
}
.bild2 {
   display: block;
   margin: 0 auto;
   width: 200px;
   height: 300px;
   object-fit: cover;
}

/* Bei bild2 sitzt die Klasse auf dem Link, nicht auf dem Bild.
   Darum muss das Video hier ausdrücklich den Link ausfüllen,
   sonst nimmt es seine echte Pixelgrösse aus dem HTML an. */
.bild2 video {
   display: block;
   width: 100%;
   height: 100%;
   object-fit: cover;
}

.name {
    display: block;
    text-align: center;
    font-family: "Nimbus Mono", "Courier New", monospace;
    font-size: 20px;
    color: black;
    text-decoration: none;
}

.name:hover {
    font-style: italic;
}


.section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.section > div {
    display: grid;
    justify-items: center;
    row-gap: 0;
}

body {
    margin: 0;
    min-height: 100vh;
    background: white;
}

/* Auf dem Handy darf man scrollen: Bilder und Name zusammen sind ca. 770px hoch,
   das passt auf kleinen Handys nicht auf einen Bildschirm.
   Ab 40rem (Tablet, Desktop) ist das Scrollen gesperrt. */
@media (min-width: 40rem) {
    body {
        overflow: hidden;
    }
}

/* Beim Klick wird die Startseite kurz weich */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 10000;
    pointer-events: none;
    background: transparent;
    opacity: 0;
    backdrop-filter: blur(0);
    transition: opacity 0.2s ease, backdrop-filter 0.2s ease;
}

body.is-leaving::before {
    opacity: 1;
    backdrop-filter: blur(8px);
}

@media (prefers-reduced-motion: reduce) {
    body::before { transition: none; }
}

.beschriftung {
    margin: 0;
    text-align: center;
    font-family: "Nimbus Mono", "Courier New", monospace;
    font-size: 0.8125rem;
    /* line-height: 1 entfernt den zusätzlichen Leerraum über und unter der Zeile.
       So messen die Abstände zum Bild bei «Graphic Design» (oben) und
       «Artistic Practice» (unten) wirklich dasselbe. */
    line-height: 1;
    letter-spacing: 0.05em;
    color: black;
    white-space: nowrap;
}

/* Die Beschriftung wird auch kursiv, wenn man über das passende Bild fährt.
   «Graphic Design» liegt im selben Link wie das Bild (.projekt-link:hover).
   «Artistic Practice» folgt direkt auf den Bild-Link (.bild2:hover +). */
.beschriftung:hover,
.projekt-link:hover .beschriftung,
.bild2:hover + .beschriftung {
    font-style: italic;
}

.projekt-link {
    display: grid;
    justify-items: center;
    row-gap: 1.25rem;
    color: inherit;
    text-decoration: none;
}

/* Abstand zwischen den Bildern und «Johanna Dambach».
   Gleicher Wert oben und unten, damit der Name in der Mitte bleibt. */
.projekt-link + .name,
.name + .bild2 {
    margin-top: 2.5rem;
}

/* «Artistic Practice» steht unter dem Bild, mit demselben Abstand
   wie «Graphic Design» über dem oberen Bild (row-gap von .projekt-link). */
.bild2 + .beschriftung {
    margin-top: 1.25rem;
}



/* Java script cursor ball */
.cursor-ball {
    display: none;
    position: fixed;
    top: -1rem;
    left: -1rem;
    z-index: 9999;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #FF3300;
    pointer-events: none;
    transform: translate(-50%, -50%);
    scale: 1;
    transition: scale 0.3s ease;
}

.cursor-ball.is-hovering {
    scale: 1.875;
}

@media (hover: hover) and (pointer: fine) {
    body,
    body * {
        cursor: none;
    }

    .cursor-ball {
        display: block;
    }
}

/* startseite.html lädt style.css.
grafikseite.html lädt text.css. */
