/* ═══════════════════════════════════════════════════════
   STARLIGHT UNIT · BOOKS SITE · SHARED STYLESHEET
   books.starlight-unit.de
═══════════════════════════════════════════════════════ */

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

:root {
    --void:       #060913;
    --surface:    #091525;
    --elevated:   #0f1e30;
    --cyan:       #6fbaff;
    --cyan-dim:   rgba(111,186,255,0.11);
    --amber:      #d4a35a;
    --amber-dim:  rgba(212,163,90,0.10);
    --text:       #c8d8e8;
    --text-sub:   #6a8099;
    --text-muted: #3a4f63;
    --border:     rgba(111,186,255,0.08);
    --border-mid: rgba(111,186,255,0.20);
    --max-w:      1100px;
}

html { scroll-behavior: smooth; }
body {
    background: var(--void);
    color: var(--text);
    font-family: 'Spectral', Georgia, serif;
    font-weight: 300;
    line-height: 1.75;
    overflow-x: hidden;
}

/* ── STARFIELD ────────────────────────────── */
#starfield { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.scanlines {
    position: fixed; inset: 0; z-index: 1; pointer-events: none;
    background: repeating-linear-gradient(0deg,transparent,transparent 2px,rgba(0,0,0,0.025) 2px,rgba(0,0,0,0.025) 4px);
}
.ambient { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.ambient::before {
    content: ''; position: absolute; top: -20%; left: -15%; width: 60%; height: 60%;
    background: radial-gradient(circle,rgba(111,186,255,0.035) 0%,transparent 70%);
}
.ambient::after {
    content: ''; position: absolute; bottom: -20%; right: -15%; width: 50%; height: 50%;
    background: radial-gradient(circle,rgba(212,163,90,0.025) 0%,transparent 70%);
}

/* ── LAYOUT WRAPPER ───────────────────────── */
.site { position: relative; z-index: 10; display: flex; flex-direction: column; min-height: 100vh; }
main { flex: 1; }

/* ── TICKER ───────────────────────────────── */
.ticker-bar {
    border-bottom: 1px solid var(--border);
    overflow: hidden; background: rgba(6,9,19,0.92); backdrop-filter: blur(10px);
}
.ticker-inner { display: flex; align-items: stretch; }
.ticker-label {
    flex-shrink: 0; padding: 8px 18px; background: var(--amber); color: var(--void);
    font-family: 'JetBrains Mono',monospace; font-size: 8.5px; font-weight: 600;
    letter-spacing: 0.15em; text-transform: uppercase; display: flex; align-items: center;
}
.ticker-scroll { overflow: hidden; flex: 1; }
.ticker-text {
    display: inline-block; white-space: nowrap; padding: 8px 0;
    font-family: 'JetBrains Mono',monospace; font-size: 8.5px; color: var(--text-sub);
    letter-spacing: 0.12em; animation: ticker 38s linear infinite;
}
@keyframes ticker { 0% { transform: translateX(100vw); } 100% { transform: translateX(-100%); } }

/* ── NAVIGATION ───────────────────────────── */
.site-nav {
    position: sticky; top: 0; z-index: 200;
    background: rgba(6,9,19,0.88); backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}
.nav-inner {
    max-width: var(--max-w); margin: 0 auto; padding: 0 40px;
    display: flex; justify-content: space-between; align-items: center;
    height: 64px; position: relative;
}
.nav-logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.nav-logo-mark {
    font-family: 'Syncopate',sans-serif; font-size: 11px; font-weight: 700;
    color: white; letter-spacing: 0.06em; text-transform: uppercase; line-height: 1.2;
}
.nav-logo-mark span { color: var(--amber); }
.nav-logo-sub {
    font-family: 'JetBrains Mono',monospace; font-size: 8px; color: var(--text-muted);
    letter-spacing: 0.2em; text-transform: uppercase;
}
.nav-links { display: flex; list-style: none; gap: 0; }
.nav-links a {
    display: block; padding: 0 18px; height: 64px; line-height: 64px;
    font-family: 'JetBrains Mono',monospace; font-size: 9.5px; font-weight: 600;
    color: var(--text-sub); text-decoration: none; letter-spacing: 0.16em;
    text-transform: uppercase; transition: color 0.2s, background 0.2s;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
}
.nav-links a:hover { color: var(--amber); background: var(--amber-dim); }
.nav-links a.active { color: var(--amber); border-bottom-color: var(--amber); }

/* Hamburger */
.hamburger {
    display: none; flex-direction: column; justify-content: center; align-items: center;
    width: 40px; height: 40px; gap: 6px; background: none;
    border: 1px solid var(--border-mid); border-radius: 8px; cursor: pointer; padding: 8px;
}
.hamburger span { display: block; width: 20px; height: 1.5px; background: var(--amber); border-radius: 2px; transition: all 0.3s; }
.hamburger.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

.mobile-menu {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: rgba(6,9,19,0.97); border-bottom: 1px solid var(--border);
    backdrop-filter: blur(20px); z-index: 300;
    max-height: 0; overflow: hidden; transition: max-height 0.4s cubic-bezier(0.22,1,0.36,1);
}
.mobile-menu.open { max-height: 400px; }
.mobile-menu a {
    display: block; padding: 15px 28px;
    font-family: 'JetBrains Mono',monospace; font-size: 11px; font-weight: 600;
    color: var(--text-sub); text-decoration: none; letter-spacing: 0.18em;
    text-transform: uppercase; border-bottom: 1px solid var(--border);
    transition: color 0.2s, background 0.2s;
}
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu a:hover, .mobile-menu a.active { color: var(--amber); background: var(--amber-dim); }

/* ── PAGE HERO ────────────────────────────── */
.page-hero {
    position: relative; overflow: hidden;
    border-bottom: 1px solid var(--border);
}
.page-hero-bg {
    position: absolute; inset: 0;
    background-size: cover; background-position: center;
    filter: brightness(0.42) saturate(0.7);
}
.page-hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(6,9,19,0.1) 0%, rgba(6,9,19,0.75) 100%);
}
.page-hero-content {
    position: relative; max-width: var(--max-w); margin: 0 auto;
    padding: 72px 40px 64px;
}
.page-eyebrow {
    font-family: 'JetBrains Mono',monospace; font-size: 9px; color: var(--amber);
    letter-spacing: 0.28em; text-transform: uppercase; margin-bottom: 16px;
    display: flex; align-items: center; gap: 12px;
}
.page-eyebrow::before { content: ''; width: 24px; height: 1px; background: var(--amber); }
.page-title {
    font-family: 'Syncopate',sans-serif; font-weight: 700;
    font-size: clamp(26px,4vw,52px); color: white;
    text-transform: uppercase; letter-spacing: 0.03em; line-height: 1.1;
    margin-bottom: 20px;
}
.page-title em { font-style: normal; color: var(--amber); }
.page-lead {
    font-size: 17px; font-style: italic; color: var(--text-sub);
    max-width: 620px; line-height: 1.9;
}

