/* ============================================
   Ultra 3D Holographic Canvas — Shared styles
   for static content pages (Blog, FAQ, Privacy,
   Cookies, Terms). Extracted design tokens and
   component styles from index.html's cyber/holo
   theme, adapted for standalone crawlable pages.
   ============================================ */

:root {
    --primary: #0284c7;
    --primary-bright: #38bdf8;
    --primary-glow: rgba(56, 189, 248, 0.65);
    --primary-shadow: rgba(2, 132, 199, 0.35);
    --secondary: #d4af37;
    --secondary-glow: rgba(212, 175, 55, 0.4);
    --ambient-gold-glow: rgba(212, 175, 55, 0.1);
    --accent: #818cf8;
    --glass-bg: rgba(4, 16, 35, 0.9);
    --grid-line: rgba(56, 189, 248, 0.08);
    --bg-void: #010308;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --edge-gold: #f0d488;
}

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

html { scroll-behavior: smooth; -webkit-tap-highlight-color: transparent; }

body {
    background:
        radial-gradient(circle at 20% 10%, var(--primary-shadow) 0%, transparent 55%),
        radial-gradient(circle at 80% 90%, var(--ambient-gold-glow) 0%, transparent 60%),
        linear-gradient(to bottom, #010308, #050b16);
    background-attachment: fixed;
    font-family: 'Montserrat', sans-serif;
    color: var(--text-main);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    position: relative;
}

/* Background grid, matching the main site's world-3d floor grid */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    opacity: 0.3;
    mask-image: linear-gradient(to bottom, black 0%, transparent 60%);
    -webkit-mask-image: linear-gradient(to bottom, black 0%, transparent 60%);
    z-index: 0;
}

a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--primary-bright); outline-offset: 2px; }

/* ---------- Top HUD bar ---------- */
.top-bar-3d {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 15px;
    background: rgba(1, 3, 8, 0.7);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(56, 189, 248, 0.2);
}
.hud-group {
    display: flex;
    gap: 4px;
    background: rgba(4, 9, 20, 0.85);
    padding: 4px 6px;
    border-radius: 4px;
    border: 1px solid var(--primary);
    backdrop-filter: blur(16px);
    box-shadow: -4px 4px 15px rgba(0,0,0,0.8), 0 0 10px var(--primary-shadow);
}
.hud-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 6px 10px;
    border-radius: 4px;
    font-family: 'Cinzel', serif;
    font-size: 0.65rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    text-transform: uppercase;
    text-decoration: none;
    display: inline-block;
}
.hud-btn.active, .hud-btn:hover {
    color: #ffffff;
    background: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

/* ---------- Page container ---------- */
.page-wrap {
    max-width: 640px;
    margin: 0 auto;
    padding: 40px 20px 80px;
    position: relative;
    z-index: 1;
}
.breadcrumb {
    font-family: 'Space Mono', monospace;
    font-size: 0.62rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 24px;
}
.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--primary-bright); }
.breadcrumb .sep { color: var(--secondary); margin: 0 6px; }

.page-hero { text-align: center; margin-bottom: 30px; }
.page-hero .eyebrow {
    font-family: 'Space Mono', monospace;
    font-size: 0.62rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--secondary);
    margin-bottom: 10px;
    display: block;
}
h1.scene-title-3d {
    font-family: 'Cinzel', serif;
    font-size: clamp(1.4rem, 5vw, 1.9rem);
    letter-spacing: 2px;
    color: var(--text-main);
    font-weight: 900;
    line-height: 1.25;
    text-shadow: 0 0 20px var(--primary-glow);
}
.page-hero p.lede {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.88rem;
    color: var(--text-muted);
    max-width: 500px;
    margin: 12px auto 0;
    line-height: 1.6;
}

h2 {
    font-family: 'Cinzel', serif;
    font-size: 0.95rem;
    letter-spacing: 1px;
    color: var(--primary-bright);
    margin: 26px 0 10px;
    font-weight: 700;
}
p {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.65;
    margin-bottom: 12px;
}
strong { color: var(--text-main); }
em.placeholder-note { color: var(--secondary); font-style: italic; font-size: 0.78rem; }

/* ---------- Card (matches .card-3d-box) ---------- */
.card-3d-box {
    background: rgba(4, 8, 18, 0.88);
    border: 1px solid rgba(56, 189, 248, 0.4);
    border-top: 2px solid var(--edge-gold);
    border-radius: 10px;
    padding: 20px;
    width: 100%;
    text-align: left;
    margin-bottom: 20px;
    box-shadow:
        0 14px 26px -10px rgba(0, 0, 0, 0.75),
        0 0 0 1px rgba(255,255,255,0.03) inset;
}
.card-3d-box img {
    width: 100%;
    height: min(200px, 30vh);
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 16px;
    border: 1px solid rgba(56, 189, 248, 0.3);
}

