/* ============================================================
   ATLAS — Welcome Page & Global Navigation
   Randstad Digital Belgium
   ============================================================ */

/* ============================================================
   CUSTOM PROPERTIES (ATLAS-specific)
   ============================================================ */
:root {
    /* Randstad Digital Brand */
    --rd-blue: #2175d9;
    --rd-blue-light: #4d94e8;
    --rd-blue-pale: #e8f1fc;
    --rd-navy: #00308f;
    --rd-navy-deep: #0a1628;
    --rd-navy-mid: #132040;

    /* ATLAS surfaces */
    --atlas-text-primary: #f0f4f8;
    --atlas-text-secondary: #8da4c2;
    --atlas-text-dim: #4a6180;
    --atlas-surface: rgba(255,255,255,0.04);
    --atlas-surface-hover: rgba(255,255,255,0.08);
    --atlas-border-subtle: rgba(255,255,255,0.08);
    --atlas-border-accent: rgba(33,117,217,0.3);

    /* Typography */
    --font-atlas: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-atlas-mono: 'DM Mono', 'SF Mono', monospace;
}

/* Base font — ensures nothing ever renders as serif */
body {
    font-family: var(--font-atlas);
    -webkit-font-smoothing: antialiased;
}

/* ============================================================
   AMBIENT BACKGROUND (welcome page only)
   ============================================================ */
.ambient-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.ambient-bg::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(ellipse at center, rgba(33,117,217,0.08) 0%, transparent 65%);
    animation: atlas-drift 25s ease-in-out infinite alternate;
}

.ambient-bg::after {
    content: '';
    position: absolute;
    bottom: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(ellipse at center, rgba(0,48,143,0.1) 0%, transparent 60%);
    animation: atlas-drift 20s ease-in-out infinite alternate-reverse;
}

@keyframes atlas-drift {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(40px, -30px) scale(1.05); }
}

.grid-overlay {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(33,117,217,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(33,117,217,0.03) 1px, transparent 1px);
    background-size: 80px 80px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 20%, transparent 70%);
}

/* ============================================================
   TOP BAR
   ============================================================ */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: var(--space-md, 1rem) var(--space-xl, 2rem);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #0a1628;
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    border-bottom: 1px solid var(--atlas-border-subtle);
    transition: background 0.3s ease;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: var(--space-lg, 1.5rem);
}

.rd-logo-mark {
    display: flex;
    align-items: baseline;
    gap: 8px;
    text-decoration: none;
    cursor: pointer;
}

.atlas-topbar-name {
    font-family: var(--font-atlas);
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: #ffffff;
}

.atlas-topbar-by {
    font-family: var(--font-atlas);
    font-size: 0.72rem;
    font-weight: 400;
    color: var(--atlas-text-dim);
    letter-spacing: 0.02em;
}

.rd-divider {
    width: 1px;
    height: 20px;
    background: var(--atlas-border-subtle);
}

.rd-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--atlas-text-secondary);
    letter-spacing: 0.03em;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: var(--space-md, 1rem);
}

.user-pill {
    display: flex;
    align-items: center;
    gap: var(--space-sm, 0.5rem);
    padding: 6px 14px;
    background: var(--atlas-surface);
    border: 1px solid var(--atlas-border-subtle);
    border-radius: 100px;
    font-size: 0.82rem;
    color: var(--atlas-text-secondary);
    cursor: default;
}

.user-dot {
    width: 7px;
    height: 7px;
    background: #34d399;
    border-radius: 50%;
}

.btn-topbar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: transparent;
    border: 1px solid var(--atlas-border-subtle);
    border-radius: 8px;
    color: var(--atlas-text-secondary);
    font-size: 0.82rem;
    font-family: var(--font-atlas);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-topbar:hover {
    background: var(--atlas-surface-hover);
    border-color: rgba(255,255,255,0.15);
    color: var(--atlas-text-primary);
}

.btn-topbar svg {
    width: 15px;
    height: 15px;
    stroke-width: 1.8;
}

/* ============================================================
   HORIZONTAL NAV BAR
   ============================================================ */
.atlas-nav {
    position: fixed;
    top: 53px;
    left: 0;
    right: 0;
    z-index: 99;
    background: #0f1a2e;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.atlas-nav-inner {
    display: flex;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-xl, 2rem);
    overflow-x: auto;
    scrollbar-width: none;
}

.atlas-nav-inner::-webkit-scrollbar { display: none; }

.atlas-nav-tab {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: var(--space-md, 1rem) var(--space-lg, 1.5rem);
    background: none;
    border: none;
    color: var(--atlas-text-secondary);
    font-family: var(--font-atlas);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    text-decoration: none;
}

.atlas-nav-tab:hover {
    color: var(--atlas-text-primary);
    background: rgba(255,255,255,0.05);
}

