/* ============================================================
   STARTSEITE — Showstopper-Hero „Das Logbuch“ (masterplan-hero.md §6)
   ============================================================ */

.hero {
    position: relative;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background:
        radial-gradient(ellipse 130% 90% at 50% 0%, #1C3A2C 0%, var(--forest-900) 55%, #0C1E15 100%);
    box-shadow: inset 0 0 9rem rgba(0, 0, 0, 0.42);
}

/* Ornament-Rahmen (doppelte Messinglinie, wie ein Atlas-Rahmen) */
.hero::before {
    content: "";
    position: absolute;
    inset: var(--space-4);
    border: 1px solid rgba(169, 138, 78, 0.35);
    pointer-events: none;
    z-index: 5;
}
.hero::after {
    content: "";
    position: absolute;
    inset: calc(var(--space-4) + 6px);
    border: 1px solid rgba(169, 138, 78, 0.18);
    pointer-events: none;
    z-index: 5;
}

/* Kompassrose als Wasserzeichen, langsam drehend */
.hero__compass {
    position: absolute;
    left: 50%;
    top: 50%;
    width: min(88vw, 720px);
    transform: translate(-50%, -50%);
    color: var(--brass-500);
    opacity: 0.12;
    pointer-events: none;
    z-index: 1;
    animation: compass-spin 150s linear infinite;
}
@keyframes compass-spin {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to   { transform: translate(-50%, -50%) rotate(360deg); }
}

.hero__inner {
    position: relative;
    z-index: 2;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: var(--space-10);
    width: 100%;
    max-width: var(--content-max);
    margin: 0 auto;
    padding: var(--space-16) var(--space-6) var(--space-10);
}

/* ---------- Das Logbuch ---------- */

.logbook {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: min(100%, 60rem);
    margin: 0 auto;
    background: linear-gradient(115deg, #F1E9D3 0%, #F3EDDD 45%, #EFE5CA 100%);
    border: 1px solid rgba(43, 33, 24, 0.55);
    box-shadow: 0 2.5rem 6rem rgba(0, 0, 0, 0.55);
    transform: rotate(-0.9deg);
    opacity: 0;
    animation: hero-fade var(--dur-slow) var(--ease-ink) 0.3s forwards;
}

/* Buchrücken */
.logbook::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    transform: translateX(-50%);
    background: linear-gradient(90deg, rgba(43, 33, 24, 0) 0%, rgba(43, 33, 24, 0.35) 30%, rgba(43, 33, 24, 0.5) 50%, rgba(43, 33, 24, 0.35) 70%, rgba(43, 33, 24, 0) 100%);
    z-index: 3;
}

.logbook__page {
    position: relative;
    padding: clamp(1.75rem, 3.5vw, 3rem);
}

/* Papierkante oben */
.logbook__page::before {
    content: "";
    position: absolute;
    left: 6%;
    right: 6%;
    top: 0;
    height: 1px;
    background: rgba(43, 33, 24, 0.12);
}

/* Innere Seiten-Schatten zum Rücken hin */
.logbook__page--text::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 2.5rem;
    background: linear-gradient(90deg, rgba(43, 33, 24, 0) 0%, rgba(43, 33, 24, 0.14) 100%);
    pointer-events: none;
}
.logbook__page--plate::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 2.5rem;
    background: linear-gradient(90deg, rgba(43, 33, 24, 0.14) 0%, rgba(43, 33, 24, 0) 100%);
    pointer-events: none;
}

.hero__eyebrow {
    font-family: var(--font-mono);
    font-size: var(--fs-xs);
    font-weight: 500;
    letter-spacing: 0.34em;
    text-transform: uppercase;
    color: var(--primary);
    opacity: 0;
    animation: hero-fade var(--dur-slow) var(--ease-ink) 0.2s forwards;
}

.hero__headline {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(1.75rem, 2.8vw, 2.8rem);
    line-height: 1.12;
    max-width: 24ch;
    margin: var(--space-6) 0 var(--space-6);
    opacity: 0;
    animation: hero-fade var(--dur-slow) var(--ease-ink) 0.5s forwards;
}

