/* Holo Junkie — Design System
   2026-03-31 v2
   Deep indigo + warm amber palette with dark/light mode support.
   Fonts: Space Grotesk (headings), Source Serif 4 (body).
   NOTE: All colour/font declarations use !important to override Tailwind CDN reset.
*/

/* ================================================
   CSS Custom Properties
   ================================================ */
:root {
    /* Brand */
    --hj-indigo:       #4F46E5;
    --hj-indigo-light: #6366F1;
    --hj-indigo-dark:  #3730A3;
    --hj-indigo-950:   #1E1B4B;
    --hj-amber:        #F59E0B;
    --hj-amber-dark:   #D97706;
    --hj-amber-light:  #FCD34D;

    /* Pillar colours */
    --pillar-tech:     #6366F1;
    --pillar-human:    #F43F5E;
    --pillar-response: #10B981;

    /* Surfaces */
    --bg-primary:    #FAFBFF;
    --bg-secondary:  #F1F0FB;
    --bg-card:       #FFFFFF;
    --bg-hero:       #1E1B4B;

    /* Text */
    --text-primary:   #1E293B;
    --text-secondary: #475569;
    --text-tertiary:  #94A3B8;
    --text-inverse:   #F8FAFC;
    --text-link:      #4F46E5;
    --text-link-hover:#3730A3;

    /* Borders */
    --border-light:   #E2E8F0;
    --border-medium:  #CBD5E1;

    /* Fonts */
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body:    'Source Serif 4', Georgia, serif;
    --font-ui:      'Space Grotesk', sans-serif;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg-primary:    #0F172A;
        --bg-secondary:  #1E293B;
        --bg-card:       #1E293B;
        --bg-hero:       #0F172A;

        --text-primary:   #F1F5F9;
        --text-secondary: #CBD5E1;
        --text-tertiary:  #64748B;
        --text-inverse:   #0F172A;
        --text-link:      #818CF8;
        --text-link-hover:#A5B4FC;

        --border-light:   #334155;
        --border-medium:  #475569;
    }
}

[data-theme="dark"] {
    --bg-primary:    #0F172A;
    --bg-secondary:  #1E293B;
    --bg-card:       #1E293B;
    --bg-hero:       #0F172A;

    --text-primary:   #F1F5F9;
    --text-secondary: #CBD5E1;
    --text-tertiary:  #64748B;
    --text-inverse:   #0F172A;
    --text-link:      #818CF8;
    --text-link-hover:#A5B4FC;

    --border-light:   #334155;
    --border-medium:  #475569;
}


/* ================================================
   Base
   ================================================ */
*, *::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body) !important;
    color: var(--text-primary) !important;
    background-color: var(--bg-primary) !important;
    line-height: 1.7;
    margin: 0;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading) !important;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
}

h1 { font-size: 2.5rem; letter-spacing: -0.025em; }
h2 { font-size: 1.75rem; letter-spacing: -0.015em; }
h3 { font-size: 1.25rem; }

a {
    color: var(--text-link);
    text-decoration: none;
    transition: color 0.15s ease;
}
a:hover { color: var(--text-link-hover); }


/* ================================================
   Layout
   ================================================ */
.page-wrap {
    max-width: 72rem;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section-spacing {
    padding-top: 4rem;
    padding-bottom: 4rem;
}
@media (min-width: 640px) {
    .section-spacing {
        padding-top: 5rem;
        padding-bottom: 5rem;
    }
}
@media (min-width: 1024px) {
    .section-spacing {
        padding-top: 6rem;
        padding-bottom: 6rem;
    }
}

.content-narrow { max-width: 48rem; margin: 0 auto; }


/* ================================================
   Components: Cards
   ================================================ */
.hj-card {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-light);
    border-radius: 0.75rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.hj-card:hover {
    border-color: var(--hj-indigo-light);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.08);
}


/* ================================================
   Components: Buttons
   NOTE: !important on color to beat Tailwind CDN link reset
   ================================================ */
.btn-primary,
a.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.5rem;
    background: var(--hj-indigo) !important;
    color: #fff !important;
    font-family: var(--font-ui) !important;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    text-decoration: none !important;
}
.btn-primary:hover,
a.btn-primary:hover {
    background: var(--hj-indigo-dark) !important;
    color: #fff !important;
    transform: translateY(-1px);
}

.btn-secondary,
a.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.5rem;
    background: transparent !important;
    color: var(--hj-indigo) !important;
    font-family: var(--font-ui) !important;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 0.5rem;
    border: 2px solid var(--hj-indigo) !important;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    text-decoration: none !important;
}
.btn-secondary:hover,
a.btn-secondary:hover {
    background: var(--hj-indigo) !important;
    color: #fff !important;
}

/* White variant for dark hero backgrounds */
.btn-secondary-light,
a.btn-secondary-light {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.5rem;
    background: transparent !important;
    color: #fff !important;
    font-family: var(--font-ui) !important;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 0.5rem;
    border: 2px solid rgba(255,255,255,0.5) !important;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    text-decoration: none !important;
}
.btn-secondary-light:hover,
a.btn-secondary-light:hover {
    background: rgba(255,255,255,0.15) !important;
    color: #fff !important;
}

