/* ============================================
   AXIOMATIC V2 — DIGITAL BRUTALISM STYLESHEET
   High-Assurance Interface Design
   ============================================ */

/* Import Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700;800&display=swap');

/* CSS Variables — Design Tokens */
:root {
    --color-bg-primary: #000000;
    --color-bg-surface: #0a0a0a;
    --color-text-primary: #e5e5e5;
    --color-text-secondary: #666666;
    --color-accent-terminal: #33ff00;
    --color-accent-white: #ffffff;
    --color-border: #222222;
    --color-border-focus: #33ff00;
    --color-warning: #ff3300;
    
    --font-body: 'Inter', -apple-system, system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    
    --spacing-unit: 8px;
    --border-width: 1px;
    --transition-fast: 160ms;
    --transition-standard: 220ms;
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    background-color: var(--color-bg-primary);
    color: var(--color-text-primary);
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-mono);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.02em;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast) ease;
}

a:hover {
    color: var(--color-accent-terminal);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ============================================
   SECTION: HERO
   ============================================ */

.hero {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 100vh;
    background-color: var(--color-bg-primary);
    padding: calc(var(--spacing-unit) * 6) calc(var(--spacing-unit) * 2);
}

.hero-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: calc(var(--spacing-unit) * 4);
    max-width: 900px;
}

.tesseract-logo {
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.logo-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: brightness(0.95) contrast(1.1);
}

.hero-title {
    font-family: var(--font-mono);
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 800;
    letter-spacing: 0.15em;
    color: var(--color-accent-white);
    text-transform: uppercase;
}

.hero-slogan {
    font-family: var(--font-mono);
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    letter-spacing: 0.12em;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    font-weight: 600;
}

.hero-verse {
    margin-top: calc(var(--spacing-unit) * 4);
    font-family: var(--font-mono);
    font-size: clamp(0.9rem, 1.8vw, 1rem);
    letter-spacing: 0.04em;
    color: var(--color-text-primary);
    display: flex;
    gap: calc(var(--spacing-unit) * 2);
    justify-content: center;
    align-items: flex-start;
    max-width: 600px;
}

.terminal-prompt {
    color: var(--color-accent-terminal);
    font-weight: 700;
    flex-shrink: 0;
}

.terminal-text {
    text-align: left;
    color: var(--color-text-primary);
    font-weight: 500;
}

/* ============================================
   SECTION: MANIFESTO
   ============================================ */

#manifesto {
    padding: calc(var(--spacing-unit) * 12) 0;
    background-color: var(--color-bg-primary);
}

.manifesto-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 calc(var(--spacing-unit) * 3);
}

#manifesto h2 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-accent-white);
    margin-bottom: calc(var(--spacing-unit) * 6);
    font-weight: 800;
    text-align: center;
}

.manifesto-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: calc(var(--spacing-unit) * 5);
}

.manifesto-point {
    background: transparent;
    border: var(--border-width) solid var(--color-border);
    padding: calc(var(--spacing-unit) * 4);
    position: relative;
    transition: border-color var(--transition-standard) ease;
}

.manifesto-point:hover {
    border-color: var(--color-accent-white);
}

.point-index {
    font-family: var(--font-mono);
    font-size: 3rem;
    font-weight: 800;
    color: var(--color-border);
    position: absolute;
    top: calc(var(--spacing-unit) * 2);
    left: calc(var(--spacing-unit) * 2);
    line-height: 1;
}

.manifesto-point h3 {
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-accent-white);
    margin: calc(var(--spacing-unit) * 6) 0 calc(var(--spacing-unit) * 2) 0;
    font-weight: 700;
}

.manifesto-point p {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--color-text-primary);
    font-weight: 400;
}

/* ============================================
   SECTION: ARCHITECT (L'AUTORITÉ)
   ============================================ */

#architect {
    padding: calc(var(--spacing-unit) * 15) 0;
    background-color: var(--color-bg-primary);
}

.architect-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 calc(var(--spacing-unit) * 3);
    display: grid;
    grid-template-columns: 40% 1fr;
    gap: calc(var(--spacing-unit) * 10);
    align-items: start;
}

.architect-image-wrapper {
    position: relative;
    overflow: hidden;
    background: var(--color-bg-primary);
    border: var(--border-width) solid var(--color-border);
}

.architect-image-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    filter: grayscale(20%) contrast(1.08) brightness(0.92);
}

.architect-content h2 {
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-accent-white);
    margin-bottom: calc(var(--spacing-unit) * 4);
    font-weight: 800;
}

.architect-content h3 {
    font-size: 1.3rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-accent-white);
    margin-bottom: calc(var(--spacing-unit) * 3);
    font-weight: 700;
}

.bio-block {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--color-text-primary);
    margin-bottom: calc(var(--spacing-unit) * 3);
}

.bio-block strong {
    font-family: var(--font-mono);
    color: var(--color-accent-white);
    font-weight: 700;
    display: block;
    margin-bottom: calc(var(--spacing-unit));
}

