@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Space+Mono:wght@400;700&display=swap');

/* DESIGN */

:root {
    /* SCHRIFTEN */
    --font-primary: 'Inter', sans-serif;
    --font-mono: 'Space Mono', monospace;

    /* GRUNDFARBEN */
    --color-cream: #FAF4E3;
    --color-sage: #9DAF99;
    --color-sage-light: #D8DFD6;
    --color-dark: #344238;
    --color-text-secondary: #586158;
    --color-accent: #C45C60;
    --color-accent-hover: #A9474B;

    /* HINTERGRÜNDE */
    --color-bg-start: var(--color-cream);
    --color-bg-card: var(--color-cream);
    --color-bg-sources: var(--color-sage-light);
    --color-bg-popup: var(--color-cream);

    /* TEXT */
    --color-text: var(--color-dark);
    --color-text-muted: var(--color-text-secondary);
    --color-meta: var(--color-accent);

    /* KARTE & NAVIGATION */
    --color-point: var(--color-sage);
    --color-point-active: var(--color-accent);

    /* RAHMEN */
    --color-border: var(--color-accent);

    /* SCHRIFTGRÖSSEN */
    --font-size-start: 56px;
    --font-size-start-subtitle: 22px;

    --font-size-title: 36px;
    --font-size-intro: 19px;
    --font-size-body: 17px;

    --font-size-small: 14px;
    --font-size-meta: 13px;
    --font-size-caption: 11px;

    /* SCHATTEN */
    --shadow-card: 10px 10px 30px rgba(0, 0, 0, 0.10);
    --shadow-card-active: 0 15px 40px rgba(0, 0, 0, 0.20);
}


/* ALLGEMEIN */

html,
body {
    margin: 0;
    padding: 0;
    height: 100%;

    font-family: var(--font-primary);
    color: var(--color-text);
}


/* SPLIT-SCREEN / KARTE */

.app-container {
    display: block;
    height: 100vh;
}

#map {
    position: fixed;
    top: 0;
    left: 0;

    width: 100vw;
    height: 100vh;

    z-index: 1;
}

#story {
    position: relative;
    z-index: 2;

    width: 100%;
    height: 100vh;

    overflow-y: scroll;

    scroll-snap-type: y mandatory;
    scroll-padding-top: 50px;

    pointer-events: none;
}


/* HOME-BUTTON */

.btn-back-home {
    position: fixed;
    top: 20px;
    left: 20px;

    z-index: 3;

    display: flex;
    align-items: center;
    gap: 8px;

    padding: 10px 16px;

    background-color: var(--color-cream);
    border: 1px solid var(--color-border);
    border-radius: 8px;

    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.10);

    font-family: var(--font-primary);
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text);

    cursor: pointer;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.btn-back-home:hover {
    transform: translateY(-2px);

    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}


/* STARTSCREEN */

.start-overlay {
    position: fixed;
    top: 0;
    left: 0;

    width: 100%;
    height: 100vh;

    background-color: var(--color-bg-start);

    z-index: 9999;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    transition: opacity 0.8s ease;
}

.start-content {
    text-align: center;

    max-width: 1000px;

    padding: 0 30px;
    margin-bottom: 3rem;
}


/* Hauptüberschrift Startscreen */

.start-content h1 {
    margin: 0 0 2rem;

    font-family: var(--font-primary);
    font-size: var(--font-size-start);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.02em;

    color: var(--color-text);
}


/* Unterüberschrift Startscreen */

.start-content p {
    margin: 0;

    font-family: var(--font-primary);
    font-size: var(--font-size-start-subtitle);
    font-weight: 400;
    line-height: 1.5;

    color: var(--color-text-muted);
}


/* Startbutton */

.start-btn {
    padding: 15px 30px;

    background-color: var(--color-accent);
    color: var(--color-cream);

    border: none;
    border-radius: 6px;

    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);

    font-family: var(--font-primary);
    font-size: 18px;
    font-weight: 600;

    cursor: pointer;

    transition:
        transform 0.2s ease,
        background-color 0.2s ease,
        box-shadow 0.2s ease;
}

.start-btn:hover {
    background-color: var(--color-accent-hover);

    transform: translateY(-3px);

    box-shadow: 0 8px 14px rgba(0, 0, 0, 0.16);
}


/* Asynchrones Ausblenden via JavaScript */

.hidden {
    opacity: 0;
    pointer-events: none;
}


/* STORY-CARDS */

