/* ============================================================
XandA — Librería
Tokens: violet-600 #7C3AED · violet-700 #6D28D9 · violet-400 #A78BFA
        magenta-glow #C026D3 · ink #14101F · paper #FFFFFF
        mist #F6F3FF · line #E9E3FB
Display: Sora · Body/UI: Inter · Code: JetBrains Mono
============================================================ */

:root {
    --violet-900: #2E1065;
    --violet-700: #6D28D9;
    --violet-600: #6c63fe;
    --violet-500: #8B5CF6;
    --violet-400: #A78BFA;
    --violet-200: #DDD3FB;
    --magenta: #0000ff;
    --ink: #14101F;
    --ink-soft: #3F3A52;
    --paper: #FFFFFF;
    --mist: #F6F3FF;
    --mist-2: #EFE9FE;
    --line: #E9E3FB;
    --line-strong: #D8CDFA;
    --ok: #16A34A;

    --grad-brand: linear-gradient(135deg, var(--violet-600) 0%, var(--magenta) 100%);
    --grad-card: linear-gradient(160deg, var(--violet-500) 0%, var(--violet-700) 100%);
    --grad-hero-word: linear-gradient(90deg, var(--violet-600), var(--magenta));

    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 10px;

    --shadow-card: 0 1px 2px rgba(20, 16, 31, .04), 0 12px 28px -14px rgba(76, 29, 149, .35);
    --shadow-pop: 0 30px 60px -20px rgba(46, 16, 101, .45);

    --font-display: 'Sora', 'Inter', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', ui-monospace, monospace;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
}

img,
svg {
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
}

::selection {
    background: var(--violet-400);
    color: #fff;
}

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 32px;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-display);
    margin: 0;
    letter-spacing: -0.01em;
    color: var(--ink);
}

/* ---------------- Header ---------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(255, 255, 255, .85);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 78px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 22px;
    color: var(--ink);
}

.logo svg {
    width: 26px;
    height: 26px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 20px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 14.5px;
    color: var(--ink-soft);
}

.nav-pill svg {
    width: 17px;
    height: 17px;
}

.nav-pill.is-active {
    background: var(--grad-brand);
    color: #fff;
    box-shadow: 0 8px 18px -6px rgba(124, 58, 237, .55);
}

/* ---------------- Hero ---------------- */
.hero {
    position: relative;
    padding: 76px 0 40px;
    overflow: hidden;
    background:
        radial-gradient(680px 340px at 88% -10%, rgba(192, 38, 211, .16), transparent 60%),
        radial-gradient(720px 420px at -10% 10%, rgba(124, 58, 237, .14), transparent 60%);
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--violet-600);
    background: var(--mist);
    border: 1px solid var(--line-strong);
    padding: 7px 14px;
    border-radius: 999px;
    margin-bottom: 22px;
}

.hero-eyebrow .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--ok);
}

.hero h1 {
    font-size: clamp(34px, 4.6vw, 56px);
    line-height: 1.05;
    font-weight: 700;
    max-width: 820px;
}

.hero h1 .accent {
    background: var(--grad-hero-word);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero p.lead {
    font-size: 18px;
    color: var(--ink-soft);
    max-width: 620px;
    margin-top: 18px;
    line-height: 1.55;
}

/* search */
.search-wrap {
    margin-top: 34px;
    max-width: 620px;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--paper);
    border: 1.5px solid var(--line-strong);
    border-radius: 16px;
    padding: 15px 18px;
    box-shadow: var(--shadow-card);
    transition: border-color .15s, box-shadow .15s;
}

.search-box:focus-within {
    border-color: var(--violet-500);
    box-shadow: 0 0 0 4px rgba(124, 58, 237, .14);
}

.search-box svg {
    width: 20px;
    height: 20px;
    color: var(--violet-500);
    flex-shrink: 0;
}

.search-box input {
    border: 0;
    outline: 0;
    flex: 1;
    font-size: 15.5px;
    font-family: var(--font-body);
    color: var(--ink);
    background: transparent;
}

