/* 
 * TEIL1 LEXIKON CSS
 * Minimalist Index
 */

/* =========================================
   1. Archive View
   ========================================= */

.lexikon-archive {
    padding: clamp(80px, 12vw, 160px) 0 var(--wp--preset--spacing--128) 0;
}

.lexikon-archive__header {
    margin-bottom: var(--wp--preset--spacing--64);
}


/* ══════════════════════════════════════════
   Hero Banner — Image + overlaid content
   ══════════════════════════════════════════ */
.lexikon-archive__banner {
    position: relative;
    height: 350px;
    overflow: hidden;
    /* Match global container rules exactly */
    width: calc(100% - 2 * var(--layout-padding));
    max-width: var(--layout-max-width);
    margin-inline: auto;
    box-sizing: border-box;
}

/* Background image */
.lexikon-archive__banner-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 35%;
    z-index: 0;
}

/* Gradient overlay — fades image to bg color at bottom */
.lexikon-archive__banner::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        to top,
        var(--wp--preset--color--bg) 0%,
        rgba(245, 244, 240, 0.7) 35%,
        rgba(245, 244, 240, 0.2) 60%,
        transparent 100%
    );
}

/* Content overlay */
.lexikon-archive__banner-content {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    height: 100%;
    padding-bottom: var(--wp--preset--spacing--32);
    padding-left: 0 !important;
    gap: var(--wp--preset--spacing--32);
}

.lexikon-archive__banner-text {
    flex: 1;
}

/* H1 — dominant, anchored at bottom of banner */
.lexikon-archive__title {
    margin: 0;
    font-family: var(--wp--preset--font-family--heading);
    font-size: var(--wp--preset--font-size--4xl);
    font-weight: 500;
    letter-spacing: -0.04em;
    line-height: 1.05;
    color: var(--wp--preset--color--text-main);
}

/* Subline — under H1, uppercase, clear separation */
.lexikon-archive__subline {
    display: block;
    margin-top: var(--wp--preset--spacing--12);
    font-family: var(--wp--preset--font-family--body);
    font-size: var(--wp--preset--font-size--xs);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--wp--preset--color--text-muted);
}

@media (max-width: 768px) {
    .lexikon-archive__banner {
        height: 220px;
    }
    .lexikon-archive__banner-img {
        top: 40%;
    }
    .lexikon-archive__banner-content {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--wp--preset--spacing--16);
        padding-bottom: var(--wp--preset--spacing--24);
    }
    .lexikon-archive__title {
        font-size: var(--wp--preset--font-size--3xl);
    }
}


/* ── Search Input (inside banner, right-aligned) ── */
.lexikon-archive__search {
    flex: 0 0 260px;
    align-self: flex-end;
}

.lexikon-search__input {
    width: 100%;
    padding: 12px 18px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    font-family: var(--wp--preset--font-family--body);
    font-size: var(--wp--preset--font-size--base);
    color: var(--wp--preset--color--text-main);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.lexikon-search__input::placeholder {
    color: var(--wp--preset--color--text-muted);
}

.lexikon-search__input:focus {
    border-color: var(--wp--preset--color--text-main);
    box-shadow: 0 0 0 3px rgba(18, 18, 18, 0.06);
    background: rgba(255, 255, 255, 0.95);
}

@media (max-width: 768px) {
    .lexikon-archive__search {
        flex: auto;
        width: 100%;
    }
}


/* ── Intro — separate zone below banner ── */
.lexikon-archive__meta {
    padding-top: var(--wp--preset--spacing--32);
    padding-bottom: var(--wp--preset--spacing--32);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.lexikon-archive__intro {
    font-size: var(--wp--preset--font-size--base);
    color: var(--wp--preset--color--text-muted);
    line-height: 1.55;
    margin: 0;
    max-width: 600px;
}


/* ── No Results ── */
.lexikon-search__empty {
    font-size: var(--wp--preset--font-size--base);
    color: var(--wp--preset--color--text-muted);
    margin-top: var(--wp--preset--spacing--32);
}


/* ── Toolbar: Filter Row ── */
.lexikon-archive__toolbar {
    padding-top: var(--wp--preset--spacing--24);
    padding-bottom: var(--wp--preset--spacing--24);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.lexikon-archive__filters {
    display: flex;
    align-items: center;
    gap: var(--wp--preset--spacing--16);
}

.lexikon-archive__filter-label {
    font-family: var(--wp--preset--font-family--body);
    font-size: var(--wp--preset--font-size--xs);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--wp--preset--color--text-muted);
    flex-shrink: 0;
    padding-right: var(--wp--preset--spacing--8);
    border-right: 1px solid rgba(0, 0, 0, 0.08);
}

@media (max-width: 768px) {
    .lexikon-archive__filters {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--wp--preset--spacing--12);
    }
    .lexikon-archive__filter-label {
        border-right: none;
        padding-right: 0;
    }
}

/* Filter Pills */
.lexikon-filter-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: var(--wp--preset--spacing--8);
}