.btn-amber,
a.btn-amber {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.5rem;
    background: var(--hj-amber) !important;
    color: #1E1B4B !important;
    font-family: var(--font-ui) !important;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    transition: background 0.15s;
    text-decoration: none !important;
}
.btn-amber:hover,
a.btn-amber:hover {
    background: var(--hj-amber-dark) !important;
    color: #1E1B4B !important;
}


/* ================================================
   Components: Pillar Badges
   ================================================ */
.pillar-badge {
    display: inline-block;
    padding: 0.125rem 0.625rem;
    font-family: var(--font-ui) !important;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 9999px;
}
.pillar-tech     { background: rgba(99, 102, 241, 0.12) !important; color: var(--pillar-tech) !important; }
.pillar-human    { background: rgba(244, 63, 94, 0.12) !important;  color: var(--pillar-human) !important; }
.pillar-response { background: rgba(16, 185, 129, 0.12) !important; color: var(--pillar-response) !important; }

[data-theme="dark"] .pillar-tech     { background: rgba(99, 102, 241, 0.2) !important; color: #A5B4FC !important; }
[data-theme="dark"] .pillar-human    { background: rgba(244, 63, 94, 0.2) !important;  color: #FDA4AF !important; }
[data-theme="dark"] .pillar-response { background: rgba(16, 185, 129, 0.2) !important; color: #6EE7B7 !important; }

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .pillar-tech     { background: rgba(99, 102, 241, 0.2) !important; color: #A5B4FC !important; }
    :root:not([data-theme="light"]) .pillar-human    { background: rgba(244, 63, 94, 0.2) !important;  color: #FDA4AF !important; }
    :root:not([data-theme="light"]) .pillar-response { background: rgba(16, 185, 129, 0.2) !important; color: #6EE7B7 !important; }
}


/* ================================================
   Components: Forms
   ================================================ */
.hj-input {
    display: block;
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-family: var(--font-body) !important;
    font-size: 0.9375rem;
    color: var(--text-primary) !important;
    background: var(--bg-primary) !important;
    border: 1px solid var(--border-light) !important;
    border-radius: 0.5rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.hj-input:focus {
    outline: none;
    border-color: var(--hj-indigo-light) !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}
textarea.hj-input { resize: vertical; min-height: 120px; }

.hj-select {
    display: block;
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-family: var(--font-body) !important;
    font-size: 0.9375rem;
    color: var(--text-primary) !important;
    background: var(--bg-primary) !important;
    border: 1px solid var(--border-light) !important;
    border-radius: 0.5rem;
    transition: border-color 0.15s;
}
.hj-select:focus {
    outline: none;
    border-color: var(--hj-indigo-light) !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.hj-label {
    display: block;
    font-family: var(--font-ui) !important;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary) !important;
    margin-bottom: 0.375rem;
}


/* ================================================
   Components: Divider
   ================================================ */
.hj-divider {
    width: 60px;
    height: 3px;
    background: var(--hj-indigo) !important;
    border-radius: 2px;
    margin: 1rem 0;
}


/* ================================================
   Components: Hero
   ================================================ */
.hj-hero {
    background: linear-gradient(135deg, #0C0A2A 0%, #1E1B4B 40%, #2E2A6E 100%) !important;
}

.hj-hero h1,
.hj-hero .hero-title {
    color: #FFFFFF !important;
}

.hj-hero .hero-subtitle {
    color: #C7D2FE !important;
}

.hj-hero .hero-label {
    color: #F59E0B !important;
    font-family: var(--font-heading) !important;
}

.hj-hero .hero-meta {
    color: #A5B4FC !important;
}


/* ================================================
   Components: Footer
   ================================================ */
.hj-footer {
    background: var(--hj-indigo-950) !important;
    color: #CBD5E1 !important;
}
.hj-footer a {
    color: #94A3B8 !important;
    text-decoration: none;
    transition: color 0.15s;
}
.hj-footer a:hover {
    color: var(--hj-amber) !important;
}
.hj-footer h3 {
    color: #E0E7FF !important;
}


/* ================================================
   Components: Navigation
   ================================================ */
.hj-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    background-color: rgba(255, 255, 255, 0.95) !important;
    border-bottom: 1px solid var(--border-light) !important;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .hj-nav {
        background-color: rgba(15, 23, 42, 0.95) !important;
    }
}
[data-theme="dark"] .hj-nav {
    background-color: rgba(15, 23, 42, 0.95) !important;
}

.hj-nav .nav-logo {
    font-family: var(--font-heading) !important;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-primary) !important;
}

.hj-nav .mobile-menu {
    background: var(--bg-card) !important;
    border-top: 1px solid var(--border-light) !important;
}

.hj-nav .mobile-link {
    color: var(--text-primary) !important;
    font-family: var(--font-ui) !important;
}

.hj-nav .theme-toggle {
    color: var(--text-tertiary) !important;
}

.nav-link {
    font-family: var(--font-ui) !important;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary) !important;
    text-decoration: none !important;
    padding: 0.375rem 0;
    border-bottom: 2px solid transparent;
    transition: color 0.15s, border-color 0.15s;
}
.nav-link:hover {
    color: var(--hj-indigo) !important;
}
.nav-link.active {
    color: var(--hj-indigo) !important;
    border-bottom-color: var(--hj-indigo);
}


/* ================================================
   Semantic colour classes (replace inline styles)
   ================================================ */
.color-primary   { color: var(--text-primary) !important; }
.color-secondary { color: var(--text-secondary) !important; }
.color-tertiary  { color: var(--text-tertiary) !important; }
.color-link      { color: var(--text-link) !important; }
.color-indigo    { color: var(--hj-indigo) !important; }
.color-amber     { color: var(--hj-amber) !important; }
.color-white     { color: #FFFFFF !important; }

.color-pillar-tech     { color: var(--pillar-tech) !important; }
.color-pillar-human    { color: var(--pillar-human) !important; }
.color-pillar-response { color: var(--pillar-response) !important; }

.bg-site-primary   { background-color: var(--bg-primary) !important; }
.bg-site-secondary { background-color: var(--bg-secondary) !important; }
.bg-site-card      { background-color: var(--bg-card) !important; }

.font-heading { font-family: var(--font-heading) !important; }
.font-ui      { font-family: var(--font-ui) !important; }
.font-body    { font-family: var(--font-body) !important; }

.border-site { border-color: var(--border-light) !important; }


/* ================================================
   Components: Pillar icon boxes
   ================================================ */
.icon-box-tech     { background: rgba(99, 102, 241, 0.1) !important; }
.icon-box-human    { background: rgba(244, 63, 94, 0.1) !important; }
.icon-box-response { background: rgba(16, 185, 129, 0.1) !important; }
.icon-box-amber    { background: rgba(245, 158, 11, 0.1) !important; }
.icon-box-neutral  { background: var(--bg-secondary) !important; }

.icon-box-success  { background: rgba(16, 185, 129, 0.1) !important; }
.icon-box-error    { background: rgba(244, 63, 94, 0.06) !important; }


/* ================================================
   Components: Alert boxes
   ================================================ */
.alert-error {
    background: rgba(244, 63, 94, 0.06) !important;
    border: 1px solid rgba(244, 63, 94, 0.2) !important;
    border-radius: 0.75rem;
    padding: 1rem;
}
.alert-error p { color: var(--pillar-human) !important; }


/* ================================================
   Article Content (rich text from CMS)
   ================================================ */
.article-content {
    color: var(--text-secondary) !important;
    font-size: 1.075rem;
    line-height: 1.85;
}
.article-content h2 {
    font-family: var(--font-heading) !important;
    color: var(--text-primary) !important;
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 2.5rem;
    margin-bottom: 0.75rem;
}
.article-content h3 {
    font-family: var(--font-heading) !important;
    color: var(--text-primary) !important;
    font-size: 1.2rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 0.5rem;
}
.article-content p { margin-bottom: 1.25rem; }
.article-content ul, .article-content ol { margin-bottom: 1.25rem; padding-left: 1.5rem; }
.article-content ul { list-style-type: disc; }
.article-content ol { list-style-type: decimal; }
.article-content li { margin-bottom: 0.4rem; }
.article-content li strong { color: var(--text-primary) !important; }
.article-content a:not(.btn-primary):not(.btn-secondary):not(.btn-secondary-light):not(.btn-amber) { color: var(--text-link) !important; text-decoration: underline; text-underline-offset: 2px; }
.article-content a:not(.btn-primary):not(.btn-secondary):not(.btn-secondary-light):not(.btn-amber):hover { color: var(--text-link-hover) !important; }
.article-content blockquote {
    border-left: 3px solid var(--hj-indigo);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--text-tertiary) !important;
}
.article-content table {
    border: 1px solid var(--border-light) !important;
}
.article-content th {
    background: var(--bg-secondary) !important;
    font-family: var(--font-heading) !important;
    color: var(--text-primary) !important;
    border-bottom: 1px solid var(--border-light) !important;
}
.article-content td {
    border-bottom: 1px solid var(--border-light) !important;
}


/* ================================================
   Utilities
   ================================================ */
.text-balance { text-wrap: balance; }

[x-cloak] { display: none !important; }


/* ================================================
   Newsletter CTA (inline)
   ================================================ */
.newsletter-cta {
    background: linear-gradient(135deg, #0C0A2A 0%, #1E1B4B 60%, #312E81 100%) !important;
    border-radius: 1rem;
}
.newsletter-cta h2 { color: #FFFFFF !important; }
.newsletter-cta p  { color: #C7D2FE !important; }


/* ================================================
   Responsive type
   ================================================ */
@media (max-width: 639px) {
    h1 { font-size: 1.875rem; }
    h2 { font-size: 1.375rem; }
}