.manifesto-line {
    font-family: var(--font-mono);
    font-style: italic;
    color: var(--color-text-primary);
    opacity: 0.85;
    margin: calc(var(--spacing-unit) * 4) 0;
}

.signature-block {
    margin-top: calc(var(--spacing-unit) * 5);
    border-left: 2px solid var(--color-accent-white);
    padding-left: calc(var(--spacing-unit) * 2);
    font-family: var(--font-mono);
}

.signature-block strong {
    font-size: 1.05rem;
    color: var(--color-accent-white);
    display: block;
    margin-bottom: calc(var(--spacing-unit));
}

.signature-block span {
    display: block;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ============================================
   SECTION: MATRIX (ARCHITECTURE DES INVARIANTS)
   ============================================ */

#matrix {
    padding: calc(var(--spacing-unit) * 12) 0;
    background-color: var(--color-bg-primary);
}

.matrix-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 calc(var(--spacing-unit) * 3);
}

#matrix h2 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-accent-white);
    margin-bottom: calc(var(--spacing-unit) * 6);
    font-weight: 800;
    text-align: center;
}

.matrix-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: calc(var(--spacing-unit) * 3);
}

.matrix-node {
    background: var(--color-bg-surface);
    border: var(--border-width) solid var(--color-border);
    padding: calc(var(--spacing-unit) * 4);
    display: flex;
    flex-direction: column;
    gap: calc(var(--spacing-unit) * 2);
    transition: border-color var(--transition-standard) ease, 
                transform var(--transition-standard) ease;
}

.matrix-node:hover {
    border-color: var(--color-accent-white);
    transform: translateY(-4px);
}

.node-icon {
    width: 48px;
    height: 48px;
    border: var(--border-width) solid var(--color-border);
    background: transparent;
}

.matrix-node h3 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-accent-white);
    font-weight: 700;
}

.matrix-node p {
    font-family: var(--font-body);
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--color-text-primary);
}

/* ============================================
   SECTION: INITIATIVE (PROJECT ZERO / ENGINE)
   ============================================ */

#initiative {
    padding: calc(var(--spacing-unit) * 12) 0;
    background-color: var(--color-bg-primary);
}

.project-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 calc(var(--spacing-unit) * 3);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: calc(var(--spacing-unit) * 8);
    align-items: start;
}

.project-info h2 {
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-accent-white);
    margin-bottom: calc(var(--spacing-unit) * 3);
    font-weight: 800;
}

.project-info h3 {
    font-size: 1.4rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-accent-white);
    margin-bottom: calc(var(--spacing-unit) * 2);
    font-weight: 700;
}

.project-info h4 {
    font-size: 1rem;
    color: var(--color-text-secondary);
    margin-bottom: calc(var(--spacing-unit) * 3);
    font-weight: 600;
}

.project-info p {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--color-text-primary);
    margin-bottom: calc(var(--spacing-unit) * 2);
}

.status-indicator {
    margin-top: calc(var(--spacing-unit) * 3);
    border-left: 2px solid var(--color-accent-terminal);
    padding-left: calc(var(--spacing-unit) * 2);
    font-family: var(--font-mono);
}

.status-indicator small {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    display: block;
    margin-bottom: calc(var(--spacing-unit));
}

.status-indicator strong {
    font-size: 0.95rem;
    color: var(--color-accent-terminal);
    font-weight: 700;
}

.terminal-window {
    background: var(--color-bg-surface);
    border: var(--border-width) solid #003300;
    padding: calc(var(--spacing-unit) * 3);
    box-shadow: inset 0 0 40px rgba(0,0,0,0.8);
    min-height: 300px;
}

.terminal-window code {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--color-accent-terminal);
    display: block;
    white-space: pre-wrap;
}

.terminal-underscore {
    display: inline-block;
    animation: blink 1.4s steps(1) infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* ============================================
   SECTION: KNOWLEDGE (ARCHIVES)
   ============================================ */

#knowledge {
    padding: calc(var(--spacing-unit) * 12) 0;
    background-color: var(--color-bg-primary);
}

.knowledge-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 calc(var(--spacing-unit) * 3);
}

#knowledge h2 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-accent-white);
    margin-bottom: calc(var(--spacing-unit) * 6);
    font-weight: 800;
    text-align: center;
}

.archive-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: calc(var(--spacing-unit) * 4);
}

.archive-column h3 {
    font-size: 1.3rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-accent-white);
    margin-bottom: calc(var(--spacing-unit) * 2);
    font-weight: 700;
}

.archive-column p {
    font-family: var(--font-body);
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--color-text-primary);
}

.archive-card {
    background: var(--color-bg-surface);
    border: var(--border-width) solid var(--color-border);
    padding: calc(var(--spacing-unit) * 3);
    transition: border-color var(--transition-standard) ease;
}

.archive-card:hover {
    border-color: var(--color-accent-white);
}

