/* ── RESET ── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

a {
    text-decoration: none;
}

ul {
    list-style: none;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

/* ── VARIABLES ── */
:root {
    --c-bg: #141210;
    --c-surface: #1f1c19;
    --c-surface2: #191613;
    --c-border: rgba(249, 115, 22, .1);
    --c-border2: rgba(249, 115, 22, .22);
    --c-text: #faf7f2;
    --c-muted: #a8a29e;
    --c-hint: #78716c;
    --c-cyan: #f97316;
    --c-cyan2: #ea580c;
    --c-violet: #3b82f6;
    --c-violet2: #2563eb;
    --c-green: #4ade80;
    --radius: 12px;
    --radius-lg: 20px;
    --shadow: 0 4px 24px rgba(0, 0, 0, .45);
    --transition: .22s cubic-bezier(.4, 0, .2, 1);
}

[data-theme="light"] {
    --c-bg: #faf7f2;
    --c-surface: #f5f0e8;
    --c-surface2: #ede8e0;
    --c-border: rgba(249, 115, 22, .12);
    --c-border2: rgba(249, 115, 22, .25);
    --c-text: #1c1917;
    --c-muted: #57534e;
    --c-hint: #a8a29e;
    --c-cyan: #ea580c;
    --c-cyan2: #c2410c;
    --c-violet: #2563eb;
    --c-violet2: #1d4ed8;
    --c-green: #16a34a;
    --shadow: 0 4px 24px rgba(0, 0, 0, .1);
}

body {
    background: var(--c-bg);
    color: var(--c-text);
    font-family: 'Outfit', sans-serif;
    font-weight: 400;
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    transition: background .35s ease, color .35s ease;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Generador de ruido procedural */
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    pointer-events: none; 
    z-index: 9999;
    opacity: 0.035; 
    mix-blend-mode: overlay;
}

html {
    scroll-behavior: smooth;
}

/* Selección de texto personalizada con tu identidad visual */
::selection {
    background: var(--orange); /* Basado en tu paleta neon */
    color: white;
}

/* Mejora de la barra de scroll para el Dark Mode */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--c-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--c-border2);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--orange);
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── NAV ── */
.nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0 24px;
    background: rgba(20, 18, 16, .88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--c-border);
    transition: background var(--transition);
}

[data-theme="light"] .nav {
    background: rgba(250, 247, 242, .92);
}

.nav-inner {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--c-text);
}

.nav-logo-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--c-cyan), var(--c-violet));
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-logo-icon svg {
    width: 16px;
    height: 16px;
}

.nav-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 16px;
    border-radius: 10px;
    border: 1px solid var(--c-border2);
    font-size: .85rem;
    font-weight: 600;
    color: var(--c-muted);
    transition: color var(--transition), border-color var(--transition), background var(--transition);
}

.nav-back:hover {
    color: var(--c-text);
    border-color: var(--c-cyan);
    background: rgba(249, 115, 22, .05);
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* lang toggle */
.lang-toggle {
    display: flex;
    align-items: center;
    gap: 2px;
    background: var(--c-surface);
    border: 1px solid var(--c-border2);
    border-radius: 8px;
    padding: 3px;
}

.lang-btn {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .04em;
    color: var(--c-muted);
    transition: all var(--transition);
    cursor: pointer;
}

.lang-btn.active {
    background: linear-gradient(135deg, var(--c-cyan2), var(--c-violet2));
    color: #fff;
}

.lang-btn:not(.active):hover {
    color: var(--c-text);
}

/* theme toggle */
.theme-toggle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--c-surface);
    border: 1.5px solid var(--c-border2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    transition: transform .2s ease, box-shadow .2s ease, background .35s ease;
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(249, 115, 22, .3);
}

.theme-toggle .icon-moon {
    display: block;
}

.theme-toggle .icon-sun {
    display: none;
}

[data-theme="light"] .theme-toggle .icon-moon {
    display: none;
}

