/* =========================================================================
   HOSPITALITY SHIELD™ — 5-PAGE WHITEPAPER WEB-READER STYLES
   GAMPERLAB™ Deep-Tech Laboratory Kufstein & Headquarters Augsburg
   ========================================================================= */

@font-face {
    font-family: 'Inter';
    src: url('assets/fonts/inter-latin.woff2') format('woff2');
    font-weight: 300 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'JetBrains Mono';
    src: url('assets/fonts/jetbrains-mono-latin.woff2') format('woff2');
    font-weight: 400 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg: #060913;
    --surface: #0b1120;
    --surface-card: #0f172a;
    --border: rgba(255, 255, 255, 0.1);
    --border-accent: rgba(0, 242, 254, 0.3);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --primary: #00f2fe;
    --accent-gold: #d4af37;
    --accent-emerald: #10b981;
    --code-bg: #030712;
    --table-stripe: rgba(255, 255, 255, 0.02);
}

html[data-theme="light"] {
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-card: #f1f5f9;
    --border: #cbd5e1;
    --border-accent: #0284c7;
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --primary: #0284c7;
    --accent-gold: #b45309;
    --accent-emerald: #059669;
    --code-bg: #e2e8f0;
    --table-stripe: #f8fafc;
}

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

body {
    background-color: var(--bg);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.75;
    transition: background-color 0.2s ease, color 0.2s ease;
}

/* Reading Progress Bar */
.progress-bar-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: transparent;
    z-index: 10001;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent-gold) 100%);
    transition: width 0.1s ease-out;
}

/* Reader Toolbar */
.reader-header {
    position: sticky;
    top: 0;
    background: rgba(11, 17, 32, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    z-index: 10000;
    padding: 12px 24px;
}

html[data-theme="light"] .reader-header {
    background: rgba(255, 255, 255, 0.92);
}

.reader-header-inner {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.reader-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 700;
}

.reader-brand img {
    height: 32px;
    width: auto;
}

.reader-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-reader-tool {
    background: var(--surface-card);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 7px 14px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s ease;
}

.btn-reader-tool:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Chapter Quick-Jump Pills */
.jump-pills-bar {
    max-width: 960px;
    margin: 24px auto 0 auto;
    padding: 0 24px;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
}

.jump-pill {
    padding: 8px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.jump-pill:hover, .jump-pill.active {
    background: rgba(0, 242, 254, 0.1);
    border-color: var(--primary);
    color: var(--primary);
}

/* Reader Main Content Container */
.reader-container {
    max-width: 960px;
    margin: 30px auto 80px auto;
    padding: 0 24px;
}

/* Personalization Banner */
.personalization-box {
    background: var(--surface);
    border: 1px solid var(--border-accent);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.88rem;
}

.personalization-title {
    color: var(--accent-gold);
    font-weight: 700;
}

.personalization-user {
    color: var(--text-primary);
    font-weight: 600;
}

/* Whitepaper Cover & Meta */
.wp-cover-header {
    border-bottom: 1px solid var(--border);
    padding-bottom: 30px;
    margin-bottom: 40px;
}

.wp-classification-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 12px;
}

.wp-main-title {
    font-size: clamp(2rem, 3.5vw, 2.8rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 14px;
    color: var(--text-primary);
}

.wp-meta-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 18px;
}

/* Page / Chapter Sections */
.wp-page-block {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 44px;
    margin-bottom: 44px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.wp-page-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 700;
    letter-spacing: 0.08em;
    margin-bottom: 10px;
    display: block;
}

.wp-page-heading {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 24px;
    color: var(--text-primary);
    line-height: 1.3;
}

.wp-section-subhead {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 28px 0 14px 0;
    color: var(--text-primary);
}

.wp-text {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.8;
}

.wp-text strong {
    color: var(--text-primary);
}

.wp-text code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9em;
    padding: 2px 6px;
    background: var(--code-bg);
    border-radius: 4px;
    color: var(--primary);
}

/* Ascii Flow Architecture Diagrams */
.wp-ascii-diagram {
    background: var(--code-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    line-height: 1.5;
    color: #38bdf8;
    overflow-x: auto;
    margin: 24px 0;
}

/* Whitepaper Data Tables */
.wp-table-wrap {
    overflow-x: auto;
    margin: 28px 0;
    border: 1px solid var(--border);
    border-radius: 8px;
}

.wp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    text-align: left;
}

.wp-table th, .wp-table td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
}

.wp-table th {
    background: var(--surface-card);
    font-weight: 700;
    color: var(--text-primary);
}

.wp-table tr:nth-child(even) td {
    background: var(--table-stripe);
}

.wp-table tr:last-child td {
    border-bottom: none;
    font-weight: bold;
    color: var(--accent-emerald);
}

/* Callout Box */
.wp-callout {
    background: rgba(0, 242, 254, 0.06);
    border-left: 4px solid var(--primary);
    padding: 18px 24px;
    border-radius: 0 8px 8px 0;
    margin: 24px 0;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.wp-callout strong {
    color: var(--text-primary);
}

/* =========================================================================
   PRINT STYLES (@media print)
   ========================================================================= */
@media print {
    body {
        background: #ffffff !important;
        color: #000000 !important;
        font-size: 11pt !important;
        line-height: 1.5 !important;
    }

    .progress-bar-container,
    .reader-header,
    .jump-pills-bar,
    .btn-reader-tool,
    .drawer-backdrop,
    .site-drawer {
        display: none !important;
    }

    .reader-container {
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .wp-page-block {
        background: transparent !important;
        border: none !important;
        border-bottom: 2pt solid #000000 !important;
        border-radius: 0 !important;
        padding: 20pt 0 !important;
        margin-bottom: 30pt !important;
        box-shadow: none !important;
        page-break-after: always;
        break-after: page;
    }

    .wp-page-block:last-child {
        page-break-after: avoid;
        break-after: avoid;
    }

    .wp-ascii-diagram {
        background: #f1f5f9 !important;
        color: #000000 !important;
        border: 1pt solid #cbd5e1 !important;
    }

    .wp-table th {
        background: #f1f5f9 !important;
        color: #000000 !important;
    }

    .wp-table td {
        color: #000000 !important;
    }

    a {
        color: #000000 !important;
        text-decoration: underline !important;
    }
}