.hero__ornament {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: var(--space-4);
    color: var(--ornament);
    margin-bottom: var(--space-8);
    opacity: 0;
    animation: hero-fade var(--dur-slow) var(--ease-ink) 0.8s forwards;
}
.hero__ornament::before, .hero__ornament::after { content: ""; width: 3.5rem; height: 1px; background: var(--ornament); }

.hero__lead {
    max-width: 40ch;
    font-size: var(--fs-lg);
    line-height: 1.65;
    margin: 0;
    opacity: 0;
    animation: hero-fade var(--dur-slow) var(--ease-ink) 1.1s forwards;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
    margin-top: var(--space-8);
    opacity: 0;
    animation: hero-fade var(--dur-slow) var(--ease-ink) 1.3s forwards;
}

.hero__stamp {
    margin-top: var(--space-8);
    opacity: 0;
    animation: hero-fade var(--dur-slow) var(--ease-ink) 1.5s forwards;
}

/* ---------- Rechte Seite: Tafel-Karussell ---------- */

.logbook__plate {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: var(--frame-thin);
    background: var(--surface);
    padding: var(--space-3);
    box-shadow: 0 0.75rem 2rem rgba(43, 33, 24, 0.18);
}

.logbook__slides {
    position: relative;
    flex: 1;
    min-height: 18rem;
    overflow: hidden;
    background: var(--sepia-100);
}

.lb-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.7s ease;
}
.lb-slide.is-active { opacity: 1; }

.lb-slide__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1);
}
.lb-slide.is-active .lb-slide__img { animation: lb-kenburns 3s ease-in-out infinite alternate; }
@keyframes lb-kenburns {
    from { transform: scale(1) translate(0, 0); }
    to   { transform: scale(1.08) translate(-1.2%, -0.8%); }
}

.logbook__caption { text-align: center; padding-top: var(--space-2); }

.logbook__dots {
    display: flex;
    justify-content: center;
    gap: var(--space-2);
    margin-top: var(--space-3);
}
.lb-dot {
    width: 0.65rem;
    height: 0.65rem;
    border-radius: 50%;
    border: 1px solid var(--ink-900);
    background: transparent;
    padding: 0;
    cursor: pointer;
    transition: background var(--dur-fast), border-color var(--dur-fast);
}
.lb-dot:hover { border-color: var(--terracotta-500); }
.lb-dot.is-active { background: var(--terracotta-500); border-color: var(--terracotta-500); }

/* ---------- Routen-Leiste ---------- */

.hero__route {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: var(--space-3) var(--space-8);
    font-family: var(--font-mono);
    font-size: var(--fs-xs);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    opacity: 0;
    animation: hero-fade var(--dur-slow) var(--ease-ink) 1.7s forwards;
}
.hero__route-label { color: var(--sepia-300); }
.hero__route-stop {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--parchment-50);
    text-decoration: none;
}
.hero__route-stop:hover { color: var(--sepia-100); text-decoration: underline; }
.hero__route-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--brass-500);
    animation: dot-pulse 2.6s ease-in-out infinite;
}

/* ---------- SVG-Weltkarte (Notlösung, nur ohne Bilder) ---------- */

.worldplate {
    position: relative;
    width: min(100%, 68rem);
    margin: 0 auto;
    padding: 0 var(--space-6);
    opacity: 0;
    animation: hero-fade var(--dur-slow) var(--ease-ink) 0.3s forwards;
}

.worldplate__svg { width: 100%; height: auto; }

.worldplate__land {
    fill: var(--sepia-100);
    stroke: var(--ink-900);
    stroke-width: 1.6;
    stroke-linejoin: round;
}
.worldplate__land--shadow {
    fill: none;
    stroke: var(--ink-900);
    stroke-width: 0.6;
    opacity: 0.5;
}

.worldplate__graticule { stroke: var(--sepia-300); stroke-width: 0.5; fill: none; }
.worldplate__rhumb { stroke: var(--line); stroke-width: 0.7; stroke-dasharray: 3 5; fill: none; }