/* ── CONTENT CONTAINER ────────────────────── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 40px; }

/* ── SECTION ──────────────────────────────── */
.section { padding: 72px 0; }
.section + .section { border-top: 1px solid var(--border); }
.section-label {
    font-family: 'JetBrains Mono',monospace; font-size: 8.5px; color: var(--text-muted);
    letter-spacing: 0.3em; text-transform: uppercase; margin-bottom: 36px;
    display: flex; align-items: center; gap: 12px;
}
.section-label::before { content: ''; width: 18px; height: 1px; background: var(--text-muted); }
.section-title {
    font-family: 'Syncopate',sans-serif; font-size: clamp(20px,3vw,32px); font-weight: 700;
    color: white; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 24px;
}

/* ── PROSE ────────────────────────────────── */
.prose { font-size: 16px; color: var(--text-sub); line-height: 1.9; }
.prose p { margin-bottom: 1.4em; }
.prose p:last-child { margin-bottom: 0; }
.prose strong { color: var(--text); font-weight: 600; font-style: normal; }
.prose em { color: var(--amber); font-style: italic; }
.prose h3 {
    font-family: 'Syncopate',sans-serif; font-size: 13px; font-weight: 700;
    color: white; text-transform: uppercase; letter-spacing: 0.1em;
    margin: 2em 0 0.8em;
}
.prose ul { padding-left: 0; list-style: none; }
.prose ul li { padding-left: 18px; position: relative; margin-bottom: 0.5em; }
.prose ul li::before { content: '·'; position: absolute; left: 0; color: var(--amber); }

/* ── QUOTE BLOCK ──────────────────────────── */
.excerpt-block {
    border-left: 3px solid var(--amber); padding: 28px 36px;
    background: linear-gradient(135deg, var(--amber-dim) 0%, transparent 100%);
    border-radius: 0 12px 12px 0; margin: 40px 0;
}
.excerpt-block p {
    font-size: 17px; font-style: italic; color: var(--text); line-height: 1.95;
    margin-bottom: 1em;
}
.excerpt-block p:last-child { margin-bottom: 0; }