.lexikon-pill {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 100px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    font-size: var(--wp--preset--font-size--xs);
    font-family: var(--wp--preset--font-family--body);
    font-weight: 500;
    text-decoration: none;
    color: var(--wp--preset--color--text-muted);
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.lexikon-pill:hover {
    border-color: var(--wp--preset--color--text-main);
    color: var(--wp--preset--color--text-main);
}

.lexikon-pill.is-active {
    background-color: var(--wp--preset--color--text-main);
    color: var(--wp--preset--color--bg);
    border-color: var(--wp--preset--color--text-main);
}

/* Entry Count */
.lexikon-archive__count {
    font-family: monospace;
    font-size: var(--wp--preset--font-size--xs);
    color: var(--wp--preset--color--text-muted);
    text-align: right;
    margin-top: var(--wp--preset--spacing--48);
    padding-top: var(--wp--preset--spacing--24);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.lexikon-lexicon {
    /* left-aligned, container handles width and padding */
    padding-top: var(--wp--preset--spacing--64);
    border-top: none;
}

.lexicon-group {
    display: flex;
    flex-direction: column;
    margin-bottom: var(--wp--preset--spacing--64);
    border-bottom: 1px solid rgba(18, 18, 18, 0.05);
    padding-bottom: var(--wp--preset--spacing--32);
}

.has-background .lexicon-group {
    border-bottom-color: rgba(255,255,255,0.05);
}

@media (min-width: 768px) {
    .lexicon-group {
        flex-direction: row;
        gap: var(--wp--preset--spacing--64);
    }
}

.lexicon-letter {
    flex: 0 0 120px;
}

.lexicon-letter h2 {
    font-size: clamp(3rem, 5vw, 4rem);
    margin: 0;
    color: var(--wp--preset--color--accent);
    line-height: 1;
    font-weight: 300;
    position: sticky;
    top: 100px;
}

.lexicon-entries {
    flex: 1;
}

.lexicon-entries ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.lexicon-entries li {
    margin-bottom: var(--wp--preset--spacing--16);
}

.lexicon-term-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    padding: 16px 24px;
    background-color: var(--wp--preset--color--surface);
    border-radius: 8px;
    color: var(--wp--preset--color--text-main);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.has-background .lexicon-term-link {
    background-color: rgba(255,255,255,0.02);
}

.lexicon-term-link:hover {
    background-color: #00000021;
    color: #000;
    /* No translateX: avoids layout shift in the lexicon list */
}

.term-name {
    font-size: 1.125rem;
    font-weight: 400;
    flex: 1;
}

.term-badge {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    background: rgba(18,18,18,0.08);
    padding: 4px 8px;
    border-radius: 4px;
    margin-right: 16px;
    font-family: monospace;
}

.lexicon-term-link:hover .term-badge {
    background: rgba(255,255,255,0.2);
}

.term-arrow {
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s;
    font-family: monospace;
}

.lexicon-term-link:hover .term-arrow {
    opacity: 1;
    transform: translateX(0);
}

.lexicon-empty {
    font-size: 1.125rem;
    color: var(--wp--preset--color--text-muted);
}



/* =========================================
   2. Single View
   ========================================= */

.lexikon-single {
    padding: clamp(80px, 12vw, 160px) 0 var(--wp--preset--spacing--128) 0;
}

/* ── Single Banner — mirrors archive banner ── */
.lexikon-single__banner {
    position: relative;
    height: 350px;
    overflow: hidden;
    width: calc(100% - 2 * var(--layout-padding));
    max-width: var(--layout-max-width);
    margin-inline: auto;
    box-sizing: border-box;
}

.lexikon-single__banner-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 35%;
    z-index: 0;
}

.lexikon-single__banner::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        to top,
        var(--wp--preset--color--bg) 0%,
        rgba(245, 244, 240, 0.7) 35%,
        rgba(245, 244, 240, 0.2) 60%,
        transparent 100%
    );
}

.lexikon-single__banner-content {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: flex-start;
    align-items: flex-end;
    height: 100%;
    padding-bottom: var(--wp--preset--spacing--32);
    padding-left: 0 !important;
}

.lexikon-single__banner-text {
    flex: 1;
}

