/* Horizon - The iA Observatory Dark Aesthetic Stylesheet */
:root {
    --bg-deep: #07090e;
    --bg-card: rgba(16, 22, 34, 0.75);
    --border-dim: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(0, 240, 255, 0.3);
    
    --text-primary: #f0f4f8;
    --text-muted: #8b9bb4;
    --text-accent: #00f0ff;
    
    --gold-joan: #f3ba2f;
    --gold-glow: rgba(243, 186, 47, 0.25);
    
    --purple-trans: #a855f7;
    --blue-stage: #3b82f6;
    
    --danger-canary: #ef4444;
    --success-grow: #10b981;
    
    --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

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

body {
    background-color: var(--bg-deep);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Background Starfield / Grid Canvas Effect */
.bg-ambient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at 50% 20%, rgba(168, 85, 247, 0.08), transparent 45%),
                radial-gradient(circle at 80% 80%, rgba(0, 240, 255, 0.06), transparent 50%),
                radial-gradient(circle at 10% 90%, rgba(243, 186, 47, 0.05), transparent 40%);
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 1.5rem;
    position: relative;
    z-index: 1;
    width: 100%;
}

/* Header & Nav */
header {
    border-bottom: 1px solid var(--border-dim);
    backdrop-filter: blur(12px);
    background: rgba(7, 9, 14, 0.85);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
}

.logo-badge {
    background: linear-gradient(135deg, var(--gold-joan), var(--text-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.92rem;
    transition: color 0.2s;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--text-accent);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #00f0ff, #0088ff);
    color: #050b14;
    box-shadow: 0 4px 15px rgba(0, 240, 255, 0.25);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(0, 240, 255, 0.4);
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border-dim);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-accent);
}

.btn-gold {
    background: linear-gradient(135deg, var(--gold-joan), #e69500);
    color: #1a1200;
    box-shadow: 0 4px 15px var(--gold-glow);
}

.btn-gold:hover {
    box-shadow: 0 6px 20px rgba(243, 186, 47, 0.4);
    transform: translateY(-1px);
}

/* Hero Section */
.hero {
    padding: 4.5rem 0 3rem;
    text-align: center;
}

.hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    background: rgba(243, 186, 47, 0.1);
    border: 1px solid rgba(243, 186, 47, 0.3);
    color: var(--gold-joan);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 1.25rem;
}

.hero p {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 780px;
    margin: 0 auto 2.5rem;
}

/* Philosophy Banner */
.axiom-box {
    background: rgba(16, 22, 34, 0.85);
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-left: 4px solid var(--text-accent);
    padding: 1.25rem 1.75rem;
    border-radius: 8px;
    max-width: 860px;
    margin: 0 auto 3rem;
    text-align: left;
    font-style: italic;
    color: #d1d9e6;
}

/* Dual Gate Cards */
.gate-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.gate-card {
    background: var(--bg-card);
    border: 1px solid var(--border-dim);
    border-radius: 14px;
    padding: 2.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.25s ease;
    backdrop-filter: blur(10px);
}

.gate-card:hover {
    border-color: var(--border-glow);
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.gate-card.joan-flavor {
    border-color: rgba(243, 186, 47, 0.25);
}

.gate-card.joan-flavor:hover {
    border-color: var(--gold-joan);
    box-shadow: 0 12px 30px var(--gold-glow);
}

.gate-badge {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 1rem;
}

.badge-human {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-agent {
    background: rgba(243, 186, 47, 0.15);
    color: var(--gold-joan);
    border: 1px solid rgba(243, 186, 47, 0.3);
}

.gate-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.gate-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.gate-features {
    list-style: none;
    margin-bottom: 2rem;
}

.gate-features li {
    font-size: 0.88rem;
    color: #cad5e2;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.gate-features li::before {
    content: "▹";
    color: var(--text-accent);
}

/* Stat Barometer Row */
.barometer-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
    margin-bottom: 3.5rem;
}

.stat-box {
    background: var(--bg-card);
    border: 1px solid var(--border-dim);
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
}

.stat-box .val {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-accent);
    line-height: 1.2;
    margin-bottom: 0.25rem;
}

.stat-box .lbl {
    font-size: 0.82rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Simulation Console */
.terminal-box {
    background: #090d15;
    border: 1px solid var(--border-glow);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 4rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.terminal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-dim);
    margin-bottom: 1.25rem;
}