/* ── BUTTONS ──────────────────────────────── */
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 36px; }
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 26px; border-radius: 8px; font-family: 'JetBrains Mono',monospace;
    font-size: 10px; font-weight: 600; letter-spacing: 0.15em; text-transform: uppercase;
    text-decoration: none; transition: all 0.25s; white-space: nowrap;
}
.btn-amber {
    background: var(--amber); color: var(--void);
    box-shadow: 0 0 24px rgba(212,163,90,0.2);
}
.btn-amber:hover { background: white; box-shadow: 0 0 40px rgba(212,163,90,0.4); transform: translateY(-2px); }
.btn-outline {
    border: 1px solid var(--border-mid); color: var(--text-sub);
}
.btn-outline:hover { border-color: var(--amber); color: var(--amber); transform: translateY(-2px); }
.btn-ghost-amber {
    border: 1px solid rgba(212,163,90,0.3); color: var(--amber);
}
.btn-ghost-amber:hover { border-color: var(--amber); background: var(--amber-dim); transform: translateY(-2px); }

/* ── IMAGE GRID ───────────────────────────── */
.img-grid { display: grid; gap: 16px; }
.img-grid-2 { grid-template-columns: 1fr 1fr; }
.img-grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.img-card {
    border: 1px solid var(--border); border-radius: 14px; overflow: hidden;
    background: var(--surface); position: relative;
    transition: border-color 0.3s, transform 0.3s;
    cursor: zoom-in;
}
.img-card:hover { border-color: var(--amber); transform: translateY(-4px); }
.img-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; transition: filter 0.3s; }
.img-card:hover img { filter: brightness(1.08); }
/* Full natural height — no crop */
.img-card.img-natural img { aspect-ratio: unset; object-fit: contain; max-height: 420px; background: var(--surface); }
.img-card-caption {
    padding: 14px 16px; font-family: 'JetBrains Mono',monospace;
    font-size: 8.5px; color: var(--text-muted); letter-spacing: 0.16em; text-transform: uppercase;
    border-top: 1px solid var(--border);
}

/* ── INFO GRID (2-col layout) ─────────────── */
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.info-grid-wide { display: grid; grid-template-columns: 2fr 1fr; gap: 60px; align-items: start; }

/* ── META CARD ────────────────────────────── */
.meta-card {
    border: 1px solid var(--border); border-radius: 16px; padding: 28px;
    background: linear-gradient(145deg, var(--surface) 0%, var(--void) 100%);
}
.meta-card-title {
    font-family: 'JetBrains Mono',monospace; font-size: 8.5px; color: var(--amber);
    letter-spacing: 0.22em; text-transform: uppercase; margin-bottom: 20px;
}
.meta-row { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--border); }
.meta-row:last-child { border-bottom: none; }
.meta-key { font-family: 'JetBrains Mono',monospace; font-size: 8.5px; color: var(--text-muted); letter-spacing: 0.14em; text-transform: uppercase; }
.meta-val { font-size: 13px; font-style: italic; color: var(--text-sub); text-align: right; max-width: 55%; }
.meta-val strong { color: var(--text); font-style: normal; font-weight: 600; }

