@font-face {
    font-family: 'BradfordMono';
    src: url('../fonts/BradfordMonoLL-Regular.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Velvelyne';
    src: url('../fonts/Velvelyne-Book.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 32 32"><path d="M2 2 L2 27 L9.5 20.5 L14 30 L18 28 L13.7 18.5 L22 18.5 Z" fill="red"/></svg>') 2 2, auto;
}

.sticker-img {
    filter: grayscale(1);
    transition: filter 0.3s ease;
}

.sticker-img:hover {
    filter: grayscale(0);
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body:not(.subpage) {
    position: absolute;
    top: 0;
right: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/karenzeichnung.jpg');
    background-size: 1440px 900px;
    background-position: right 60px top 0;
    background-repeat: no-repeat;
    z-index: -1;
}




body:not(.subpage) .titel-wrap {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 10;
}

.titel-subtitle {
    position: absolute;
    bottom: 90%;
    left: 0;
    font-family: "Velvelyne", sans-serif;
    font-variation-settings: "wght" 400;
    font-style: normal;
    font-size: 20px;
    line-height: 1.2;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(4px);
}

.titel-wrap:hover .titel-subtitle {
    opacity: 1;
    transform: translateY(0);
}


html:has(body.subpage) {
    height: auto;
    overflow-x: hidden;
    overflow-y: visible;
}

body.subpage {
    height: auto;
    overflow-y: auto;
    padding-left: 20px;
    padding-right: 20px;
}

body.subpage #main-svg {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 0;
}

body.subpage > *:not(#main-svg) {
    position: relative;
    z-index: 1;
}

#main-svg {
    width: 100vw;
    height: 100vh;
    display: block;
}

body:not(.subpage) #main-svg {
    height: 95vh;
    margin-top: 10vh;
}

body.subpage #main-svg {
    min-width: 1440px;
    min-height: 900px;
}

#group-stuetzen,
#group-decken,
#group-boden,
#group-achsen {
    transition: transform 1.8s ease;
}

/* driften mit der Bodenfeuchte (--moisture: 0 = trocken, 1 = nass) */
#group-achsen {
    transform: translateX(calc(var(--moisture, 0) * -10px));
}

#group-boden {
    transform: translateX(calc(var(--moisture, 0) * 10px));
}

#group-stuetzen {
    transform: translateX(calc(var(--moisture, 0) * 10px));
}

#group-decken {
    transform: translateX(calc(var(--moisture, 0) * -10px));
}

/* Achslinien färben sich mit der Temperatur ein (--temperature: 0 = kalt/schwarz, 1 = heiß/rot) */
/*
#group-achsen {
    stroke: color-mix(in srgb, black, red calc(var(--temperature, 0) * 100%));
}
*/

.room-box {
    width: 100%;
    height: 100%;
  
    display: flex;
    align-items: center;
    justify-content: center;
  
    text-align: center;
    box-sizing: border-box;
    font-family: "Velvelyne", sans-serif;
    font-variation-settings: "wght" 400;
  font-style: normal;
    font-size: 11px;
    line-height: 1.2;
  
    overflow: hidden;
    z-index: 3;
  }



.room-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
}

.room-box:has(.room-link:hover) {
    background-color: black;
    color: white;
}
#sensor-display {
    position: fixed;
    top: 1.4vw;
    right: 1.4vw;
    font-family: 'BradfordMono', monospace;
    font-size: clamp(19px, 2vw, 20px);
    line-height: 0.9;
    color: black;
    pointer-events: none;
}

.img,
.video {
    width: 300px;
    height: 300px;
    object-fit: cover;
    display: block;
    border-radius: 84px;

    margin-bottom: 20px;
    transition: border-radius 0.3s ease;
}

.img:hover,
.video:hover {
    border-radius: 0px;
}

.text-row,
.text-row2 {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    max-width: 100%;
}

.text-row2 {
    flex-direction: row-reverse;
}

.text-row .text,
.text-row2 .text {
    flex: 1 1 200px;
    min-width: 0;
}

.sticker {
    cursor: pointer;
    flex-shrink: 0;
}

.sticker-img {
    width: 280px;
    height: 390px;
    object-fit: cover;
    object-position: top;
}

.sticker-img:hover {
    transform: scale(1.05);
}

.text {
    font-family: "BradfordMono", sans-serif;
    font-variation-settings: "wght" 400;
    font-style: normal;
    font-size: clamp(18px, 2vw, 20px);
    line-height: 1.1;
    padding: 10px;
    padding-top: 30px;
    overflow: hidden;
}
.titel {

    font-family: Velvelyne;
    font-size: clamp(30px, 6vw, 56px);
    overflow-wrap: break-word;
    max-width: 100%;


    /* letter-spacing: calc(3.75rem - var(--moisture, 0) * 4rem); */
    line-height: 0.8;
    pointer-events: none;
}

body.subpage .titel {
    pointer-events: auto;
}

.back-link {
    font-family: Velvelyne;
    color: inherit;
    text-decoration: none;
    pointer-events: auto;
    cursor: pointer;
    display: inline-block;
    width: 0;
    overflow: hidden;
    white-space: nowrap;
    opacity: 0;
    vertical-align: bottom;
    transition: width 0.3s ease, opacity 0.3s ease;
}

.titel:hover .back-link {
    width: 1.1em;
    opacity: 1;
}
.sensorpictures {
    width: auto;
    height: 300px;
    display: block;
    border-radius: 84px;
    margin-bottom: 20px;
    transition: border-radius 0.3s ease;
}

.sensorpictures:hover {
    border-radius: 8px;
}

.plakat-img {
    width: 286px;
    height: 400px;
    object-fit: contain;
    display: block;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.plakat-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.plakat-item:hover .plakat-img {
    opacity: 0;
}

.plakat-label {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "BradfordMono", sans-serif;
    font-variation-settings: "wght" 400;
    font-style: normal;
    font-size: clamp(20px, 1.4vw, 16px);
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.plakat-item:hover .plakat-label {
    opacity: 1;
}