[data-theme="light"] .theme-toggle .icon-sun {
    display: block;
}

/* ── MAIN ── */
main {
    flex: 1;
    padding: 56px 24px 80px;
}

.legal-wrap {
    max-width: 760px;
    margin: 0 auto;
}

/* page header */
.legal-header {
    margin-bottom: 48px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--c-border);
}

.legal-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: .72rem;
    font-weight: 600;
    color: var(--c-cyan);
    letter-spacing: .14em;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.legal-eyebrow::before {
    content: '';
    width: 24px;
    height: 1.5px;
    background: var(--c-cyan);
}

.legal-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1.1;
    margin-bottom: 14px;
}

.legal-title .hl {
    background: linear-gradient(90deg, var(--c-cyan), var(--c-violet));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.legal-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    font-size: .8rem;
    color: var(--c-hint);
    font-family: 'JetBrains Mono', monospace;
}

.legal-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.legal-meta span::before {
    content: '·';
}

.legal-meta span:first-child::before {
    content: '';
}

/* index card */
.legal-index {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    margin-bottom: 48px;
}

.legal-index-title {
    font-size: .72rem;
    font-weight: 600;
    color: var(--c-hint);
    letter-spacing: .1em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.legal-index-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.legal-index-list a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    border-radius: 8px;
    font-size: .85rem;
    color: var(--c-muted);
    transition: color var(--transition), background var(--transition);
}

.legal-index-list a:hover {
    color: var(--c-text);
    background: rgba(249, 115, 22, .06);
}

.legal-index-list a .idx {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    flex-shrink: 0;
    background: rgba(249, 115, 22, .1);
    border: 1px solid var(--c-border2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .65rem;
    font-weight: 700;
    color: var(--c-cyan);
    font-family: 'JetBrains Mono', monospace;
}

/* sections */
.legal-section {
    margin-bottom: 36px;
    padding: 28px 32px;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    transition: border-color var(--transition);
}

.legal-section:hover {
    border-color: var(--c-border2);
}

.legal-section-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: .7rem;
    font-weight: 500;
    color: var(--c-cyan);
    letter-spacing: .1em;
    margin-bottom: 8px;
    display: block;
}

.legal-section h2 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 14px;
    color: var(--c-text);
}

.legal-section p {
    font-size: .93rem;
    color: var(--c-muted);
    line-height: 1.85;
}

.legal-section strong {
    color: var(--c-text);
    font-weight: 600;
}

.legal-section a {
    color: var(--c-cyan);
    border-bottom: 1px solid rgba(249, 115, 22, .3);
    transition: border-color var(--transition);
}

.legal-section a:hover {
    border-color: var(--c-cyan);
}

/* highlight box */
.legal-highlight {
    margin-top: 14px;
    padding: 12px 16px;
    background: rgba(249, 115, 22, .06);
    border: 1px solid rgba(249, 115, 22, .18);
    border-radius: 10px;
    font-size: .83rem;
    color: var(--c-muted);
    line-height: 1.7;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.legal-highlight-icon {
    font-size: 1rem;
    flex-shrink: 0;
    margin-top: 1px;
}

/* contact CTA */
.legal-contact {
    margin-top: 48px;
    padding: 28px 32px;
    background: linear-gradient(135deg, rgba(249, 115, 22, .07), rgba(59, 130, 246, .07));
    border: 1px solid rgba(249, 115, 22, .22);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.legal-contact h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.legal-contact p {
    font-size: .84rem;
    color: var(--c-muted);
}

.legal-contact-btns {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-contact {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: .85rem;
    font-weight: 600;
    transition: transform .2s, box-shadow .2s;
}

.btn-contact.primary {
    background: linear-gradient(135deg, var(--c-cyan2), var(--c-violet2));
    color: #fff;
}

.btn-contact.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(249, 115, 22, .3);
}

.btn-contact.wa {
    background: #25d366;
    color: #fff;
}

.btn-contact.wa:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, .3);
}