.atlas-nav-tab.active {
    color: #ffffff;
    border-bottom-color: var(--rd-blue);
}

.atlas-nav-tab svg {
    width: 18px;
    height: 18px;
    stroke-width: 1.6;
    flex-shrink: 0;
}

.atlas-nav-spacer {
    flex: 1;
    min-width: var(--space-xl, 2rem);
}

.atlas-nav-tab-docs {
    opacity: 0.7;
}

.atlas-nav-tab-docs:hover {
    opacity: 1;
}

/* ============================================================
   WELCOME PAGE WRAPPER
   ============================================================ */
.atlas-page-wrapper {
    position: relative;
    z-index: 1;
    padding-top: 100px;
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.atlas-hero {
    min-height: calc(100vh - 100px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
    position: relative;
    background: var(--rd-navy-deep);
    color: var(--atlas-text-primary);
    overflow: hidden;
}

/* ATLAS Logo Mark */
.atlas-brand {
    margin-bottom: 3rem;
    animation: atlas-fadeUp 0.8s ease-out both;
    position: relative;
}

/* Soft glow behind the ATLAS wordmark */
.atlas-brand::before {
    content: '';
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 250px;
    background: radial-gradient(ellipse at center, rgba(33,117,217,0.12) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

.atlas-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 1.5rem;
    position: relative;
}

.atlas-icon svg {
    width: 100%;
    height: 100%;
}

.atlas-wordmark {
    font-family: var(--font-atlas);
    font-size: clamp(3.5rem, 8vw, 6rem);
    font-weight: 800;
    letter-spacing: 0.12em;
    line-height: 1;
    background: linear-gradient(135deg, #ffffff 0%, var(--rd-blue-light) 50%, var(--rd-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.atlas-expansion {
    font-family: var(--font-atlas-mono);
    font-size: 0.82rem;
    font-weight: 400;
    color: var(--rd-blue-light);
    letter-spacing: 0.08em;
    opacity: 0.8;
}

.atlas-expansion span {
    color: #ffffff;
    font-weight: 500;
}

/* Powered-by line */
.atlas-powered {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 6rem;
    font-family: var(--font-atlas);
    font-size: 0.78rem;
    color: var(--atlas-text-dim);
    animation: atlas-fadeUp 0.8s ease-out 0.15s both;
}

.atlas-powered .rd-inline-logo {
    font-weight: 700;
    color: var(--atlas-text-secondary);
    letter-spacing: 0.01em;
}

.atlas-powered-sep {
    color: var(--atlas-border-subtle);
}

/* ============================================================
   FEATURE HIGHLIGHTS (hero area)
   ============================================================ */
.atlas-features {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    animation: atlas-fadeUp 0.8s ease-out 0.25s both;
}

.atlas-feature-tile {
    background: var(--atlas-surface);
    border: 1px solid var(--atlas-border-subtle);
    border-radius: 12px;
    padding: 2rem 1.5rem;
    text-align: left;
    transition: all 0.3s ease;
}

.atlas-feature-tile:hover {
    background: var(--atlas-surface-hover);
    border-color: var(--atlas-border-accent);
    transform: translateY(-2px);
}

.atlas-feature-icon {
    width: 32px;
    height: 32px;
    color: var(--rd-blue);
    margin-bottom: 1rem;
}

.atlas-feature-icon svg {
    width: 100%;
    height: 100%;
}

.atlas-feature-title {
    font-family: var(--font-atlas);
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--atlas-text-primary);
    margin-bottom: 6px;
}

.atlas-feature-desc {
    font-family: var(--font-atlas);
    font-size: 0.78rem;
    color: var(--atlas-text-dim);
    line-height: 1.5;
}

/* ============================================================
   STATS BAR
   ============================================================ */
.atlas-stats {
    width: 100%;
    max-width: 1080px;
    margin: 4rem auto 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    padding: 1.5rem 0;
    animation: atlas-fadeUp 0.8s ease-out 0.35s both;
}

.atlas-stat {
    text-align: center;
}

.atlas-stat-value {
    font-family: var(--font-atlas);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--rd-blue-light);
    font-variant-numeric: tabular-nums;
}

.atlas-stat-label {
    font-family: var(--font-atlas);
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--atlas-text-dim);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 2px;
}

.atlas-stat-sep {
    width: 1px;
    height: 32px;
    background: var(--atlas-border-subtle);
}

/* ============================================================
   FOOTER
   ============================================================ */
.atlas-footer {
    text-align: center;
    padding: 4rem 2rem 2rem;
    animation: atlas-fadeUp 0.8s ease-out 0.7s both;
}

.atlas-footer-line {
    font-family: var(--font-atlas);
    font-size: 0.72rem;
    color: var(--atlas-text-dim);
    letter-spacing: 0.02em;
}

.atlas-footer-version {
    font-family: var(--font-atlas-mono);
    font-size: 0.68rem;
    color: var(--atlas-text-dim);
    margin-top: 0.25rem;
    opacity: 0.6;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes atlas-fadeUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .top-bar {
        padding: 0.5rem 1rem;
    }

    .atlas-hero {
        padding: 2rem 1rem;
    }

    .atlas-features {
        grid-template-columns: 1fr;
        max-width: 400px;
    }

    .atlas-stats {
        flex-wrap: wrap;
        gap: 2rem;
    }

    .atlas-stat-sep { display: none; }

    .rd-label { display: none; }

    .atlas-nav-inner {
        padding: 0 1rem;
    }

    .atlas-nav-spacer {
        min-width: 1rem;
    }
}

@media (max-width: 480px) {
    .top-bar-right .btn-topbar span {
        display: none;
    }
    .user-pill span:last-child {
        display: none;
    }
}

/* ============================================================
   SCROLLBAR (applies globally when ATLAS is loaded)
   ============================================================ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: rgba(33,117,217,0.2);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(33,117,217,0.4);
}

/* ============================================================
   ORDINAL PILLS — CV-### / REQ-### display labels
   ============================================================ */
.atlas-ordinal {
    display: inline-block;
    font-family: var(--font-atlas-mono);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 2px 7px;
    margin-right: 0.4rem;
    border-radius: 4px;
    line-height: 1.3;
    vertical-align: middle;
    white-space: nowrap;
}
.atlas-ordinal-cv {
    background: rgba(33,117,217,0.12);
    color: #1565c0;
    border: 1px solid rgba(33,117,217,0.45);
}
.atlas-ordinal-req {
    background: rgba(124,58,237,0.12);
    color: #6b21a8;
    border: 1px solid rgba(124,58,237,0.45);
}
[data-theme="dark"] .atlas-ordinal-cv {
    background: rgba(33,117,217,0.18);
    color: var(--rd-blue-light);
    border-color: rgba(33,117,217,0.32);
}
[data-theme="dark"] .atlas-ordinal-req {
    background: rgba(168,85,247,0.18);
    color: #c4a5fc;
    border-color: rgba(168,85,247,0.32);
}

/* ============================================================
   PLACEHOLDER SURFACE — "Not yet available" controls
   Applied by frontend/js/placeholder-surface.js (WP05).
   ============================================================ */
.placeholder-control {
    cursor: not-allowed;
    filter: grayscale(0.4);
}
.placeholder-label {
    display: inline-block;
    margin: 0.4rem 0 0 0;
    padding: 2px 8px;
    font-family: var(--font-atlas-mono);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #8a6d3b;
    background: #fff8e1;
    border: 1px solid #f0d18a;
    border-radius: 4px;
    line-height: 1.3;
    vertical-align: middle;
    white-space: nowrap;
}
[data-theme="dark"] .placeholder-label {
    color: #f1c97c;
    background: rgba(241,201,124,0.12);
    border-color: rgba(241,201,124,0.35);
}
.placeholder-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    padding: 10px 16px;
    background: rgba(33, 33, 33, 0.92);
    color: #ffffff;
    font-size: 0.875rem;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    max-width: 80vw;
    pointer-events: none;
}