section {
    background-color: var(--color-bg-card);

    border-radius: 16px;

    box-shadow: var(--shadow-card);

    padding: 3rem 2rem;

    min-height: 80vh;

    margin-top: 10vh;
    margin-bottom: 10vh;

    scroll-snap-align: center;

    transition: all 0.4s ease;
}

section.story-card {
    pointer-events: auto;

    width: 45%;
    min-width: 320px;
    max-width: 500px;

    margin-left: auto;
    margin-right: 60px;
    margin-bottom: 75vh;

    padding: 3rem 2rem 5rem;

    display: flex;
    flex-direction: column;

    scroll-snap-align: start;
    scroll-snap-stop: always;
}


/* METADATEN */

.meta-label {
    margin-bottom: 1rem;

    font-family: var(--font-mono);
    font-size: var(--font-size-meta);
    font-weight: 700;

    line-height: 1.5;
    letter-spacing: 0.12em;

    color: var(--color-meta);

    text-transform: uppercase;
}


/* ORTSÜBERSCHRIFT */

.story-card h2 {
    margin-top: 0;
    margin-bottom: 1.5rem;

    font-family: var(--font-primary);
    font-size: var(--font-size-title);
    font-weight: 700;

    line-height: 1.15;
    letter-spacing: -0.015em;

    color: var(--color-text);
}


/* HAUPTTEXT */

.story-card p {
    margin-bottom: 1.5rem;

    font-family: var(--font-primary);
    font-size: var(--font-size-body);
    font-weight: 400;

    line-height: 1.65;

    color: var(--color-text);
}


/* KURZBESCHREIBUNG / SUBTITLE */

.story-card p.station-subtitle {
    font-size: var(--font-size-intro);
    font-weight: 500;

    line-height: 1.5;

    color: var(--color-text);
}


/* TEXT-HERVORHEBUNG */

.highlight {
    background-image: linear-gradient(
        104deg,
        rgba(196, 92, 96, 0) 0.9%,
        rgba(196, 92, 96, 0.20) 2.4%,
        rgba(196, 92, 96, 0.24) 5.8%,
        rgba(196, 92, 96, 0.24) 93%,
        rgba(196, 92, 96, 0.16) 96%,
        rgba(196, 92, 96, 0) 98%
    );

    background-size: 0% 100%;
    background-repeat: no-repeat;
    background-position: left center;

    transition:
        background-size 0.8s cubic-bezier(0.32, 0, 0.07, 1);

    border-radius: 4px 8px 3px 6px;

    padding: 0.1em 0.3em;

    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}

.active-station .highlight {
    background-size: 100% 100%;
}


/* KARTEN-POPUP */

.place-popup .maplibregl-popup-content {
    padding: 10px 14px;

    background-color: var(--color-bg-popup);

    border-radius: 10px;

    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);

    text-align: center;

    font-family: var(--font-primary);
    font-size: var(--font-size-small);
    font-weight: 600;
    line-height: 1.4;

    color: var(--color-text);
}

.place-popup.maplibregl-popup-anchor-top .maplibregl-popup-tip {
    border-bottom-color: var(--color-bg-popup);
}

.place-popup.maplibregl-popup-anchor-bottom .maplibregl-popup-tip {
    border-top-color: var(--color-bg-popup);
}

.place-popup.maplibregl-popup-anchor-left .maplibregl-popup-tip {
    border-right-color: var(--color-bg-popup);
}

.place-popup.maplibregl-popup-anchor-right .maplibregl-popup-tip {
    border-left-color: var(--color-bg-popup);
}


/* MEDIEN */

.media-container {
    margin: 1.5rem 0 0;
}

.media-container img {
    width: 100%;
    height: auto;

    border-radius: 8px;

    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}


/* Bildunterschriften */

.media-container figcaption {
    margin-top: 0.6rem;

    font-family: var(--font-mono);
    font-size: var(--font-size-caption);
    font-weight: 400;

    line-height: 1.5;

    color: var(--color-text-muted);

    text-align: left;
}


/* QUELLEN / FUSSNOTEN */

.station-footnotes {
    margin-top: 1.5rem;
    padding-top: 1rem;

    border-top: 1px solid var(--color-border);

    font-size: var(--font-size-small);
}


/* Toggle */

.note-toggle {
    margin-top: auto;
    padding-top: 2rem;

    text-align: center;
}

.note-toggle summary {
    cursor: pointer;

    list-style: none;
    outline: none;

    font-family: var(--font-mono);
    font-size: var(--font-size-meta);
    font-weight: 700;

    letter-spacing: 0.08em;
    text-transform: uppercase;

    color: var(--color-accent);

    transition: color 0.2s ease;
}

.note-toggle summary:hover {
    color: var(--color-accent-hover);
}