/* ---------- Buttons ---------- */
.btn-group-3d { display: flex; flex-direction: column; gap: 14px; width: 100%; margin-top: 20px; }
.btn-3d-block {
    position: relative;
    font-family: 'Cinzel', serif;
    padding: 12px 22px;
    background: linear-gradient(160deg, rgba(14, 24, 42, 0.92) 0%, rgba(4, 8, 18, 0.96) 100%);
    border: 1px solid rgba(56, 189, 248, 0.5);
    border-bottom: 2px solid var(--edge-gold);
    color: var(--primary-bright);
    letter-spacing: 1.1px;
    font-size: 0.74rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    border-radius: 8px;
    display: block;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, border-color 0.3s ease;
    box-shadow:
        0 10px 20px -8px rgba(0, 0, 0, 0.7),
        0 0 0 1px rgba(255,255,255,0.03) inset,
        0 1px 0 rgba(255,255,255,0.08) inset;
}
.btn-3d-block:hover {
    transform: translateY(-2px);
    color: #ffffff;
    border-color: var(--primary-bright);
    box-shadow:
        0 16px 28px -10px rgba(0, 0, 0, 0.8),
        0 0 24px -4px var(--primary-glow),
        0 1px 0 rgba(255,255,255,0.12) inset;
}
.btn-3d-block.accent-btn {
    border-color: rgba(129, 140, 248, 0.55);
    color: #ffffff;
    background: linear-gradient(160deg, rgba(30, 27, 60, 0.92) 0%, rgba(8, 6, 20, 0.96) 100%);
}

/* ---------- FAQ accordion ---------- */
.faq-item {
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 6px;
    margin-bottom: 10px;
    background: rgba(2, 6, 16, 0.6);
    overflow: hidden;
}
.faq-question {
    width: 100%;
    padding: 14px 16px;
    background: transparent;
    border: none;
    color: var(--primary-bright);
    font-family: 'Cinzel', serif;
    font-size: 0.78rem;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}
.faq-question:hover { color: #fff; }
.faq-question .plus { font-size: 1rem; color: var(--secondary); flex-shrink: 0; transition: transform 0.3s ease; }
.faq-item.active .faq-question .plus { transform: rotate(45deg); }
.faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 16px;
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.55;
    transition: max-height 0.35s ease, padding 0.35s ease;
}
.faq-item.active .faq-answer { max-height: 700px; padding: 0 16px 16px; }
.faq-answer ul { padding-left: 18px; margin-top: 6px; }
.faq-answer li { margin-bottom: 6px; }

/* ---------- Blog index list ---------- */
.post-list { display: flex; flex-direction: column; gap: 14px; }
.post-card {
    display: flex;
    gap: 14px;
    background: rgba(4, 8, 18, 0.88);
    border: 1px solid rgba(56, 189, 248, 0.4);
    border-top: 2px solid var(--edge-gold);
    border-radius: 10px;
    padding: 16px;
    text-decoration: none;
    box-shadow: 0 8px 20px -10px rgba(0,0,0,0.7);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.post-card:hover {
    transform: translateY(-3px);
    border-top-color: var(--primary-bright);
    box-shadow: 0 14px 28px -10px var(--primary-shadow);
}
.post-card-meta {
    font-family: 'Space Mono', monospace;
    font-size: 0.6rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--secondary);
    margin-bottom: 6px;
    display: block;
}
.post-card h3 {
    font-family: 'Cinzel', serif;
    font-size: 0.9rem;
    color: var(--primary-bright);
    margin: 0 0 6px;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.post-card p { font-size: 0.8rem; margin: 0; }

.article-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Space Mono', monospace;
    font-size: 0.6rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--secondary);
    margin-bottom: 16px;
}
.article-meta .dot { color: var(--text-muted); }

/* ---------- Language switcher (flag badge + dropdown) ---------- */
.lang-switcher { position: relative; flex-shrink: 0; }
.lang-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(4, 9, 20, 0.85);
    border: 1px solid var(--primary);
    border-radius: 4px;
    padding: 5px 8px;
    backdrop-filter: blur(16px);
    box-shadow: 0 0 10px var(--primary-shadow);
    cursor: pointer;
    color: var(--text-main);
    font-family: 'Cinzel', serif;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    transition: all 0.25s ease;
}
.lang-badge:hover { border-color: var(--primary-bright); box-shadow: 0 0 14px var(--primary-glow); }
.lang-badge img { width: 16px; height: 12px; object-fit: cover; border-radius: 2px; flex-shrink: 0; }
.lang-badge .chevron { width: 9px; height: 9px; fill: var(--primary-bright); transition: transform 0.25s ease; flex-shrink: 0; }
.lang-switcher.open .lang-badge .chevron { transform: rotate(180deg); }