.doc-id {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.archive-card h4 {
    font-size: 1.1rem;
    text-transform: uppercase;
    color: var(--color-accent-white);
    font-weight: 700;
    line-height: 1.3;
}

.subtitle {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    display: block;
    margin-bottom: calc(var(--spacing-unit) * 2);
}

.archive-card p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--color-text-primary);
    margin: calc(var(--spacing-unit) * 2) 0;
}

.access-link {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--color-accent-terminal);
    font-weight: 700;
    display: inline-block;
    margin-top: calc(var(--spacing-unit) * 2);
    transition: color var(--transition-fast) ease;
}

.access-link:hover {
    color: var(--color-accent-white);
}

/* ============================================
   SECTION: CONTACT (HANDSHAKE)
   ============================================ */

#contact {
    padding: calc(var(--spacing-unit) * 12) 0;
    background-color: var(--color-bg-primary);
}

.contact-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 calc(var(--spacing-unit) * 3);
}

#contact h2 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-accent-white);
    margin-bottom: calc(var(--spacing-unit) * 6);
    font-weight: 800;
    text-align: center;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: calc(var(--spacing-unit) * 8);
}

.contact-warning-left h3 {
    font-size: 1.3rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-accent-white);
    margin-bottom: calc(var(--spacing-unit) * 3);
    font-weight: 700;
}

.warning-box {
    border-left: 2px solid var(--color-warning);
    padding-left: calc(var(--spacing-unit) * 2);
}

.warning-box h4 {
    font-size: 1rem;
    color: var(--color-warning);
    margin-bottom: calc(var(--spacing-unit) * 2);
    font-weight: 700;
}

.warning-box p {
    font-family: var(--font-body);
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--color-text-primary);
    margin-bottom: calc(var(--spacing-unit) * 2);
}

.terminal-form-wrapper {
    background: var(--color-bg-surface);
    border: var(--border-width) solid var(--color-border);
}

.terminal-header {
    background: #0a0a0a;
    border-bottom: var(--border-width) solid var(--color-border);
    padding: calc(var(--spacing-unit) * 2) calc(var(--spacing-unit) * 3);
}

.terminal-status {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--color-accent-terminal);
    font-weight: 700;
}

.terminal-form {
    padding: calc(var(--spacing-unit) * 4);
}

.form-group {
    margin-bottom: calc(var(--spacing-unit) * 3);
}

.form-group label {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--color-accent-terminal);
    font-weight: 700;
    display: block;
    margin-bottom: calc(var(--spacing-unit));
}

.terminal-input,
.terminal-select,
.terminal-textarea {
    width: 100%;
    background: transparent;
    color: var(--color-text-primary);
    border: none;
    border-bottom: var(--border-width) solid var(--color-border);
    padding: calc(var(--spacing-unit) * 1.5) calc(var(--spacing-unit));
    font-family: var(--font-mono);
    font-size: 0.95rem;
    transition: border-color var(--transition-fast) ease;
}

.terminal-input:focus,
.terminal-select:focus,
.terminal-textarea:focus {
    outline: none;
    border-bottom-color: var(--color-border-focus);
}

.terminal-textarea {
    resize: vertical;
    min-height: 120px;
}

.terminal-submit {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--color-accent-white);
    background: transparent;
    border: 2px solid var(--color-accent-white);
    padding: calc(var(--spacing-unit) * 2) calc(var(--spacing-unit) * 4);
    cursor: pointer;
    transition: background-color var(--transition-fast) ease,
                color var(--transition-fast) ease,
                transform var(--transition-fast) ease;
}

.terminal-submit:hover,
.terminal-submit:focus {
    background: var(--color-accent-white);
    color: var(--color-bg-primary);
    transform: translateY(-2px);
    outline: none;
}

/* ============================================
   FOOTER (SYSTEM STATUS BAR)
   ============================================ */

.system-footer {
    background: var(--color-bg-primary);
    border-top: var(--border-width) solid var(--color-border);
    padding: calc(var(--spacing-unit) * 5) 0;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--color-text-secondary);
}

.system-footer .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 calc(var(--spacing-unit) * 3);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: calc(var(--spacing-unit) * 4);
}

.footer-col {
    flex: 1 1 250px;
}

.footer-col strong {
    color: var(--color-accent-white);
    font-weight: 700;
}

.footer-col ul {
    list-style: none;
    margin-top: calc(var(--spacing-unit) * 2);
    line-height: 2;
}

.footer-col a {
    color: var(--color-text-secondary);
    transition: color var(--transition-fast) ease;
}

.footer-col a:hover {
    color: var(--color-accent-white);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1024px) {
    .matrix-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .archive-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .architect-container {
        grid-template-columns: 1fr;
        gap: calc(var(--spacing-unit) * 6);
    }
    
    .project-container {
        grid-template-columns: 1fr;
        gap: calc(var(--spacing-unit) * 6);
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .matrix-grid {
        grid-template-columns: 1fr;
    }
    
    .archive-grid {
        grid-template-columns: 1fr;
    }
    
    .manifesto-grid {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}