.search-box input::placeholder {
    color: #9C93B8;
}

.search-kbd {
    font-family: var(--font-mono);
    font-size: 11.5px;
    color: #9C93B8;
    border: 1px solid var(--line);
    padding: 2px 7px;
    border-radius: 6px;
    background: var(--mist);
}

.stat-row {
    display: flex;
    gap: 34px;
    margin-top: 38px;
    flex-wrap: wrap;
}

.stat-row .stat b {
    font-family: var(--font-display);
    font-size: 26px;
    display: block;
    color: var(--ink);
}

.stat-row .stat span {
    font-size: 13px;
    color: var(--ink-soft);
}

/* ---------------- Category tab bar ---------------- */
.tab-bar-outer {
    position: sticky;
    top: 78px;
    z-index: 50;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}

.tab-bar {
    display: flex;
    gap: 6px;
    padding: 14px 0;
    overflow-x: auto;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 9px;
    white-space: nowrap;
    padding: 10px 18px;
    border-radius: 999px;
    border: 1.5px solid transparent;
    background: transparent;
    font-weight: 600;
    font-size: 14.5px;
    color: var(--ink-soft);
}

.tab-btn svg {
    width: 17px;
    height: 17px;
}

.tab-btn .count {
    font-size: 11.5px;
    font-weight: 700;
    background: var(--mist-2);
    color: var(--violet-700);
    padding: 1px 8px;
    border-radius: 999px;
}

.tab-btn.is-active {
    background: var(--ink);
    color: #fff;
    border-color: var(--ink);
}

.tab-btn.is-active .count {
    background: rgba(255, 255, 255, .18);
    color: #fff;
}

.tab-btn:not(.is-active):hover {
    background: var(--mist);
    color: var(--ink);
}

/* ---------------- Sections ---------------- */
.section {
    padding: 64px 0 20px;
}

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.section-head h2 {
    font-size: 30px;
    font-weight: 700;
}

.section-head .sub {
    color: var(--ink-soft);
    font-size: 15px;
    margin-top: 8px;
    max-width: 560px;
}

.section-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--violet-600);
    margin-bottom: 10px;
}

.section-tag svg {
    width: 15px;
    height: 15px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.empty-state {
    padding: 70px 20px;
    text-align: center;
    color: var(--ink-soft);
    border: 1.5px dashed var(--line-strong);
    border-radius: var(--radius-lg);
    display: none;
}

.empty-state.is-visible {
    display: block;
}

.empty-state svg {
    width: 38px;
    height: 38px;
    color: var(--violet-400);
    margin: 0 auto 14px;
}

.empty-state strong {
    display: block;
    color: var(--ink);
    font-size: 16px;
    margin-bottom: 6px;
}

/* ---------------- Card ---------------- */
.card {
    position: relative;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: var(--shadow-card);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
    cursor: pointer;
}

.card:hover {
    transform: translateY(-4px);
    border-color: var(--violet-400);
    box-shadow: 0 20px 40px -18px rgba(109, 40, 217, .35);
}

.card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.card-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--grad-card);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 18px -8px rgba(109, 40, 217, .55);
    flex-shrink: 0;
}

.card-icon svg {
    width: 26px;
    height: 26px;
    color: #fff;
}

.badge-new {
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: .05em;
    color: var(--magenta);
    background: #FCE8FB;
    padding: 3px 9px;
    border-radius: 999px;
    text-transform: uppercase;
    height: fit-content;
}

.card h3 {
    font-size: 18px;
    font-weight: 700;
}

.card p.desc {
    font-size: 14px;
    color: var(--ink-soft);
    line-height: 1.5;
    margin: 0;
    flex: 1;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--violet-700);
    background: var(--mist-2);
    border: 1px solid var(--line-strong);
    padding: 3px 9px;
    border-radius: 7px;
}

.card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 4px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.card-meta {
    font-size: 12px;
    color: #9C93B8;
    display: flex;
    align-items: center;
    gap: 6px;
}

.card-meta svg {
    width: 14px;
    height: 14px;
}

