/* ═══════════════════════════════════════════════════
   AI MAKER FABLAB — SHARED DESIGN SYSTEM
   Stack: Rust · SQL · Dokku · RAG Multimodal
   Trilingual: FR · ES · EN
   ═══════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=Outfit:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
    --ink: #0f0f10;
    --ink-soft: #1a1a1e;
    --surface: #141418;
    --surface-2: #1c1c22;
    --surface-3: #24242c;
    --paper: #f6f3ed;
    --paper-warm: #efe9df;
    --cream: #faf8f4;
    --white: #ffffff;
    --rust: #c45527;
    --rust-light: #e8734a;
    --rust-glow: rgba(196, 85, 39, 0.15);
    --sql-blue: #2563eb;
    --sql-light: #60a5fa;
    --dokku-green: #059669;
    --dokku-light: #34d399;
    --rag-violet: #7c3aed;
    --rag-light: #a78bfa;
    --prompt-amber: #d97706;
    --prompt-light: #fbbf24;
    --border-dark: #2a2a32;
    --border-darker: #1e1e26;
    --text-primary: #eeeee8;
    --text-secondary: #9a9590;
    --text-muted: #6a665f;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.15);
    --shadow-md: 0 8px 32px rgba(0,0,0,0.2);
    --shadow-lg: 0 20px 60px rgba(0,0,0,0.3);
    --shadow-glow: 0 0 60px rgba(196, 85, 39, 0.12);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Outfit', sans-serif;
    background: var(--ink);
    color: var(--text-primary);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* ═══ HEADER ═══ */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    background: rgba(15, 15, 16, 0.82);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border-dark);
    height: 64px;
    display: flex;
    align-items: center;
    padding: 0 40px;
    justify-content: space-between;
    transition: background 0.3s;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    flex-shrink: 0;
}

.logo-mark {
    width: 34px; height: 34px;
    background: var(--rust);
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 0.72rem;
    letter-spacing: -0.02em;
}

.logo-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.02em;
}

.header-center {
    display: flex;
    align-items: center;
    gap: 24px;
}

.header-nav {
    display: flex;
    gap: 6px;
    list-style: none;
}

.header-nav a {
    font-size: 0.74rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s;
    padding: 6px 14px;
    border-radius: 8px;
}

.header-nav a:hover {
    color: var(--text-primary);
    background: var(--surface-2);
}

.header-nav a.active {
    color: var(--rust-light);
    background: rgba(196, 85, 39, 0.08);
}

.lang-switch {
    display: flex;
    gap: 2px;
    background: var(--surface-2);
    border-radius: 8px;
    padding: 3px;
    border: 1px solid var(--border-dark);
}

.lang-btn {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    padding: 5px 10px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s;
}

.lang-btn.active {
    background: var(--surface-3);
    color: var(--text-primary);
}

.lang-btn:hover:not(.active) { color: var(--text-secondary); }

.header-right {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

.header-cta {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
    font-weight: 600;
    padding: 8px 18px;
    background: var(--rust);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.25s;
    letter-spacing: 0.04em;
}

.header-cta:hover {
    background: var(--rust-light);
    box-shadow: var(--shadow-glow);
}

/* Mobile menu */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.4rem;
    cursor: pointer;
    padding: 4px;
}

