/*  structure.css  */


/* =====================================================================
   ============================ Header & Nav ============================
   ===================================================================== */

/* ======== Site Header Hontainer ======== (Quelle: https://getbootstrap.com/docs/5.0/components/navbar/) */
/* glas effekt + fixed z-index -> header bleibt immer sichtbar beim scrollen (legacy lösung, has-scrolled fixed das und hilft auch bei pager buttons (siehe app-core.js) */
.site-header {
    position: relative;
    z-index: 1000; /* über allen epochen */
    padding: 0.25rem 0.75rem 0.45rem;
    margin-bottom: 0.25rem;
    background: linear-gradient(180deg, rgba(21,23,26,0.98), rgba(12,13,15,0.95));
    border-bottom: 1px solid var(--border-soft);
    box-shadow: 0 10px 30px rgba(0,0,0,0.35);
    --ui-accent: var(--brand-turquoise);
    --ui-accent-soft: color-mix(in srgb, var(--brand-turquoise) 28%, transparent);
}

/* ======== Header state nach scroll ======== */
/* macht header sichtbar sobald user scrollt (body.has-scrolled via JS gesetzt) */
body.has-scrolled:not(.subpage) .site-header {
    transform: none;
    opacity: 1;
    pointer-events: auto;
}

/* ======== Navbar variante für bootstrap ======== (Quelle: https://getbootstrap.com/docs/5.0/components/navbar/) */
/* alternative styling variante für bootstrap navbar */
.site-header.navbar{
  background: linear-gradient(180deg, rgba(21,23,26,0.98), rgba(12,13,15,0.95));
  border-bottom: 1px solid var(--ui-accent-soft);
}

/* ======== Brand + claim glow ======== (Quelle: https://getbootstrap.com/docs/5.0/components/navbar/#brand) */
/* türkises glow für logo und claim */
.site-header .navbar-brand,
.site-header .brand-claim{
  color: var(--brand-turquoise) !important;
  text-shadow: 0 0 12px color-mix(in srgb, var(--brand-turquoise) 55%, transparent);
}

/* ======== Nav links grundstil ======== */
/* helle türkise links mit leichtem glow */
.site-header .nav-link{
  color: rgba(190,255,255,0.88) !important;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-shadow: 0 0 10px color-mix(in srgb, var(--brand-turquoise) 35%, transparent);
}

/* ======== Warenkorb emoji glow ======== */
/* emoji glow matching mit nav links */
.cart-emoji{
  display: inline-block;
  text-shadow: 0 0 10px color-mix(in srgb, var(--brand-turquoise) 35%, transparent);
}

/* ======== Nav links hover/active ======== */
/* verstärkter glow bei hover/focus/active für feedback */
.site-header .nav-link:hover,
.site-header .nav-link:focus,
.site-header .nav-link.active,
.site-header .nav-link[aria-current="page"]{
  color: var(--brand-turquoise) !important;
  text-shadow: 0 0 16px color-mix(in srgb, var(--brand-turquoise) 70%, transparent);
}

/* ======== Navbar toggler ======== */
/* mobile hamburger menu styling */
.site-header .navbar-toggler { border-color: var(--ui-accent-soft); }
.site-header .navbar-toggler:focus{
  box-shadow: 0 0 0 0.2rem color-mix(in srgb, var(--brand-turquoise) 30%, transparent) !important;
  outline: none;
}

/* ======== Wordmark layout ======== */
/* logo + claim layout struktur */
.site-header .brand-wordmark {
    margin-bottom: 0.25rem;
}

.brand-home {
    display: inline-block; /* erlaubt platz nach außen(margin)/innen(padding) sauber */
}

.brand-name-img {
    width: min(120px, 70vw);
    height: auto;
    display: block;
}

/* ======== Claim unter logo ======== */
/* "Reise durch die Zeit" claim styling */
.brand-claim {
    color: var(--brand-turquoise);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-weight: 700;
    font-size: 0.65rem;
    line-height: 1.05;
    margin: 0;
    margin-top: 0.5rem;
}


/* =====================================================================
   ============================ Landing & Hero ==========================
   ===================================================================== */