.btn-download {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    background: var(--ink);
    padding: 9px 15px;
    border-radius: 10px;
    border: none;
    transition: background .15s, transform .15s;
}

.btn-download svg {
    width: 15px;
    height: 15px;
}

.btn-download:hover {
    background: var(--violet-700);
    transform: translateY(-1px);
}

/* animation preview swatch (Animaciones cards) */
.preview-strip {
    height: 74px;
    border-radius: 12px;
    background: var(--mist);
    border: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.preview-strip .demo-box {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: var(--grad-brand);
}

/* template thumb */
.thumb {
    height: 120px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--line);
}

.thumb .thumb-bar {
    height: 14px;
    background: var(--ink);
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 8px;
    flex-shrink: 0;
}

.thumb .thumb-bar span {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .4);
}

.thumb .thumb-body {
    flex: 1;
    display: grid;
}

/* ---------------- Buttons generic ---------------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-weight: 700;
    font-size: 15px;
    padding: 14px 24px;
    border-radius: 13px;
    border: none;
}

.btn-primary {
    background: var(--grad-brand);
    color: #fff;
    box-shadow: 0 12px 24px -10px rgba(124, 58, 237, .55);
}

.btn-primary:hover {
    filter: brightness(1.05);
}

.btn-ghost {
    background: var(--paper);
    color: var(--ink);
    border: 1.5px solid var(--line-strong);
}

.btn-ghost:hover {
    background: var(--mist);
}

/* ---------------- Modal ---------------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20, 16, 31, .55);
    backdrop-filter: blur(3px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 24px;
}

.modal-overlay.is-open {
    display: flex;
}

.modal {
    width: 100%;
    max-width: 920px;
    max-height: 88vh;
    overflow: auto;
    background: var(--paper);
    border-radius: 24px;
    box-shadow: var(--shadow-pop);
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.modal-visual {
    background: var(--grad-card);
    padding: 34px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #fff;
}

.modal-visual .m-icon {
    width: 58px;
    height: 58px;
    border-radius: 16px;
    background: rgba(255, 255, 255, .16);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.modal-visual .m-icon svg {
    width: 30px;
    height: 30px;
    color: #fff;
}

.code-window {
    margin-top: 20px;
    background: #0F0B1A;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .12);
}

.code-window .cw-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 9px 12px;
    background: #170F29;
}

.code-window .cw-bar span {
    width: 9px;
    height: 9px;
    border-radius: 50%;
}

.code-window .cw-bar span:nth-child(1) {
    background: #FF5F57;
}

.code-window .cw-bar span:nth-child(2) {
    background: #FEBC2E;
}

.code-window .cw-bar span:nth-child(3) {
    background: #28C840;
}

.code-window .cw-title {
    margin-left: 6px;
    font-size: 11px;
    color: #9C93B8;
    font-family: var(--font-mono);
}

.code-window pre {
    margin: 0;
    padding: 14px 16px;
    font-family: var(--font-mono);
    font-size: 12.5px;
    line-height: 1.7;
    color: #E4DBFF;
    white-space: pre-wrap;
    word-break: break-word;
}

.code-window pre .l1 {
    color: #7FE3A3;
}

.code-window pre .l2 {
    color: #C9B6FF;
}

.code-window pre .l3 {
    color: #9C93B8;
}

.modal-body {
    padding: 34px;
    display: flex;
    flex-direction: column;
}

.modal-body h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 10px;
}
.contenedor-encabezado-ventana-emergente{
    width: 100%;
    height: auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: start;
    gap: 10px;
}
.modal-body p.mdesc {
    color: var(--ink-soft);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .9);
    border: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

.modal-close svg {
    width: 16px;
    height: 16px;
}

.modal {
    position: relative;
}

.file-list {
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 22px;
    max-height: 200px;
    height: auto;
    overflow-y: auto;
}

.file-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    font-size: 13.5px;
    font-family: var(--font-mono);
    color: var(--ink-soft);
    border-bottom: 1px solid var(--line);
}

.file-row:last-child {
    border-bottom: none;
}

.file-row svg {
    width: 15px;
    height: 15px;
    color: var(--violet-500);
    flex-shrink: 0;
}

.modal-actions {
    margin-top: auto;
    display: flex;
    gap: 10px;
}

.toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translate(-50%, 20px);
    background: var(--ink);
    color: #fff;
    padding: 14px 22px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 20px 40px -14px rgba(0, 0, 0, .4);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s, transform .25s;
    z-index: 300;
}

.toast svg {
    width: 17px;
    height: 17px;
    color: #7FE3A3;
}

.toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* ---------------- Footer ---------------- */
.site-footer {
    margin-top: 80px;
    padding: 60px 0 40px;
    border-top: 1px solid var(--line);
    background: var(--mist);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 40px;
}