/* Quellenbox */

.note-content {
    max-height: 200px;
    max-width: 100%;

    overflow-y: auto;
    overflow-wrap: break-word;

    margin-top: 1rem;
    margin-bottom: 20px;

    padding: 1.25rem;

    background-color: var(--color-bg-sources);

    border-radius: 8px;

    font-family: var(--font-primary);
    font-size: var(--font-size-small);
    font-weight: 400;

    line-height: 1.55;

    color: var(--color-text);

    text-align: left;

    hyphens: auto;
}


/* Quellenliste etwas kompakter */

.note-content ul {
    margin: 0;
    padding-left: 1.25rem;
}

.note-content li {
    margin-bottom: 0.75rem;
}

.note-content li:last-child {
    margin-bottom: 0;
}

.source-toggle .note-content {
    font-size: 0.85rem;
}

.source-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.source-list-item {
    display: grid;
    grid-template-columns: 2.5rem 1fr;
    column-gap: 0.5rem;
    margin-bottom: 1.25rem;
    line-height: 1.45;
}

.source-list-item:last-child {
    margin-bottom: 0;
}

.source-list-number {
    font-family: var(--font-mono);
    font-size: 0.85em;
    padding-top: 0.1em;
}

.source-list-citation {
    min-width: 0;
}

.source-list-item--additional .source-list-citation {
    grid-column: 2;
}

/* MAPLIBRE MARKER */

.marker {
    width: 16px;
    height: 16px;

    background-color: var(--color-point);

    border: 2px solid var(--color-cream);
    border-radius: 50%;

    box-sizing: border-box;

    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);

    cursor: pointer;
}

.marker:hover {
    border-color: var(--color-point-active);
    transform: scale(1.2);
}


/* Aktiver Kartenpunkt:
   gleiche Grundfarbe + rote Umrandung */

.active-marker {
    width: 18px;
    height: 18px;

    background-color: var(--color-point-active);

    border: 3px solid var(--color-point-active);

    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);

    transform: scale(1.15);

    z-index: 1000 !important;
}


/* DOT-NAVIGATION */

.dot-navigation {
    position: fixed;

    right: 20px;
    top: 50%;

    transform: translateY(-50%);

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    gap: 15px;

    z-index: 1000;
}


/* Verbindungslinie */

.dot-navigation::before {
    content: '';

    position: absolute;

    top: 0;
    bottom: 0;

    width: 2px;

    background-color: var(--color-sage);

    opacity: 0.65;

    z-index: -1;
}


/* Normaler Navigationspunkt */

.nav-dot {
    width: 14px;
    height: 14px;

    background-color: var(--color-point);

    border: 2px solid var(--color-cream);
    border-radius: 50%;

    box-sizing: border-box;

    cursor: pointer;

    transition:
        transform 0.25s ease,
        border-color 0.25s ease;
}

.nav-dot:hover {
    transform: scale(1.3);

    border-color: var(--color-point-active);
}


/* Aktiver Navigationspunkt */

.nav-dot.active-dot {
    background-color: var(--color-point-active);

    border: 3px solid var(--color-point-active);

    transform: scale(1.3);
}


/* MOBILE TYPOGRAFIE */

@media (max-width: 768px) {

    :root {
        --font-size-start: 42px;
        --font-size-start-subtitle: 18px;

        --font-size-title: 26px;
        --font-size-intro: 18px;
        --font-size-body: 16px;
    }

    .start-content {
        padding: 0 20px;
    }

    .story-card h2 {
        line-height: 1.2;
    }
}

.place-gallery {
    width: 100%;
    min-width: 0;
    margin: 1.5rem 0;
    overflow: hidden;
}

.place-gallery .swiper-slide {
    width: 100%;
    height: auto;
    margin: 0;
    box-sizing: border-box;
}

.place-gallery-img {
    display: block;

    width: 100%;
    height: auto;
    max-width: 100%;
    max-height: 420px;

    object-fit: contain;
    border-radius: 8px;
}

.place-gallery-caption {
    margin-top: 0.6rem;

    font-family: var(--font-mono);
    font-size: var(--font-size-caption);

    color: var(--color-text-muted);
    line-height: 1.5;
    text-align: center;
}

.place-gallery .swiper-button-prev,
.place-gallery .swiper-button-next {
    color: var(--color-accent);
}

.place-gallery .swiper-pagination {
    position: relative;
    inset: auto;

    margin-top: 0.75rem;

    font-family: var(--font-mono);
    font-size: var(--font-size-caption);

    color: var(--color-text-muted);
}