/* ======== Landing bereich basis ======== */
/* fullscreen hero sektion mit min height 100svh */
.landing {
    padding: clamp(1rem, 3vw, 1.5rem) clamp(1rem, 3vw, 2rem) clamp(1.5rem, 4vw, 2rem);
    padding-top: 0.75rem;
    min-height: 100svh;
    background: #000;
    position: relative;
}

/* ======== Epoche puffer für landing ======== */
/* abstand zu nächster sektion (via css variable) */
.landing.epoche {
    --epoch-buffer: clamp(24px, 6vh, 140px);
}

/* ======== Gradient fade nach unten ======== */
/* sanfter übergang zur nächsten sektion statt harter kante */
.landing::after{
    content:"";
    position:absolute;
    left:0; right:0; bottom:-1px;
    height: clamp(240px, 35vh, 420px);
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.55) 45%, rgba(0,0,0,0.9) 100%);
    pointer-events:none;
    z-index:2;
}

/* ======== Welcome text zentrierung ======== */
/* zentrierter hero text mit max width für lesbarkeit */
.landing-welcome {
    max-width: 800px;
    margin: 0 auto clamp(1rem, 2.5vw, 1.5rem);
}

.landing-welcome h1 {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    margin: 0 0 0.5rem;
    color: var(--text-primary);
}

.landing-welcome p {
    font-size: clamp(0.9rem, 2vw, 1.05rem);
    color: var(--text-secondary);
    margin: 0;
}


/* =====================================================================
   =============================== Buttons ==============================
   ===================================================================== */

/* ======== Globaler button look ======== (Quelle: https://getbootstrap.com/docs/5.0/components/buttons/) */
/* pill radius für alle buttons statt hard edges */
.btn-primary, .btn-success, .btn-outline-secondary, .btn-outline-light{
  border-radius: var(--radius-pill);
}

