@font-face {
    font-family: 'Sorts Mill Goudy';
    src: url('/fonts/sorts-mill-goudy-regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    --mennige: #C84323;

    --font-size: 0.9375rem;      /* 15px */
    --line-height: 1.23;         /* 18.45px bei 15px */
    --gap: 1rem;                 /* 16px */
    --nav-top: 0.585rem;         /* 9.36px */
    --content-top: calc(var(--nav-top) + 1.153125rem + 1.140625rem); /* 46.06px */

    --safe-top: env(safe-area-inset-top, 0px);
    --safe-right: env(safe-area-inset-right, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
}

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

::selection {
    background-color: transparent;
    color: var(--mennige);
}

html {
    font-size: 100%;
}

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

body {
    font-family: 'Sorts Mill Goudy', serif;
    font-size: var(--font-size);
    font-weight: normal;
    line-height: var(--line-height);
    background-color: #ffffff;
    color: #000000;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.page-container {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    position: relative;
    overflow: hidden;
}

nav {
    position: fixed;
    top: calc(var(--nav-top) + var(--safe-top));
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 calc(var(--gap) + var(--safe-right)) 0 calc(var(--gap) + var(--safe-left));
    z-index: 100;
}

.nav-item a,
.nav-item button {
    color: #000000;
    text-decoration: none;
    transition: color 0.15s ease;
}

.nav-item button {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

/* --- Hover- & Focus-Zustände --- */
@media (hover: hover) {
    .nav-item a:hover,
    .nav-item button:hover,
    .nav-bottom-right a:hover,
    .legal-section a:hover {
        color: var(--mennige) !important;
    }
}

.nav-item a:focus-visible,
.nav-item button:focus-visible,
.nav-bottom-right a:focus-visible,
.legal-section a:focus-visible {
    color: var(--mennige) !important;
    outline: 1px solid var(--mennige);
    outline-offset: 2px;
}

.nav-bottom-right {
    position: fixed;
    bottom: calc(var(--nav-top) + var(--safe-bottom));
    right: calc(var(--gap) + var(--safe-right));
    z-index: 100;
}

.quick-info-box {
    display: none;
    position: fixed;
    top: calc(var(--content-top) + var(--safe-top));
    left: calc(var(--gap) + var(--safe-left));
    width: 16.9375rem;           /* 271px */
    max-width: calc(100% - 2 * var(--gap));
    z-index: 101;
}

.quick-info-box.is-visible {
    display: block;
}

.work-index {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.work-item.slide-item {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.media-scroll-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.media-scroll-wrapper video,
.media-scroll-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 70% center;  /* Desktop-Fokus */
    display: block;
}

.synced-loop {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.synced-loop.is-ready {
    opacity: 1;
}

/* --- Mobile Feinanpassung (unter 768px) --- */
@media (max-width: 768px) {
    .media-scroll-wrapper video,
    .media-scroll-wrapper img {
        object-position: 75% center; /* Mobil-Fokus auf die Kerze */
    }

    /* Verschiebt .nav-contact mobil nach unten links */
    .nav-item.nav-contact {
        position: fixed;
        bottom: calc(var(--nav-top) + var(--safe-bottom));
        left: calc(var(--gap) + var(--safe-left));
        top: auto;
        right: auto;
    }
}

body.index-page,
body.index-page .page-container {
    background-color: #000000;
}

body.index-page .nav-item a {
    color: #000000;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

body.legal-page .page-container {
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-y: auto;
}

.legal-content {
    /* Der erste Wert steuert den Abstand nach oben zur Navigation */
    padding: calc(var(--content-top) + 5rem + var(--safe-top))
             calc(var(--gap) + var(--safe-right))
             calc(3.75rem + var(--safe-bottom))
             calc(var(--gap) + var(--safe-left));
    max-width: 25rem;           /* 400px */
}

.legal-section {
    margin-bottom: 1.5rem;
}

.legal-section--spaced {
    margin-top: 3rem;
}

.legal-section h2 {
    font-size: inherit;
    font-weight: normal;
    margin-bottom: 0.375rem;
}

.legal-section p + p {
    margin-top: 0.75rem;
}

.legal-section a {
    color: #000000;
    text-decoration: none;
}