/* ── WORKS LIST ───────────────────────────── */
.works-list { list-style: none; display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.works-item {
    display: flex; align-items: center; gap: 16px; padding: 16px 20px;
    border: 1px solid var(--border); border-radius: 12px; background: var(--surface);
    transition: border-color 0.25s;
}
.works-item:hover { border-color: var(--border-mid); }
.works-status {
    font-family: 'JetBrains Mono',monospace; font-size: 8px; padding: 4px 10px;
    border-radius: 100px; letter-spacing: 0.14em; text-transform: uppercase; flex-shrink: 0;
    white-space: nowrap;
}
.status-pub  { background: rgba(111,186,255,0.12); color: var(--cyan); border: 1px solid rgba(111,186,255,0.2); }
.status-wip  { background: rgba(212,163,90,0.10); color: var(--amber); border: 1px solid rgba(212,163,90,0.25); }
.status-arch { background: rgba(58,79,99,0.3); color: var(--text-muted); border: 1px solid var(--border-mid); }
.status-plan { background: rgba(122,173,207,0.08); color: #7aadcf; border: 1px solid rgba(122,173,207,0.2); }
.works-name { font-size: 15px; color: var(--text); }
.works-name em { font-style: normal; font-size: 11px; font-family: 'JetBrains Mono',monospace; color: var(--text-muted); letter-spacing: 0.1em; margin-left: 10px; }

/* ── LEGAL TEXT ───────────────────────────── */
.legal-body { font-size: 14px; color: var(--text-sub); line-height: 1.9; }
.legal-body h2 {
    font-family: 'Syncopate',sans-serif; font-size: 11px; font-weight: 700;
    color: var(--text); text-transform: uppercase; letter-spacing: 0.12em;
    margin: 2.5em 0 1em; padding-bottom: 8px; border-bottom: 1px solid var(--border);
}
.legal-body h2:first-child { margin-top: 0; }
.legal-body p { margin-bottom: 1em; }
.legal-body ul { padding-left: 20px; margin-bottom: 1em; }
.legal-body a { color: var(--amber); text-decoration: none; }
.legal-body a:hover { text-decoration: underline; }
.legal-body strong { color: var(--text); }

/* ── LIGHTBOX ─────────────────────────────── */
.lightbox { display: none; position: fixed; inset: 0; z-index: 9999; background: rgba(4,7,15,0.93); backdrop-filter: blur(18px); align-items: center; justify-content: center; cursor: zoom-out; }
.lightbox.open { display: flex; animation: lbFade 0.22s ease; }
@keyframes lbFade { from { opacity: 0; } to { opacity: 1; } }
.lightbox-inner { position: relative; max-width: min(90vw,880px); max-height: 92vh; cursor: default; animation: lbPop 0.28s cubic-bezier(0.22,1,0.36,1); }
@keyframes lbPop { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.lightbox-img { display: block; max-width: 100%; max-height: 86vh; border-radius: 14px; border: 1px solid var(--border-mid); box-shadow: 0 40px 100px rgba(0,0,0,0.85); object-fit: contain; }
.lightbox-caption { margin-top: 12px; text-align: center; font-family: 'JetBrains Mono',monospace; font-size: 9px; color: var(--text-muted); letter-spacing: 0.2em; text-transform: uppercase; }
.lightbox-close { position: absolute; top: -14px; right: -14px; width: 36px; height: 36px; border-radius: 50%; background: #0f1e30; border: 1px solid var(--border-mid); color: var(--text-sub); cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 18px; line-height: 1; transition: color 0.2s,border-color 0.2s; }
.lightbox-close:hover { color: white; border-color: var(--amber); }

/* ── FOOTER ───────────────────────────────── */
footer {
    position: fixed; bottom: 0; left: 0; right: 0;
    z-index: 150;
    background: rgba(6,9,19,0.95);
    backdrop-filter: blur(14px);
    border-top: 1px solid var(--border);
    padding: 0 40px;
    height: 52px;
    display: flex; align-items: center;
}
.footer-inner {
    max-width: var(--max-w); margin: 0 auto; width: 100%;
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: nowrap; gap: 12px;
}
/* Push main content above the fixed footer */
main { padding-bottom: 52px; }

@media (max-width: 820px) {
    footer { height: auto; padding: 10px 20px; flex-wrap: wrap; }
    .footer-inner { flex-wrap: wrap; gap: 8px; row-gap: 6px; }
    .footer-copy { font-size: 8px; order: 1; width: 100%; }
    .footer-links { order: 2; }
    .footer-status { display: none; }
    main { padding-bottom: 72px; }
}
.footer-copy { font-family: 'JetBrains Mono',monospace; font-size: 8.5px; color: var(--text-muted); letter-spacing: 0.16em; text-transform: uppercase; }
.footer-links { display: flex; gap: 24px; }
.footer-links a { font-family: 'JetBrains Mono',monospace; font-size: 8.5px; color: var(--text-muted); letter-spacing: 0.16em; text-transform: uppercase; text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: var(--amber); }
.footer-status { display: flex; align-items: center; gap: 8px; font-family: 'JetBrains Mono',monospace; font-size: 8.5px; color: var(--text-muted); letter-spacing: 0.14em; text-transform: uppercase; }
.status-dot { width: 5px; height: 5px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 6px #4ade80; animation: blink 3s ease-in-out infinite; }
@keyframes blink { 0%,100% { opacity:1; box-shadow:0 0 6px #4ade80; } 50% { opacity:.3; box-shadow:0 0 2px #4ade80; } }

/* ── FADE IN ──────────────────────────────── */
.fade-in { opacity: 0; transform: translateY(18px); animation: fadeIn 0.8s cubic-bezier(0.22,1,0.36,1) forwards; }
.fade-in:nth-child(1) { animation-delay: 0.05s; }
.fade-in:nth-child(2) { animation-delay: 0.18s; }
.fade-in:nth-child(3) { animation-delay: 0.32s; }
@keyframes fadeIn { to { opacity: 1; transform: translateY(0); } }

/* ── ÜBER DAS PROJEKT — CUSTOM LAYOUTS ────── */

/* Logos side by side */
.logos-row {
    display: flex;
    gap: 40px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    padding: 52px 0 44px;
    border-bottom: 1px solid var(--border);
}
.logos-row img {
    max-height: 160px;
    width: auto;
    max-width: 280px;
    object-fit: contain;
    display: block;
    cursor: zoom-in;
    transition: transform 0.3s, filter 0.3s;
}
.logos-row img:hover { transform: scale(1.04); filter: brightness(1.1); }

/* Image + text pairs (2 col) */
.img-text-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
    padding: 52px 0;
    border-bottom: 1px solid var(--border);
}
.img-text-item {}
.img-text-item img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    border: 1px solid var(--border-mid);
    display: block;
    margin-bottom: 18px;
    cursor: zoom-in;
    transition: filter 0.3s, transform 0.25s;
}
.img-text-item img:hover { filter: brightness(1.08); transform: scale(1.01); }
.img-text-item p {
    font-size: 14px;
    font-style: italic;
    color: var(--text-sub);
    line-height: 1.85;
}

/* Full-width image + description below */
.full-img-block {
    padding: 52px 0;
    border-bottom: 1px solid var(--border);
}
.full-img-block img {
    width: 100%;
    height: auto;
    border-radius: 14px;
    border: 1px solid var(--border-mid);
    display: block;
    cursor: zoom-in;
    transition: filter 0.3s;
}
.full-img-block img:hover { filter: brightness(1.06); }
.full-img-description {
    margin-top: 22px;
    font-size: 15px;
    font-style: italic;
    color: var(--text-sub);
    line-height: 1.9;
}
.full-img-description strong { color: var(--text); font-style: normal; font-weight: 600; }

@media (max-width: 620px) {
    .img-text-grid { grid-template-columns: 1fr; }
    .logos-row img { max-height: 110px; }
}


@media (max-width: 820px) {
    .nav-inner { padding: 0 24px; }
    .nav-links { display: none; }
    .hamburger { display: flex; }
    .mobile-menu { display: block; }
    .page-hero-content { padding: 52px 24px 44px; }
    .container { padding: 0 24px; }
    .section { padding: 52px 0; }
    .info-grid, .info-grid-wide { grid-template-columns: 1fr; gap: 32px; }
    .img-grid-3 { grid-template-columns: 1fr 1fr; }
    footer { padding: 0 24px; }
}
@media (max-width: 540px) {
    .img-grid-2, .img-grid-3 { grid-template-columns: 1fr; }
    .btn-row { flex-direction: column; }
    .btn { justify-content: center; }
}

/* ── FIXED BOTTOM BAR ─────────────────────── */
.fixed-bar {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 500;
    background: rgba(6,9,19,0.94);
    backdrop-filter: blur(14px);
    border-top: 1px solid var(--border);
    padding: 9px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.fixed-bar-copy {
    font-family: 'JetBrains Mono',monospace;
    font-size: 8px; color: var(--text-muted);
    letter-spacing: 0.14em; text-transform: uppercase;
}
.fixed-bar-links { display: flex; gap: 20px; align-items: center; }
.fixed-bar-links a {
    font-family: 'JetBrains Mono',monospace;
    font-size: 8.5px; color: var(--text-muted);
    letter-spacing: 0.16em; text-transform: uppercase;
    text-decoration: none; transition: color 0.2s;
}
.fixed-bar-links a:hover { color: var(--amber); }
body { padding-bottom: 42px; }

/* ── BACK BUTTON ──────────────────────────── */
.back-btn {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: 'JetBrains Mono',monospace;
    font-size: 9px; font-weight: 600;
    color: var(--text-muted); text-decoration: none;
    letter-spacing: 0.16em; text-transform: uppercase;
    border: 1px solid var(--border);
    border-radius: 8px; padding: 8px 16px;
    transition: color 0.2s, border-color 0.2s;
}
.back-btn:hover { color: var(--amber); border-color: rgba(212,163,90,0.4); }

@media (max-width: 600px) {
    .fixed-bar { padding: 8px 20px; }
    .fixed-bar-copy { display: none; }
}