.btn{
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* ======== Primary button theme ======== */
/* türkiser hover/active states via css */
.btn-primary{
  --bs-btn-bg: var(--ui-accent);
  --bs-btn-border-color: color-mix(in srgb, var(--ui-accent) 30%, rgba(255,255,255,0.10));
  --bs-btn-color: #0b0c0e;
  --bs-btn-hover-bg: color-mix(in srgb, var(--ui-accent) 80%, #ffffff 0%);
  --bs-btn-hover-border-color: color-mix(in srgb, var(--ui-accent) 40%, rgba(255,255,255,0.18));
  --bs-btn-hover-color: #0b0c0e;
  --bs-btn-active-bg: color-mix(in srgb, var(--ui-accent) 80%, #ffffff 0%);
  --bs-btn-active-border-color: color-mix(in srgb, var(--ui-accent) 45%, rgba(255,255,255,0.20));
  box-shadow: var(--shadow-soft);
}

/* ======== Secondary outline theme ======== */
/* weniger dominante buttons */
.btn-outline-secondary{
  --bs-btn-color: rgba(190,255,255,0.88);
  --bs-btn-border-color: color-mix(in srgb, var(--ui-accent) 28%, rgba(255,255,255,0.18));
  --bs-btn-hover-bg: rgba(255,255,255,0.06);
  --bs-btn-hover-border-color: color-mix(in srgb, var(--ui-accent) 40%, rgba(255,255,255,0.28));
  --bs-btn-hover-color: rgba(190,255,255,0.92);
  --bs-btn-active-bg: rgba(255,255,255,0.08);
  --bs-btn-active-border-color: color-mix(in srgb, var(--ui-accent) 45%, rgba(255,255,255,0.32));
  box-shadow: var(--shadow-soft);
}


/* =====================================================================
   =========================== Layout Helpers ===========================
   ===================================================================== */

/* ======== Viewport reset für mainpage ======== */
/* entfernt fixed/sticky positioning von #viewport (nur für subpages nötig) */
body:not(.subpage) #viewport {
    position: relative;
    inset: auto;
    height: auto;
    padding-top: 0;
    overflow: visible;
    scroll-padding-top: 0;
    overscroll-behavior: auto;
    z-index: auto;
}


/* =====================================================================
   ============================ Epochen Basis ===========================
   ===================================================================== */

/* ======== Epoche container basis ======== */
/* fullscreen background sektionen mit fixed background attachment für parallax effekt */
.epoche {
    position: relative;
    width: 100%;
    font-family: 'Space Grotesk', system-ui, 'Segoe UI', sans-serif;
    min-height: 0;
    display: block;
    background-color: #000;
    background-image: var(--epoch-bg);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed; /* parallax effekt */
    padding-top: var(--epoch-buffer);
    padding-bottom: var(--epoch-buffer);
    --epoch-fade: var(--epoch-buffer);
    overflow: visible;
    z-index: 1;
    isolation: isolate;
    align-items: center;
    --epoch-font: inherit;
    --epoch-title-font: var(--epoch-font);
    --epoch-activity-gap: clamp(0.8rem, 2vw, 1.2rem);
}

/* ======== Fade zonen oben/unten ======== */
/* sanfte übergänge zwischen epochen (schwarz fade) statt harter schnitte */
.epoche::before,
.epoche::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: var(--epoch-fade, var(--epoch-buffer));
    pointer-events: none;
    z-index: 2;
}

.epoche::before {
    top: 0;
    background: linear-gradient(180deg, #000 0%, transparent 100%);
}

.epoche::after {
    bottom: 0;
    background: linear-gradient(0deg, #000 0%, transparent 100%);
}

/* ======== Epoche stage + content ======== */
/* innerer content container mit zentrierung */
.epoche-stage {
    position: relative;
    padding: clamp(2.5rem, 4vw, 4rem) 1rem;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ======== Epoche content ======== */
/* sichtbarer inhalt einer epoche (max width 1100px für lesbarkeit) */
.epoche-content {
    position: relative;
    z-index: 2;
    width: min(1100px, calc(100% - 2rem));
    max-width: 1100px;
    margin: 0 auto;
    padding: 3rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    color: #fff;
    opacity: 1;
    transform: none;
    transition: none;
    background: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    overflow-wrap: anywhere;
    word-break: break-word;
    height: auto;
    overflow: visible;
    padding-right: 0;
    text-shadow: 0 2px 14px rgba(0,0,0,0.55);
}

/* ======== Anchor ======== */
.epoche-anchor {
    position: relative;
    height: 1px;
    margin: 0;
    padding: 0;
    scroll-margin-top: calc(var(--header-h, 72px) + 18px);
}

/* ======== Extra wide content ======== */
.epoche-content--wide {
    max-width: 1250px;
    width: min(1250px, calc(100% - 2rem));
}

/* ======== Inner wrapper ======== */
/* verhindert overflow scroll innerhalb epochen */
.epoche-inner {
    max-height: none;
    overflow: visible;
    padding-right: 0;
}

/* ======== Title basis ======== */
.epoche-title {
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    margin: 0;
    word-break: break-word;
    overflow-wrap: anywhere;
    text-align: center;
}

/* ======== Subtitle basis ======== */
/* tagline unter titel (max width 700px für lesbarkeit) */
.epoche-subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.3rem);
    max-width: 700px;
    word-break: break-word;
    overflow-wrap: anywhere;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

/* ======== Titel/sub fonts + textfarbe ======== */
.epoche .epoche-title,
.epoche .epoche-subtitle {
    font-family: var(--epoch-title-font);
    color: var(--epoch-text, #fff);
}

/* ======== Card fonts + textfarbe ======== */
.epoche .epoche-activity-item {
    font-family: var(--epoch-font);
    color: var(--epoch-text, #fff);
}


/* =====================================================================
   ===================== Mobile Background ============================
   ===================================================================== */

/* ======== Mobile background fix ======== (Quelle: https://css-tricks.com/the-fixed-background-attachment-hack/) */
/* background-attachment:fixed ist auf iOS/Android buggy (abgeschnittene/fehlende bereiche beim scrollen) -> scroll statt fixed verhindert blank areas bei mobiler adressleisten animation (ein/ausblenden) */
@media (max-width: 768px), (hover: none) {
    .epoche {
        background-attachment: scroll; /* scroll statt fixed für mobile stabilität */
        min-height: 100svh; /* svh berücksichtigt mobile adressleiste */
    }

    .landing {
        min-height: 100svh; /* svh statt vh für korrekte höhe bei mobile */
    }
}