/* ═══ FOOTER ═══ */
.site-footer {
    border-top: 1px solid var(--border-dark);
    padding: 64px 48px 40px;
    max-width: 1320px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-brand-name {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-brand-name .fm {
    width: 26px; height: 26px;
    background: var(--rust);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.58rem;
}

.footer-brand-desc {
    font-size: 0.84rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 16px;
    max-width: 320px;
}

.footer-badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6rem;
    color: var(--text-muted);
    letter-spacing: 0.08em;
}

.footer-col-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.62rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a {
    font-size: 0.84rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover { color: var(--rust-light); }

.footer-contact-line {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.footer-contact-line a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-contact-line a:hover { color: var(--rust-light); }

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 28px;
    border-top: 1px solid var(--border-darker);
}

.footer-copy {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.62rem;
    color: var(--text-muted);
    letter-spacing: 0.04em;
}

.footer-tags {
    display: flex;
    gap: 10px;
}

.footer-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.56rem;
    letter-spacing: 0.06em;
    padding: 3px 10px;
    border-radius: 4px;
    font-weight: 600;
}

.ft-rust { background: rgba(196, 85, 39, 0.1); color: var(--rust); }
.ft-sql { background: rgba(37, 99, 235, 0.08); color: var(--sql-light); }
.ft-dokku { background: rgba(5, 150, 105, 0.08); color: var(--dokku-light); }

/* ═══ SHARED COMPONENTS ═══ */
.container { max-width: 1320px; margin: 0 auto; padding: 0 48px; }
.section-pad { padding-top: 100px; padding-bottom: 100px; }
.section-pad-sm { padding-top: 64px; padding-bottom: 64px; }

.section-eyebrow {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.64rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 12px;
    text-align: center;
}

.section-title {
    font-family: 'DM Serif Display', serif;
    font-size: clamp(1.9rem, 3.4vw, 3rem);
    line-height: 1.15;
    text-align: center;
    margin-bottom: 16px;
}

.section-title em { font-style: italic; color: var(--rust); }

.section-sub {
    font-size: 1.05rem;
    font-weight: 300;
    color: var(--text-secondary);
    text-align: center;
    max-width: 620px;
    margin: 0 auto;
    line-height: 1.8;
}

.section-sub strong { color: var(--text-primary); font-weight: 600; }

.badge-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.64rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 5px 16px;
    background: var(--surface-2);
    border: 1px solid var(--border-dark);
    border-radius: 100px;
    margin-bottom: 28px;
    color: var(--rust);
}

.badge-inline .dot {
    width: 6px; height: 6px;
    background: var(--dokku-green);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.4} }

/* Cards */
.card {
    background: var(--surface);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-md);
    padding: 32px 28px;
    transition: all 0.25s;
}

.card:hover {
    border-color: var(--rust);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.card-icon { font-size: 1.8rem; margin-bottom: 16px; display: block; }

.card-title {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.card-desc {
    font-size: 0.84rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 0.92rem;
    padding: 14px 28px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.25s;
}

.btn-primary {
    background: var(--rust);
    color: white;
}

.btn-primary:hover {
    background: var(--rust-light);
    box-shadow: var(--shadow-glow);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-dark);
}

.btn-secondary:hover {
    border-color: var(--rust);
    background: rgba(196, 85, 39, 0.05);
}

/* Grid helpers */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

/* Divider */
.divider {
    height: 1px;
    background: var(--border-dark);
    margin: 0 auto;
    max-width: 1320px;
}

/* i18n visibility */
[data-lang] { display: none; }
body.lang-fr [data-lang="fr"] { display: initial; }
body.lang-es [data-lang="es"] { display: initial; }
body.lang-en [data-lang="en"] { display: initial; }

/* Block-level i18n */
.i18n-block[data-lang] { display: none; }
body.lang-fr .i18n-block[data-lang="fr"] { display: block; }
body.lang-es .i18n-block[data-lang="es"] { display: block; }
body.lang-en .i18n-block[data-lang="en"] { display: block; }

body.lang-fr .i18n-flex[data-lang="fr"] { display: flex; }
body.lang-es .i18n-flex[data-lang="es"] { display: flex; }
body.lang-en .i18n-flex[data-lang="en"] { display: flex; }

body.lang-fr .i18n-grid[data-lang="fr"] { display: grid; }
body.lang-es .i18n-grid[data-lang="es"] { display: grid; }
body.lang-en .i18n-grid[data-lang="en"] { display: grid; }

body.lang-fr .i18n-inline[data-lang="fr"] { display: inline; }
body.lang-es .i18n-inline[data-lang="es"] { display: inline; }
body.lang-en .i18n-inline[data-lang="en"] { display: inline; }

/* Currency */
.price-eur, .price-cop, .price-usd { display: none !important; }
body.currency-eur .price-eur { display: inline !important; }
body.currency-cop .price-cop { display: inline !important; }
body.currency-usd .price-usd { display: inline !important; }
.alt-eur, .alt-cop, .alt-usd { display: none !important; }
body.currency-eur .alt-eur { display: block !important; }
body.currency-cop .alt-cop { display: block !important; }
body.currency-usd .alt-usd { display: block !important; }

/* ═══ RESPONSIVE ═══ */
@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 768px) {
    .site-header { padding: 0 16px; }
    .header-center { display: none; }
    .mobile-toggle { display: block; }
    .container { padding: 0 20px; }
    .section-pad { padding-top: 64px; padding-bottom: 64px; }
    .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 28px; }
    .footer-bottom { flex-direction: column; gap: 14px; text-align: center; }
    .footer-tags { justify-content: center; }
    .site-footer { padding: 40px 20px 28px; }
}