/* ============================================================
   GUIDANCE AFFORDANCE — click-to-reveal "i" glyph + popover
   Attached by frontend/js/guidance-affordance.js (WP05).
   ============================================================ */
.guidance-glyph {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    margin-left: 0.4rem;
    font-family: var(--font-atlas-mono, 'DM Mono', monospace);
    font-size: 11px;
    font-style: italic;
    font-weight: 600;
    line-height: 1;
    color: #5c6bc0;
    background: #e8eaf6;
    border: 1px solid #c5cae9;
    border-radius: 50%;
    cursor: pointer;
    user-select: none;
    vertical-align: middle;
    transition: background 0.15s, border-color 0.15s;
}
.guidance-glyph:hover,
.guidance-glyph:focus {
    background: #c5cae9;
    border-color: #5c6bc0;
    outline: none;
}
[data-theme="dark"] .guidance-glyph {
    color: #9fa8da;
    background: rgba(159,168,218,0.12);
    border-color: rgba(159,168,218,0.35);
}
[data-theme="dark"] .guidance-glyph:hover,
[data-theme="dark"] .guidance-glyph:focus {
    background: rgba(159,168,218,0.25);
    border-color: #9fa8da;
}
.guidance-popover {
    max-width: 280px;
    padding: 10px 12px;
    background: #1f2937;
    color: #f9fafb;
    font-size: 0.8125rem;
    line-height: 1.45;
    border-radius: 6px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.28);
}
.guidance-popover::after {
    content: '';
    position: absolute;
    left: -6px;
    top: 10px;
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-right: 6px solid #1f2937;
}