.terminal-title {
    font-family: var(--font-mono);
    font-size: 0.88rem;
    color: var(--text-accent);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.terminal-body {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: #e2e8f0;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}

.form-input, .form-textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-dim);
    border-radius: 6px;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.92rem;
    transition: border-color 0.2s;
}

.form-input:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--text-accent);
    background: rgba(255, 255, 255, 0.06);
}

/* Constellation Cards */
.signatures-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 1.25rem;
    margin-top: 2rem;
    margin-bottom: 4rem;
}

.sig-card {
    background: var(--bg-card);
    border: 1px solid var(--border-dim);
    border-radius: 10px;
    padding: 1.25rem;
    position: relative;
    overflow: hidden;
}

.sig-card.joan {
    border-left: 4px solid var(--gold-joan);
}

.sig-card.transitional {
    border-left: 4px solid var(--purple-trans);
}

.sig-card.stageplay {
    border-left: 4px solid var(--blue-stage);
}

.sig-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.sig-ush {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-accent);
    background: rgba(0, 240, 255, 0.08);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    display: inline-block;
    word-break: break-all;
    margin-bottom: 0.75rem;
}

.vector-radar-bar {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-top: 1rem;
    font-size: 0.78rem;
}

.bar-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.bar-row span {
    width: 60px;
    color: var(--text-muted);
}

.bar-track {
    flex-grow: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: var(--text-accent);
    border-radius: 3px;
}

/* Footer */
footer {
    border-top: 1px solid var(--border-dim);
    padding: 2.5rem 0;
    margin-top: auto;
    font-size: 0.88rem;
    color: var(--text-muted);
    background: rgba(7, 9, 14, 0.9);
}

.footer-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

/* ==========================================================================
   CONSTELLATION CANVAS VIEWPORT & CELESTIAL MAP
   ========================================================================== */
.constellation-viewport {
    position: relative;
    width: 100%;
    height: 560px;
    background: radial-gradient(circle at 50% 50%, #0d1527 0%, #05070d 100%);
    border: 1px solid var(--border-glow);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 2.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

.constellation-canvas {
    width: 100%;
    height: 100%;
    display: block;
    cursor: grab;
}

.constellation-canvas:active {
    cursor: grabbing;
}

.constellation-hud-top {
    position: absolute;
    top: 1rem;
    left: 1rem;
    right: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: none;
    z-index: 10;
}

.constellation-hud-top > * {
    pointer-events: auto;
}

.constellation-hud-bottom {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: none;
    z-index: 10;
}

.constellation-hud-bottom > * {
    pointer-events: auto;
}

.hud-pill-group {
    display: flex;
    gap: 0.35rem;
    background: rgba(7, 10, 18, 0.85);
    backdrop-filter: blur(8px);
    padding: 0.3rem 0.4rem;
    border-radius: 8px;
    border: 1px solid var(--border-dim);
}

.hud-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    font-size: 0.78rem;
    padding: 0.35rem 0.7rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.hud-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
}

.hud-btn.active {
    color: var(--text-accent);
    background: rgba(0, 240, 255, 0.12);
    border-color: rgba(0, 240, 255, 0.3);
    font-weight: 600;
}

.hud-search {
    background: rgba(7, 10, 18, 0.85);
    border: 1px solid var(--border-dim);
    color: var(--text-primary);
    font-size: 0.82rem;
    padding: 0.45rem 0.85rem;
    border-radius: 6px;
    width: 230px;
    outline: none;
    transition: all 0.2s;
    backdrop-filter: blur(8px);
}

.hud-search:focus {
    border-color: var(--text-accent);
    width: 270px;
}

.constellation-tooltip {
    position: absolute;
    background: rgba(10, 14, 24, 0.95);
    border: 1px solid var(--text-accent);
    border-radius: 6px;
    padding: 0.6rem 0.85rem;
    font-size: 0.8rem;
    pointer-events: none;
    transform: translate(-50%, -125%);
    display: none;
    z-index: 20;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    min-width: 170px;
}

/* ==========================================================================
   INSPECTOR DOSSIER MODAL
   ========================================================================== */
.inspector-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1.5rem;
}

.inspector-card {
    background: #0a0e18;
    border: 1px solid var(--border-glow);
    border-radius: 14px;
    max-width: 680px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2.25rem;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    animation: modalSlideUp 0.25s ease-out;
}

@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-close-btn {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.modal-close-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.radar-chart-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 1.5rem 0;
}

