@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300..700&family=Newsreader:ital,opsz,wght@0,6..72,200..800;1,6..72,200..800&family=Manrope:wght@200..800&display=swap');

:root {
    /* Ghost Settings (Required) */
    --gh-font-heading: 'Space Grotesk', sans-serif;
    --gh-font-body: 'Newsreader', serif;

    /* Strange Loop Press - Core Palette */
    --slp-cream: #F5F5ED;
    --slp-ink: #1A1A1B;
    --slp-violet: #8B5CF6;
    --slp-teal: #4A7C8E;
    --slp-grey: #A1A1A1;
    --slp-obsidian: #0E0C0A;
    
    /* Theme State (Default to Light) */
    --color-bg: var(--slp-cream);
    --color-ink: var(--slp-ink);
    --color-accent: var(--slp-violet);
    --color-secondary: var(--slp-teal);
    --color-surface: #EBEBE0;
    --color-surface-high: #E0E0D1;
    --color-surface-soft: rgba(0, 0, 0, 0.03);
    
    /* Typography */
    --font-head: var(--gh-font-heading);
    --font-body: var(--gh-font-body);
    --font-label: 'Manrope', sans-serif;
    --font-mono: 'Space Grotesk', monospace;
    
    /* Spacing */
    --gap: 8px;
    --space-s: 16px;
    --space-m: 32px;
    --space-l: 64px;
    
    /* The "No-Line" Rule: Borders are forbidden. We use background shifts. */
    --border-thin: 0px none;
    --border-thick: 0px none;
    --ghost-border: transparent;
}

[data-theme="dark"] {
    --color-bg: var(--slp-obsidian);
    --color-ink: var(--slp-cream);
    --color-accent: var(--slp-violet);
    --color-secondary: var(--slp-teal);
    --color-surface: #1A1A1B;
    --color-surface-high: #262627;
    --color-surface-soft: rgba(255, 255, 255, 0.05);
    --ghost-border: transparent;
    
    /* Dark Mode Specific Refinements */
    --slp-muted: rgba(245, 245, 237, 0.4);
}

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

body {
    background-color: var(--color-bg);
    color: var(--color-ink);
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .font-head {
    font-family: var(--font-head);
    font-weight: 500;
    line-height: 1.05;
    letter-spacing: -0.03em;
}

h1 { font-size: clamp(2.25rem, 8vw, 5.5rem); text-transform: uppercase; }
h2 { font-size: clamp(1.75rem, 5vw, 3.5rem); }
h3 { font-size: 1.5rem; }

.label-caps {
    font-family: var(--font-label);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--color-neutral);
}

.hero-gradient {
    background: radial-gradient(circle at 50% 50%, rgba(139, 92, 246, 0.08) 0%, rgba(14, 12, 10, 0) 70%);
}

.bg-dark {
    background-color: var(--color-tertiary);
    color: var(--color-secondary);
}

.bg-light {
    background-color: var(--color-secondary);
    color: var(--color-primary);
}

/* UI Component Library */

.btn-bureau {
    display: inline-flex;
    align-items: center;
    padding: 10px 24px;
    background: var(--color-surface-high);
    color: var(--color-ink);
    font-family: var(--font-label);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 0;
    position: relative;
    overflow: hidden;
}

.btn-bureau::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--color-accent);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.btn-bureau:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.btn-bureau:hover {
    background: var(--color-surface-soft);
    color: var(--color-accent);
    letter-spacing: 0.2em;
}

.btn-outline {
    background: var(--color-surface-soft);
    color: var(--color-ink);
}

.input-dossier {
    width: 100%;
    padding: 12px 16px;
    background: var(--color-surface-soft);
    border: none;
    font-family: var(--font-body);
    font-size: 1.1rem;
    color: var(--color-ink);
    transition: all 0.3s ease;
    border-radius: 0;
}

.input-dossier:focus {
    outline: none;
    background: var(--color-surface);
    /* No-Line Rule: Using subtle background pulse instead of box-shadow line */
    background-color: var(--color-surface-high);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 2px;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    text-transform: uppercase;
}

.status-active { background: #E6F4EA; color: #1E8E3E; }
.status-pending { background: #FEF7E0; color: #B05B00; }
.status-archived { background: #F1F3F4; color: #5F6368; }

.bento-card {
    background: var(--color-surface);
    border: none; /* No-Line Rule */
    padding: var(--space-m);
    display: flex;
    flex-direction: column;
    gap: var(--space-s);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.bento-card:hover {
    background: var(--color-surface-high);
    transform: scale(1.02);
}


/* Theme Utilities */
.bg-surface { background-color: var(--color-surface); }
.bg-surface-high { background-color: var(--color-surface-high); }
.bg-surface-soft { background-color: var(--color-surface-soft); }
.text-ink { color: var(--color-ink); }
.text-ink-muted { color: var(--color-ink); opacity: 0.7; }
.text-accent { color: var(--color-accent); }

/* Layout Utilities */
.px-margin-safe {
    padding-left: 6vw;
    padding-right: 6vw;
}

.py-section {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

@media (min-width: 1024px) {
    .px-margin-safe {
        padding-left: 8vw;
        padding-right: 8vw;
    }
    .py-section {
        padding-top: 8rem;
        padding-bottom: 8rem;
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 10vw;
}

/* Koenig Width Classes */
.kg-width-wide {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

.kg-width-full {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

@media (min-width: 1200px) {
    .kg-width-wide {
        width: 1400px;
        margin-left: calc(50% - 700px);
        margin-right: calc(50% - 700px);
        left: auto;
        right: auto;
    }
}

.kg-width-wide img,
.kg-width-full img {
    width: 100%;
    height: auto;
    display: block;
}

.asymmetric-featured {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: var(--space-m);
    align-items: center;
}

.asymmetric-image {
    grid-column: 1 / span 12;
}

.asymmetric-content {
    grid-column: 1 / span 12;
}

@media (min-width: 1024px) {
    .asymmetric-featured {
        gap: var(--space-l);
    }
    .asymmetric-image {
        grid-column: span 5;
    }
    .asymmetric-content {
        grid-column: 7 / span 6;
    }
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-m);
}

.bento-item {
    padding: var(--space-m);
    border: none; /* No-Line Rule */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: background 0.3s ease;
    background-color: var(--color-surface-soft);
}

.bento-item:hover {
    background-color: var(--color-surface-high);
}

.bento-item .label-mono {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--color-neutral);
    margin-bottom: var(--space-m);
}

@media (max-width: 768px) {
    .asymmetric-image, .asymmetric-content {
        grid-column: span 12;
    }
}

/* Motifs */
.target-symbol {
    width: 100px;
    height: 100px;
    background: var(--color-surface-high);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.target-symbol::after {
    content: '';
    width: 20px;
    height: 20px;
    background-color: var(--color-accent);
    border-radius: 50%;
}

/* Redaction & Stamp Effects */
.redacted {
    background-color: var(--color-ink);
    color: var(--color-ink);
    user-select: none;
    transition: color 0.3s ease;
}

.redacted:hover {
    color: var(--color-bg);
}

.stamp-classified {
    display: inline-block;
    padding: 4px 8px;
    background: var(--color-accent);
    color: var(--color-bg);
    font-family: var(--font-head);
    font-weight: 800;
    transform: rotate(-5deg);
    text-transform: uppercase;
    font-size: 0.8rem;
    margin: 10px;
}