.lexikon-single__header {
    margin-bottom: var(--wp--preset--spacing--48);
}

.lexikon-breadcrumb {
    font-family: var(--wp--preset--font-family--body);
    font-size: var(--wp--preset--font-size--xs);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--wp--preset--color--text-muted);
    margin-bottom: 150px;
}

.lexikon-breadcrumb a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s;
}

.lexikon-breadcrumb a:hover {
    color: var(--wp--preset--color--accent);
}

.lexikon-breadcrumb .sep {
    margin: 0 8px;
    opacity: 0.5;
}

.lexikon-single__title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    line-height: 1.05;
    letter-spacing: -0.04em;
    font-weight: 300;
}

/* Video Wrapper 16:9 intrinsic ratio */
.lexikon-single__video-wrapper {
    margin-bottom: var(--wp--preset--spacing--64);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    background: #000;
    /* Constrained width for refined layout */
    max-width: 60%;
    margin-inline: auto;
}

@media (max-width: 768px) {
    .lexikon-single__video-wrapper {
        max-width: 90%;
    }
    .lexikon-single__banner {
        height: 220px;
    }
    .lexikon-single__banner-img {
        top: 40%;
    }
    .lexikon-single__title {
        font-size: clamp(2rem, 6vw, 3rem);
    }
}

.video-container-16-9 {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    width: 100%;
}

.video-container-16-9 iframe,
.video-container-16-9 object,
.video-container-16-9 embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.lexikon-single__content {
    max-width: 840px !important;
}

.lexikon-single__definition {
    font-size: 0.95rem;    /* smaller than body (1.125rem) — accent border carries the weight */
    line-height: 1.65;
    margin-bottom: var(--wp--preset--spacing--48);
    font-weight: 400;
    color: var(--wp--preset--color--text-muted);
    border-left: 3px solid var(--wp--preset--color--accent);
    padding-left: var(--wp--preset--spacing--24);
}

.lexikon-single__body {
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--wp--preset--color--text-muted);
}

.lexikon-single__body h2 {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    line-height: 1.2;
    margin: var(--wp--preset--spacing--48) 0 var(--wp--preset--spacing--24) 0;
    color: var(--wp--preset--color--text-main);
}

/* Siloing / Related */
.lexikon-single__related {
    margin-top: var(--wp--preset--spacing--96);
    padding-top: var(--wp--preset--spacing--64);
    border-top: 1px solid rgba(18,18,18,0.1);
}

.has-background .lexikon-single__related {
    border-top-color: rgba(255,255,255,0.1);
}

.lexikon-related-header {
    margin-bottom: var(--wp--preset--spacing--48);
}

.lexikon-related-label {
    font-family: monospace;
    color: var(--wp--preset--color--accent);
    margin-bottom: var(--wp--preset--spacing--8);
    font-size: var(--wp--preset--font-size--sm);
}

.lexikon-related-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--wp--preset--spacing--24);
}

@media (min-width: 768px) {
    .lexikon-related-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.lexikon-related-card {
    display: block;
    text-decoration: none;
    padding: var(--wp--preset--spacing--32);
    border: 1px solid rgba(18,18,18,0.1);
    border-radius: 8px;
    background-color: var(--wp--preset--color--surface);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.has-background .lexikon-related-card {
    border-color: rgba(255,255,255,0.05);
}

.lexikon-related-card:hover {
    border-color: var(--wp--preset--color--text-main);
}

.lexikon-related-card h3 {
    font-size: var(--wp--preset--font-size--lg);
    margin-bottom: var(--wp--preset--spacing--16);
    color: var(--wp--preset--color--text-main);
}

.lexikon-related-card-meta {
    font-size: var(--wp--preset--font-size--xs);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--wp--preset--color--text-muted);
}

/* CTA */
.lexikon-single__cta {
    margin-top: var(--wp--preset--spacing--128);
    background-color: var(--wp--preset--color--surface);
    border-radius: 16px;
    padding: var(--wp--preset--spacing--96) var(--wp--preset--spacing--32);
    text-align: center;
    border: 1px solid rgba(18,18,18,0.05);
}

.has-background .lexikon-single__cta {
    border-color: rgba(255,255,255,0.05);
}

.lexikon-cta-inner {
    max-width: 640px;
    margin: 0 auto;
}

.lexikon-cta-title {
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.1;
    margin-bottom: var(--wp--preset--spacing--24);
}

.lexikon-cta-desc {
    color: var(--wp--preset--color--text-muted);
    font-size: 1.125rem;
    margin-bottom: var(--wp--preset--spacing--48);
}