.lang-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: rgba(4, 9, 20, 0.96);
    backdrop-filter: blur(20px);
    border: 1px solid var(--primary);
    border-top: 2px solid var(--edge-gold);
    border-radius: 6px;
    padding: 4px;
    min-width: 128px;
    z-index: 150;
    box-shadow: 0 14px 30px rgba(0,0,0,0.7);
}
.lang-switcher.open .lang-menu { display: block; }

.lang-option {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: 'Cinzel', serif;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 7px 8px;
    cursor: pointer;
    border-radius: 4px;
    text-align: left;
}
.lang-option img { width: 18px; height: 13px; object-fit: cover; border-radius: 2px; flex-shrink: 0; }
.lang-option:hover { background: var(--primary); color: #fff; }
.lang-option.active { color: var(--primary-bright); background: rgba(56, 189, 248, 0.12); }

/* ---------- Cookie consent banner ---------- */
.cookie-banner-standalone {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 200;
    max-width: 560px;
    margin: 0 auto;
    background: rgba(4, 9, 20, 0.95);
    backdrop-filter: blur(16px);
    border: 1px solid var(--primary);
    border-top: 2px solid var(--edge-gold);
    border-radius: 8px;
    padding: 16px 18px;
    box-shadow: 0 16px 40px rgba(0,0,0,0.6), 0 0 20px -4px var(--primary-glow);
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    animation: cookieIn 0.4s ease;
}
.cookie-banner-standalone.hide { opacity: 0; transform: translateY(12px); transition: all 0.3s ease; }
@keyframes cookieIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.cookie-banner-standalone span { font-size: 0.78rem; color: var(--text-muted); max-width: 320px; }
.cookie-btns { display: flex; gap: 8px; flex-shrink: 0; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.site-footer-3d {
    text-align: center;
    padding: 24px 16px 10px;
    font-size: 0.62rem;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    position: relative;
    z-index: 1;
}
.site-footer-3d a { color: var(--text-muted); text-decoration: none; }
.site-footer-3d a:hover { color: var(--primary-bright); }

@media (max-width: 480px) {
    .top-bar-3d { padding: 10px; }
    .post-card { flex-direction: column; }
}

/* ---------- Long-form legal text inside cards (Privacy etc.) ---------- */
.card-3d-box p { font-size: 0.82rem; line-height: 1.6; color: var(--text-muted); margin-bottom: 12px; }
.card-3d-box p.meta { margin-bottom: 4px; }
.card-3d-box h2 { font-family: 'Cinzel', serif; font-size: 0.9rem; letter-spacing: 0.8px; color: var(--primary-bright); margin: 22px 0 10px; }
.card-3d-box ul { padding-left: 18px; margin: 0 0 12px; font-size: 0.82rem; line-height: 1.6; color: var(--text-muted); }
.card-3d-box li { margin-bottom: 8px; }
.card-3d-box strong { color: var(--text-main); }
.card-3d-box a { color: var(--primary-bright); }

/* ---------- Cookie table + sub-headings ---------- */
.card-3d-box h3 { font-family: 'Cinzel', serif; font-size: 0.8rem; letter-spacing: 0.6px; color: var(--text-main); margin: 18px 0 8px; }
.table-wrap { width: 100%; overflow-x: auto; margin: 0 0 12px; -webkit-overflow-scrolling: touch; }
.cookie-table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 0.74rem; line-height: 1.45; color: var(--text-muted); }
.cookie-table th, .cookie-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid rgba(56, 189, 248, 0.2); vertical-align: top; }
.cookie-table th { color: var(--primary-bright); font-weight: 700; white-space: nowrap; }
.cookie-table code { font-family: 'Space Mono', monospace; color: var(--text-main); }

/* ---------- Article helpers (replace inline styles for CSP) ---------- */
.page-hero.left { text-align: left; }
.post-list.spaced { margin-top: 30px; }

/* ---------- Inline SVG flags (no external requests) ---------- */
.flag-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.lang-badge .flag { width: 16px; height: 12px; border-radius: 2px; flex-shrink: 0; }
.lang-option .flag { width: 18px; height: 13px; border-radius: 2px; flex-shrink: 0; }