/* Route zeichnet sich selbst */
.route {
    fill: none;
    stroke: var(--terracotta-500);
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-dasharray: 1 10;
    stroke-linejoin: round;
    animation: route-draw 4s var(--ease-ink) 1.6s forwards;
}
.route-ghost { fill: none; stroke: var(--line); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

@keyframes route-draw {
    from { stroke-dashoffset: 4000; }
    to   { stroke-dashoffset: 0; }
}

/* Ziel-Punkte */
.dest-dot {
    fill: var(--terracotta-500);
    stroke: var(--parchment-50);
    stroke-width: 2;
    opacity: 0;
    animation: dot-pop 0.5s var(--ease-ink) forwards;
}
@keyframes dot-pop { from { opacity: 0; transform: scale(0.4); } to { opacity: 1; transform: scale(1); } }

.dest-dot--pulse { transform-origin: center; transform-box: fill-box; animation: dot-pulse 2.6s ease-in-out infinite; }
@keyframes dot-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }

/* Beschriftungen (HTML, über der Karte) */
.worldplate__labels { position: absolute; inset: 0; pointer-events: none; }
.dest-label {
    position: absolute;
    transform: translate(-50%, -150%);
    font-family: var(--font-mono);
    font-size: var(--fs-xs);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-900);
    white-space: nowrap;
    opacity: 0;
    animation: hero-fade var(--dur-slow) var(--ease-ink) 2.2s forwards;
}
.dest-label strong { display: block; color: var(--primary); font-weight: 500; }

/* ---------- Scroll-Hinweis ---------- */

.hero__cue {
    position: relative;
    z-index: 6;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    padding-bottom: var(--space-8);
    font-family: var(--font-mono);
    font-size: var(--fs-xs);
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--text);
    opacity: 0;
    animation: hero-fade var(--dur-slow) var(--ease-ink) 1.6s forwards;
}
.hero__cue-line { width: 1px; height: 3rem; background: var(--ink-900); position: relative; overflow: hidden; }
.hero__cue-line::after {
    content: "";
    position: absolute;
    top: -50%;
    left: 0;
    width: 100%;
    height: 50%;
    background: var(--terracotta-500);
    animation: cue-slide 2.2s ease-in-out infinite;
}
@keyframes cue-slide { 0% { top: -50%; } 100% { top: 110%; } }

@keyframes hero-fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Home-Sektionen ---------- */

.home-intro { text-align: center; max-width: 56ch; margin: 0 auto; }
.home-intro p { font-size: var(--fs-lg); }

/* Mobiles Hero: Buch stapelt, Textseite zentriert, Kompass kleiner */
@media (max-width: 900px) {
    .hero { min-height: auto; }
    .hero__inner {
        gap: var(--space-8);
        padding: var(--space-12) var(--space-6) var(--space-10);
    }
    .logbook {
        grid-template-columns: 1fr;
        max-width: 36rem;
        transform: none;
    }
    .logbook::before { display: none; }
    .logbook__page--text { text-align: center; border-bottom: 1px solid rgba(43, 33, 24, 0.25); }
    .logbook__page--text::after, .logbook__page--plate::after { display: none; }
    .hero__ornament { justify-content: center; }
    .hero__lead { margin: 0 auto; }
    .hero__actions { justify-content: center; }
    .hero__compass { width: min(110vw, 560px); }
}

/* (Mobile Raster der Magazin-Karten übernimmt app.css: .grid--2) */

/* reduced-motion: alles statisch, Route vollständig gezeichnet */
@media (prefers-reduced-motion: reduce) {
    .hero__eyebrow, .hero__headline, .hero__ornament, .hero__lead, .hero__actions, .hero__stamp, .logbook, .hero__route, .hero__cue, .dest-label {
        opacity: 1;
        animation: none;
    }
    .hero__compass { animation: none; }
    .lb-slide__img, .lb-slide.is-active .lb-slide__img { animation: none; }
    .hero__route-dot { animation: none; }
    .route { stroke-dasharray: none; animation: none; }
    .dest-dot { opacity: 1; animation: none; }
    .dest-dot--pulse { animation: none; }
    .hero__cue-line::after { display: none; }
}