/* ─────────────────────────────────────
   FOOTER
───────────────────────────────────── */
footer {
    padding: 28px 0;
    border-top: 1px solid var(--c-border);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 1rem;
    color: var(--c-text)
}

.footer-logo-icon {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    background: linear-gradient(135deg, var(--c-cyan2), var(--c-violet2));
    display: flex;
    align-items: center;
    justify-content: center
}

.footer-logo-icon svg {
    width: 14px;
    height: 14px
}

footer small {
    font-size: .8rem;
    color: var(--c-hint)
}

.footer-avail {
    font-size: .8rem;
    color: var(--c-cyan);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px
}

.footer-avail::before {
    content: '';
    width: 7px;
    height: 7px;
    background: var(--c-green);
    border-radius: 50%;
    animation: blink 2s infinite
}

/* Extensiones para tu estructura existente */
.footer-inner {
    gap: 32px; /* Aumentamos el gap para acomodar más contenido */
    align-items: flex-start;
}

.footer-mini-bio {
    font-size: 0.85rem;
    color: var(--c-hint);
    max-width: 250px;
    margin-top: 12px;
    line-height: 1.5;
}

.footer-stack-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-width: 300px;
}

.badge-item {
    font-size: 0.7rem;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--c-border);
    border-radius: 6px;
    color: var(--c-muted);
    font-family: 'JetBrains Mono', monospace;
}

.footer-social-links {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
}

.footer-social-links a {
    color: var(--c-text);
    font-size: 1.2rem;
    transition: color 0.2s;
}

.footer-social-links a:hover {
    color: var(--c-cyan);
}

.legal-link {
    font-size: .78rem;
    color: var(--c-hint);
    text-decoration: none;
    border-bottom: 1px solid rgba(249,115,22,.25);
    transition: color .2s, border-color .2s;
}

.legal-link:hover {
    color: var(--c-cyan);
    border-color: var(--c-cyan);
}

.footer-bottom-bar {
    width: 100%;
    margin-top: 30px;
}

/* Ajuste Mobile */
@media (max-width: 768px) {
    .footer-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .footer-mini-bio { margin: 12px auto; }
    .footer-stack-badges { justify-content: center; }
}
@keyframes blink {

    0%,
    100% {
        opacity: 1
    }

    50% {
        opacity: .2
    }
}

/* ── FLOATING BUTTONS ── */
.btn-float-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.btn-float {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .3);
    transition: transform .2s ease, box-shadow .2s ease;
    font-size: 1.3rem;
    text-decoration: none;
}

.btn-float:hover {
    transform: scale(1.1);
}

.btn-float.whatsapp {
    background: #25d366;
    color: #fff;
}

.btn-float.whatsapp:hover {
    box-shadow: 0 6px 20px rgba(37, 211, 102, .4);
}

.btn-float.up {
    background: var(--c-surface);
    color: var(--c-muted);
    border: 1.5px solid var(--c-border2);
}

.btn-float.up:hover {
    color: var(--c-text);
    box-shadow: 0 6px 20px rgba(249, 115, 22, .25);
}

/* ── BG DECORATION ── */
.bg-glow {
    position: fixed;
    pointer-events: none;
    z-index: 0;
    border-radius: 50%;
    filter: blur(80px);
}

.bg-glow-1 {
    width: 400px;
    height: 400px;
    top: 5%;
    right: -100px;
    background: rgba(249, 115, 22, .05);
}

.bg-glow-2 {
    width: 300px;
    height: 300px;
    bottom: 10%;
    left: -80px;
    background: rgba(59, 130, 246, .05);
}

main,
nav,
footer {
    position: relative;
    z-index: 1;
}

/* ── RESPONSIVE ── */
@media(max-width: 600px) {
    main {
        padding: 40px 16px 60px;
    }

    .legal-section {
        padding: 20px;
    }

    .legal-contact {
        flex-direction: column;
    }

    .nav-back span {
        display: none;
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
}