.footer-grid h4 {
    font-size: 14px;
    margin-bottom: 16px;
}

.footer-grid ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 11px;
}

.footer-grid a {
    font-size: 14px;
    color: var(--ink-soft);
}

.footer-grid a:hover {
    color: var(--violet-600);
}

.footer-bottom {
    margin-top: 44px;
    padding-top: 24px;
    border-top: 1px solid var(--line-strong);
    font-size: 13px;
    color: #9C93B8;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

/* ---------------- Responsive ---------------- */
@media (max-width:980px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .modal {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width:640px) {
    .container {
        padding: 0 20px;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    .main-nav .nav-pill span {
        display: none;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .stat-row {
        gap: 22px;
    }
}

/* ---------------- Mini live demos inside Animaciones cards ---------------- */
.demo-fade {
    animation: demoFade 1.8s ease-in-out infinite;
}

@keyframes demoFade {

    0%,
    100% {
        opacity: .15;
    }

    50% {
        opacity: 1;
    }
}

.demo-slide {
    animation: demoSlide 1.8s cubic-bezier(.22, 1, .36, 1) infinite;
}

@keyframes demoSlide {
    0% {
        transform: translateX(-16px);
        opacity: .2;
    }

    50% {
        transform: translateX(0);
        opacity: 1;
    }

    100% {
        transform: translateX(-16px);
        opacity: .2;
    }
}

.demo-hover {
    animation: demoHover 1.8s ease-in-out infinite;
}

@keyframes demoHover {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.25);
    }
}

.demo-loader {
    border-radius: 50%;
    border: 3px solid rgba(124, 58, 237, .25);
    border-top-color: var(--violet-600);
    animation: demoSpin .8s linear infinite;
    background: transparent;
}

@keyframes demoSpin {
    to {
        transform: rotate(360deg);
    }
}

.demo-scroll {
    animation: demoScroll 1.8s ease-in-out infinite;
}

@keyframes demoScroll {

    0%,
    100% {
        transform: translateY(6px);
        opacity: .2;
    }

    50% {
        transform: translateY(0);
        opacity: 1;
    }
}

.demo-bounce {
    border-radius: 50%;
    animation: demoBounce 1s ease-in-out infinite;
}

@keyframes demoBounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-14px);
    }
}

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


/* FOOTER | INICIO */
.footer {
    width: calc(100% - 50px);
    height: auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-content: center;
    grid-gap: 15px 15px;
    padding: 50px 25px 0px 25px;
    border-top: 1px #00000015 solid;
}

.contenedor-opciones-footer {
    width: 25%;
    height: auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-content: start;
    grid-gap: 10px 10px;
}

.contenedor-opciones-footer a {
    width: 100%;
    color: #252525;
    font-weight: 400;
    font-size: 15px;
    text-align: center;
}

.footer-imagen {
    width: 50%;
}

.footer-barra {
    width: calc(100% - 30px);
    height: auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-content: center;
    background-color: #f5f5f5;
    padding: 20px 15px;
    margin-top: 50px;
}

.footer-barra p {
    font-weight: 300;
}

.justify-content-end-center {
    justify-content: end;
}

.justify-content-start-center {
    justify-content: start;
}

.fondo-gris {
    background-color: #e1e1e125;
}

/*FOOTER | FINAL */