/* ============================================================
   CA INVESTS — Sistema de diseño (fintech minimalista)
   ============================================================ */

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

:root {
    /* Superficies */
    --bg: #0A0C10;
    --bg-soft: #0E1116;
    --surface: #12161C;
    --surface-2: #171C24;
    --border: #232A34;
    --border-soft: #1B212A;

    /* Marca (del logo) */
    --gold: #F5B93F;
    --gold-soft: rgba(245, 185, 63, 0.12);
    --blue: #4C9BE8;
    --green: #57C77E;
    --orange: #F2A03D;
    --red: #E85C4A;

    /* Texto */
    --text: #E7EDF4;
    --text-2: #B7C1CD;
    --muted: #8A96A4;

    /* Sistema */
    --radius: 14px;
    --radius-sm: 10px;
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.25);
    --maxw: 1180px;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;
    --font-head: 'Space Grotesk', 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* Alias de compatibilidad (nombres antiguos) */
    --accent-gold: var(--gold);
    --accent-green: var(--green);
    --accent-blue: var(--blue);
    --text-main: var(--text);
    --text-muted: var(--muted);
    --terminal-bg: var(--surface);
    --bg-dark: var(--bg);
    --border-color: var(--border);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a { color: inherit; }
img { max-width: 100%; display: block; }

/* Fondo con textura sutil */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        radial-gradient(900px 500px at 85% -10%, rgba(245, 185, 63, 0.06), transparent 60%),
        radial-gradient(700px 500px at 5% 0%, rgba(76, 155, 232, 0.05), transparent 55%);
    pointer-events: none;
    z-index: 0;
}

/* ----------------------------- Header / Nav ----------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 12, 16, 0.72);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border-soft);
}

.nav-inner {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0.7rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand { display: flex; align-items: center; gap: 0.65rem; text-decoration: none; }
.brand img { height: 46px; width: auto; }

.nav-links { display: flex; align-items: center; gap: 0.35rem; }

.nav-links a {
    color: var(--text-2);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5rem 0.85rem;
    border-radius: 8px;
    transition: color 0.18s, background 0.18s;
    white-space: nowrap;
}
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
.nav-links a.active { color: var(--gold); }

.nav-cta {
    background: var(--gold) !important;
    color: #0A0C10 !important;
    font-weight: 600 !important;
}
.nav-cta:hover { filter: brightness(1.06); background: var(--gold) !important; }

.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border);
    color: var(--text);
    width: 42px; height: 40px;
    border-radius: 9px;
    cursor: pointer;
    font-size: 1.2rem;
}

@media (max-width: 860px) {
    .nav-toggle { display: block; }
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0; right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0.2rem;
        background: var(--bg-soft);
        border-bottom: 1px solid var(--border);
        padding: 0.6rem 1rem 1rem;
        display: none;
    }
    .nav-links.open { display: flex; }
    .nav-links a { padding: 0.7rem 0.9rem; }
}

/* ----------------------------- Layout ----------------------------- */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 1.5rem; position: relative; z-index: 1; }
.section { padding: 4.5rem 0; position: relative; z-index: 1; }
.section-sm { padding: 3rem 0; }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-family: var(--font-mono);
    font-size: 0.74rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--gold);
    background: var(--gold-soft);
    border: 1px solid rgba(245, 185, 63, 0.25);
    padding: 0.32rem 0.75rem;
    border-radius: 999px;
    margin-bottom: 1.1rem;
}

h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; }

.section-title { font-size: clamp(1.6rem, 3.2vw, 2.3rem); margin-bottom: 0.7rem; }
.section-lead { color: var(--muted); font-size: 1.05rem; max-width: 640px; margin-bottom: 2.5rem; }

.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* ----------------------------- Botones ----------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.4rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.94rem;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform 0.18s, filter 0.18s, background 0.18s, border-color 0.18s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--gold); color: #0A0C10; box-shadow: 0 6px 22px rgba(245, 185, 63, 0.2); }
.btn-primary:hover { filter: brightness(1.05); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

/* ----------------------------- Cards ----------------------------- */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.6rem;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.card:hover { transform: translateY(-3px); border-color: #313a46; box-shadow: var(--shadow-soft); }

.grid { display: grid; gap: 1.3rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ----------------------------- Footer ----------------------------- */
.site-footer {
    border-top: 1px solid var(--border-soft);
    background: var(--bg-soft);
    padding: 3.5rem 0 2rem;
    margin-top: 3rem;
    position: relative;
    z-index: 1;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 2.5rem;
    margin-bottom: 2.5rem;
}
@media (max-width: 780px) { .footer-grid { grid-template-columns: 1fr; gap: 1.8rem; } }

.footer-col h4 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); margin-bottom: 1rem; font-family: var(--font-mono); font-weight: 500; }
.footer-col a { display: block; color: var(--text-2); text-decoration: none; font-size: 0.92rem; padding: 0.28rem 0; transition: color 0.15s; }
.footer-col a:hover { color: var(--gold); }
.footer-col p { color: var(--muted); font-size: 0.9rem; }

.social-row { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 1.1rem; }
.social-btn {
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-2);
    transition: all 0.18s;
}
.social-btn:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-2px); }
.social-btn svg { width: 18px; height: 18px; fill: currentColor; }

.disclaimer {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-sm);
    padding: 1.1rem 1.3rem;
    font-size: 0.8rem;
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 1.6rem;
}
.disclaimer strong { color: var(--gold); }

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding-top: 1.6rem;
    border-top: 1px solid var(--border-soft);
    font-size: 0.82rem;
    color: var(--muted);
    font-family: var(--font-mono);
}
.footer-bottom a { color: var(--muted); text-decoration: none; }
.footer-bottom a:hover { color: var(--gold); }
.footer-legal { display: flex; gap: 1.2rem; flex-wrap: wrap; }

/* ----------------------------- Utilidades varias ----------------------------- */
.pill {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    padding: 0.28rem 0.7rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    color: var(--text-2);
}
.mono { font-family: var(--font-mono); }
.text-muted { color: var(--muted); }
.text-gold { color: var(--gold); }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* Cookie banner */
.cookie-banner {
    position: fixed;
    bottom: 18px; left: 50%;
    transform: translateX(-50%);
    width: min(680px, calc(100% - 32px));
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.2rem;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow);
    font-size: 0.86rem;
    color: var(--text-2);
}
.cookie-banner .btn { padding: 0.55rem 1rem; font-size: 0.85rem; white-space: nowrap; }
@media (max-width: 560px) { .cookie-banner { flex-direction: column; align-items: stretch; text-align: center; } }
